[yocto] Kernel patches pulled from BSP definition file are not applied

Bruce Ashfield bruce.ashfield at gmail.com
Fri Oct 11 14:49:25 PDT 2019


Hi Diego,

I didn't see your original email. I'm stepping out for a holiday
weekend now, but will write up an explanation of the history reasons
for what you are seeing when I get a few minutes over the next few
days.

Cheers,

Bruce

On Fri, Oct 11, 2019 at 1:11 PM Diego Santa Cruz
<Diego.SantaCruz at spinetix.com> wrote:
>
> Hi,
>
>
>
> I have not received any feedback on the below email and I am not sure I am doing the right thing.
>
>
>
> Can anyone provide some advice as to what would be the recommended way to apply kernel patches listed in a mybsp-patches.scc file for a BSP?
>
>
>
> Adding the “mybsp-patches.scc” file to KERNEL_FEATURES works for me, but seems a bit awkward given that there is a BSP definition scc file. It feels more natural to include the mybsp-patches.scc from the BSP definition scc file, but  that does not work for me, the patches are ignored.
>
>
>
> Thanks,
>
>
>
> Diego
>
> --
> Diego Santa Cruz, PhD
> Technology Architect
> T +41 21 341 15 50
> diego.santacruz at spinetix.com
> spinetix.com
>
>
>
> From: yocto-bounces at yoctoproject.org <yocto-bounces at yoctoproject.org> On Behalf Of Diego Santa Cruz
> Sent: 09 October 2019 23:58
> To: yocto at yoctoproject.org
> Subject: [yocto] Kernel patches pulled from BSP definition file are not applied
>
>
>
> Hello there,
>
>
>
> I am trying to add a few BSP specific kernel patches for my BSP and I wanted to pull them from the BSP definition scc file. However, I cannot get those patches applied (I am using thud). After looking around the kernel-yocto.bbclass it seems that patches which get pulled from the BSP definition file are ignored. What is the rationale behind that behavior? How should I go about it?
>
>
>
> To be more specific I have the following structure within my (recipe-space) kernel metadata.
>
>
>
> bsp
>
> `-- mybsp
>
>     |-- mypatch.patch
>
>     |-- mybsp.cfg
>
>     |-- msbsp.scc
>
>     `-- mybsp-standard.scc
>
>
>
> The mybsp-standard.scc is the BSP definition file, which includes mybsp.scc (among other things). The mybsp.scc file looks as follows
>
>
>
> kconf hardware mybsp.cfg
>
> patch mypatch.patch
>
>
>
> The mypatch.patch file does not get applied when building the kernel, I checked and it is not added to the patch.queue file. But if I add the following to the recipe
>
>
>
> KERNEL_FEATURES += " bsp/mybsp/mybsp.scc"
>
>
>
> Then the patch is added to patch.queue and is applied.
>
>
>
> Looking into do_kernel_metadata in kernel-yocto.bbclass it parses the scc files in two steps, run1 and run2.
>
>
>
> The run1 step uses elements="`echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}`" and generates cfg, merge and meta, so that picks up the mybsp.scc file contents, but this step does not generate the patch queue.
>
>
>
> The run2 step uses elements="`echo -n ${sccs} ${patches} ${KERNEL_FEATURES}`" and generates the patch queue, but this only includes the scc files in SRC_URI and KERNEL_FEATURES, but specifically leaves out the BSP definition file.
>
>
>
> Adding the mybsp.scc file to KERNEL_FEATURES to get this to work seems a bit odd. What is the recommended way of applying BSP specific kernel patches?
>
>
>
> Thanks,
>
>
>
> Diego
>
> --
> Diego Santa Cruz, PhD
> Technology Architect
> spinetix.com
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


More information about the yocto mailing list