On Wed, Nov 21, 2012 at 11:21:21AM -0600, Bruce Dubbs wrote: > I've been testing udev from systemd-196. I have been able to build and > install it with some changes to the LFS Makefile. One new capability is > that it has it's own hw database instead of lspci and lsusb. > > The raw db files go in /usr/lib/udev/hwdb.d/ and /etc/udev/hwdb.d/. > These files are indexed by usevadm --update and the index is stored in > /etc/udev/hwdb.bin. > > I'm not sure I did it correctly because the hwdb.bin is only 105 bytes > and the raw files (6 of them) total about 4 MB.
*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.) > 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. 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. :-) ) > Any help in figuring out how this is supposed to work would be > appreciated. In the meantime, I'll be browsing source... Yup, that was going to be the next guess, if none of the modaliases on your system, or variants of them, act useful... :-/ I *assume* all of this support is only to add things like the previous versions' pci / usb comments? (Which are used in the NIC persistence rules, to generate comments, but I don't know if they're used anywhere else or not.) Maybe we don't need it at all? ...Though I'm not sure how to evaluate that. > Another question, Should we change /usr/lib/udev/hwdb.d/ to > /lib/udev/hwdb.d/ to be with the other udev files? My first impression was yes, but I'm not actually so sure anymore -- these are just the source files (similar to .a or .la or .pc files), right? If they're not needed at runtime, then it probably doesn't matter where we put the source files. Although the target file (/etc/udev/hwdb.bin) might be better placed in /lib somewhere, rather than /etc -- it's not really configuration, it's runtime data. Actually, /usr/share (except for split-/usr) would seem even better, but there is no /share, so ... sigh. :-) Whatever; /etc is probably reasonable at least, since I bet there isn't an easy knob to change the filename it tries to open().
pgpcNFUAhe2Ks.pgp
Description: PGP signature
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page