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 <[email protected]>
---
 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-@[email protected]:
        @$(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
[email protected]

Reply via email to