Hi all, I've a poky/Yocto 1.8 system for an imx6 board equipped with U-Blox SARA-U2 GSM/GPRS module connected via USB. The modem is seen as several /dev/ttyACM* devices. I use ofono 1.16 to work with the modem. After startup ofono doesn't detect the modem - it starts to identify the modem if I restart manually udev daemon (by calling /etc/init.d/udev restart). Problem with ofono modem detection during startup disappears if I disable udev-cache in /etc/default/udev-cache: by commenting out DEVCACHE variable.
So I've analyzed /etc/init.d/udev and udev-cache scripts. In my opinion the udev script has problems: * One funny thing appears during system startup. First udev computes system configuration and compares it with cached one. And they are identical! So udev decides that its cache is correct and sets the flag not_first_boot which leads to call of udevadm command with a lot of --subsystem-nomatch options (option '--subsystem-nomatch=tty' causes problems with ofono detection of ttyACM*). But during script execution it seems that system configuration changes (have a look at trace below - it seems that /dev/ttyACM* appear after system configuration computation). *) Ok. Let's restart udev manually. Now udev detects that stored udev-cache is not correct and it creates file /dev/shm/udev-regen as a flag to regenerate the cache. But it will be regenerated during subsequent call of /etc/init.d/udev (it calls internally /etc/init.d/udev-cache script). Definitely, in case of HW (cold) reboot this flag will disappear, so as a result /etc/udev-cache.tar.gz file will not be regenerated. Is there any fix solving properly described problems (except workarounds like disabling udev-cache or removal of option --subsystem-nomatch=tty from 'udevadm trigger --action=add' call)? Kind regards, Maxim. usb 1-1.3: new high-speed USB device number 3 using ci_hdrc + export TZ=/etc/localtime + TZ=/etc/localtime + '[' -d /sys/class ']' + '[' -r /proc/mounts ']' + '[' -x /lib/udev/udevd ']' + SYSCONF_CACHED=/etc/udev/cache.data + SYSCONF_TMP=/dev/shm/udev.cache + DEVCACHE_REGEN=/dev/shm/udev-regen + CMP_FILE_LIST='/proc/version /proc/cmdline /proc/devices' + '[' -f /proc/atags ']' + META_FILE_LIST='lib/udev/rules.d/* etc/udev/rules.d/*' + '[' -f /etc/default/udev-cache ']' + . /etc/default/udev-cache ++ DEVCACHE=/etc/udev-cache.tar.gz ++ PROBE_PLATFORM_BUS=yes + '[' -f /etc/udev/udev.conf ']' + . /etc/udev/udev.conf ++ udev_run=/var/run/udev + '[' -f /etc/default/rcS ']' + . /etc/default/rcS ++ TMPTIME=0 ++ SULOGIN=no ++ DELAYLOGIN=no ++ UTC=yes ++ VERBOSE=no ++ EDITMOTD=no ++ ENABLE_ROOTFS_FSCK=no ++ FSCKFIX=yes ++ VOLATILE_ENABLE_CACHE=yes ++ ROOTFS_READ_ONLY=no + case "$1" in +cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device export ACTION=add + ACTION=add + echo 'Starting udev' Startincdc_acm 1-1.3:1.2: ttyACM1: USB ACM device g udev + grep -q devtmpfs /proc/filesystems + LANG=C + awk '$2 == "/dev" && ($3 == "devtmpfs")cdc_acm 1-1.3:1.4: ttyACM2: USB ACM device { exit 1 }' /proc/mounts + '[' -e /dev/pts ']' + mkdir -m 0755cdc_acm 1-1.3:1.6: ttyACM3: USB ACM device /dev/pts + '[' -e /dev/shm ']' + mkdir -m 1777 /dev/shm + mkdcdc_acm 1-1.3:1.8: ttyACM4: USB ACM device ir -m 1777 -p /var/volatile/tmp + '[' /etc/udev-cache.tar.gz '!=cdc_acm 1-1.3:1.10: ttyACM5: USB ACM device ' '' ']' + '[' -e /etc/udev-cache.tar.gz ']' + sysconf_cmd + ccdc_acm 1-1.3:1.12: ttyACM6: USB ACM device at -- /proc/version /proc/cmdline /proc/devices + awk -F/ '{print $1 " " $NF;}' + stat -c '%s %Y %n' -- lib/udev/rules.d/40-usb_modeswitch.rules lib/udev/rules.d/42-usb-hid-pm.rules lib/udev/rules.d/50-udev-default.rules lib/udev/rules.d/60-cdrom_id.rules lib/udev/rules.d/60-persistent-als2 lib/udev/rules.d/75-tty-description.rules lib/udev/rules.d/78-sound-card.rules lib/udev/rules.d/80-drivers.rules lib/udev/rules.d/85-regulatory.rules lib/udev/rules.d/95-keyboard-force-release.rules lib/udev/rus + cmp /etc/udev/cache.data /dev/shm/udev.cache + tar xmf /etc/udev-cache.tar.gz -C / -m + not_first_boot=1 + '[' no '!=' no ']' + '[' -e /dev/shm/udev.cache ']' + rm -f /dev/shm/udev.cache + '[' -e /dev/shm/udev-regen ']' + kill_udevd + '[' -e /proc/sys/kernel/hotplug ']' + echo -e '\000' + /lib/udev/udevd -d + udevadm control --env=STARTUP=1 + '[' 1 '!=' '' ']' + '[' yes '!=' yes ']' + PLATFORM_BUS_NOMATCH= + udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus x + exit 0 + udevadm settle --timeout=3
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto