From 6499b64e6fd59e28ed915f06f0c7b6c9b897e891 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 9 Feb 2010 12:02:24 +0100 Subject: multi-kernel.inc: include file to build and deploy multiple kernel and module sets from a single recipe --- recipes/linux/multi-kernel.inc | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 recipes/linux/multi-kernel.inc diff --git a/recipes/linux/multi-kernel.inc b/recipes/linux/multi-kernel.inc new file mode 100644 index 0000000000..f8fd950a85 --- /dev/null +++ b/recipes/linux/multi-kernel.inc @@ -0,0 +1,42 @@ +# This .inc file allows you to build and deploy multiple sets of kernel + modules with different defconfigs +# +# Note that this include will NOT stage anything nor create packages, since that is virtuall impossible +# Userspace should be built against the 'regular' kernel +# +# The intended usecase is for machines that has mutually exclusive drivers due to e.g. pinmuxing issues. +# For example the LogicPD omap-l138 experimenter board can have multiple mutually exclusive expansion boards +# like lcd, ethernet, sound, 20x2 character LCD, etc. To be able to easily test all of those you can use this .inc +# +# To make it easier finding the original defconfig from a running kernel, this also forcefully turns on +# CONFIG_IKCONFIG_PROC so people can do 'zcat /proc/config.gz' on the target. + +require linux.inc + +SRC_URI = " \ + file://configs/" + + +do_compile() { + for config in ${WORKDIR}/configs/* ; do + cp $config ${WORKDIR}/defconfig + echo "CONFIG_IKCONFIG=y" >> ${WORKDIR}/defconfig + echo "CONFIG_IKCONFIG_PROC=y" >> ${WORKDIR}/defconfig + + do_configure + kernel_do_compile + kernel_do_install + + cp arch/${ARCH}/boot/uImage ${DEPLOY_DIR_IMAGE}/uImage.multi-config-$(basename $config) + + if [ -d "${D}/lib" ]; then + fakeroot tar -cvzf ${DEPLOY_DIR_IMAGE}/${MODULES_IMAGE_BASE_NAME}.multi-config-$(basename $config).tgz -C ${D} lib + fi + done +} + +do_install() { + : +} + + + -- cgit v1.2.3