From 6e7fa1b205eab7b172f7cd74d3ad264ca457df99 Mon Sep 17 00:00:00 2001 From: Hoegeun Kwon Date: Wed, 10 Jun 2020 19:50:21 +0900 Subject: [PATCH] tools: Add support build for arm64 Support kernel build for arm64 Change-Id: Id02cf2e57e4c8db134821a50aaaeed278d2407ae Signed-off-by: Hoegeun Kwon --- build-rpi4-arm32.sh | 28 ---------------------------- build-rpi4.sh | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 28 deletions(-) delete mode 100755 build-rpi4-arm32.sh create mode 100755 build-rpi4.sh diff --git a/build-rpi4-arm32.sh b/build-rpi4-arm32.sh deleted file mode 100755 index c518c88..0000000 --- a/build-rpi4-arm32.sh +++ /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 index 0000000..34abe1b --- /dev/null +++ b/build-rpi4.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +if [ $# != 1 ]; then + echo "Usage : $0 " + 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 -- 2.7.4