Skip to contentSkip to conversation

linux-yocto: introduce KMETABRANCH

PATCH In review [email protected] 2 participants 2 messages Mar 18, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-yocto: introduce KMETABRANCH

From: Ming Liu <[email protected]>

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.

---
 meta/recipes-kernel/linux/linux-yocto_6.6.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-kernel/linux/linux-yocto_6.6.bb +2 -1
index 0f62dea29a..381e20461f 100644
@@ -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"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 7 lines · Ming Liu

From: Ming Liu <[email protected]>

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

Quoted 35 lines

Introduce a variable KMETABRANCH to satisfy that.

---
 meta/recipes-kernel/linux/linux-yocto_6.6.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-kernel/linux/linux-yocto_6.6.bb +2 -2
index 0f62dea29a..381e20461f 100644
@@ -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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

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