From: Łukasz Stelmach Date: Fri, 26 Mar 2021 14:15:20 +0000 (+0100) Subject: script: Reformat to align with build-rpi4.sh X-Git-Tag: accepted/tizen/unified/20210401.110012~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F25%2F256225%2F1;p=platform%2Fkernel%2Flinux-rpi3.git script: Reformat to align with build-rpi4.sh Reformat the script to bring it into alignment with build-rpi4.sh for easier maintenance. Change-Id: Ie97a1acc28486e62630062587a30689a9f19e085 Signed-off-by: Łukasz Stelmach --- diff --git a/build-rpi3.sh b/build-rpi3.sh index 094988c..40d7c1d 100755 --- a/build-rpi3.sh +++ b/build-rpi3.sh @@ -3,11 +3,10 @@ NCPUS=`cat /proc/cpuinfo | grep processor | wc -l` NCPUS=$(($NCPUS * 2)) -if [ $# != 1 ]; -then - echo "Usage : build-rpi3.sh " +if [ $# != 1 ]; then + echo "Usage : $0 " echo " architecture : arm or arm64" - echo " e.g) build-rpi3.sh arm" + echo " e.g) $0 arm" exit fi @@ -24,28 +23,36 @@ check_ccache if [ $1 = "arm" ]; then echo "ARM" + rm -f arch/arm/boot/zImage rm -f arch/arm/boot/dts/*.dtb + CROSS_COMPILER=arm-linux-gnueabi- + if ! [ -e .config ] ; then make ARCH=arm CROSS_COMPILE="$CROSS_COMPILER" tizen_bcm2709_defconfig fi + make ARCH=arm CROSS_COMPILE="$CROSS_COMPILER" -j $NCPUS + if [ ! -f "./arch/arm/boot/zImage" ]; then echo "Build fail" exit 1 fi - elif [ $1 = "arm64" ]; then echo "ARM64" + rm -f arch/arm64/boot/Image rm -f arch/arm64/boot/dts/broadcom/*.dtb + CROSS_COMPILER=aarch64-linux-gnu- if ! [ -e .config ] ; then make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILER" tizen_bcmrpi3_defconfig fi + make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILER" -j $NCPUS + if [ ! -f "./arch/arm64/boot/Image" ]; then echo "Build fail" exit 1