No empty .Rs/.Re
[netbsd-mini2440.git] / sys / external / bsd / drm / dist / scripts / create_lk_gpu.sh
blob4b323f7f2fb6efbce3758c1fa8cc37580e3691b6
1 #! /bin/bash
2 # script to create a Linux Kernel tree from the DRM tree for diffing etc..
4 # Original author - Dave Airlie (C) 2004 - airlied@linux.ie
5 # kernel_version to remove below (e.g. 2.6.24)
7 if [ $# -lt 2 ] ;then
8 echo usage: $0 output_dir kernel_version
9 exit 1
12 if [ ! -d shared-core -o ! -d linux-core ] ;then
13 echo not in DRM toplevel
14 exit 1
17 DRMDIR=$1/drivers/gpu/drm/
18 HDRDIR=$1/include/drm/
19 KERNEL_VERS=$2
20 echo "Copying kernel independent files"
21 mkdir -p $DRMDIR/.tmp
22 mkdir -p $HDRDIR/.tmp
24 ( cd linux-core/ ; make drm_pciids.h )
25 cp shared-core/*.[ch] $DRMDIR/.tmp
26 cp linux-core/*.[ch] $DRMDIR/.tmp
27 cp linux-core/Makefile.kernel $DRMDIR/.tmp/Makefile
29 echo "Copying 2.6 Kernel files"
30 cp linux-core/Kconfig $DRMDIR/.tmp
32 ./scripts/drm-scripts-gentree.pl $KERNEL_VERS $DRMDIR/.tmp $DRMDIR
33 mv $DRMDIR/drm*.h $HDRDIR
34 mv $DRMDIR/*_drm.h $HDRDIR
36 cd $DRMDIR
37 rm -rf .tmp
38 rm via_ds.[ch]
39 rm sis_ds.[ch]
40 rm amd*.[ch]
41 rm radeon_ms*.[ch]
43 for i in radeon mach64 r128 mga i915 i810 via savage sis xgi nouveau tdfx ffb imagine
45 mkdir ./$i
46 mv $i*.[ch] $i/
47 done
49 mv r300*.[ch] radeon/
50 mv r600*.[ch] radeon/
51 mv ObjectID.h radeon/
52 mv atom*.[ch] radeon/
54 mv nv*.[ch] nouveau/
55 mv intel*.[ch] i915/
56 mv dvo*.[ch] i915/
58 cd -