[bug#72987,v4,2/3] gnu: bootloader: Add ASUS Tinker Board S bootloader.
Commit Message
* gnu/bootloader/u-boot.scm (install-tinker-s-rk3288-u-boot,
u-boot-tinker-s-rk3288-bootloader): Add variables.
* gnu/packages/bootloaders.scm (u-boot-tinker-s-rk3288): Add variable.
* gnu/packages/firmware.scm (arm-trusted-firmware-rk3288): Add variable.
Change-Id: Ic28193d4377c672f4cbbac4cc059e283fcfb06e0
---
gnu/bootloader/u-boot.scm | 10 ++++++++++
gnu/packages/bootloaders.scm | 19 +++++++++++++++++++
gnu/packages/firmware.scm | 6 ++++++
3 files changed, 35 insertions(+)
@@ -53,6 +53,7 @@ (define-module (gnu bootloader u-boot)
u-boot-sifive-unmatched-bootloader
u-boot-qemu-riscv64-bootloader
u-boot-starfive-visionfive2-bootloader
+ u-boot-tinker-s-rk3288-bootloader
u-boot-ts7970-q-2g-1000mhz-c-bootloader
u-boot-wandboard-bootloader))
@@ -115,6 +116,9 @@ (define install-puma-rk3399-u-boot
(define install-rockchip-u-boot
(write-u-boot-image '(("idbloader.img" 64) ("u-boot.itb" 16384)) 512))
+(define install-tinker-s-rk3288-u-boot
+ (write-u-boot-image '(("idbloader.img" 64) ("u-boot.img" 16384)) 512))
+
(define install-sifive-unmatched-u-boot
(write-u-boot-image '(("spl/u-boot-spl.bin" 34) ("u-boot.itb" 2082))
512))
@@ -273,6 +277,12 @@ (define u-boot-pinebook-pro-rk3399-bootloader
(inherit u-boot-rockchip-bootloader)
(package u-boot-pinebook-pro-rk3399)))
+(define u-boot-tinker-s-rk3288-bootloader
+ (bootloader
+ (inherit u-boot-bootloader)
+ (package u-boot-tinker-s-rk3288)
+ (disk-image-installer install-tinker-s-rk3288-u-boot)))
+
(define u-boot-ts7970-q-2g-1000mhz-c-bootloader
;; This bootloader doesn't really need to be installed, as it is read from
;; an SPI memory chip, not the SD card. It is copied to /boot/u-boot.imx
@@ -39,6 +39,7 @@
(define-module (gnu packages bootloaders)
#:use-module (gnu packages)
+ #:use-module (gnu packages algebra)
#:use-module (gnu packages assembly)
#:use-module (gnu packages base)
#:use-module (gnu packages disk)
@@ -1325,6 +1326,24 @@ (define-public u-boot-cubietruck
(define-public u-boot-puma-rk3399
(make-u-boot-rockchip-package "puma" 'rk3399))
+(define-public u-boot-tinker-s-rk3288
+ (let ((base (make-u-boot-package "tinker-s-rk3288" "arm-linux-gnueabihf")))
+ (package
+ (inherit base)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'set-environment
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; ARMv7 does not have the BL31 stage.
+ (setenv "BL32" (search-input-file inputs "/bl32.elf"))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs base)
+ (append bc)))
+ (inputs (modify-inputs (package-inputs base)
+ (append arm-trusted-firmware-rk3288))))))
+
(define-public u-boot-qemu-arm
(make-u-boot-package "qemu_arm" "arm-linux-gnueabihf"
;; Disable features that require OpenSSL due
@@ -1198,6 +1198,12 @@ (define-public arm-trusted-firmware-sun50i-a64
(define-public arm-trusted-firmware-sun50i-h616
(make-arm-trusted-firmware "sun50i_h616"))
+(define-public arm-trusted-firmware-rk3288
+ (make-arm-trusted-firmware "rk3288" #:triplet "arm-linux-gnueabihf"
+ #:make-flags '("ARCH=aarch32"
+ "AARCH32_SP=sp_min"
+ "DEBUG=1")))
+
(define-public arm-trusted-firmware-rk3328
(make-arm-trusted-firmware "rk3328"))