From cbdc32389003f655f164e79a693f002475ce6edd Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Stelmach?= Date: Mon, 21 Mar 2022 23:18:37 +0100 Subject: [PATCH] script: build RT kernels MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Ie91739a89c49e8077c98d3ac34ffa1fdd3a3e5ba Signed-off-by: Łukasz Stelmach --- build-amlogic.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/build-amlogic.sh b/build-amlogic.sh index 483b2be..87bdb31 100755 --- a/build-amlogic.sh +++ b/build-amlogic.sh @@ -4,6 +4,7 @@ CROSS_COMPILE=${CROSS_COMPILE:-aarch64-linux-gnu-} ARM_ARCH=arm64 NCPUS=`cat /proc/cpuinfo | grep processor | wc -l` NCPUS=$(($NCPUS * 2)) +rm -f localversion-rt # Check this system has ccache check_ccache() @@ -27,17 +28,17 @@ set_names() { case $1 in c4|n2) - CONFIG=odroidg12 + CONFIG=odroidg12${USE_RT:+_rt} DTB1=meson64_odroidc4.dtb DTB2=meson64_odroidn2.dtb - OUT_DIR=odroid + OUT_DIR=odroid${USE_RT:+-rt} ;; vim3|vim3l) - CONFIG=kvims + CONFIG=kvims${USE_RT:+_rt} DTB1=kvim3_linux.dtb DTB2=kvim3l_linux.dtb - OUT_DIR=kvim + OUT_DIR=kvim${USE_RT:+-rt} ;; esac } @@ -124,7 +125,7 @@ create_tar() { # Create boot tarball for the lthor flashing DATE=`date +%Y%m%d` - BOOT_TARBALL=tizen-local-${DATE}-boot-arm64-${BOARDS}.tar.gz + BOOT_TARBALL=tizen-local-${DATE}-boot-arm64-${BOARDS}${USE_RT:+-rt}.tar.gz cd ./output/ OUTPUT_FILES=`find * -type f` @@ -151,12 +152,19 @@ all) *) echo "linux kernel building script for tizen amlogic boards" - echo "usage: $0 target" + echo "usage: $0 target [rt]" echo "where target is one of: c4 n2 vim3 vim3l all" + echo "optional rt parameter indicates real-time kernel" exit ;; esac +if [ "$2" = "rt" ]; then + USE_RT=y +else + USE_RT= +fi + check_ext4_tool check_ccache clean_output @@ -171,13 +179,13 @@ else CHECK_ODROID=`grep CONFIG_ARCH_MESON64_ODROID_COMMON=y .config` if [ "$BOARDS" = "c4" ] || [ "$BOARDS" = "n2" ]; then if [ "z${CHECK_ODROID}" = "z" ]; then - echo "There is local .config, but it is differen from ${BOARD}." + echo "There is local .config, but it is differen from ${BOARDS}." echo "Please try after removing .config." exit fi else if [ "z${CHECK_ODROID}" != "z" ]; then - echo "There is local .config, but it is differen from ${BOARD}." + echo "There is local .config, but it is differen from ${BOARDS}." echo "Please try after removing .config." exit fi -- 2.7.4