Imx28 automount on any media

cancel
Showing results for 
Search instead for 
Did you mean: 

Imx28 automount on any media

445 Views
shashikanthirem
Contributor III

Hi all 

I did following

On ltib package list, choose:

device nodes (udev)

   [*] Include automount rules

   [*] Modify udev rules for non-raid systems

   [*] Include i.MX rules,

 

next build manually udev:

 

$./ltib -p udev -m prep

$./ltib -p udev -m scbuild

$./ltib -p udev -m scdeploy

 

copy the file  /rootfs/etc/udev/rules.d/65-automount.rules in your rootfs and reboot your board.

 

Also, in the automount files general rules are provided, that may be used as an example; please check

the rules if they are correct for Your configuration

I followed steps still,  the media connected to it is not auto mount, 

Still manual mount is required to see the content of  media devices

Any suggestions or input will be helpful

Labels (3)
Tags (2)
0 Kudos
5 Replies

379 Views
shashikanthirem
Contributor III

Found some more input

if i do SUBSYSTEM=block, then am not getting single udev event to process rules

here all the partitions device file there , but not processing the event

but if i give 

SUBSYSTEM=="mmc" then works, but i get host name mmc0:0001, here i need to manual unmount device file which is not good solution

what could be the reason...............?

0 Kudos

379 Views
shashikanthirem
Contributor III

More update

 if i do two times USB plug and unplug 

1st /dev/sda1 is getting mounted to /mnt/sda1

on unplug/ disconnect of USB, remains /mnt/sda1 folder remains same, ideally this has to be unmount and delete which is not happening

but on second time,  usb is 

/dev/sdb1 to  /mnt/sdb1

i beilieve remove is mot working

this is my auto generated udev rules from ltib


ACTION=="remove", KERNEL=="sd[a-z]*", RUN+="/bin/umount -l /mnt/%k"
ACTION=="remove", KERNEL=="sd[a-z]*", RUN+="/bin/rmdir /mnt/%k", OPTIONS="last_rule"

0 Kudos

379 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Shashikant H,

Thank you for sharing your findings. The procedure looks okay in general terms, although LTIB is no longer supported and it’s not easy to troubleshoot in modern Ubuntu releases.

Hopefully other community users may be able to provide some help.

My apologies for the inconvenience.

Regards,

0 Kudos

379 Views
shashikanthirem
Contributor III

then could you please tell, why its a part of package list populated in ltib , i believe  remove usb should work,

do i need to work on udev rules ?

does anyone face this problem..

these are my udev events on remove sdcard mmcblk0

UEVENT[820715367.891626] remove /devices/platform/mxs-mmc.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/mmcblk0p3 (block)
ACTION=remove
DEVPATH=/devices/platform/mxs-mmc.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/mmcblk0p3
SUBSYSTEM=block
MAJOR=179
MINOR=3
DEVNAME=mmcblk0p3
DEVTYPE=partition
PARTN=3
SEQNUM=1096

UEVENT[820715367.892501] remove /devices/platform/mxs-mmc.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/mmcblk0p2 (block)
ACTION=remove
DEVPATH=/devices/platform/mxs-mmc.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/mmcblk0p2
SUBSYSTEM=block
MAJOR=179
MINOR=2
DEVNAME=mmcblk0p2
DEVTYPE=partition
PARTN=2
SEQNUM=1097

UEVENT[820715367.893095] remove /devices/platform/mxs-mmc.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/mmcblk0p1 (block)
ACTION=remove
DEVPATH=/devices/platform/mxs-mmc.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/mmcblk0p1
SUBSYSTEM=block
MAJOR=179
MINOR=1
DEVNAME=mmcblk0p1
DEVTYPE=partition
PARTN=1
SEQNUM=1098

UEVENT[820715367.912250] remove /devices/virtual/bdi/179:0 (bdi)
ACTION=remove
DEVPATH=/devices/virtual/bdi/179:0
SUBSYSTEM=bdi
SEQNUM=1099

UEVENT[820715367.917219] remove /devices/platform/mxs-mmc.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0 (block)
ACTION=remove
DEVPATH=/devices/platform/mxs-mmc.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0
SUBSYSTEM=block
MAJOR=179
MINOR=0
DEVNAME=mmcblk0
DEVTYPE=disk
NPARTS=0
SEQNUM=1100

UEVENT[820715367.921937] remove /devices/platform/mxs-mmc.0/mmc_host/mmc0/mmc0:aaaa (mmc)
ACTION=remove
DEVPATH=/devices/platform/mxs-mmc.0/mmc_host/mmc0/mmc0:aaaa
SUBSYSTEM=mmc
MMC_TYPE=SD
MMC_NAME=SS04G
MODALIAS=mmc:block
SEQNUM=1101

UDEV [820715367.925500] remove /devices/virtual/bdi/179:0 (bdi)
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/virtual/bdi/179:0
SUBSYSTEM=bdi
SEQNUM=1099
UDEVD_EVENT=1

