diff options
| author | Andreas Enge <andreas@enge.fr> | 2026-02-17 15:30:00 +0100 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2026-02-17 16:52:31 +0100 |
| commit | 51af666373542f0d55ff515b1243258c9b4f018f (patch) | |
| tree | acefe1203a67b9c26b7b147cd4aa97398afffd63 /gnu/bootloader | |
| parent | 7911238d0945039d479163d33801a7a4cf7ddfe0 (diff) | |
system: Remove depthcharger bootloader.
It depends on vboot-utils, which does not build and which depends
on python2. This effectively reverts commit
96c90474c0cbfe88d1dccb9cb52a0f1b3a1505e7 .
* gnu/bootloader/depthcharge.scm: Remove file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Unregister file.
Change-Id: Id14b2010237dbce1423734790b2b3a37f6b939e4
Diffstat (limited to 'gnu/bootloader')
| -rw-r--r-- | gnu/bootloader/depthcharge.scm | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/gnu/bootloader/depthcharge.scm b/gnu/bootloader/depthcharge.scm deleted file mode 100644 index 0a50374bd9b..00000000000 --- a/gnu/bootloader/depthcharge.scm +++ /dev/null | |||
| @@ -1,108 +0,0 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | ||
| 2 | ;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com> | ||
| 3 | ;;; | ||
| 4 | ;;; This file is part of GNU Guix. | ||
| 5 | ;;; | ||
| 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | ||
| 7 | ;;; under the terms of the GNU General Public License as published by | ||
| 8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | ||
| 9 | ;;; your option) any later version. | ||
| 10 | ;;; | ||
| 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but | ||
| 12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | ;;; GNU General Public License for more details. | ||
| 15 | ;;; | ||
| 16 | ;;; You should have received a copy of the GNU General Public License | ||
| 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | (define-module (gnu bootloader depthcharge) | ||
| 20 | #:use-module (gnu bootloader extlinux) | ||
| 21 | #:use-module (gnu bootloader) | ||
| 22 | #:use-module (gnu packages bootloaders) | ||
| 23 | #:use-module (guix gexp) | ||
| 24 | #:use-module (guix utils) | ||
| 25 | #:use-module (ice-9 match) | ||
| 26 | #:export (depthcharge-bootloader)) | ||
| 27 | |||
| 28 | (define (signed-kernel kernel kernel-arguments initrd) | ||
| 29 | (define builder | ||
| 30 | (with-imported-modules '((guix build utils)) | ||
| 31 | #~(begin | ||
| 32 | (use-modules (guix build utils) | ||
| 33 | (ice-9 binary-ports) | ||
| 34 | (rnrs bytevectors)) | ||
| 35 | (set-path-environment-variable "PATH" '("bin") (list #$dtc)) | ||
| 36 | |||
| 37 | ;; TODO: These files have to be writable, so we copy them. | ||
| 38 | ;; This can probably be fixed by using a ".its" file, just | ||
| 39 | ;; be careful not to break initrd loading. | ||
| 40 | (copy-file #$kernel "zImage") | ||
| 41 | (chmod "zImage" #o755) | ||
| 42 | (copy-file (string-append (dirname #$kernel) "/lib/dtbs/" | ||
| 43 | "rk3288-veyron-speedy.dtb") | ||
| 44 | "rk3288-veyron-speedy.dtb") | ||
| 45 | (chmod "rk3288-veyron-speedy.dtb" #o644) | ||
| 46 | (copy-file #$initrd "initrd") | ||
| 47 | (chmod "initrd" #o644) | ||
| 48 | |||
| 49 | (invoke (string-append #$u-boot-tools "/bin/mkimage") | ||
| 50 | "-D" "-I dts -O dtb -p 2048" | ||
| 51 | "-f" "auto" | ||
| 52 | "-A" "arm" | ||
| 53 | "-O" "linux" | ||
| 54 | "-T" "kernel" | ||
| 55 | "-C" "None" | ||
| 56 | "-d" "zImage" | ||
| 57 | "-a" "0" | ||
| 58 | "-b" "rk3288-veyron-speedy.dtb" | ||
| 59 | "-i" "initrd" | ||
| 60 | "image.itb") | ||
| 61 | (call-with-output-file "bootloader.bin" | ||
| 62 | (lambda (port) | ||
| 63 | (put-bytevector port (make-bytevector 512 0)))) | ||
| 64 | (with-output-to-file "kernel-arguments" | ||
| 65 | (lambda () | ||
| 66 | (display (string-join (list #$@kernel-arguments))))) | ||
| 67 | (invoke (string-append #$vboot-utils "/bin/vbutil_kernel") | ||
| 68 | "--pack" #$output | ||
| 69 | "--version" "1" | ||
| 70 | "--vmlinuz" "image.itb" | ||
| 71 | "--arch" "arm" | ||
| 72 | "--keyblock" (string-append #$vboot-utils | ||
| 73 | "/share/vboot-utils/devkeys/" | ||
| 74 | "kernel.keyblock") | ||
| 75 | "--signprivate" (string-append #$vboot-utils | ||
| 76 | "/share/vboot-utils/devkeys/" | ||
| 77 | "kernel_data_key.vbprivk") | ||
| 78 | "--config" "kernel-arguments" | ||
| 79 | "--bootloader" "bootloader.bin")))) | ||
| 80 | (computed-file "vmlinux.kpart" builder)) | ||
| 81 | |||
| 82 | (define* (depthcharge-configuration-file config entries | ||
| 83 | #:key | ||
| 84 | (system (%current-system)) | ||
| 85 | (old-entries '()) | ||
| 86 | #:allow-other-keys) | ||
| 87 | (match entries | ||
| 88 | ((entry) | ||
| 89 | (let ((kernel (menu-entry-linux entry)) | ||
| 90 | (kernel-arguments (menu-entry-linux-arguments entry)) | ||
| 91 | (initrd (menu-entry-initrd entry))) | ||
| 92 | ;; XXX: Make this a symlink. | ||
| 93 | (signed-kernel kernel kernel-arguments initrd))) | ||
| 94 | (_ (error "Too many bootloader menu entries!")))) | ||
| 95 | |||
| 96 | (define install-depthcharge | ||
| 97 | #~(lambda (bootloader device mount-point) | ||
| 98 | (let ((kpart (string-append mount-point | ||
| 99 | "/boot/depthcharge/vmlinux.kpart"))) | ||
| 100 | (write-file-on-device kpart (stat:size (stat kpart)) device 0)))) | ||
| 101 | |||
| 102 | (define depthcharge-bootloader | ||
| 103 | (bootloader | ||
| 104 | (name 'depthcharge) | ||
| 105 | (package #f) | ||
| 106 | (installer install-depthcharge) | ||
| 107 | (configuration-file "/boot/depthcharge/vmlinux.kpart") | ||
| 108 | (configuration-file-generator depthcharge-configuration-file))) | ||
