summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorKevin Hao <kexin.hao@windriver.com>2018-08-14 09:31:22 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-15 21:45:58 +0100
commit9f66ec6cb80d543b8eb86db70dcdd7d0cbe3ce64 (patch)
tree6dd05f0ccb4196427187a43746e172a7d6d1b6d7 /scripts
parentb5648a0319b08fe63642bbb545d2a7c57d7ad38f (diff)
downloadpoky-9f66ec6cb80d543b8eb86db70dcdd7d0cbe3ce64.tar.gz
wic: bootimg-partition: Use the relative path in the install_task
(From OE-Core rev: 3a85df7bde1e82cd508da8a78b930fa361a0e720) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-partition.py14
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):
111 111
112 logger.debug('Globbed sources: %s', ', '.join(srcs)) 112 logger.debug('Globbed sources: %s', ', '.join(srcs))
113 for entry in srcs: 113 for entry in srcs:
114 src = os.path.relpath(entry, kernel_dir)
114 entry_dst_name = entry_name_fn(entry) 115 entry_dst_name = entry_name_fn(entry)
115 install_task.append((entry, 116 install_task.append((src, entry_dst_name)))
116 os.path.join(hdddir,
117 entry_dst_name)))
118 else: 117 else:
119 install_task = [(os.path.join(kernel_dir, src), 118 install_task = [(src, dst)]
120 os.path.join(hdddir, dst))]
121 119
122 for task in install_task: 120 for task in install_task:
123 src_path, dst_path = task 121 src_path, dst_path = task
124 logger.debug('Install %s as %s', 122 logger.debug('Install %s as %s', src_path, dst_path)
125 os.path.basename(src_path), dst_path)
126 install_cmd = "install -m 0644 -D %s %s" \ 123 install_cmd = "install -m 0644 -D %s %s" \
127 % (src_path, dst_path) 124 % (os.path.join(kernel_dir, src_path),
125 os.path.join(hdddir, dst_path))
128 exec_cmd(install_cmd) 126 exec_cmd(install_cmd)
129 127
130 logger.debug('Prepare boot partition using rootfs in %s', hdddir) 128 logger.debug('Prepare boot partition using rootfs in %s', hdddir)