* [QUESTION] Kernel 5.10 image might be too big to be loaded by U-Boot on RPi 4B
@ 2021-01-28 8:54 ` Jian-Hong Pan
2021-02-01 9:58 ` Jaehoon Chung
2021-02-02 8:28 ` Matthias Brugger
0 siblings, 2 replies; 4+ messages in thread
From: Jian-Hong Pan @ 2021-01-28 8:54 UTC (permalink / raw)
To: u-boot
Hi,
We have tried to boot the Ubuntu kernel 5.10 [1] (arm64) with U-Boot
2020.10 on RPi 4B. That includes the source code and build config.
The kernel's build config enables not only Broadcom chips, but also many
other platforms: Amlogic, MediaTek, Realtek, Rockchip ... by default.
Here is the output from U-Boot:
U-Boot 2020.10 (Jan 26 2021 - 15:28:45 +0800)
DRAM: 3.9 GiB
RPI 4 Model B (0xc03111)
MMC: mmcnr at 7e300000: 1, emmc2 at 7e340000: 0
Loading Environment from FAT... *** Warning - bad CRC, using default
environment
In: serial
Out: vidconsole
Err: vidconsole
Net: eth0: genet at 7d580000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:2...
Found U-Boot script /boot/boot.scr
1847 bytes read in 19 ms (94.7 KiB/s)
## Executing script at 02400000
Load u-Boot environment ... from mmc 0:2
622 bytes read in 24 ms (24.4 KiB/s)
Load device tree ...
25693 bytes read in 30 ms (835.9 KiB/s)
fdt_addr_r @ 0x02600000 , size= 645d
Load kernel and unzip it ...
13013555 bytes read in 574 ms (21.6 MiB/s)
Uncompressed size: 38742528 = 0x24F2A00
kernel_addr_r @ 0x00080000 , size= 24f2a00
Load RAM disk ...
54360540 bytes read in 2298 ms (22.6 MiB/s)
ramdisk_addr_r @ 0x02700000 , size= 33d79dc
Boot ...
Moving Image from 0x80000 to 0x200000, end=2820000
ERROR: RD image overlaps OS image (OS=0x200000..0x2820000)
SCRIPT FAILED: continuing...
Card did not respond to voltage select!
genet at 7d580000 Waiting for PHY auto negotiation to complete........
It shows error: "RD image overlaps OS image (OS=0x200000..0x2820000)"
So, I calculated the memory address and space:
0x200000 (kernel start address) + 0x24F2A00 (kernel size) = 0x26F2A00 <
2820000 (kernel end), but > 0x2700000 (ramdisk start address) & > 0x2600000
(FDT start address)
The kernel image size 0x24F2A00 bytes is too fat to sit in the memory space
prepared by U-Boot and overlaps ramdisk and FDT's memory spaces.
It is more than 36.9MB, which is over 36MB mentioned in U-Boot's comment
[2].
We understand this can be fixed by a workaround like tuning/reducing the
kernel's build config. However, is it possible to have another way to
resolve this problem?
[1]
https://kernel.ubuntu.com/git/ubuntu/unstable.git/tree/?h=Ubuntu-5.10-5.10.0-10.11
[2]
https://github.com/u-boot/u-boot/blob/v2021.01/include/configs/rpi.h#L140
Jain-Hong Pan
^ permalink raw reply [flat|nested] 4+ messages in thread
* [QUESTION] Kernel 5.10 image might be too big to be loaded by U-Boot on RPi 4B
2021-01-28 8:54 ` [QUESTION] Kernel 5.10 image might be too big to be loaded by U-Boot on RPi 4B Jian-Hong Pan
@ 2021-02-01 9:58 ` Jaehoon Chung
2021-02-02 8:28 ` Matthias Brugger
1 sibling, 0 replies; 4+ messages in thread
From: Jaehoon Chung @ 2021-02-01 9:58 UTC (permalink / raw)
To: u-boot
Hi Jain-Hong
On 1/28/21 5:54 PM, Jian-Hong Pan wrote:
> Hi,
>
> We have tried to boot the Ubuntu kernel 5.10 [1] (arm64) with U-Boot
> 2020.10 on RPi 4B. That includes the source code and build config.
> The kernel's build config enables not only Broadcom chips, but also many
> other platforms: Amlogic, MediaTek, Realtek, Rockchip ... by default.
>
> Here is the output from U-Boot:
>
> U-Boot 2020.10 (Jan 26 2021 - 15:28:45 +0800)
>
> DRAM: 3.9 GiB
> RPI 4 Model B (0xc03111)
> MMC: mmcnr at 7e300000: 1, emmc2 at 7e340000: 0
> Loading Environment from FAT... *** Warning - bad CRC, using default
> environment
>
> In: serial
> Out: vidconsole
> Err: vidconsole
> Net: eth0: genet at 7d580000
> Hit any key to stop autoboot: 0
> switch to partitions #0, OK
> mmc0 is current device
> Scanning mmc 0:2...
> Found U-Boot script /boot/boot.scr
> 1847 bytes read in 19 ms (94.7 KiB/s)
> ## Executing script at 02400000
> Load u-Boot environment ... from mmc 0:2
> 622 bytes read in 24 ms (24.4 KiB/s)
> Load device tree ...
> 25693 bytes read in 30 ms (835.9 KiB/s)
> fdt_addr_r @ 0x02600000 , size= 645d
> Load kernel and unzip it ...
> 13013555 bytes read in 574 ms (21.6 MiB/s)
> Uncompressed size: 38742528 = 0x24F2A00
> kernel_addr_r @ 0x00080000 , size= 24f2a00
> Load RAM disk ...
> 54360540 bytes read in 2298 ms (22.6 MiB/s)
> ramdisk_addr_r @ 0x02700000 , size= 33d79dc
> Boot ...
> Moving Image from 0x80000 to 0x200000, end=2820000
> ERROR: RD image overlaps OS image (OS=0x200000..0x2820000)
> SCRIPT FAILED: continuing...
> Card did not respond to voltage select!
> genet at 7d580000 Waiting for PHY auto negotiation to complete........
>
> It shows error: "RD image overlaps OS image (OS=0x200000..0x2820000)"
>
> So, I calculated the memory address and space:
>
> 0x200000 (kernel start address) + 0x24F2A00 (kernel size) = 0x26F2A00 <
> 2820000 (kernel end), but > 0x2700000 (ramdisk start address) & > 0x2600000
> (FDT start address)
>
> The kernel image size 0x24F2A00 bytes is too fat to sit in the memory space
> prepared by U-Boot and overlaps ramdisk and FDT's memory spaces.
> It is more than 36.9MB, which is over 36MB mentioned in U-Boot's comment
> [2].
>
> We understand this can be fixed by a workaround like tuning/reducing the
> kernel's build config. However, is it possible to have another way to
> resolve this problem?
In my case, changed the kernel loading address in my boot script.
https://git.tizen.org/cgit/platform/kernel/u-boot/tree/tizen/bootscript/tizen-boot-rpi4.scr?h=tizen#n55
Best Regards,
Jaehoon Chung
>
> [1]
> https://kernel.ubuntu.com/git/ubuntu/unstable.git/tree/?h=Ubuntu-5.10-5.10.0-10.11
> [2]
> https://protect2.fireeye.com/v1/url?k=48d47af8-174f43e2-48d5f1b7-000babff24ad-9a667a07fd484367&q=1&e=2f353007-95b3-4ee5-9b9f-acbac9af78f8&u=https%3A%2F%2Fgithub.com%2Fu-boot%2Fu-boot%2Fblob%2Fv2021.01%2Finclude%2Fconfigs%2Frpi.h%23L140
>
> Jain-Hong Pan
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [QUESTION] Kernel 5.10 image might be too big to be loaded by U-Boot on RPi 4B
2021-01-28 8:54 ` [QUESTION] Kernel 5.10 image might be too big to be loaded by U-Boot on RPi 4B Jian-Hong Pan
2021-02-01 9:58 ` Jaehoon Chung
@ 2021-02-02 8:28 ` Matthias Brugger
2021-02-02 13:55 ` Tom Rini
1 sibling, 1 reply; 4+ messages in thread
From: Matthias Brugger @ 2021-02-02 8:28 UTC (permalink / raw)
To: u-boot
On Thu, Jan 28, 2021 at 04:54:03PM +0800, Jian-Hong Pan wrote:
> Load u-Boot environment ... from mmc 0:2
> 622 bytes read in 24 ms (24.4 KiB/s)
> Load device tree ...
> 25693 bytes read in 30 ms (835.9 KiB/s)
> fdt_addr_r @ 0x02600000 , size= 645d
> Load kernel and unzip it ...
> 13013555 bytes read in 574 ms (21.6 MiB/s)
> Uncompressed size: 38742528 = 0x24F2A00
> kernel_addr_r @ 0x00080000 , size= 24f2a00
> Load RAM disk ...
> 54360540 bytes read in 2298 ms (22.6 MiB/s)
> ramdisk_addr_r @ 0x02700000 , size= 33d79dc
> Boot ...
> Moving Image from 0x80000 to 0x200000, end=2820000
> ERROR: RD image overlaps OS image (OS=0x200000..0x2820000)
> SCRIPT FAILED: continuing...
> Card did not respond to voltage select!
> genet at 7d580000 Waiting for PHY auto negotiation to complete........
>
> It shows error: "RD image overlaps OS image (OS=0x200000..0x2820000)"
>
> So, I calculated the memory address and space:
>
> 0x200000 (kernel start address) + 0x24F2A00 (kernel size) = 0x26F2A00 <
> 2820000 (kernel end), but > 0x2700000 (ramdisk start address) & > 0x2600000
> (FDT start address)
>
> The kernel image size 0x24F2A00 bytes is too fat to sit in the memory space
> prepared by U-Boot and overlaps ramdisk and FDT's memory spaces.
> It is more than 36.9MB, which is over 36MB mentioned in U-Boot's comment
> [2].
>
If I did the math right, we should have a lot of space left.
You could try to bump up fdt_addr_r=0x02900000 and
ramdisk_addr_r=0x02A00000 and see what happens.
Regards,
Matthias
> We understand this can be fixed by a workaround like tuning/reducing the
> kernel's build config. However, is it possible to have another way to
> resolve this problem?
>
> [1]
> https://kernel.ubuntu.com/git/ubuntu/unstable.git/tree/?h=Ubuntu-5.10-5.10.0-10.11
> [2]
> https://github.com/u-boot/u-boot/blob/v2021.01/include/configs/rpi.h#L140
>
> Jain-Hong Pan
^ permalink raw reply [flat|nested] 4+ messages in thread
* [QUESTION] Kernel 5.10 image might be too big to be loaded by U-Boot on RPi 4B
2021-02-02 8:28 ` Matthias Brugger
@ 2021-02-02 13:55 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2021-02-02 13:55 UTC (permalink / raw)
To: u-boot
On Tue, Feb 02, 2021 at 09:28:20AM +0100, Matthias Brugger wrote:
> On Thu, Jan 28, 2021 at 04:54:03PM +0800, Jian-Hong Pan wrote:
> > Load u-Boot environment ... from mmc 0:2
> > 622 bytes read in 24 ms (24.4 KiB/s)
> > Load device tree ...
> > 25693 bytes read in 30 ms (835.9 KiB/s)
> > fdt_addr_r @ 0x02600000 , size= 645d
> > Load kernel and unzip it ...
> > 13013555 bytes read in 574 ms (21.6 MiB/s)
> > Uncompressed size: 38742528 = 0x24F2A00
> > kernel_addr_r @ 0x00080000 , size= 24f2a00
> > Load RAM disk ...
> > 54360540 bytes read in 2298 ms (22.6 MiB/s)
> > ramdisk_addr_r @ 0x02700000 , size= 33d79dc
> > Boot ...
> > Moving Image from 0x80000 to 0x200000, end=2820000
> > ERROR: RD image overlaps OS image (OS=0x200000..0x2820000)
> > SCRIPT FAILED: continuing...
> > Card did not respond to voltage select!
> > genet at 7d580000 Waiting for PHY auto negotiation to complete........
> >
> > It shows error: "RD image overlaps OS image (OS=0x200000..0x2820000)"
> >
> > So, I calculated the memory address and space:
> >
> > 0x200000 (kernel start address) + 0x24F2A00 (kernel size) = 0x26F2A00 <
> > 2820000 (kernel end), but > 0x2700000 (ramdisk start address) & > 0x2600000
> > (FDT start address)
> >
> > The kernel image size 0x24F2A00 bytes is too fat to sit in the memory space
> > prepared by U-Boot and overlaps ramdisk and FDT's memory spaces.
> > It is more than 36.9MB, which is over 36MB mentioned in U-Boot's comment
> > [2].
>
> If I did the math right, we should have a lot of space left.
> You could try to bump up fdt_addr_r=0x02900000 and
> ramdisk_addr_r=0x02A00000 and see what happens.
The environment section in include/configs/rpi.h needs to be updated.
You cannot disable device tree relocation by default as that leads to
problems. You need to set bootm_size to something that will cover all
of the valid lowmem area the device tree and initrd can reside in.
Please see include/configs/ti_armv7_common.h which is based on what the
kernel documents as minimum / maximum values / locations. Thanks.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210202/07b79087/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-02-02 13:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20210128130722epcas1p1eb5224bc245f27530394b7a4cd7c9876@epcas1p1.samsung.com>
2021-01-28 8:54 ` [QUESTION] Kernel 5.10 image might be too big to be loaded by U-Boot on RPi 4B Jian-Hong Pan
2021-02-01 9:58 ` Jaehoon Chung
2021-02-02 8:28 ` Matthias Brugger
2021-02-02 13:55 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.