Linksys EA8300 firmware fails to build since latest update from openwrt-23.05 branch

Firmware for EA8300 fails to build after the latest git pull, please could you help?

Collecting package info: done
Collecting target info: done
make[2]: Entering directory '/home/user1/router/openwrt-23.05/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/user1/router/openwrt-23.05/scripts/config'
time: target/linux/prereq#0.27#0.07#0.34
Checking 'rsync'... ok.
make[1]: Entering directory '/home/user1/router/openwrt-23.05'
make[2]: Entering directory '/home/user1/router/openwrt-23.05'
make[3]: Entering directory '/home/user1/router/openwrt-23.05/target/linux'
make[4]: Entering directory '/home/user1/router/openwrt-23.05/target/linux/ipq40xx'
rm -f /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/localversion
/home/user1/router/openwrt-23.05/scripts/kconfig.pl  + /home/user1/router/openwrt-23.05/target/linux/generic/config-5.15 /home/user1/router/openwrt-23.05/target/linux/ipq40xx/config-5.15 > /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.target
awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' /home/user1/router/openwrt-23.05/.config >> /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.target
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.target
echo "# CONFIG_KALLSYMS_ALL is not set" >> /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.target
echo "CONFIG_KALLSYMS_UNCOMPRESSED=y" >> /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.target
/home/user1/router/openwrt-23.05/scripts/package-metadata.pl kconfig /home/user1/router/openwrt-23.05/tmp/.packageinfo /home/user1/router/openwrt-23.05/.config 5.15 > /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.override
/home/user1/router/openwrt-23.05/scripts/kconfig.pl 'm+' '+' /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.target /dev/null /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.override > /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.set
mv /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.set /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.old
grep -v INITRAMFS /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.old > /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.set
echo 'CONFIG_INITRAMFS_SOURCE=""' >> /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.set
echo '# CONFIG_INITRAMFS_FORCE is not set' >> /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.set
rm -rf /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/modules
cmp -s /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.set /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.prev || { cp /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.set /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config; cp /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.set /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.prev; }
export MAKEFLAGS= ; [ -d /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/user_headers ] || make -C /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147 KCFLAGS="-fmacro-prefix-map=/home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi=target-arm_cortex-a7+neon-vfpv4_musl_eabi -fno-caller-saves " HOSTCFLAGS="-O2 -I/home/user1/router/openwrt-23.05/staging_dir/host/include  -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="arm-openwrt-linux-muslgnueabi-" ARCH="arm" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Thu Feb  1 09:48:58 2024" KBUILD_BUILD_VERSION="0" KBUILD_HOSTLDFLAGS="-L/home/user1/router/openwrt-23.05/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  cmd_syscalls=  KERNELRELEASE=5.15.147 CC="arm-openwrt-linux-muslgnueabi-gcc"  INSTALL_HDR_PATH=/home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/user_headers headers_install
grep '=[ym]' /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.config.set | LC_ALL=C sort | /home/user1/router/openwrt-23.05/staging_dir/host/bin/mkhash md5 > /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.vermagic
touch /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.configured
rm -f /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/vmlinux /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/System.map
make -C /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147 KCFLAGS="-fmacro-prefix-map=/home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi=target-arm_cortex-a7+neon-vfpv4_musl_eabi -fno-caller-saves " HOSTCFLAGS="-O2 -I/home/user1/router/openwrt-23.05/staging_dir/host/include  -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="arm-openwrt-linux-muslgnueabi-" ARCH="arm" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Thu Feb  1 09:48:58 2024" KBUILD_BUILD_VERSION="0" KBUILD_HOSTLDFLAGS="-L/home/user1/router/openwrt-23.05/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  cmd_syscalls=  KERNELRELEASE=5.15.147 CC="arm-openwrt-linux-muslgnueabi-gcc" zImage Image dtbs modules
make[5]: Entering directory '/home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147'
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  CHK     include/generated/compile.h
  CC      drivers/net/phy/phy-core.o
