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