mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-07-27 22:37:56 +00:00
1c87802589
* Allow the use of in-kernel config fragments instead of only pulling config fragments from the OE meta data. * The absolute path to the config fragment is used to allow pointing to different fragment locations. * Update the linux-ti-staging_3.12 recipe which uses config fragments to specify the absolute path Signed-off-by: Chase Maupin <Chase.Maupin@ti.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
59 lines
2.3 KiB
PHP
59 lines
2.3 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
|
|
|
|
# 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() {
|
|
# 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
|
|
|
|
echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
|
|
echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
|
|
config=`cat ${S}/.config | grep use-kernel-config | cut -d= -f2`
|
|
if [ ! -z "$config" ]
|
|
then
|
|
oe_runmake $config
|
|
else
|
|
yes '' | oe_runmake oldconfig
|
|
fi
|
|
|
|
# Check for kernel config fragments. The assumption is that the config
|
|
# fragment will be specified with the absolute path. For example:
|
|
# * ${WORKDIR}/config1.cfg
|
|
# * ${S}/config2.cfg
|
|
# Iterate through the list of configs and make sure that you can find
|
|
# each one. If not then error out.
|
|
# NOTE: If you want to override a configuration that is kept in the kernel
|
|
# with one from the OE meta data then you should make sure that the
|
|
# OE meta data version (i.e. ${WORKDIR}/config1.cfg) is listed
|
|
# after the in kernel configuration fragment.
|
|
# Check if any config fragments are specified.
|
|
if [ ! -z "${KERNEL_CONFIG_FRAGMENTS}" ]
|
|
then
|
|
for f in ${KERNEL_CONFIG_FRAGMENTS}
|
|
do
|
|
# Check if the config fragment was copied into the WORKDIR from
|
|
# the OE meta data
|
|
if [ ! -e "$f" ]
|
|
then
|
|
echo "Could not find kernel config fragment $f"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
# Now that all the fragments are located merge them.
|
|
( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${S} ${S}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
|
|
yes '' | oe_runmake oldconfig
|
|
fi
|
|
}
|