tools: Add support build for arm64
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Wed, 10 Jun 2020 10:50:21 +0000 (19:50 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 30 Mar 2021 01:40:01 +0000 (10:40 +0900)
Support kernel build for arm64

Change-Id: Id02cf2e57e4c8db134821a50aaaeed278d2407ae
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
build-rpi4-arm32.sh [deleted file]
build-rpi4.sh [new file with mode: 0755]

diff --git a/build-rpi4-arm32.sh b/build-rpi4-arm32.sh
deleted file mode 100755 (executable)
index c518c88..0000000
+++ /dev/null
@@ -1,28 +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_bcm2711_defconfig
-fi
-
-make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j8
-
-if [ ! -f "./arch/arm/boot/zImage" ]; then
-       echo "Build fail"
-       exit 1
-fi
-
-scripts/mkbootimg_rpi4.sh
diff --git a/build-rpi4.sh b/build-rpi4.sh
new file mode 100755 (executable)
index 0000000..34abe1b
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+if [ $# != 1 ]; then
+       echo "Usage : $0 <architecture>"
+       echo "  architecture : arm or arm64"
+       echo "  e.g) $0 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
+
+       if ! [ -e .config ] ; then
+               make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- tizen_bcm2711_defconfig
+       fi
+
+       make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -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
+
+       if ! [ -e .config ] ; then
+               make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- tizen_bcm2711_defconfig
+       fi
+       make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8
+       if [ ! -f "./arch/arm64/boot/Image" ]; then
+               echo "Build fail"
+               exit 1
+       fi
+fi
+
+scripts/mkbootimg_rpi4.sh