summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2016-10-12 14:06:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-15 10:01:43 +0100
commit704c8b825bcd9ebfa3bdd0901a3950ab72d253d9 (patch)
tree073f4a85f293e7c0d98393c4bc6af7a96b39034e /meta/classes
parent65eb5144f5b4a3b642d349a292c89a8771799383 (diff)
downloadpoky-704c8b825bcd9ebfa3bdd0901a3950ab72d253d9.tar.gz
live-vm-common.bbclass: Allow to use different kernel image than KERNEL_IMAGETYPE for /vmlinuz
* syslinux config hardcodes kernel image as /vmlinuz add warning message when the selected image doesn't exist and allow to select different image with VM_DEFAULT_KERNEL variable (qemuboot.bbclass is using QB_DEFAULT_KERNEL) (From OE-Core rev: e6b21d1b3716ee6f4aec1674e56f06b2963a7968) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/live-vm-common.bbclass8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/live-vm-common.bbclass b/meta/classes/live-vm-common.bbclass
index c751385e7d..734697f9e6 100644
--- a/meta/classes/live-vm-common.bbclass
+++ b/meta/classes/live-vm-common.bbclass
@@ -31,14 +31,18 @@ inherit ${EFI_CLASS}
31inherit ${PCBIOS_CLASS} 31inherit ${PCBIOS_CLASS}
32 32
33KERNEL_IMAGETYPE ??= "bzImage" 33KERNEL_IMAGETYPE ??= "bzImage"
34VM_DEFAULT_KERNEL ??= "${KERNEL_IMAGETYPE}"
34 35
35populate_kernel() { 36populate_kernel() {
36 dest=$1 37 dest=$1
37 install -d $dest 38 install -d $dest
38 39
39 # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use. 40 # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
40 if [ -e ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ]; then 41 bbnote "Trying to install ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} as $dest/vmlinuz"
41 install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} $dest/vmlinuz 42 if [ -e ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} ]; then
43 install -m 0644 ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} $dest/vmlinuz
44 else
45 bbwarn "${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} doesn't exist"
42 fi 46 fi
43 47
44 # initrd is made of concatenation of multiple filesystem images 48 # initrd is made of concatenation of multiple filesystem images