syzkaller/dashboard/config/generate-config-usb.sh
Andrey Konovalov 6c19c36919 dashboard/config: improve config generation scripts
1. Use MAKE_ARGS var to pass arguments to make.
2. Pass -m to merge_config.sh to avoid calling make without CC.
3. Make util_add_syzbot_extra_bits() operate on .config.
2019-09-04 13:09:49 +02:00

27 lines
535 B
Bash
Executable File

#!/bin/bash
set -eux
[ -z "${CC}" ] && echo 'Please set $CC to point to the compiler!' && exit
[ -z "${KERNEL_SOURCE}" ] && echo 'Please set $KERNEL_SOURCE to point to the kernel tree!' && exit
THIS_DIR=`cd $(dirname $0); pwd`
. ${THIS_DIR}/util.sh
OUTPUT_CONFIG=${THIS_DIR}/upstream-usb.config
cd ${KERNEL_SOURCE}
make ${MAKE_VARS} defconfig
make ${MAKE_VARS} kvmconfig
util_add_usb_bits
util_add_syzbot_bits
sed -i "s#=m\$#=y#g" .config
make ${MAKE_VARS} olddefconfig
util_add_syzbot_extra_bits
cp .config ${OUTPUT_CONFIG}