summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2011-03-01 01:53:11 +0100
committerAndrea Adami <andrea.adami@gmail.com>2011-03-01 01:53:11 +0100
commit6d94ff134f59c2b76216a2127ea494a8c5816024 (patch)
treec7ccb6feb03b51c9167889ba80c3414f90a20648
parent1a3d10a6a80155a9761aba71b502f023ddb4c265 (diff)
downloadopenembedded-6d94ff134f59c2b76216a2127ea494a8c5816024.tar.gz
linux-kexecboot.inc: Customize recipe, do not include linux.inc anymore.
* linux.inc is deprecated, use only kernel.bbclass * bump PR Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
-rw-r--r--recipes/linux/linux-kexecboot.inc140
1 files changed, 96 insertions, 44 deletions
diff --git a/recipes/linux/linux-kexecboot.inc b/recipes/linux/linux-kexecboot.inc
index e3dde6afa7..b6599fe24e 100644
--- a/recipes/linux/linux-kexecboot.inc
+++ b/recipes/linux/linux-kexecboot.inc
@@ -1,32 +1,34 @@
# We set INC_PR here, since a change in the kexecboot recipe will need to get picked up by *all* the kernels:
-INC_PR = "r28"
+INC_PR = "r29"
+inherit kernel siteinfo
+
+# Additional Sources for 2.6.24 and 2.6.26
+RPSRC = "http://www.rpsys.net/openzaurus/patches/archive"
+TKSRC = "http://www.informatik.hu-berlin.de/~tkunze/zaurus/patches"
+
+# Kernel bootlogo is distro-specific (default is OE logo).
+# Logo resolution (qvga, vga, ...) is machine-specific.
LOGO_SIZE ?= "."
SRC_URI = "file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2"
-require linux.inc
-
-# we want the smallest size
-INITRAMFS_IMAGE = "initramfs-kexecboot-klibc-image"
+# Note how we set master console on serial to protect bootlogo.
+CMDLINE_c7x0 = "console=tty1 console=ttyS0,115200n8"
+CMDLINE_tosa = "console=tty1 console=ttyS0,115200n8"
+CMDLINE_poodle = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+CMDLINE_akita = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+CMDLINE_collie = "console=tty1 console=ttySA0,115200n8 fbcon=rotate:1 mem=64M"
+CMDLINE_spitz = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+CMDLINE_hx4700 = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
-# here we set master console on serial
-CMDLINE_c7x0 = "console=tty1 console=ttyS0,115200n8 ${CMDLINE_DEBUG}"
-CMDLINE_tosa = "console=tty1 console=ttyS0,115200n8 ${CMDLINE_DEBUG}"
-CMDLINE_poodle = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 ${CMDLINE_DEBUG}"
-CMDLINE_akita = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 ${CMDLINE_DEBUG}"
-CMDLINE_collie = "console=tty1 console=ttySA0,115200n8 fbcon=rotate:1 mem=64M ${CMDLINE_DEBUG}"
-CMDLINE_spitz = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 ${CMDLINE_DEBUG}"
-CMDLINE_hx4700 = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 ${CMDLINE_DEBUG}"
+# Set the verbosity of kernel messages during runtime
+# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour..
+CMDLINE_DEBUG ?= '${@base_conditional("DISTRO_TYPE", "release", "loglevel=3", "debug", d)}'
+CMDLINE += "${CMDLINE_DEBUG}"
PACKAGES = ""
PROVIDES = ""
-DOSRC = "http://www.do13.de/openzaurus/patches"
-JLSRC = "http://www.cs.wisc.edu/~lenz/zaurus/files"
-BASRC = "http://www.orca.cx/zaurus/patches"
-CHSRC = "http://oz.drigon.com/patches"
-TKSRC = "http://www.informatik.hu-berlin.de/~tkunze/zaurus/patches"
-
# Zaurus machines need kernel size-check
KERNEL_IMAGE_MAXSIZE_akita = "1294336"
KERNEL_IMAGE_MAXSIZE_c7x0 = "1294336"
@@ -38,6 +40,11 @@ KERNEL_IMAGE_MAXSIZE_spitz = "1294336"
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"
+
# use custom function until base_version_less_or_equal is fixed
#
def kernel_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
@@ -58,31 +65,76 @@ INITRAMFS_COMPRESSION = '${@kernel_version_less_or_equal("PV", "2.6.29", "", "CO
INITRAMFS_COMPRESSION_SUFFIX = '${@kernel_version_less_or_equal("PV", "2.6.29", "gz", "lzma", d)}'
RD_COMPRESSION = '${@kernel_version_less_or_equal("PV", "2.6.29", "", "CONFIG_RD_LZMA=y", d)}'
-do_configure_append() {
-sed -i -e /CONFIG_BLK_DEV_INITRD/d \
- -e /CONFIG_KEXEC/d \
- -e /CONFIG_KERNEL/d \
- -e /CONFIG_INITRAMFS_SOURCE/d \
- -e /CONFIG_INITRAMFS_COMPRESSION/d \
- -e /CONFIG_RD/d \
- -e /=m/d \
- -e /CONFIG_MODULES/d \
- -e /CONFIG_DEBUG_ERRORS/d \
- -e /CONFIG_DEBUG_BUGVERBOSE/d \
- -e /CONFIG_DEBUG_KERNEL/d \
- ${S}/.config
-
-# Remove last tag appended by linux.inc (output messes screen)
-sed -i -e /CONFIG_CMDLINE/s/quiet/loglevel=3/1 ${S}/.config
-sed -i -e /CONFIG_CMDLINE/s/debug/loglevel=3/1 ${S}/.config
-
-echo 'CONFIG_BLK_DEV_INITRD=y
-CONFIG_KEXEC=y
-${KERNEL_COMPRESSION}
-${INITRAMFS_COMPRESSION}
-CONFIG_INITRAMFS_SOURCE="initramfs.cpio.${INITRAMFS_COMPRESSION_SUFFIX}"
-${RD_COMPRESSION}
-CONFIG_MODULES=n' >> ${S}/.config
+do_configure_prepend() {
+
+ # Rename getline in ./scripts/unifdef.c
+ # Kernels up to 2.6.29 are currently failing to build unifdef.c,
+ # clashing with exposed getline() from <stdio.h>
+ # see https://patchwork.kernel.org/patch/11166/
+ # committed in 2.6.29 (commit d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7)
+
+ if [ -e ${S}/scripts/unifdef.c ]; then
+ sed -i -e 's/getline/parseline/g' ${S}/scripts/unifdef.c
+ fi
+
+ echo "" > ${S}/.config
+
+ echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
+
+ #
+ # endian support
+ #
+ if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then
+ echo "CONFIG_CPU_BIG_ENDIAN=y" >> ${S}/.config
+ fi
+
+ #
+ # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it is going to be used
+ #
+ if [ -e ${WORKDIR}/${LOGO_SIZE}/logo_linux_clut224.ppm ]; then
+ install -m 0644 ${WORKDIR}/${LOGO_SIZE}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
+ echo "CONFIG_LOGO=y" >> ${S}/.config
+ echo "CONFIG_LOGO_LINUX_CLUT224=y" >> ${S}/.config
+ fi
+
+ # When enabling thumb for userspace we also need thumb support in the kernel
+ if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then
+ sed -i -e /CONFIG_ARM_THUMB/d ${WORKDIR}/defconfig
+ echo "CONFIG_ARM_THUMB=y" >> ${S}/.config
+ fi
+
+ sed -e '/CONFIG_CMDLINE=/d' \
+ -e '/CONFIG_CPU_BIG_ENDIAN/d' \
+ -e '/CONFIG_LOGO=/d' \
+ -e '/CONFIG_LOGO_LINUX_CLUT224=/d' \
+ -e '/CONFIG_LOCALVERSION/d' \
+ -e '/CONFIG_LOCALVERSION_AUTO/d' \
+ < '${WORKDIR}/defconfig' >>'${S}/.config'
+
+ echo 'CONFIG_LOCALVERSION="${LOCALVERSION}"' >>${S}/.config
+ echo '# CONFIG_LOCALVERSION_AUTO is not set' >>${S}/.config
+
+ # 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 \
+ -e /CONFIG_DEBUG_BUGVERBOSE/d \
+ -e /CONFIG_DEBUG_KERNEL/d \
+ ${S}/.config
+
+ echo 'CONFIG_BLK_DEV_INITRD=y' >>${S}/.config
+ echo 'CONFIG_KEXEC=y' >>${S}/.config
+ echo '${KERNEL_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
yes '' | oe_runmake oldconfig
}