summaryrefslogtreecommitdiff
path: root/classes/module_strip.bbclass
blob: ce36e213ffca2b4d15178d02669c5fc72e1cd01e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
PACKAGESTRIPFUNCS += "do_strip_modules"

do_strip_modules () {
	if test -e ${PKGDEST}/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	
		fi
	fi
}