免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2385 | 回复: 0

lfs-6.5上安装xorg-7.5 [复制链接]

论坛徽章:
0
发表于 2010-02-05 23:24 |显示全部楼层

                                                花了好几个小时,终于把xorg7.5搞定
主要参考:
http://www.linuxsir.org/bbs/thread321931.html
http://www.linuxfromscratch.org/blfs/view/svn/x/x.html
重要参数:
XORG_PREFIX
XORG_CONFIG
PATH
/etc/ld.so.conf
PKG_CONFIG_PATH
碰到错误提示,首先看看以上参数有没有问题,多不退少要补
大致过程(理论上,以下的可以作为自动安装脚本来使用,但难免有些细节处遗漏或打错字~):
####################################################
export XORG_PREFIX="/usr/X11R7"  
##装在/usr/X11R7,推荐的位置
export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc \
    --mandir=$XORG_PREFIX/share/man --localstatedir=/var"
##这个变量贯穿始终
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R7/bin/
##在Xorg Applications和最后configure xorg时有用
cat >> /etc/ld.so.conf &1 | tee -a ../proto-7.5-2-compile.log
cd ..
## Xorg Utilities
wget http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg/util-7.5-2.md5
wget http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg/util-7.5-2.wget
mkdir util &&
cd util &&
grep -v '^#' ../util-7.5-2.wget | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/util/ &&
md5sum -c ../util-7.5-2.md5
for package in $(grep -v '^#' ../util-7.5-2.wget)
do
  packagedir=${package%.tar.bz2}
  tar -xf $package
  cd $packagedir
  ./configure $XORG_CONFIG
  make
  make install
  cd ..
  rm -rf $packagedir
done 2>&1 | tee -a ../util-7.5-2-compile.log
cd ..
## libXau-1.0.5
wget http://xorg.freedesktop.org/releases/individual/lib/libXau-1.0.5.tar.bz2
tar xvf libXau-1.0.5.tar.bz2
cd libXau-1.0.5
./configure $XORG_CONFIG &&
make
make install
cd ..
## libXdmcp-1.0.3
wget http://xorg.freedesktop.org/releases/individual/lib/libXdmcp-1.0.3.tar.bz2
tar xvf libXdmcp-1.0.3.tar.bz2
cd libXdmcp-1.0.3
./configure $XORG_CONFIG &&
make
make install
cd ..
## Ed-1.4
wget http://ftp.gnu.org/pub/gnu/ed/ed-1.4.tar.gz
tar xvf ed-1.4.tar.gz
cd ed-1.4
./configure --prefix=/usr --bindir=/bin &&
make
make install
cd ..
## FreeType-2.3.11
wget http://downloads.sourceforge.net/freetype/freetype-2.3.11.tar.bz2
wget http://downloads.sourceforge.net/freetype/freetype-doc-2.3.11.tar.bz2
tar xvf freetype-2.3.11.tar.bz2
cd freetype-2.3.11
tar -xf ../freetype-doc-2.3.11.tar.bz2 \
    --strip-components=2 -C docs
sed -i -r -e 's:.*(#.*BYTE.*) .*:\1:' \
          -e 's:.*(#.*SUBPIX.*) .*:\1:' \
          include/freetype/config/ftoption.h &&
