Skip to content

ipq40xx: switch to Kernel 5.10 - #4620

Closed
PolynomialDivision wants to merge 1 commit into
openwrt:masterfrom
PolynomialDivision:ipq40xx-5.10
Closed

PolynomialDivision wants to merge 1 commit into
openwrt:masterfrom
PolynomialDivision:ipq40xx-5.10

Conversation

@PolynomialDivision

@PolynomialDivision PolynomialDivision commented Sep 30, 2021 •

Copy link
Copy Markdown
Member

Devices I tested:

  • Fritz!Box 7530 (running for a week without any issues)
  • SXTsq 5 AC (running for a week without any issues)

@adschm adschm added kernel pull request/issue with Linux kernel related changes RFT pull request ready for testing target/ipq40xx pull request/issue for ipq40xx target labels Oct 1, 2021
@adschm

adschm commented Oct 1, 2021

Copy link
Copy Markdown
Member

Note that all of these "switch to" commits will need commit messages eventually. These drafts are only helpful to have something to discuss and build images against.

@aparcar aparcar mentioned this pull request Oct 1, 2021
35 of 38 tasks
@aparcar

aparcar commented Oct 2, 2021

Copy link
Copy Markdown
Member

@john-tho

john-tho commented Oct 2, 2021

Copy link
Copy Markdown
Contributor

I have been using ipq40xx 5.10 with out-of-tree mikrotik devices without any issues, but mine are not buildbot config.

In your CI pipeline, I can only see one ipq40xx/generic device—cellc_rtl30vw failing for image size:

KERNEL_SIZE := 4096k

mv /home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb.new /home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb
4235264 bytes (4.2 MB, 4.0 MiB) copied, 0.00838848 s, 505 MB/s
WARNING: Image file /home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb is too big: 4235264 > 4194304
cp /home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb /home/runner/work/openwrt/openwrt/openwrt/bin/targets/ipq40xx/generic/openwrt-ipq40xx-generic-cellc_rtl30vw-fit-uImage.itb
cp: cannot stat '/home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb': No such file or directory
make[4]: *** [Makefile:17: /home/runner/work/openwrt/openwrt/openwrt/bin/targets/ipq40xx/generic/openwrt-ipq40xx-generic-cellc_rtl30vw-fit-uImage.itb] Error 1

@aparcar

aparcar commented Oct 2, 2021 •

Copy link
Copy Markdown
Member

Anything we can do about that?

@PolynomialDivision

Copy link
Copy Markdown
Member Author

There seem to be issues with the mikrotik subtarget: https://github.com/aparcar/openwrt/actions/runs/1296535398

It looks like generic has issues?

btw: I updatet the PR and removed the part where I deleted all 5.4 stuff.

@PolynomialDivision

Copy link
Copy Markdown
Member Author

I don't have any issues building generic device with my normal buildroot.

@xabolcs

xabolcs commented Oct 2, 2021

Copy link
Copy Markdown
Contributor

Anything we can do about that?

@CHKDSK88 (@obsy ) do you have that device? Do you know anything about that 4096 K kernel size limit?
Tips for workaround? Does that device support lzma compression? Or zImage kernel type?

@obsy

obsy commented Oct 2, 2021

Copy link
Copy Markdown
Contributor

No, I don't have device anymore.

@adschm

adschm commented Oct 2, 2021

Copy link
Copy Markdown
Member

There was a whole bunch of devices that failed during full build, just look at my commit message here:
7b1fa27

There is probably at least one more of them ...

@adschm

adschm commented Oct 2, 2021

Copy link
Copy Markdown
Member

Apart from that, testing support has been out for 7 days. I think we should give this one or two months before we switch.

@aparcar

aparcar commented Oct 3, 2021

Copy link
Copy Markdown
Member

Apart from that, testing support has been out for 7 days. I think we should give this one or two months before we switch.

Fine with me, this PR is mostly to collect feedback and create an overview.

@aparcar
aparcar requested a review from ynezz October 3, 2021 05:52
@adschm

This comment has been minimized.

@xabolcs

xabolcs commented Oct 4, 2021 •

Copy link
Copy Markdown
Contributor

