gnu: Add u-boot-rock64-rk3328.
* gnu/packages/bootloaders (u-boot-rock64-rk3328): New variable. * gnu/bootloader/u-boot (install-rock64-rk3328-u-boot): New variable. (u-boot-rock64-rk3328-bootloader): New variable. * gnu/system/install (define rock64-installation-os): New variable.master
parent
fa7470189e
commit
2fce14af24
|
@ -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-rock64-rk3328-bootloader
|
||||||
u-boot-rockpro64-rk3399-bootloader
|
u-boot-rockpro64-rk3399-bootloader
|
||||||
u-boot-wandboard-bootloader))
|
u-boot-wandboard-bootloader))
|
||||||
|
|
||||||
|
@ -91,6 +92,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-rock64-rk3328-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)))))
|
||||||
|
|
||||||
(define install-rockpro64-rk3399-u-boot
|
(define install-rockpro64-rk3399-u-boot
|
||||||
#~(lambda (bootloader device mount-point)
|
#~(lambda (bootloader device mount-point)
|
||||||
(let ((idb (string-append bootloader "/libexec/idbloader.img"))
|
(let ((idb (string-append bootloader "/libexec/idbloader.img"))
|
||||||
|
@ -190,6 +200,13 @@
|
||||||
(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-rock64-rk3328-bootloader
|
||||||
|
;; SD and eMMC use the same format
|
||||||
|
(bootloader
|
||||||
|
(inherit u-boot-bootloader)
|
||||||
|
(package u-boot-rock64-rk3328)
|
||||||
|
(installer install-rock64-rk3328-u-boot)))
|
||||||
|
|
||||||
(define u-boot-rockpro64-rk3399-bootloader
|
(define u-boot-rockpro64-rk3399-bootloader
|
||||||
;; SD and eMMC use the same format
|
;; SD and eMMC use the same format
|
||||||
(bootloader
|
(bootloader
|
||||||
|
|
|
@ -759,6 +759,32 @@ 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-rock64-rk3328
|
||||||
|
(let ((base (make-u-boot-package "rock64-rk3328" "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)
|
||||||
|
(let ((bl31 (string-append (assoc-ref inputs "firmware")
|
||||||
|
"/bl31.elf")))
|
||||||
|
(setenv "BL31" bl31))
|
||||||
|
#t))
|
||||||
|
(add-after 'unpack 'add-u-boot-itb
|
||||||
|
(lambda _
|
||||||
|
(substitute* "Kconfig"
|
||||||
|
(("default .u-boot.itb. if SPL_LOAD_FIT && .ROCKCHIP_RK3399")
|
||||||
|
"default \"u-boot.itb\" if SPL_LOAD_FIT && (ARCH_ROCKCHIP"))
|
||||||
|
#t))))))
|
||||||
|
(native-inputs
|
||||||
|
`(("firmware" ,arm-trusted-firmware-rk3328)
|
||||||
|
,@(package-native-inputs base))))))
|
||||||
|
|
||||||
(define-public u-boot-rockpro64-rk3399
|
(define-public u-boot-rockpro64-rk3399
|
||||||
(let ((base (make-u-boot-package "rockpro64-rk3399" "aarch64-linux-gnu")))
|
(let ((base (make-u-boot-package "rockpro64-rk3399" "aarch64-linux-gnu")))
|
||||||
(package
|
(package
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
novena-installation-os
|
novena-installation-os
|
||||||
pine64-plus-installation-os
|
pine64-plus-installation-os
|
||||||
pinebook-installation-os
|
pinebook-installation-os
|
||||||
|
rock64-installation-os
|
||||||
rockpro64-installation-os
|
rockpro64-installation-os
|
||||||
rk3399-puma-installation-os
|
rk3399-puma-installation-os
|
||||||
wandboard-installation-os
|
wandboard-installation-os
|
||||||
|
@ -584,6 +585,11 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET."
|
||||||
"/dev/mmcblk0" ; SD card storage
|
"/dev/mmcblk0" ; SD card storage
|
||||||
"ttyS0"))
|
"ttyS0"))
|
||||||
|
|
||||||
|
(define rock64-installation-os
|
||||||
|
(embedded-installation-os u-boot-rock64-rk3328-bootloader
|
||||||
|
"/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
|
||||||
|
"ttyS2")) ; UART2 connected on the Pi2 bus
|
||||||
|
|
||||||
(define rockpro64-installation-os
|
(define rockpro64-installation-os
|
||||||
(embedded-installation-os u-boot-rockpro64-rk3399-bootloader
|
(embedded-installation-os u-boot-rockpro64-rk3399-bootloader
|
||||||
"/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
|
"/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
|
||||||
|
|
Reference in New Issue