Package: guix-patches;
Reported by: Herman Rimm <herman <at> rimm.ee>
Date: Mon, 2 Sep 2024 19:09:01 UTC
Severity: normal
Tags: patch
View this message in rfc822 format
From: Herman Rimm <herman <at> rimm.ee> To: 72987 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il>, Vagrant Cascadian <vagrant <at> debian.org> Subject: [bug#72987] [PATCH v3 1/5] gnu: u-boot: Enlarge space available for kernel. Date: Fri, 13 Dec 2024 22:07:32 +0100
* gnu/packages/bootloaders.scm (u-boot)[source]: Add patch. * gnu/packages/patches/u-boot-50M-kernel.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register patch. Change-Id: Ib0074d888a3553543b491e9198f9b9a1162722f3 --- gnu/local.mk | 3 +- gnu/packages/bootloaders.scm | 1 + gnu/packages/patches/u-boot-50M-kernel.patch | 55 ++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/u-boot-50M-kernel.patch diff --git a/gnu/local.mk b/gnu/local.mk index ace19eb8a4..4da94f68e2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -62,7 +62,7 @@ # Copyright © 2023 B. Wilson <elaexuotee <at> wilsonb.com> # Copyright © 2023 Bruno Victal <mirai <at> makinata.eu> # Copyright © 2023, 2024 gemmaro <gemmaro.dev <at> gmail.com> -# Copyright © 2023 Herman Rimm <herman <at> rimm.ee> +# Copyright © 2023, 2024 Herman Rimm <herman <at> rimm.ee> # Copyright © 2023 Troy Figiel <troy <at> troyfigiel.com> # Copyright © 2024 David Elsing <david.elsing <at> posteo.net> # Copyright © 2024 Ashish SHUKLA <ashish.is <at> lostca.se> @@ -2273,6 +2273,7 @@ dist_patch_DATA = \ %D%/packages/patches/turbovnc-find-system-packages.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-bcg729.patch \ + %D%/packages/patches/u-boot-50M-kernel.patch \ %D%/packages/patches/u-boot-allow-disabling-openssl.patch \ %D%/packages/patches/u-boot-nintendo-nes-serial.patch \ %D%/packages/patches/u-boot-rockchip-inno-usb.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 5183b2fc14..478385fb18 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -758,6 +758,7 @@ (define u-boot (sha256 (base32 "0yrhb0izihv47p781dc4cp0znc5g225ayl7anz23c6jdrmfbpz2h")) (patches (search-patches "u-boot-allow-disabling-openssl.patch" + "u-boot-50M-kernel.patch" "u-boot-rockchip-inno-usb.patch")))) (build-system gnu-build-system) (native-inputs diff --git a/gnu/packages/patches/u-boot-50M-kernel.patch b/gnu/packages/patches/u-boot-50M-kernel.patch new file mode 100644 index 0000000000..c4d054dd42 --- /dev/null +++ b/gnu/packages/patches/u-boot-50M-kernel.patch @@ -0,0 +1,55 @@ +From: Herman Rimm <herman <at> rimm.ee> +Date: Mon, Sep 16 2024 19:24:02 +0200 +Subject: [PATCH] Configure Raspberry Pis to reserve 50 MB for linux kernels. + +--- +The 6.9 and newer linux-libre-arm64-generic kernels for Guix can be +larger than the allocated 36 MB. This patch is not submitted upstream. + +diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env +index 30228285edd..666883e9212 100644 +--- a/board/raspberrypi/rpi/rpi.env ++++ b/board/raspberrypi/rpi/rpi.env +@@ -43,22 +43,22 @@ dfu_alt_info+=zImage fat 0 1 + * text_offset bytes (specified in the header of the Image) into a 2MB + * boundary. The 'booti' command relocates the image if necessary. Linux uses + * a default text_offset of 0x80000. In summary, loading at 0x80000 +- * satisfies all these constraints and reserving memory up to 0x02400000 +- * permits fairly large (roughly 36M) kernels. ++ * satisfies all these constraints and reserving memory up to 0x03400000 ++ * permits fairly large (roughly 50M) kernels. + * + * scriptaddr and pxefile_addr_r can be pretty much anywhere that doesn't + * conflict with something else. Reserving 1M for each of them at +- * 0x02400000-0x02500000 and 0x02500000-0x02600000 should be plenty. ++ * 0x03200000-0x03300000 and 0x03300000-0x03400000 should be plenty. + * + * On ARM, both the DTB and any possible initrd must be loaded such that they + * fit inside the lowmem mapping in Linux. In practice, this usually means not + * more than ~700M away from the start of the kernel image but this number can + * be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line + * parameter given to the kernel. So reserving memory from low to high +- * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for +- * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000. ++ * satisfies this constraint again. Reserving 1M at 0x03400000-0x03500000 for ++ * the DTB leaves rest of the free RAM to the initrd starting at 0x03500000. + * Even with the smallest possible CPU-GPU memory split of the CPU getting +- * only 64M, the remaining 25M starting at 0x02700000 should allow quite ++ * only 64M, the remaining 11M starting at 0x03500000 should allow quite + * large initrds before they start colliding with U-Boot. + */ + #ifdef CONFIG_ARM64 +@@ -69,9 +69,9 @@ fdt_high=ffffffff + initrd_high=ffffffff + #endif + kernel_addr_r=0x00080000 +-scriptaddr=0x02400000 +-pxefile_addr_r=0x02500000 +-fdt_addr_r=0x02600000 +-ramdisk_addr_r=0x02700000 ++scriptaddr=0x03200000 ++pxefile_addr_r=0x03300000 ++fdt_addr_r=0x03400000 ++ramdisk_addr_r=0x03500000 + + boot_targets=mmc usb pxe dhcp -- 2.45.2
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.