summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-09-27 14:15:36 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-27 21:23:00 (GMT)
commit2ff9d30dac1d0734547b0793bd5d1efb00d00f4e (patch)
tree211e0eefa8f09bbb3d6dca5bd64bef3288ddeea1
parent2804850ea7b030be9b36ea1af03cd80d90466707 (diff)
downloadpoky-2ff9d30dac1d0734547b0793bd5d1efb00d00f4e.tar.gz
init-install.sh: fix disk_size
It mis-matched "SanDisk" or "Disk Flags" before, which caused unexpected error. (From OE-Core rev: 346b6ef31253789d7d6664a19297b6deec9d27a0) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a68ac76c1b6ed4c1a2fbc944c5021c89fd26217f) [YOCTO #10333] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh2
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh2
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh2
3 files changed, 3 insertions, 3 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
index 7a0b4d4..b562109 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
@@ -69,7 +69,7 @@ umount /dev/${device}* 2> /dev/null || /bin/true
69mkdir -p /tmp 69mkdir -p /tmp
70cat /proc/mounts > /etc/mtab 70cat /proc/mounts > /etc/mtab
71 71
72disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") 72disk_size=$(parted /dev/${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
73 73
74testfs_size=$((disk_size*testfs_ratio/100)) 74testfs_size=$((disk_size*testfs_ratio/100))
75rootfs_size=$((disk_size-boot_size-testfs_size)) 75rootfs_size=$((disk_size-boot_size-testfs_size))
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 0443a9d..3531158 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -120,7 +120,7 @@ if [ ! -e /etc/mtab ]; then
120 cat /proc/mounts > /etc/mtab 120 cat /proc/mounts > /etc/mtab
121fi 121fi
122 122
123disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") 123disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
124 124
125swap_size=$((disk_size*swap_ratio/100)) 125swap_size=$((disk_size*swap_ratio/100))
126rootfs_size=$((disk_size-boot_size-swap_size)) 126rootfs_size=$((disk_size-boot_size-swap_size))
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index f9e9768..06f03ed 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -116,7 +116,7 @@ if [ ! -L /etc/mtab ]; then
116 cat /proc/mounts > /etc/mtab 116 cat /proc/mounts > /etc/mtab
117fi 117fi
118 118
119disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") 119disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
120 120
121grub_version=$(grub-install -v|sed 's/.* \([0-9]\).*/\1/') 121grub_version=$(grub-install -v|sed 's/.* \([0-9]\).*/\1/')
122 122