summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 8d21dd1f58..0ac4949355 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -84,9 +84,9 @@ disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | s
84swap_size=$((disk_size*swap_ratio/100)) 84swap_size=$((disk_size*swap_ratio/100))
85rootfs_size=$((disk_size-boot_size-swap_size)) 85rootfs_size=$((disk_size-boot_size-swap_size))
86 86
87rootfs_start=$((boot_size + 1)) 87rootfs_start=$((boot_size))
88rootfs_end=$((rootfs_start+rootfs_size)) 88rootfs_end=$((rootfs_start+rootfs_size))
89swap_start=$((rootfs_end+1)) 89swap_start=$((rootfs_end))
90 90
91# MMC devices are special in a couple of ways 91# MMC devices are special in a couple of ways
92# 1) they use a partition prefix character 'p' 92# 1) they use a partition prefix character 'p'
@@ -113,13 +113,13 @@ echo "Creating new partition table on /dev/${device} ..."
113parted /dev/${device} mklabel msdos 113parted /dev/${device} mklabel msdos
114 114
115echo "Creating boot partition on $bootfs" 115echo "Creating boot partition on $bootfs"
116parted /dev/${device} mkpart primary 1 $boot_size 116parted /dev/${device} mkpart primary 0% $boot_size
117 117
118echo "Creating rootfs partition on $rootfs" 118echo "Creating rootfs partition on $rootfs"
119parted /dev/${device} mkpart primary $rootfs_start $rootfs_end 119parted /dev/${device} mkpart primary $rootfs_start $rootfs_end
120 120
121echo "Creating swap partition on $swap" 121echo "Creating swap partition on $swap"
122parted /dev/${device} mkpart primary $swap_start $disk_size 122parted /dev/${device} mkpart primary $swap_start 100%
123 123
124parted /dev/${device} print 124parted /dev/${device} print
125 125