All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] init-install*: only pick root mmc devices
@ 2016-08-10  8:14 Awais Belal
  2016-08-30  5:34 ` Saul Wold
  0 siblings, 1 reply; 3+ messages in thread
From: Awais Belal @ 2016-08-10  8:14 UTC (permalink / raw)
  To: openembedded-core

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>
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 8 +++++++-
 meta/recipes-core/initrdscripts/files/init-install.sh     | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index f564f4e..776dcbb 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -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
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 72ce92b..9c4189b 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -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
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-30  7:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-10  8:14 [PATCH] init-install*: only pick root mmc devices Awais Belal
2016-08-30  5:34 ` Saul Wold
2016-08-30  7:11   ` Belal, Awais

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.