There was a whole bunch of devices that failed during full build, just look at my commit message here:
7b1fa27

GL-iNet GL-B1300 is on the list.

And it looks like with it's first version of U-Boot (U-Boot 2012.07 [Chaos Calmer 15.05.1,r35193] (Apr 13 2018 - 13:54:46)) it does have boot problems indeed: it's unable to start OpenWrt, just restarts. (No serial access for now)

Debrick via U-Boot works.

Once I get serial access, I will test newer vendor U-Boot releases.

(For the record, I already notified / asked the vendor about this KERNEL_SIZE:= problem)


Good news!
Device/FitzImage boots nicely (and Device/FitImageLzma doesn't) with the original, 2018 dated U-Boot.

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.64 (xabolcs@ut2004) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r17630+8-6cd54254e4) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Thu Sep 30 21:07:31 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
[    0.000000] Memory policy: Data cache writealloc
...
[    0.752218] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    0.755236] spi-nor spi0.0: mx25l25635e (32768 Kbytes)
[    0.760435] 9 fixed-partitions partitions found on MTD device spi0.0
[    0.765349] Creating 9 MTD partitions on "spi0.0":
[    0.771831] 0x000000000000-0x000000040000 : "SBL1"
[    0.777055] 0x000000040000-0x000000060000 : "MIBIB"
[    0.781696] 0x000000060000-0x0000000c0000 : "QSEE"
[    0.786516] 0x0000000c0000-0x0000000d0000 : "CDT"
[    0.791332] 0x0000000d0000-0x0000000e0000 : "DDRPARAMS"
[    0.796163] 0x0000000e0000-0x0000000f0000 : "APPSBLENV"
[    0.801143] 0x0000000f0000-0x000000170000 : "APPSBL"
[    0.806412] 0x000000170000-0x000000180000 : "ART"
[    0.811631] 0x000000180000-0x000002000000 : "firmware"
[    0.816590] 2 fit-fw partitions found on MTD device firmware
[    0.820701] Creating 2 MTD partitions on "firmware":
[    0.826567] 0x000000000000-0x0000002d0000 : "kernel"
[    0.831949] 0x0000002c3820-0x000001e80000 : "rootfs"
[    0.836443] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[    0.841801] mtd: device 10 (rootfs) set to be root filesystem
[    0.850736] 1 squashfs-split partitions found on MTD device rootfs
[    0.856254] 0x000000d60000-0x000001e80000 : "rootfs_data"
[    0.868311] libphy: Fixed MDIO Bus: probed
[    0.869103] libphy: ipq4019_mdio: probed
[    0.903046] ESS reset ok!
...

Log of FIT generating with buildbot settings and all feeds installed:

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:  uncompressed
  Data Size:    2979160 Bytes = 2909.34 KiB = 2.84 MiB
  Architecture: ARM
  OS:           Linux
  Load Address: 0x80208000
  Entry Point:  0x80208000
  Hash algo:    crc32
  Hash value:   1d869754
  Hash algo:    sha1
  Hash value:   6d45e38f2b4e3e87214029961fad53d48543c46e
 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

And the oneliners:

diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 18f5d238c7..e0cfa07541 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -495,7 +495,7 @@ endef
 TARGET_DEVICES += glinet_gl-ap1300
 
 define Device/glinet_gl-b1300
-       $(call Device/FitImage)
+       $(call Device/FitzImage)
        DEVICE_VENDOR := GL.iNet
        DEVICE_MODEL := GL-B1300
        BOARD_NAME := gl-b1300
@@ -507,7 +507,7 @@ endef
 TARGET_DEVICES += glinet_gl-b1300
 
 define Device/glinet_gl-s1300
-       $(call Device/FitImage)
+       $(call Device/FitzImage)
        DEVICE_VENDOR := GL.iNet
        DEVICE_MODEL := GL-S1300
        SOC := qcom-ipq4029

5.10.70 (r17675-ed7769aa40) + custom config + zImage: 👌

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.70 (xabolcs@ut2004) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r17675-ed7769aa40) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Sun Oct 3 19:48:16 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
...

@adschm

adschm commented Oct 8, 2021

Copy link
Copy Markdown
Member

@xabolcs It would probably be best if you open a separate PR for this when it's ready.

