diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-11-14 11:55:26 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-15 15:27:08 +0000 |
commit | db7f8d4114267ed34c19dc66dd56c2372354b43f (patch) | |
tree | 66fcb185ae60e1e2612d661f01243d8bb323be10 /meta | |
parent | 9fdd8adc17dc732d3983afcaa30b63d69f483dad (diff) | |
download | poky-db7f8d4114267ed34c19dc66dd56c2372354b43f.tar.gz |
kernel.bbclass: test for hardlinks before installing
commit df564c4 [kernel: Use hardlinks for do_populate_sysroot for speed]
does indeed speed up the build, but it also means that the KERNEL_OUPUT
and KERNEL_IMAGETYPE may be hardlinks.
If they are hardlinks, install complains that they are actually the same
file and stops the build. We can easily test and avoid the copy if the
file is already in place.
[YOCTO #5527]
(From OE-Core rev: 6a3b3e501c66733216ac43d3f020cfdb512dd640)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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() { | |||
244 | find . -depth -not -path "./Documentation*" -not -path "./.*" -print0 | cpio --null -pdlu $kerneldir | 244 | find . -depth -not -path "./Documentation*" -not -path "./.*" -print0 | cpio --null -pdlu $kerneldir |
245 | cd "$pwd" | 245 | cd "$pwd" |
246 | fi | 246 | fi |
247 | install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE} | 247 | |
248 | # Test to ensure that the output file and image type are not actually | ||
249 | # the same file. If hardlinking is used, they will be the same, and there's | ||
250 | # no need to install. | ||
251 | ![ ${KERNEL_OUTPUT} -ef $kerneldir/${KERNEL_IMAGETYPE} ] && install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE} | ||
248 | install -m 0644 System.map $kerneldir/System.map-${KERNEL_VERSION} | 252 | install -m 0644 System.map $kerneldir/System.map-${KERNEL_VERSION} |
249 | 253 | ||
250 | # Dummy Makefile so the clean below works | 254 | # Dummy Makefile so the clean below works |