site  contact  subhomenews

PCMCIA/MMC/SD support at bootup, hotplug drives

December 23, 2009 — BarryK
Improved PCMCIA/MMC/SD recognition in initramfs
This was discussed here:
http://bkhome.org/archive/blog2/200912/sd-card-support-at-bootup.html

I think that I have got it so that the 'init' script will recognise a much wider range of memory cards, so they can be used to hold a 'pupsave' file or even booted from (if the BIOS supports it -- unfortunately my Acer Aspire laptop can't boot from the inbuilt multi-function card slot -- which would have been so nice -- I reckon that's something to look for if you are shopping for a new laptop).

Desktop drive icons hotplug support
The above link has discussion with pakt about a limitation, where a memory card may be plugged or unplugged but there is no desktop drive icon, yet Pmount does recognise it.

I've got an external USB multi-function card reader that has this problem. When plugged in, /sys/block shows that it has sdc, sdd, sde and sdf (in my case), regardless whether any card is plugged in or not.

Even if I plugin a card, /proc/partitions does not update.

The only way to detect that a card is inserted is to actually probe it. The 'probedisk2' and 'probepart' scripts, that are called by Pmount, do this -- they use 'dd' to try and read from the card -- this causes /proc/partitions to update.

I have put this probing into /sbin/pup_event_frontend_d, but in an extremely restrained way, as the scan occurs every 2 seconds and we don't want an overhead that will noticeably impact on performance -- that is, we don't want the user to notice any degradation.

It is working for me. I can plug and unplug an SD card in my multi-function adaptor and the desktop drive icon appears and disappears accordingly.

Woof uploaded, December 23 2009
I have just uploaded Woof with the above fixes.

Those unfamiliar with Woof can read more here:
http://bkhome.org/woof/

I'm going to be taking it easy for the next 5 - 6 days. Have a nice Christmas holiday everyone! For those who don't have a holiday at this time of year, best wishes also and take it easy too!

Comments

Merry Christmas
Username: Ramachandran
A merry Christmas and A happy New Year to everybody.


Tags: woof