Testing #195

Find out if automount will mount an SD card from a USB hub

Added by Hammel over 7 years ago. Updated about 7 years ago.

Status:ClosedStart date:07 Jul 2013
Priority:ImmediateDue date:
Assignee:Hammel% Done:

100%

Category:04 - Root File System
Target version:0.7.0
Severity:02 - High

Description

I doubt automount is available in the kernel/rootfs. If it isn't, then see what it will take to make it work.

cross.sh Magnifier - Cross compile script using staging tree and installed cross toolchain for PiBox. (1.7 KB) Hammel, 17 Nov 2013 16:12

Associated revisions

Revision e8cef3a8
Added by Hammel about 7 years ago

RM #195: Updated mdev.conf to catch USB flash sticks. Added mdev script and configuration file to handle automounting.

Revision e5f197ed
Added by Hammel about 7 years ago

RM #195: Fix umount to use mount point instead of device file.

History

#1 Updated by Hammel over 7 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

It doesn't appear autofs is included in PiBox at the moment and autofs4 is not enabled in the kernel.

The kernel config is easy enough to find and enable.

I'm having a little trouble finding autofs. It doesn't appear to be in Buildroot. Here is what I've found so far:

It looks like the last one has a link to an autofs daemon code download in the Introduction page. Gentoo's link is a recent autofs with some additional patches.

#2 Updated by Hammel over 7 years ago

  • Priority changed from High to Urgent

Bumping priority - I need this to test the nfs export capability.

#3 Updated by Hammel about 7 years ago

  • Target version changed from 1.0 - Atreides to 0.7.0

#4 Updated by Hammel about 7 years ago

  • Priority changed from Urgent to Immediate
  • Severity changed from 03 - Medium to 02 - High

#5 Updated by Hammel about 7 years ago

  • File cross.shMagnifier added
  • % Done changed from 10 to 20

First thing to do here was to try and cross compile autofs. It was a little harder than piboxd but only a little. Once I realized I had to specify both --host and --build it went much easier.

The cross compile script is attached. I'll convert this to a metabuild for piboxd to generate an opkg.

#6 Updated by Hammel about 7 years ago

  • % Done changed from 20 to 30

Cross compile via a metabuild is not working. It isn't passing CFLAGS or LDFLAGS the same way as the cross.sh script does but I don't know why yet.

#7 Updated by Hammel about 7 years ago

I found this script for automounting using mdev which gets called from an extended mdev.conf. This may be a better solution than using the autofs system but requires research into what that script actually does.

#8 Updated by Hammel about 7 years ago

  • % Done changed from 30 to 40

Integrated the mdev.conf change that calls a slightly modified block.agent script. These are in the latest build for testing, but have not been checked in yet.

#9 Updated by Hammel about 7 years ago

  • % Done changed from 40 to 80

Tested mdev.conf, blockhandler.sh and block.settings on target. After booting I plugged in a USB stick with an ext3 file system and a AVI movie. The stick was recognized, blockhandler.sh was called and the USB stick mounted under /media/sda1 automatically. Perfect. It worked the first time.

I need test an off-the-shelf SD card and see what filesystem it has (I always put ext3's on mine). Then add that to block.settings and check the whole thing in.

Boom. That was easy!

#10 Updated by Hammel about 7 years ago

Quick note: it works with USB sticks but if the stick has a removable SD card it doesn't catch the removal of the card. So there's additional work to be done here but for now this is good enough.

#11 Updated by Hammel about 7 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

vfat is on the default cards (mostly) so I added that to the block.settings file and checked it in. This issue can be closed. Any additional issues against automounting will be tracked separately.

Also available in: Atom PDF