shell script $? refers to the success or failure of the status of the last command executed. If success is 0, 1 failure .. Statement if [$? -Eq 0] to determine if the statement is a command if it fails to execute if statements, or else on the implementation of the contents of.
note: To be used with caution, in parentheses behind if [$ -eq 0?], both sides of the brackets need to have a space.
cd u-boot && ./make.sh $RK_UBOOT_DEFCONFIG && cd -
if [ $? -eq 0 ]; then
echo "====Build uboot ok!===="
else
echo "====Build uboot failed!===="
exit 1
fi