drivers/net/phy/phy-core.c: In function 'phy_interface_num_ports':
drivers/net/phy/phy-core.c:107:9: error: enumeration value 'PHY_INTERFACE_MODE_PSGMII' not handled in switch [-Werror=switch]
  107 |         switch (interface) {
      |         ^~~~~~
cc1: all warnings being treated as errors
make[8]: *** [scripts/Makefile.build:289: drivers/net/phy/phy-core.o] Error 1
make[7]: *** [scripts/Makefile.build:552: drivers/net/phy] Error 2
make[6]: *** [scripts/Makefile.build:552: drivers/net] Error 2
make[5]: *** [Makefile:1908: drivers] Error 2
make[5]: Leaving directory '/home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147'
make[4]: *** [Makefile:24: /home/user1/router/openwrt-23.05/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.147/.modules] Error 2
make[4]: Leaving directory '/home/user1/router/openwrt-23.05/target/linux/ipq40xx'
make[3]: *** [Makefile:11: compile] Error 2
make[3]: Leaving directory '/home/user1/router/openwrt-23.05/target/linux'
time: target/linux/compile#3.50#1.01#4.46
    ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:30: target/linux/compile] Error 1
make[2]: Leaving directory '/home/user1/router/openwrt-23.05'
make[1]: *** [target/Makefile:23: /home/user1/router/openwrt-23.05/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.target_compile] Error 2
make[1]: Leaving directory '/home/user1/router/openwrt-23.05'
make: *** [/home/user1/router/openwrt-23.05/include/toplevel.mk:232: world] Error 2

This is the error:

drivers/net/phy/phy-core.c:107:9: error: enumeration value 'PHY_INTERFACE_MODE_PSGMII' not handled in switch [-Werror=switch]
  107 |         switch (interface) {
      |

I tried starting from scratch with a new git clone, etc. Sometimes it helps. In this case the error persists.

Is this going to be fixed or have we now lost support for Linksys EA8300 and MR8300?

Did you use a 23.05 stable or snapshot ?
In any case there is no "lost support", it's just a temporary error. Such thing happens from time to time, nothing to worry about.

23.05 stable as I said in the title.
To be clear:

git clone -b openwrt-23.05 https://github.com/openwrt/openwrt.git openwrt

done yesterday. I tried to update today but there are no updates since.
Build fails for my Linksys MR8300 and EA8300 (I am using different configurations for each).
Build succeeds for my other routers: Linksys EA8500, BT Home Hub 5, Netgear R7800, Asus AX4200. Build is tagged as: "r23737".

The previous update I had done was:
OpenWrt 23.05-SNAPSHOT r23728-b5c728948c / LuCI openwrt-23.05 branch git-24.006.68745-9128656

That built without errors and it is running currently on all my routers.

There are probably no updates because you checked out the tagged 23.05

To use the 23.05 snapshot I do the following:
git clone https://github.com/openwrt/openwrt.git openwrt

And then checkout openwrt-23.05 snapshot:

cd /openwrt
git checkout openwrt-23.05
git pull
./scripts/feeds update -a && ./scripts/feeds install -a

For a Main build:
git checkout master

It is exactly the same

Today there was an update, still fails to build as above.
Is anyone looking at this issue? Is there a way to report it?

I see you've raised a github issue - it appears this is a consequence of a patch backport - someone raised a comment against the commit but I have no idea whether that will get any traction; I've added a comment with this info to your issue (all ipq40xx devices are affected).

1 Like

Thank you!

It is a shame that a stable release can be broken so easily.

A fix has been committed - see the GitHub issue.

Folks:

My EA8500 (partition 1 & 2) is due for update. This time I will also have to apply kernel size fix too.

I am thinking of following step to go from V 21 to V 23.05:

  1. sysupgrade -v -F /tmp/openwrtEA8500factory.bin
  2. Powercycle and do the step 1 for second partition.
  3. sysupgrade -v /tmp/openwrtEA8500sysupgrade.bin
  4. Powercycle and do the step 3 for second partition.
  5. Instead of using old config file, manually reconfigure the router.

Do you think this will work for me? I read on the wiki page:

As of OpenWRT 22.03, the kernel partition size was increased from 3MiB to 4 MiB. Consequently, upgrading from 21.02 to 22.03 requires flashing the Factory image (force option must be used) and losing existing configuration.

Thanks for the help.