编译平台:ubuntu 10.04 + gcc-3.4.6
XFree86-4.8.0
# tar xf XFree86-4.8.0.tar.gz
# vi 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
#define MipsArchitecture
#undef OptimizedCDebugFlags
#define OptimizedCDebugFlags -O2
#define ServerCDebugFlags -O2
#undef CcCmd
#undef StdIncDir
#undef PreIncDir
#undef PostIncDir
#define CcCmd mipsel-linux-gcc
#define HasCplusplus YES
#undef CplusplusCmd
#define CplusplusCmd mipsel-linux-g++
#undef LdCmd
#define LdCmd mipsel-linux-ld
#undef AsCmd
#define AsCmd mipsel-linux-gcc -c -x assembler-with-cpp
#undef ArCmd
#define ArCmd mipsel-linux-ar cr
#define DoRanlibCmd YES
#define RanlibCmd mipsel-linux-ranlib
#undef ExtraLoadFlags
#define ExtraLoadFlags
#define FbNoPixelAddrCode
#undef TermcapLibrary
#define TermcapLibrary -ltermcap
#undef LdPreLib
#undef LdPostLib
#define LdPostLib -L$(BUILDLIBDIR) -Wl,-rpath-link,$(BUILDLIBDIR) -L/usr/local/lib/ 此处指定库的链接路(如里面要用到的zlib库)
#undef ExtensionOSDefines
#define ExtensionOSDefines
#include
保存退出
# vim host.def
#define TinyXServer YES
#define XfbdevServer YES
#define BuildServersOnlyYES
#define BuildFonts NO
#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 U***86Emu NO
#define BuildGlxExt NO
#define XF86INT10_BUILD X86INT10_STUB
#define XInputDrivers mouse keyboard
保存退出
# cp cross.def host.def xc/config/cf/
# cd xc
# make World
../../config/makedepend/makedepend: warning: ftapi.c (reading ./freetype/config/ftconfig.h), line 84: #error "Unsupported size of `int' type!"
../../config/makedepend/makedepend: warning: ftapi.c (reading ./freetype/config/ftconfig.h), line 94: #error "Unsupported size of `long' type!"
make[3]: *** [depend] Floating point exception
make[3]: Leaving directory `/home/work/promgam/x-window/cross-xw/xc/lib/freetype2'
# vim ./lib/freetype2/freetype/config/ftconfig.h
将 (71行)
#define FT_CHAR_BIT CHAR_BIT
改为
#define FT_CHAR_BIT 8
lbx_zlib.h:53:18: zlib.h: No such file or directory
# find . -name zlib.h
./extras/freetype2/src/gzip/zlib.h
./extras/zlib/zlib.h
# cp extras/zlib/zlib.h lib/lbxutil/lbx_zlib/
zlib.h:34:19: zconf.h: No such file or directory
# cp extras/zlib/zconf.h ./lib/lbxutil/lbx_zlib/
gunzip.c:8:18: zlib.h: No such file or directory
# cp extras/zlib/zlib.h lib/font/fontfile/
# cp extras/zlib/zconf.h lib/font/fontfile/
/opt/gcc-3.4.6/bin/../lib/gcc/mipsel-linux/3.4.6/../../../../mipsel-linux/bin/ld: cannot find -lz
编译 zlib
# tar xf zlib-1.2.5.tar.gz
# ./configure -shared --prefix=/usr/local
# make CC=mipsel-linux-gcc //或者直接改Makefile
# make install
ident.c:31:18: zlib.h: No such file or directory
# cp extras/zlib/zlib.h programs/mkfontscale/
# cp extras/zlib/zconf.h programs/mkfontscale/
/usr/bin/ld: cannot find -lxkbfile
# vim programs/Imakefile //只编译Xserver 去除其他的不编译
11 #if BuildServer
12 XSSRCDIR = Xserver
13 #endif
14
15 #if 0 //不编译后面的目标
16
17 #ifndef Win32Architecture
18 #if HasXServer
19 XINITSRCDIR = xinit
20 #endif
117 #if 0
118 FCLANGDIR = fc-lang
119 #endif
120
121 #endif //与 #if 0 配对
保存退出
# make World
在programs/Xserver 下生成了 Xfbdev
阅读(2959) | 评论(0) | 转发(0) |