diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/kernel-arch.bbclass | 1 | ||||
-rw-r--r-- | classes/package.bbclass | 26 | ||||
-rw-r--r-- | classes/rootfs_ipk.bbclass | 2 |
3 files changed, 18 insertions, 11 deletions
diff --git a/classes/kernel-arch.bbclass b/classes/kernel-arch.bbclass index 92a6c982fb..b331d25614 100644 --- a/classes/kernel-arch.bbclass +++ b/classes/kernel-arch.bbclass @@ -19,6 +19,7 @@ def map_kernel_arch(a, d): elif re.match('armeb$', a): return 'arm' elif re.match('powerpc$', a): return 'ppc' elif re.match('mipsel$', a): return 'mips' + elif re.match('sh(3|4)$', a): return 'sh' elif a in valid_archs: return a else: bb.error("cannot map '%s' to a linux kernel architecture" % a) diff --git a/classes/package.bbclass b/classes/package.bbclass index 97e091c254..eb3a0349cb 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -177,8 +177,10 @@ runstrip() { ro=1 chmod +w "$1" } + '${OBJCOPY}' --only-keep-debug "$1" "$1.dbg" '${STRIP}' "$1" st=$? + '${OBJCOPY}' --add-gnu-debuglink="$1.dbg" "$1" test -n "$ro" && chmod -w "$1" if test $st -ne 0 then @@ -249,6 +251,21 @@ python populate_packages () { bb.error("%s is listed in PACKAGES mutliple times. Undefined behaviour will result." % pkg) pkgs += pkg + if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1'): + stripfunc = "" + for root, dirs, files in os.walk(dvar): + for f in files: + file = os.path.join(root, f) + if not os.path.islink(file) and isexec(file): + stripfunc += "\trunstrip %s || st=1\n" % (file) + if not stripfunc == "": + from bb import build + localdata = bb.data.createCopy(d) + # strip + bb.data.setVar('RUNSTRIP', '\tlocal st\n\tst=0\n%s\treturn $st' % stripfunc, localdata) + bb.data.setVarFlag('RUNSTRIP', 'func', 1, localdata) + bb.build.exec_func('RUNSTRIP', localdata) + for pkg in packages.split(): localdata = bb.data.createCopy(d) root = os.path.join(workdir, "install", pkg) @@ -273,7 +290,6 @@ python populate_packages () { bb.mkdirhier(root) filesvar = bb.data.getVar('FILES', localdata, 1) or "" files = filesvar.split() - stripfunc = "" for file in files: if os.path.isabs(file): file = '.' + file @@ -293,17 +309,9 @@ python populate_packages () { fpath = os.path.join(root,file) dpath = os.path.dirname(fpath) bb.mkdirhier(dpath) - if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1') and not os.path.islink(file) and isexec(file): - stripfunc += "\trunstrip %s || st=1\n" % fpath ret = bb.movefile(file,fpath) if ret is None or ret == 0: raise bb.build.FuncFailed("File population failed") - if not stripfunc == "": - from bb import build - # strip - bb.data.setVar('RUNSTRIP', '\tlocal st\n\tst=0\n%s\treturn $st' % stripfunc, localdata) - bb.data.setVarFlag('RUNSTRIP', 'func', 1, localdata) - bb.build.exec_func('RUNSTRIP', localdata) del localdata os.chdir(workdir) diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass index b2b7479fad..2b92415b58 100644 --- a/classes/rootfs_ipk.bbclass +++ b/classes/rootfs_ipk.bbclass @@ -31,8 +31,6 @@ real_do_rootfs () { mkdir -p ${IMAGE_ROOTFS}/dev if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then - rm -f ${DEPLOY_DIR_IPK}/Packages - touch ${DEPLOY_DIR_IPK}/Packages ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK} fi mkdir -p ${T} |