1. 修改 src/drivers/scr_fb.c,因為 em86xx driver 跟一般的 driver 不同。
diff -Nur microwin.orig/src/drivers/scr_fb.c microwin/src/drivers/scr_fb.c
--- microwin.orig/src/drivers/scr_fb.c 2003-02-25 00:59:52.000000000 -0800
+++ microwin/src/drivers/scr_fb.c 2004-02-02 12:56:07.000000000 -0800
@@ -124,7 +124,7 @@

/* locate and open framebuffer, get info*/
if(!(env = getenv("FRAMEBUFFER")))
- env = "/dev/fb0";
+ env = "/dev/fb/0";
fb = open(env, O_RDWR);
if(fb < 0) {
EPRINTF("Error opening %s: %m. Check kernel config\n", env);
@@ -263,7 +263,7 @@
goto fail;
}
#else
- psd->addr = mmap(NULL, psd->size, PROT_READ|PROT_WRITE,MAP_SHARED,fb,0);
+ psd->addr = mmap(NULL, psd->size, PROT_READ|PROT_WRITE,0,fb,0);
#endif
if(psd->addr == NULL || psd->addr == (unsigned char *)-1) {

2. 修改 src/Arch.rules,讓執行檔轉成 FLAT 格式。
diff -Nur microwin.orig/src/Arch.rules microwin/src/Arch.rules
--- microwin.orig/src/Arch.rules 2003-11-16 12:46:34.000000000 -0800
+++ microwin/src/Arch.rules 2004-02-02 12:55:27.000000000 -0800
@@ -47,7 +47,7 @@
TOOLSPREFIX = $(ARMTOOLSPREFIX)
DEFINES += -DLINUX=1 -DUNIX=1
CFLAGS += $(GCC_WARNINGS) $(OPTFLAGS) -mstructure-size-boundary=8
-LDFLAGS +=
+LDFLAGS += -Wl,-elf2flt="s3276"
endif

ifeq ($(ARCH), LINUX-MIPS)

3. 修改 src/demos/nxroach/Makefile,因為 gcc 2.95.3 的問題,-lm 需放在最後,放在前面會找不到。
diff -Nur microwin.orig/src/demos/nxroach/Makefile microwin/src/demos/nxroach/Makefile
--- microwin.orig/src/demos/nxroach/Makefile 2003-09-24 19:11:05.000000000 -0700
+++ microwin/src/demos/nxroach/Makefile 2004-02-02 12:55:27.000000000 -0800
@@ -53,5 +53,5 @@
else
$(MW_DIR_BIN)/nxroach: $(OBJS) $(NANOXCLIENTLIBS) $(CONFIG)
@echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..."
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS) -lm
endif

4. make 時,CONFIG 需給絶對路徑,不然找不到,MW_DIR_SRC 沒指定沒關係,Makefile 會指定目前所在目錄。
make OPTFLAGS="-D__MINT__" CC=arm-elf-gcc \
ARCH=LINUX-ARM TOOLSPREFIX=arm-elf- \
CONFIG=/sigma/nano-x/microwindows-0.91/src/config.microwin

5. install 時,example 都不會 install。
make INSTALL_PREFIX=/sigma/nano-x \
INSTALL_OWNER1= INSTALL_OWNER2= CC=arm-elf-gcc \
CONFIG=/sigma/nano-x/microwindows-0.91/src/config.microwin install

6. 驅動 mouse
export MOUSE_PORT=/dev/input/mouse0
export MOUSE_TYPE=ps2

7. 設定 truetype 字型路踁
export MWFONTS=/mnt/hdb/nano-x/microwindows-0.91/fonts/truetype

台南小新 發表在 痞客邦 PIXNET 留言(0) 人氣()