CLE266 XFree

From CourvilleWiki

Jump to: navigation, search

Contents

CLE266 XFree recompilation for 3D(DRI)/2D support

XFree recompilation

Cover the full TV screen

this is solved by using <tt>Option "TVVScan" "over" in the via "Device" section of /etc/X11/XF86Config-4

TV out options

These are the options we use in the "Device" section of /etc/X11/XF86Config-4

  Option "NoDDCValue"
  Option "TVType" "Secam"
  Option "TVOutput" "Composite"
  Option "UseBios" "On"
  Option "ActiveDevice" "TV"
  Option "TVVScan" "over"

XFree86 2D/3D support :)

  1. VIA has released their drivers public including hw acceleration it is available here: http://www.linux.org.uk/~alan/CLE266.zip
  2. A preliminary patch that includes VIA CLE266 DRM and V4L support for 2.4 is available here: http://droi.de/epia-m/
  3. Some notes are available on the DRI mailing list: http://sourceforge.net/mailarchive/message.php?msg_id=5339993

Recompilation from scratch for 2D support

  1. recompile the vanilla debian xfree distribution
DEBSRC=/marc/xfree/debian
DEBXFR=$DEBSRC/xfree86-4.2.1/upstream/archives
XSRC=$DEBXFR/xc
cd $DEBSRC
apt-get source xserver-xfree86
cd $DEBXFR
rm -rf xc
tar zxf xfree86-4.2.1.tar.gz
cd $XSRC
for i in $DEBSRC/xfree86-4.2.1/debian/patches/*
do
cat $i | patch -p1
done
make World >& World.log & tail -f World.log &
  1. download VIA code and unpack it in /marc/xfree/cle266

VIASRC=/marc/xfree/cle266/CLEXF40028-lite-XFree86/src

  1. in $XSRC/config/cf modify xf86site.def or host.def to add a:
#define XF86ExtraCardDrivers via
  1. and add in $XSRC/programs/Xserver/hw/xfree86/drivers/Imakefile via/?*_drv.o in the OBJS = line
  2. then issue the following commands:
cp -r $VIASRC/include /
cp -r $VIASRC/via $XSRC/programs/Xserver/hw/xfree86/drivers
cp -r $VIASRC/V4L $XSRC/programs/Xserver/hw/xfree86/drivers
cp -r $VIASRC/DRM/* $XSRC/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel

cd $XSRC/programs/Xserver/hw/xfree86/drivers/via
make
make -n install
install -c via_drv.o /usr/X11R6/lib/modules/drivers
cd $XSRC/programs/Xserver/hw/xfree86/drivers/V4L
make DRM=yes
make -n install
cp -v via_v4l_drv.o /lib/modules/`uname -r`/kernel/drivers/media/video/
cd $XSRC/programs/Xserver/hw/xfree86/drivers/V4L/videodev/RedHat/8.0
make
cp -v videodev.o /lib/modules/`uname -r`/kernel/drivers/media/video/
cd $XSRC/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel
make -f Makefile.linux
cp via.o /lib/modules/`uname -r`/kernel/drivers/char/drm
  1. finally modify /etc/modutils/aliases
alias char-major-81 videodev
alias char-major-81-0 via_v4l_drv
alias char-major-81-1 via_v4l_drv
alias char-major-81-2 via_v4l_drv
  1. the modules should be loaded that way
modprobe agpgart agp_try_unsupported=1
modprobe videodev
modprobe via
modprobe via_v4l_drv
modprobe snd-via82xx dxs_support=3
  1. building the via_dri driver with 4.2.1:
cd $XSRC/lib/GL/mesa/src/drv
mkdir via
cp -r $VIASRC/DRI/* via
cd via
cp dri.c $XSRC/programs/Xserver/GL/dri
cp dri_util.c $XSRC/lib/GL/dri
cp glxcmds.c $XSRC/lib/GL/glx
  1. Make a build tree
  2. modify $XSRC/config/cf/xfree86.cf as follows:
  3. add savage in all the #define DriDrivers lines matching
#  define DriDrivers            gamma TdfxDriDriver mga i810 i830 r128 radeon sis via
  1. edit $XSRC/config/cf/host.def and append:
#define DefaultGcc2i386Opt -g
#define MesaUse3DNow NO
  1. compile the whole stuff:
cd $XSRC
make World >& World.log & tail -f World.log &
  1. install the library
cp $XSRC/lib/GL/GL/libGL.so.1.2 /usr/X11R6/lib/libGL.so.1.2
cp $XSRC/lib/GL/mesa/src/drv/via/via_dri.so /usr/X11R6/lib/modules/dri

VIA_DRI from cvs snapshot:

  1. get a cvs snapshot of the dri sf code:
cvs -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri login
(passwd )
cvs -z3 -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri co xc
  1. Merge DRI driver into cvs
DRICVS=/marc/xfree/dri-cvs/xc
cd $DRICVS/xc/lib/GL/mesa/src/drv
mkdir via
cp -r $VIASRC/DRI/* via
cd via
cp dri.c $DRICVS/xc/programs/Xserver/GL/dri
cp dri_util.c $DRICVS/xc/lib/GL/dri
cp dri_util.c $DRICVS/xc/lib/GL/dri
cp glxcmds.c $DRICVS/xc/lib/GL/glx
  1. Make a build tree
cd $DRICVS/..
ln -s xc XFree421
mkdir build
cd build
lndir -silent -ignorelinks ../XFree421
DRIBUILD=$DRICVS/../build/xc
  1. edit $DRIBUILD/config/cf/host.def and add via to DriDrivers and append at the end:
#define DefaultGcc2i386Opt -g
#define MesaUse3DNow NO
  1. compile the whole stuff:
cd /marc/xfree/dri-cvs/build/xc
make World >& World.log & tail -f World.log &
  1. install the library
cp /marc/xfree/dri-cvs/build/xc/lib/GL/GL/libGL.so.1.2 /usr/X11R6/lib/libGL.so.1.2
cp /marc/xfree/dri-cvs/build/xc/lib/GL/mesa/src/drv/via/via_dri.so /usr/X11R6/lib/modules/dri
Personal tools