LFS Xorg

Aus VDR Wiki
Version vom 5. Juni 2005, 16:22 Uhr von Wirbel (Diskussion | Beiträge)

(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

Einleitung

Diese Anleitung beschreibt die Installation Xorg, KDE, kvdr unter LFS-6.0

Hinweis
Hinweis

Diese Anleitung wird Schritt für Schritt vervollständigt. Prinzipiell ist der Ablauf für XFree86 nahezu identisch. Die Anleitung folgt natürlich in weiten Teilen BLFS.
wirbel


Xorg

libpng-1.2.8

Bitte überspringen, falls libpng-1.2.8 bereits installiert ist.

cd /usr/src/packages
wget http://prdownloads.sourceforge.net/libpng/libpng-1.2.8.tar.bz2 
wget http://www.linuxfromscratch.org/blfs/downloads/6.0/libpng-1.2.8-link_to_proper_libs-1.patch 
ln -s libpng-1.2.8.tar.bz2 ..
ln -s libpng-1.2.8-link_to_proper_libs-1.patch ..
cd /usr/src
tar xvfj libpng-1.2.8.tar.bz2
cd libpng-1.2.8
patch -Np1 -i ../libpng-1.2.8-link_to_proper_libs-1.patch &&
make prefix=/usr ZLIBINC=/usr/include \
    ZLIBLIB=/usr/lib -f scripts/makefile.linux &&
make prefix=/usr install -f scripts/makefile.linux
/sbin/ldconfig
cd /usr/src
rm -r libpng-*

FreeType-2.1.9

Bitte überspringen, falls Freetype-2.1.9 bereits installiert ist.

cd /usr/src/packages
wget http://prdownloads.sourceforge.net/freetype/freetype-2.1.9.tar.bz2 
wget http://www.linuxfromscratch.org/blfs/downloads/6.0/freetype-2.1.9-bytecode_interpreter-1.patch 
ln -s freetype-2.1.9.tar.bz2 ..
ln -s freetype-2.1.9-bytecode_interpreter-1.patch ..
cd /usr/src
tar xvfj freetype-2.1.9.tar.bz2
cd freetype-2.1.9
patch -Np1 -i ../freetype-2.1.9-bytecode_interpreter-1.patch &&
./configure --prefix=/usr &&
make &&
make install
/sbin/ldconfig
cd /usr/src
rm -r freetype-*

expat-1.95.8

Bitte überspringen, falls expat-1.95.8 bereits installiert ist.

cd /usr/src/packages
wget http://prdownloads.sourceforge.net/expat/expat-1.95.8.tar.gz 
ln -s expat-1.95.8.tar.gz ..
cd /usr/src
tar xvfz expat-1.95.8.tar.gz
cd expat.1.95.8
./configure --prefix=/usr &&
make &&
make install
cd /usr/src
rm -r expat-*

Fontconfig-2.2.3

cd /usr/src/packages
wget http://fontconfig.org/release/fontconfig-2.2.3.tar.gz 
ln -s fontconfig-2.2.3.tar.gz ..
cd /usr/src
tar xvfz fontconfig-2.2.3.tar.gz
cd fontconfig-2.2.3
./configure --prefix=/usr \
    --sysconfdir=/etc --disable-docs &&
make &&
make install
/sbin/ldconfig
cd /usr/src
rm -r fontconfig-*

Grafiktreiber

An dieser Stelle muss der Grafiktreiber geladen werden. Ich verwende eine GF4MX400, deswegen als Beispiel:

/usr/src/packages
wget http://download.nvidia.com/XFree86/Linux-x86/1.0-7664/NVIDIA-Linux-x86-1.0-7664-pkg1.run
chmod +x NVIDIA-Linux-x86-1.0-7664-pkg1.run
./NVIDIA-Linux-x86-1.0-7664-pkg1.run
modprobe nvidia

Xorg-6.8.2

Bitte überspringen, falls Xorg bereits installiert ist.

cd /usr/src/packages
wget ftp://ftp.opengroup.org/pub/x.org/pub/X11R6.8.2/src-single/X11R6.8.2-src.tar.bz2
ln -s X11R6.8.2-src.tar.bz2
tar xvfj X11R6.8.2-src.tar.bz2
cd X11R6.8.2 
sed -i '/^SUBDIRS =/s/ etc$//' programs/Xserver/Xprint/Imakefile
pushd config/util &&
make -f Makefile.ini lndir
cp lndir /usr/bin/
popd
mkdir ../xcbuild &&
cd ../xcbuild &&
lndir ../xc

Die nachfolgende Datei kann sicherlich bequemer mit einem Editor erstellt werden.

cat > config/cf/host.def << "EOF"
/* Begin Xorg host.def file */
 
/* System Related Information.  If you read and configure only one
 * section then it should be this one.  The Intel architecture defaults 
 * are set for a i686 and higher.  Axp is for the Alpha architecture 
 * and Ppc is for the Power PC.  AMD64 is for the Opteron processor. 
 * Note that there have been reports that the Ppc optimization line 
 * causes segmentation faults during build.  If that happens, try 
 * building without the DefaultGcc2PpcOpt line.  ***********/
 
/* #define DefaultGcc2i386Opt -O2 -fno-strength-reduce \
                              -fno-strict-aliasing -march=i686 */
/* #define DefaultGccAMD64Opt -O2 -fno-strength-reduce \
                              -fno-strict-aliasing */
/* #define DefaultGcc2AxpOpt  -O2 -mcpu=ev6 */
/* #define DefaultGcc2PpcOpt  -O2 -mcpu=750 */

#define HasFreetype2            YES
#define HasFontconfig           YES
#define HasExpat                YES
#define HasLibpng               YES
#define HasZlib                 YES

/*
 * Which drivers to build.  When building a static server, each of 
 * these will be included in it.  When building the loadable server 
 * each of these modules will be built.
 *
#define XF86CardDrivers         mga glint nv tga s3virge sis rendition \
                                neomagic i740 tdfx savage \
                                cirrus vmware tseng trident chips apm \
                                GlideDriver fbdev i128 \
                                ati AgpGartDrivers DevelDrivers ark \
                                cyrix siliconmotion vesa vga \
                                XF86OSCardDrivers XF86ExtraCardDrivers
*/

/*
 * Select the XInput devices you want by uncommenting this.
 *
#define XInputDrivers           mouse keyboard acecad calcomp citron \
                                digitaledge dmc dynapro elographics \
                                microtouch mutouch penmount spaceorb \
                                summa wacom void magictouch aiptek
 */

/* Most installs will only need this */

#define XInputDrivers           mouse keyboard

/* Disable building Xprint server and clients until we get them figured
 * out but build Xprint libraries to allow precompiled binaries such as
 * Acrobat Reader to run.
 */

#define XprtServer              NO
#define BuildXprintClients      NO

/* End Xorg host.def file */
EOF

Dann endlich kann Xorg gebacken werden:

sed -i -e "s@^#include <linux/config.h>@/* & */@" \
    `grep -lr linux/config.h *` &&
( make World 2>&1 | tee xorg-compile.log && exit $PIPESTATUS )

make install && 
make install.man &&
ln -sf ../X11R6/bin /usr/bin/X11 &&
ln -sf ../X11R6/lib/X11 /usr/lib/X11 &&
ln -sf ../X11R6/include/X11 /usr/include/X11

cat > ~/.xinitrc << "EOF"
# Begin .xinitrc file
xterm  -g 80x40+0+0   &
xclock -g 100x100-0+0 &
twm
EOF

cd /usr/src/packages
wget ftp://ftp.gnu.org/savannah/files/freefont/freefont-ttf.tar.gz
ln -s freefont-ttf.tar.gz ..
cd /usr/src
tar xfvz freefont-ttf.tar.gz
cd freefont-ttf/sfd && mv *.tff /usr/X11R6/lib/X11/fonts/TTF
cd /usr/src
rm -r freefont*

Der erste Start von Xorg

Zuerst wird eine Vorgabedatei erstellt, hier am Beispiel einer GF4MX400, die als Monitor einen TV am S-Videeo Ausgang betreibt und einer Maus mit Scrollrad am PS/2 Port:

cd ~
Xorg -configure

Entsprechend dem aktuellen System wird die Datei editiert:

Section "ServerLayout"
  Identifier  "X.org Configured"
  Screen 0    "Screen0" 0 0
  InputDevice "Keyboard0" "CoreKeyboard" 
EndSection

Section "Module"
  Load "glx"
  Load "extmod"
  Load "dbe"
  Load "record"
  Load "xtrap"
  Load "type1"
  Load "freetype"
EndSection

Section "InputDevice"
  Identifier "Keyboard0"
  Driver "kbd"
EndSection

Section "InputDevice"
  Identifier "Mouse0"
  Driver "mouse"
  Option "Protocol" "imps/2"
  Option "Device" "/dev/input/mouse0"
  Option "Buttons" "5"
  Option "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
  Identifier "Monitor0"
  VendorName "Monitor Vendor"
  ModelName  "Monitor Model"
EndSection

Section "Device"
  Option "NoLogo" "true"
  Option "NvAGP" "3"
  Option "ConnectedMonitor" "TV"
  Option "TVStandard" "PAL-B"
  Option "TVOutFormat" "S-Video"
  Identifier "Card0"
  Driver "nvidia"
  VendorName "nVidia Corporation"
EndSection

Section "Screen"
  Identifier "Screen0"
  Device "Card0"
  Monitor "Monitor0"
  DefaultDepth 24
  SubSection "Display"
    Viewport 0 0
    Depth 24
  EndSubSection
EndSection

Der X-Server startet nur, wenn eine gültiger und funktionierender Screen gefunden wird, also eine Kombination aus Device und Monitor, ebenso muss die Section InputDevice gültig sein.

Nachdem der X-Server ordnungsgemäß startet, wird die erzeugte xorg.conf.new nach /etc/X11 kopiert:

X -config ~/xorg.conf.new
mv ~/xorg.conf.new /etc/X11/xorg.conf

Jetzt muss sich der X-Server mit startx starten lassen und mit STRG+ALT+BACKSPACE wieder beenden lassen.

KDE

.. to be continued

KVDR

.. to be continued


Links

[1] http://www.kernel.org/pub/linux/utils/kernel/hotplug/ hotplug und udev download