Subject: Re: [bug#72987] [PATCH v3 5/5] gnu: bootloader: Add ASUS Tinker Board S bootloader.

From: Vagrant Cascadian <[email-masked]>
Date: Tue, 04 Mar 2025 14:34:20 -0800

On 2024-12-13, Herman Rimm wrote:
> diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
> index b91ff00e28..4516e343b2 100644
> --- a/gnu/packages/bootloaders.scm
> +++ b/gnu/packages/bootloaders.scm
> @@ -763,7 +764,8 @@ (define u-boot
>                                  "u-boot-rockchip-inno-usb.patch"))))
>      (build-system gnu-build-system)
>      (native-inputs
> -     (list bison
> +     (list bc
> +           bison
>             dtc
>             gnutls
>             flex
...
> +(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"))))))))
> +      (inputs
> +       (modify-inputs (package-inputs base)
> +         (append arm-trusted-firmware-rk3288))))))

Since you are already modifying the inputs, could "bc" be added here
instead as a native-input that just affects u-boot-tinker-s-rk3288?

> diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
> index d89b136c86..670cef5a02 100644
> --- a/gnu/packages/firmware.scm
> +++ b/gnu/packages/firmware.scm
> @@ -1171,6 +1171,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")))
> +

Is AARCH32_SP=sp_min likely to be shared by other rk3288 variants, or
should there be multiple arm-trusted-firmware-rk3288 variants for each
special option?

live well,
  vagrant