Ipq40xx kernel size and U-Boot: v5.10 is too big for 4 MB

Kernel v5.10 support for ipq40xx was landed in OpenWrt for testing purposes.

As can be seen in the commit message, two GL.iNet devices failed to build with buildbot settings and all
feeds installed, for example:

FIT description: ARM OpenWrt FIT (Flattened Image Tree)
Created:         Thu Sep 30 21:07:31 2021
 Image 0 (kernel-1)
  Description:  ARM OpenWrt Linux-5.10.64
  Created:      Thu Sep 30 21:07:31 2021
  Type:         Kernel Image
  Compression:  gzip compressed
  Data Size:    4212548 Bytes = 4113.82 KiB = 4.02 MiB
  Architecture: ARM
  OS:           Linux
  Load Address: 0x80208000
  Entry Point:  0x80208000
  Hash algo:    crc32
  Hash value:   54fc4207
  Hash algo:    sha1
  Hash value:   7461cdf544e7d56310807c36e394dacbc58d2acc
 Image 1 (fdt-1)
  Description:  ARM OpenWrt glinet_gl-b1300 device tree blob
  Created:      Thu Sep 30 21:07:31 2021
  Type:         Flat Device Tree
  Compression:  uncompressed
  Data Size:    16326 Bytes = 15.94 KiB = 0.02 MiB
  Architecture: ARM
  Hash algo:    crc32
  Hash value:   303d4ba2
  Hash algo:    sha1
  Hash value:   0dbf495a0c42dfbc3ff5a3ebe4dc3f456ad91aed
 Default Configuration: 'config@1'
 Configuration 0 (config@1)
  Description:  OpenWrt glinet_gl-b1300
  Kernel:       kernel-1
  FDT:          fdt-1
WARNING: Image file /openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/glinet_gl-b1300-fit-uImage.itb is too big: 4230764 > 4194304

So I had to repeat @jeffsf, but for ipq40xx, especially GL-B1300 and GL-S1300:


Looks like switching to zImage (from gzip compression) will be the solution a good workaround:

  • all the U-Boot releases support, even the initial release U-Boot 2012.07 [Chaos Calmer 15.05.1,r35193] (Apr 13 2018 - 13:54:46)
  • shrinks the kernel by ~1200k

Thanks for that solution. It’s possible to load >4MB kernel after patching uboot. I’ll do some test.

1 Like

That would be far better solution, thanks!

While testing other solutions, I was able to start oversized kernels up to 0x00450000.
After upgrading to newer versions, and rolling back to a backup of my original U-Boot (U-Boot 2012.07 [Chaos Calmer 15.05.1,r35193] (Apr 13 2018 - 13:54:46)), I wasn’t able to boot any oversized kernel. :woman_shrugging:

I happily test new binary releases and commits from that uboot-ipq40xx.

Hi Szabolcs,

I’v patch uboot to load maxium 8MB kernel. I think that’s extensible enough. you can check commit.
This patch load larger kernel than the pre-defined partition table on nor flash, partiton table can be checked by uboot command

1 Like