aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/extras/drm/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/extras/drm/scripts')
-rw-r--r--nx-X11/extras/drm/scripts/create_bsd_pci_lists.sh40
-rw-r--r--nx-X11/extras/drm/scripts/create_linux_pci_lists.sh40
-rwxr-xr-xnx-X11/extras/drm/scripts/create_lk_drm.sh35
3 files changed, 115 insertions, 0 deletions
diff --git a/nx-X11/extras/drm/scripts/create_bsd_pci_lists.sh b/nx-X11/extras/drm/scripts/create_bsd_pci_lists.sh
new file mode 100644
index 000000000..64a1fcb4f
--- /dev/null
+++ b/nx-X11/extras/drm/scripts/create_bsd_pci_lists.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# 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
+
+while read pcivend pcidev attribs pciname
+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
+ echo " {$pcivend, $pcidev, $attribs, $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/nx-X11/extras/drm/scripts/create_linux_pci_lists.sh b/nx-X11/extras/drm/scripts/create_linux_pci_lists.sh
new file mode 100644
index 000000000..bb0e68782
--- /dev/null
+++ b/nx-X11/extras/drm/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 <<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
+
+while read pcivend pcidev attribs pciname
+do
+ if [ "x$pcivend" = "x" ]; then
+ if [ "$finished" = "0" ]; then
+ finished=1
+ echo " {0, 0, 0}" >> $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, $attribs}, \\" >> $OUTFILE
+ else
+ echo "#define "$cardtype"_PCI_IDS \\" >> $OUTFILE
+ finished=0
+ fi
+ fi
+done
+
+if [ "$finished" = "0" ]; then
+ echo " {0, 0, 0}" >> $OUTFILE
+fi
diff --git a/nx-X11/extras/drm/scripts/create_lk_drm.sh b/nx-X11/extras/drm/scripts/create_lk_drm.sh
new file mode 100755
index 000000000..6939faae7
--- /dev/null
+++ b/nx-X11/extras/drm/scripts/create_lk_drm.sh
@@ -0,0 +1,35 @@
+#! /bin/bash
+# script to create a Linux Kernel tree from the DRM tree for diffing etc..
+#
+# Original author - Dave Airlie (C) 2004 - airlied@linux.ie
+#
+
+if [ $# -lt 2 ] ;then
+ echo usage: $0 output_dir [2.4\|2.6]
+ exit 1
+fi
+
+if [ ! -d shared -o ! -d linux ] ;then
+ echo not in DRM toplevel
+ exit 1
+fi
+
+OUTDIR=$1/drivers/char/drm/
+VERS=$2
+
+echo "Copying kernel independent files"
+mkdir -p $OUTDIR
+
+( cd linux/ ; make drm_pciids.h )
+cp shared-core/*.[ch] $OUTDIR
+cp linux-core/*.[ch] $OUTDIR
+cp linux-core/Makefile.kernel $OUTDIR/Makefile
+
+if [ $VERS = 2.4 ] ;then
+ echo "Copying 2.4 Kernel files"
+ cp linux/Config.in $OUTDIR/
+elif [ $VERS = 2.6 ] ;then
+ echo "Copying 2.6 Kernel files"
+ cp linux/Kconfig $OUTDIR/
+fi
+