Bruce Dubbs wrote: > Bryan Kadzban wrote: > >> *Presumably* (without having actually looked at it) this database would >> be mapping from hardware IDs (vendor/device pairs, etc.) to human >> readable description strings, so I'd be surprised if 105 bytes was >> sufficient, yeah. Is there anything readable in there? (Might be >> compressed I suppose, too, but even then I'd expect at least a few K.) > > It may be a dynamic DB run at startup and when a device is > added/removed. I'm not sure yet. I just kicked off a fresh lfs svn > build and will use that for testing lfs-udev-196.
Well the code has a mistake: Usage: udevadm hwdb [--create] [--help] --update update the hardware database --test <modalias> query database and print result --help That --create needs to be --update. When I did that, the file was created. It is 5 MB. The code needs: sed -i -e 's/create/update/' src/udev/udevadm-hwdb.c >>> I'm also not sure about how to test the DB. The new man page says >>> >>> udevadm hwdb --test=string >>> >>> Query the database with a modalias string, and print the retrieved >>> properties. >>> >>> I'm not sure what modalias string it is talking about. >> >> Wildly guessing here, but probably something like what's in one of the >> sysfs device modalias files, like this on a random device on my system? >> >> pci:v00008086d00002440sv00000000sd00000000bc06sc01i00 >> >> See if that works or not, I guess, as a first attempt. Maybe try some >> variants (without pci: perhaps?) if it doesn't, too. > > I'll do that when I'm up on the new system. I've booted up before > without udev running at all and I can then test udevd and udevadm to try > to check things out. > >> Or poke around /sys on your machine for some of the modalias attributes >> and use their contents; maybe it's machine-specific. (That would be >> dumb, since you'd have to rebuild the db every time you upgrade the >> hardware, but I wouldn't put it past them. :-) ) > > My ethernet is pci:v00008086d000010DEsv00001028sd00000276bc02sc00i00 > Intel Corporation 82567LM-3 Gigabit Network Connection > > I'll try that first. Yes, that works: $ udevadm hwdb --test \ pci:v00008086d000010DEsv00001028sd00000276bc02sc00i00 ID_PCI_CLASS_FROM_DATABASE=Network controller ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller ID_PRODUCT_FROM_DATABASE=82567LM-3 Gigabit Network Connection ID_VENDOR_FROM_DATABASE=Intel Corporation The source files go in UDEVLIBEXECDIR/hwdb.d/ which for LFS is /lib/udev/hwdb.d/ so that's not a problem. I'll update the book later today. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page