需要安装arm-linux-gcc2.95.3,好像其他的也可以吧~没试过。
安装方法网上一搜到处都是,不在此做介绍了。
1.需要在microwindows官网上下载一个工具包,
ftp://microwindows.censoft.com/pub/microwindows/microwindows-0.90.tar.gz
[root@ root]# tar zxf microwindows-0.90.tar.gz
cd 进入文件夹,可以使用xconfigure图形化界面进行设置。
这里我们使用config文件进行配置,cp Configs/config.fb ./将Configs里的config.fb(其他的也可以,只不过某些地方的配置不同而已)
以下是该文件内容,注意的地方都是红色的!
####################################################################
# Microwindows and Nano-X configuration file
#
# This package can be configured to run on Linux (MIPS, ARM, POWERPC or x86)
# UNIX, ELKS, DJGPP, or RTEMS.
# On Linux, we've got drivers for Linux 2.x framebuffers, X11, or,
# svgalib for VGA hardware.
# In addition, a gpm or direct serial mouse driver can be configured.
# On ELKS, the bios screen driver and serial mouse driver are always used.
#
# Either Microwindows and/or Nano-X can be built.
# Microwindows and Nano-X have several demos.
#
# For MSDOS makes, see mcmwin.mak and mcnanox.mak
####################################################################
####################################################################
#
# build target platform
#
# Valid ARCH values are:
#
# LINUX-NATIVE
# LINUX-TCC
# LINUX-ARM
# LINUX-MIPS
# LINUX-POWERPC (BIGENDIAN=Y)
# LINUX-SPARC (BIGENDIAN=Y)
# LINUX-SH
# FREEBSD-X86
# SOLARIS (BIGENDIAN=Y)
# TRIMEDIA
# RTEMS
# DJGPP
# ELKS
#
# note: ELKS can't build client/server nano-X, nor widget lib
#
####################################################################
ARCH
BIGENDIAN
NATIVETOOLSPREFIX
ARMTOOLSPREFIX
MIPSTOOLSPREFIX
POWERPCTOOLSPREFIX
SHTOOLSPREFIX
RTEMSTOOLSPREFIX
####################################################################
#
# Compiling options
#
####################################################################
OPTIMIZE
DEBUG
VERBOSE
THREADSAFE
GPROF
####################################################################
#
# Libraries to build: microwin, nano-X, nanowidget, object frameworks
#
####################################################################
MICROWIN
NANOX
SHAREDLIBS
OBJFRAMEWORK
####################################################################
#
# Demos to build
#
####################################################################
MICROWINDEMO
NANOXDEMO
####################################################################
#
# Applications to build
#
####################################################################
NANOWM
####################################################################
#
# The pixeltype of the native hardware or underlying graphics library.
# This definition defines the PIXELVAL to be 32, 16 or 8 bits wide.
# If using Linux framebuffer, set to MWPF_TRUECOLOR0888, and use fbset.
# It also enables GdArea/GrArea for this particular pixel packing format.
#
# define MWPF_PALETTE
# define MWPF_TRUECOLOR8888
# define MWPF_TRUECOLOR0888
# define MWPF_TRUECOLOR888
# define MWPF_TRUECOLOR565
# define MWPF_TRUECOLOR555
# define MWPF_TRUECOLOR332
#
####################################################################
SCREEN_PIXTYPE
####################################################################
#
# NanoX: Put Y to the following line to link the nano-X application
# with the server.
# or for speed or debugging.
#
####################################################################
LINK_APP_INTO_SERVER
####################################################################
# Shared memory support for Nano-X client/server protocol speedup
####################################################################
HAVE_SHAREDMEM_SUPPORT
####################################################################
#
# File I/O support
# Supporting either below drags in libc stdio, which may not be wanted
#
####################################################################
HAVE_FILEIO
####################################################################
# BMP, GIF reading support
####################################################################
HAVE_BMP_SUPPORT
HAVE_GIF_SUPPORT
HAVE_PNM_SUPPORT
HAVE_XPM_SUPPORT
####################################################################
# JPEG support through libjpeg, see README.txt in contrib/jpeg
####################################################################
HAVE_JPEG_SUPPORT
INCJPEG
LIBJPEG
####################################################################
# PNG support via libpng and libz
####################################################################
HAVE_PNG_SUPPORT
INCPNG
LIBPNG
LIBZ
####################################################################
# TIFF support through libtiff
####################################################################
HAVE_TIFF_SUPPORT
INCTIFF
LIBTIFF
####################################################################
# native .fnt loadable font support
####################################################################
HAVE_FNT_SUPPORT
HAVE_FNTGZ_SUPPORT
FNT_FONT_DIR
####################################################################
# T1 adobe type1 font support thru t1lib
####################################################################
HAVE_T1LIB_SUPPORT
INCT1LIB
LIBT1LIB
####################################################################
# TrueType font support thru FreeType 1.x
####################################################################
HAVE_FREETYPE_SUPPORT
INCFTLIB
LIBFTLIB
FREETYPE_FONT_DIR
####################################################################
# Support for many kinds of font thru FreeType 2.x
# Must also set FREETYPE_FONT_DIR in the Freetype 1.x section
####################################################################
HAVE_FREETYPE_2_SUPPORT
INCFT2LIB
LIBFT2LIB
####################################################################
# PCF font support
# Selecting HAVE_PCFGZ_SUPPORT will allow you to directly read
# .pcf.gz files, but it will add libz to the size of the server
####################################################################
HAVE_PCF_SUPPORT
HAVE_PCFGZ_SUPPORT
PCF_FONT_DIR
####################################################################
# Chinese Han Zi Ku loadable font support
####################################################################
HAVE_HZK_SUPPORT
HZK_FONT_DIR
####################################################################
# Chinese BIG5 compiled in font support (big5font.c)
####################################################################
HAVE_BIG5_SUPPORT
####################################################################
# Chinese GB2312 compiled in font support (gb2312font.c)
####################################################################
HAVE_GB2312_SUPPORT
####################################################################
# Japanese JISX0213 compiled in font support (jisx0213-12x12.c)
####################################################################
HAVE_JISX0213_SUPPORT
####################################################################
# Korean HANGUL font support (jo16x16.c)
####################################################################
HAVE_KSC5601_SUPPORT
####################################################################
# Japanese EUC-JP support using loadable MGL font
####################################################################
HAVE_EUCJP_SUPPORT
EUCJP_FONT_DIR
####################################################################
# Generate screen driver interface only with no fonts or clipping
####################################################################
NOFONTSORCLIPPING
####################################################################
#
# Window move algorithms for Microwindows
# Change for tradeoff between cpu speed and looks
# ERASEMOVE repaints only backgrounds while window dragging, quicker.
# Otherwise an XOR redraw is used for window moves only after button up,
# quickest (should set for ELKS)
# UPDATEREGIONS paints in update clipping region only for better look and feel
#
####################################################################
ERASEMOVE
UPDATEREGIONS
####################################################################
#
# Link with Gray Palette (valid only for 4bpp modes)
#
####################################################################
GRAYPALETTE
####################################################################
#
# If the platform is running UNIX, Linux or RTEMS...
#
####################################################################
ifneq ($(ARCH), ELKS)
# X Window screen, mouse and kbd drivers
X11
ifeq ($(X11), Y)
# startup screen width, height, (depth for palette mode only)
SCREEN_WIDTH
SCREEN_HEIGHT
SCREEN_DEPTH
# You may want to turn this on for XFree86 4.x or if your backing store
# isn't functioning properly
USE_EXPOSURE
else
# framebuffer screen driver (linear and/or vga 4 planes)
# set VTSWITCH to include virtual terminal switch code
# set FBREVERSE to reverse bit orders in 1,2,4 bpp
# set FBVGA=N for all systems without VGA hardware (for MIPS must=N)
FRAMEBUFFER
FBVGA
VTSWITCH
FBREVERSE
# set HAVETEXTMODE=Y for systems that can switch between text & graphics.
# On a graphics-only embedded system, such as Osprey and Embedded
# Planet boards, set HAVETEXTMODE=N
HAVETEXTMODE
# svgalib screen driver
VGALIB
# direct VGA hardware access screen driver
HWVGA
####################################################################
# Mouse drivers
# GPMMOUSE
# SERMOUSE
# SUNMOUSE
# NOMOUSE
#
# Touchscreen drivers
# IPAQMOUSE
# ZAURUSMOUSE
# TUXMOUSE
# ADSMOUSE
# ADS7846MOUSE
# EPMOUSE
# VHMOUSE
# MTMOUSE
# PSIONMOUSE
# YOPYMOUSE
# HARRIERMOUSE
####################################################################
GPMMOUSE
SERMOUSE
SUNMOUSE
NOMOUSE
IPAQMOUSE
ZAURUSMOUSE
TUXMOUSE
ADSMOUSE
ADS7846MOUSE
EPMOUSE
VHMOUSE
MTMOUSE
PSIONMOUSE
YOPYMOUSE
HARRIERMOUSE
LIRCMOUSE
# keyboard or null kbd driver
TTYKBD
SCANKBD
PIPEKBD
IPAQKBD
LIRCKBD
NOKBD
endif
# Secondary keyboard drivers.
# You may have a normal keyboard driver in addition to these
# drivers, e.g. for both normal keyboard and IR input.
LIRCKBD2
####################################################################
# Screen driver specific configuration
# SA1100_LCD_LTLEND 4bpp driver with arm SA1100 LCD controller
# INVERT4BPP 4bpp inverted pixel driver for VTech Helio
####################################################################
SA1100_LCD_LTLEND
INVERT4BPP
####################################################################
#
# If the platform is a RTEMS box ....
#
####################################################################
ifeq ($(ARCH), RTEMS)
# Location & BSP information of the RTEMS build
RTEMS_BUILD
RTEMS_BSP
LINK_APP_INTO_SERVER
endif
endif
####################################################################
#
# If the platform is an ELKS box ...
#
####################################################################
ifeq ($(ARCH), ELKS)
# Higher speed asm driver, c driver of hercules screen driver
ASMVGADRIVER
CVGADRIVER
HERCDRIVER
DBGDRIVER
# Mouse support
SERMOUSE
endif
然后保存,运行make
这里不用make install
做好的库文件在microwindows-0.90/src/lib里。将so文件都拷贝到开发板的/lib下(根目录下的那个)
到此一定要用file命令看一下属性是不是ARM的,否则开发板绝对不能运行。随便找个so文件即可。
[root]# file libmwimage.so
再将microwindows-0.90/src/bin下的所有东西拷贝到开发板的目录下(/usr/bin下即可),里面都是一些例子还有两个重要的文件 nane-X 和 nanowm 图形库的服务器,在运行里面的例子时首先得运行这两个程序
[root]# ./nano-X &(后台运行!)
[root]# ./nanowm &
[root]# ./mine 此时运行microwindows程序!这是一个扫雷的游戏。
最后就得用cramfsmk进行根文件系统的制作了。
弄好后下载到开发板即可使用!