Ramips with kernel 6.1

Hello.
A few weeks ago, ramips (main snapshot) allowed testing kernel 6.1. A week ago it has been set as default. Since than, only the mt7620 subtarget has been updated. All other subtargets (including the notorious mt7621) have not been updated, and so are still stuck to kernel 5.15.
I have been able to compile succesfully several mt7621 images with kernel 6.1 during the last weeks. There is no compiling error, and the images all worked.
Is there any issue in the building system? I remember a case about 6 months ago due to an issue in priority ranking between all compiling tasks.

2 Likes

Reason is that buildbots failed building 6.1 for mt7621 at least, that is why no updated images are available.

2 Likes

Any idea why? (a log for example).
Compiling images with the building system is working, that's why it's buzzing me.

Here you go https://buildbot.openwrt.org/images/#/builders/61

2 Likes

Ok found.
Apparently the image building fails for a few devices (in mt7621), so the whole process of the subtarget is failing. I'm using a device (R6220) which is not in the culprit ones, that's why I can build manually.
Thank you.

1 Like

WARNING: Image file /builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_re350-v1-squashfs-sysupgrade.bin is too big: > 6160384

Sadly that device has a flash partition layout which constrains image size significantly more than most 8MB devices. At a guess, if support for it is to be retained it will need to be in a separate "tiny" mt7621 profile especially with the probable adoption of the 6.6 kernel for the next stable release... IIRC mt76x8 has already been made "tiny" for similar reasons (though there are a couple of 16MB flash mt76x8 devices, all the rest are 8MB flash).

1 Like

So we have to wait a few days for the blocker issue be resolved?

...(actual $(stat -c%s /builder/shared-workdir/build/build_dir/target-mips
l_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-ubnt_edgerouter-x-initramfs-kernel.bin); max 3145728)" >&2; fi
WARNING: initramfs kernel image too big, cannot generate factory image (actual 5840617; max 3145728)

Interestingly, when I compile this image, adding only LuCi, this error does not occur. Maybe there are too many additional packages.

I don't see this device in the latest log (but it was the first one I noticed in previous logs).
Actually failing devices are : tplink,tl-wpa8631p-v3 (8MB) ; ubnt_unifi-6-lite (32MB); rostelecom_rt-sf-1 (256MB) ; zyxel_wsm20 (128MB).
There are various flash memory sizes, I can't tell how much are reality usable on each device, or if there is another reason. Sure that the wpa8631 with 8MB is a bottleneck.

Well, building all targets locally doesnt reproduce the too big image issue at all

2 Likes

However, the problem probably lies with the packages themselves and not with the initramfs kernel images. For example, I found an error in the compilation of PF_RING and the length of the sa_data variable. In the meantime, a patch was created https://github.com/openwrt/packages/commit/c3a50a9fac8f9d8665f8b012abd85bb9e461e865
I discovered that carl9170 doesn't compile either:

Building backport-include/backport/autoconf.h ... done.
  CC [M]  /root/work.new/6.6-ramips/openwrt/build_dir/target-mipsel_74kc_musl/linux-ramips_rt3883/mac80211-regular/backports-6.6.15/drivers/net/wireless/ath/carl9170/tx.o
In file included from ./include/linux/string.h:293,
                 from /root/work.new/6.6-ramips/openwrt/build_dir/target-mipsel_74kc_musl/linux-ramips_rt3883/mac80211-regular/backports-6.6.15/backport-include/linux/string.h:3,
                 from ./include/linux/bitmap.h:11,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/mips/include/asm/processor.h:15,
                 from ./arch/mips/include/asm/thread_info.h:16,
                 from ./include/linux/thread_info.h:60,
                 from ./include/asm-generic/preempt.h:5,
                 from ./arch/mips/include/generated/asm/preempt.h:1,
                 from ./include/linux/preempt.h:79,
                 from ./include/linux/spinlock.h:56,
                 from /root/work.new/6.6-ramips/openwrt/build_dir/target-mipsel_74kc_musl/linux-ramips_rt3883/mac80211-regular/backports-6.6.15/backport-include/linux/spinlock.h:3,
                 from ./include/linux/mmzone.h:8,
                 from ./include/linux/gfp.h:7,
                 from /root/work.new/6.6-ramips/openwrt/build_dir/target-mipsel_74kc_musl/linux-ramips_rt3883/mac80211-regular/backports-6.6.15/backport-include/linux/gfp.h:3,
                 from ./include/linux/slab.h:15,
                 from /root/work.new/6.6-ramips/openwrt/build_dir/target-mipsel_74kc_musl/linux-ramips_rt3883/mac80211-regular/backports-6.6.15/backport-include/linux/slab.h:3,
                 from /root/work.new/6.6-ramips/openwrt/build_dir/target-mipsel_74kc_musl/linux-ramips_rt3883/mac80211-regular/backports-6.6.15/drivers/net/wireless/ath/carl9170/tx.c:40:
