Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "mvebu: switch default kernel to 5.15"
This reverts commit 5429411 as upstream in commit e5f31552674e ("ethernet: fix PTP_1588_CLOCK dependencies") has changed `PTP_1588_CLOCK` dependency handling in 5.15 kernel. That currently leads to `CONFIG_NET_DSA_MV88E6XXX=m` in images produced by buildbots due to `CONFIG_ALL_KMODS=y` config option being used in those builds, which leads to a broken LAN bridge network on several devices. References: https://lists.infradead.org/pipermail/openwrt-devel/2022-December/039950.html Signed-off-by: Petr Štetiar <ynezz@true.cz>
- Loading branch information
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I ask why? Thanks
Sorry, it is written on commit, right question is when...
Sorry
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not going to pretend I understand all this, but just in case it helps... divested openwrt builds based on 5.15 run fine on my wrt1900ac, but "official" openwrt december 4th snapshot has the lan port not working issue. so something that the divested builds did fix it:
https://divested.dev/unofficial-openwrt-builds/mvebu-linksys/20221203-00/
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, looking into their build config they simply don't enable
CONFIG_ALL_KMODS=y
so they don't hit that issue.97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have this kmod built, but not yet tested, meaning I'm not sure if the
AUTOLOAD
working or not.97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the network switch available as a module is going to break rootfs over NFS use case and maybe some others. Having
PTP_1588_CLOCK=y
is not an option for me either as it bloats the kernel, increases the kernel attack surface. So I'm leaning more towards a hack/patch approach, by reverting thatPTP_1588_CLOCK_OPTIONAL
tristate dependency.97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following change seems to meet the requirements
grep KMODS .config
grep -E '(PTP_1588|MV88E6X)' build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/linux-5.15.82/.config
but impact on other targets/linux-5.10 is unknown.
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this patch is reasonable. Also include kirkwood in the blacklist please.
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find target/linux/ -name config-5.15 -type f | xargs grep MV88E6XXX=y
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johnnyslee thanks, this one looks reasonable, can you please send a patch to the list (or create a PR?)
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sent #11486
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem here is that kmod will be loaded only after rootfs mount right? If that's the case we already have a way to mount a kmod in preinit as a boot required module. Did we consider that?
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you can't mount network filesystem if you don't have LAN switch enabled in the kernel.
Nope, do you've such example? I failed to git grep it.
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ynezz https://openwrt.org/docs/guide-developer/packages#make_a_kernel_module_required_for_boot Here from the wiki
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, but this is not going to work with NFS rootfs, there you're mostly using just a kernel image and everything else is mounted over the network, so chicken and egg problem.
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok... was just an hint. So this doesn't have a squashfs at all... If that's the case yep then it needs to be part of the kernel since it's the only thing present on the device... Sorry for the noise
97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is the additional Kconfig option
CONFIG_NET_DSA_MV88E6XXX_PTP
. I think the MV88E6XXX should not use PTP at all even it is not selected.Can we change the driver to not depend on
PTP_1588_CLOCK
orPTP_1588_CLOCK_OPTIONAL
in caseCONFIG_NET_DSA_MV88E6XXX_PTP
is not set.97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After hitting the "Kconfig recursive dependency" wall a dozen times,
For
CONFIG_NET_DSA_MV88E6XXX_PTP=y
, we need to definekmod-mv88e6xxxx
package.97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New PR #11522 with Kconfig patch only.
I'm done for now, just hope no one will turn on
CONFIG_NET_DSA_MV88E6XXX_PTP
and complain about kmod missing.97c77ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, something different was done for broadcom. See 5863363