When I use SD storage on any of my other ARM linux boxes, the local flash memory is mmcblk0, and the SD/microSD card shows up as mmcblk1 - you can insert and remove the SD card at will, using it as removable storage; this is after all the primary use case for SD cards. Using it as a root fs (particularly with microSD) is still always an option.
When I use the microSD on the BBB, none of this works. If the microSD is not inserted at boot, then it will never be recognized by the kernel even if I insert a card later; if it is available at boot it becomes mmcblk0, displacing local flash which becomes mmcblk1, and if I ever then remove the card (even if no filesystems are mounted on it) I’ll get “INFO: task mmcqd/0:71 blocked for more than 60 seconds.” and a kernel panic.
I suspect that the problem is in the device tree configuration. I used dtc to get at the source (pasted below). The mmc1 is the microSD and mmc2 is the 2G eMMC (hence the “ti,non-removable” line). Apparently FDT uses 1-up counting. Anyway, I’ve tried swapping the names of the entries - this just leads to neither being recognized at boot. I’ve tried adding the “broken-cd” flag documented in mmc.txt in the kernel tree - this does not let the card be recognized if inserted after boot, and does not stop the kernel panic if it is removed after boot. There’s no other documented option that I can see.
Is there a way to fix this, or is microSD on the BBB fundamentally broken?
Thanks,
Patrick
PS: I’m not asking about the problem of needing a uEnv.txt on the SD card - that’s a related but separate issue.
PPS: Here’s the DTS from the default BBB device tree file: