summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongjin Kim <tobetter@gmail.com>2021-06-08 05:12:58 +0300
committerDongjin Kim <tobetter@gmail.com>2021-11-30 22:02:12 +0300
commitdc63241fc1b92f7cc5f8eda8f867c19d5c7344e9 (patch)
tree9e9790fcb69c5740fbcda9373bd3e2cc72f42380
parent2a212970d89b12fdb3718376f046c8305b2c1883 (diff)
downloadu-boot-dc63241fc1b92f7cc5f8eda8f867c19d5c7344e9.tar.xz
ODROID-COMMON: fix to use local toolchains to build U-boot
$ export CROSS_COMPILE=/path/of/your/toolchain/bin/aarch-linux-gnu- $ ./make.sh Signed-off-by: Dongjin Kim <tobetter@gmail.com> Change-Id: I904624e252fea62bda0ec466ed8fbf63731455e2
-rwxr-xr-xmake.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/make.sh b/make.sh
index a882ced67a..d072dc7322 100755
--- a/make.sh
+++ b/make.sh
@@ -11,9 +11,12 @@ SUPPORT_LIST=`ls configs/*[r,p][x,v,k][0-9][0-9]*_defconfig`
CMD_ARGS=$1
########################################### User can modify #############################################
-RKBIN_TOOLS=../rkbin/tools
-CROSS_COMPILE_ARM32=../prebuilts/gcc/linux-x86/arm/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
-CROSS_COMPILE_ARM64=../prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
+RKBIN_TOOLS=$(pwd)/rkbin/tools
+if grep -q '^CONFIG_ARM32=y' .config ; then
+ CROSS_COMPILE_ARM32=$(dirname $(which arm-linux-gnueabihf-gcc))/bin
+else
+ CROSS_COMPILE_ARM64=$(dirname $(which aarch64-linux-gnu-gcc))/bin
+fi
########################################### User not touch #############################################
# Declare global INI file searching index name for every chip, update in select_chip_info()
RKCHIP=
@@ -98,7 +101,7 @@ function prepare()
absolute_path=$(cd `dirname ${RKBIN_TOOLS}`; pwd)
RKBIN=${absolute_path}
else
- echo "ERROR: No ../rkbin repository"
+ echo "ERROR: No $(pwd)/rkbin repository"
exit 1
fi