2004-05-09 15:57:58 -06:00
|
|
|
#!/bin/sh
|
2004-04-21 17:45:18 -06:00
|
|
|
#
|
|
|
|
# Script to output BSD compatible pci ids file
|
|
|
|
# - Copyright Dave Airlie 2004 (airlied@linux.ie)
|
|
|
|
#
|
|
|
|
OUTFILE=drm_pciids.h
|
|
|
|
|
|
|
|
finished=0
|
|
|
|
|
|
|
|
cat > $OUTFILE <<EOF
|
|
|
|
/*
|
|
|
|
This file is auto-generated from the drm_pciids.txt in the DRM CVS
|
|
|
|
Please contact dri-devel@lists.sf.net to add new cards to this list
|
|
|
|
*/
|
|
|
|
EOF
|
|
|
|
|
2004-08-10 05:14:07 -06:00
|
|
|
while read pcivend pcidev attribs pciname
|
2004-04-21 17:45:18 -06:00
|
|
|
do
|
|
|
|
if [ "x$pcivend" = "x" ]; then
|
|
|
|
if [ "$finished" = "0" ]; then
|
|
|
|
finished=1
|
|
|
|
echo " {0, 0, 0, NULL}" >> $OUTFILE
|
|
|
|
echo >> $OUTFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
|
|
|
|
cardtype=`echo "$pcivend" | cut -s -f2 -d'[' | cut -s -f1 -d']'`
|
|
|
|
if [ "x$cardtype" = "x" ];
|
|
|
|
then
|
2004-08-10 05:14:07 -06:00
|
|
|
echo " {$pcivend, $pcidev, $attribs, $pciname}, \\" >> $OUTFILE
|
2004-04-21 17:45:18 -06:00
|
|
|
else
|
|
|
|
echo "#define "$cardtype"_PCI_IDS \\" >> $OUTFILE
|
|
|
|
finished=0
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "$finished" = "0" ]; then
|
|
|
|
echo " {0, 0, 0, NULL}" >> $OUTFILE
|
|
|
|
fi
|