summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJunghoon Kim <jhoon20.kim@samsung.com>2017-07-26 14:22:33 +0900
committerJaehoon Chung <jh80.chung@samsung.com>2020-10-20 10:35:22 +0900
commite4ab7802ab28556d7d4b56dd6fcad4b3bd36d980 (patch)
tree6a2ca8f2c192101255099bf3320fe95bc48ff094 /scripts
parentdacb49401149dda4a4062aa89ffd6ba864f09b09 (diff)
downloadu-boot-e4ab7802ab28556d7d4b56dd6fcad4b3bd36d980.tar.gz
u-boot-e4ab7802ab28556d7d4b56dd6fcad4b3bd36d980.tar.bz2
u-boot-e4ab7802ab28556d7d4b56dd6fcad4b3bd36d980.zip
scripts: sd_fusing_rpi3.sh: add inform partition support
To implement Tizen upgrade solution, reboot parameter should be delivered into u-boot so that u-boot can jump to proper partition. But, new SoC on RPI3 does not support any specific registers (e.g., INFORM register of Exynos) to store reboot parameter upon SW reset. Add inform partition and make "reboot-param.bin" file for passing reboot parameter. Change-Id: Ic98df1b4ad4aeab9152d3ad5007b97a0e20d8be7 Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/tizen/sd_fusing_rpi3.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/scripts/tizen/sd_fusing_rpi3.sh b/scripts/tizen/sd_fusing_rpi3.sh
index 766307d5ce..040713e352 100755
--- a/scripts/tizen/sd_fusing_rpi3.sh
+++ b/scripts/tizen/sd_fusing_rpi3.sh
@@ -143,13 +143,14 @@ function mkpart_3 () {
local -r MODULE_SZ=20
local -r RAMDISK_SZ=8
local -r RAMDISK_RECOVERY_SZ=12
+ local -r INFORM_SZ=8
if [ $sfdisk_new == 1 ]; then
local -r EXTEND_SZ=8
else
local -r EXTEND_SZ=4
fi
- let "USER_SZ = $SIZE_MB - $BOOT_SZ - $ROOTFS_SZ - $DATA_SZ - $MODULE_SZ - $RAMDISK_SZ - $RAMDISK_RECOVERY_SZ - $EXTEND_SZ"
+ let "USER_SZ = $SIZE_MB - $BOOT_SZ - $ROOTFS_SZ - $DATA_SZ - $MODULE_SZ - $RAMDISK_SZ - $RAMDISK_RECOVERY_SZ - $INFORM_SZ - $EXTEND_SZ"
local -r BOOT=boot
local -r ROOTFS=rootfs
@@ -158,6 +159,7 @@ function mkpart_3 () {
local -r MODULE=modules
local -r RAMDISK=ramdisk
local -r RAMDISK_RECOVERY=ramdisk-recovery
+ local -r INFORM=inform
if [[ $USER_SZ -le 100 ]]
then
@@ -176,6 +178,7 @@ function mkpart_3 () {
echo " "$MODULE" " $DISK"6 " $MODULE_SZ "MB"
echo " "$RAMDISK" " $DISK"7 " $RAMDISK_SZ "MB"
echo " "$RAMDISK_RECOVERY" " $DISK"8 " $RAMDISK_RECOVERY_SZ "MB"
+ echo " "$INFORM" " $DISK"9 " $INFORM_SZ "MB"
local MOUNT_LIST=`mount | grep $DISK | awk '{print $1}'`
for mnt in $MOUNT_LIST
@@ -196,6 +199,7 @@ function mkpart_3 () {
,${MODULE_SZ}MiB,,-
,${RAMDISK_SZ}MiB,,-
,${RAMDISK_RECOVERY_SZ}MiB,,-
+ ,${INFORM_SZ}MiB,,-
__EOF__
else
sfdisk --in-order --Linux --unit M $DISK <<-__EOF__
@@ -207,6 +211,7 @@ function mkpart_3 () {
,$MODULE_SZ,,-
,$RAMDISK_SZ,,-
,$RAMDISK_RECOVERY_SZ,,-
+ ,$INFORM_SZ,,-
__EOF__
fi
@@ -217,6 +222,16 @@ function mkpart_3 () {
mkfs.ext4 -q ${DISK}6 -L $MODULE -F
mkfs.ext4 -q ${DISK}7 -L $RAMDISK -F
mkfs.ext4 -q ${DISK}8 -L $RAMDISK_RECOVERY -F
+ mkfs.ext4 -q ${DISK}9 -L $INFORM -F
+
+ # create "reboot-param.bin" file in inform partition for passing reboot parameter
+ # It should be done only once upon partition format.
+ umount ${DISK}9
+ mkdir mnt_tmp
+ mount -t ext4 ${DISK}9 ./mnt_tmp
+ touch ./mnt_tmp/reboot-param.bin
+ umount ./mnt_tmp
+ rmdir mnt_tmp
}
function show_usage () {