blob: eede8f41855ca7cd80e2b77f10a2523b2f1d3a36 [file] [log] [blame]
#!/bin/bash
DECONFIG_FILE=defconfig_asr1803p401
help()
{
echo "./asr_build.sh 1803/1806/1903/clean"
}
build_init()
{
if [ ! -d "feeds/" ]; then
echo "Start build inti..."
./scripts/feeds update -a
./scripts/feeds install -a
fi
}
build_code()
{
echo "$DECONFIG_FILE"
make $DECONFIG_FILE
make -j8 V=99 2>&1 | tee build.log
}
if [ -n "$1" ] ;then #有参数
case "$1" in
clean)
make distclean
;;
1806)
build_init
DECONFIG_FILE=defconfig_asr1806p301
build_code
;;
1803)
build_init
DECONFIG_FILE=defconfig_asr1803p401
build_code
;;
1903)
build_init
DECONFIG_FILE=defconfig_asr1903p501
build_code
;;
*)
help
;;
esac
else # 全编
help
fi