]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: Ensure kernel modules get stripped
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Apr 2012 12:17:57 +0000 (13:17 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 22 Apr 2012 14:43:01 +0000 (15:43 +0100)
Kernel modules are not marked as executable but we do expect to strip them.
This patch adds in missing code to ensure we do this. Without this images
are getting sigificantly bloated in size.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index c3f077af3a1bfbe911b22dfeba2e0240c593f89b..44e551f6dd5a8400304f5eacae8a8c1846b6b72d 100644 (file)
@@ -870,6 +870,14 @@ python split_and_strip_files () {
                                elf_file = int(file_list[file][5:])
                                #bb.note("Strip %s" % file)
                                runstrip(file, elf_file, d)
+
+
+       if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):    
+               for root, dirs, files in os.walk(dvar):
+                       for f in files:
+                               if not f.endswith(".ko"):
+                                       continue
+                               runstrip(os.path.join(root, f), None, d)
        #
        # End of strip
        #