./configure --prefix=/usr
make
make install
install -v -m755 -d /usr/share/doc/freetype-2.3.11 &&
cp -v -R docs/*     /usr/share/doc/freetype-2.3.11
cd ..
## Expat-2.0.1
wget http://downloads.sourceforge.net/expat/expat-2.0.1.tar.gz
tar xvf expat-2.0.1.tar.gz
cd expat-2.0.1
./configure --prefix=/usr &&
make
make install &&
install -v -m755 -d /usr/share/doc/expat-2.0.1 &&
install -v -m644 doc/*.{html,png,css} /usr/share/doc/expat-2.0.1
cd ..
## libxml2-2.7.6
wget http://xmlsoft.org/sources/libxml2-2.7.6.tar.gz
tar xvf libxml2-2.7.6.tar.gz
cd libxml2-2.7.6/
./configure --prefix=/usr &&
make
make install
cd ..
## Fontconfig-2.7.3
wget http://fontconfig.org/release/fontconfig-2.7.3.tar.gz
tar xvf fontconfig-2.7.3.tar.gz
cd fontconfig-2.7.3
./configure --prefix=/usr \
    --sysconfdir=/etc --localstatedir=/var \
    --disable-docs --without-add-fonts \
    --with-docdir=/usr/share/doc/fontconfig-2.7.3 &&
make
make install
cd ..
## libpthread-stubs-0.1
wget http://xcb.freedesktop.org/dist/libpthread-stubs-0.1.tar.bz2
tar xvf libpthread-stubs-0.1.tar.bz2
cd libpthread-stubs-0.1
./configure --prefix=/usr &&
make
make install
cd ..
## libxslt-1.1.26
wget http://xmlsoft.org/sources/libxslt-1.1.26.tar.gz
tar xvf libxslt-1.1.26.tar.gz
cd libxslt-1.1.26
./configure --prefix=/usr &&
make
make install
cd ..
## Python-2.6.4
wget http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tar.bz2
tar xvf Python-2.6.4.tar.bz2
cd Python-2.6.4
sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" \
     setup.py &&
./configure --prefix=/usr --enable-shared &&
make
make install
cd ..
## xcb-proto-1.5
wget http://xcb.freedesktop.org/dist/xcb-proto-1.5.tar.bz2
tar xvf xcb-proto-1.5.tar.bz2
cd xcb-proto-1.5
./configure $XORG_CONFIG
make install &&
install -dv -m755 ${XORG_PREFIX}/share/doc/xcb-proto-1.5 &&
install -v -m644 doc/* ${XORG_PREFIX}/share/doc/xcb-proto-1.5
cd ..
## libxcb-1.4
wget http://xcb.freedesktop.org/dist/libxcb-1.4.tar.bz2
tar xvf libxcb-1.4.tar.bz2
cd libxcb-1.4
./configure $XORG_CONFIG --docdir='${datadir}'/doc/libxcb-1.4 &&
make
make install
cd ..
## Xorg Libraries
wget http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg/lib-7.5-2.md5
wget http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg/lib-7.5-2.wget
mkdir lib &&
cd lib &&
grep -v '^#' ../lib-7.5-2.wget | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/lib/ &&
md5sum -c ../lib-7.5-2.md5
for package in $(grep -v '^#' ../lib-7.5-2.wget)
do
  packagedir=${package%.tar.bz2}
  tar -xf $package
  cd $packagedir
  case "$packagedir" in
  libX11-1.3.2 )
    # Uncomment if you did not build libxcb
    #CONFIGPARAMS="--without-xcb"
  esac &&
  ./configure $XORG_CONFIG $CONFIGPARAMS
  make
  make install
  unset CONFIGPARAMS
  ldconfig
  cd ..
  rm -rf $packagedir
done 2>&1 | tee -a ../lib-7.5-2-compile.log
cd ..
ln -sv $XORG_PREFIX/lib/X11 /usr/lib/X11 &&
ln -sv $XORG_PREFIX/include/X11 /usr/include/X11 &&
ln -sv $XORG_PREFIX /usr/X11R6
## Xbitmaps-1.1.0
wget http://xorg.freedesktop.org/releases/individual/data/xbitmaps-1.1.0.tar.bz2
tar xvf xbitmaps-1.1.0.tar.bz2
cd xbitmaps-1.1.0
./configure $XORG_CONFIG
make install
cd ..
## libpng-1.2.39
wget http://downloads.sourceforge.net/libpng/libpng-1.2.39.tar.bz2
tar xvf libpng-1.2.39.tar.bz2
cd libpng-1.2.39
patch -Np1 -i ../libpng-1.2.39-apng-1.patch &&
./configure --prefix=/usr &&
make
make install &&
install -v -m755 -d /usr/share/doc/libpng-1.2.39 &&
install -v -m644    README libpng-1.2.39.txt \
                    /usr/share/doc/libpng-1.2.39
cd ..
## Xorg Applications
wget http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg/app-7.5-2.md5
wget http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg/app-7.5-2.wget
mkdir app &&
cd app &&
grep -v '^#' ../app-7.5-2.wget | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/app/ &&
md5sum -c ../app-7.5-2.md5
for package in $(grep -v '^#' ../app-7.5-2.wget)
do
  packagedir=${package%.tar.bz2}
  tar -xf $package
  cd $packagedir
  ./configure $XORG_CONFIG
  make
  make install
  cd ..
  rm -rf $packagedir
done 2>&1 | tee -a ../app-7.5-2-compile.log
cd ..
## xcursor-themes-1.0.2
wget http://xorg.freedesktop.org/releases/individual/data/xcursor-themes-1.0.2.tar.bz2
tar xvf xcursor-themes-1.0.2.tar.bz2
cd xcursor-themes-1.0.2
./configure $XORG_CONFIG &&
make
make install
cd ..
## Xorg Fonts
wget http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg/font-7.5-2.md5
wget http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg/font-7.5-2.wget
mkdir font &&
cd font &&
grep -v '^#' ../font-7.5-2.wget | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/font/ &&
md5sum -c ../font-7.5-2.md5
for package in $(grep -v '^#' ../font-7.5-2.wget)
do
  packagedir=${package%.tar.bz2}
  tar -xf $package
  cd $packagedir
  ./configure $XORG_CONFIG
  make
  make install
  cd ..
  rm -rf $packagedir
  rm -f $package
done 2>&1 | tee -a ../font-7.5-2-compile.log
cd ..
install -v -d -m755 /usr/share/fonts &&
ln -svn $XORG_PREFIX/lib/X11/fonts/OTF /usr/share/fonts/X11-OTF &&
ln -svn $XORG_PREFIX/lib/X11/fonts/TTF /usr/share/fonts/X11-TTF
## XML::Parser-2.34
wget http://cpan.org/authors/id/M/MS/MSERGEANT/XML-Parser-2.34.tar.gz
tar xvf XML-Parser-2.34.tar.gz
cd XML-Parser-2.34
perl Makefile.PL &&
make
make install
cd ..
## Intltool-0.40.6
wget http://ftp.gnome.org/pub/gnome/sources/intltool/0.40/intltool-0.40.6.tar.bz2
tar xvf intltool-0.40.6.tar.bz2
cd intltool-0.40.6
./configure --prefix=/usr &&
make
make install &&
install -v -m644 -D doc/I18N-HOWTO \
    /usr/share/doc/intltool-0.40.6/I18N-HOWTO
cd ..
## XKeyboardConfig-1.7
wget http://xlibs.freedesktop.org/xkbdesc/xkeyboard-config-1.7.tar.bz2
tar xvf xkeyboard-config-1.7.tar.bz2
cd xkeyboard-config-1.7
./configure $XORG_CONFIG --with-xkb-rules-symlink=xorg &&
make
make install &&
install -dv -m755 $XORG_PREFIX/share/doc/xkeyboard-config-1.7 &&
install -v -m644 docs/{README,HOWTO}* \
    $XORG_PREFIX/share/doc/xkeyboard-config-1.7
cd ..
## Luit-1.0.4
wget http://xorg.freedesktop.org/releases/individual/app/luit-1.0.4.tar.bz2
tar xvf luit-1.0.4.tar.bz2
cd luit-1.0.4
./configure $XORG_CONFIG &&
make
make install
cd ..
## pixman-0.15.20
wget http://cairographics.org/releases/pixman-0.15.20.tar.gz
tar xvf pixman-0.15.20.tar.gz
cd pixman-0.15.20
./configure --prefix=/usr &&
make
make install
cd ..
## libdrm-2.4.14
wget http://dri.freedesktop.org/libdrm/libdrm-2.4.14.tar.bz2
tar xvf libdrm-2.4.14.tar.bz2
cd libdrm-2.4.14
./configure --prefix=$XORG_PREFIX &&
make
make install
cd ..
## MesaLib-7.6
wget ftp://ftp.freedesktop.org/pub/mesa/7.6/MesaLib-7.6.tar.bz2
wget ftp://ftp.freedesktop.org/pub/mesa/7.6/MesaDemos-7.6.tar.bz2
tar xvf MesaLib-7.6.tar.bz2
tar xvf MesaDemos-7.6.tar.bz2
cd Mesa-7.6
sed 's@FLAGS=\"-g@FLAGS=\"@' -i configure &&
./configure $XORG_CONFIG &&
make
make install
install -v -m755 progs/xdemos/glx{info,gears} ${XORG_PREFIX}/bin
ln -s -v ${XORG_PREFIX}/include/GL /usr/include
cd ..
## Xorg-Server-1.7.1
wget http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.7.1.tar.bz2
tar xvf xorg-server-1.7.1.tar.bz2
cd xorg-server-1.7.1
./configure $XORG_CONFIG \
    --with-module-dir=$XORG_PREFIX/lib/X11/modules \
    --with-xkb-output=/var/lib/xkb \
    --enable-install-setuid &&
make
make install
cd ..
## Xorg Drivers
wget http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg/driver-7.5-2.md5
wget http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg/driver-7.5-2.wget
mkdir driver &&
cd driver &&
grep -v '^#' ../driver-7.5-2.wget | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/driver/ &&
md5sum -c ../driver-7.5-2.md5
## vim ../driver-7.5-2.wget,据手册说可能会有hang出现,所以需要注释掉vmware等驱动,在vmware里做的就装vmware-tools好了
for package in $(grep -v '^#' ../driver-7.5-2.wget)
do
  packagedir=${package%.tar.bz2}
  tar -xf $package
  cd $packagedir
  case $packagedir in
  xf86-input-evdev-[0-9]* | xf86-video-ati-[0-9]* | \
  xf86-video-fbdev-[0-9]* | xf86-video-glint-[0-9]* | \
  xf86-video-newport-[0-9]* )
    sed -i -e "s/\xc3\xb8/\\\\[\/o]/" \
           -e "s/\xc3\xa4/\\\\[:a]/" \
           -e "s/\xc3\x9c/\\\\[:U]/" man/*.man
    ;;
  esac &&
  ./configure $XORG_CONFIG \
      --with-xorg-module-dir=$XORG_PREFIX/lib/X11/modules
  make
  make install
  cd ..
  rm -rf $packagedir
done 2>&1 | tee -a ../driver-7.5-2-compile.log
cd ..
## X Window System Components
mkdir -p /etc/X11 &&
for file in $XORG_PREFIX/{lib/X11/xinit,share/X11/{app-defaults,twm}}
do
     mv -v $file /etc/X11/ 2> /dev/null &&
     ln -v -s /etc/X11/$(basename $file) $file
done
####################################################
至此,需要修改menu.list在kernel这行修改:
kernel /boot/lfskernel-2.6.30.2 root=/dev/sda2 vesafb: mtrr, ywrap vga=0x33F
数字0x33F可以改为自己适合的分辨率,这样fb就打开了
然后继续配置
export XORG_PREFIX="/usr/X11R7"
export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc \
    --mandir=$XORG_PREFIX/share/man --localstatedir=/var"
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R7/bin/
export PKG_CONFIG_PATH=/usr/X11R7/lib/pkgconfig:/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R7/share/pkgconfig
Xorg -conigure
X -retro -config ~/xorg.conf.new
install -v -m644 ~/xorg.conf.new /etc/X11/xorg.conf
最后按照手册,装上xterm和fluxbox,就变成这腔调了(好像随便挑了个叫BlueNight的主题~~):

本想装openbox的,fluxbox不太会用,可惜openbox依赖gtk+-2.0,懒得装了
忙了大半天,洗洗睡了
               
               
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/96229/showart_2178829.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP