summaryrefslogtreecommitdiffstats
path: root/meta-initramfs
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
parent31f161628e122207426bffbec40b4e5c14ee9c4d (diff)
downloadmeta-openembedded-dc521d165d9dec214b549ff14a77909ae7ab786a.tar.gz
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')
-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 @@
1DESCRIPTION = "Linux Kernel"
2SECTION = "kernel"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
5
6INC_PR = "r2"
7
8inherit kernel siteinfo
9
10DEPENDS += "xz-native"
11
12# Set the verbosity of kernel messages during runtime
13# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour
14# Note that you need i.e. loglevel=3 and master console on serial to protect bootlogo
15CMDLINE_DEBUG ?= "loglevel=3"
16
17PACKAGES = ""
18PROVIDES = ""
19
20KERNEL_IMAGE_BASE_NAME = "${KERNEL_IMAGETYPE}-kexecboot-${PV}-${PR}-${MACHINE}"
21KERNEL_IMAGE_SYMLINK_NAME = "${KERNEL_IMAGETYPE}-kexecboot-${MACHINE}"
22
23LOCALVERSION ?= ""
24
25# we want the smallest size
26INITRAMFS_IMAGE = "initramfs-kexecboot-klibc-image"
27
28kernel_conf_variable() {
29 CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
30 if test "$2" = "n"
31 then
32 echo "# CONFIG_$1 is not set" >> ${S}/.config
33 else
34 echo "CONFIG_$1=$2" >> ${S}/.config
35 fi
36}
37
38do_configure_prepend() {
39
40 echo "" > ${S}/.config
41 CONF_SED_SCRIPT=""
42
43 #
44 # CONFIG_CMDLINE mangling
45 #
46 kernel_conf_variable CMDLINE_BOOL y
47 kernel_conf_variable CMDLINE "\"${CMDLINE} ${CMDLINE_DEBUG}\""
48
49 # mips and x86
50 kernel_conf_variable CMDLINE_OVERRIDE y
51
52 # sh only
53 kernel_conf_variable CMDLINE_OVERWRITE y
54 kernel_conf_variable CMDLINE_EXTEND n
55
56 #
57 # endian support
58 #
59 if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then
60 kernel_conf_variable CPU_BIG_ENDIAN y
61 fi
62
63 #
64 # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it is going to be used
65 #
66 if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then
67 install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
68 kernel_conf_variable LOGO y
69 kernel_conf_variable LOGO_LINUX_CLUT224 y
70 fi
71
72 # When enabling thumb for userspace we also need thumb support in the kernel
73 if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then
74 kernel_conf_variable ARM_THUMB y
75 fi
76
77 kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
78 kernel_conf_variable LOCALVERSION_AUTO n
79
80 # Force sane defaults for kexec-enabled kernels and keep size small
81 kernel_conf_variable BLK_DEV_INITRD y
82 kernel_conf_variable KEXEC y
83 CONF_SED_SCRIPT="$CONF_SED_SCRIPT /=m/d;"
84 kernel_conf_variable MODULES n
85 if ${@base_contains("CMDLINE_DEBUG", "debug", "true", "false", d)}; then
86 kernel_conf_variable DEBUG_LL y
87 kernel_conf_variable PRINTK y
88 kernel_conf_variable EARLY_PRINTK y
89 kernel_conf_variable BUG y
90 kernel_conf_variable DEBUG_ERRORS y
91 kernel_conf_variable DEBUG_BUGVERBOSE y
92 kernel_conf_variable DEBUG_KERNEL y
93 else
94 kernel_conf_variable DEBUG_ERRORS n
95 kernel_conf_variable DEBUG_BUGVERBOSE n
96 kernel_conf_variable DEBUG_KERNEL n
97 fi
98
99 # Force lzma for arm kernels only
100 if [ "${ARCH}" = "arm" ] ; then
101 CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_KERNEL/d;"
102 CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_RD/d;"
103 CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_INITRAMFS_COMPRESSION/d;"
104 CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_INITRAMFS_SOURCE/d;"
105 kernel_conf_variable KERNEL_LZMA y
106 kernel_conf_variable RD_LZMA y
107 kernel_conf_variable INITRAMFS_COMPRESSION_LZMA y
108 kernel_conf_variable INITRAMFS_SOURCE "\"initramfs.cpio.lzma\""
109 fi
110
111 sed -e "${CONF_SED_SCRIPT}" \
112 < '${WORKDIR}/defconfig' >>'${S}/.config'
113
114 yes '' | oe_runmake oldconfig
115}
116
117do_populate_sysroot() {
118 :
119}
120
121do_install() {
122 :
123}
124
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 @@
1require linux-kexecboot.inc
2
3PR = "${INC_PR}.8"
4S = "${WORKDIR}/linux-${PV}"
5
6SRC_URI += "${KERNELORG_MIRROR}/linux/kernel/v3.x/linux-${PV}.tar.bz2;name=kernel \
7 ${KERNELORG_MIRROR}/linux/kernel/v3.x/patch-${PV}.10.bz2;apply=yes;name=stablepatch \
8 "
9
10SRC_URI[kernel.md5sum] = "8d43453f8159b2332ad410b19d86a931"
11SRC_URI[kernel.sha256sum] = "2573d2378c754b0c602b57586e9311e5b38c5d1e6c137f02873833633a4b9359"
12SRC_URI[stablepatch.md5sum] = "a8e1c25a93a685ec2a1c3a808715fe9d"
13SRC_URI[stablepatch.sha256sum] = "f25126052d1a083a415ddd313b40c7fcdb3742f40474cb4a826af7e43fee29d3"