aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-kexecboot.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/linux/linux-kexecboot.inc')
-rw-r--r--recipes/linux/linux-kexecboot.inc54
1 files changed, 42 insertions, 12 deletions
diff --git a/recipes/linux/linux-kexecboot.inc b/recipes/linux/linux-kexecboot.inc
index ec78848dbe..d1bf6aa652 100644
--- a/recipes/linux/linux-kexecboot.inc
+++ b/recipes/linux/linux-kexecboot.inc
@@ -1,5 +1,5 @@
# We set INC_PR here, since a change in the kexecboot recipe will need to get picked up by *all* the kernels:
-INC_PR = "r31"
+INC_PR = "r40"
inherit kernel siteinfo
@@ -57,7 +57,7 @@ def kernel_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
# force lzma compression for kernel (linux-kexecboot >= 2.6.32)
# force lzma compression for initramfs (linux-kexecboot >= 2.6.30)
-DEPENDS += '${@kernel_version_less_or_equal("PV", "2.6.29", "", "lzma-native", d)}'
+DEPENDS += '${@kernel_version_less_or_equal("PV", "2.6.29", "", "xz-native", d)}'
KERNEL_COMPRESSION = '${@kernel_version_less_or_equal("PV", "2.6.31", "", "CONFIG_KERNEL_LZMA=y", d)}'
@@ -79,8 +79,19 @@ do_configure_prepend() {
echo "" > ${S}/.config
+ #
+ # CONFIG_CMDLINE mangling
+ #
+ echo "CONFIG_CMDLINE_BOOL=y" >> ${S}/.config
echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
+ # mips and x86
+ echo "CONFIG_CMDLINE_OVERRIDE=y" >> ${S}/.config
+
+ # sh only
+ echo "CONFIG_CMDLINE_OVERWRITE=y" >> ${S}/.config
+ echo "# CONFIG_CMDLINE_EXTEND is not set" >> ${S}/.config
+
#
# endian support
#
@@ -104,6 +115,10 @@ do_configure_prepend() {
fi
sed -e '/CONFIG_CMDLINE=/d' \
+ -e '/CONFIG_CMDLINE_BOOL/d' \
+ -e '/CONFIG_CMDLINE_OVERRIDE/d' \
+ -e '/CONFIG_CMDLINE_OVERWRITE/d' \
+ -e '/CONFIG_CMDLINE_EXTEND/d' \
-e '/CONFIG_CPU_BIG_ENDIAN/d' \
-e '/CONFIG_LOGO=/d' \
-e '/CONFIG_LOGO_LINUX_CLUT224=/d' \
@@ -117,10 +132,6 @@ do_configure_prepend() {
# Force sane defaults for kexec-enabled kernels and keep size small
sed -i -e /CONFIG_BLK_DEV_INITRD/d \
-e /CONFIG_KEXEC/d \
- -e /CONFIG_KERNEL/d \
- -e /CONFIG_INITRAMFS_COMPRESSION/d \
- -e /CONFIG_INITRAMFS_SOURCE/d \
- -e /CONFIG_RD/d \
-e /=m/d \
-e /CONFIG_MODULES/d \
-e /CONFIG_DEBUG_ERRORS/d \
@@ -130,11 +141,22 @@ do_configure_prepend() {
echo 'CONFIG_BLK_DEV_INITRD=y' >>${S}/.config
echo 'CONFIG_KEXEC=y' >>${S}/.config
+ echo '# CONFIG_MODULES is not set' >> ${S}/.config
+
+ # Force lzma for arm kernels only
+ if [ "${ARCH}" = "arm" ] ; then
+
+ sed -i -e /CONFIG_KERNEL/d \
+ -e /CONFIG_INITRAMFS_COMPRESSION/d \
+ -e /CONFIG_INITRAMFS_SOURCE/d \
+ -e /CONFIG_RD/d \
+ ${S}/.config
+
echo '${KERNEL_COMPRESSION}' >>${S}/.config
- echo '"${INITRAMFS_COMPRESSION}"' >>${S}/.config
+ echo '${INITRAMFS_COMPRESSION}' >>${S}/.config
echo 'CONFIG_INITRAMFS_SOURCE="initramfs.cpio.${INITRAMFS_COMPRESSION_SUFFIX}"' >>${S}/.config
- echo '"${RD_COMPRESSION}"' >>${S}/.config
- echo 'CONFIG_MODULES=n' >> ${S}/.config
+ echo '${RD_COMPRESSION}' >>${S}/.config
+ fi
yes '' | oe_runmake oldconfig
}
@@ -152,7 +174,9 @@ python do_package() {
# With 2.6.37 mips has no uImage target upstream.
# use custom task in the meantime
-do_uboot_mkimage_ben-nanonote() {
+DEPENDS_mipsel += "u-boot-mkimage-native"
+
+do_uboot_mkimage_mipsel() {
cd ${S}
kernel_entry=`nm vmlinux | grep " kernel_entry" | cut -d' ' -f1`
@@ -160,9 +184,15 @@ do_uboot_mkimage_ben-nanonote() {
rm -f vmlinux.bin.gz
gzip -c9 vmlinux.bin > vmlinux.bin.gz
- mkimage -A mips -O linux -T kernel -C gzip -a 0x80010000 -e 0x${kernel_entry} \
- -n 'MIPS' -d vmlinux.bin.gz uImage-kexecboot-${PV}-${PR}-${MACHINE}.bin
+ uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a 0x80010000 -e 0x${kernel_entry} \
+ -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d vmlinux.bin.gz uImage-kexecboot-${PV}-${PR}-${MACHINE}.bin
install -d ${DEPLOY_DIR_IMAGE}
install -m 0644 uImage-kexecboot-${PV}-${PR}-${MACHINE}.bin ${DEPLOY_DIR_IMAGE}
}
+
+do_savedefconfig() {
+ oe_runmake savedefconfig
+}
+
+addtask savedefconfig after do_configure