diff options
author | Ming Liu <liu.ming50@gmail.com> | 2023-05-30 22:15:40 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-01 08:05:11 +0100 |
commit | 66ed174ccdf7a89cb998f503cc6b631e2d1adcc0 (patch) | |
tree | 3403bf24ee2fc06b914ed120992c10085e1e2688 | |
parent | 9d01c892b408bc74f4c7505a62187c84d2b514ed (diff) | |
download | poky-66ed174ccdf7a89cb998f503cc6b631e2d1adcc0.tar.gz |
kernel.bbclass: introduce KERNEL_LOCALVERSION
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.
(From OE-Core rev: 229435a52f36ddec5f85fb6d5ccd42044b688397)
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes-recipe/kernel.bbclass | 6 | ||||
-rw-r--r-- | meta/conf/documentation.conf | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index 4bce64cf6a..271ce6c473 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass | |||
@@ -618,6 +618,7 @@ do_shared_workdir () { | |||
618 | # We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware | 618 | # We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware |
619 | SYSROOT_DIRS = "" | 619 | SYSROOT_DIRS = "" |
620 | 620 | ||
621 | KERNEL_LOCALVERSION ??= "" | ||
621 | KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} olddefconfig || oe_runmake -C ${S} O=${B} oldnoconfig" | 622 | KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} olddefconfig || oe_runmake -C ${S} O=${B} oldnoconfig" |
622 | 623 | ||
623 | python check_oldest_kernel() { | 624 | python check_oldest_kernel() { |
@@ -639,7 +640,10 @@ kernel_do_configure() { | |||
639 | # $ scripts/setlocalversion . => + | 640 | # $ scripts/setlocalversion . => + |
640 | # $ make kernelversion => 2.6.37 | 641 | # $ make kernelversion => 2.6.37 |
641 | # $ make kernelrelease => 2.6.37+ | 642 | # $ make kernelrelease => 2.6.37+ |
642 | touch ${B}/.scmversion ${S}/.scmversion | 643 | if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then |
644 | echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion | ||
645 | echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion | ||
646 | fi | ||
643 | 647 | ||
644 | if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then | 648 | if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then |
645 | mv "${S}/.config" "${B}/.config" | 649 | mv "${S}/.config" "${B}/.config" |
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf index a27d7a53c3..66b8e2f24f 100644 --- a/meta/conf/documentation.conf +++ b/meta/conf/documentation.conf | |||
@@ -253,6 +253,7 @@ KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for which the build system | |||
253 | KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages. Defaults to 'kernel'." | 253 | KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages. Defaults to 'kernel'." |
254 | 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)." | 254 | 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)." |
255 | 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)." | 255 | 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)." |
256 | KERNEL_LOCALVERSION[doc] = "Appends a string to the name of the local version of the kernel image." | ||
256 | 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." | 257 | 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." |
257 | KMACHINE[doc] = "The machine as known by the kernel." | 258 | KMACHINE[doc] = "The machine as known by the kernel." |
258 | KTYPE[doc] = "Defines the kernel type to be used in assembling the configuration." | 259 | KTYPE[doc] = "Defines the kernel type to be used in assembling the configuration." |