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
tree: 3c6ae8f5d4dfd1460d2e93901e15b789160f6c57
  1. aspeed-layer/
  2. classes/
  3. conf/
  4. nuvoton-layer/
  5. raspberrypi/
  6. recipes-connectivity/
  7. recipes-core/
  8. recipes-devtools/
  9. recipes-extended/
  10. recipes-graphics/
  11. recipes-phosphor/
  12. recipes-protocols/
  13. recipes-support/
  14. recipes-textproc/
  15. recipes-x86/
  16. COPYING.apache-2.0
  17. COPYING.MIT
  18. LICENSE
  19. MAINTAINERS
  20. README.md
  21. recipes.txt
README.md

OpenBMC

meta-phosphor is the OpenBMC layer. This layer should be included for all OpenBMC systems. The OpenBMC layer contains content which is shared between all OpenBMC systems.