mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: Add u-boot-rockpro64-rk3399
* gnu/packages/bootloaders.scm (u-boot-rockpro64-rk3399): New exported variable. (u-boot-2019.10): New variable. * gnu/bootloader/u-boot.scm (u-boot-rockpro64-rk3399-bootloader): New exported variable. (install-rockpro64-rk3399-u-boot): New variable. * gnu/system/install.scm (rockpro64-installation-os): New exported variable. Adjusted-by: Vagrant Cascadian <vagrant@debian.org> Signed-off-by: Caliph Nomble <nomble@palism.com> Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
This commit is contained in:
parent
c07f3b184d
commit
fa7470189e
3 changed files with 58 additions and 0 deletions
|
@ -34,6 +34,7 @@
|
||||||
u-boot-pine64-plus-bootloader
|
u-boot-pine64-plus-bootloader
|
||||||
u-boot-pinebook-bootloader
|
u-boot-pinebook-bootloader
|
||||||
u-boot-puma-rk3399-bootloader
|
u-boot-puma-rk3399-bootloader
|
||||||
|
u-boot-rockpro64-rk3399-bootloader
|
||||||
u-boot-wandboard-bootloader))
|
u-boot-wandboard-bootloader))
|
||||||
|
|
||||||
(define install-u-boot
|
(define install-u-boot
|
||||||
|
@ -90,6 +91,15 @@
|
||||||
(write-file-on-device u-boot (stat:size (stat u-boot))
|
(write-file-on-device u-boot (stat:size (stat u-boot))
|
||||||
device (* 512 512)))))
|
device (* 512 512)))))
|
||||||
|
|
||||||
|
(define install-rockpro64-rk3399-u-boot
|
||||||
|
#~(lambda (bootloader device mount-point)
|
||||||
|
(let ((idb (string-append bootloader "/libexec/idbloader.img"))
|
||||||
|
(u-boot (string-append bootloader "/libexec/u-boot.itb")))
|
||||||
|
(write-file-on-device idb (stat:size (stat idb))
|
||||||
|
device (* 64 512))
|
||||||
|
(write-file-on-device u-boot (stat:size (stat u-boot))
|
||||||
|
device (* 16384 512)))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
@ -179,3 +189,10 @@
|
||||||
(inherit u-boot-bootloader)
|
(inherit u-boot-bootloader)
|
||||||
(package u-boot-puma-rk3399)
|
(package u-boot-puma-rk3399)
|
||||||
(installer install-puma-rk3399-u-boot)))
|
(installer install-puma-rk3399-u-boot)))
|
||||||
|
|
||||||
|
(define u-boot-rockpro64-rk3399-bootloader
|
||||||
|
;; SD and eMMC use the same format
|
||||||
|
(bootloader
|
||||||
|
(inherit u-boot-bootloader)
|
||||||
|
(package u-boot-rockpro64-rk3399)
|
||||||
|
(installer install-rockpro64-rk3399-u-boot)))
|
||||||
|
|
|
@ -430,6 +430,19 @@ tree binary files. These are board description files used by Linux and BSD.")
|
||||||
also initializes the boards (RAM etc).")
|
also initializes the boards (RAM etc).")
|
||||||
(license license:gpl2+)))
|
(license license:gpl2+)))
|
||||||
|
|
||||||
|
(define u-boot-2019.10
|
||||||
|
(package
|
||||||
|
(inherit u-boot)
|
||||||
|
(version "2019.10")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"ftp://ftp.denx.de/pub/u-boot/"
|
||||||
|
"u-boot-" version ".tar.bz2"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"053hcrwwlacqh2niisn0zas95zkbffw5aw5sdhixs8lmfdq60vcd"))))))
|
||||||
|
|
||||||
(define-public u-boot-tools
|
(define-public u-boot-tools
|
||||||
(package
|
(package
|
||||||
(inherit u-boot)
|
(inherit u-boot)
|
||||||
|
@ -746,6 +759,28 @@ to Novena upstream, does not load u-boot.img from the first partition.")
|
||||||
("firmware-m0" ,rk3399-cortex-m0)
|
("firmware-m0" ,rk3399-cortex-m0)
|
||||||
,@(package-native-inputs base))))))
|
,@(package-native-inputs base))))))
|
||||||
|
|
||||||
|
(define-public u-boot-rockpro64-rk3399
|
||||||
|
(let ((base (make-u-boot-package "rockpro64-rk3399" "aarch64-linux-gnu")))
|
||||||
|
(package
|
||||||
|
(inherit base)
|
||||||
|
(version (package-version u-boot-2019.10))
|
||||||
|
(source (package-source u-boot-2019.10))
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments base)
|
||||||
|
((#:phases phases)
|
||||||
|
`(modify-phases ,phases
|
||||||
|
(add-after 'unpack 'set-environment
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(setenv "BL31" (string-append (assoc-ref inputs "firmware")
|
||||||
|
"/bl31.elf"))
|
||||||
|
#t))
|
||||||
|
;; Phases do not succeed on the bl31 ELF.
|
||||||
|
(delete 'strip)
|
||||||
|
(delete 'validate-runpath)))))
|
||||||
|
(native-inputs
|
||||||
|
`(("firmware" ,arm-trusted-firmware-rk3399)
|
||||||
|
,@(package-native-inputs base))))))
|
||||||
|
|
||||||
(define-public vboot-utils
|
(define-public vboot-utils
|
||||||
(package
|
(package
|
||||||
(name "vboot-utils")
|
(name "vboot-utils")
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
novena-installation-os
|
novena-installation-os
|
||||||
pine64-plus-installation-os
|
pine64-plus-installation-os
|
||||||
pinebook-installation-os
|
pinebook-installation-os
|
||||||
|
rockpro64-installation-os
|
||||||
rk3399-puma-installation-os
|
rk3399-puma-installation-os
|
||||||
wandboard-installation-os
|
wandboard-installation-os
|
||||||
os-with-u-boot))
|
os-with-u-boot))
|
||||||
|
@ -583,6 +584,11 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET."
|
||||||
"/dev/mmcblk0" ; SD card storage
|
"/dev/mmcblk0" ; SD card storage
|
||||||
"ttyS0"))
|
"ttyS0"))
|
||||||
|
|
||||||
|
(define rockpro64-installation-os
|
||||||
|
(embedded-installation-os u-boot-rockpro64-rk3399-bootloader
|
||||||
|
"/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
|
||||||
|
"ttyS2")) ; UART2 connected on the Pi2 bus
|
||||||
|
|
||||||
(define rk3399-puma-installation-os
|
(define rk3399-puma-installation-os
|
||||||
(embedded-installation-os u-boot-puma-rk3399-bootloader
|
(embedded-installation-os u-boot-puma-rk3399-bootloader
|
||||||
"/dev/mmcblk0" ; SD card storage
|
"/dev/mmcblk0" ; SD card storage
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue