diff options
author | Kevin Hao <kexin.hao@windriver.com> | 2018-08-14 09:31:22 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-15 21:45:10 +0100 |
commit | 3a85df7bde1e82cd508da8a78b930fa361a0e720 (patch) | |
tree | 09f28dc82450fc0f63acd861f9311f7d818eb0e9 | |
parent | d7130a7d0e61021f71fec1d7ae7d37ebb27f0e03 (diff) | |
download | openembedded-core-3a85df7bde1e82cd508da8a78b930fa361a0e720.tar.gz openembedded-core-3a85df7bde1e82cd508da8a78b930fa361a0e720.tar.bz2 openembedded-core-3a85df7bde1e82cd508da8a78b930fa361a0e720.zip |
wic: bootimg-partition: Use the relative path in the install_task
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-partition.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py index b239fc0b4c..9480eed6d8 100644 --- a/scripts/lib/wic/plugins/source/bootimg-partition.py +++ b/scripts/lib/wic/plugins/source/bootimg-partition.py @@ -111,20 +111,18 @@ class BootimgPartitionPlugin(SourcePlugin): logger.debug('Globbed sources: %s', ', '.join(srcs)) for entry in srcs: + src = os.path.relpath(entry, kernel_dir) entry_dst_name = entry_name_fn(entry) - install_task.append((entry, - os.path.join(hdddir, - entry_dst_name))) + install_task.append((src, entry_dst_name))) else: - install_task = [(os.path.join(kernel_dir, src), - os.path.join(hdddir, dst))] + install_task = [(src, dst)] for task in install_task: src_path, dst_path = task - logger.debug('Install %s as %s', - os.path.basename(src_path), dst_path) + logger.debug('Install %s as %s', src_path, dst_path) install_cmd = "install -m 0644 -D %s %s" \ - % (src_path, dst_path) + % (os.path.join(kernel_dir, src_path), + os.path.join(hdddir, dst_path)) exec_cmd(install_cmd) logger.debug('Prepare boot partition using rootfs in %s', hdddir) |