diff mbox series

linux-yocto: introduce KMETABRANCH

Message ID 20240318083243.14536-1-liu.ming50@gmail.com
State New
Headers show
Series linux-yocto: introduce KMETABRANCH | expand

Commit Message

Ming Liu March 18, 2024, 8:32 a.m. UTC
From: Ming Liu <liu.ming50@gmail.com>

If I want to try a different branch of linux-yocto in a bbappend, that
could be easily done by setting KBRANCH, but there is not such a way to
do the same for kernel meta.

Introduce a variable KMETABRANCH to satisfy that.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
 meta/recipes-kernel/linux/linux-yocto_6.6.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Bruce Ashfield March 18, 2024, 6:17 p.m. UTC | #1
On Mon, Mar 18, 2024 at 4:32 AM Ming Liu <liu.ming50@gmail.com> wrote:
>
> From: Ming Liu <liu.ming50@gmail.com>
>
> If I want to try a different branch of linux-yocto in a bbappend, that
> could be easily done by setting KBRANCH, but there is not such a way to
> do the same for kernel meta.
>

The hardcoding of the branch (versus a variable) was intentional, since
unlike the kbranch settings it is the same for all BSPs, and it is coupled
to the kernel version.

I vary the repository and branch by overriding the SRC_URI versus
changing it this way (as an example).

That being said, it isn't a terrible idea that it could be modified, it just
isn't something I'd want recipes changing.

If it is something that can be changed, it also needs to have a check that
ensures the kver in the branch matches the kernel being built, otherwise,
it should warn. Much like our kernel version check (variable vs source).

Bruce

> Introduce a variable KMETABRANCH to satisfy that.
>
> Signed-off-by: Ming Liu <liu.ming50@gmail.com>
> ---
>  meta/recipes-kernel/linux/linux-yocto_6.6.bb | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-kernel/linux/linux-yocto_6.6.bb b/meta/recipes-kernel/linux/linux-yocto_6.6.bb
> index 0f62dea29a..381e20461f 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_6.6.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_6.6.bb
> @@ -39,9 +39,10 @@ BBCLASSEXTEND = "devupstream:target"
>  SRCREV_machine:class-devupstream ?= "9b4a8eac17f0d840729384618b4b1e876233026c"
>  PN:class-devupstream = "linux-yocto-upstream"
>  KBRANCH:class-devupstream = "v6.6/base"
> +KMETABRANCH ?= "yocto-6.6"
>
>  SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH};protocol=https \
> -           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.6;destsuffix=${KMETA};protocol=https"
> +           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${KMETABRANCH};destsuffix=${KMETA};protocol=https"
>
>  LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
>  LINUX_VERSION ?= "6.6.20"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#197295): https://lists.openembedded.org/g/openembedded-core/message/197295
> Mute This Topic: https://lists.openembedded.org/mt/104998899/1050810
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-kernel/linux/linux-yocto_6.6.bb b/meta/recipes-kernel/linux/linux-yocto_6.6.bb
index 0f62dea29a..381e20461f 100644
--- a/meta/recipes-kernel/linux/linux-yocto_6.6.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_6.6.bb
@@ -39,9 +39,10 @@  BBCLASSEXTEND = "devupstream:target"
 SRCREV_machine:class-devupstream ?= "9b4a8eac17f0d840729384618b4b1e876233026c"
 PN:class-devupstream = "linux-yocto-upstream"
 KBRANCH:class-devupstream = "v6.6/base"
+KMETABRANCH ?= "yocto-6.6"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH};protocol=https \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.6;destsuffix=${KMETA};protocol=https"
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${KMETABRANCH};destsuffix=${KMETA};protocol=https"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 LINUX_VERSION ?= "6.6.20"