summaryrefslogtreecommitdiff
path: root/scripts/create_lk_drm.sh
blob: ce7c460bf84b9e30ca583d59da70bf17646c458c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#! /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

cp shared/*.[ch] $OUTDIR
cp linux/*.[ch] $OUTDIR
cp linux/Makefile.linux $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