Skip to content

ipq806x: switch to kernel 5.10 #4525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

Ansuel
Copy link
Member

@Ansuel Ansuel commented Sep 7, 2021

Move kernel version to 5.10 as has been tested by many user
with positive feedback.
Patches for kernel 5.4 are kept for reference if for whatever
reason someone still needs them or require to build an image
with the old kernel version.
Patch for 5.4 will later be dropped when this target will
be migrated to DSA since too much effort are required to
backport qca8k patch for 5.4 and won't work anymore.

@hnyman @adschm Think it's time to move this target... If I have time i will also rework the dsa patch and move it to generic and hope to finally start to test that for other target. Did anyone notice the mail send to the mailing list?

Signed-off-by: Ansuel Smith ansuelsmth@gmail.com

@neheb
Copy link
Contributor

neheb commented Sep 7, 2021

would be great to get DSA on ath79.

@Ansuel
Copy link
Member Author

Ansuel commented Sep 7, 2021

@neheb don't have a target to test so i can only help and check what is needed to get it running

@neheb
Copy link
Contributor

neheb commented Sep 7, 2021

Sure. I've been busy with other stuff lately so I couldn't devote as much time on this.

Last I remember I couldn't get qca8k go load. It's possible this was because I was building with the wrong kernel (5.4 instead of 5.10 ...). I'll try to redo my setup sometime soon.

Since then, I removed the WiFi card from my device and placed it elsewhere. For those curious:
PXL_20210823_221539545

@Ansuel
Copy link
Member Author

Ansuel commented Sep 7, 2021

the card is a little bigger ahahah (if you want to use the other port, try to find an extension cable)

anyway the not loading error is strange at least an error should be reported... the kernel should not be the cause...

@neheb
Copy link
Contributor

neheb commented Sep 7, 2021

the card is a little bigger ahahah (if you want to use the other port, try to find an extension cable)

There are three slots. I don't mind if one is blocked. It is somewhat concerning that it's that close to the CPU.

anyway the not loading error is strange at least an error should be reported... the kernel should not be the cause...

Hmm good point. I remember looking through dmesg and not finding qca8k anywhere.

@Ansuel
Copy link
Member Author

Ansuel commented Sep 7, 2021

the driver check the switch id... in some old version it was silent and didn't produce any error... now it should report if it does detect an invalid id and fail to probe... could be that there is a special configuration needed for the mdio communication (and id 0 was reported) or the switch actually use a not supported id

@mrkiko
Copy link
Contributor

mrkiko commented Sep 8, 2021

Is the Netgear R7800 working correctly on 5.10? I guess yes, but I remember looking at this in the beginning and now lost track.

@wulfy23
Copy link
Contributor

wulfy23 commented Sep 8, 2021

thanks for your hard work ansuel... especially the nice linear spacing of all the recent major changes... spot on

really appreciate having the 5.4 patches left in tree for a month-ish or so and the ability to build from those.

@pkgadd
Copy link
Contributor

pkgadd commented Sep 8, 2021

Is the Netgear R7800 working correctly on 5.10?

The Netgear r7800 has been confirmed to work in v5.10, I guess the table at #4036 (comment) is still largely current (in the mean time I've successfully tested the ASRock G10 as well, albeit only within the DSA branch).

Edit: Looking at the DSA PR, The Linksys EA7500 v1 seems to have also been tested successfully (using the DSA branch), which would add that to the tested devices and the EA8500 to the "(probably similar enough to expect it working)" ones.

@adschm
Copy link
Member

adschm commented Sep 9, 2021

Commit message should be edited since this does not "drop" kernel 5.4. This will only be the case when config and patches are removed.

It's still perfectly possible to build 5.4 if you just change this single variable.

However, regarding DSA I understand it that way that 5.4 won't work anymore after DSA patches are introduced. Thus, we should actually remove kernel 5.4 support - by dropping patches/config - before that point.

Due to the latter, I think we should move to default 5.10 soon; this will help to spot problems by a wider audience before we might introduce additional problems with DSA (so DSA will probably have to wait a few weeks after default 5.10 due to that reason).

So, are there any known problem with 5.10 left at the moment?

@rbpp
Copy link

rbpp commented Sep 9, 2021

I've been using 5.10 on my R7800 and C2600 for a few months and had no problems whatsoever.

@Ansuel
Copy link
Member Author

Ansuel commented Sep 9, 2021

@adschm aside the problem of instability with some very high load (present also on 5.4), no issue observed.

Will change the message and remove the drop part

