hwdb: add IEEE OUI data

This commit is contained in:
Kay Sievers 2012-11-07 14:05:21 +01:00
parent c67fbe4c71
commit 448004c340
4 changed files with 51133 additions and 2 deletions

View File

@ -1799,7 +1799,8 @@ dist_udevrules_DATA += \
dist_udevhwdb_DATA = \
hwdb/20-pci-vendor-product.hwdb \
hwdb/20-usb-vendor-product.hwdb \
hwdb/20-acpi-vendor.hwdb
hwdb/20-acpi-vendor.hwdb \
hwdb/20-OUI-vendor.hwdb
udevconfdir = $(sysconfdir)/udev
dist_udevconf_DATA = \
@ -3985,7 +3986,7 @@ distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
clean-local:
rm -rf $(abs_srcdir)/install-tree
rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids
rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt
DISTCHECK_CONFIGURE_FLAGS = \
--with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
@ -4006,6 +4007,7 @@ hwdb-update:
( cd hwdb && \
wget -N http://www.linux-usb.org/usb.ids && \
wget -N http://pciids.sourceforge.net/v2.2/pci.ids && \
wget -N http://standards.ieee.org/develop/regauth/oui/oui.txt && \
./ids-update.pl )
upload: all distcheck

1
hwdb/.gitignore vendored
View File

@ -1,2 +1,3 @@
/pci.ids
/usb.ids
/oui.txt

51108
hwdb/20-OUI-vendor.hwdb Normal file

File diff suppressed because it is too large Load Diff

View File

@ -78,3 +78,23 @@ while (my $line = <IN>) {
}
close(INP);
close(OUTP);
open(IN, "<", "oui.txt");
open(OUT, ">", "20-OUI-vendor.hwdb");
print(OUT "# This file is part of systemd.\n" .
"#\n" .
"# Data imported and updated from: http://standards.ieee.org/develop/regauth/oui/oui.txt\n");
while (my $line = <IN>) {
$line =~ s/\s+$//;
$line =~ m/^([0-9A-F]{6})\s*\(base 16\)\s*(.*)$/;
if (defined $1) {
my $vendor = uc $1;
my $text = $2;
print(OUT "\n");
print(OUT "OUI:" . $vendor . "\n");
print(OUT " ID_VENDOR_FROM_DATABASE=" . $text . "\n");
}
}
close(INP);
close(OUTP);