diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-09-14 13:49:21 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-09-15 16:02:37 +0200 |
| commit | f7eb58493bfd55623555b32685be3679ccc0b3e9 (patch) | |
| tree | b42f877191fb5a37d8e68874525f7e53d91d5385 /sys/linux | |
| parent | 75ddf7ab901e1ecef20d30f276b9360363b1fee6 (diff) | |
sys/syz-extract: use consolidated target info
Move knowledge about targets from extract.sh to syz-extract,
and make it use target into from sys.
Diffstat (limited to 'sys/linux')
| -rwxr-xr-x | sys/linux/extract.sh | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/sys/linux/extract.sh b/sys/linux/extract.sh index 2eb7dd2a6..9a5ba45f0 100755 --- a/sys/linux/extract.sh +++ b/sys/linux/extract.sh @@ -41,36 +41,17 @@ fi generate_arch() { echo generating arch $1... - echo "cd $LINUX; make defconfig" - OUT=`(cd $LINUX; make ARCH=$2 CROSS_COMPILE=$3 CFLAGS=$4 defconfig 2>&1)` - if [ $? -ne 0 ]; then - echo "$OUT" - exit 1 - fi - # Without CONFIG_NETFILTER kernel does not build. - (cd $LINUX; sed -i "s@# CONFIG_NETFILTER is not set@CONFIG_NETFILTER=y@g" .config) - (cd $LINUX; make ARCH=$2 CROSS_COMPILE=$3 CFLAGS=$4 olddefconfig) - echo "cd $LINUX; make" - OUT=`(cd $LINUX; make ARCH=$2 CROSS_COMPILE=$3 CFLAGS=$4 init/main.o 2>&1)` - if [ $? -ne 0 ]; then - echo "$OUT" - exit 1 - fi - (cd sys/linux; ../../bin/syz-extract -arch $1 -linux "$LINUX" -linuxbld "$LINUXBLD" $FILES) + (cd sys/linux; ../../bin/syz-extract -arch $1 -linux "$LINUX" -build $FILES) if [ $? -ne 0 ]; then exit 1 fi echo } -# $1 Go arch -# $2 kernel arch -# $3 cross-compiler prefix -# $4 CLAGS -generate_arch amd64 x86_64 x86_64-linux-gnu- "-m64" -generate_arch arm64 arm64 aarch64-linux-gnu- "" +generate_arch amd64 +generate_arch arm64 if [ "$BUILD_FOR_ANDROID" == "no" ]; then - generate_arch 386 i386 "" "-m32" - generate_arch arm arm arm-linux-gnueabihf- "-march=armv6t2" - generate_arch ppc64le powerpc powerpc64le-linux-gnu- "" + generate_arch 386 + generate_arch arm + generate_arch ppc64le fi |
