Skip to contentSkip to conversation

kernel.bbclass: introduce KERNEL_LOCALVERSION

PATCH Superseded [email protected] 3 participants 11 messages May 30, 2023 – Jun 21, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel.bbclass: introduce KERNEL_LOCALVERSION

From: Ming Liu <[email protected]>

Just like UBOOT_LOCALVERSION, an end user can set KERNEL_LOCALVERSION to append a string to the name of the local version of the kernel image.

---
 meta/classes-recipe/kernel.bbclass | 10 +++++-----
 meta/conf/documentation.conf       |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)
meta/classes-recipe/kernel.bbclass +5 -5
index e634eabd49..3dd139eda9 100644
@@ -616,6 +616,7 @@ do_shared_workdir () {
 # We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware
 SYSROOT_DIRS = ""
 
+KERNEL_LOCALVERSION ??= ""
 KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} olddefconfig || oe_runmake -C ${S} O=${B} oldnoconfig"
 
 python check_oldest_kernel() {
@@ -633,11 +634,10 @@ check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL KERNEL_VERSION"
 do_configure[prefuncs] += "check_oldest_kernel"
 
 kernel_do_configure() {
-	# fixes extra + in /lib/modules/2.6.37+
-	# $ scripts/setlocalversion . => +
-	# $ make kernelversion => 2.6.37
-	# $ make kernelrelease => 2.6.37+
-	touch ${B}/.scmversion ${S}/.scmversion
+	if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+		echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+		echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+	fi
 
 	if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
 		mv "${S}/.config" "${B}/.config"
meta/conf/documentation.conf +1 -0
index a27d7a53c3..66b8e2f24f 100644
@@ -253,6 +253,7 @@ KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for which the build system
 KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages. Defaults to 'kernel'."
 KERNEL_PATH[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
 KERNEL_SRC[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
+KERNEL_LOCALVERSION[doc] = "Appends a string to the name of the local version of the kernel image."
 KFEATURE_DESCRIPTION[doc] = "Provides a short description of a configuration fragment. You use this variable in the .scc file that describes a configuration fragment file."
 KMACHINE[doc] = "The machine as known by the kernel."
 KTYPE[doc] = "Defines the kernel type to be used in assembling the configuration."
Signature · 1 line
2.25.1
#1 lore raw
Quoted 26 lines · Ming Liu

From: Ming Liu <[email protected]>

Just like UBOOT_LOCALVERSION, an end user can set KERNEL_LOCALVERSION to append a string to the name of the local version of the kernel image.

---
 meta/classes-recipe/kernel.bbclass | 10 +++++-----
 meta/conf/documentation.conf       |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)
meta/classes-recipe/kernel.bbclass +1 -0
index e634eabd49..3dd139eda9 100644
@@ -616,6 +616,7 @@ do_shared_workdir () {
 # We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware
 SYSROOT_DIRS = ""
 
+KERNEL_LOCALVERSION ??= ""
 KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} olddefconfig || oe_runmake -C ${S} O=${B} oldnoconfig"
 
 python check_oldest_kernel() {

meta/classes-recipe/kernel.bbclass check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL KERNEL_VERSION" · line 639

Quoted 7 lines
meta/classes-recipe/kernel.bbclass +0 -4
@@ -633,11 +634,10 @@ check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL KERNEL_VERSION"
 do_configure[prefuncs] += "check_oldest_kernel"
 
 kernel_do_configure() {
-       # fixes extra + in /lib/modules/2.6.37+
-       # $ scripts/setlocalversion . => +
-       # $ make kernelversion => 2.6.37
-       # $ make kernelrelease => 2.6.37+

Those comments are still valid.

meta/classes-recipe/kernel.bbclass check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL KERNEL_VERSION" · line 640

Quoted 5 lines
meta/classes-recipe/kernel.bbclass +4 -1
-       touch ${B}/.scmversion ${S}/.scmversion
+       if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+               echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+               echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+       fi

You've confirmed that the result is the same as the touches previously did when that variable isn't set ?

Bruce

Quoted 27 lines
meta/classes-recipe/kernel.bbclass +0 -0
        if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
                mv "${S}/.config" "${B}/.config"
meta/conf/documentation.conf +1 -1
index a27d7a53c3..66b8e2f24f 100644
@@ -253,6 +253,7 @@ KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for which the build system
 KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages. Defaults to 'kernel'."
 KERNEL_PATH[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
 KERNEL_SRC[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
+KERNEL_LOCALVERSION[doc] = "Appends a string to the name of the local version of the kernel image."
 KFEATURE_DESCRIPTION[doc] = "Provides a short description of a configuration fragment. You use this variable in the .scc file that describes a configuration fragment file."
 KMACHINE[doc] = "The machine as known by the kernel."
 KTYPE[doc] = "Defines the kernel type to be used in assembling the configuration."
--

2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181939): https://lists.openembedded.org/g/openembedded-core/message/181939
Mute This Topic: https://lists.openembedded.org/mt/99224358/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
author
#2 lore raw

Hi, Bruce:

Please see my answers as below:

Quoted 1 line

You've confirmed that the result is the same as the touches previously

did when that variable isn't set ?

Yes, I have verified that on a qemuarm64 machine.

Quoted 1 line

Those comments are still valid

I think after we introduce KERNEL_LOCALVERSION, then we generate the .scmversion on purpose, not as a workaround or fix so those comments not valid any more?

the best,
thank you

Bruce Ashfield <[email protected]> 於 2023年5月30日 週二 下午7:21寫道:

Quoted 99 lines · Ming Liu
Quoted 7 lines

From: Ming Liu <[email protected]>

Just like UBOOT_LOCALVERSION, an end user can set KERNEL_LOCALVERSION to append a string to the name of the local version of the kernel image.

Review

Quoted 7 lines
---
 meta/classes-recipe/kernel.bbclass | 10 +++++-----
 meta/conf/documentation.conf       |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)
(quoted diff) +0 -0

b/meta/classes-recipe/kernel.bbclass

meta/classes-recipe/kernel.bbclass do_shared_workdir () { · line 616

Quoted 5 lines

index e634eabd49..3dd139eda9 100644

meta/classes-recipe/kernel.bbclass +0 -0
@@ -616,6 +616,7 @@ do_shared_workdir () {
 # We don't need to stage anything, not the modules/firmware since those

would clash with linux-firmware

meta/classes-recipe/kernel.bbclass do_shared_workdir () {

Quoted 4 lines
meta/classes-recipe/kernel.bbclass +1 -0
 SYSROOT_DIRS = ""
 
+KERNEL_LOCALVERSION ??= ""
 KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} olddefconfig

|| oe_runmake -C ${S} O=${B} oldnoconfig"

meta/classes-recipe/kernel.bbclass check_oldest_kernel[vardepsexclude] +=

Quoted 3 lines
meta/classes-recipe/kernel.bbclass +0 -0
 python check_oldest_kernel() {
@@ -633,11 +634,10 @@ check_oldest_kernel[vardepsexclude] +=

"OLDEST_KERNEL KERNEL_VERSION"

meta/classes-recipe/kernel.bbclass check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL KERNEL_VERSION" · line 639

Quoted 7 lines
meta/classes-recipe/kernel.bbclass +0 -4
 do_configure[prefuncs] += "check_oldest_kernel"
 
 kernel_do_configure() {
-       # fixes extra + in /lib/modules/2.6.37+
-       # $ scripts/setlocalversion . => +
-       # $ make kernelversion => 2.6.37
-       # $ make kernelrelease => 2.6.37+

Those comments are still valid.

meta/classes-recipe/kernel.bbclass check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL KERNEL_VERSION" · line 640

Quoted 5 lines
meta/classes-recipe/kernel.bbclass +4 -1
-       touch ${B}/.scmversion ${S}/.scmversion
+       if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+               echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+               echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+       fi

You've confirmed that the result is the same as the touches previously did when that variable isn't set ?

Bruce

meta/classes-recipe/kernel.bbclass check_oldest_kernel[vardepsexclude] += · line 641

Quoted 2 lines
meta/classes-recipe/kernel.bbclass +0 -0
        if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f

"${B}/.config" ]; then

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules

Quoted 6 lines
meta/classes-recipe/kernel.bbclass +0 -0
                mv "${S}/.config" "${B}/.config"
meta/conf/documentation.conf +0 -0
index a27d7a53c3..66b8e2f24f 100644
@@ -253,6 +253,7 @@ KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules

for which the build system

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules · line 253

Quoted 1 line
meta/conf/documentation.conf +0 -0
 KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages. Defaults

to 'kernel'."

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules · line 254

Quoted 1 line
meta/conf/documentation.conf +0 -0
 KERNEL_PATH[doc] = "The location of the kernel sources. This variable

is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules · line 255

Quoted 1 line
meta/conf/documentation.conf +0 -0
 KERNEL_SRC[doc] = "The location of the kernel sources. This variable is

set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules · line 256

Quoted 1 line
meta/conf/documentation.conf +1 -0
+KERNEL_LOCALVERSION[doc] = "Appends a string to the name of the local

version of the kernel image."

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules · line 257

Quoted 1 line
meta/conf/documentation.conf +0 -0
 KFEATURE_DESCRIPTION[doc] = "Provides a short description of a

configuration fragment. You use this variable in the .scc file that describes a configuration fragment file."

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules · line 259

Quoted 2 lines
meta/conf/documentation.conf +0 -0
 KMACHINE[doc] = "The machine as known by the kernel."
 KTYPE[doc] = "Defines the kernel type to be used in assembling the

configuration."

Quoted 7 lines

--
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#181939):

https://lists.openembedded.org/g/openembedded-core/message/181939

Quoted 3 lines

Mute This Topic: https://lists.openembedded.org/mt/99224358/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [

[email protected]]

Quoted 2 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

#3 lore raw
Quoted 5 lines · Ming Liu

Hi, Bruce:

Please see my answers as below:

Quoted 8 lines
Quoted 1 line

You've confirmed that the result is the same as the touches previously did when that variable isn't set ?

Yes, I have verified that on a qemuarm64 machine.

Quoted 1 line

Those comments are still valid

I think after we introduce KERNEL_LOCALVERSION, then we generate the .scmversion on purpose, not as a workaround or fix so those comments not valid any more?

They are definitely still valid. The files need to exist, or the + gets added. Other layers and kernel recipes have been touching and using those files in their own way, the kernel.bbclass was just a default to ensure if they didn't handle it, that those noise wouldn't be generated.

That variable is completely optional, so we are not always generating it on purpose. Also CONFIG_LOCALVERSION is used by linux-yocto and other recipes, so the default of empty to ensure that nothing is added by kbuild is the case, and also makes them valid.

Bruce

Quoted 87 lines

the best,
thank you

Bruce Ashfield <[email protected]> 於 2023年5月30日 週二 下午7:21寫道:

Quoted 82 lines · Ming Liu
Quoted 26 lines

From: Ming Liu <[email protected]>

Just like UBOOT_LOCALVERSION, an end user can set KERNEL_LOCALVERSION to append a string to the name of the local version of the kernel image.

---
 meta/classes-recipe/kernel.bbclass | 10 +++++-----
 meta/conf/documentation.conf       |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)
meta/classes-recipe/kernel.bbclass +1 -0
index e634eabd49..3dd139eda9 100644
@@ -616,6 +616,7 @@ do_shared_workdir () {
 # We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware
 SYSROOT_DIRS = ""
 
+KERNEL_LOCALVERSION ??= ""
 KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} olddefconfig || oe_runmake -C ${S} O=${B} oldnoconfig"
 
 python check_oldest_kernel() {

meta/classes-recipe/kernel.bbclass check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL KERNEL_VERSION" · line 639

Quoted 7 lines
meta/classes-recipe/kernel.bbclass +0 -4
@@ -633,11 +634,10 @@ check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL KERNEL_VERSION"
 do_configure[prefuncs] += "check_oldest_kernel"
 
 kernel_do_configure() {
-       # fixes extra + in /lib/modules/2.6.37+
-       # $ scripts/setlocalversion . => +
-       # $ make kernelversion => 2.6.37
-       # $ make kernelrelease => 2.6.37+

Those comments are still valid.

meta/classes-recipe/kernel.bbclass check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL KERNEL_VERSION" · line 640

Quoted 5 lines
meta/classes-recipe/kernel.bbclass +4 -1
-       touch ${B}/.scmversion ${S}/.scmversion
+       if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+               echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+               echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+       fi

You've confirmed that the result is the same as the touches previously did when that variable isn't set ?

Bruce

Quoted 19 lines
meta/classes-recipe/kernel.bbclass +0 -0
        if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
                mv "${S}/.config" "${B}/.config"
meta/conf/documentation.conf +1 -1
index a27d7a53c3..66b8e2f24f 100644
@@ -253,6 +253,7 @@ KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for which the build system
 KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages. Defaults to 'kernel'."
 KERNEL_PATH[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
 KERNEL_SRC[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
+KERNEL_LOCALVERSION[doc] = "Appends a string to the name of the local version of the kernel image."
 KFEATURE_DESCRIPTION[doc] = "Provides a short description of a configuration fragment. You use this variable in the .scc file that describes a configuration fragment file."
 KMACHINE[doc] = "The machine as known by the kernel."
 KTYPE[doc] = "Defines the kernel type to be used in assembling the configuration."
--

2.25.1

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181939): https://lists.openembedded.org/g/openembedded-core/message/181939
Mute This Topic: https://lists.openembedded.org/mt/99224358/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

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

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
author
#4 lore raw

Hi, Bruce:

OK, thanks for the explanation, that makes sense, will add them back in V2.

the best,
thank you

Bruce Ashfield <[email protected]> 於 2023年5月30日 週二 下午10:09寫道:

Quoted 145 lines · Ming Liu
Quoted 6 lines

Hi, Bruce:

Please see my answers as below:

Quoted 1 line

You've confirmed that the result is the same as the touches previously

did when that variable isn't set ?

Quoted 6 lines

Yes, I have verified that on a qemuarm64 machine.

Quoted 1 line

Those comments are still valid

I think after we introduce KERNEL_LOCALVERSION, then we generate the

.scmversion on purpose, not as a workaround or fix so those comments not valid any more?

Quoted 1 line

They are definitely still valid. The files need to exist, or the + gets added. Other layers and kernel recipes have been touching and using those files in their own way, the kernel.bbclass was just a default to ensure if they didn't handle it, that those noise wouldn't be generated.

That variable is completely optional, so we are not always generating it on purpose. Also CONFIG_LOCALVERSION is used by linux-yocto and other recipes, so the default of empty to ensure that nothing is added by kbuild is the case, and also makes them valid.

Bruce

Quoted 14 lines

the best,
thank you

Bruce Ashfield <[email protected]> 於 2023年5月30日 週二 下午7:21寫道:

Quoted 9 lines · Ming Liu
Quoted 7 lines

From: Ming Liu <[email protected]>

Just like UBOOT_LOCALVERSION, an end user can set KERNEL_LOCALVERSION to append a string to the name of the local version of the kernel image.

Quoted 7 lines
Quoted 7 lines

Review

Quoted 7 lines
---
 meta/classes-recipe/kernel.bbclass | 10 +++++-----
 meta/conf/documentation.conf       |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)
(quoted diff) +0 -0

b/meta/classes-recipe/kernel.bbclass

Quoted 5 lines
Quoted 5 lines

meta/classes-recipe/kernel.bbclass do_shared_workdir () { · line 616

Quoted 5 lines

index e634eabd49..3dd139eda9 100644

meta/classes-recipe/kernel.bbclass +0 -0
@@ -616,6 +616,7 @@ do_shared_workdir () {
 # We don't need to stage anything, not the modules/firmware since

those would clash with linux-firmware

Quoted 4 lines
Quoted 4 lines

meta/classes-recipe/kernel.bbclass do_shared_workdir () {

Quoted 4 lines
meta/classes-recipe/kernel.bbclass +1 -0
 SYSROOT_DIRS = ""
 
+KERNEL_LOCALVERSION ??= ""
 KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B}

olddefconfig || oe_runmake -C ${S} O=${B} oldnoconfig"

Quoted 3 lines
Quoted 3 lines

meta/classes-recipe/kernel.bbclass check_oldest_kernel[vardepsexclude] +=

Quoted 3 lines
meta/classes-recipe/kernel.bbclass +0 -0
 python check_oldest_kernel() {
@@ -633,11 +634,10 @@ check_oldest_kernel[vardepsexclude] +=

"OLDEST_KERNEL KERNEL_VERSION"

Quoted 16 lines
Quoted 16 lines

meta/classes-recipe/kernel.bbclass check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL KERNEL_VERSION" · line 639

Quoted 7 lines
meta/classes-recipe/kernel.bbclass +0 -4
 do_configure[prefuncs] += "check_oldest_kernel"
 
 kernel_do_configure() {
-       # fixes extra + in /lib/modules/2.6.37+
-       # $ scripts/setlocalversion . => +
-       # $ make kernelversion => 2.6.37
-       # $ make kernelrelease => 2.6.37+

Those comments are still valid.

Quoted 5 lines
meta/classes-recipe/kernel.bbclass +4 -1
-       touch ${B}/.scmversion ${S}/.scmversion
+       if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+               echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+               echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+       fi
Quoted 7 lines
Quoted 7 lines

You've confirmed that the result is the same as the touches previously did when that variable isn't set ?

Bruce

Quoted 2 lines
meta/classes-recipe/kernel.bbclass +0 -0
        if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f

"${B}/.config" ]; then

Quoted 2 lines
Quoted 2 lines

Review

Quoted 2 lines
meta/classes-recipe/kernel.bbclass +0 -0
                mv "${S}/.config" "${B}/.config"
(quoted diff) +0 -0

b/meta/conf/documentation.conf

Quoted 4 lines
Quoted 4 lines

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel

Quoted 4 lines

index a27d7a53c3..66b8e2f24f 100644

meta/conf/documentation.conf +0 -0
@@ -253,6 +253,7 @@ KERNEL_MODULE_PROBECONF[doc] = "Lists kernel

modules for which the build system

Quoted 1 line
Quoted 1 line

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel · line 253

Quoted 1 line
meta/conf/documentation.conf +0 -0
 KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages.

Defaults to 'kernel'."

Quoted 1 line
Quoted 1 line

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel · line 254

Quoted 1 line
meta/conf/documentation.conf +0 -0
 KERNEL_PATH[doc] = "The location of the kernel sources. This

variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."

Quoted 1 line
Quoted 1 line

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel · line 255

Quoted 1 line
meta/conf/documentation.conf +0 -0
 KERNEL_SRC[doc] = "The location of the kernel sources. This variable

is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."

Quoted 1 line
Quoted 1 line

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel · line 256

Quoted 1 line
meta/conf/documentation.conf +1 -0
+KERNEL_LOCALVERSION[doc] = "Appends a string to the name of the

local version of the kernel image."

Quoted 1 line
Quoted 1 line

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel · line 257

Quoted 1 line
meta/conf/documentation.conf +0 -0
 KFEATURE_DESCRIPTION[doc] = "Provides a short description of a

configuration fragment. You use this variable in the .scc file that describes a configuration fragment file."

Quoted 2 lines
Quoted 2 lines

meta/conf/documentation.conf KERNEL_MODULE_PROBECONF[doc] = "Lists kernel · line 259

Quoted 2 lines
meta/conf/documentation.conf +0 -0
 KMACHINE[doc] = "The machine as known by the kernel."
 KTYPE[doc] = "Defines the kernel type to be used in assembling the

configuration."

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

--
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#181939):

https://lists.openembedded.org/g/openembedded-core/message/181939

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Mute This Topic: https://lists.openembedded.org/mt/99224358/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub

[[email protected]]

Quoted 8 lines
Quoted 8 lines
Quoted 2 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

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

#5 lore raw
In reply to [email protected]

Greetings,

Quoted 5 lines · Ming Liu

From: Ming Liu <[email protected]>

Just like UBOOT_LOCALVERSION, an end user can set KERNEL_LOCALVERSION to append a string to the name of the local version of the kernel image.

How is this supposed to be used?

I added the following to my conf/local.conf file:
KERNEL_LOCALVERSION = "no-networking"

But when I run "uname -a" on the qemux86-64 target, I get:
Linux qemux86-64 6.1.33-yocto-standard #1 SMP PREEMPT_DYNAMIC Thu Jun 15 03:08:03 UTC 2023 x86_64 GNU/Linux

So, my string is not there!

I'm using the latest Poky master branch for testing. Thanks in advance
Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw
Quoted 13 lines · Michael Opdenacker via lists.openembedded.org

Greetings,

Quoted 5 lines · Ming Liu

From: Ming Liu <[email protected]>

Just like UBOOT_LOCALVERSION, an end user can set KERNEL_LOCALVERSION to append a string to the name of the local version of the kernel image.

How is this supposed to be used?

Quoted 8 lines

I added the following to my conf/local.conf file:
KERNEL_LOCALVERSION = "no-networking"

But when I run "uname -a" on the qemux86-64 target, I get:
Linux qemux86-64 6.1.33-yocto-standard #1 SMP PREEMPT_DYNAMIC Thu Jun 15 03:08:03 UTC 2023 x86_64 GNU/Linux

So, my string is not there!

linux-yocto uses a different mechanism for setting this (and will continue to use that existing mechanism).

So this would work in absence of a kernel recipe using CONFIG_LOCALVERSION.

Bruce

Quoted 20 lines

I'm using the latest Poky master branch for testing. Thanks in advance
Cheers
Michael.

--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183186): https://lists.openembedded.org/g/openembedded-core/message/183186
Mute This Topic: https://lists.openembedded.org/mt/99224358/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
#7 lore raw

Hi Bruce,

Thanks for your help.

Quoted 4 lines · Bruce Ashfield

linux-yocto uses a different mechanism for setting this (and will continue to use that existing mechanism).

So this would work in absence of a kernel recipe using CONFIG_LOCALVERSION.

That's good to know from a documentation perspective :)

I'm using "core-image-minimal". Is there another standard image I can build that wouldn't use linux-yocto then (if I understood correctly)?

I want to make sure people know how to use this variable, because without further information, I expected that information to be used by linux-yocto. Thanks
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#8 lore raw
Quoted 9 lines · Michael Opdenacker

Hi Bruce,

Thanks for your help.

Quoted 3 lines · Bruce Ashfield

linux-yocto uses a different mechanism for setting this (and will continue to use that existing mechanism).

Quoted 7 lines
Quoted 1 line

So this would work in absence of a kernel recipe using CONFIG_LOCALVERSION.

That's good to know from a documentation perspective :)

I'm using "core-image-minimal". Is there another standard image I can build that wouldn't use linux-yocto then (if I understood correctly)?

There isn't, since all of the core images use the reference kernels in various flavours.

Quoted 4 lines

I want to make sure people know how to use this variable, because without further information, I expected that information to be used by linux-yocto.

It really isn't a variable that most people will use. Most kernel recipes that have needed
to set a local version have already been doing it a different way.

Bruce

Quoted 8 lines

Thanks
Michael.

--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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
#9 lore raw
Quoted 3 lines · Bruce Ashfield

It really isn't a variable that most people will use. Most kernel recipes that have needed
to set a local version have already been doing it a different way.

So, we wouldn't document this new variable?

Would you have details about this different way? It seems that the manual doesn't explain how... (see https://docs.yoctoproject.org/kernel-dev/index.html)
Thanks
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#10 lore raw
Quoted 10 lines · Michael Opdenacker
Quoted 3 lines · Bruce Ashfield

It really isn't a variable that most people will use. Most kernel recipes that have needed
to set a local version have already been doing it a different way.

So, we wouldn't document this new variable?

I'd document it simply by saying that if a kernel recipe is not already setting a localversion, this mechanism is available. kernel configurations (defconfigs, fragments, variables) can all set this value, and we wouldn't want that variable to clobber them all.

We have plenty of kernel variables and build flows that are not directly tested by kernel/linux-yocto, some of them have other tests, others don't.

Quoted 3 lines

Would you have details about this different way? It seems that the manual doesn't explain how... (see
https://docs.yoctoproject.org/kernel-dev/index.html)

linux-yocto has done this for probably the better part of a decade (it was moved to a task in 2017 and existed long before then).

do_set_localversion() {
        cd ${S}

        if [ ! -z "${LINUX_VERSION_EXTENSION}" ]; then
                echo "# Global settings from linux recipe" >> ${B}/.config
                echo

"CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
fi
}

which is a task.

So if you do a deltask on set_localversion, you could test that variable.

Bruce

Quoted 8 lines

Thanks
Michael.

--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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