* u-boot: rpi: Enlarge space available for kernel.
[not found] ` <c56191d9f088cc52844d3cb1c7eec0f413745b2d.1726507300.git.herman@rimm.ee>
@ 2024-09-16 21:05 ` Vagrant Cascadian
2024-09-19 14:11 ` Simon Glass
0 siblings, 1 reply; 2+ messages in thread
From: Vagrant Cascadian @ 2024-09-16 21:05 UTC (permalink / raw)
To: Herman Rimm, 72987
Cc: Efraim Flashner, u-boot, Matthias Brugger, Peter Robinson
[-- Attachment #1: Type: text/plain, Size: 3068 bytes --]
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@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: u-boot: rpi: Enlarge space available for kernel.
2024-09-16 21:05 ` u-boot: rpi: Enlarge space available for kernel Vagrant Cascadian
@ 2024-09-19 14:11 ` Simon Glass
0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2024-09-19 14:11 UTC (permalink / raw)
To: Vagrant Cascadian
Cc: Herman Rimm, 72987, Efraim Flashner, u-boot, Matthias Brugger,
Peter Robinson
Hi,
On Mon, 16 Sept 2024 at 23:06, Vagrant Cascadian <vagrant@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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-19 14:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240902190459.13783-1-herman@rimm.ee>
[not found] ` <c56191d9f088cc52844d3cb1c7eec0f413745b2d.1726507300.git.herman@rimm.ee>
2024-09-16 21:05 ` u-boot: rpi: Enlarge space available for kernel Vagrant Cascadian
2024-09-19 14:11 ` Simon Glass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox