Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1264799
  • 博文数量: 404
  • 博客积分: 10011
  • 博客等级: 上将
  • 技术积分: 5382
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-03 16:29
文章存档

2010年(40)

2009年(140)

2008年(224)

我的朋友

分类:

2010-03-28 10:06:08

交叉编译 Tiny-X for ARM
交叉编译 Tiny-X for ARM

1下载源码XFree86-4.5.0-src
tar xvzf XFree86-4.5.0-src-1.tgz
tar xvzf XFree86-4.5.0-src-2.tgz
tar xvzf XFree86-4.5.0-src-3.tgz
tar xvzf XFree86-4.5.0-src-4.tgz
tar xvzf XFree86-4.5.0-src-5.tgz
tar xvzf XFree86-4.5.0-src-6.tgz
tar xvzf XFree86-4.5.0-src-7.tgz
cd xc/config/util/
make lndir
sudo cp lndir /usr/local/bin
cd ~
mkdir armtinyx
cd armtinyx/
lndir ../Xfree86-4.5.0-src/xc/

2cross.def和host.def配置文件
在xc/config/cf下建立cross.def和host.def文件如下

host.def

#define KDriveXServer YES
#define TinyXServer YES
#define XfbdevServer YES
#define CrossCompiling YES
#define ProjectRoot /home/zhepeng/TinyX
#define NothingOutsideProjectRoot YES
#define HasFreetype2 NO
#define HasFontconfig NO
#define HasLibpng NO
#define HasZlib NO
#define HasExpat NO
#define BuildXprintClients NO
#define TouchScreen NO
#define HasTsLib NO
#define BuildDocs NO
#define BuildXF86DRI NO
#define BuildGlxExt NO
#define BuildOSMesaLib NO
#define BuildLowMem NO
#define BuildIPv6 NO
#define HasMTRRSupport NO
#define UseX86Emu NO
#define XF86INT10_BUILD X86INT10_STUB
#define BuildAppgroup NO
#define BuildDBE NO
#define BuildLBX NO
#define BuildFonts YES
#undef BuildXF86RushExt
#define BuildXF86RushExt NO
#undef BuildRender
#define BuildRender YES
#define UseRgbTxt NO
#define BuildFontServer NO
#define BuildClients NO
#define BuildFonts YES
#undef BuildXF86RushExt
#define BuildXF86RushExt NO
#undef BuildRender
#define BuildRender YES
#define UseRgbTxt YES
#define BuildFontServer NO
#define OmitSnfSupport YES
#define XdecMultiDepthServer 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 XF86CardDrivers fbdev
#define XInputDrivers mouse keyboard

cross.def

#undef Arm32Architecture
#undef i386Architecture
#undef Arm32Architecture
#undef Arm32Architecture
#define Arm32Architecture
#undef OptimizedCDebugFlags
#define OptimizedCDebugFlags -Os
#define ServerCDebugFlags -Os
#undef StandardDefines
#define StandardDefines -Dlinux -D__arm__ -D_POSIX_SOURCE
-D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
#undef CcCmd
#define StdIncDir /usr/local/arm/3.4/arm-linux/include
#define PreIncDir /usr/local/arm/3.4/arm-linux/include
#undef PostIncDir
#define PostIncDir /usr/local/arm/3.4/arm-linux/include
#define CcCmd arm-linux-gcc
#undef HasCplusplus
#define HasCplusplus NO
#undef CplusplusCmd
#define CplusplusCmd NO
#define DoRanlibCmd YES
#define RanlibCmd arm-linux-ranlib
#undef ExtraLoadFlags
#define ExtraLoadFlags
#define FbNoPixelAddrCode
#undef TermcapLibrary
#define TermcapLibrary -L../lib -lncurses
#define NCursesLibName -L../lib -lncurses
#undef LdPostLib
#undef LdCmd
#define LdCmd arm-linux-ld
#undef ExtensionOSDefines
#define ExtensionOSDefines
#define ServerXdmcpDefines
#define GzipLibrary -L../lib -lz
#i nclude

3修改部分文件
? 编辑armtinyx/programs/Xserver/hw/xfree86/common/compiler.h,删除outb之类的
空函数。
第1435行开始
static __inline__ void
outb(unsigned short port, unsigned char val)
{
}
static __inline__ void
outw(unsigned short port, unsigned short val)
{
}
static __inline__ void
outl(unsigned short port, unsigned int val)
{
}
static __inline__ unsigned int
inb(unsigned short port)
{
return 0;
}
static __inline__ unsigned int
inw(unsigned short port)
{
return 0;
}
static __inline__ unsigned int
inl(unsigned short port)
{
return 0;
}

? 修改xc/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.c
删掉#i nclude "asm/page.h" /* #define for PAGE_* */
添加# define PAGE_MASK (~(getpagesize() - 1))
? 修改xc/programs/Xserver/hw/tinyx/linux/tslib.c
修改成
if (n == 1)
{
if (event.pressure)
{
/*
* HACK ATTACK. (static global variables used !)
* Here we test for the touch screen driver actually being on the
* touch screen, if it is we send absolute coordinates. If not,
* then we send delta's so that we can track the entire vga screen.
*/
if (pengzhe == 1) {
? 修改cf下的X11.tmpl,使其生成静态库文件

#ifndef NormalLibFS
#define NormalLibFS (!SharedLibFS | ForceNormalLib)
#endif
等之类修改成
#ifndef NormalLibFS
#define NormalLibFS YES
#endif
? 修改/home/zhepeng/xfree86/xc/programs/Xserver/hw/xfree86/common下的
xf86Configure.c
添加#define PATH_MAX 1024
? 修改/usr/local/arm/3.4/bin
将arm-linux-gcc,arm-linux-g++,arm-linux-ar,arm-linux-ld, arm-linux-gcc都ln到
/usr/local/arm/3.4/arm-linux/bin下
ln -s /usr/local/arm/3.4/include /usr/local/arm/3.4/arm-linux/
? 在运行一会后,在另外一个term中运行下面语句
cd programs/Xserver/os/tiny
make lbxio.

4编译安装
make World CROSSCOMPILEDIR=/usr/local/arm/3.4/arm-linux/bin
make install

5运行TinyX
复制/usr/share/fonts/X11/75dpi下的字体到TinyX/lib/X11/fonts/75dpi下
运行
./Xfbdev -fp /home/zhepeng/TinyX/lib/X11/fonts/75dpi -fn -adobe-courier-bold-r-normal--
8-80-75-75-m-50-iso8859-1 -fc -adobe-times-medium-i-normal—8-80-75-75-p-42-
iso8859-1
即可
在/home/zhepeng/TinyX/lib/X11添加rgb文件
阅读(677) | 评论(0) | 转发(0) |
0

上一篇:装完Ubuntu 9.10后要干的事

下一篇:TinyX移植

给主人留下些什么吧!~~