Hi!

Thank you very much for the fix!

Sadly I’m unable to verify smeminfo because my serial connection doesn’t send anything to the device! :upside_down_face:

I tested the newest U-Boot release (U-Boot 2012.07 [local,local] (Oct 21 2021 - 18:08:35)) with an oversized, ~10 MB kernel, and it doesn’t boot: :heavy_check_mark:

FIT description: ARM OpenWrt FIT (Flattened Image Tree)
Created:         Sat Oct 23 11:31:22 2021
 Image 0 (kernel-1)
  Description:  ARM OpenWrt Linux-5.4.155
  Created:      Sat Oct 23 11:31:22 2021
  Type:         Kernel Image
  Compression:  uncompressed
  Data Size:    10642944 Bytes = 10393.50 KiB = 10.15 MiB
  Architecture: ARM
  OS:           Linux
  Load Address: 0x80208000
  Entry Point:  0x80208000
  Hash algo:    crc32
  Hash value:   7da27167
  Hash algo:    sha1
  Hash value:   d4b09f29fe908dd33f2962933c3bdc9f2243e279
 Image 1 (fdt-1)
  Description:  ARM OpenWrt glinet_gl-b1300 device tree blob
  Created:      Sat Oct 23 11:31:22 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

After that, I checked a 4+ MB kernel: boots nicely! :heavy_check_mark:

SF: Detected MX25L25635E with page size 4 KiB, total 32 MiB
## Booting kernel from FIT Image at 84000000 ...
   Using 'config@1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM OpenWrt Linux-5.10.75
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x840000e4
     Data Size:    4561994 Bytes = 4.4 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80208000
     Entry Point:  0x80208000
     Hash algo:    crc32
     Hash value:   2242d08b
     Hash algo:    sha1
     Hash value:   83becb3c9130f7054e2cd880dd442fecb073890b
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Flattened Device Tree from FIT Image at 84000000
   Using 'config@1' configuration
   Trying 'fdt-1' FDT blob subimage
     Description:  ARM OpenWrt glinet_gl-b1300 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x84459e6c
     Data Size:    16326 Bytes = 15.9 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   303d4ba2
     Hash algo:    sha1
     Hash value:   0dbf495a0c42dfbc3ff5a3ebe4dc3f456ad91aed
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x84459e6c
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 86ff9000, end 86ffffc5 ... OK
ipq: fdt fixup unable to find compatible node
Using machid 0x8010000 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.75 (xabolcs@ut2004) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r17816-94c41ef2ef) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Sat Oct 23 11:31:22 2021
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: GL.iNet GL-B1300

Your commit message is:

 fix boot kernel lager than 4MB, maximum 8MB 

Is this true for all the ipq-40xx devices: GL-AP1300, GL-B1300, GL-S1300 and GL-B2200?

I’m asking this, because I’d like to create an OpenWrt commit where all these devices get an KERNEL_SIZE := 8192k limit, to prevent the devices from unnecessary boot loop.

Another question: all these devices support booting an uncompressed image? I know GL-B1300 and GL-B2200 work for sure.
I’m asking this, because I’d like to switch the remaining devices to use zImage.