diff options
| -rw-r--r-- | gnu/bootloader/u-boot.scm | 17 | ||||
| -rw-r--r-- | gnu/packages/bootloaders.scm | 35 | ||||
| -rw-r--r-- | gnu/system/install.scm | 6 |
3 files changed, 58 insertions, 0 deletions
diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 54abfe1c69d..4f98be2483a 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | u-boot-pine64-plus-bootloader | 34 | u-boot-pine64-plus-bootloader |
| 35 | u-boot-pinebook-bootloader | 35 | u-boot-pinebook-bootloader |
| 36 | u-boot-puma-rk3399-bootloader | 36 | u-boot-puma-rk3399-bootloader |
| 37 | u-boot-rockpro64-rk3399-bootloader | ||
| 37 | u-boot-wandboard-bootloader)) | 38 | u-boot-wandboard-bootloader)) |
| 38 | 39 | ||
| 39 | (define install-u-boot | 40 | (define install-u-boot |
| @@ -90,6 +91,15 @@ | |||
| 90 | (write-file-on-device u-boot (stat:size (stat u-boot)) | 91 | (write-file-on-device u-boot (stat:size (stat u-boot)) |
| 91 | device (* 512 512))))) | 92 | device (* 512 512))))) |
| 92 | 93 | ||
| 94 | (define install-rockpro64-rk3399-u-boot | ||
| 95 | #~(lambda (bootloader device mount-point) | ||
| 96 | (let ((idb (string-append bootloader "/libexec/idbloader.img")) | ||
| 97 | (u-boot (string-append bootloader "/libexec/u-boot.itb"))) | ||
| 98 | (write-file-on-device idb (stat:size (stat idb)) | ||
| 99 | device (* 64 512)) | ||
| 100 | (write-file-on-device u-boot (stat:size (stat u-boot)) | ||
| 101 | device (* 16384 512))))) | ||
| 102 | |||
| 93 | 103 | ||
| 94 | 104 | ||
| 95 | ;;; | 105 | ;;; |
| @@ -179,3 +189,10 @@ | |||
| 179 | (inherit u-boot-bootloader) | 189 | (inherit u-boot-bootloader) |
| 180 | (package u-boot-puma-rk3399) | 190 | (package u-boot-puma-rk3399) |
| 181 | (installer install-puma-rk3399-u-boot))) | 191 | (installer install-puma-rk3399-u-boot))) |
| 192 | |||
| 193 | (define u-boot-rockpro64-rk3399-bootloader | ||
| 194 | ;; SD and eMMC use the same format | ||
| 195 | (bootloader | ||
| 196 | (inherit u-boot-bootloader) | ||
| 197 | (package u-boot-rockpro64-rk3399) | ||
| 198 | (installer install-rockpro64-rk3399-u-boot))) | ||
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 520728b52c4..45e1b8fc1cb 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm | |||
| @@ -430,6 +430,19 @@ tree binary files. These are board description files used by Linux and BSD.") | |||
| 430 | also initializes the boards (RAM etc).") | 430 | also initializes the boards (RAM etc).") |
| 431 | (license license:gpl2+))) | 431 | (license license:gpl2+))) |
| 432 | 432 | ||
| 433 | (define u-boot-2019.10 | ||
| 434 | (package | ||
| 435 | (inherit u-boot) | ||
| 436 | (version "2019.10") | ||
| 437 | (source (origin | ||
| 438 | (method url-fetch) | ||
| 439 | (uri (string-append | ||
| 440 | "ftp://ftp.denx.de/pub/u-boot/" | ||
| 441 | "u-boot-" version ".tar.bz2")) | ||
| 442 | (sha256 | ||
| 443 | (base32 | ||
| 444 | "053hcrwwlacqh2niisn0zas95zkbffw5aw5sdhixs8lmfdq60vcd")))))) | ||
| 445 | |||
| 433 | (define-public u-boot-tools | 446 | (define-public u-boot-tools |
| 434 | (package | 447 | (package |
| 435 | (inherit u-boot) | 448 | (inherit u-boot) |
| @@ -746,6 +759,28 @@ to Novena upstream, does not load u-boot.img from the first partition.") | |||
| 746 | ("firmware-m0" ,rk3399-cortex-m0) | 759 | ("firmware-m0" ,rk3399-cortex-m0) |
| 747 | ,@(package-native-inputs base)))))) | 760 | ,@(package-native-inputs base)))))) |
| 748 | 761 | ||
| 762 | (define-public u-boot-rockpro64-rk3399 | ||
| 763 | (let ((base (make-u-boot-package "rockpro64-rk3399" "aarch64-linux-gnu"))) | ||
| 764 | (package | ||
| 765 | (inherit base) | ||
| 766 | (version (package-version u-boot-2019.10)) | ||
| 767 | (source (package-source u-boot-2019.10)) | ||
| 768 | (arguments | ||
| 769 | (substitute-keyword-arguments (package-arguments base) | ||
| 770 | ((#:phases phases) | ||
| 771 | `(modify-phases ,phases | ||
| 772 | (add-after 'unpack 'set-environment | ||
| 773 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 774 | (setenv "BL31" (string-append (assoc-ref inputs "firmware") | ||
| 775 | "/bl31.elf")) | ||
| 776 | #t)) | ||
| 777 | ;; Phases do not succeed on the bl31 ELF. | ||
| 778 | (delete 'strip) | ||
| 779 | (delete 'validate-runpath))))) | ||
| 780 | (native-inputs | ||
| 781 | `(("firmware" ,arm-trusted-firmware-rk3399) | ||
| 782 | ,@(package-native-inputs base)))))) | ||
| 783 | |||
| 749 | (define-public vboot-utils | 784 | (define-public vboot-utils |
| 750 | (package | 785 | (package |
| 751 | (name "vboot-utils") | 786 | (name "vboot-utils") |
diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 912096027f5..eab36492695 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm | |||
| @@ -62,6 +62,7 @@ | |||
| 62 | novena-installation-os | 62 | novena-installation-os |
| 63 | pine64-plus-installation-os | 63 | pine64-plus-installation-os |
| 64 | pinebook-installation-os | 64 | pinebook-installation-os |
| 65 | rockpro64-installation-os | ||
| 65 | rk3399-puma-installation-os | 66 | rk3399-puma-installation-os |
| 66 | wandboard-installation-os | 67 | wandboard-installation-os |
| 67 | os-with-u-boot)) | 68 | os-with-u-boot)) |
| @@ -583,6 +584,11 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET." | |||
| 583 | "/dev/mmcblk0" ; SD card storage | 584 | "/dev/mmcblk0" ; SD card storage |
| 584 | "ttyS0")) | 585 | "ttyS0")) |
| 585 | 586 | ||
| 587 | (define rockpro64-installation-os | ||
| 588 | (embedded-installation-os u-boot-rockpro64-rk3399-bootloader | ||
| 589 | "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage | ||
| 590 | "ttyS2")) ; UART2 connected on the Pi2 bus | ||
| 591 | |||
| 586 | (define rk3399-puma-installation-os | 592 | (define rk3399-puma-installation-os |
| 587 | (embedded-installation-os u-boot-puma-rk3399-bootloader | 593 | (embedded-installation-os u-boot-puma-rk3399-bootloader |
| 588 | "/dev/mmcblk0" ; SD card storage | 594 | "/dev/mmcblk0" ; SD card storage |
