mmc-init.sh: Wait for mmc device
The initramfs was accessing the mmc device before it was probed
in some cases, leading to this error message:
[ 4.412464] mmcblk0rpmb: mmc0:0001 R1J56L partition 3 128 KiB, chardev (248:0)
tail: can't open '/dev/mmcblk0': No such file or directory
tail: no files
[ 5.471158] mmcblk0: p1 p2 p3 p4 p5 p6 p7
Implement a wait loop of up to 5s to wait for the device,
similar to what the kernel would do with rootwait.
Tested: Verified the error is not longer seen. Printing the count
value as debug, it took one sleep iteration to appear:
[ 4.396492] mmcblk0boot1: mmc0:0001 R1J56L partition 2 16.0 MiB
0
[ 4.403500] mmcblk0rpmb: mmc0:0001 R1J56L partition 3 128 KiB, chardev (248:0)
[ 4.416176] mmcblk0: p1 p2 p3 p4 p5 p6 p7
1
[ 6.159693] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: (null)
Change-Id: Ib435932dacdc6310788fe28b97c40d47c6c47e1b
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
1 file changed