Project

General

Profile

Actions

Testing #195

closed

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

Added by Hammel over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
04 - Root File System
Target version:
Start date:
07 Jul 2013
Due date:
% Done:

100%

Estimated time:
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.


Files

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

Updated by Hammel over 10 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.

Actions #2

Updated by Hammel over 10 years ago

  • Priority changed from High to Urgent

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

Actions #3

Updated by Hammel over 10 years ago

  • Target version changed from 1.0 - Atreides to 0.7.0
Actions #4

Updated by Hammel over 10 years ago

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

Updated by Hammel over 10 years ago

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.

Actions #6

Updated by Hammel over 10 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.

Actions #7

Updated by Hammel over 10 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.

Actions #8

Updated by Hammel over 10 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.

Actions #9

Updated by Hammel over 10 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!

Actions #10

Updated by Hammel over 10 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.

Actions #11

Updated by Hammel over 10 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.

Actions

Also available in: Atom PDF