Project

General

Profile

Actions

Bug #271

closed

blockhandler.sh looks for "removable" under $DEVPATH, but doesn't find it with Busybox 1.21.1

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:
03 Feb 2014
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

This means that mmcblk0p2 is not mounted on boot after the upgrade to Busybox 1.21.1.

Actions #1

Updated by Hammel over 10 years ago

  • % Done changed from 0 to 20

I think the reason for this is that in 1.20.x the ACTION was empty so I have a special case handler for mmc mounting. In 1.21.1 the ACTION is add, which goes through a different part of the script. I'll have to move the mmc special handling into the "add" handler.

Actions #2

Updated by Hammel over 10 years ago

  • % Done changed from 20 to 30

Another problem is that blkid is no longer available in 2013.11. This patch appears to have taken it out. There is a related patch that just defaults to using udev instead.

There doesn't appear to be an easy way to get blkid back from util-linux (which is what would normally build it) in Buildroot. Fortunately, Busybox 1.21.1 has a version that is not yet enabled. I can enable that and rebuild under Buildroot to see what happens.

Also, I may have fixed the problem with with not finding "removable". I need to test it on 2013.11 but that requires first rebuilding Busybox to get blkid so blockhandler.sh doesn't break on that issue.

Actions #3

Updated by Hammel over 10 years ago

  • % Done changed from 30 to 40

Just rebuilding busybox with make buildroot-rebuild didn't work. I got all kinds of weird errors on the reboot of the target. I have to rebuild the entire rootfs.

Actions #4

Updated by Hammel over 10 years ago

  • % Done changed from 40 to 50

I rebuilt the whole thing and tested it tonight only to find out I didn't enable the "Print filesystem type" option. Ugh. So I have to rebuild it all again.

Actions #5

Updated by Hammel over 10 years ago

  • % Done changed from 50 to 70

Added missing blkid to Busybox. This was originally in Buildroot 2013.02 but was pulled from 2013.11. Adding it into Busybox was easy but you have to specifically ask for filesystem type support.

This fixes finding and mounting mmcblk0p1 by mdev. However, it blockhandler.sh no longer mounts sda1 when the usb stick is inserted. So I still need to fix that.

Actions #6

Updated by Hammel over 10 years ago

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

The mechanism used to find the filesystem type from blkid output was incorrect. It was

ID_FS_TYPE=`blkid $RD| cut -f4 -d" " | sed 's/TYPE=//' | sed 's/"//g'`

But that cut was wrong. It works correctly (at least for current PiBox needs) like this

ID_FS_TYPE=`blkid $RD | sed 's/^.*TYPE=//' | sed 's/"//g'

So now blockhandler.sh works with Buildroot 2013.11 and Busybox 1.21.1 and both mmcblk0p1 and /dev/sda1 mount properly via mdev.

Closing issue.

Actions

Also available in: Atom PDF