summaryrefslogtreecommitdiffstats
path: root/rules/templates
diff options
context:
space:
mode:
authorRoland Hieber <r.hieber@pengutronix.de>2017-06-16 20:33:24 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-06-21 10:14:53 +0200
commit1c45f9c87ccf0fe8560e5bf70740baac792d9206 (patch)
tree40dd6328b5670d3135709b6a20df847e110f2e8e /rules/templates
parent9ba42583728954a1e69bd4f318ce92ca32447d84 (diff)
downloadptxdist-1c45f9c87ccf0fe8560e5bf70740baac792d9206.tar.gz
ptxdist-1c45f9c87ccf0fe8560e5bf70740baac792d9206.tar.xz
templates/kernel.make: don't try to strip non-executables
The current targetinstall in the template can fail when a new kernel package is targetinstall'd: arm-v7a-linux-gnueabihf-strip:platform-v7a/packages/linux-4.9.30/lib/modules/4.9.30/modules.symbols.bin: File format not recognized Error: install_file failed! This happens because the old rule passes the 'k' parameter to install_copy for every file found in the .../linux-4.9.30/lib, which effectively tries to also strip non-ELF files in that directory, like the mentioned modules.symbols.bin. The new implementation (copied from /rules/kernel.make) only passes the 'k' parameter for *.ko files in the lib folder, which causes only those files to be stripped. The second install_glob rule then installs all remaining files without stripping them. Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/templates')
-rw-r--r--rules/templates/template-kernel-make8
1 files changed, 3 insertions, 5 deletions
diff --git a/rules/templates/template-kernel-make b/rules/templates/template-kernel-make
index be460f187..15ce77af1 100644
--- a/rules/templates/template-kernel-make
+++ b/rules/templates/template-kernel-make
@@ -98,11 +98,9 @@ $(STATEDIR)/kernel-@package@.targetinstall:
@$(call install_copy, kernel-@package@, 0, 0, 0644, \
$(IMAGEDIR)/@image@-@package@, /boot/@image@-@package@, n)
- @cd $(KERNEL_@PACKAGE@_PKGDIR) && \
- find lib -type f | while read file; do \
- $(call install_copy, kernel-@package@, \
- 0, 0, 0644, -, /$${file}, k) \
- done
+ @$(call install_glob, kernel-@package@, 0, 0, -, /lib/modules, *.ko,, k)
+ @$(call install_glob, kernel-@package@, 0, 0, -, /lib/modules,, *.ko */build */source, n)
+
@$(call install_finish, kernel-@package@)
@$(call touch)