Subject: Re: [bug#72987] [PATCH] gnu: u-boot: Enlarge space available for kernel.

From: Ludovic Courtès <[email-masked]>
Date: Mon, 16 Sep 2024 00:12:07 +0200

Hi,

Cc’ing members of the ‘embedded’ team (normally the ‘git send-email’
hook that gets installed should do that when you compose the message,
no?).

Herman Rimm <[email-masked]> skribis:

> * gnu/packages/bootloaders.scm (u-boot): Use patch.
> * gnu/packages/patches/u-boot-50M-kernel.patch: Add file.
> * gnu/local.mk (dist_patch_DATA): Register patch.
> ---
> Based on [bug#70131].

Vagrant, Efraim: could you review and possibly apply #70131?

Some superficial comments:

> +++ b/gnu/packages/bootloaders.scm
> @@ -841,6 +841,10 @@ (define %u-boot-nanopi-r4s-ddr3-patch
>    ;; Use DDR3 instead of LPDDR4 for the Nano Pi R4S U-boot.
>    (search-patch "u-boot-nanopi-r4s-ddr3.patch"))
>  
> +(define %u-boot-50M-kernel-patch
> +  ;; Make space for 6.9+ linux-libre kernel.
> +  (search-patch "u-boot-50M-kernel.patch"))

‘search-patch’ must not be called from the top level: it incurs extra
‘stat’ calls and it could throw an exception.  Thus, arrange to have it
called from the ‘patches’ field (which is thunked) or something similar.

> +++ b/gnu/packages/patches/u-boot-50M-kernel.patch
> @@ -0,0 +1,47 @@
> +diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env
> +index 30228285ed..54a8e9e5ae 100644
> +--- a/board/raspberrypi/rpi/rpi.env

Please add a line or two at the top explaining what the patch does and
where it comes from.

I’ll let Vagrant and Efraim comment on the actual change.

Thanks,
Ludo’.