From 0edc2abf8414f6fa414aa4071f4fa9ccbee186a7 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 21 Apr 2004 23:45:18 +0000 Subject: add new files to generate pci ids --- scripts/create_bsd_pci_lists.sh | 40 +++++++++++++++++++++++++++++++++++++++ scripts/create_linux_pci_lists.sh | 40 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 scripts/create_bsd_pci_lists.sh create mode 100644 scripts/create_linux_pci_lists.sh (limited to 'scripts') diff --git a/scripts/create_bsd_pci_lists.sh b/scripts/create_bsd_pci_lists.sh new file mode 100644 index 00000000..11cdeea3 --- /dev/null +++ b/scripts/create_bsd_pci_lists.sh @@ -0,0 +1,40 @@ +#! /bin/bash +# +# Script to output BSD compatible pci ids file +# - Copyright Dave Airlie 2004 (airlied@linux.ie) +# +OUTFILE=drm_pciids.h + +finished=0 + +cat > $OUTFILE <> $OUTFILE + echo >> $OUTFILE + fi + else + + cardtype=`echo "$pcivend" | cut -s -f2 -d'[' | cut -s -f1 -d']'` + if [ "x$cardtype" = "x" ]; + then + echo " {$pcivend, $pcidev, 0, $pciname}, \\" >> $OUTFILE + else + echo "#define "$cardtype"_PCI_IDS \\" >> $OUTFILE + finished=0 + fi + fi +done + +if [ "$finished" = "0" ]; then + echo " {0, 0, 0, NULL}" >> $OUTFILE +fi diff --git a/scripts/create_linux_pci_lists.sh b/scripts/create_linux_pci_lists.sh new file mode 100644 index 00000000..bcba2b83 --- /dev/null +++ b/scripts/create_linux_pci_lists.sh @@ -0,0 +1,40 @@ +#! /bin/bash +# +# Script to output Linux compatible pci ids file +# - Copyright Dave Airlie 2004 (airlied@linux.ie) +# +OUTFILE=drm_pciids.h + +finished=0 + +cat > $OUTFILE <> $OUTFILE + echo >> $OUTFILE + fi + else + + cardtype=`echo "$pcivend" | cut -s -f2 -d'[' | cut -s -f1 -d']'` + if [ "x$cardtype" = "x" ]; + then + echo " {$pcivend, $pcidev, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \\" >> $OUTFILE + else + echo "#define "$cardtype"_PCI_IDS \\" >> $OUTFILE + finished=0 + fi + fi +done + +if [ "$finished" = "0" ]; then + echo " {0, 0, 0}" >> $OUTFILE +fi -- cgit v1.2.3