Bryan Kadzban wrote:
> Bruce Dubbs wrote:
>> 'INTERFACE=eth0 udevadm test --action=add /sys/class/net/eth0'
>> ACTION=add
>> COMMENT=net device ()
>> DEVPATH=/class/net/eth0
>> IFINDEX=2
>> INTERFACE=eth0
>> MATCHADDR=00:11:11:79:4d:17
>> MATCHDEVID=0x0
>> MATCHIFTYPE=1
>> PHYSDEVBUS=pci
>> PHYSDEVDRIVER=tg3
>> PHYSDEVPATH=/devices/pci0000:00/0000:00:1c.0/0000:02:00.0
>> SUBSYSTEM=net
>> UDEV_LOG=6
>> USEC_INITIALIZED=206405826662
>> builtin_kmod_exit: unload module index
> Based on the comment, it seems that there's no vendor, device, or driver
> attribute in sysfs. Maybe too old of a kernel or something?
>
> What does "udevadm info --attribute-walk -p /sys/class/net/eth0" say?
looking at device '/class/net/eth0':
KERNEL=="eth0"
SUBSYSTEM=="net"
DRIVER==""
ATTR{addr_len}=="6"
ATTR{dev_id}=="0x0"
ATTR{ifalias}==""
ATTR{iflink}=="2"
ATTR{ifindex}=="2"
ATTR{features}=="0x10823"
ATTR{type}=="1"
ATTR{link_mode}=="0"
ATTR{address}=="00:11:11:79:4d:17"
ATTR{broadcast}=="ff:ff:ff:ff:ff:ff"
ATTR{carrier}=="1"
ATTR{dormant}=="0"
ATTR{operstate}=="up"
ATTR{mtu}=="1500"
ATTR{flags}=="0x1003"
ATTR{tx_queue_len}=="1000"
looking at parent device '/class/net':
KERNELS=="net"
SUBSYSTEMS=="subsystem"
DRIVERS==""
When run on another system, I get:
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:19.0 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:25:64:38:ec:dd", ATTR{dev_id}=="0x0",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
There is no vendor, device, or driver in the rule. The only thing
needed to build the rule is the MAC address which I do have. On the
system I'm building lspci gives:
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751
Gigabit Ethernet PCI Express
Inside chroot, I do have:
$ ls -l /sys/class/net/eth0/
device -> ../../../devices/pci0000:00/0000:00:1c.0/0000:02:00.0
but of course I don't have lspci in chroot yet.
-- Bruce
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page