1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

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>
This commit is contained in:
Ming Liu
2023-05-30 22:15:40 +02:00
committed by Richard Purdie
parent 9d01c892b4
commit 66ed174ccd
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -618,6 +618,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() {
@@ -639,7 +640,10 @@ kernel_do_configure() {
# $ 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"