Package: guix-patches;
Reported by: Herman Rimm <herman <at> rimm.ee>
Date: Mon, 2 Sep 2024 19:09:01 UTC
Severity: normal
Tags: patch
To reply to this bug, email your comments to 72987 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Mon, 02 Sep 2024 19:09:02 GMT) Full text and rfc822 format available.Herman Rimm <herman <at> rimm.ee>
:guix-patches <at> gnu.org
.
(Mon, 02 Sep 2024 19:09:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: guix-patches <at> gnu.org Subject: [PATCH] gnu: u-boot: Enlarge space available for kernel. Date: Mon, 2 Sep 2024 21:04:59 +0200
* 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]. gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 7 ++- gnu/packages/patches/u-boot-50M-kernel.patch | 47 ++++++++++++++++++++ 3 files changed, 54 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 2ce910ad28..d674acd7ca 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2165,6 +2165,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 162eef6859..9980521a5f 100644 --- a/gnu/packages/bootloaders.scm +++ 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")) + (define u-boot (package (name "u-boot") @@ -849,7 +853,8 @@ (define u-boot (patches (list %u-boot-rockchip-inno-usb-patch %u-boot-allow-disabling-openssl-patch - %u-boot-nanopi-r4s-ddr3-patch)) + %u-boot-nanopi-r4s-ddr3-patch + %u-boot-50M-kernel-patch)) (method url-fetch) (uri (string-append "https://ftp.denx.de/pub/u-boot/" 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..d31501400e --- /dev/null +++ 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 ++++ 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
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Sun, 15 Sep 2024 22:13:02 GMT) Full text and rfc822 format available.Message #8 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Herman Rimm <herman <at> rimm.ee> Cc: Vagrant Cascadian <vagrant <at> debian.org>, 72987 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il> Subject: Re: [bug#72987] [PATCH] gnu: u-boot: Enlarge space available for kernel. 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 <herman <at> rimm.ee> 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’.
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Mon, 16 Sep 2024 17:26:02 GMT) Full text and rfc822 format available.Message #11 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: 72987 <at> debbugs.gnu.org Subject: [PATCH v2] gnu: u-boot: Enlarge space available for kernel. Date: Mon, 16 Sep 2024 19:24:02 +0200
* gnu/packages/bootloaders.scm (%u-boot-rockchip-inno-usb-patch, %u-boot-allow-disabling-openssl-patch, %u-boot-nanopi-r4s-ddr3-patch): Remove variables. (u-boot)[source]: Use search-patches and add new 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 | 1 + gnu/packages/bootloaders.scm | 49 +++++++++---------- gnu/packages/patches/u-boot-50M-kernel.patch | 51 ++++++++++++++++++++ 3 files changed, 74 insertions(+), 27 deletions(-) create mode 100644 gnu/packages/patches/u-boot-50M-kernel.patch diff --git a/gnu/local.mk b/gnu/local.mk index ce58d5bfb4..b763991d63 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2216,6 +2216,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 50e7bb8bbc..b38b407d38 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -826,37 +826,32 @@ (define-public dtc tree binary files. These are board description files used by Linux and BSD.") (license license:gpl2+))) -(define %u-boot-rockchip-inno-usb-patch - ;; Fix regression in 2020.10 causing freezes on boot with USB boot enabled. - ;; See https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-rockpro64/-/issues/4 - ;; and https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icenowy <at> aosc.io - (search-patch "u-boot-rockchip-inno-usb.patch")) - -(define %u-boot-allow-disabling-openssl-patch - ;; Fixes build of u-boot 2021.10 without openssl - ;; https://lists.denx.de/pipermail/u-boot/2021-October/462728.html - (search-patch "u-boot-allow-disabling-openssl.patch")) - -(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 (package (name "u-boot") (version "2024.07") - (source (origin - (patches - (list %u-boot-rockchip-inno-usb-patch - %u-boot-allow-disabling-openssl-patch - %u-boot-nanopi-r4s-ddr3-patch)) - (method url-fetch) - (uri (string-append - "https://ftp.denx.de/pub/u-boot/" - "u-boot-" version ".tar.bz2")) - (sha256 - (base32 - "13rwv28g6z8ihrs8k0066gblw37rvw6nsxkks6rxdwqfp6ddm4gm")))) + (source + (origin + (patches + (search-patches + ;; Fix regression in 2020.10 causing freezes on boot with + ;; USB boot enabled. See: + ;; https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-rockpro64/-/issues/4 + ;; https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icenowy <at> aosc.io + "u-boot-rockchip-inno-usb.patch" + ;; Fixes build of u-boot 2021.10 without openssl. See: + ;; https://lists.denx.de/pipermail/u-boot/2021-October/462728.html + "u-boot-allow-disabling-openssl.patch" + ;; Use DDR3 instead of LPDDR4 for the Nano Pi R4S. + "u-boot-nanopi-r4s-ddr3.patch" + ;; Reserve more than 36 MB for linux-libre 6.9+ kernels. + "u-boot-50M-kernel.patch")) + (method url-fetch) + (uri (string-append "https://ftp.denx.de/pub/u-boot/" + "u-boot-" version ".tar.bz2")) + (sha256 + (base32 + "13rwv28g6z8ihrs8k0066gblw37rvw6nsxkks6rxdwqfp6ddm4gm")))) (build-system gnu-build-system) (native-inputs (list bison 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..4566894087 --- /dev/null +++ b/gnu/packages/patches/u-boot-50M-kernel.patch @@ -0,0 +1,51 @@ +This patch configures the U-Boot for Raspberry Pis to reserve 50 MB for +linux kernels, because the 6.9 and newer linux-libre-arm64-generic +kernels can be larger than 36 MB. It was created by Herman Rimm +<herman <at> rimm.ee> in August 2024 and is not submitted upstream yet. +diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env +index 30228285ed..54a8e9e5ae 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 base-commit: a493d65d04deafb763710bb1cb0425185750327d -- 2.45.2
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Mon, 16 Sep 2024 21:07:01 GMT) Full text and rfc822 format available.Message #14 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Vagrant Cascadian <vagrant <at> debian.org> To: Herman Rimm <herman <at> rimm.ee>, 72987 <at> debbugs.gnu.org Cc: u-boot <at> lists.denx.de, Matthias Brugger <mbrugger <at> suse.com>, Efraim Flashner <efraim <at> flashner.co.il>, Peter Robinson <pbrobinson <at> gmail.com> Subject: u-boot: rpi: Enlarge space available for kernel. Date: Mon, 16 Sep 2024 14:05:22 -0700
[Message part 1 (text/plain, inline)]
On 2024-09-16, Herman Rimm wrote: > --- /dev/null > +++ b/gnu/packages/patches/u-boot-50M-kernel.patch > @@ -0,0 +1,51 @@ > +This patch configures the U-Boot for Raspberry Pis to reserve 50 MB for > +linux kernels, because the 6.9 and newer linux-libre-arm64-generic > +kernels can be larger than 36 MB. It was created by Herman Rimm > +<herman <at> rimm.ee> in August 2024 and is not submitted upstream yet. > +diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env > +index 30228285ed..54a8e9e5ae 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 I would really like to hear comments from the upstream u-boot maintainers on adjusting these values... live well, vagrant
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Mon, 16 Sep 2024 21:12:02 GMT) Full text and rfc822 format available.Message #17 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Vagrant Cascadian <vagrant <at> debian.org> To: Herman Rimm <herman <at> rimm.ee>, 72987 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: Re: [bug#72987] [PATCH v2] gnu: u-boot: Enlarge space available for kernel. Date: Mon, 16 Sep 2024 14:10:40 -0700
[Message part 1 (text/plain, inline)]
On 2024-09-16, Herman Rimm wrote: > (define u-boot > (package > (name "u-boot") > (version "2024.07") u-boot is still only version 2024.01 in guix ... sorry I have lagged at u-boot updates. > base-commit: a493d65d04deafb763710bb1cb0425185750327d This appears to be from some branch not present in guix.... live well, vagrant
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Thu, 19 Sep 2024 14:14:01 GMT) Full text and rfc822 format available.Message #20 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Simon Glass <sjg <at> chromium.org> To: Vagrant Cascadian <vagrant <at> debian.org> Cc: Matthias Brugger <mbrugger <at> suse.com>, 72987 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>, u-boot <at> lists.denx.de, Herman Rimm <herman <at> rimm.ee>, Peter Robinson <pbrobinson <at> gmail.com> Subject: Re: u-boot: rpi: Enlarge space available for kernel. Date: Thu, 19 Sep 2024 16:11:43 +0200
Hi, On Mon, 16 Sept 2024 at 23:06, Vagrant Cascadian <vagrant <at> debian.org> wrote: > > On 2024-09-16, Herman Rimm wrote: > > --- /dev/null > > +++ b/gnu/packages/patches/u-boot-50M-kernel.patch > > @@ -0,0 +1,51 @@ > > +This patch configures the U-Boot for Raspberry Pis to reserve 50 MB for > > +linux kernels, because the 6.9 and newer linux-libre-arm64-generic > > +kernels can be larger than 36 MB. It was created by Herman Rimm > > +<herman <at> rimm.ee> in August 2024 and is not submitted upstream yet. > > +diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env > > +index 30228285ed..54a8e9e5ae 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 > > I would really like to hear comments from the upstream u-boot > maintainers on adjusting these values... It is fine to adjust them, so long as the memory is actually there. I don't know of anything special about the current values. Regards, Simon
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Fri, 20 Sep 2024 21:54:02 GMT) Full text and rfc822 format available.Message #23 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Vagrant Cascadian <vagrant <at> debian.org> To: Herman Rimm <herman <at> rimm.ee>, 70131 <at> debbugs.gnu.org Cc: 72987 <at> debbugs.gnu.org Subject: Re: [bug#70131] [bug#72987] [PATCH v2] gnu: u-boot: Enlarge space available for kernel. Date: Fri, 20 Sep 2024 14:52:56 -0700
[Message part 1 (text/plain, inline)]
On 2024-09-19, Herman Rimm wrote: > On Mon, Sep 16, 2024 at 02:10:40PM -0700, Vagrant Cascadian wrote: >> u-boot is still only version 2024.01 in guix ... sorry I have lagged at >> u-boot updates. >> >> >> > base-commit: a493d65d04deafb763710bb1cb0425185750327d >> >> This appears to be from some branch not present in guix.... > > This patch can be applied on top of the v2 revision of issue 70131, I > must not have CC'ed you that either. Or the bug you were replying to, done so now, so people know what is up. :) live well, vagrant
[signature.asc (application/pgp-signature, inline)]
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Fri, 13 Dec 2024 21:09:01 GMT) Full text and rfc822 format available.Message #26 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: 72987 <at> debbugs.gnu.org Subject: [PATCH v3 0/5] Add U-Boot patches and bootloaders. Date: Fri, 13 Dec 2024 22:07:31 +0100
Hello, This revision depends on #74842 and #74849, in addition to #70131. The top-level U-Boot patches are removed in #70131 instead of in the first patch, and the Nano Pi R4S and Orange Pi Zero 2W bootloaders are added in the second and fourth instead of in #70131. The final patch adds a bootloader for the ASUS Tinker Board S and the ARM Trusted Firmware for its SoC. The HDMI is flaky. I could create an additional U-Boot package for the Nano Pi R4S, and apply the DDR3 patch to it instead, so both variants are supported. Cheers, Herman Herman Rimm (5): gnu: u-boot: Enlarge space available for kernel. gnu: bootloader: Add nanopi-r4s-rk3399 bootloader. gnu: u-boot: Use DDR3 patch for Nano Pi R4S. gnu: bootloader: Add orangepi-zero2w bootloader. gnu: bootloader: Add ASUS Tinker Board S bootloader. gnu/bootloader/u-boot.scm | 22 ++++++++ gnu/local.mk | 4 +- gnu/packages/bootloaders.scm | 43 ++++++++++++++- gnu/packages/firmware.scm | 9 +++ gnu/packages/patches/u-boot-50M-kernel.patch | 55 +++++++++++++++++++ .../patches/u-boot-nanopi-r4s-ddr3.patch | 33 +++++++++++ 6 files changed, 164 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/u-boot-50M-kernel.patch create mode 100644 gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch base-commit: 383e7ca281bae36a151f3fdb2e3a1ac4c5c65b50 -- 2.45.2
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Fri, 13 Dec 2024 21:09:02 GMT) Full text and rfc822 format available.Message #29 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: 72987 <at> debbugs.gnu.org Subject: [PATCH v3 2/5] gnu: bootloader: Add nanopi-r4s-rk3399 bootloader. Date: Fri, 13 Dec 2024 22:07:33 +0100
* gnu/bootloader/u-boot.scm (u-boot-nanopi-r4s-rk3399-bootloader): Add. * gnu/packages/bootloaders.scm (u-boot-nanopi-r4s-rk3399): Add variable. Change-Id: I6d4cb098727fe4027aea33a39c59d34000dfc4db --- gnu/bootloader/u-boot.scm | 6 ++++++ gnu/packages/bootloaders.scm | 3 +++ 2 files changed, 9 insertions(+) diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 5d5fc1bff2..9c7df3b40f 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -38,6 +38,7 @@ (define-module (gnu bootloader u-boot) u-boot-cubietruck-bootloader u-boot-firefly-rk3399-bootloader u-boot-mx6cuboxi-bootloader + u-boot-nanopi-r4s-rk3399-bootloader u-boot-nintendo-nes-classic-edition-bootloader u-boot-novena-bootloader u-boot-orangepi-r1-plus-lts-rk3328-bootloader @@ -220,6 +221,11 @@ (define u-boot-novena-bootloader (inherit u-boot-imx-bootloader) (package u-boot-novena))) +(define u-boot-nanopi-r4s-rk3399-bootloader + (bootloader + (inherit u-boot-rockchip-bootloader) + (package u-boot-nanopi-r4s-rk3399))) + (define u-boot-orangepi-r1-plus-lts-rk3328-bootloader (bootloader (inherit u-boot-rockchip-bootloader) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 478385fb18..1a464655b6 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1274,6 +1274,9 @@ (define-public u-boot-novena version, contrary to Novena upstream, does not load u-boot.img from the first partition.")) +(define-public u-boot-nanopi-r4s-rk3399 + (make-u-boot-rockchip-package "nanopi-r4s" 'rk3399)) + (define-public u-boot-orangepi-r1-plus-lts-rk3328 (make-u-boot-rockchip-package "orangepi-r1-plus-lts" 'rk3328)) -- 2.45.2
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Fri, 13 Dec 2024 21:09:03 GMT) Full text and rfc822 format available.Message #32 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: 72987 <at> debbugs.gnu.org Subject: [PATCH v3 3/5] gnu: u-boot: Use DDR3 patch for Nano Pi R4S. Date: Fri, 13 Dec 2024 22:07:34 +0100
* gnu/packages/bootloaders.scm (u-boot)[source]: Use patch. * gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register patch. Change-Id: Ibbf952f2806c9cac7fc29e1264d427bf6ee67d01 --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 1 + .../patches/u-boot-nanopi-r4s-ddr3.patch | 33 +++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch diff --git a/gnu/local.mk b/gnu/local.mk index 4da94f68e2..4852c427b2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2277,6 +2277,7 @@ dist_patch_DATA = \ %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 \ + %D%/packages/patches/u-boot-nanopi-r4s-ddr3.patch \ %D%/packages/patches/ucx-tcp-iface-ioctl.patch \ %D%/packages/patches/ultrastar-deluxe-no-freesans.patch \ %D%/packages/patches/ungoogled-chromium-extension-search-path.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 1a464655b6..d946270317 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -759,6 +759,7 @@ (define u-boot (base32 "0yrhb0izihv47p781dc4cp0znc5g225ayl7anz23c6jdrmfbpz2h")) (patches (search-patches "u-boot-allow-disabling-openssl.patch" "u-boot-50M-kernel.patch" + "u-boot-nanopi-r4s-ddr3.patch" "u-boot-rockchip-inno-usb.patch")))) (build-system gnu-build-system) (native-inputs diff --git a/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch b/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch new file mode 100644 index 0000000000..435ffd5554 --- /dev/null +++ b/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch @@ -0,0 +1,33 @@ +From: Herman Rimm <herman <at> rimm.me> +Date: Sun, 2 Jul 2023 13:43:18 +0200 +Subject: [PATCH] Configure the Nano Pi R4S with DDR3. + +--- +This patch should be removed once something like this is upstream: +https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/commit/9d836044340ddef53f5d9f1946ac48c946a78284 + +diff --git a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi +index 69800cc368d..a3054849f88 100644 +--- a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi ++++ b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi +@@ -13,7 +13,7 @@ + */ + + #include "rk3399-nanopi4-u-boot.dtsi" +-#include "rk3399-sdram-lpddr4-100.dtsi" ++#include "rk3399-sdram-ddr3-1866.dtsi" + + / { + smbios { +diff --git a/configs/nanopi-r4s-rk3399_defconfig b/configs/nanopi-r4s-rk3399_defconfig +index ada04b46cb1..b39e350bbed 100644 +--- a/configs/nanopi-r4s-rk3399_defconfig ++++ b/configs/nanopi-r4s-rk3399_defconfig +@@ -48,7 +48,6 @@ CONFIG_PMIC_RK8XX=y + CONFIG_SPL_DM_REGULATOR_FIXED=y + CONFIG_REGULATOR_RK8XX=y + CONFIG_PWM_ROCKCHIP=y +-CONFIG_RAM_ROCKCHIP_LPDDR4=y + CONFIG_BAUDRATE=1500000 + CONFIG_DEBUG_UART_SHIFT=2 + CONFIG_SYS_NS16550_MEM32=y -- 2.45.2
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Fri, 13 Dec 2024 21:09:03 GMT) Full text and rfc822 format available.Message #35 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: 72987 <at> debbugs.gnu.org Subject: [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
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Fri, 13 Dec 2024 21:09:04 GMT) Full text and rfc822 format available.Message #38 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: 72987 <at> debbugs.gnu.org Subject: [PATCH v3 5/5] gnu: bootloader: Add ASUS Tinker Board S bootloader. Date: Fri, 13 Dec 2024 22:07:36 +0100
* 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)[native-inputs]: Add bc. (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 | 20 +++++++++++++++++++- gnu/packages/firmware.scm | 6 ++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 52527ab0db..0d6cd5c6a8 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -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 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 @@ -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) @@ -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 @@ -1308,6 +1310,22 @@ (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")))))))) + (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 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"))) + (define-public arm-trusted-firmware-rk3328 (make-arm-trusted-firmware "rk3328")) -- 2.45.2
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Fri, 13 Dec 2024 21:09:04 GMT) Full text and rfc822 format available.Message #41 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: 72987 <at> debbugs.gnu.org Subject: [PATCH v3 4/5] gnu: bootloader: Add orangepi-zero2w bootloader. Date: Fri, 13 Dec 2024 22:07:35 +0100
* gnu/bootloader/u-boot.scm (u-boot-orangepi-zero2w-bootloader): Add variable. * gnu/packages/bootloaders.scm (u-boot-orangepi-zero2w): Add variable. * gnu/packages/firmware.scm (arm-trusted-firmware-sun50i-h616): Add variable. Change-Id: Idb43fdabac51b3301f3bea24fec72bfa29636489 --- gnu/bootloader/u-boot.scm | 6 ++++++ gnu/packages/bootloaders.scm | 18 ++++++++++++++++++ gnu/packages/firmware.scm | 3 +++ 3 files changed, 27 insertions(+) diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 9c7df3b40f..52527ab0db 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -42,6 +42,7 @@ (define-module (gnu bootloader u-boot) u-boot-nintendo-nes-classic-edition-bootloader u-boot-novena-bootloader u-boot-orangepi-r1-plus-lts-rk3328-bootloader + u-boot-orangepi-zero2w-bootloader u-boot-pine64-plus-bootloader u-boot-pine64-lts-bootloader u-boot-pinebook-bootloader @@ -231,6 +232,11 @@ (define u-boot-orangepi-r1-plus-lts-rk3328-bootloader (inherit u-boot-rockchip-bootloader) (package u-boot-orangepi-r1-plus-lts-rk3328))) +(define u-boot-orangepi-zero2w-bootloader + (bootloader + (inherit u-boot-allwinner-bootloader) + (package u-boot-orangepi-zero2w))) + (define u-boot-pine64-plus-bootloader (bootloader (inherit u-boot-allwinner64-bootloader) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index d946270317..b91ff00e28 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1204,6 +1204,24 @@ (define*-public (make-u-boot-sunxi64-package board triplet scp-firmware (modify-inputs (package-inputs base) (append arm-trusted-firmware-sun50i-a64)))))) +(define-public u-boot-orangepi-zero2w + (let ((base (make-u-boot-package + "orangepi_zero2w" "aarch64-linux-gnu"))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'set-environment + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (setenv "SCP" "/dev/null") + (setenv "BL31" (search-input-file inputs "bl31.bin")))))))) + (inputs + (modify-inputs (package-inputs base) + ;; The Zero 2W uses the slightly revised Allwinner H618. + (append arm-trusted-firmware-sun50i-h616)))))) + (define-public u-boot-pine64-plus (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu" (delay crust-pine64-plus))) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 868be8488c..d89b136c86 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1168,6 +1168,9 @@ (define-public arm-trusted-firmware-sun50i-a64 (inherit base) (name "arm-trusted-firmware-sun50i-a64")))) +(define-public arm-trusted-firmware-sun50i-h616 + (make-arm-trusted-firmware "sun50i_h616")) + (define-public arm-trusted-firmware-rk3328 (make-arm-trusted-firmware "rk3328")) -- 2.45.2
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Tue, 04 Mar 2025 22:29:02 GMT) Full text and rfc822 format available.Message #44 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Vagrant Cascadian <vagrant <at> debian.org> To: Herman Rimm <herman <at> rimm.ee>, 72987 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: Re: [bug#72987] [PATCH v3 4/5] gnu: bootloader: Add orangepi-zero2w bootloader. Date: Tue, 04 Mar 2025 14:28:23 -0800
[Message part 1 (text/plain, inline)]
On 2024-12-13, Herman Rimm wrote: > * gnu/bootloader/u-boot.scm (u-boot-orangepi-zero2w-bootloader): Add > variable. > * gnu/packages/bootloaders.scm (u-boot-orangepi-zero2w): Add variable. > * gnu/packages/firmware.scm (arm-trusted-firmware-sun50i-h616): Add > variable. Pushed as 6e41ca397dd2810ee78bce8fdd11da5ba09c8fd4. live well, vagrant
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Tue, 04 Mar 2025 22:35:02 GMT) Full text and rfc822 format available.Message #47 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Vagrant Cascadian <vagrant <at> debian.org> To: Herman Rimm <herman <at> rimm.ee>, 72987 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: Re: [bug#72987] [PATCH v3 5/5] gnu: bootloader: Add ASUS Tinker Board S bootloader. Date: Tue, 04 Mar 2025 14:34:20 -0800
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Tue, 04 Mar 2025 22:44:02 GMT) Full text and rfc822 format available.Message #50 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Vagrant Cascadian <vagrant <at> debian.org> To: Herman Rimm <herman <at> rimm.ee>, 72987 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: Re: [bug#72987] [PATCH v3 3/5] gnu: u-boot: Use DDR3 patch for Nano Pi R4S. Date: Tue, 04 Mar 2025 14:42:50 -0800
[Message part 1 (text/plain, inline)]
On 2024-12-13, Herman Rimm wrote: > * gnu/packages/bootloaders.scm (u-boot)[source]: Use patch. > * gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch: Add file. > * gnu/local.mk (dist_patch_DATA): Register patch. Since this is a non-default u-boot-nanopi-r4s-rk3399, perhaps instead define a separate variant by making a custom configuration and applying the patch only in that variant (e.g. u-boot-nanopi-r4s-rk3399-ddr3)? Weather this is in addition to u-boot-nanopi-r4s-rk3399, or instead of, is a bit of an open question. Would anyone use the default variant? how common is that hardware? live well, vagrant > diff --git a/gnu/local.mk b/gnu/local.mk > index 4da94f68e2..4852c427b2 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -2277,6 +2277,7 @@ dist_patch_DATA = \ > %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 \ > + %D%/packages/patches/u-boot-nanopi-r4s-ddr3.patch \ > %D%/packages/patches/ucx-tcp-iface-ioctl.patch \ > %D%/packages/patches/ultrastar-deluxe-no-freesans.patch \ > %D%/packages/patches/ungoogled-chromium-extension-search-path.patch \ > diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm > index 1a464655b6..d946270317 100644 > --- a/gnu/packages/bootloaders.scm > +++ b/gnu/packages/bootloaders.scm > @@ -759,6 +759,7 @@ (define u-boot > (base32 "0yrhb0izihv47p781dc4cp0znc5g225ayl7anz23c6jdrmfbpz2h")) > (patches (search-patches "u-boot-allow-disabling-openssl.patch" > "u-boot-50M-kernel.patch" > + "u-boot-nanopi-r4s-ddr3.patch" > "u-boot-rockchip-inno-usb.patch")))) > (build-system gnu-build-system) > (native-inputs > diff --git a/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch b/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch > new file mode 100644 > index 0000000000..435ffd5554 > --- /dev/null > +++ b/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch > @@ -0,0 +1,33 @@ > +From: Herman Rimm <herman <at> rimm.me> > +Date: Sun, 2 Jul 2023 13:43:18 +0200 > +Subject: [PATCH] Configure the Nano Pi R4S with DDR3. > + > +--- > +This patch should be removed once something like this is upstream: > +https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/commit/9d836044340ddef53f5d9f1946ac48c946a78284 > + > +diff --git a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi > +index 69800cc368d..a3054849f88 100644 > +--- a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi > ++++ b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi > +@@ -13,7 +13,7 @@ > + */ > + > + #include "rk3399-nanopi4-u-boot.dtsi" > +-#include "rk3399-sdram-lpddr4-100.dtsi" > ++#include "rk3399-sdram-ddr3-1866.dtsi" > + > + / { > + smbios { > +diff --git a/configs/nanopi-r4s-rk3399_defconfig b/configs/nanopi-r4s-rk3399_defconfig > +index ada04b46cb1..b39e350bbed 100644 > +--- a/configs/nanopi-r4s-rk3399_defconfig > ++++ b/configs/nanopi-r4s-rk3399_defconfig > +@@ -48,7 +48,6 @@ CONFIG_PMIC_RK8XX=y > + CONFIG_SPL_DM_REGULATOR_FIXED=y > + CONFIG_REGULATOR_RK8XX=y > + CONFIG_PWM_ROCKCHIP=y > +-CONFIG_RAM_ROCKCHIP_LPDDR4=y > + CONFIG_BAUDRATE=1500000 > + CONFIG_DEBUG_UART_SHIFT=2 > + CONFIG_SYS_NS16550_MEM32=y > -- > 2.45.2
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Tue, 04 Mar 2025 22:47:02 GMT) Full text and rfc822 format available.Message #53 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Vagrant Cascadian <vagrant <at> debian.org> To: Herman Rimm <herman <at> rimm.ee>, 72987 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: Re: [bug#72987] [PATCH v3 1/5] gnu: u-boot: Enlarge space available for kernel. Date: Tue, 04 Mar 2025 14:46:12 -0800
[Message part 1 (text/plain, inline)]
On 2024-12-13, Herman Rimm wrote: > 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. I know you got a response from Simon Glass that it seemed reasonable, but is there any intention to submit this patch upstream? I would feel more comfortable applying it if I knew we would eventually be able to drop it. With that in mind, please move this to the last patch in the series on another iteration so it does not block remaining patches. live well, vagrant > +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
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Tue, 04 Mar 2025 22:50:02 GMT) Full text and rfc822 format available.Message #56 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Vagrant Cascadian <vagrant <at> debian.org> To: Herman Rimm <herman <at> rimm.ee>, 72987 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: Re: [bug#72987] [PATCH v3 2/5] gnu: bootloader: Add nanopi-r4s-rk3399 bootloader. Date: Tue, 04 Mar 2025 14:48:56 -0800
[Message part 1 (text/plain, inline)]
On 2024-12-13, Herman Rimm wrote: > * gnu/bootloader/u-boot.scm (u-boot-nanopi-r4s-rk3399-bootloader): Add. > * gnu/packages/bootloaders.scm (u-boot-nanopi-r4s-rk3399): Add variable. > > Change-Id: I6d4cb098727fe4027aea33a39c59d34000dfc4db I was tempted to just push this patch, but depending on weather we want one or two variants, am waiting till we have more clarity on that. live well, vagrant > --- > gnu/bootloader/u-boot.scm | 6 ++++++ > gnu/packages/bootloaders.scm | 3 +++ > 2 files changed, 9 insertions(+) > > diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm > index 5d5fc1bff2..9c7df3b40f 100644 > --- a/gnu/bootloader/u-boot.scm > +++ b/gnu/bootloader/u-boot.scm > @@ -38,6 +38,7 @@ (define-module (gnu bootloader u-boot) > u-boot-cubietruck-bootloader > u-boot-firefly-rk3399-bootloader > u-boot-mx6cuboxi-bootloader > + u-boot-nanopi-r4s-rk3399-bootloader > u-boot-nintendo-nes-classic-edition-bootloader > u-boot-novena-bootloader > u-boot-orangepi-r1-plus-lts-rk3328-bootloader > @@ -220,6 +221,11 @@ (define u-boot-novena-bootloader > (inherit u-boot-imx-bootloader) > (package u-boot-novena))) > > +(define u-boot-nanopi-r4s-rk3399-bootloader > + (bootloader > + (inherit u-boot-rockchip-bootloader) > + (package u-boot-nanopi-r4s-rk3399))) > + > (define u-boot-orangepi-r1-plus-lts-rk3328-bootloader > (bootloader > (inherit u-boot-rockchip-bootloader) > diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm > index 478385fb18..1a464655b6 100644 > --- a/gnu/packages/bootloaders.scm > +++ b/gnu/packages/bootloaders.scm > @@ -1274,6 +1274,9 @@ (define-public u-boot-novena > version, contrary to Novena upstream, does not load u-boot.img from the first > partition.")) > > +(define-public u-boot-nanopi-r4s-rk3399 > + (make-u-boot-rockchip-package "nanopi-r4s" 'rk3399)) > + > (define-public u-boot-orangepi-r1-plus-lts-rk3328 > (make-u-boot-rockchip-package "orangepi-r1-plus-lts" 'rk3328)) > > -- > 2.45.2
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Wed, 05 Mar 2025 18:36:01 GMT) Full text and rfc822 format available.Message #59 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: Vagrant Cascadian <vagrant <at> debian.org>, 72987 <at> debbugs.gnu.org Subject: Re: [bug#72987] [PATCH v3 5/5] gnu: bootloader: Add ASUS Tinker Board S bootloader. Date: Wed, 5 Mar 2025 19:34:06 +0100
On Tue, Mar 04, 2025 at 02:34:20PM -0800, Vagrant Cascadian wrote: > 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? Yes, bc could be added for u-boot-tinker-s-rk3288 only. > 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? AARCH32_SP=sp_min is used for all AARCH32 Rockchip SoCs, see [1]. Cheers, Herman [1]: https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/plat/rockchip.rst
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Wed, 05 Mar 2025 18:42:01 GMT) Full text and rfc822 format available.Message #62 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: Vagrant Cascadian <vagrant <at> debian.org>, 72987 <at> debbugs.gnu.org Subject: Re: [bug#72987] [PATCH v3 3/5] gnu: u-boot: Use DDR3 patch for Nano Pi R4S. Date: Wed, 5 Mar 2025 19:40:12 +0100
Hello, On Tue, Mar 04, 2025 at 02:42:50PM -0800, Vagrant Cascadian wrote: > Since this is a non-default u-boot-nanopi-r4s-rk3399, perhaps instead > define a separate variant by making a custom configuration and applying > the patch only in that variant (e.g. u-boot-nanopi-r4s-rk3399-ddr3)? I was thinking the same thing. > Weather this is in addition to u-boot-nanopi-r4s-rk3399, or instead of, > is a bit of an open question. Would anyone use the default variant? how > common is that hardware? I will only define u-boot-nanopi-r4s-rk3399-ddr3 for now. Cheers, Herman
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Mon, 31 Mar 2025 18:21:01 GMT) Full text and rfc822 format available.Message #65 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: 72987 <at> debbugs.gnu.org Subject: [PATCH v4 0/3] Add U-Boot patches and bootloaders. Date: Mon, 31 Mar 2025 20:19:24 +0200
Hi, [PATCH v3 2/5] and [PATCH v3 3/5] became [PATCH v4 1/3]. [PATCH v4 2/3] adds u-boot-tinker-s-rk3288 with the bc native-input. Besides [PATCH v4 3/3], I will build linux-libre-arm64-generic without Pinebook specific options, and see if it's sufficiently small. Cheers, Herman Herman Rimm (3): gnu: bootloader: Add nanopi-r4s-rk3399-ddr3 bootloader. gnu: bootloader: Add ASUS Tinker Board S bootloader. gnu: u-boot: Enlarge space available for kernel. gnu/bootloader/u-boot.scm | 16 ++++++ gnu/local.mk | 2 + gnu/packages/bootloaders.scm | 30 ++++++++++ gnu/packages/firmware.scm | 6 ++ gnu/packages/patches/u-boot-50M-kernel.patch | 55 +++++++++++++++++++ .../patches/u-boot-nanopi-r4s-ddr3.patch | 33 +++++++++++ 6 files changed, 142 insertions(+) create mode 100644 gnu/packages/patches/u-boot-50M-kernel.patch create mode 100644 gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch base-commit: 5735c278e16517d9be5e26235fe68dea9bae3527 -- 2.48.1
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Mon, 31 Mar 2025 18:21:02 GMT) Full text and rfc822 format available.Message #68 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: 72987 <at> debbugs.gnu.org Subject: [PATCH v4 1/3] gnu: bootloader: Add nanopi-r4s-rk3399-ddr3 bootloader. Date: Mon, 31 Mar 2025 20:19:25 +0200
* gnu/bootloader/u-boot.scm (u-boot-nanopi-r4s-rk3399-ddr3-bootloader): Add variable. * gnu/packages/bootloaders.scm (u-boot-nanopi-r4s-rk3399-ddr3): Add variable. * gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register patch. Change-Id: I6d4cb098727fe4027aea33a39c59d34000dfc4db --- gnu/bootloader/u-boot.scm | 6 ++++ gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 10 ++++++ .../patches/u-boot-nanopi-r4s-ddr3.patch | 33 +++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 64fb319f50f..a7c73093bd6 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -38,6 +38,7 @@ (define-module (gnu bootloader u-boot) u-boot-cubietruck-bootloader u-boot-firefly-rk3399-bootloader u-boot-mx6cuboxi-bootloader + u-boot-nanopi-r4s-rk3399-ddr3-bootloader u-boot-nintendo-nes-classic-edition-bootloader u-boot-novena-bootloader u-boot-orangepi-r1-plus-lts-rk3328-bootloader @@ -221,6 +222,11 @@ (define u-boot-novena-bootloader (inherit u-boot-imx-bootloader) (package u-boot-novena))) +(define u-boot-nanopi-r4s-rk3399-ddr3-bootloader + (bootloader + (inherit u-boot-rockchip-bootloader) + (package u-boot-nanopi-r4s-rk3399-ddr3))) + (define u-boot-orangepi-r1-plus-lts-rk3328-bootloader (bootloader (inherit u-boot-rockchip-bootloader) diff --git a/gnu/local.mk b/gnu/local.mk index f03fcb14fcc..955b8fb1ddf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2342,6 +2342,7 @@ dist_patch_DATA = \ %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 \ + %D%/packages/patches/u-boot-nanopi-r4s-ddr3.patch \ %D%/packages/patches/ucx-tcp-iface-ioctl.patch \ %D%/packages/patches/ultrastar-deluxe-no-freesans.patch \ %D%/packages/patches/ungoogled-chromium-extension-search-path.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 8ece61f11c3..1953222ae12 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1303,6 +1303,16 @@ (define-public u-boot-novena version, contrary to Novena upstream, does not load u-boot.img from the first partition.")) +(define-public u-boot-nanopi-r4s-rk3399-ddr3 + (let ((base (make-u-boot-rockchip-package "nanopi-r4s" 'rk3399))) + (package + (inherit base) + (source + (origin + (inherit (package-source base)) + (patches (cons (search-patch "u-boot-nanopi-r4s-ddr3.patch") + (origin-patches (package-source base))))))))) + (define-public u-boot-orangepi-r1-plus-lts-rk3328 (make-u-boot-rockchip-package "orangepi-r1-plus-lts" 'rk3328)) diff --git a/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch b/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch new file mode 100644 index 00000000000..435ffd55546 --- /dev/null +++ b/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch @@ -0,0 +1,33 @@ +From: Herman Rimm <herman <at> rimm.me> +Date: Sun, 2 Jul 2023 13:43:18 +0200 +Subject: [PATCH] Configure the Nano Pi R4S with DDR3. + +--- +This patch should be removed once something like this is upstream: +https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/commit/9d836044340ddef53f5d9f1946ac48c946a78284 + +diff --git a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi +index 69800cc368d..a3054849f88 100644 +--- a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi ++++ b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi +@@ -13,7 +13,7 @@ + */ + + #include "rk3399-nanopi4-u-boot.dtsi" +-#include "rk3399-sdram-lpddr4-100.dtsi" ++#include "rk3399-sdram-ddr3-1866.dtsi" + + / { + smbios { +diff --git a/configs/nanopi-r4s-rk3399_defconfig b/configs/nanopi-r4s-rk3399_defconfig +index ada04b46cb1..b39e350bbed 100644 +--- a/configs/nanopi-r4s-rk3399_defconfig ++++ b/configs/nanopi-r4s-rk3399_defconfig +@@ -48,7 +48,6 @@ CONFIG_PMIC_RK8XX=y + CONFIG_SPL_DM_REGULATOR_FIXED=y + CONFIG_REGULATOR_RK8XX=y + CONFIG_PWM_ROCKCHIP=y +-CONFIG_RAM_ROCKCHIP_LPDDR4=y + CONFIG_BAUDRATE=1500000 + CONFIG_DEBUG_UART_SHIFT=2 + CONFIG_SYS_NS16550_MEM32=y -- 2.48.1
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Mon, 31 Mar 2025 18:21:02 GMT) Full text and rfc822 format available.Message #71 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: 72987 <at> debbugs.gnu.org Subject: [PATCH v4 2/3] gnu: bootloader: Add ASUS Tinker Board S bootloader. Date: Mon, 31 Mar 2025 20:19:26 +0200
* 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(+) diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index a7c73093bd6..8acf8af785b 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -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 diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 1953222ae12..5a030360226 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -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 diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index f04edefafe8..ba3dfae715b 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -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")) -- 2.48.1
guix-patches <at> gnu.org
:bug#72987
; Package guix-patches
.
(Mon, 31 Mar 2025 18:21:03 GMT) Full text and rfc822 format available.Message #74 received at 72987 <at> debbugs.gnu.org (full text, mbox):
From: Herman Rimm <herman <at> rimm.ee> To: 72987 <at> debbugs.gnu.org Subject: [PATCH v4 3/3] gnu: u-boot: Enlarge space available for kernel. Date: Mon, 31 Mar 2025 20:19:27 +0200
* 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 | 1 + gnu/packages/bootloaders.scm | 1 + gnu/packages/patches/u-boot-50M-kernel.patch | 55 ++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 gnu/packages/patches/u-boot-50M-kernel.patch diff --git a/gnu/local.mk b/gnu/local.mk index 955b8fb1ddf..3bb421b49e7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2339,6 +2339,7 @@ dist_patch_DATA = \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/tvm_fix_cpptest_build.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 5a030360226..8a2ca8cfda3 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -769,6 +769,7 @@ (define u-boot (sha256 (base32 "1i1v86bnixh8hyqbwwr5iwdnnadmg2fqxw9g526fvclsbvl8lz0v")) (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 00000000000..c4d054dd42d --- /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.48.1
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.