script: build RT kernels 14/272614/2 submit/tizen/20220322.224920 submit/tizen/20220323.180849
authorŁukasz Stelmach <l.stelmach@samsung.com>
Mon, 21 Mar 2022 22:18:37 +0000 (23:18 +0100)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Mon, 21 Mar 2022 22:51:45 +0000 (23:51 +0100)
Change-Id: Ie91739a89c49e8077c98d3ac34ffa1fdd3a3e5ba
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
build-amlogic.sh

index 483b2be..87bdb31 100755 (executable)
@@ -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