[oe-commits] [openembedded-core] 27/83: classes/kernel: fix symlink creation in DEPLOYDIR for bundled initramfs

git at git.openembedded.org git at git.openembedded.org
Fri Jul 1 15:31:55 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 2a6ac8ca71b669b8653eb19417faf58575385a21
Author: André Draszik <adraszik at tycoint.com>
AuthorDate: Fri Jun 24 11:42:32 2016 +0100

    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.
    
    Signed-off-by: André Draszik <adraszik at tycoint.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/kernel.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 59bbbe8..3127590 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -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
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list