@xabolcs

xabolcs commented Oct 8, 2021

Copy link
Copy Markdown
Contributor

... when it's ready.

Hi @adschm , should I test (and include the results to the commit message) the newer vendor U-Boot releases (do they work with 4M+ kernels, do they work with zImage)? Would it be nice to include serial logs?

@xabolcs

xabolcs commented Oct 8, 2021 •

Copy link
Copy Markdown
Contributor

GL.iNet GL-B1300 vs. KERNEL_SIZE := 4096k

Now I have serial access ... now I have problems: can't reproduce 🙈

U-Boot 2012.07 [Chaos Calmer 15.05.1,r35193] (Apr 13 2018 - 13:54:46)
...
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.70
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x840000e4
     Data Size:    4214973 Bytes = 4 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80208000
     Entry Point:  0x80208000
     Hash algo:    crc32
     Hash value:   0ac6a08a
     Hash algo:    sha1
     Hash value:   5c3088fa1787a06daa1fab97ff060791bdbb2dbf
   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:   0x844052e0
     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 0x844052e0
   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.70 (builder@buildhost) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r17693-c2222f74c8) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Fri Oct 8 00:09:40 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

This is already a buildbot config + all user packages build ... it's over 4096k and it's still booting. 😅
How do I will explode the kernel size (while using gzip compression) ... hacking the Build/gzip recipe!


gzip -1 produces a 4561381 bytes (0x004599E5) sized kernel, it doesn't boot:

SF: Detected MX25L25635E with page size 4 KiB, total 32 MiB
Config not availabale
resetting ...

gzip -2 produces a 4477469 bytes (0x0044521D, padded to 0x00450000) sized kernel, and it does boot:

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.70
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x840000e4
     Data Size:    4477469 Bytes = 4.3 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80208000
     Entry Point:  0x80208000
     Hash algo:    crc32
     Hash value:   062c42b3
     Hash algo:    sha1
     Hash value:   0996bfd98a3af14c3e438f3c7a7b80de7baa18b1
   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:   0x84445440
     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 0x84445440
   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.70 (builder@buildhost) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r17693-c2222f74c8) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Fri Oct 8 00:09:40 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
...
[    0.829274] Creating 2 MTD partitions on "firmware":
[    0.835049] 0x000000000000-0x000000450000 : "kernel"
[    0.840522] 0x000000449948-0x000001e80000 : "rootfs"
[    0.844940] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[    0.850432] mtd: device 10 (rootfs) set to be root filesystem
[    0.859241] 1 squashfs-split partitions found on MTD device rootfs
[    0.864749] 0x000000760000-0x000001e80000 : "rootfs_data"

So the KERNEL_SIZE limit would be 0x004500 = 4416k for U-Boot 2012.07 [Chaos Calmer 15.05.1,r35193] (Apr 13 2018 - 13:54:46)?
Let me try the newer U-Boots.


Tested all the combinations ... :

vendor U-Boot date oversized gzip uImage lzma uImage zImage
Apr 13 2018 - 13:54:46 ❌ (after U-Boot upgrade/downgrade) Config not availabale ❌ Unimplemented compression type 3 ✔️
Sep 01 2019 - 16:25:43 ❌ Config not availabale ❌ --||-- ✔️
Mar 24 2021 - 17:28:16 ❌ --||-- ❌ --||-- ✔️
Jul 05 2021 - 17:42:35 ❌ --||-- ❌ --||-- ✔️

Summarizing:

  • the KERNEL_SIZE := 4096k limit doesn't need any update
  • zImage (recipe Device/FitzImage) does work and saves ~1200k (4116k -> 2909k)

It would probably be best if you ...

@adschm , sure! Will do at the weekend.

xabolcs added a commit to xabolcs/openwrt that referenced this pull request Oct 10, 2021
In the "ipq40xx: switch to Kernel 5.10" discussion at GitHub,
Adrian noted [0] that these GL.iNet Conexa series devices,
GL-B1300 and GL-S1300 failed their image generation [1] as their gzipped
uImage kernel went above 4096k.

