From 5337e1dbb4d49a7b0aba72a2c2db3dcffeea8aa6 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Tue, 17 Sep 2019 14:10:17 +0900 Subject: [PATCH] build: script: combine rpi3 32bit and 64bit scripts Combine rpi3 32bit and 64bit scripts. e.g) build-rpi3.sh arm / arm64 Change-Id: I224b7944362245685e4557f2fe41837c3a685ad8 Signed-off-by: Jaehoon Chung --- build-rpi3-arm32.sh | 26 ----------------------- build-rpi3-arm64.sh | 29 -------------------------- build-rpi3.sh | 50 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 55 deletions(-) delete mode 100755 build-rpi3-arm32.sh delete mode 100755 build-rpi3-arm64.sh create mode 100755 build-rpi3.sh diff --git a/build-rpi3-arm32.sh b/build-rpi3-arm32.sh deleted file mode 100755 index 1e8c02adc0a2..000000000000 --- a/build-rpi3-arm32.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Check this system has ccache -check_ccache() -{ - type ccache - if [ "$?" -eq "0" ]; then - CCACHE=ccache - fi -} - -check_ccache - -rm -f arch/arm/boot/zImage -rm -f arch/arm/boot/dts/*.dtb - -if ! [ -e .config ] ; then - make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- tizen_bcm2709_defconfig -fi - -make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j8 - -if [ ! -f "./arch/arm/boot/zImage" ]; then - echo "Build fail" - exit 1 -fi diff --git a/build-rpi3-arm64.sh b/build-rpi3-arm64.sh deleted file mode 100755 index 15b93917a6cc..000000000000 --- a/build-rpi3-arm64.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Check this system has ccache -check_ccache() -{ - type ccache - if [ "$?" -eq "0" ]; then - CCACHE=ccache - fi -} - -check_ccache - -rm -f arch/arm64/boot/Image -rm -f arch/arm64/boot/dts/broadcom/*.dtb - -if ! [ -e .config ] ; then - make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- tizen_bcmrpi3_defconfig -fi - -make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 -make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs -if [ ! -f "./arch/arm64/boot/Image" ]; then - echo "Build fail" - exit 1 -fi - -make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules_prepare -j8 -make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules -j8 diff --git a/build-rpi3.sh b/build-rpi3.sh new file mode 100755 index 000000000000..27eac56c8f89 --- /dev/null +++ b/build-rpi3.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +if [ $# != 1 ]; +then + echo "Usage : build-rpi3.sh " + echo " architecture : arm or arm64" + echo " e.g) build-rpi3.sh arm" + exit +fi + +# Check this system has ccache +check_ccache() +{ + type ccache + if [ "$?" -eq "0" ]; then + CCACHE=ccache + fi +} + +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" -j8 + 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" -j8 + if [ ! -f "./arch/arm64/boot/Image" ]; then + echo "Build fail" + exit 1 + fi +fi -- 2.34.1