guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#64149] WIP update u-boot to 2023.07-rc4


From: Maxim Cournoyer
Subject: [bug#64149] WIP update u-boot to 2023.07-rc4
Date: Sat, 08 Jul 2023 00:23:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi Vagrant,

Some quick comments:

Vagrant Cascadian <vagrant@debian.org> writes:


[...]


> The one thing I would probably prefer is to split this into one package
> per line, but I tried to aim for a smaller diff:
>
> -       (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
> +       (prepend python-coverage python-filelock python-pycryptodomex
> +python-pytest python-pytest-xdist sdl2)))

Odd indentation; please use something like:

          (prepend package1
                   package2
                   ...)
                   
> Though, apparently I have the worst of both worlds, split across two
> lines and not indented correctly! Easy enough to fix with the next
> iteration...
>
>
> I still think it is probably best to wait till the 2023.07 release to
> actually push to master... but hopefully this resolves most of the
> hardest work!

Haha!  I see you had the same comment yourself.

>
> live well,
>   vagrant
>
> From d734cc541f920963e8cf8d68061d5329c9712d00 Mon Sep 17 00:00:00 2001
> From: Vagrant Cascadian <vagrant@debian.org>
> Date: Sun, 2 Jul 2023 18:20:39 -0700
> Subject: [PATCH 2/2] gnu: u-boot: Update to 2023.07-rc6.
>
> * gnu/packages/patches/u-boot-infodocs-target.patch: Remove file.
> * gnu/packages/patches/u-boot-patman-guix-integration.patch: Remove
> file.

Nitpick: I'd use "Delete" here instead of "Remove".

> * gnu/local.mk: Remove patches.

Nitpick: I'd use "De-register" instead of remove.