While notifying the vendor about this problem [2], I tested all U-Boot
releases from GL.iNet:
- they really fail to boot kernel above 4096k
- they don't support lzma: "Unimplemented compression type 3"
- but they boot zImage

Using zImage (xz compression) the kernel is 2909k which is
more than a megabyte away from the KERNEL_SIZE := 4096k limit.

The gzip compressed version would be 4116k.

[0]: openwrt#4620 (comment)
[1]: commit 7b1fa27 ("ipq40xx: add testing support for kernel 5.10")
[2]: https://forum.gl-inet.com/t/ipq40xx-kernel-size-and-u-boot-v5-10-is-too-big-for-4-mb/17619

Signed-off-by: Szabolcs Hubai <[email protected]>
jow- pushed a commit that referenced this pull request Oct 10, 2021
In the "ipq40xx: switch to Kernel 5.10" discussion at GitHub,
Adrian noted [0] that these GL.iNet Conexa series devices,
GL-B1300 and GL-S1300 failed their image generation [1] as their gzipped
uImage kernel went above 4096k.

While notifying the vendor about this problem [2], I tested all U-Boot
releases from GL.iNet:
- they really fail to boot kernel above 4096k
- they don't support lzma: "Unimplemented compression type 3"
- but they boot zImage

Using zImage (xz compression) the kernel is 2909k which is
more than a megabyte away from the KERNEL_SIZE := 4096k limit.

The gzip compressed version would be 4116k.

[0]: #4620 (comment)
[1]: commit 7b1fa27 ("ipq40xx: add testing support for kernel 5.10")
[2]: https://forum.gl-inet.com/t/ipq40xx-kernel-size-and-u-boot-v5-10-is-too-big-for-4-mb/17619

Signed-off-by: Szabolcs Hubai <[email protected]>
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this pull request Oct 11, 2021
In the "ipq40xx: switch to Kernel 5.10" discussion at GitHub,
Adrian noted [0] that these GL.iNet Conexa series devices,
GL-B1300 and GL-S1300 failed their image generation [1] as their gzipped
uImage kernel went above 4096k.

While notifying the vendor about this problem [2], I tested all U-Boot
releases from GL.iNet:
- they really fail to boot kernel above 4096k
- they don't support lzma: "Unimplemented compression type 3"
- but they boot zImage

Using zImage (xz compression) the kernel is 2909k which is
more than a megabyte away from the KERNEL_SIZE := 4096k limit.

The gzip compressed version would be 4116k.

[0]: openwrt#4620 (comment)
[1]: commit 7b1fa27 ("ipq40xx: add testing support for kernel 5.10")
[2]: https://forum.gl-inet.com/t/ipq40xx-kernel-size-and-u-boot-v5-10-is-too-big-for-4-mb/17619

Signed-off-by: Szabolcs Hubai <[email protected]>
@adschm

adschm commented Oct 19, 2021

Copy link
Copy Markdown
Member

@john-tho Will we face the 4k sector problems here with 5.10?

@john-tho

john-tho commented Oct 19, 2021 •

Copy link
Copy Markdown
Contributor

No 4k sector problems for the ipq40xx_mikrotik subtarget.
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y was not used there.
Cheers

@robimarko

Copy link
Copy Markdown
Contributor

@adschm I tried building all devices in ipq40xx with 5.10 and none of them failed to build.

Buildbot settings with all feeds installed?

Well, I enabled:
CONFIG_TARGET_MULTI_PROFILE
CONFIG_TARGET_PER_DEVICE_ROOTFS
CONFIG_TARGET_ALL_PROFILES

I dont see anything else relevant
I have all of the default feeds updated and installed of course.

@adschm

adschm commented Oct 27, 2021

Copy link
Copy Markdown
Member

@adschm I tried building all devices in ipq40xx with 5.10 and none of them failed to build.

Buildbot settings with all feeds installed?

Well, I enabled: CONFIG_TARGET_MULTI_PROFILE CONFIG_TARGET_PER_DEVICE_ROOTFS CONFIG_TARGET_ALL_PROFILES

I dont see anything else relevant I have all of the default feeds updated and installed of course.

Buildbots have CONFIG_BUILDBOT=y which enables further symbols, in particular

CONFIG_ALL_KMODS=y
CONFIG_ALL_NONSHARED=y

