diff options
-rw-r--r-- | meta/classes/kernel.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 383043ed9c..624b15101e 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -244,7 +244,11 @@ kernel_do_install() { find . -depth -not -path "./Documentation*" -not -path "./.*" -print0 | cpio --null -pdlu $kerneldir cd "$pwd" fi - install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE} + + # Test to ensure that the output file and image type are not actually + # the same file. If hardlinking is used, they will be the same, and there's + # no need to install. + ![ ${KERNEL_OUTPUT} -ef $kerneldir/${KERNEL_IMAGETYPE} ] && install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE} install -m 0644 System.map $kerneldir/System.map-${KERNEL_VERSION} # Dummy Makefile so the clean below works |