Skip to content
Snippets Groups Projects

arm: rpi: Increase headroom available to kernel image when relocated

Closed Martyn Welch requested to merge wip/martyn/rpi-kernel-headroom into apertis/v2025dev3
3 unresolved threads

We are seeing the following issue booting when moving to the v6.8.x kernel releases:

Moving Image from 0x80000 to 0x200000, end=2600000
## Flattened Device Tree blob at 02600000
   Booting using the fdt blob at 0x2600000
ERROR: FDT image overlaps OS image (OS=0x200000..0x2600000)

This is a result of the kernel images now reporting a size of 36MB and just hitting the offset used for the DTB when the kernel is relocated to a 2MB boundary (as is required for booting).

The kernel is being loaded at 0x80000 on the assumption that the kernel image would be compressed. Our kernel isn't compressed, so copy to the required boot location to avoid the need to relocate.

This frees up 1.5MB before the kernel image, so shift the PXE and script load locations to before the kernel. Shift up the DTB and initrd allocations to increase the kernel allocation to 50MB, giving headroom for the kernel image to grow.

Signed-off-by: Martyn Welch martyn.welch@collabora.com

Edited by Martyn Welch

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
25
26 Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
27 ---
28 board/raspberrypi/rpi/rpi.env | 18 +++++++++++++-----
29 1 file changed, 13 insertions(+), 5 deletions(-)
30
31 diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env
32 index 96a3083..a70bedc 100644
33 --- a/board/raspberrypi/rpi/rpi.env
34 +++ b/board/raspberrypi/rpi/rpi.env
35 @@ -62,6 +62,14 @@ dfu_alt_info+=zImage fat 0 1
36 * Even with the smallest possible CPU-GPU memory split of the CPU getting
37 * only 64M, the remaining 25M starting at 0x02700000 should allow quite
38 * large initrds before they start colliding with U-Boot.
39 + *
40 + * APERTIS: As a distro kernel, we need more than 36M for the kernel, we are
  • 1 From: Martyn Welch <martyn.welch@collabora.com>
    2 Date: Fri, 14 Jun 2024 16:57:25 +0100
    3 Subject: arm: rpi: Increase headroom available to kernel image when relocated
    4
    5 We are seeing the following issue booting when moving to the v6.8.x
    6 kernel releases:
    7
    8 Moving Image from 0x80000 to 0x200000, end=2600000
    9 ## Flattened Device Tree blob at 02600000
    10 Booting using the fdt blob at 0x2600000
    11 ERROR: FDT image overlaps OS image (OS=0x200000..0x2600000)
    12
    13 This is a result of the kernel images now reporting a size of 36MB and
  • No upstream submission yet?

  • Walter Lozano unapproved this merge request

    unapproved this merge request

  • 48 #ifdef CONFIG_ARM64
    49 fdt_high=ffffffffffffffff
    50 @@ -70,10 +78,10 @@ initrd_high=ffffffffffffffff
    51 fdt_high=ffffffff
    52 initrd_high=ffffffff
    53 #endif
    54 -kernel_addr_r=0x00080000
    55 -scriptaddr=0x02400000
    56 -pxefile_addr_r=0x02500000
    57 -fdt_addr_r=0x02600000
    58 -ramdisk_addr_r=0x02700000
    59 +pxefile_addr_r=0x00080000
    60 +scriptaddr=0x00100000
    61 +kernel_addr_r=0x00200000
    62 +fdt_addr_r=0x03400000
    63 +ramdisk_addr_r=0x03500000
  • Please register or sign in to reply
    Loading