summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2017-06-27 17:07:55 +0900
committerJoonyoung Shim <jy0922.shim@samsung.com>2017-07-03 00:54:23 +0000
commit3365d8e9f4b0452a99d03d7e0331e6982fdc514e (patch)
treef603db5377456724c4295a4a2fe2adba53e1f490
parent0fa457264c5508cb36b5ce17447976cf80637167 (diff)
downloadlinux-rpi3-3365d8e9f4b0452a99d03d7e0331e6982fdc514e.tar.gz
linux-rpi3-3365d8e9f4b0452a99d03d7e0331e6982fdc514e.tar.bz2
linux-rpi3-3365d8e9f4b0452a99d03d7e0331e6982fdc514e.zip
scripts: sd_fusing_rpi3.sh: add the ramdisk-recovery partition
Add the ramdisk-recovery partition as 12MB. Change-Id: I077a2c247bee91a89b8d5971b15bbec024e4d104 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
-rwxr-xr-xscripts/sd_fusing_rpi3.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/sd_fusing_rpi3.sh b/scripts/sd_fusing_rpi3.sh
index af30b4333e37..653032f702bb 100755
--- a/scripts/sd_fusing_rpi3.sh
+++ b/scripts/sd_fusing_rpi3.sh
@@ -18,6 +18,7 @@ declare -a PART_TABLE=(
"user.img" 5 4M
"modules.img" 6 512
"ramdisk.img" 7 512
+ "ramdisk-recovery.img" 8 512
)
declare -r -i PART_TABLE_ROW=3
@@ -141,13 +142,14 @@ function mkpart_3 () {
local -r DATA_SZ=512
local -r MODULE_SZ=20
local -r RAMDISK_SZ=8
+ local -r RAMDISK_RECOVERY_SZ=12
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 - $EXTEND_SZ"
+ let "USER_SZ = $SIZE_MB - $BOOT_SZ - $ROOTFS_SZ - $DATA_SZ - $MODULE_SZ - $RAMDISK_SZ - $RAMDISK_RECOVERY_SZ - $EXTEND_SZ"
local -r BOOT=boot
local -r ROOTFS=rootfs
@@ -155,6 +157,7 @@ function mkpart_3 () {
local -r USER=user
local -r MODULE=modules
local -r RAMDISK=ramdisk
+ local -r RAMDISK_RECOVERY=ramdisk-recovery
if [[ $USER_SZ -le 100 ]]
then
@@ -172,6 +175,7 @@ function mkpart_3 () {
echo " "$USER" " $DISK"5 " $USER_SZ "MB"
echo " "$MODULE" " $DISK"6 " $MODULE_SZ "MB"
echo " "$RAMDISK" " $DISK"7 " $RAMDISK_SZ "MB"
+ echo " "$RAMDISK_RECOVERY" " $DISK"7 " $RAMDISK_RECOVERY_SZ "MB"
local MOUNT_LIST=`mount | grep $DISK | awk '{print $1}'`
for mnt in $MOUNT_LIST
@@ -191,6 +195,7 @@ function mkpart_3 () {
,${USER_SZ}MiB,,-
,${MODULE_SZ}MiB,,-
,${RAMDISK_SZ}MiB,,-
+ ,${RAMDISK_RECOVERY_SZ}MiB,,-
__EOF__
else
sfdisk --in-order --Linux --unit M $DISK <<-__EOF__
@@ -201,6 +206,7 @@ function mkpart_3 () {
,$USER_SZ,,-
,$MODULE_SZ,,-
,$RAMDISK_SZ,,-
+ ,$RAMDISK_RECOVERY_SZ,,-
__EOF__
fi
@@ -210,6 +216,7 @@ function mkpart_3 () {
mkfs.ext4 -q ${DISK}5 -L $USER -F
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
}
function show_usage () {