Created
March 2, 2016 06:22
-
-
Save mikaelj/f730e196e8a0915fb2ce to your computer and use it in GitHub Desktop.
shc and failed builds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SRC_URI="https://github.com/existz/shc-3.8.9/archive/master.tar.gz;protocol=git \ | |
file://fix-strip.patch \ | |
" | |
RECIPE_TYPES = "native" | |
S = "${SRCDIR}/shc-3.8.9-master" | |
inherit c | |
do_compile() { | |
$CC -o shc shc.c | |
} | |
do_install() { | |
install -d ${D}${bindir} | |
install -m 755 shc ${D}${bindir} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### the resulting compiled files are linked to ld-linux.so.3, which doesn't exist on my system. (I have the armhf.so.3 version) | |
### | |
DEPENDS = "native:shc" | |
inherit c fakeroot | |
S = "${SRCDIR}/static" | |
do_compile[prefuncs] += " do_compile_pre" | |
do_compile_pre() { | |
rm -rf ${SRCDIR}/static | |
cp -r ${TOPDIR}/fs/static ${SRCDIR}/static | |
} | |
TARGET_PLATFORM:HOST_CPU_x86 = "s3" | |
TARGET_PLATFORM:HOST_CPU_arm = "s4" | |
do_compile() { | |
ext=$TARGET_PLATFORM | |
for script in s-decrypt s-verify; do | |
CC=$CC shc -r -v -f $script.$ext && mv $script.$ext.x $script && rm $script.$ext.x.c | |
done | |
} | |
fakeroot do_install() { | |
rm -rf ${IMAGE_DEPLOY_DIR}/static | |
rm -rf ${IMAGE_DEPLOY_DIR}/static.tar.gz | |
install -d ${IMAGE_DEPLOY_DIR}/static | |
for script in .version .filesystem s-decrypt s-include s-install s-kernel s-rootfs s-upgrade s-verify; do | |
install -m 755 $script ${IMAGE_DEPLOY_DIR}/static/$script | |
done | |
chmod -x ${IMAGE_DEPLOY_DIR}/static/s-include | |
chmod -x ${IMAGE_DEPLOY_DIR}/static/.version | |
chmod -x ${IMAGE_DEPLOY_DIR}/static/.filesystem | |
rm -rf ${IMAGE_DEPLOY_DIR}/data | |
rm -rf ${IMAGE_DEPLOY_DIR}/data.tar.gz | |
cp -r ${TOPDIR}/fs/data ${IMAGE_DEPLOY_DIR}/data | |
chmod 777 ${IMAGE_DEPLOY_DIR}/data/share | |
chmod 700 ${IMAGE_DEPLOY_DIR}/data/share/ssh | |
for pkg in static data; do | |
pushd ${IMAGE_DEPLOY_DIR}/$pkg | |
find . -type f -print0 | xargs -0 md5sum > ../$pkg.md5 | |
tar czf ../$pkg.tar.gz . | |
popd | |
done | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
running prefunc do_compile_pre | |
> LC_ALL=C /data/tlabos/1.1.x/tmp/work/machine/arm-cortexa9neont-linux-gnueabi/static-scripts-0/tmp/do_compile_pre.20160301112305.run | |
+ cd /data/tlabos/1.1.x/tmp/work/machine/arm-cortexa9neont-linux-gnueabi/static-scripts-0/src/static | |
+ do_compile_pre | |
+ rm -rf /data/tlabos/1.1.x/tmp/work/machine/arm-cortexa9neont-linux-gnueabi/static-scripts-0/src/static | |
+ cp -r /data/tlabos/1.1.x/fs/static /data/tlabos/1.1.x/tmp/work/machine/arm-cortexa9neont-linux-gnueabi/static-scripts-0/src/static | |
> LC_ALL=C /data/tlabos/1.1.x/tmp/work/machine/arm-cortexa9neont-linux-gnueabi/static-scripts-0/tmp/do_compile.20160301112305.run | |
+ cd /data/tlabos/1.1.x/tmp/work/machine/arm-cortexa9neont-linux-gnueabi/static-scripts-0/src/static | |
+ do_compile | |
+ ext=s4 | |
+ for script in s-decrypt s-verify | |
+ CC=arm-cortexa9neont-linux-gnueabi-gcc | |
+ shc -r -v -f s-decrypt.s4 | |
shc shll=bash | |
shc [-i]=-c | |
shc [-x]=exec '%s' "$@" | |
shc [-l]= | |
shc opts= | |
shc: arm-cortexa9neont-linux-gnueabi-gcc -O2 -fexpensive-optimizations -fomit-frame-pointer -frename-registers s-decrypt.s4.x.c -o s-decrypt.s4.x | |
shc: arm-cortexa9neont-linux-gnueabi-strip s-decrypt.s4.x | |
shc: chmod go-r s-decrypt.s4.x | |
+ mv s-decrypt.s4.x s-decrypt | |
+ rm s-decrypt.s4.x.c | |
+ for script in s-decrypt s-verify | |
+ CC=arm-cortexa9neont-linux-gnueabi-gcc | |
+ shc -r -v -f s-verify.s4 | |
shc shll=bash | |
shc [-i]=-c | |
shc [-x]=exec '%s' "$@" | |
shc [-l]= | |
shc opts= | |
shc: arm-cortexa9neont-linux-gnueabi-gcc -O2 -fexpensive-optimizations -fomit-frame-pointer -frename-registers s-verify.s4.x.c -o s-verify.s4.x | |
shc: arm-cortexa9neont-linux-gnueabi-strip s-verify.s4.x | |
shc: chmod go-r s-verify.s4.x | |
+ mv s-verify.s4.x s-verify | |
+ rm s-verify.s4.x.c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment