All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] module_strip.bbclass: look for modules in right directory
@ 2009-11-22  4:07 Martin Jansa
  2009-11-22  4:08 ` [PATCH 2/2] kernel.bbclass: deploy both stripped and non-stripped modules in tgz Martin Jansa
  2009-11-22 20:18 ` [PATCH 1/2] module_strip.bbclass: look for modules in right directory Richard Purdie
  0 siblings, 2 replies; 3+ messages in thread
From: Martin Jansa @ 2009-11-22  4:07 UTC (permalink / raw)
  To: openembedded-devel

* After 29c7d3351f43678c6e93b707b301832009f64b31 modules are not in
  install directory but in package, packages-split
* modules*.tgz is created BEFORE this, so it contains non stripped
  modules
* for modules*.tgz with stripped modules see following patch
---
 classes/module_strip.bbclass |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/classes/module_strip.bbclass b/classes/module_strip.bbclass
index 3316e20..1740919 100644
--- a/classes/module_strip.bbclass
+++ b/classes/module_strip.bbclass
@@ -2,11 +2,11 @@
 
 do_strip_modules () {
 	for p in ${PACKAGES}; do
-		if test -e ${WORKDIR}/install/$p/lib/modules; then
+		if test -e ${PKGDEST}/$p/lib/modules; then
 			if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then
-				modules="`find ${WORKDIR}/install/$p/lib/modules -name \*.ko`"
+				modules="`find ${PKGDEST}/${p}/lib/modules -name \*.ko`"
 			else
-				modules="`find ${WORKDIR}/install/$p/lib/modules -name \*.o`"
+				modules="`find ${PKGDEST}/${p}/lib/modules -name \*.o`"
 			fi
 			if [ -n "$modules" ]; then
 				for module in $modules ; do
-- 
1.6.5.3




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] kernel.bbclass: deploy both stripped and non-stripped modules in tgz
  2009-11-22  4:07 [PATCH 1/2] module_strip.bbclass: look for modules in right directory Martin Jansa
@ 2009-11-22  4:08 ` Martin Jansa
  2009-11-22 20:18 ` [PATCH 1/2] module_strip.bbclass: look for modules in right directory Richard Purdie
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2009-11-22  4:08 UTC (permalink / raw)
  To: openembedded-devel

* Change name of old modules*.tgz file to modules*-dbg.tgz
* Run do_strip_modules in PKGDEST for every package and then in PKGD,
  from where .tgz will be created, just because I haven't found where
  do_strip_modules can be hooked, to be run only in PKGD before files
  are copied to PKGDEST, or are they moved directly from source?
* After do_strip_modules create modules*.tgz with stripped modules
---
 classes/kernel.bbclass       |    2 +-
 classes/module_strip.bbclass |   26 ++++++++++++++++++++++++--
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index 637805e..335957d 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -528,7 +528,7 @@ do_deploy() {
 	package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin
 
 	if [ -d "${D}/lib" ]; then
-		fakeroot tar -cvzf ${DEPLOY_DIR_IMAGE}/${MODULES_IMAGE_BASE_NAME}.tgz -C ${D} lib
+		fakeroot tar -cvzf ${DEPLOY_DIR_IMAGE}/${MODULES_IMAGE_BASE_NAME}-dbg.tgz -C ${D} lib
 	fi
 
 	cd ${DEPLOY_DIR_IMAGE}
diff --git a/classes/module_strip.bbclass b/classes/module_strip.bbclass
index 1740919..d69acc0 100644
--- a/classes/module_strip.bbclass
+++ b/classes/module_strip.bbclass
@@ -13,14 +13,36 @@ do_strip_modules () {
 					if ! [ -d "$module"  ] ; then
 						${STRIP} -v -g $module
 					fi
-				done	
-#				NM="${CROSS_DIR}/bin/${HOST_PREFIX}nm" OBJCOPY="${CROSS_DIR}/bin/${HOST_PREFIX}objcopy" strip_module $modules
+				done
+#			      NM="${CROSS_DIR}/bin/${HOST_PREFIX}nm" OBJCOPY="${CROSS_DIR}/bin/${HOST_PREFIX}objcopy" strip_module $modules
 			fi
 		fi
 	done
+	if test -e ${PKGD}/lib/modules; then
+		if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then
+			modules="`find ${PKGD}/lib/modules -name \*.ko`"
+		else
+			modules="`find ${PKGD}/lib/modules -name \*.o`"
+		fi
+		if [ -n "$modules" ]; then
+			for module in $modules ; do
+				if ! [ -d "$module"  ] ; then
+					${STRIP} -v -g $module
+				fi
+			done	
+#			NM="${CROSS_DIR}/bin/${HOST_PREFIX}nm" OBJCOPY="${CROSS_DIR}/bin/${HOST_PREFIX}objcopy" strip_module $modules
+		fi
+	fi
+}
+
+do_deploy_stripped_modules () {
+	if [ -d "${PKGD}/lib" ]; then
+		fakeroot tar -cvzf ${DEPLOY_DIR_IMAGE}/${MODULES_IMAGE_BASE_NAME}.tgz -C ${PKGD} lib
+	fi
 }
 
 python do_package_append () {
 	if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1'):
 		bb.build.exec_func('do_strip_modules', d)
+		bb.build.exec_func('do_deploy_stripped_modules', d)
 }
-- 
1.6.5.3




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] module_strip.bbclass: look for modules in right directory
  2009-11-22  4:07 [PATCH 1/2] module_strip.bbclass: look for modules in right directory Martin Jansa
  2009-11-22  4:08 ` [PATCH 2/2] kernel.bbclass: deploy both stripped and non-stripped modules in tgz Martin Jansa
@ 2009-11-22 20:18 ` Richard Purdie
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2009-11-22 20:18 UTC (permalink / raw)
  To: openembedded-devel

On Sun, 2009-11-22 at 05:07 +0100, Martin Jansa wrote:
> * After 29c7d3351f43678c6e93b707b301832009f64b31 modules are not in
>   install directory but in package, packages-split
> * modules*.tgz is created BEFORE this, so it contains non stripped
>   modules
> * for modules*.tgz with stripped modules see following patch
> ---
>  classes/module_strip.bbclass |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

Acked-by: Richard Purdie <rpurdie@linux.intel.com>






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-22 20:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-22  4:07 [PATCH 1/2] module_strip.bbclass: look for modules in right directory Martin Jansa
2009-11-22  4:08 ` [PATCH 2/2] kernel.bbclass: deploy both stripped and non-stripped modules in tgz Martin Jansa
2009-11-22 20:18 ` [PATCH 1/2] module_strip.bbclass: look for modules in right directory Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.