[OE-core] [PATCH] classes/kernel-yocto: Apply patches from BSP
Joshua Watt
jpewhacker at gmail.com
Thu Dec 19 18:53:03 UTC 2019
On 12/19/19 12:45 PM, Bruce Ashfield wrote:
> On Thu, Dec 19, 2019 at 1:38 PM Joshua Watt <jpewhacker at gmail.com> wrote:
>> 0f698dfd1c8 ("kernel-yocto: streamline patch, configuration and audit
>> phases") appears to have inadvertently broken support for BSP .scc files
>> to provide patches for the kernel. Restore this behavior by adding
>> $bsp_definition to the list of files processed for patches.
>> Additionally, the logic can be simplified now that the same elements are
>> used for both configuration fragments and patches
> Unfortunately no, we can't do this.
>
> It would reapply all the patches that are already integrated into the
> tree, and that distinction is the key part of that change.
>
> What exactly are you trying to do ? Define a userspace BSP ? If so,
> there are examples of this and I can dig them up and send them along.
We have a lot of boards running different SoCs (each with a different
vendor provided kernel) and we are trying to keep our sanity managing
all of the by using a metadata repo. So for example, we have a recipe
that pulls in vendor A's kernel directly from the upstream source, then
our local metadata repo which provides the scc files we need to
configure that repo. Inevitably, we end up needing to patch these
kernels, so I was hoping that we could provide the patches in the
metadata repo and add them to the BSP .scc file, but that wasn't working.
>
> Bruce
>
>> Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
>> ---
>> meta/classes/kernel-yocto.bbclass | 7 ++-----
>> 1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
>> index ed9bcfa57c..08c02a8f50 100644
>> --- a/meta/classes/kernel-yocto.bbclass
>> +++ b/meta/classes/kernel-yocto.bbclass
>> @@ -193,12 +193,9 @@ do_kernel_metadata() {
>> if [ $? -ne 0 ]; then
>> bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
>> fi
>> - fi
>>
>> - # run2: only generate patches for elements that have been passed on the SRC_URI
>> - elements="`echo -n ${sccs} ${patches} ${KERNEL_FEATURES}`"
>> - if [ -n "${elements}" ]; then
>> - scc --force -o ${S}/${meta_dir}:patch --cmds patch ${includes} ${sccs} ${patches} ${KERNEL_FEATURES}
>> + # run2: generate patches
>> + scc --force -o ${S}/${meta_dir}:patch --cmds patch ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}
>> if [ $? -ne 0 ]; then
>> bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
>> fi
>> --
>> 2.23.0
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
More information about the Openembedded-core
mailing list