Skip to contentSkip to conversation

package.bbclass: Ensure kernel modules get stripped

PATCH In review Richard Purdie 2 participants 2 messages Apr 19, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package.bbclass: Ensure kernel modules get stripped

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.

---

meta/classes/package.bbclass +8 -0
index c3f077a..44e551f 100644
@@ -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
 	#
#1 lore raw
Quoted 5 lines · Richard Purdie

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.

cool, that explains why I had a 190 MB modules.tar.bz2 when building a test image for a Pandaboard last weekend ;-)

Eric