XO-1 SD card access during boot-up
quozl at laptop.org
Sun May 27 21:54:18 EDT 2012
The XO-1 SD card slot power supply circuit does not have a discharge
clamping function, and so when the firmware or software turns off the
power to the slot, the voltage falls slowly.
The fall rate violates the specification for cards. We have seen
cards becoming confused because of the slow fall time. When they are
confused, we saw I/O errors or failure to respond. Whether the card
did this or not varied across cards, across laptops, but mostly based
on how long it is unpowered.
When an SD card is used as the boot media, it remains powered, and so
one would typically not see this symptom.
Open Firmware briefly powers the SD card slot during boot, as part of
the search for an operating system to boot. If a card is in the slot,
then it will experience a brief period of power courtesy of Open
Firmware, then a somewhat random interval will elapse before your
mount script powers it again.
So there is a stochastic or unpredictable response. The gradual churn
of functionality on our 12.1.0 builds might easily be moving the goal
posts for you.
I don't know for sure if this is the cause of what you are
experiencing, but you might try a few workarounds, and based on the
success of these workarounds you might be able to draw a conclusion.
You might work around the problem by:
- adding more time before mounting the card, of the order of several
seconds, to allow the card to reset, (e.g. a sleep command before
your mount command),
- detecting the problem, unmounting the card, waiting for a minute,
then mounting it again, (e.g. using an alternate console or network
- using a custom Open Firmware that does not access the SD card slot
before boot; http://dev.laptop.org/~quozl/q2f11jb.rom has the boot
device search list truncated to only internal storage, this can be
checked with ok printenv boot-device
There may also be kernel-level things that can be done, but I'm not
aware of them.
If you were facing the problem with booting from SD card, then I would
look into increasing the power-off-time in a new build of Open
Firmware. It is currently 250ms on XO-1:
ok dev /pci/sd power-off-time .d
More information about the Devel