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