summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorMing Liu <liu.ming50@gmail.com>2024-02-22 11:35:43 +0100
committerSteve Sakoman <steve@sakoman.com>2024-03-01 05:19:54 -1000
commit57b8a1adb54a3adab22f4e04ced66a92ffc78a96 (patch)
tree66b94de009586dbd20abcc9faf01f2a5f3e6022e /meta/classes/kernel.bbclass
parent0269cfc91c28e2332a8f148fe68f63b69ebc8e61 (diff)
downloadpoky-57b8a1adb54a3adab22f4e04ced66a92ffc78a96.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: 29a0d2a49df8e24f3948a2ddf03743f0cb5d09dd) 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> cherry-picked from master 229435a52f36ddec5f85fb6d5ccd42044b688397 Signed-off-by: Andreas Helbech Kleist <andreaskleist@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 5951347361..80fb1879b0 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -614,6 +614,7 @@ do_shared_workdir () {
614# We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware 614# We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware
615SYSROOT_DIRS = "" 615SYSROOT_DIRS = ""
616 616
617KERNEL_LOCALVERSION ??= ""
617KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} olddefconfig || oe_runmake -C ${S} O=${B} oldnoconfig" 618KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} olddefconfig || oe_runmake -C ${S} O=${B} oldnoconfig"
618 619
619python check_oldest_kernel() { 620python check_oldest_kernel() {
@@ -635,7 +636,10 @@ kernel_do_configure() {
635 # $ scripts/setlocalversion . => + 636 # $ scripts/setlocalversion . => +
636 # $ make kernelversion => 2.6.37 637 # $ make kernelversion => 2.6.37
637 # $ make kernelrelease => 2.6.37+ 638 # $ make kernelrelease => 2.6.37+
638 touch ${B}/.scmversion ${S}/.scmversion 639 if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
640 echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
641 echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
642 fi
639 643
640 if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then 644 if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
641 mv "${S}/.config" "${B}/.config" 645 mv "${S}/.config" "${B}/.config"