On Tue, Apr 16, 2024 at 1:52 PM Robert D Kocisko <[email protected]> wrote:

> On Tue, Apr 16, 2024 at 9:50 AM Bruce Ashfield via
> lists.yoctoproject.org
> <[email protected]> wrote:
> >
> > Your issue is something different.
> >
> > The linux-yocto branches are generated from the kernel-cache, so you'll
> always see a patch in the kernel-cache and in the linux-yocto kernel
> branches.
>
> Ah ok.  I had a sneaking suspicion that perhaps this was the case but
> it wasn't obvious to me even after five read-throughs of the
> documentation :)
>
> >
> > What you are seeing likely stems from your BSP definition. How have to
> defined it for your board ?
>
> This is where my confusion lies.  I defined my BSP as follows, trying
> to follow the 'beaglebone' examples from the documentation.
> I don't want to include ktypes/preempt-rt because it enables a bunch
> of *_DEBUG kernel configuration options as well as other stuff that I
> find bloat-y.
>

Without including the ktypes/preempt-rt/preempt-rt.scc, you won't actually
have the preempt-rt patches applied, as that's where the branches are
created and the features/rt is included (and that feature is the actual -rt
patches).

Any debug options are typically controlled by KERNEL_FEATURES in
the kernel recipes, so I wouldn't expect too much to be one. Generally
speaking, we are middle of the road for functionality versus minimal.

You also can always turn off options you don't want in your BSP, since
the last fragment that is processed will "win".


>
> ---
> define KMACHINE rk3588-firefly-itx
> define KTYPE preempt-rt
> define KARCH arm64
>
> include ktypes/tiny
> branch firefly-preempt-rt
>
> kconf non-hardware firefly-preempt-rt.cfg
>
> include remove-non-rockchip-arch-arm64.ssc
> ---
>
> Then in my machine .conf I add this line (without this I'm not sure
> how to tell yocto to use the bsp definition I created):
> KERNEL_FEATURES += " bsp/rockchip/firefly-preempt-rt.scc"
>
>
That would do exactly what you are seeing, it would start processing
the fragment and applying the patches. Which is where you ended up
with the duplicate patches being applied.

This is the section that you are looking for:
https://docs.yoctoproject.org/dev/kernel-dev/advanced.html#recipe-space-metadata

That's how the tools will locate the BSP and process it accordingly.

There could of course be bugs, but I have tested this in the past 6 months.

Bruce



> >
> > The tools know that with a proper BSP definition that they don't need to
> re-apply patches, since they are already in the trees and only the kernel
> type configuration will be used.
> >
> > In this case, everything in the standard kernel and preempt-rt kernel
> are already on the v6.6/standard/preempt-rt/base branch, so they'll be
> skipped. Only your BSP patches and configuration will be added.
> >
> > But that functionality needs a proper BSP definition to work.
> >
> > If you find the section "recipe space BSPs" in the project
> documentation, it has more details.
> >
> > Bruce
> >
> >
>


-- 
- 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 (#13828): 
https://lists.yoctoproject.org/g/linux-yocto/message/13828
Mute This Topic: https://lists.yoctoproject.org/mt/105548012/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to