diff --git a/common/mk-buildroot.sh b/common/mk-buildroot.sh index 73fe1ef..490c304 100755 --- a/common/mk-buildroot.sh +++ b/common/mk-buildroot.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + COMMON_DIR=$(cd `dirname $0`; pwd) if [ -h $0 ] then @@ -17,10 +19,10 @@ then exit 0 fi source $TOP_DIR/buildroot/build/envsetup.sh $RK_CFG_BUILDROOT -$TOP_DIR/buildroot/utils/brmake -if [ $? -ne 0 ]; then - echo "log saved on $TOP_DIR/br.log" - tail -n 100 $TOP_DIR/br.log - exit 1 +if $TOP_DIR/buildroot/utils/brmake; then + echo "log saved on $TOP_DIR/br.log. pack buildroot image at: $TOP_DIR/buildroot/output/$RK_CFG_BUILDROOT/images/rootfs.$RK_ROOTFS_TYPE" +else + echo "log saved on $TOP_DIR/br.log" + tail -n 100 $TOP_DIR/br.log + exit 1 fi -echo "log saved on $TOP_DIR/br.log. pack buildroot image at: $TOP_DIR/buildroot/output/$RK_CFG_BUILDROOT/images/rootfs.$RK_ROOTFS_TYPE" diff --git a/common/mk-ramdisk.sh b/common/mk-ramdisk.sh index a2e6198..ad28a22 100755 --- a/common/mk-ramdisk.sh +++ b/common/mk-ramdisk.sh @@ -114,8 +114,7 @@ fi # build ramdisk echo "====Start build $RAMDISK_CFG====" -$TOP_DIR/buildroot/utils/brmake -if [ $? -eq 0 ]; then +if $TOP_DIR/buildroot/utils/brmake; then echo "log saved on $TOP_DIR/br.log" echo "====Build $RAMDISK_CFG ok!====" else