I'm trying to install Arch Linux to my WM8650 netbook. I'm using the Android kernel that came with the device, and I'm following these directions. So far the system boots, I have installed a LXDE desktop and most things are working fine. But I can't get udev to work properly, and this is a problem for external USB devices, like pendrives.
The directions I'm following state that to get udev working, you have to install libaccept4.so library (to supply the accept4() OS call, missing in the Android kernel) and load it by creating a /etc/ld.conf.preload file containing a line pointing to that library (/usr/local/lib/libaccept4.so). I have done it, the kernel boots and udevd starts, but unfortunately devices are note being automatically created.
It looks like udev is partially working: if I dump the database, devices appear in it, but device nodes under /dev do not get created. for example, before plugging a pendrive, udevadm reports no sda devices:
$this->bbcode_second_pass_code('', '# udevadm info --export-db | grep sda
# ')
If now I plug a pendrive:
$this->bbcode_second_pass_code('', '# udevadm info --export-db | grep sda
P: /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda
N: sda
E: DEVNAME=/dev/sda
E: DEVPATH=/devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda
P: /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1
N: sda1
E: DEVNAME=/dev/sda1
E: DEVPATH=/devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1
E: dir_name=hd-sda1
#')
dmesg output:
$this->bbcode_second_pass_code('', 'usb 1-3.3: new high speed USB device using ehci_hcd and address 4
usb 1-3.3: default language 0x0409
usb 1-3.3: udev 4, busnum 1, minor = 3
usb 1-3.3: New USB device found, idVendor=05e3, idProduct=0727
usb 1-3.3: New USB device strings: Mfr=3, Product=4, SerialNumber=2
usb 1-3.3: Product: USB Storage
usb 1-3.3: Manufacturer: Generic
usb 1-3.3: SerialNumber: 000000000207
usb 1-3.3: uevent
usb 1-3.3: uevent
usb 1-3.3: usb_probe_device
usb 1-3.3: configuration #1 chosen from 1 choice
usb 1-3.3: adding 1-3.3:1.0 (config #1, interface 0)
usb 1-3.3:1.0: uevent
usb-storage 1-3.3:1.0: usb_probe_interface
usb-storage 1-3.3:1.0: usb_probe_interface - got id
scsi0 : SCSI emulation for USB Mass Storage devices
drivers/usb/core/inode.c: creating file '004'
usb 1-3: uevent
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
usb 1-3.3:1.0: uevent
usb 1-3.3: uevent
usb 1-3.3:1.0: uevent
scsi 0:0:0:0: Direct-Access Generic STORAGE DEVICE 0207 PQ: 0 ANSI: 0
usb-storage: device scan complete
sd 0:0:0:0: [sda] 15122432 512-byte logical blocks: (7.74 GB/7.21 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 0b 00 00 08
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk
usb 1-3.3:1.0: uevent
usb 1-3.3: uevent
usb usb1: uevent
usb 1-0:1.0: uevent
usb 1-3: uevent
usb 1-3.3: uevent
usb 1-3.3:1.0: uevent
usb 1-3:1.0: uevent
usb usb2: uevent
usb 2-0:1.0: uevent
usb 2-2: uevent
usb 2-2:1.0: uevent
usb 2-2:1.1: uevent
usb usb3: uevent
usb 3-0:1.0: uevent
# ')
All the devices I have under /dev have been manually populated:
$this->bbcode_second_pass_code('', '# ls -l /dev
total 20
drwxr-xr-x 3 root root 4096 jun 2 22:09 bus
drwxr-xr-x 2 root root 4096 jun 3 10:15 char
crw------- 1 root root 5, 1 jun 3 10:16 console
lrwxrwxrwx 1 root root 3 feb 10 02:55 fb -> fb0
crw-r----- 1 root root 29, 0 feb 10 02:55 fb0
lrwxrwxrwx 1 root root 13 feb 10 02:55 fd -> /proc/self/fd
crw-r--r-- 1 root root 1, 7 feb 10 02:55 full
prw------- 1 root root 0 jun 3 10:07 initctl
drwxr-xr-x 2 root root 4096 jun 3 09:06 input
-rw-r--r-- 1 root root 30 feb 8 06:43 kmsg
srw-rw-rw- 1 root root 0 jun 3 10:08 log
brw-r----- 1 root root 7, 0 feb 10 02:55 loop0
brw-r----- 1 root root 7, 1 feb 10 02:55 loop1
brw-r----- 1 root root 7, 2 feb 10 02:55 loop2
brw-r----- 1 root root 7, 3 feb 10 02:55 loop3
brw-r----- 1 root root 7, 4 feb 10 02:55 loop4
brw-r----- 1 root root 7, 5 feb 10 02:55 loop5
brw-r----- 1 root root 7, 6 feb 10 02:55 loop6
brw-r----- 1 root root 7, 7 feb 10 02:55 loop7
crw------- 1 root root 10, 237 jun 2 20:34 loop-control
crw-r--r-- 1 root root 242, 0 feb 10 02:55 mbdev
crw-r----- 1 root root 1, 1 feb 10 02:55 mem
brw-r--r-- 1 root root 179, 0 feb 10 02:55 mmcblk0
brw-r--r-- 1 root root 179, 1 feb 10 02:55 mmcblk0p1
brw-r--r-- 1 root root 179, 2 feb 10 02:55 mmcblk0p2
crw-rw-rw- 1 root root 1, 3 jun 21 2011 null
crw-r----- 1 root root 1, 4 feb 10 02:55 port
crw-r--r-- 1 root root 5, 2 jun 3 10:18 ptmx
drwxr-xr-x 2 root root 0 ene 1 1970 pts
crw-r--r-- 1 root root 1, 8 feb 10 02:55 random
lrwxrwxrwx 1 root root 8 feb 10 02:55 shm -> /run/shm
lrwxrwxrwx 1 root root 4 feb 10 02:55 stderr -> fd/2
lrwxrwxrwx 1 root root 4 feb 10 02:55 stdin -> fd/0
lrwxrwxrwx 1 root root 4 feb 10 02:55 stdout -> fd/1
crw-r--r-- 1 root root 5, 0 feb 10 02:55 tty
crw------- 1 root root 4, 0 jun 3 2012 tty0
crw-rw---- 1 root tty 4, 1 jun 3 10:08 tty1
crw-rw---- 1 root tty 4, 2 jun 3 10:08 tty2
crw------- 1 root root 4, 3 jun 3 2012 tty3
crw------- 1 root root 4, 4 jun 3 2012 tty4
crw------- 1 root root 4, 5 jun 3 2012 tty5
crw------- 1 root root 4, 6 jun 3 2012 tty6
crw------- 1 root root 4, 7 jun 3 2012 tty7
crw-r--r-- 1 root root 1, 9 feb 10 02:55 urandom
drwxr-xr-x 2 root root 4096 jun 2 22:06 usb
crw-rw---- 1 root root 252, 0 jun 2 22:04 usbmon0
crw-rw---- 1 root root 252, 1 jun 2 22:04 usbmon1
crw-rw---- 1 root root 252, 2 jun 2 22:04 usbmon2
crw-rw---- 1 root root 252, 3 jun 2 22:04 usbmon3
crw-rw---- 1 root tty 7, 0 feb 10 02:55 vcs
crw------- 1 root sys 7, 1 feb 10 02:55 vcs1
crw-rw---- 1 root tty 7, 2 feb 10 02:55 vcs2
crw------- 1 root root 7, 3 feb 10 02:55 vcs3
crw------T 1 root root 7, 4 feb 10 02:55 vcs4
crw-rw---- 1 root root 7, 5 jun 2 20:44 vcs5
crw-rw---- 1 root root 7, 6 jun 2 20:45 vcs6
crw------T 1 root root 7, 7 feb 10 02:55 vcs7
crw-rw---- 1 root tty 7, 128 feb 10 02:55 vcsa
crw------- 1 root sys 7, 129 feb 10 02:55 vcsa1
crw-rw---- 1 root tty 7, 130 feb 10 02:55 vcsa2
crw------- 1 root root 7, 131 feb 10 02:55 vcsa3
crw------T 1 root root 7, 132 feb 10 02:55 vcsa4
crw-rw---- 1 root root 7, 133 jun 2 20:45 vcsa5
crw-rw---- 1 root root 7, 134 jun 2 20:45 vcsa6
crw------T 1 root root 7, 135 feb 10 02:55 vcsa7
crw-rw-rw- 1 root root 1, 5 jun 21 2011 zero
# ')
udev root is also properly set:
$this->bbcode_second_pass_code('', '# udevadm info --root
/dev
# ')
Finally I tried starting udevadm monitor, and then plugging a pendrive, unplugging it, plugging a USB to RS232 adapter, and unplugging it. This is the resulting output:
$this->bbcode_second_pass_code('', '# udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
KERNEL[1837.950578] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3 (usb)
KERNEL[1837.975839] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0 (usb)
KERNEL[1837.988492] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0 (scsi)
UDEV [1837.994550] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3 (usb)
UDEV [1838.003193] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0 (usb)
KERNEL[1838.004643] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/scsi_host/host0 (scsi_host)
UDEV [1838.021131] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0 (scsi)
UDEV [1838.021473] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/scsi_host/host0 (scsi_host)
KERNEL[1843.009519] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0 (scsi)
KERNEL[1843.014246] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0 (scsi)
KERNEL[1843.015309] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0 (scsi_disk)
KERNEL[1843.016483] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0 (scsi_device)
UDEV [1843.031095] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0 (scsi)
UDEV [1843.035389] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0 (scsi)
UDEV [1843.047691] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0 (scsi_device)
UDEV [1843.049221] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0 (scsi_disk)
KERNEL[1843.178844] change /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0 (scsi)
KERNEL[1843.193440] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
KERNEL[1843.196012] change /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
KERNEL[1843.197461] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
UDEV [1843.216684] change /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0 (scsi)
UDEV [1843.217865] add /devices/virtual/bdi/8:0 (bdi)
KERNEL[1843.218128] add /devices/virtual/bdi/8:0 (bdi)
UDEV [1843.312349] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
UDEV [1843.475910] change /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
UDEV [1843.695761] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
KERNEL[1882.719801] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0 (scsi_device)
KERNEL[1882.726647] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0 (scsi_disk)
KERNEL[1882.728143] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
KERNEL[1882.729136] remove /devices/virtual/bdi/8:0 (bdi)
KERNEL[1882.730484] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
UDEV [1882.749786] remove /devices/virtual/bdi/8:0 (bdi)
KERNEL[1882.751454] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0 (scsi)
UDEV [1882.755825] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0 (scsi_disk)
UDEV [1882.759922] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0 (scsi_device)
KERNEL[1882.774341] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0 (scsi)
KERNEL[1882.774768] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/scsi_host/host0 (scsi_host)
KERNEL[1882.775058] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0 (scsi)
KERNEL[1882.775410] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0 (usb)
KERNEL[1882.775835] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3 (usb)
UDEV [1882.790884] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/scsi_host/host0 (scsi_host)
UDEV [1882.847596] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
UDEV [1882.856931] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
UDEV [1882.858966] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0/0:0:0:0 (scsi)
UDEV [1882.866776] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0/target0:0:0 (scsi)
UDEV [1882.875610] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/host0 (scsi)
UDEV [1882.876017] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0 (usb)
UDEV [1882.876577] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3 (usb)
KERNEL[1888.388031] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3 (usb)
KERNEL[1888.406814] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0 (usb)
KERNEL[1888.432368] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/ttyUSB5 (usb-serial)
KERNEL[1888.434193] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/ttyUSB5/tty/ttyUSB5 (tty)
UDEV [1888.474858] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3 (usb)
UDEV [1888.484176] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0 (usb)
UDEV [1888.489765] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/ttyUSB5 (usb-serial)
UDEV [1888.531806] add /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/ttyUSB5/tty/ttyUSB5 (tty)
KERNEL[1907.299611] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/ttyUSB5/tty/ttyUSB5 (tty)
KERNEL[1907.314280] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/ttyUSB5 (usb-serial)
KERNEL[1907.326389] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0 (usb)
KERNEL[1907.331450] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3 (usb)
UDEV [1907.336528] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/ttyUSB5/tty/ttyUSB5 (tty)
UDEV [1907.339643] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0/ttyUSB5 (usb-serial)
UDEV [1907.343712] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3/1-3.3:1.0 (usb)
UDEV [1907.347173] remove /devices/pci0000:00/0000:00:04.0/usb1/1-3/1-3.3 (usb)')
Everything looks fine for me, but neither /dev/sda* nor /dev/ttyUSB5 are created.
Why are events recorded to udev database but devices do not get created??? any clues???