In function 'fortify_memset_chk',
    inlined from 'carl9170_tx_release' at /root/work.new/6.6-ramips/openwrt/build_dir/target-mipsel_74kc_musl/linux-ramips_rt3883/mac80211-regular/backports-6.6.15/drivers/net/wireless/ath/carl9170/tx.c:283:2,
    inlined from 'kref_put' at ./include/linux/kref.h:65:3,
    inlined from 'carl9170_tx_put_skb' at /root/work.new/6.6-ramips/openwrt/build_dir/target-mipsel_74kc_musl/linux-ramips_rt3883/mac80211-regular/backports-6.6.15/drivers/net/wireless/ath/carl9170/tx.c:342:9:
./include/linux/fortify-string.h:314:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  314 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

A Build is running presently, I'm monitoring it.
EDIT : build just failed for the tplink_tl-wpa8631p-v3

echo '{  "metadata_version": "1.1", "compat_version": "1.1", "compat_message": "Config cannot be migrated from swconfig to DSA", "new_supported_devices": ["tplink,tl-wpa8631p-v3"], "supported_devices": ["tplink,tl-wpa8631p-v3 - Image version mismatch: image 1.1, device 1.0. Please wipe config during upgrade (force required) or reinstall. Reason: Config cannot be migrated from swconfig to DSA"],  "version": { "dist": "OpenWrt", "version": "SNAPSHOT", "revision": "r25589-f84ed09d2c", "target": "ramips/mt7621", "board": "tplink_tl-wpa8631p-v3" } }' | fwtool -I - /builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_tl-wpa8631p-v3-squashfs-sysupgrade.bin
make[4]: *** [Makefile:235: /builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-ubnt_edgerouter-x-squashfs-sysupgrade.bin] Error 1
make[4]: *** Waiting for unfinished jobs....
[ ! -s "/builder/shared-workdir/build/key-build" -o ! -s "/builder/shared-workdir/build/key-build.ucert" -o ! -s "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_re650-v2-squashfs-sysupgrade.bin" ] || { cp "/builder/shared-workdir/build/key-build.ucert" "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_re650-v2-squashfs-sysupgrade.bin.ucert" ; usign -S -m "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_re650-v2-squashfs-sysupgrade.bin" -s "/builder/shared-workdir/build/key-build" -x "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_re650-v2-squashfs-sysupgrade.bin.sig" ; ucert -A -c "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_re650-v2-squashfs-sysupgrade.bin.ucert" -x "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_re650-v2-squashfs-sysupgrade.bin.sig" ; fwtool -S "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_re650-v2-squashfs-sysupgrade.bin.ucert" "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_re650-v2-squashfs-sysupgrade.bin" ; }
Premature end of file
Unable to load signature file: No such file or directory
sha256sum "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_tl-wpa8631p-v3-squashfs-sysupgrade.bin" | cut -d" " -f1 > "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_tl-wpa8631p-v3-squashfs-sysupgrade.bin.sha256sum"
[ ! -s "/builder/shared-workdir/build/key-build" -o ! -s "/builder/shared-workdir/build/key-build.ucert" -o ! -s "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_tl-wpa8631p-v3-squashfs-sysupgrade.bin" ] || { cp "/builder/shared-workdir/build/key-build.ucert" "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_tl-wpa8631p-v3-squashfs-sysupgrade.bin.ucert" ; usign -S -m "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_tl-wpa8631p-v3-squashfs-sysupgrade.bin" -s "/builder/shared-workdir/build/key-build" -x "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_tl-wpa8631p-v3-squashfs-sysupgrade.bin.sig" ; ucert -A -c "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_tl-wpa8631p-v3-squashfs-sysupgrade.bin.ucert" -x "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_tl-wpa8631p-v3-squashfs-sysupgrade.bin.sig" ; fwtool -S "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_tl-wpa8631p-v3-squashfs-sysupgrade.bin.ucert" "/builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-tplink_tl-wpa8631p-v3-squashfs-sysupgrade.bin" ; }
Premature end of file
Unable to load signature file: No such file or directory
make[4]: Leaving directory '/builder/shared-workdir/build/target/linux/ramips/image'
make[3]: Leaving directory '/builder/shared-workdir/build/target/linux/ramips'
make[3]: *** [Makefile:22: install] Error 2
make[2]: *** [Makefile:11: install] Error 2
make[2]: Leaving directory '/builder/shared-workdir/build/target/linux'
time: target/linux/install#5169.21#320.58#1043.70
    ERROR: target/linux failed to build.
make[1]: *** [target/Makefile:32: target/linux/install] Error 1
make[1]: Leaving directory '/builder/shared-workdir/build'
make: *** [/builder/shared-workdir/build/include/toplevel.mk:233: target/install] Error 2
program finished with exit code 2
elapsedTime=1069.368248

For tplink_tl-wpa8631p-v3 the initramfs-kernel file is approximately 500KB larger. A large change prevents compilation.We should temporarily exclude devices that show errors from compilation and try to optimize the kernel size.

2 Likes

Thanks for solving with your commit ! :star_struck:
A new build is now available.

2 Likes

Thanks.

I also confirmed the firmware selector also updated, even it showed old date.

I used it to create a build just after posting. It uses the latest build, despite showing the previous one (just try).

What about the mt76x8 fix?

1 Like

... and several other subtargets too. I had a look at the log, and the error mentionned is unclear to me.

I added a fix and it has just been approved: bce7b4f

3 Likes