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 17OUTDIR=$1/drivers/char/drm/ 18KERNEL_VERS=$2 19echo "Copying kernel independent files" 20mkdir -p $OUTDIR/.tmp 21 22( cd linux-core/ ; make drm_pciids.h ) 23cp shared-core/*.[ch] $OUTDIR/.tmp 24cp linux-core/*.[ch] $OUTDIR/.tmp 25cp linux-core/Makefile.kernel $OUTDIR/.tmp/Makefile 26 27echo "Copying 2.6 Kernel files" 28cp linux-core/Kconfig $OUTDIR/.tmp 29 30./scripts/drm-scripts-gentree.pl $KERNEL_VERS $OUTDIR/.tmp $OUTDIR 31cd $OUTDIR 32 33rm -rf .tmp 34rm sis_ds.[ch] 35 36cd - 37