From 1acf5f44f2e4d3de781bce31c4449af821076619 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Thu, 12 Nov 2020 15:17:53 +0100 Subject: [PATCH] tizen: build scripts: use cross compiler from env if provided If user set CROSS_COMPILE env in his shell, use it instead of the hard-coded path ("/usr/bin/aarch64-linux-gnu-") from the scripts. Signed-off-by: Marek Szyprowski Change-Id: Ibd005fd32349c7af091ff0c60def8ba63e4d2fc0 --- tizen/build-kvim3.sh | 6 +++--- tizen/build-odroid-c4.sh | 6 +++--- tizen/build-odroid-n2.sh | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tizen/build-kvim3.sh b/tizen/build-kvim3.sh index d696250..dc7f938 100755 --- a/tizen/build-kvim3.sh +++ b/tizen/build-kvim3.sh @@ -1,6 +1,6 @@ #!/bin/bash -CROSS_COMPILER=/usr/bin/aarch64-linux-gnu- +CROSS_COMPILE=${CROSS_COMPILE:-/usr/bin/aarch64-linux-gnu-} JOBS="-j 5" # Check this system has ccache @@ -24,14 +24,14 @@ build_uboot() if ! [ -e .config ] ; then make ARCH=arm64 khadas-vim3_defconfig fi - make CROSS_COMPILE="$CCACHE $CROSS_COMPILER" $JOBS + make CROSS_COMPILE="$CCACHE $CROSS_COMPILE" $JOBS ./tools/mkimage -A arm64 -T script -C none -n "Tizen KVIM3 u-boot helper" -d ./board/amlogic/w400/tizen-boot-khadas-vim3-64b.scr ./output/vim3/boot.scr.uimg } generate_param() { cp `find ./env -name "built-in.o"` copy_env_common.o - ${CROSS_COMPILER}objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"` + ${CROSS_COMPILE}objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"` tr '\0' '\n' < copy_env_common.o > default_envs.txt ./tools/mkenvimage -s 16384 -o params.bin default_envs.txt rm copy_env_common.o default_envs.txt diff --git a/tizen/build-odroid-c4.sh b/tizen/build-odroid-c4.sh index ab10bf9..2afaa6f 100755 --- a/tizen/build-odroid-c4.sh +++ b/tizen/build-odroid-c4.sh @@ -1,6 +1,6 @@ #!/bin/bash -CROSS_COMPILER=/usr/bin/aarch64-linux-gnu- +CROSS_COMPILE=${CROSS_COMPILE:-/usr/bin/aarch64-linux-gnu-} JOBS="-j 5" # Check this system has ccache @@ -24,14 +24,14 @@ build_uboot() if ! [ -e .config ] ; then make ARCH=arm64 odroid-c4_defconfig fi - make CROSS_COMPILE="$CCACHE $CROSS_COMPILER" $JOBS + make CROSS_COMPILE="$CCACHE $CROSS_COMPILE" $JOBS ./tools/mkimage -A arm64 -T script -C none -n "Tizen ODROID-C4 u-boot helper" -d ./board/amlogic/odroid-n2/tizen-boot-odroid-c4-64b.scr ./output/odroid-c4/boot.scr.uimg } generate_param() { cp `find ./env -name "built-in.o"` copy_env_common.o - ${CROSS_COMPILER}objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"` + ${CROSS_COMPILE}objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"` tr '\0' '\n' < copy_env_common.o > default_envs.txt ./tools/mkenvimage -s 16384 -o params.bin default_envs.txt rm copy_env_common.o default_envs.txt diff --git a/tizen/build-odroid-n2.sh b/tizen/build-odroid-n2.sh index bf971b6..fce4a59 100755 --- a/tizen/build-odroid-n2.sh +++ b/tizen/build-odroid-n2.sh @@ -1,6 +1,6 @@ #!/bin/bash -CROSS_COMPILER=/usr/bin/aarch64-linux-gnu- +CROSS_COMPILE=${CROSS_COMPILE:-/usr/bin/aarch64-linux-gnu-} JOBS="-j 5" # Check this system has ccache @@ -24,14 +24,14 @@ build_uboot() if ! [ -e .config ] ; then make ARCH=arm64 odroid-n2_defconfig fi - make CROSS_COMPILE="$CCACHE $CROSS_COMPILER" $JOBS + make CROSS_COMPILE="$CCACHE $CROSS_COMPILE" $JOBS ./tools/mkimage -A arm64 -T script -C none -n "Tizen ODROID-N2 u-boot helper" -d ./board/amlogic/w400/tizen-boot-odroid-n2-64b.scr ./output/odroid-n2/boot.scr.uimg } generate_param() { cp `find ./env -name "built-in.o"` copy_env_common.o - ${CROSS_COMPILER}objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"` + ${CROSS_COMPILE}objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"` tr '\0' '\n' < copy_env_common.o > default_envs.txt ./tools/mkenvimage -s 16384 -o params.bin default_envs.txt rm copy_env_common.o default_envs.txt -- 2.7.4