summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/classes/kernel.bbclass16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 943252ab9..1a71df64b 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -7,6 +7,8 @@ DEPENDS += "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}depmod virtual/$
INHIBIT_DEFAULT_DEPS = "1"
KERNEL_IMAGETYPE ?= "zImage"
+INITRAMFS_IMAGE ?= ""
+INITRAMFS_TASK ?= ""
python __anonymous () {
kerneltype = bb.data.getVar('KERNEL_IMAGETYPE', d, 1) or ''
@@ -14,6 +16,10 @@ python __anonymous () {
depends = bb.data.getVar("DEPENDS", d, 1)
depends = "%s u-boot-mkimage-native" % depends
bb.data.setVar("DEPENDS", depends, d)
+
+ image = bb.data.getVar('INITRAMFS_IMAGE', d, True)
+ if image:
+ bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d)
}
inherit kernel-arch deploy
@@ -179,8 +185,18 @@ kernel_do_configure() {
cp "${WORKDIR}/defconfig" "${S}/.config"
fi
yes '' | oe_runmake oldconfig
+
+ if [ ! -z "${INITRAMFS_IMAGE}" ]; then
+ for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do
+ if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img"
+ cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$i
+ fi
+ done
+ fi
}
+kernel_do_configure[depends] += "${INITRAMFS_TASK}"
+
do_menuconfig() {
export DISPLAY='${DISPLAY}'
export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}'