public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Matthias Brugger <matthias.bgg@kernel.org>
To: u-boot@lists.denx.de
Subject: [QUESTION] Kernel 5.10 image might be too big to be loaded by U-Boot on RPi 4B
Date: Tue, 2 Feb 2021 09:28:20 +0100	[thread overview]
Message-ID: <YBkNJF7stHUkBiC2@ziggy.stardust> (raw)
In-Reply-To: <CAPpJ_edir=jCyp5Y1bAYEqfYGkN23bhgf-rbgDuvWHNtk1sDxg@mail.gmail.com>

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

  parent reply	other threads:[~2021-02-02  8:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2021-02-02 13:55     ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YBkNJF7stHUkBiC2@ziggy.stardust \
    --to=matthias.bgg@kernel.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox