scripts: mkbootimg_rpi3.sh: Add u-boot and optee binaries to boot.img
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 12 Sep 2017 05:55:31 +0000 (14:55 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Mon, 6 Jul 2020 09:06:06 +0000 (18:06 +0900)
In boot.img for tizen rpi3 image, u-boot and optee atf binaries
are required, so the files should be also installed in boot.img.
Add u-boot.img with optee os for atf and u-boot received from
download.tizen.org to boot.img.

Change-Id: I9778ea5c72697c3e7d0a534627fc65841bb792a1
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
scripts/mkbootimg_rpi3.sh

index 7159341..721817e 100755 (executable)
@@ -12,6 +12,27 @@ sudo mount -o loop,uid=$USER_ID,gid=$GROUP_ID,showexec boot.img ./tmp
 cp -a $BOOT_PATH/* ./tmp
 cp -a arch/arm64/boot/Image ./tmp
 cp -a arch/arm64/boot/dts/broadcom/bcm*.dtb ./tmp
+
+# install u-boot files extracted from u-boot-rpi3 rpm package in download.tizen.org.
+TMP_UBOOT_PATH=tmp_uboot
+mkdir -p ${TMP_UBOOT_PATH}
+pushd ${TMP_UBOOT_PATH}
+REPO_URL=http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/aarch64/
+rm -f index.html*
+wget ${REPO_URL}
+UBOOT=`awk -F\" '{ print $2 }' index.html | grep u-boot-rpi3`
+wget ${REPO_URL}${UBOOT}
+unrpm ${UBOOT}
+
+# install u-boot.img having optee.bin extracted from atf-rpi3 rpm package in download.tizen.org.
+ATF=`awk -F\" '{ print $2 }' index.html | grep atf-rpi3`
+wget ${REPO_URL}${ATF}
+unrpm ${ATF}
+
+popd
+cp -a ${TMP_UBOOT_PATH}/boot/* ./tmp
+rm -rf ${TMP_UBOOT_PATH}
+
 sync
 sudo umount tmp
 rm -rf tmp