1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-07-16 14:27:48 +00:00
Files
Chase Maupin 4b0d898ffd setup-defconfig: allow using KERNEL_LOCALVERSION
* Add capability to use KERNEL_LOCALVERSION to set an extra
  version string in the kernel.  This mimics functionality
  submitted to the kernel.bbclass but since this overwrites
  the do_configure it must be added here as well.

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
2013-04-17 20:18:57 -04:00

33 lines
1.2 KiB
PHP

# KERNEL_LOCALVERSION can be set to add a tag to the end of the
# kernel version string. such as the commit id
KERNEL_LOCALVERSION ?= ""
# Check the defconfig file and see if it points to an in kernel
# defconfig that should be used, or if it is a complete config file
addtask setup_defconfig before do_configure after do_patch
do_setup_defconfig() {
# Always copy the defconfig file to .config to keep consistency
# between the case where there is a real config and the in kernel
# tree config
cp ${WORKDIR}/defconfig ${S}/.config
}
# define our own do_configure that will:
# 1. Check the .config file and see if string use-kernel-config= is present
# 2. If the use-kernel-config string is present parse out the config to use
# and run make ${config}
# 3. else run yes '' | oe_runmake oldconfig like the default do_configure
# does
do_configure() {
echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
config=`cat ${S}/.config | grep use-kernel-config | cut -d= -f2`
if [ "x${config}" != "x" ]
then
oe_runmake ${config}
else
yes '' | oe_runmake oldconfig
fi
}