]> code.ossystems Code Review - openembedded-core.git/commitdiff
live-vm-common.bbclass: Allow to use different kernel image than KERNEL_IMAGETYPE...
authorMartin Jansa <martin.jansa@gmail.com>
Wed, 12 Oct 2016 12:06:12 +0000 (14:06 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 15 Oct 2016 08:55:34 +0000 (09:55 +0100)
* 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)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/live-vm-common.bbclass

index c751385e7d58f1f4068532ddaae79350d849c6da..734697f9e6287e7e4aa9f3678c8d15da5b21d388 100644 (file)
@@ -31,14 +31,18 @@ inherit ${EFI_CLASS}
 inherit ${PCBIOS_CLASS}
 
 KERNEL_IMAGETYPE ??= "bzImage"
+VM_DEFAULT_KERNEL ??= "${KERNEL_IMAGETYPE}"
 
 populate_kernel() {
        dest=$1
        install -d $dest
 
        # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
-       if [ -e ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ]; then
-               install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} $dest/vmlinuz
+       bbnote "Trying to install ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} as $dest/vmlinuz"
+       if [ -e ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} ]; then
+               install -m 0644 ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} $dest/vmlinuz
+       else
+               bbwarn "${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} doesn't exist"
        fi
 
        # initrd is made of concatenation of multiple filesystem images