Re: [OE-core] [PATCH] linux-yocto: introduce KMETABRANCH

2024-03-18 Thread Bruce Ashfield
On Mon, Mar 18, 2024 at 4:32 AM Ming Liu  wrote:
>
> From: Ming Liu 
>
> 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 
> ---
>  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
>
>
> 
>


-- 
- 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 (#197311): 
https://lists.openembedded.org/g/openembedded-core/message/197311
Mute This Topic: https://lists.openembedded.org/mt/104998899/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] linux-yocto: introduce KMETABRANCH

2024-03-18 Thread Ming Liu
From: Ming Liu 

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 
---
 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/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-