XFree86的TinyX编译 |
XFree86的TinyX编译 |
2008-10-31 11:18:11, Fri
Post
#1
|
|
猫猫猫 Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 |
首先把XFree86的包解开,看里面的BUILD.txt文档。跟着里面作就可以了,主要是生成lndir命令(很有用的命令)创建工作目录连接。然后创建
config/cf/host.def 代码 #define TinyXServer YES #define XfbdevServer YES #define BuildServersOnly YES #define XF86Server NO #define XdmxServer NO #define XnestServer NO #define XsunServer NO #define Xsun24Server NO #define XsunMonoServer NO #define XsunLynxServer NO #define XSavageServer NO #define XIgsServer NO #define XTridentServer NO #define XchipsServer NO #define Xmach64Server NO #define Xi810Server NO #define XSis530Server NO #define XTrioServer NO #define XipaqServer NO #define XTS300Server NO #define XItsyServer NO #define XvesaServer NO #define XDarwinServer NO #define XVirtualFramebufferServer NO #define XprtServer NO #define BuildXprintClients NO #define CrossCompiling YES #define ProjectRoot /usr/X11R6 #define NothingOutsideProjectRoot YES #define BuildLibraries YES #define BuildDocs NO #undef BuildRender #define BuildRender YES #define UseRgbTxt YES #define OmitSnfSupport YES #define HasMTRRSupport NO #define UseX86Emu NO #define BuildGlxExt NO #define XF86INT10_BUILD X86INT10_STUB #define XInputDrivers mouse keyboard 如果是交叉编译,还需要修改(如果采用本机编译器,则不要进行此步骤) config/cf/cross.def 代码 /* $XFree86: xc/config/cf/cross.def,v 1.3 2002/04/04 14:05:33 eich Exp $ */ /* * This file contains redefinitions of some symbols to enable * cross compilation: e.g. paths for include files and paths to * compiler images. It will have to be edited to reflect these * given your local configuration. */ #undef i386Architecture #undef Arm32Architecture #define Arm32Architecture #undef OptimizedCDebugFlags #define OptimizedCDebugFlags -O2 #define ServerCDebugFlags -O2 #undef StandardDefines #define StandardDefines -Dlinux -D__arm__ -D_POSIX_SOURCE \ -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE -DUSE_DYNAMIC_LC -DUSE_UTF8_LOADER \ -DUSE_DYNAMIC_LOADER #undef CcCmd #define StdIncDir #define PreIncDir #undef PostIncDir #define PostIncDir #define CcCmd /opt/cross-compile-arm/gcc-3.3/bin/arm-linux-gcc -L/opt/cross-compile-arm/gcc-3.3/arm-linux/lib/ -I/opt/cross-compile-arm/gcc-3.3/arm-linux/include/ #undef CplusplusCmd #define HasCplusplus NO #define CplusplusCmd NO #define DoRanlibCmd YES #define RanlibCmd /opt/cross-compile-arm/gcc-3.3/bin/arm-linux-ranlib #undef ExtraLoadFlags #define ExtraLoadFlags #define FbNoPixelAddrCode #undef TermcapLibrary #define TermcapLibrary -L/usr/lib/ -lncurses #undef LdPostLib #define LdPostLib #undef ExtensionOSDefines #define ExtensionOSDefines #define ServerXdmcpDefines /**/ /* #define HostCcCmd /opt/cross-compile-arm/gcc-3.3/bin/arm-linux-gcc -L/opt/cross-compile-arm/gcc-3.3/arm-linux/lib/ -I/opt/cross-compile-arm/gcc-3.3/arm-linux/include/ */ #define HostCcCmd gcc #include <cross.rules> 然后修改lib/X11/Imakefile,在第一层的#if中增加 代码 && !TinyXServer 条件,这样编译tinyx的时候也会编译X11中的库,不加这个条件会出错。 本机编译运行命令 代码 make World > World.log 2>&1 交叉编译运行命令(假设交叉编译器的gcc程序在 /opt/cross-compile-arm/gcc-3.3/bin/ 目录下) 代码 make World CROSSCOMPILEDIR=/opt/cross-compile-arm/gcc-3.3/bin/ > World.log 2>&1 编译好了以后,拷贝到板子上(本机编译可以运行 make install),运行:Xfbdev -fp /usr/share/fonts -fn -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso8859-1 -fc -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso8859-1。如果一切正常,X11会起来的。其中字体部分可以通过fontconfig配置好,然后直接运行Xfbdev就可以了。 另外,编译tinyx在linux kernel2.4运行时出错。NR_KEY在2.4的内核中是128,在2.6的内核中是256,因此数组越界。在tinyx中把NR_KEYS设置为128就可以了。 还有如果在tinyx中新加一个硬件显卡的framebuffer驱动也比较麻烦。主要步骤如下:修改xfree86.cf文件;修改Xserver目录下的Imakefile文件;修改tinyx目录下的Imakefile文件;增加tinyx相应的驱动(在tinyx目录下增加驱动的目录和相应的文件)。 |
|
|
Lo-Fi Version | Time is now: 2024-11-1 10:37 |