aboutsummaryrefslogtreecommitdiffstats
path: root/meta-initramfs/recipes-kernel
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2012-02-21 22:18:34 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-02-22 09:40:27 +0100
commitdc521d165d9dec214b549ff14a77909ae7ab786a (patch)
treee4fad9556fcc3e389dc5ae24a9dada22972cf74f /meta-initramfs/recipes-kernel
parent31f161628e122207426bffbec40b4e5c14ee9c4d (diff)
downloadmeta-openembedded-dc521d165d9dec214b549ff14a77909ae7ab786a.tar.gz
meta-openembedded-dc521d165d9dec214b549ff14a77909ae7ab786a.tar.bz2
meta-openembedded-dc521d165d9dec214b549ff14a77909ae7ab786a.zip
meta-initramfs: add linux-kexecboot_3.1 from meta-handheld
* and add revised linux-kexecboot.inc Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-initramfs/recipes-kernel')
-rw-r--r--meta-initramfs/recipes-kernel/linux/linux-kexecboot.inc124
-rw-r--r--meta-initramfs/recipes-kernel/linux/linux-kexecboot_3.1.bb13
2 files changed, 137 insertions, 0 deletions
diff --git a/meta-initramfs/recipes-kernel/linux/linux-kexecboot.inc b/meta-initramfs/recipes-kernel/linux/linux-kexecboot.inc
new file mode 100644
index 000000000..19c5ea9e7
--- /dev/null
+++ b/meta-initramfs/recipes-kernel/linux/linux-kexecboot.inc
@@ -0,0 +1,124 @@
+DESCRIPTION = "Linux Kernel"
+SECTION = "kernel"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+INC_PR = "r2"
+
+inherit kernel siteinfo
+
+DEPENDS += "xz-native"
+
+# Set the verbosity of kernel messages during runtime
+# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour
+# Note that you need i.e. loglevel=3 and master console on serial to protect bootlogo
+CMDLINE_DEBUG ?= "loglevel=3"
+
+PACKAGES = ""
+PROVIDES = ""
+
+KERNEL_IMAGE_BASE_NAME = "${KERNEL_IMAGETYPE}-kexecboot-${PV}-${PR}-${MACHINE}"
+KERNEL_IMAGE_SYMLINK_NAME = "${KERNEL_IMAGETYPE}-kexecboot-${MACHINE}"
+
+LOCALVERSION ?= ""
+
+# we want the smallest size
+INITRAMFS_IMAGE = "initramfs-kexecboot-klibc-image"
+
+kernel_conf_variable() {
+ CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
+ if test "$2" = "n"
+ then
+ echo "# CONFIG_$1 is not set" >> ${S}/.config
+ else
+ echo "CONFIG_$1=$2" >> ${S}/.config
+ fi
+}
+
+do_configure_prepend() {
+
+ echo "" > ${S}/.config
+ CONF_SED_SCRIPT=""
+
+ #
+ # CONFIG_CMDLINE mangling
+ #
+ kernel_conf_variable CMDLINE_BOOL y
+ kernel_conf_variable CMDLINE "\"${CMDLINE} ${CMDLINE_DEBUG}\""
+
+ # mips and x86
+ kernel_conf_variable CMDLINE_OVERRIDE y
+
+ # sh only
+ kernel_conf_variable CMDLINE_OVERWRITE y
+ kernel_conf_variable CMDLINE_EXTEND n
+
+ #
+ # endian support
+ #
+ if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then
+ kernel_conf_variable CPU_BIG_ENDIAN y
+ fi
+
+ #
+ # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it is going to be used
+ #
+ if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then
+ install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
+ kernel_conf_variable LOGO y
+ kernel_conf_variable LOGO_LINUX_CLUT224 y
+ fi
+
+ # When enabling thumb for userspace we also need thumb support in the kernel
+ if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then
+ kernel_conf_variable ARM_THUMB y
+ fi
+
+ kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
+ kernel_conf_variable LOCALVERSION_AUTO n
+
+ # Force sane defaults for kexec-enabled kernels and keep size small
+ kernel_conf_variable BLK_DEV_INITRD y
+ kernel_conf_variable KEXEC y
+ CONF_SED_SCRIPT="$CONF_SED_SCRIPT /=m/d;"
+ kernel_conf_variable MODULES n
+ if ${@base_contains("CMDLINE_DEBUG", "debug", "true", "false", d)}; then
+ kernel_conf_variable DEBUG_LL y
+ kernel_conf_variable PRINTK y
+ kernel_conf_variable EARLY_PRINTK y
+ kernel_conf_variable BUG y
+ kernel_conf_variable DEBUG_ERRORS y
+ kernel_conf_variable DEBUG_BUGVERBOSE y
+ kernel_conf_variable DEBUG_KERNEL y
+ else
+ kernel_conf_variable DEBUG_ERRORS n
+ kernel_conf_variable DEBUG_BUGVERBOSE n
+ kernel_conf_variable DEBUG_KERNEL n
+ fi
+
+ # Force lzma for arm kernels only
+ if [ "${ARCH}" = "arm" ] ; then
+ CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_KERNEL/d;"
+ CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_RD/d;"
+ CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_INITRAMFS_COMPRESSION/d;"
+ CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_INITRAMFS_SOURCE/d;"
+ kernel_conf_variable KERNEL_LZMA y
+ kernel_conf_variable RD_LZMA y
+ kernel_conf_variable INITRAMFS_COMPRESSION_LZMA y
+ kernel_conf_variable INITRAMFS_SOURCE "\"initramfs.cpio.lzma\""
+ fi
+
+ sed -e "${CONF_SED_SCRIPT}" \
+ < '${WORKDIR}/defconfig' >>'${S}/.config'
+
+ yes '' | oe_runmake oldconfig
+}
+
+do_populate_sysroot() {
+ :
+}
+
+do_install() {
+ :
+}
+
diff --git a/meta-initramfs/recipes-kernel/linux/linux-kexecboot_3.1.bb b/meta-initramfs/recipes-kernel/linux/linux-kexecboot_3.1.bb
new file mode 100644
index 000000000..b045ff7b9
--- /dev/null
+++ b/meta-initramfs/recipes-kernel/linux/linux-kexecboot_3.1.bb
@@ -0,0 +1,13 @@
+require linux-kexecboot.inc
+
+PR = "${INC_PR}.8"
+S = "${WORKDIR}/linux-${PV}"
+
+SRC_URI += "${KERNELORG_MIRROR}/linux/kernel/v3.x/linux-${PV}.tar.bz2;name=kernel \
+ ${KERNELORG_MIRROR}/linux/kernel/v3.x/patch-${PV}.10.bz2;apply=yes;name=stablepatch \
+ "
+
+SRC_URI[kernel.md5sum] = "8d43453f8159b2332ad410b19d86a931"
+SRC_URI[kernel.sha256sum] = "2573d2378c754b0c602b57586e9311e5b38c5d1e6c137f02873833633a4b9359"
+SRC_URI[stablepatch.md5sum] = "a8e1c25a93a685ec2a1c3a808715fe9d"
+SRC_URI[stablepatch.sha256sum] = "f25126052d1a083a415ddd313b40c7fcdb3742f40474cb4a826af7e43fee29d3"