On Wed, May 25, 2022 at 4:29 AM Potin Lai <[email protected]> wrote:
>
>
> Bruce Ashfield 於 2022/5/25 上午 03:48 寫道:
> > In message: [linux-yocto] [yocto-kernel-patch][yocto-5.15][PATCH 0/2] 
> > Enable MDIO bus config by default
> > on 19/05/2022 Potin Lai wrote:
> >
> >> Hi maintainer,
> >>
> >> This patch series introduce mdio fragment to enable MDIO bus kernel
> >> configs, which required by mdio-tools for low-level MDIO bus
> >> communication.
> > The fragment itself looks fine, but in order to turn it on for the
> > standard kernel, we need to have a good reason .. since it introduces
> > size to every one of our builds.
> >
> > Let me ask a few questions. Which boards (qemu or not) have you tested
> > this on ?
>
> I found a post for adding mdio-tools on OpenEmbedded mailing list, and I 
> tried to solve the build error reported by maintainer.
> From the error logs it shows the build failed when build mdio-netlink module, 
> and this error happens for both qemumips & qemuarm64.
> Please have a check below links for origin message and build error logs.
>
> message: 
> https://lore.kernel.org/all/camkf1sofz0ot+mhj6kk-clux97qp3q1cfemejvdu8nfwvgu...@mail.gmail.com/
> qemumips error log: https://errors.yoctoproject.org/Errors/Details/623861/
> qemuarm64 error log:https://errors.yoctoproject.org/Errors/Details/623865/


Aha.

Yes, this is a bit trickier, so adding the feature fragment that can
be enabled when required, is the simplest thing to do at the moment.

The reason I say tricky (and I won't get into all the long standing
technical issues), is that the distro, the recipe, the kernel and the
board are somewhat decoupled, and that recipe doesn't fail gracefully
when some symbols aren't in the core kernel.

You could depend on virtual/kernel being configured, check the .config
and then only do the compilation if required, but then you have
non-functional userspace package, that would have runtime issues ..
and those runtime issues would be harder to pick up than a build time
problem (like this). You are also hardcoding very specific kernel
options into a recipe, and although it seems ok at first, over time ..
it can cause issues with architectures and kernel versions, etc.

If we turn it on globally in the standard kernel (like the patch in
question does), that solves the build issue .. but it doesn't actually
mean that the platform has the required hardware support. Again,
that's a runtime issue that can be hard to detect.

Which leaves us with the feature fragment, either enabled for machines
that we know have the right support, or a feature fragment that is
enabled via a machine or distro feature. There are other more
complicated options that I'll avoid for now.


>
>
>
> > Are you enabling the option to ensure that the standard kernel has
> > this built-in, in case someone wants to use the mdio-tools ?
> >
> > The reason I ask the questions above, is that we also have the option
> > to enable this in specific machine's, or tie it to a MACHINE/DISTRO
> > feature to have it automatically enabled (with a similar result, but
> > not enforced via the -standard kernel),
> >
> > Bruce
>
> Thank you for the suggestions, I will move mdio fragment from standard to 
> machine level.
> I am new to this area, would you guide me where is the right place to include 
> mdio fragment for qemumips & qemuarm64.
> Are these correct files?
> * bsp/mti-malta32/mti-malta32-be-standard.scc
> * bsp/qemuarm64/qemuarm64-standard.scc


close. But you'd want it on for all the kernel types and variants of
those boards.

So mti-malta32.scc (which is included by all the kernel types and
variants), and qemuarm64.scc would be the best place to put the
feature include.

Bruce


>
>
> Potin
> >> Potin Lai (2):
> >>   cfg/net: introduce mdio fragment
> >>   ktypes/standard: enable MDIO by default
> >>
> >>  cfg/net/mdio.cfg             | 3 +++
> >>  cfg/net/mdio.scc             | 5 +++++
> >>  kern-features.rc             | 1 +
> >>  ktypes/standard/standard.scc | 1 +
> >>  4 files changed, 10 insertions(+)
> >>  create mode 100644 cfg/net/mdio.cfg
> >>  create mode 100644 cfg/net/mdio.scc
> >>
> >> --
> >> 2.17.1
> >>
> >> 
> >>



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11323): 
https://lists.yoctoproject.org/g/linux-yocto/message/11323
Mute This Topic: https://lists.yoctoproject.org/mt/91200275/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to