UDEV [820715367.943437] remove /devices/platform/mxs-mmc.0/mmc_host/mmc0/mmc0:aaaa (mmc)
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/platform/mxs-mmc.0/mmc_host/mmc0/mmc0:aaaa
SUBSYSTEM=mmc
MMC_TYPE=SD
MMC_NAME=SS04G
MODALIAS=mmc:block
SEQNUM=1101
UDEVD_EVENT=1

0 Kudos

379 Views
shashikanthirem
Contributor III

these are for USB udev removal events


[ 114.120000] usb 2-1: USB disconnect, address 2
[ 114.120000] sd_remove
UEVENT[820715419.381405] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/bsg/0:0:0:0 (bsg)
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/bsg/0:0:0:0
SUBSYSTEM=bsg
MAJOR=253
MINOR=0
DEVNAME=bsg/0:0:0:0
SEQNUM=1108

UEVENT[820715419.382030] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0 (scsi_device)
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0
SUBSYSTEM=scsi_device
SEQNUM=1109

UDEV [820715419.399406] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0 (scsi_device)
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0
SUBSYSTEM=scsi_device
SEQNUM=1109
UDEVD_EVENT=1

UEVENT[820715419.401343] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0 (scsi_disk)
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0
SUBSYSTEM=scsi_disk
SEQNUM=1110

UDEV [820715419.408937] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0 (scsi_disk)
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0
SUBSYSTEM=scsi_disk
SEQNUM=1110
UDEVD_EVENT=1

UEVENT[820715419.422687] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1
SUBSYSTEM=block
MAJOR=8
MINOR=1
DEVNAME=sda1
DEVTYPE=partition
PARTN=1
SEQNUM=1111

[ 119.180000] sd 0:0:0:0: [sda] remove the USB-scsi
UEVENT[820715424.437656] remove /devices/virtual/bdi/8:0 (bdi)
ACTION=remove
DEVPATH=/devices/virtual/bdi/8:0
SUBSYSTEM=bdi
SEQNUM=1112

UEVENT[820715424.438156] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/block/sda
SUBSYSTEM=block
MAJOR=8
MINOR=0
DEVNAME=sda
DEVTYPE=disk
NPARTS=0
SEQNUM=1113

UEVENT[820715424.438750] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0 (scsi)
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0
SUBSYSTEM=scsi
DEVTYPE=scsi_device
MODALIAS=scsi:t-0x00
SEQNUM=1114

UEVENT[820715424.439219] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/scsi_host/host0 (scsi_host)
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/scsi_host/host0
SUBSYSTEM=scsi_host
SEQNUM=1115

UEVENT[820715424.439594] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0 (scsi)
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0
SUBSYSTEM=scsi
DEVTYPE=scsi_host
SEQNUM=1116

UEVENT[820715424.443187] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0 (usb)
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0
SUBSYSTEM=usb
DEVTYPE=usb_interface
PRODUCT=abcd/1234/100
TYPE=0/0/0
INTERFACE=8/6/80
MODALIAS=usb:vABCDp1234d0100dc00dsc00dp00ic08isc06ip50
SEQNUM=1117

UEVENT[820715424.443843] remove /devices/platform/fsl-ehci.0/usb2/2-1 (usb)
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1
SUBSYSTEM=usb
MAJOR=189
MINOR=129
DEVNAME=bus/usb/002/002
DEVTYPE=usb_device
PRODUCT=abcd/1234/100
TYPE=0/0/0
BUSNUM=002
DEVNUM=002
SEQNUM=1118

UDEV [820715424.474281] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/scsi_host/host0 (scsi_host)
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/scsi_host/host0
SUBSYSTEM=scsi_host
SEQNUM=1115
UDEVD_EVENT=1

UDEV [820715424.478968] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0 (scsi)
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0
SUBSYSTEM=scsi
DEVTYPE=scsi_device
MODALIAS=scsi:t-0x00
SEQNUM=1114
UDEVD_EVENT=1

UDEV [820715424.481749] remove /devices/virtual/bdi/8:0 (bdi)
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/virtual/bdi/8:0
SUBSYSTEM=bdi
SEQNUM=1112
UDEVD_EVENT=1

UDEV [820715424.494343] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0 (scsi)
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0/host0
SUBSYSTEM=scsi
DEVTYPE=scsi_host
SEQNUM=1116
UDEVD_EVENT=1

UDEV [820715424.504093] remove /devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0 (usb)
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/platform/fsl-ehci.0/usb2/2-1/2-1:1.0
SUBSYSTEM=usb
DEVTYPE=usb_interface
PRODUCT=abcd/1234/100
TYPE=0/0/0
INTERFACE=8/6/80
MODALIAS=usb:vABCDp1234d0100dc00dsc00dp00ic08isc06ip50
SEQNUM=1117
UDEVD_EVENT=1

0 Kudos