]> code.ossystems Code Review - openembedded-core.git/commitdiff
init-install*: only pick root mmc devices
authorAwais Belal <awais_belal@mentor.com>
Wed, 10 Aug 2016 08:14:16 +0000 (13:14 +0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 17 Aug 2016 09:31:13 +0000 (10:31 +0100)
Some eMMC devices show special sub-devices such as mmcblk0boot0
etc. The installation script currently pick all of them up and
displays it to the user which makes some confusions because these
sub-devices are pretty small and complete installation including
rootfs won't be possible in most cases.
We simply now drop these sub-devices and only present the user
with the root of such mmc devices.

Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-core/initrdscripts/files/init-install-efi.sh
meta/recipes-core/initrdscripts/files/init-install.sh

index bf8a76b96bbe8787b2ae8d0b5272cbe44cc632cd..3134486aae4af657bf88f4fc3d26e10ec9cc4e15 100644 (file)
@@ -29,7 +29,13 @@ esac
 
 echo "Searching for hard drives ..."
 
-for device in `ls /sys/block/`; do
+# Some eMMC devices have special sub devices such as mmcblk0boot0 etc
+# we're currently only interested in the root device so pick them wisely
+devices=`ls /sys/block/ | grep -v mmcblk`
+mmc_devices=`ls /sys/block/ | grep "mmcblk[0-9]\{1,\}$"`
+devices="$devices $mmc_devices"
+
+for device in $devices; do
     case $device in
         loop*)
             # skip loop device
index 5f2599e72428ec1f834af354d7dd00ede61b675b..0542e26fd2e8fa985092c0285621ef79edfda882 100644 (file)
@@ -28,7 +28,13 @@ esac
 
 echo "Searching for hard drives ..."
 
-for device in `ls /sys/block/`; do
+# Some eMMC devices have special sub devices such as mmcblk0boot0 etc
+# we're currently only interested in the root device so pick them wisely
+devices=`ls /sys/block/ | grep -v mmcblk`
+mmc_devices=`ls /sys/block/ | grep "mmcblk[0-9]\{1,\}$"`
+devices="$devices $mmc_devices"
+
+for device in $devices; do
     case $device in
         loop*)
             # skip loop device