buildroot: Print br.log when fail to build

Change-Id: Ia862a63001002680cd63b5e58e32cd4ca53c8e0d
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
Jeffy Chen
2022-08-02 14:55:22 +08:00
parent 683babcd81
commit ea7008eaa4
2 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -e
COMMON_DIR=$(cd `dirname $0`; pwd) COMMON_DIR=$(cd `dirname $0`; pwd)
if [ -h $0 ] if [ -h $0 ]
then then
@ -17,10 +19,10 @@ then
exit 0 exit 0
fi fi
source $TOP_DIR/buildroot/build/envsetup.sh $RK_CFG_BUILDROOT source $TOP_DIR/buildroot/build/envsetup.sh $RK_CFG_BUILDROOT
$TOP_DIR/buildroot/utils/brmake if $TOP_DIR/buildroot/utils/brmake; then
if [ $? -ne 0 ]; 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" echo "log saved on $TOP_DIR/br.log"
tail -n 100 $TOP_DIR/br.log tail -n 100 $TOP_DIR/br.log
exit 1 exit 1
fi 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"

View File

@ -114,8 +114,7 @@ fi
# build ramdisk # build ramdisk
echo "====Start build $RAMDISK_CFG====" echo "====Start build $RAMDISK_CFG===="
$TOP_DIR/buildroot/utils/brmake if $TOP_DIR/buildroot/utils/brmake; then
if [ $? -eq 0 ]; then
echo "log saved on $TOP_DIR/br.log" echo "log saved on $TOP_DIR/br.log"
echo "====Build $RAMDISK_CFG ok!====" echo "====Build $RAMDISK_CFG ok!===="
else else