6 IS_64BIT=`cat .config | grep "CONFIG_64BIT=y"`
13 mkfs.vfat -F 16 -C -n BOOT boot.img 65536
14 sudo mount -o loop,uid=$USER_ID,gid=$GROUP_ID,showexec boot.img ./tmp
16 if [ -n "$IS_64BIT" ]; then
17 echo "Create 64bit boot image"
18 cp -a $BOOT_PATH/config_64bit.txt ./tmp/config.txt
20 echo "Create 32bit boot image"
21 cp -a $BOOT_PATH/config.txt ./tmp
23 cp -a $BOOT_PATH/LICENCE.broadcom ./tmp
24 cp -a $BOOT_PATH/start*.elf ./tmp
25 cp -a $BOOT_PATH/fixup*.dat ./tmp
26 if [ -n "$IS_64BIT" ]; then
27 cp -a arch/arm64/boot/Image ./tmp
28 cp -a arch/arm64/boot/dts/broadcom/bcm*.dtb ./tmp
30 cp -a arch/arm/boot/zImage ./tmp
31 cp -a arch/arm/boot/dts/bcm*.dtb ./tmp
34 # install u-boot files extracted from u-boot-rpi4 rpm package in download.tizen.org.
35 TMP_UBOOT_PATH=tmp_uboot
36 mkdir -p ${TMP_UBOOT_PATH}
37 pushd ${TMP_UBOOT_PATH}
38 if [ -n "$IS_64BIT" ]; then
39 REPO_URL=http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/aarch64/
41 REPO_URL=http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/armv7l/
45 UBOOT=`awk -F\" '{ print $2 }' index.html | grep u-boot-rpi4`
46 wget ${REPO_URL}${UBOOT}
50 cp -a ${TMP_UBOOT_PATH}/boot/* ./tmp
51 rm -rf ${TMP_UBOOT_PATH}
57 mkdir -p tmp/lib/modules
61 dd if=/dev/zero of=modules.img bs=1024 count=32768
62 mkfs.ext4 -q -F -t ext4 -b 1024 -L modules modules.img
63 sudo mount -o loop modules.img ./tmp/lib/modules
64 if [ -n "$IS_64BIT" ]; then
66 export CROSS_COMPILE=aarch64-linux-gnu-
69 export CROSS_COMPILE=arm-linux-gnueabi-
71 make modules_install INSTALL_MOD_PATH=./tmp_modules INSTALL_MOD_STRIP=1
73 sudo mv ./tmp_modules/lib/modules/* ./tmp/lib/modules
74 sudo -n chown root:root ./tmp/lib/modules -R
77 sudo umount tmp/lib/modules
79 rm -rf tmp tmp_modules
81 # Create boot tarball for the lthor flashing
83 if [ -n "$IS_64BIT" ]; then
84 BOOT_TARBALL=tizen-local-${DATE}-boot-arm64-rpi4.tar.gz
86 BOOT_TARBALL=tizen-local-${DATE}-boot-armv7l-rpi4.tar.gz
89 tar czf ${BOOT_TARBALL} boot.img modules.img
90 if [ "$?" != "0" ]; then
91 echo "Failed to create boot tarball"