Extract x86 busybox first

Fix #1600
This commit is contained in:
topjohnwu 2019-07-16 01:16:29 -07:00
parent 7ba8202af5
commit 1f8df419c4

View File

@ -3,8 +3,8 @@ X86_CNT=__X86_CNT__
extract_bb() {
touch "$BBBIN"
chmod 755 "$BBBIN"
dd if="$0" of="$BBBIN" bs=1024 skip=$(($X86_CNT + 1))
"$BBBIN" >/dev/null || dd if="$0" of="$BBBIN" bs=1024 skip=1 count=$X86_CNT
dd if="$0" of="$BBBIN" bs=1024 skip=1 count=$X86_CNT
"$BBBIN" >/dev/null || dd if="$0" of="$BBBIN" bs=1024 skip=$(($X86_CNT + 1))
}
setup_bb() {
export BBDIR=$TMPDIR/bin