Move kernel version to 5.10 as has been tested by many user
with positive feedback.
Patches for kernel 5.4 are kept for reference if for whatever
reason someone still needs them or require to build an image
with the old kernel version.
Patch for 5.4 will later be dropped when this target will
be migrated to DSA since too much effort are required to
backport qca8k patch for 5.4 and won't work anymore.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@Ansuel Ansuel changed the title ipq806x: move kernel to 5.10 version ipq806x: switch to kernel 5.10 Sep 9, 2021
@hnyman
Copy link
Contributor

hnyman commented Sep 9, 2021

I compiled the current 5.10 version for R7800 and it works nicely ;-)

@graysky2
Copy link
Contributor

graysky2 commented Sep 9, 2021

I compiled the current 5.10 version for R7800 and it works nicely ;-)

Stupid question but here goes: is there anything special needed to switch from 5.4.x to 5.10.x on the R7800? Is it as simple as applying this PR, building, and flashing?

@Ansuel
Copy link
Member Author

Ansuel commented Sep 9, 2021

no you actually test 5.10 by enabling the testing kernel version flag...

@graysky2
Copy link
Contributor

graysky2 commented Sep 9, 2021

no you actually test 5.10 by enabling the testing kernel version flag...

OK. Just wanted to be sure nothing else was needed. I am happy to apply this PR and test on my R7800.

I found this under a symbol search:

Symbol: TESTING_KERNEL [=n]
Type  : bool
Defined at config/Config-build.in:63 
   Prompt: Use the testing kernel version
   Depends on: HAS_TESTING_KERNEL [=n]
   Location:
     -> Global build settings

But I do not see a corresponding option under Global build settings in my nconfig. What am I missing?

@Ansuel
Copy link
Member Author

Ansuel commented Sep 9, 2021

if you have applied this pr then 5.10 is now the default version and testing kernel version flag is not available anymore.

@graysky2
Copy link
Contributor

graysky2 commented Sep 9, 2021

Got it. Apply, build, flash. Thank you.

EDIT: Booted with no dmesg regressions and all functionality seems fine.

@pkgadd
Copy link
Contributor

pkgadd commented Sep 10, 2021

So, are there any known problem with 5.10 left at the moment?

I'm not aware of any regressions relative to v4.19 or v5.4 (yes, digitalcircuit is hunting a crash under load, but that one also happens with v5.4 and happened with v4.19 already, so this is not a regression in this PR).

Stealing (and slightly updating) the table below from the DSA PR#4036, which implies using kernel v5.10:

Tested, or very similar to a tested device:

  • ASRock G10 ✅
  • Linksys EA7500 V1 WiFi Router ✅
    • Linksys EA8500 WiFi Router ☑️ (probably similar enough to expect it working)
  • NEC WG2600HP ✅
  • NEC WG2600HP3 ✅
  • Netgear r7800 ✅
    • Netgear d7800 ☑️ (probably similar enough to expect it working)
    • Netgear r7500 ☑️ (probably similar enough to expect it working)
    • Netgear r7500v2 ☑️ (probably similar enough to expect it working)
  • TP-Link Archer c2600 ✅
    • TP-Link Archer VR2600V ☑️ (probably similar enough to expect it working)
    • TP-Link Talon AD7200 ☑️ (probably similar enough to expect it working)
  • Ubiquiti UniFi AC HD ✅
  • ZyXEL NBG6817 ✅

Untested:

  • Askey RT4230W REV6 ❓
  • Buffalo WXR-2533DHP ❓
  • Edgecore ECW5410 ❓

Unlikely to get feedback (expensive devboards, used by early adopters who have probably moved on meanwhile):

  • Compex WPQ864
  • Qualcomm IPQ8064/AP-148
  • Qualcomm IPQ8064/AP161
  • Qualcomm IPQ8064/DB149

This test matrix successfully covers ipq8064 and ipq8065, just as well as spi-nor, NAND and eMMC storage.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq8064/ g10; ipq8065/ nbg6817]

@aparcar aparcar added the kernel pull request/issue with Linux kernel related changes label Sep 11, 2021
@adschm adschm added the target/ipq806x pull request/issue for ipq806x target label Sep 11, 2021
@adschm
Copy link
Member

adschm commented Sep 11, 2021

Thanks, I will merge this during the weekend.

@adschm adschm closed this Sep 11, 2021
@adschm
Copy link
Member

adschm commented Sep 12, 2021

I'm sorry, won't build for me:

true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-O2 -I/data/openwrt/staging_dir/host/include " "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" "INSTALL=/data/openwrt/staging_dir/host/bin/install -c" "INSTALL_DATA=/data/openwrt/staging_dir/host/bin/install -c -m 644" "INSTALL_PROGRAM=/data/openwrt/staging_dir/host/bin/install -c" "INSTALL_SCRIPT=/data/openwrt/staging_dir/host/bin/install -c" "LDFLAGS=-static-libstdc++ -static-libgcc " "LIBCFLAGS=-O2 -I/data/openwrt/staging_dir/host/include " "LIBCFLAGS_FOR_TARGET=-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" "MAKE=make" "MAKEINFO=/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0/missing makeinfo --split-size=5000000 --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/bash" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/data/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi" "infodir=/data/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/share/info" "libdir=/data/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/lib" "prefix=/data/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi" "tooldir=/data/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/arm-openwrt-linux-muslgnueabi" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=ld" "LIBCFLAGS=-O2 -I/data/openwrt/staging_dir/host/include " "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make
make[6]: Leaving directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/zlib'
make[6]: Entering directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/libbacktrace'
make  all-am
make[7]: Entering directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/libbacktrace'
true  DO=all multi-do # make
make[7]: Leaving directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/libbacktrace'
make[6]: Leaving directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/libbacktrace'
make[6]: Entering directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[6]: Leaving directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/libcpp'
make[6]: Entering directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/libdecnumber'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/libdecnumber'
make[6]: Entering directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/gcc'
/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/./gcc/xgcc -B/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/./gcc/ -xc -nostdinc /dev/null -S -o /dev/null -fself-test=/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0/gcc/testsuite/selftests
xgcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
compilation terminated.
make[6]: *** [/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0/gcc/c/Make-lang.in:124: s-selftest-c] Error 1
make[6]: Leaving directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/gcc'
make[5]: *** [Makefile:4397: all-gcc] Error 2
make[5]: Leaving directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final'
make[4]: *** [Makefile:961: all] Error 2
make[4]: Leaving directory '/data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final'
make[3]: *** [Makefile:91: /data/openwrt/build_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/gcc-10.3.0-final/.built] Error 2
make[3]: Leaving directory '/data/openwrt/toolchain/gcc/final'
time: toolchain/gcc/final/compile#1.23#0.13#1.34
    ERROR: toolchain/gcc/final failed to build.
make[2]: *** [toolchain/Makefile:97: toolchain/gcc/final/compile] Error 1
make[2]: Leaving directory '/data/openwrt'
make[1]: *** [toolchain/Makefile:93: /data/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-10.3.0_musl_eabi/stamp/.toolchain_compile] Error 2
make[1]: Leaving directory '/data/openwrt'
make: *** [/data/openwrt/include/toplevel.mk:230: world] Error 2

on Debian 10 and 11 with default settings

@adschm adschm reopened this Sep 12, 2021
@Ansuel
Copy link
Member Author

Ansuel commented Sep 12, 2021

strange they are toolchain error not related to target compilation problem o.O

my build env is ubuntu devel with gcc 11

@adschm
Copy link
Member

adschm commented Sep 12, 2021

@Ansuel Yes, of course not related, but I'm not able to build and thus test. In contrast, ipq40xx builds without problems.

I.e. I'm not saying it's your fault. Maybe I will find time to test with 5.4 and narrow down the source of the problem.

@Ansuel
Copy link
Member Author

Ansuel commented Sep 12, 2021

could be that some advanced toolchain flags are set that are not compatible with ipq806x ?
I had some strange error when i tried to compile ath79 with the ipq806x flags and they were caused by some custom flags set by me that were still present after changing target in menuconfig

@adschm
Copy link
Member

adschm commented Sep 12, 2021

Well, gcc 10 never really went smoothly on my systems. I'm still trying to get it build reliably here.
But maybe the problem is just somewhere on my side.

@adschm
Copy link
Member

adschm commented Sep 12, 2021

This builds fine with gcc 8, so I decided to merge it anyway.
My gcc 10 build issues are probably unrelated.

@adschm adschm closed this Sep 12, 2021
@hnyman
Copy link
Contributor

hnyman commented Sep 12, 2021

@adschm @Ansuel

Probably also the armvirt (32) target that provides the packages SDK for buildbot, should be toggled to 5.10 sooner or later.

It has been "testing 5.10" since #4005 in April, but I am not sure what that actually indicates as buildbot is not really building the testing kernelSDK, and I think pretty much nobody builds armvirt separately for private builds.

@Neustradamus
Copy link

Merged commit is:

@Ansuel Ansuel deleted the ipq806x-move branch November 12, 2021 00:16
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 target/ipq806x pull request/issue for ipq806x target
Projects
None yet
Development

Successfully merging this pull request may close these issues.