mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <r.hieber@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <r.hieber@pengutronix.de>
Subject: [ptxdist] [PATCH] templates/kernel.make: don't try to strip non-executables
Date: Fri, 16 Jun 2017 20:33:24 +0200	[thread overview]
Message-ID: <20170616183324.22673-1-r.hieber@pengutronix.de> (raw)

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

                 reply	other threads:[~2017-06-16 18:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170616183324.22673-1-r.hieber@pengutronix.de \
    --to=r.hieber@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox