3 TMP_UBOOT_PATH=tmp_uboot
7 IS_64BIT=`cat .config | grep "CONFIG_64BIT=y"`
12 if [ -e $TMP_UBOOT_PATH ]; then
13 rm -rf ${TMP_UBOOT_PATH}
16 if [ -e tmp_modules ]; then
20 if [ -e tmp/lib/modules ]; then
21 rm -rf tmp/lib/modules
24 if [ -n "$(mount | grep ${BUILD_ROOT}/tmp)" ]; then
42 mkfs.vfat -F 16 -C -n BOOT boot.img 65536
43 sudo mount -o loop,uid=$USER_ID,gid=$GROUP_ID,showexec boot.img ./tmp
45 if [ -n "$IS_64BIT" ]; then
46 echo "Create 64bit boot image"
47 cp -a $BOOT_PATH/config_64bit.txt ./tmp/config.txt
49 echo "Create 32bit boot image"
50 cp -a $BOOT_PATH/config.txt ./tmp
52 cp -a $BOOT_PATH/LICENCE.broadcom ./tmp
53 cp -a $BOOT_PATH/start*.elf ./tmp
54 cp -a $BOOT_PATH/fixup*.dat ./tmp
55 if [ -n "$IS_64BIT" ]; then
56 cp -a arch/arm64/boot/Image ./tmp
57 cp -a arch/arm64/boot/dts/broadcom/bcm*.dtb ./tmp
59 cp -a arch/arm/boot/zImage ./tmp
60 cp -a arch/arm/boot/dts/bcm*.dtb ./tmp
63 # install u-boot files extracted from u-boot-rpi4 rpm package in download.tizen.org.
65 mkdir -p ${TMP_UBOOT_PATH}
66 pushd ${TMP_UBOOT_PATH}
67 if [ -n "$IS_64BIT" ]; then
68 REPO_URL=http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/aarch64/
70 REPO_URL=http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/armv7l/
74 UBOOT=`awk -F\" '{ print $2 }' index.html | grep u-boot-rpi4`
75 wget ${REPO_URL}${UBOOT}
79 cp -a ${TMP_UBOOT_PATH}/boot/* ./tmp
80 rm -rf ${TMP_UBOOT_PATH}
86 mkdir -p tmp/lib/modules
90 dd if=/dev/zero of=modules.img bs=1024 count=32768
91 mkfs.ext4 -q -F -t ext4 -b 1024 -L modules modules.img
92 sudo mount -o loop modules.img ./tmp/lib/modules
93 if [ -n "$IS_64BIT" ]; then
95 export CROSS_COMPILE=aarch64-linux-gnu-
98 export CROSS_COMPILE=arm-linux-gnueabi-
100 make modules_install INSTALL_MOD_PATH=./tmp_modules INSTALL_MOD_STRIP=1
102 sudo mv ./tmp_modules/lib/modules/* ./tmp/lib/modules
103 sudo -n chown root:root ./tmp/lib/modules -R
106 sudo umount tmp/lib/modules
108 rm -rf tmp tmp_modules
110 # Create boot tarball for the lthor flashing
112 if [ -n "$IS_64BIT" ]; then
113 BOOT_TARBALL=tizen-local-${DATE}-boot-arm64-rpi4.tar.gz
115 BOOT_TARBALL=tizen-local-${DATE}-boot-armv7l-rpi4.tar.gz
118 tar czf ${BOOT_TARBALL} boot.img modules.img
119 if [ "$?" != "0" ]; then
120 echo "Failed to create boot tarball"