This will increase kernel size as several of these packages enable kernel symbols with "=y". As a consequence, the buildbot kernel typically is a few 100 kiB bigger than the one with default settings. And of course, my criterion to merge this is whether or not the buildbots will fail afterwards.

@robimarko

Copy link
Copy Markdown
Contributor

@adschm Enabled CONFIG_BUILDBOT=y and even CONFIG_COLLECT_KERNEL_DEBUG and I don't see any build errors at all.

@adschm

adschm commented Oct 27, 2021

Copy link
Copy Markdown
Member

@adschm Enabled CONFIG_BUILDBOT=y and even CONFIG_COLLECT_KERNEL_DEBUG and I don't see any build errors at all.

Okay, I'll retry.

@aparcar

aparcar commented Oct 28, 2021 •

Copy link
Copy Markdown
Member

My CI builds fine as well using the Buildbot settings (nevermind the MacOS failure): https://github.com/aparcar/openwrt/actions/runs/1387549572

@adschm

adschm commented Oct 30, 2021

Copy link
Copy Markdown
Member

My CI builds fine as well using the Buildbot settings (nevermind the MacOS failure): https://github.com/aparcar/openwrt/actions/runs/1387549572

Then it's probably just a build problem on my side.

@xabolcs

xabolcs commented Oct 30, 2021 •

Copy link
Copy Markdown
Contributor

@aparcar

My CI builds fine as well using the Buildbot settings ...

I don't see 5.10 kmods in the downloadable artifact. The diff does not have the change from this PR, and the "Set configuration" step doesn't list related config.

How does that CI build relates to this PR?

@PolynomialDivision

PolynomialDivision commented Nov 2, 2021 •

Copy link
Copy Markdown
Member Author

I'm already building ipq40xx images with DSA support (that needs 5.10) kernel. Whats blocking this PR?
https://github.com/PolynomialDivision/openwrt/actions

@aparcar

aparcar commented Nov 3, 2021

Copy link
Copy Markdown
Member

How does that CI build relates to this PR?

@xabolcs Good catch, you're right! It wasn't in my staging tree and therefore build the Kernel 5.4 - thanks! Building with 5.10 results in breakage: https://github.com/aparcar/openwrt/runs/4085044480?check_suite_focus=true

mv /home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb.new /home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb
WARNING: Image file /home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb is too big: 4237312 > 4194304
cp /home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb /home/runner/work/openwrt/openwrt/openwrt/bin/targets/ipq40xx/generic/openwrt-ipq40xx-generic-cellc_rtl30vw-fit-uImage.itb
cp: cannot stat '/home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb': No such file or directory
make[4]: *** [Makefile:17: /home/runner/work/openwrt/openwrt/openwrt/bin/targets/ipq40xx/generic/openwrt-ipq40xx-generic-cellc_rtl30vw-fit-uImage.itb] Error 1
make[4]: Leaving directory '/home/runner/work/openwrt/openwrt/openwrt/target/linux/ipq40xx/image'
make[3]: *** [Makefile:24: install] Error 2
make[3]: Leaving directory '/home/runner/work/openwrt/openwrt/openwrt/target/linux/ipq40xx'
make[2]: *** [Makefile:11: install] Error 2
make[2]: Leaving directory '/home/runner/work/openwrt/openwrt/openwrt/target/linux'
time: target/linux/install#342.14#37.42#357.94
    ERROR: target/linux failed to build.
make[1]: *** [target/Makefile:25: target/linux/install] Error 1
make[1]: Leaving directory '/home/runner/work/openwrt/openwrt/openwrt'
make: *** [/home/runner/work/openwrt/openwrt/openwrt/include/toplevel.mk:230: target/install] Error 2
Error: Process completed with exit code 2.

@adschm

adschm commented Nov 3, 2021

Copy link
Copy Markdown
Member

How does that CI build relates to this PR?

@xabolcs Good catch, you're right! It wasn't in my staging tree and therefore build the Kernel 5.4 - thanks! Building with 5.10 results in breakage: https://github.com/aparcar/openwrt/runs/4085044480?check_suite_focus=true

