scripts: mkbootimg_rpi3.sh: Create boot tarball for the lthor flashing 89/220389/2 accepted/tizen/unified/20191218.120926 submit/tizen/20191218.054411
authorJunghoon Kim <jhoon20.kim@samsung.com>
Wed, 18 Dec 2019 01:53:42 +0000 (10:53 +0900)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Wed, 18 Dec 2019 04:17:31 +0000 (13:17 +0900)
This patch is to create boot tarball for the lthor flashing. With this,
we can easily test the rpi3 kernel in the local environment.

Change-Id: Ib7bca6f7fa2c5a51be097042eda80c2d9297d4ac
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
scripts/mkbootimg_rpi3.sh

index ba66dac698483aca7a787c5dbbf816d1549ec47d..ab232696db65b53c4e058bf7448333225944f4d8 100755 (executable)
@@ -69,10 +69,13 @@ dd if=/dev/zero of=modules.img bs=1024 count=20480
 mkfs.ext4 -q -F -t ext4 -b 1024 -L modules modules.img
 sudo mount -o loop modules.img ./tmp/lib/modules
 if [ -n "$IS_64BIT" ]; then
-       make modules_install ARCH=arm64 INSTALL_MOD_PATH=./tmp_modules INSTALL_MOD_STRIP=1 CROSS_COMPILE=aarch64-linux-gnu-
+       export ARCH=arm64
+       export CROSS_COMPILE=aarch64-linux-gnu-
 else
-       make modules_install ARCH=arm INSTALL_MOD_PATH=./tmp_modules INSTALL_MOD_STRIP=1 CROSS_COMPILE=arm-linux-gnueabi-
+       export ARCH=arm
+       export CROSS_COMPILE=arm-linux-gnueabi-
 fi
+make modules_install INSTALL_MOD_PATH=./tmp_modules INSTALL_MOD_STRIP=1
 sudo mv ./tmp_modules/lib/modules/* ./tmp/lib/modules
 sudo -n chown root:root ./tmp/lib/modules -R
 
@@ -80,3 +83,15 @@ sync
 sudo umount tmp/lib/modules
 
 rm -rf tmp tmp_modules
+
+# Create boot tarball for the lthor flashing
+DATE=`date +%Y%m%d`
+BOOT_TARBALL=tizen-local-${DATE}-boot-${ARCH}-rpi3.tar
+
+tar cf ${BOOT_TARBALL} boot.img modules.img
+if [ "$?" != "0" ]; then
+       echo "Failed to create boot tarball"
+       exit 1
+fi
+
+echo ${BOOT_TARBALL}