> * gnu/packages/patches/u-boot-allow-disabling-openssl.patch: Refresh.
> * gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch: Refresh.
> * gnu/packages/bootloaders.scm (u-boot): Update to 2023.07-rc6.
> [native-inputs]: Add python-pyelftools.
> [source]: Remove patches.
> (u-boot-tools)[phases]: Update substitution for python3-coverage.
> Adjust 'patch to catch more openssl incompatibilities.
> [native-inputs]: Add python-filelock and python-pytest-xdist.
> (make-u-boot-sunxi64-package): Set SCP environment variable.
> (u-boot-sifive-unleashed): Update to use opensbi.
> (u-boot-puma-rk3399)[inputs]: Add arm-trusted-firmware-rk3399 to
> package-inputs instead of native-inputs.
> (u-boot-rockpro64-rk3399)[phases]: Add 'disable-spl-fit-signature.
> ---
>  gnu/local.mk                                  |    2 -
>  gnu/packages/bootloaders.scm                  |   46 +-
>  .../u-boot-allow-disabling-openssl.patch      |   13 +-
>  .../patches/u-boot-infodocs-target.patch      |   84 --
>  .../u-boot-patman-guix-integration.patch      | 1244 -----------------
>  ...boot-sifive-prevent-reloc-initrd-fdt.patch |    8 +-
>  6 files changed, 46 insertions(+), 1351 deletions(-)
>  delete mode 100644 gnu/packages/patches/u-boot-infodocs-target.patch
>  delete mode 100644 gnu/packages/patches/u-boot-patman-guix-integration.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 6470f1abd4..fe46cd58f2 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1997,8 +1997,6 @@ dist_patch_DATA =                                       
>         \
>    %D%/packages/patches/twinkle-bcg729.patch                  \
>    %D%/packages/patches/u-boot-allow-disabling-openssl.patch  \
>    %D%/packages/patches/u-boot-fix-build-python-3.10.patch    \
> -  %D%/packages/patches/u-boot-infodocs-target.patch          \
> -  %D%/packages/patches/u-boot-patman-guix-integration.patch  \
>    %D%/packages/patches/u-boot-nintendo-nes-serial.patch              \
>    %D%/packages/patches/u-boot-rockchip-inno-usb.patch                \
>    %D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch  \
> diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
> index a9685a9ef9..446dc8fc97 100644
> --- a/gnu/packages/bootloaders.scm
> +++ b/gnu/packages/bootloaders.scm
> @@ -648,23 +648,21 @@ (define %u-boot-rk3399-enable-emmc-phy-patch
>  (define u-boot
>    (package
>      (name "u-boot")
> -    (version "2022.10")
> +    (version "2023.07-rc6")
>      (source (origin
>                (patches
>                 (list %u-boot-rockchip-inno-usb-patch
>                       %u-boot-allow-disabling-openssl-patch
>                       %u-boot-sifive-prevent-relocating-initrd-fdt
>                       %u-boot-rk3399-enable-emmc-phy-patch
> -                     (search-patch "u-boot-fix-build-python-3.10.patch")
> -                     (search-patch "u-boot-infodocs-target.patch")
> -                     (search-patch "u-boot-patman-guix-integration.patch")))
> +                     (search-patch "u-boot-fix-build-python-3.10.patch")))
>                (method url-fetch)
>                (uri (string-append
>                      "https://ftp.denx.de/pub/u-boot/";
>                      "u-boot-" version ".tar.bz2"))
>                (sha256
>                 (base32
> -                "1y5x8vxdgsqdqlsvq01mn8lmw53fqairkhvhhjx83hjva0m4id2h"))))
> +                "1dgvr228imbhzq7vzr8iialijl3k4mhjdirjrm6hsy6qbm6jyj5r"))))
>      (build-system  gnu-build-system)
>      (native-inputs
>       (list bison
> @@ -676,6 +674,7 @@ (define u-boot
>             perl
>             pkg-config                   ;for 'make menuconfig'
>             python
> +           python-pyelftools
>             swig
>             (list util-linux "lib")))
>      (home-page "https://www.denx.de/wiki/U-Boot/";)
> @@ -726,7 +725,8 @@ (define-public u-boot-tools
>      (name "u-boot-tools")
>      (native-inputs
>       (modify-inputs (package-native-inputs u-boot)
> -       (prepend python-coverage python-pycryptodomex python-pytest sdl2)))
> +       (prepend python-coverage python-filelock python-pycryptodomex
> +python-pytest python-pytest-xdist sdl2)))
>      (arguments
>       `(#:make-flags '("HOSTCC=gcc")
>         #:test-target "tcheck"
> @@ -739,7 +739,7 @@ (define-public u-boot-tools
>                 (("/bin/false") (which "false")))
>               (substitute* "tools/dtoc/fdt_util.py"
>                 (("'cc'") "'gcc'"))
> -             (substitute* "tools/patman/test_util.py"
> +             (substitute* "tools/u_boot_pylib/test_util.py"
>                 ;; python3-coverage is simply called coverage in guix.
>                 (("python3-coverage") "coverage")
>  
> @@ -778,6 +778,9 @@ (define-public u-boot-tools
>                             ;; details.
>                             (("CONFIG_FIT_SIGNATURE=y")
>                              
> "CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n\nCONFIG_TOOLS_LIBCRYPTO=n")
> +                           ;; Catch instances of implied 
> CONFIG_FIG_SIGNATURE with VPL targets
> +                           (("CONFIG_SANDBOX_VPL=y")
> +                            
> "CONFIG_SANDBOX_VPL=y\nCONFIG_FIT_SIGNATURE=n\nCONFIG_VPL_FIT_SIGNATURE=n\nCONFIG_TOOLS_LIBCRYPTO=n")

I know it's already busted on the line above, but we can format this in
a more readable way by using something like:
                              "\
CONFIG1=y
CONFIG2=n
...\n"

>                             ;; This test requires a sound system, which is 
> un-used
>                             ;; in u-boot-tools.
>                             (("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
> @@ -1009,6 +1012,8 @@ (define*-public (make-u-boot-sunxi64-package board 
> triplet
>            #~(modify-phases #$phases
>                (add-after 'unpack 'set-environment
>                  (lambda* (#:key native-inputs inputs #:allow-other-keys)
> +                  ;; Avoid dependency on crust-firmware 
> https://issues.guix.gnu.org/48371

Trick to avoid busting the 80 characters per line limit: for links, you
can do (see: $link), which typically gets split like:

                     ;; blablabla (see:
                     ;; https://...)

> +                  (setenv "SCP" "/dev/null")
>                    (setenv "BL31" (search-input-file inputs "bl31.bin"))))))))
>        (inputs
>         (modify-inputs (package-inputs base)
> @@ -1104,7 +1109,7 @@ (define-public u-boot-puma-rk3399
>                (delete 'strip)
>                (delete 'validate-runpath)))))
>        (inputs
> -       (modify-inputs (package-native-inputs base)
> +       (modify-inputs (package-inputs base)
>           (append arm-trusted-firmware-rk3399))))))
>  
>  (define-public u-boot-qemu-arm
> @@ -1170,7 +1175,20 @@ (define-public u-boot-sandbox
>                  (append sdl2))))))
>  
>  (define-public u-boot-sifive-unleashed
> -  (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu"))
> +  (let ((base (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu")))
> +    (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)
> +                  (setenv "OPENSBI" (search-input-file inputs
> +                                                       
> "fw_dynamic.bin"))))))))
> +      (inputs
> +       (modify-inputs (package-inputs base)
> +         (append opensbi-generic))))))
>  
>  (define-public u-boot-sifive-unmatched
>    (let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu")))
> @@ -1230,7 +1248,8 @@ (define-public u-boot-rockpro64-rk3399
>                                                 "CONFIG_SATA_SIL=y"
>                                                 "CONFIG_SCSI=y"
>                                                 "CONFIG_SCSI_AHCI=y"
> -                                               "CONFIG_DM_SCSI=y"))))
> +                                               "CONFIG_DM_SCSI=y"
> +                                               "# CONFIG_SPL_FIT_SIGNATURE 
> is not set"))))
>      (package
>        (inherit base)
>        (arguments
> @@ -1240,6 +1259,13 @@ (define-public u-boot-rockpro64-rk3399
>                (add-after 'unpack 'set-environment
>                  (lambda* (#:key inputs #:allow-other-keys)
>                    (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
> +              ;; Disable SPL FIT signatures, due to GPLv2 and Openssl license
> +              ;; incompatibilities
> +              (add-after 'unpack 'disable-spl-fit-signature
> +                (lambda _
> +                  (substitute* "configs/rockpro64-rk3399_defconfig"
> +                    (("CONFIG_SPL_FIT_SIGNATURE=y")
> +                     "# CONFIG_SPL_FIT_SIGNATURE is not set"))))

Is this really needed, given we use "# CONFIG_SPL_FIT_SIGNATURE is not
set" in #:configs above?

The rest LGTM, thank you!

-- 
Maxim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]