mv /home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb.new /home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb
WARNING: Image file /home/runner/work/openwrt/openwrt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/cellc_rtl30vw-fit-uImage.itb is too big: 4237312 > 4194304

So, is there a comfortable way to identify all devices not building without having to individually disable and rebuild until it works?

@robimarko

Copy link
Copy Markdown
Contributor

I still don't understand why it builds locally for me just fine with the buildbot config, I dont get a single too large error.

@adschm

adschm commented Nov 3, 2021 •

Copy link
Copy Markdown
Member

I still don't understand why it builds locally for me just fine with the buildbot config, I dont get a single too large error.

Size is exceeded only by 43 kB. If you have feeds installed and build-settings as you stated, maybe there is one or two additional options that reduze size again below the threshold?

What I do for testing in these cases is quite trivial:

/scripts/feeds update
/scripts/feeds install -a

rm -rf tmp
rm .config

make menuconfig
-> Select target, select subtarget, select build-bot settings option (Can't look it up now)
-> Deselect SDK, imagebuilder, external toolchain

(make dirclean if required, might require doing make menuconfig again)
make clean

make -j10

@robimarko

Copy link
Copy Markdown
Contributor

Yeah, I cleaned everything up in my env today.
And just enabled the CONFIG_TESTING_KERNEL and CONFIG_BUILDBOT and I hit the size issue now, so it was the dirty env and config kind of issue.

I don't know where can we save the additional 43kB, even if it squeeze it now it's gonna pop up back in a couple of months.
Cellc rtl30vw already uses LZMA so we can't really compress the kernel further.

@adschm

adschm commented Nov 3, 2021

Copy link
Copy Markdown
Member

Yeah, I cleaned everything up in my env today. And just enabled the CONFIG_TESTING_KERNEL and CONFIG_BUILDBOT and I hit the size issue now, so it was the dirty env and config kind of issue.

I don't know where can we save the additional 43kB, even if it squeeze it now it's gonna pop up back in a couple of months. Cellc rtl30vw already uses LZMA so we can't really compress the kernel further.

My plan actually is to bump ASAP, disable all affected devices, and then wait for people to make them work again.

But this requires quite some time, so I haven't done it yet. If somebody likes to identify all affected devices, please do so.

@adschm

adschm commented Nov 3, 2021 •

Copy link
Copy Markdown
Member

@aparcar How hard would it be to set up a CI that builds all devices one-by-one? I.e.

  1. Setup/update feeds, setup config with buildbot, but only enable the first device (still multi_profile)
  2. Build it
  3. make clean
  4. Select the next device, keep everything else
  5. make
  6. Repeat 3 to 5 for all devices

?

(One wouldn't even have to track build status, just look which sysupgrade files are found in the bin dir afterwards)

@robimarko

Copy link
Copy Markdown
Contributor

@adschm I manually went and disabled the devices that were falling.
Here is the patch that disables them:
sartura@09a201b

@adschm

adschm commented Nov 3, 2021

Copy link
Copy Markdown
Member

@robimarko Thanks. Can I use (=merge) that patch as-is if the target builds with that and 5.10?

@robimarko

Copy link
Copy Markdown
Contributor

Sure, that is why I shared it.

@xabolcs

xabolcs commented Nov 3, 2021

Copy link
Copy Markdown
Contributor

@adschm , but please don't disable those glinet devices!

@adschm

adschm commented Nov 3, 2021

Copy link
Copy Markdown
Member

Merged.

Thanks for helping me out here ...

@adschm adschm closed this Nov 3, 2021
@CHKDSK88

CHKDSK88 commented Nov 5, 2021

Copy link
Copy Markdown
Contributor

I prepared switch to zImage for Cell-C:
#4751

aiamadeus pushed a commit to immortalwrt/immortalwrt that referenced this pull request Feb 8, 2022
In the "ipq40xx: switch to Kernel 5.10" discussion at GitHub,
Adrian noted [0] that these GL.iNet Conexa series devices,
GL-B1300 and GL-S1300 failed their image generation [1] as their gzipped
uImage kernel went above 4096k.

While notifying the vendor about this problem [2], I tested all U-Boot
releases from GL.iNet:
- they really fail to boot kernel above 4096k
- they don't support lzma: "Unimplemented compression type 3"
- but they boot zImage

Using zImage (xz compression) the kernel is 2909k which is
more than a megabyte away from the KERNEL_SIZE := 4096k limit.

The gzip compressed version would be 4116k.

[0]: openwrt/openwrt#4620 (comment)
[1]: commit 7b1fa27 ("ipq40xx: add testing support for kernel 5.10")
[2]: https://forum.gl-inet.com/t/ipq40xx-kernel-size-and-u-boot-v5-10-is-too-big-for-4-mb/17619

Signed-off-by: Szabolcs Hubai <[email protected]>
@aparcar aparcar mentioned this pull request Feb 9, 2022
38 tasks done
smallpotatochips pushed a commit to smallpotatochips/pr that referenced this pull request Aug 18, 2025
Upstream in commit 81d694e ("ipq40xx: use zImage for GL.iNet
GL-B1300, GL-S1300 to shrink below 4096k") has changed the compression
type of kernel in order to overcome bootloader kernel size constraint of
4M.

References: openwrt/openwrt#4620 (comment)
Signed-off-by: Petr Štetiar <[email protected]>
smallpotatochips pushed a commit to smallpotatochips/pr that referenced this pull request Aug 18, 2025
Upstream in commit 81d694e ("ipq40xx: use zImage for GL.iNet
GL-B1300, GL-S1300 to shrink below 4096k") has changed the compression
type of kernel in order to overcome bootloader kernel size constraint of
4M.

References: openwrt/openwrt#4620 (comment)
Signed-off-by: Petr Štetiar <[email protected]>
smallpotatochips pushed a commit to smallpotatochips/pr that referenced this pull request Aug 18, 2025
Upstream in commit 81d694e ("ipq40xx: use zImage for GL.iNet
GL-B1300, GL-S1300 to shrink below 4096k") has changed the compression
type of kernel in order to overcome bootloader kernel size constraint of
4M.

References: openwrt/openwrt#4620 (comment)
Signed-off-by: Petr Štetiar <[email protected]>
smallpotatochips pushed a commit to smallpotatochips/pr that referenced this pull request Aug 18, 2025
Upstream in commit 81d694e ("ipq40xx: use zImage for GL.iNet
GL-B1300, GL-S1300 to shrink below 4096k") has changed the compression
type of kernel in order to overcome bootloader kernel size constraint of
4M.

References: openwrt/openwrt#4620 (comment)
Signed-off-by: Petr Štetiar <[email protected]>
DarssiniRamesh pushed a commit to DarssiniRamesh/prplwrt that referenced this pull request Nov 12, 2025
Upstream in commit 81d694e ("ipq40xx: use zImage for GL.iNet
GL-B1300, GL-S1300 to shrink below 4096k") has changed the compression
type of kernel in order to overcome bootloader kernel size constraint of
4M.

References: openwrt/openwrt#4620 (comment)
Signed-off-by: Petr Štetiar <[email protected]>
LuisMitaHL pushed a commit to LuisMitaHL/LooperWrt that referenced this pull request Sep 21, 2026
In the "ipq40xx: switch to Kernel 5.10" discussion at GitHub,
Adrian noted [0] that these GL.iNet Conexa series devices,
GL-B1300 and GL-S1300 failed their image generation [1] as their gzipped
uImage kernel went above 4096k.

While notifying the vendor about this problem [2], I tested all U-Boot
releases from GL.iNet:
- they really fail to boot kernel above 4096k
- they don't support lzma: "Unimplemented compression type 3"
- but they boot zImage

Using zImage (xz compression) the kernel is 2909k which is
more than a megabyte away from the KERNEL_SIZE := 4096k limit.

The gzip compressed version would be 4116k.

[0]: openwrt#4620 (comment)
[1]: commit 5fade31 ("ipq40xx: add testing support for kernel 5.10")
[2]: https://forum.gl-inet.com/t/ipq40xx-kernel-size-and-u-boot-v5-10-is-too-big-for-4-mb/17619

Signed-off-by: Szabolcs Hubai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel pull request/issue with Linux kernel related changes RFT pull request ready for testing target/ipq40xx pull request/issue for ipq40xx target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants