From dcfe25ec0836686a1e7101baa03ec20976cc3488 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Stelmach?= Date: Fri, 26 Mar 2021 15:15:20 +0100 Subject: [PATCH] script: Reformat to align with build-rpi4.sh MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reformat the script to bring it into alignment with build-rpi4.sh for easier maintenance. Change-Id: Ie97a1acc28486e62630062587a30689a9f19e085 Signed-off-by: Łukasz Stelmach --- build-rpi3.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) 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 -- 2.7.4