summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2011-11-15 16:10:06 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-02 15:19:45 +0000
commit644f2e525b910b9ff8d9aaa33f11eba3fefa7c85 (patch)
treea67fe2df45969ccc423da26c44a9aff26b842283
parentbdcbccb9865e31c68cadbdd276f0f42ea6b2c0c1 (diff)
downloadopenembedded-core-644f2e525b910b9ff8d9aaa33f11eba3fefa7c85.tar.gz
openembedded-core-644f2e525b910b9ff8d9aaa33f11eba3fefa7c85.tar.bz2
openembedded-core-644f2e525b910b9ff8d9aaa33f11eba3fefa7c85.zip
kernel-yocto: support allnoconfig base configuration
When creating a minimal config or creating a hard baseline for incremental changes, it is often desired to disable all kernel options and then begin building and enabling only what is required. To support this workflow, a new variable KCONFIG_MODE is introduced to contain a hint to the kernel configuration about how the kernel config should be produced. This variable is passed directly to lkc when it is invoked during configuration, so the contents of the variable must be a valid option for the kernel config build. Additionally, when a defconfig is detected, allnoconfig is enabled as the default operation, unless otherwise specified by KCONFIG_MODE. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--meta/classes/kernel-yocto.bbclass15
1 files changed, 13 insertions, 2 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index d555fc04b9..04a2f883b9 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -44,7 +44,8 @@ do_patch() {
}
do_kernel_checkout() {
- if [ -d ${WORKDIR}/git/.git/refs/remotes/origin ]; then
+ if [ -d $
+{WORKDIR}/git/.git/refs/remotes/origin ]; then
echo "Fixing up git directory for ${LINUX_KERNEL_TYPE}/${KMACHINE}"
rm -rf ${S}
mkdir ${S}
@@ -88,8 +89,18 @@ do_kernel_configme[dirs] = "${CCACHE_DIR} ${S} ${B}"
do_kernel_configme() {
echo "[INFO] doing kernel configme"
+ if [ -n ${KCONFIG_MODE} ]; then
+ configmeflags=${KCONFIG_MODE}
+ else
+ # If a defconfig was passed, use =n as the baseline, which is achieved
+ # via --allnoconfig
+ if [ -f ${WORKDIR}/defconfig ]; then
+ configmeflags="--allnoconfig"
+ fi
+ fi
+
cd ${S}
- configme --reconfig --output ${B} ${KBRANCH} ${KMACHINE}
+ configme ${configmeflags} --reconfig --output ${B} ${KBRANCH} ${KMACHINE}
if [ $? -ne 0 ]; then
echo "ERROR. Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
exit 1