make.sh: execute "make mrproper" when first compile

fix compile issue while git checkout between rkdevelop and next-dev:

  Using /home/cjh/uboot-nextdev/u-boot as source for U-Boot
  /home/cjh/uboot-nextdev/u-boot is not clean, please run 'make mrproper'
  in the '/home/cjh/uboot-nextdev/u-boot' directory.
make[1]: *** [prepare3] Error 1
make[1]: *** Waiting for unfinished jobs....

Change-Id: If9e01b407f524360ff402d8d36241f3885c90c48
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2018-02-02 14:27:13 +08:00
parent 0773d9cf3c
commit 7c2526e987
1 changed files with 8 additions and 1 deletions

View File

@ -51,6 +51,13 @@ prepare()
echo " 3. Download full release SDK Responsity"
exit 1
fi
# Clean! We assume that ./u-boot.map indicates U-Boot project is not clean,
# maybe git checkout from rkdevelop.
if [ -f ./u-boot.map ]; then
make mrproper
echo "auto \"make mrproper\" done..."
fi
}
select_toolchain()
@ -146,9 +153,9 @@ pack_trust_image()
}
prepare
select_toolchain
echo "make for ${BOARD}_defconfig by -j${JOB}"
make ${BOARD}_defconfig O=${DSTDIR}/out
select_toolchain
make CROSS_COMPILE=${TOOLCHAIN_GCC} all --jobs=${JOB} O=${DSTDIR}/out
fixup_chip_name
pack_loader_image