2004-03-23 04:06:47 -07:00
|
|
|
#! /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
|
|
|
|
#
|
|
|
|
|
2006-08-09 22:31:56 -06:00
|
|
|
if [ $# -lt 1 ] ;then
|
|
|
|
echo usage: $0 output_dir
|
2004-03-23 04:06:47 -07:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2006-08-09 22:31:56 -06:00
|
|
|
if [ ! -d shared-core -o ! -d linux-core ] ;then
|
2004-03-23 04:17:03 -07:00
|
|
|
echo not in DRM toplevel
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2004-03-23 04:06:47 -07:00
|
|
|
OUTDIR=$1/drivers/char/drm/
|
|
|
|
|
|
|
|
echo "Copying kernel independent files"
|
|
|
|
mkdir -p $OUTDIR
|
|
|
|
|
2006-08-09 22:31:56 -06:00
|
|
|
( cd linux-core/ ; make drm_pciids.h )
|
2005-09-30 01:10:16 -06:00
|
|
|
cp shared-core/*.[ch] $OUTDIR
|
|
|
|
cp linux-core/*.[ch] $OUTDIR
|
|
|
|
cp linux-core/Makefile.kernel $OUTDIR/Makefile
|
2004-03-23 04:06:47 -07:00
|
|
|
|
2006-08-09 22:31:56 -06:00
|
|
|
echo "Copying 2.6 Kernel files"
|
|
|
|
cp linux-core/Kconfig $OUTDIR/
|
2004-03-23 04:06:47 -07:00
|
|
|
|
2006-12-18 23:57:16 -07:00
|
|
|
cd $OUTDIR
|
|
|
|
|
|
|
|
for i in via*.[ch]
|
|
|
|
do
|
|
|
|
unifdef -D__linux__ -DVIA_HAVE_DMABLIT -DVIA_HAVE_CORE_MM $i > $i.tmp
|
|
|
|
mv $i.tmp $i
|
|
|
|
done
|
|
|
|
|
|
|
|
for i in sis*.[ch]
|
|
|
|
do
|
|
|
|
unifdef -D__linux__ -DVIA_HAVE_DMABLIT -DSIS_HAVE_CORE_MM $i > $i.tmp
|
|
|
|
mv $i.tmp $i
|
|
|
|
done
|
|
|
|
cd -
|