classes/kernel: fix symlink creation in DEPLOYDIR for bundled initramfs

If multiple kernel image types have been specified, only the very first
one would receive a symlink in DEPLOYDIR.

The reason is that we're looping over the list of image types and check
if a bundled initramfs images exists using a relative path. As part of
the loop we're changing the current directory, hence all additional
iterations fail to see the files we're looking for, and hence no symlinks
are being created.

Fix by not changing the directory and adjusting the ln invocation instead.

(From OE-Core rev: 2a6ac8ca71b669b8653eb19417faf58575385a21)

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>
This commit is contained in:
André Draszik 2016-06-24 11:42:32 +01:00 committed by Richard Purdie
parent dc1b016636
commit 83444bbe2d
1 changed files with 1 additions and 2 deletions

View File

@ -586,8 +586,7 @@ kernel_do_deploy() {
initramfs_base_name=${type}-${INITRAMFS_BASE_NAME}
initramfs_symlink_name=${type}-initramfs-${MACHINE}
install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs ${DEPLOYDIR}/${initramfs_base_name}.bin
cd ${DEPLOYDIR}
ln -sf ${initramfs_base_name}.bin ${initramfs_symlink_name}.bin
ln -sf ${initramfs_base_name}.bin ${DEPLOYDIR}/${initramfs_symlink_name}.bin
fi
done
}