Files
device_rockchip/common/mk-buildroot.sh
Eddie Cai 39ea63ecc0 echo location of br.log at the end of compilation and tail the log when failed
Change-Id: Ie0b532cb01d848399f17340b701b45af743d30fa
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
2019-12-03 09:54:25 +08:00

27 lines
673 B
Bash
Executable File

#!/bin/bash
COMMON_DIR=$(cd `dirname $0`; pwd)
if [ -h $0 ]
then
CMD=$(readlink $0)
COMMON_DIR=$(dirname $CMD)
fi
cd $COMMON_DIR
cd ../../..
TOP_DIR=$(pwd)
BOARD_CONFIG=$1
source $BOARD_CONFIG
if [ -z $RK_CFG_BUILDROOT ]
then
echo "RK_CFG_BUILDROOT is empty, skip building buildroot rootfs!"
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
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"