aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-09-14 14:06:17 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-09-15 16:02:37 +0200
commit7296cf374d9ec92c394edf965d5347742fe5aed9 (patch)
treea4d5368d0b4141bc1c7c386fb3b2dec52b382d20 /sys/linux
parentf7eb58493bfd55623555b32685be3679ccc0b3e9 (diff)
sys/syz-extract: generate multiple arches at once
Diffstat (limited to 'sys/linux')
-rwxr-xr-xsys/linux/extract.sh21
1 files changed, 5 insertions, 16 deletions
diff --git a/sys/linux/extract.sh b/sys/linux/extract.sh
index 9a5ba45f0..e6dc9e880 100755
--- a/sys/linux/extract.sh
+++ b/sys/linux/extract.sh
@@ -5,6 +5,8 @@
# Assuming x86 host, you also need to install:
# sudo apt-get install gcc-aarch64-linux-gnu gcc-powerpc64le-linux-gnu gcc-arm-linux-gnueabihf
+set -eu
+
if [ "$LINUX" == "" ]; then
if [ "$ANDROID" == "" ]; then
echo "usage: make extract LINUX=/linux/checkout]"
@@ -34,24 +36,11 @@ UPSTREAM_FILES="bpf.txt dri.txt fuse.txt input.txt ipc.txt
ANDROID_FILES="tlk_device.txt ion.txt"
if [ "$BUILD_FOR_ANDROID" == "no" ]; then
+ ARCHES=""
FILES="$UPSTREAM_FILES"
else
+ ARCHES="amd64,arm64"
FILES="$ANDROID_FILES"
fi
-generate_arch() {
- echo generating arch $1...
- (cd sys/linux; ../../bin/syz-extract -arch $1 -linux "$LINUX" -build $FILES)
- if [ $? -ne 0 ]; then
- exit 1
- fi
- echo
-}
-
-generate_arch amd64
-generate_arch arm64
-if [ "$BUILD_FOR_ANDROID" == "no" ]; then
- generate_arch 386
- generate_arch arm
- generate_arch ppc64le
-fi
+(cd sys/linux; ../../bin/syz-extract -build -arch "$ARCHES" -linux "$LINUX" $FILES)