diff options
Diffstat (limited to 'recipes-kernel')
-rw-r--r-- | recipes-kernel/linux/kernel-configure.inc | 49 | ||||
-rw-r--r-- | recipes-kernel/linux/staging-kernel.inc | 133 |
2 files changed, 0 insertions, 182 deletions
diff --git a/recipes-kernel/linux/kernel-configure.inc b/recipes-kernel/linux/kernel-configure.inc deleted file mode 100644 index f3d0abe..0000000 --- a/recipes-kernel/linux/kernel-configure.inc +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | SRC_URI += " file://merge_config.sh " | ||
2 | |||
3 | configure_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 | } | ||
diff --git a/recipes-kernel/linux/staging-kernel.inc b/recipes-kernel/linux/staging-kernel.inc deleted file mode 100644 index 3ef802d..0000000 --- a/recipes-kernel/linux/staging-kernel.inc +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | # This .inc file allows building and deploying staging kernel + modules | ||
2 | # with defconfig + fragment cfgs | ||
3 | |||
4 | require kernel-configure.inc | ||
5 | |||
6 | STAGING_NAME ?= "RELEASE" | ||
7 | STAGING_KERNEL_FEATURES ?= "" | ||
8 | KERNEL_FEATURES ?= "" | ||
9 | MODULES_IMAGE_BASE_NAME = "modules-${PV}-${PR}-${MACHINE}" | ||
10 | EXTRA_OEMAKE_prepend_task-stagingkernel = "${PARALLEL_MAKE} " | ||
11 | |||
12 | do_stagingkernel () { | ||
13 | stagingkernel "${STAGING_KERNEL_FEATURES}" ${STAGING_NAME} | ||
14 | } | ||
15 | |||
16 | stagingkernel () { | ||
17 | |||
18 | configure_kernel "${KERNEL_DEFCONFIG}" "${1}" | ||
19 | |||
20 | # Copy defconfig to .config if .config does not exist. This allows | ||
21 | # recipes to manage the .config themselves in do_configure_prepend(). | ||
22 | if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then | ||
23 | cp "${WORKDIR}/defconfig" "${B}/.config" | ||
24 | fi | ||
25 | yes '' | oe_runmake oldconfig | ||
26 | |||
27 | if [ ! -z "${INITRAMFS_IMAGE}" ]; then | ||
28 | for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do | ||
29 | if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then | ||
30 | cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" initramfs.$img | ||
31 | fi | ||
32 | done | ||
33 | fi | ||
34 | |||
35 | # | ||
36 | # Build this alternative kernel | ||
37 | # | ||
38 | |||
39 | kernel_do_compile | ||
40 | do_compile_kernelmodules | ||
41 | |||
42 | # | ||
43 | # First install the modules to deploy dir | ||
44 | # | ||
45 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE | ||
46 | if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then | ||
47 | oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install | ||
48 | else | ||
49 | bbnote "no modules to install" | ||
50 | fi | ||
51 | if [ -d "${D}/lib" ]; then | ||
52 | tar -cvzf ${DEPLOY_DIR_IMAGE}/${MODULES_IMAGE_BASE_NAME}-${2}.tgz -C ${D} lib | ||
53 | fi | ||
54 | rm -fr ${D}/lib | ||
55 | |||
56 | # | ||
57 | # Dont build any dtb:s for the staging kernel | ||
58 | # | ||
59 | |||
60 | # | ||
61 | # Drop the resulting images in the deploy dir | ||
62 | # | ||
63 | cd ${S} | ||
64 | install -d ${DEPLOY_DIR_IMAGE} | ||
65 | install -m 0644 ${KERNEL_OUTPUT} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}-${2}.bin | ||
66 | mv ${KERNEL_OUTPUT} ${KERNEL_OUTPUT}-${2} | ||
67 | |||
68 | # | ||
69 | # Install the final config alongside the images | ||
70 | # | ||
71 | cd ${S} | ||
72 | cp .config ${DEPLOY_DIR_IMAGE}/config-${PV}-${PR}-${MACHINE}-${2}.config | ||
73 | rm -f .config | ||
74 | |||
75 | # | ||
76 | # Create symlinks | ||
77 | # | ||
78 | cd ${DEPLOY_DIR_IMAGE} | ||
79 | rm -f ${KERNEL_IMAGE_SYMLINK_NAME}-${2}.bin | ||
80 | ln -sf ${KERNEL_IMAGE_BASE_NAME}-${2}.bin ${KERNEL_IMAGE_SYMLINK_NAME}-${2}.bin | ||
81 | |||
82 | rm -f config-${MACHINE}-${2}.config | ||
83 | ln -sf config-${PV}-${PR}-${MACHINE}-${2}.config config-${MACHINE}-${2}.config | ||
84 | |||
85 | } | ||
86 | |||
87 | do_stagingkernel[dirs] = "${DEPLOY_DIR_IMAGE} ${B}" | ||
88 | |||
89 | do_stagingkernel[depends] += "u-boot-mkimage-native:do_populate_sysroot virtual/${TARGET_PREFIX}gcc:do_populate_sysroot virtual/${TARGET_PREFIX}gcc:do_populate_sysroot libgcc:do_populate_sysroot" | ||
90 | |||
91 | addtask stagingkernel after do_patch before do_configure | ||
92 | |||
93 | # | ||
94 | # For reference, copy .config to deploy image | ||
95 | # | ||
96 | do_deploy_append () { | ||
97 | |||
98 | install -d ${DEPLOY_DIR_IMAGE} | ||
99 | |||
100 | # | ||
101 | # Drop the regular defconfig along side the others for consistency | ||
102 | # | ||
103 | cd ${S} | ||
104 | cp .config ${DEPLOY_DIR_IMAGE}/config-${PV}-${PR}-${MACHINE}.config | ||
105 | |||
106 | # | ||
107 | # add symlink | ||
108 | # | ||
109 | cd ${DEPLOY_DIR_IMAGE} | ||
110 | rm -f config-${MACHINE}.config | ||
111 | ln -s config-${PV}-${PR}-${MACHINE}.config config-${MACHINE}.config | ||
112 | |||
113 | } | ||
114 | |||
115 | # | ||
116 | # Clean staging kernel related files in deploy dir | ||
117 | # | ||
118 | do_cleanstagingkernel () { | ||
119 | |||
120 | cd ${DEPLOY_DIR_IMAGE} | ||
121 | rm -f *-${STAGING_NAME}.* | ||
122 | |||
123 | rm -f config-${PV}-${PR}-${MACHINE}.config | ||
124 | rm -f config-${MACHINE}.config | ||
125 | |||
126 | } | ||
127 | |||
128 | LDFLAGS="" | ||
129 | |||
130 | do_cleanstagingkernel[nostamp] = "1" | ||
131 | |||
132 | addtask cleanstagingkernel after do_cleansstate | ||
133 | |||