]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: Split out the base name of QB_DEFAULT_KERNEL
authorAlistair Francis <alistair.francis@xilinx.com>
Thu, 3 Nov 2016 00:17:16 +0000 (17:17 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 15 Nov 2016 15:18:47 +0000 (15:18 +0000)
The function write_qemuboot_conf() in qemuboot.bbclass always inserts
the full path into QB_DEFAULT_KERNEL. Remove this path before using the
variable.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/runqemu

index 6952f3210b577030a538db321465e01d4b1d526d..af254234df90eef7a1732be112326d05cab98d9a 100755 (executable)
@@ -478,9 +478,12 @@ class BaseConfig(object):
         if self.fstype in self.vmtypes:
             return
 
+        # QB_DEFAULT_KERNEL is always a full file path
+        kernel_name = os.path.basename(self.get('QB_DEFAULT_KERNEL'))
+
         deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
         if not self.kernel:
-            kernel_match_name = "%s/%s" % (deploy_dir_image, self.get('QB_DEFAULT_KERNEL'))
+            kernel_match_name = "%s/%s" % (deploy_dir_image, kernel_name)
             kernel_match_link = "%s/%s" % (deploy_dir_image, self.get('KERNEL_IMAGETYPE'))
             kernel_startswith = "%s/%s*" % (deploy_dir_image, self.get('KERNEL_IMAGETYPE'))
             cmds = (kernel_match_name, kernel_match_link, kernel_startswith)