diff options
author | André Draszik <adraszik@tycoint.com> | 2016-06-24 14:40:08 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-01 16:22:44 +0100 |
commit | 820a9d0cb66563ae66f0b46d4bdd7efe673fc482 (patch) | |
tree | 9c1672e0dc93876ea33e45e5555d513022586b37 /meta/classes | |
parent | 1b29aff0e0ca00c9125e29f8d229ec22ef0350d8 (diff) | |
download | poky-820a9d0cb66563ae66f0b46d4bdd7efe673fc482.tar.gz |
classes/kernel: fix symlink logic when bundling initramfs images
If linkpath points to the a file in KERNEL_OUTPUT_DIR, rather than
outside, then symlink creation for the bundled initramfs image files
fails.
This is because in that case $linkpath.initramfs and $realpath.initramfs
are in the same directory, KERNEL_OUTPUT_DIR, and hence are the same.
Since we just created $realpath.initramfs, creating a symlink with the
same name will fail.
Given that $linkpath is not necessarily the same as the kernel image type,
just removing this symlink creation is not the right thing to do, as
in that case kernel_do_deploy() wouldn't find the bundled file.
What we really want is a symlink from the name of the initramfs-bundled
kernel image type to the real initramfs-bundled kernel image, as that is
what is actually used later in do_deploy().
This brings the code path for when $KERNEL_OUTPUT_DIR/$type is a symlink
in line with when it is not.
(From OE-Core rev: 7585ebbbe4e95870ab7475737ed5b94255351c72)
Signed-off-by: André Draszik <adraszik@tycoint.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/kernel.bbclass | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 3127590480..a56b66b291 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -232,8 +232,7 @@ do_bundle_initramfs () { | |||
232 | if [ -n "$realpath" ]; then | 232 | if [ -n "$realpath" ]; then |
233 | mv -f $realpath $realpath.initramfs | 233 | mv -f $realpath $realpath.initramfs |
234 | mv -f $realpath.bak $realpath | 234 | mv -f $realpath.bak $realpath |
235 | cd ${B}/${KERNEL_OUTPUT_DIR} | 235 | ln -sf $linkpath.initramfs ${B}/${KERNEL_OUTPUT_DIR}/$type.initramfs |
236 | ln -sf $linkpath.initramfs | ||
237 | else | 236 | else |
238 | mv -f ${KERNEL_OUTPUT_DIR}/$type ${KERNEL_OUTPUT_DIR}/$type.initramfs | 237 | mv -f ${KERNEL_OUTPUT_DIR}/$type ${KERNEL_OUTPUT_DIR}/$type.initramfs |
239 | mv -f ${KERNEL_OUTPUT_DIR}/$type.bak ${KERNEL_OUTPUT_DIR}/$type | 238 | mv -f ${KERNEL_OUTPUT_DIR}/$type.bak ${KERNEL_OUTPUT_DIR}/$type |