summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/kernel-configure.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/kernel-configure.inc')
-rw-r--r--recipes-kernel/linux/kernel-configure.inc49
1 files changed, 49 insertions, 0 deletions
diff --git a/recipes-kernel/linux/kernel-configure.inc b/recipes-kernel/linux/kernel-configure.inc
new file mode 100644
index 0000000..f3d0abe
--- /dev/null
+++ b/recipes-kernel/linux/kernel-configure.inc
@@ -0,0 +1,49 @@
1SRC_URI += " file://merge_config.sh "
2
3configure_kernel() {
4 # Add debug flavour config elements from fragments
5 # Listed in increasing priority order if conflicts are detected.
6 #
7
8 #
9 #combine features cfgs with defconfig
10 #
11 addon_features=""
12 if [ -n "${2}" ]; then
13 for feature in ${2}; do
14 addon_features="${addon_features} ${WORKDIR}/${feature}"
15 done
16 fi
17
18 # Some meta layers like meta-ti use defconfig file to point to a real
19 # default config file (use-kernel-config=config_filename) which is found
20 # under kernel path (${S}/arch/${archname}/configs/).
21 config=`cat ${1} | grep use-kernel-config | cut -d= -f2`
22 if [ "x${config}" != "x" ]
23 then
24 configfilepath=`find ${S}/arch/ -name ${config} -print | head -n 1`
25 if [ -f ${configfilepath} ]
26 then
27 cp ${configfilepath} ${1}
28 else
29 bbfatal "Specified config file:${config} was not found!"
30 fi
31 fi
32
33 if [ -e "${S}/scripts/kconfig/merge_config.sh" ]; then
34 O=${B} ${S}/scripts/kconfig/merge_config.sh -m ${1} ${addon_features}
35 else
36 O=${B} ${WORKDIR}/merge_config.sh -m ${1} ${addon_features}
37 fi
38
39 mv -f ${B}/.config ${B}/.mconfig
40
41 #
42 #in linux kernel 2.6.33, kconfig does not support alldefconfig yet.
43 #
44 if [ "x${PV}" = "x2.6.33" ]; then
45 oe_runmake KCONFIG_ALLCONFIG=${B}/.mconfig O=${B} allnoconfig
46 else
47 oe_runmake KCONFIG_ALLCONFIG=${B}/.mconfig O=${B} alldefconfig
48 fi
49}