mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] templates/kernel.make: don't try to strip non-executables
@ 2017-06-16 18:33 Roland Hieber
  0 siblings, 0 replies; only message in thread
From: Roland Hieber @ 2017-06-16 18:33 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

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>
---
 rules/templates/template-kernel-make | 8 +++-----
 1 file 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)
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-16 18:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-16 18:33 [ptxdist] [PATCH] templates/kernel.make: don't try to strip non-executables Roland Hieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox