|
|
我的系统,本来用的是cce ,但是, gcc4 编译不过,自己写如下 patch ,总算编译通过.
参数: --enable-x11-fonts --enable-freetype
但是,启动后无法用 framebuffer ,只能用 640x480 的 vga ,非常难受,而且花屏,退出后 所有 console 花屏.
希望有人能试试 cce ,看看是不是出现问题,有什么解决方案.
还有,编译时,我这里两个奇怪的问题,我怀疑是个人问题,所以没有补丁,若有人试验,出现问题,按下法解决:
1. 最后一步,连接成 cce 时, can't find FT_..... , 则修改 src/Makefile , -L/usr/X11R6/lib -lXfont 处 添加 -L/usr/lib -lfreetype
2.同样最后一步,连接成 cce 时,can't find GetX11BitmapFontBits ,则修改 vid??.c
GetX11BitmapFontBits 改为 GetX11FontBits 两处.
cce:
http://prdownloads.sourceforge.n ... 1-02132004-dist.tgz
补丁:
http://www.linuxsir.cn/bbs/attac ... =1&d=1141301820
- diff -Naur cce-0.51/include/defs.h cce-0.51-gcc4fix/include/defs.h
- --- cce-0.51/include/defs.h 2004-01-11 12:41:21.000000000 +0800
- +++ cce-0.51-gcc4fix/include/defs.h 2006-02-17 05:49:53.296939250 +0800
- @@ -58,14 +58,14 @@
- static inline void bzero2(void *head, int n)
- {
- while (n-- > 0)
- - *((unsigned char *)head)++ = (unsigned char)0x0;
- + *((unsigned char *)head++) = (unsigned char)0x0;
- }
-
- static inline void wzero(void *head, int n)
- {
- n >>= 1;
- while (n-- > 0)
- - *((unsigned short *)head)++ = (unsigned short)0x0;
- + *((unsigned short *)head++) = (unsigned short)0x0;
-
- }
-
- @@ -73,33 +73,33 @@
- {
- n >>= 2;
- while (n-- > 0)
- - *((unsigned int *)head)++ = (unsigned int)0x0;
- + *((unsigned int *)head++) = (unsigned int)0x0;
- }
-
- static inline void bmove(void *dst, void *src, int n)
- {
- while(n-- > 0)
- - *((unsigned char *)dst)++ = *((unsigned char *)src)++;
- + *((unsigned char *)dst++) = *((unsigned char *)src++);
- }
-
- static inline void brmove(void *dst, void *src, int n)
- {
- while(n-- > 0)
- - *--((unsigned char *)dst) = *--((unsigned char *)src);
- + *((unsigned char *)(--dst)) = *((unsigned char *)(--src));
- }
-
- static inline void wmove(void *dst, void *src, int n)
- {
- n >>= 1;
- while(n-- > 0)
- - *((unsigned short *)dst)++ = *((unsigned short *)src)++;
- + *((unsigned short *)dst++) = *((unsigned short *)src++);
- }
-
- static inline void lmove(void *dst, void *src, int n)
- {
- n >>= 2;
- while(n-- > 0)
- - *((unsigned int *)dst)++ = *((unsigned int *)src)++;
- + *((unsigned int *)dst++) = *((unsigned int *)src++);
- }
-
- static inline void SafeFree(void **p)
- diff -Naur cce-0.51/inputs/utils/cin2tab.h cce-0.51-gcc4fix/inputs/utils/cin2tab.h
- --- cce-0.51/inputs/utils/cin2tab.h 2003-11-06 19:23:12.000000000 +0800
- +++ cce-0.51-gcc4fix/inputs/utils/cin2tab.h 2006-02-17 05:44:41.697465500 +0800
- @@ -69,7 +69,7 @@
- char *tabfname, char *lxfname );
- extern int GenerateAssociateFile(FILE *fr, int gen_lx, char *fname);
-
- -extern PinYin PYMap[26][];
- +extern PinYin PYMap[26][MAX_PY_PER_LETTER];
- extern u_short ZYToPYMap[];
-
- #endif
- diff -Naur cce-0.51/src/term/vc.c cce-0.51-gcc4fix/src/term/vc.c
- --- cce-0.51/src/term/vc.c 2004-01-11 12:25:30.000000000 +0800
- +++ cce-0.51-gcc4fix/src/term/vc.c 2006-02-17 05:45:04.006859750 +0800
- @@ -84,7 +84,7 @@
- while (n-- > 0)
- {
- (*(unsigned char *)head) &= (unsigned char)0x7F;
- - ((unsigned char *)head)++;
- + ((unsigned char *)head++);
- }
- }
-
- @@ -94,7 +94,7 @@
- while (n-- > 0)
- {
- (*(unsigned int *)head) &= (unsigned long)0x7F7F7F7F;
- - ((unsigned int *)head)++;
- + ((unsigned int *)head++);
- }
- }
-
- diff -Naur cce-0.51/src/font/ftfont.c cce-0.51-gcc4fix/src/font/ftfont.c
- --- cce-0.51/src/font/ftfont.c 2003-12-06 02:28:50.000000000 +0800
- +++ cce-0.51-gcc4fix/src/font/ftfont.c 2006-03-03 01:51:43.369495250 +0800
- @@ -56,16 +56,16 @@
-
- #ifdef USE_DYNAMIC_FREETYPELIB
-
- -static FT_Error (*p_FT_Init_FreeType)( FT_Library *alibrary );
- -static FT_Error (*p_FT_New_Face)( FT_Library library, const char* filepathname,
- +FT_Error (*p_FT_Init_FreeType)( FT_Library *alibrary );
- +FT_Error (*p_FT_New_Face)( FT_Library library, const char* filepathname,
- FT_Long face_index, FT_Face *aface );
- -static FT_Error (*p_FT_Done_FreeType)( FT_Library library );
- -static FT_Error (*p_FT_Set_Pixel_Sizes)( FT_Face face,
- +FT_Error (*p_FT_Done_FreeType)( FT_Library library );
- +FT_Error (*p_FT_Set_Pixel_Sizes)( FT_Face face,
- FT_UInt pixel_width, FT_UInt pixel_height );
- -static FT_Error (*p_FT_Select_Charmap)( FT_Face face, FT_Encoding encoding );
- -static FT_UInt (*p_FT_Get_Char_Index)( FT_Face face, FT_ULong charcode);
- -static FT_Error (*p_FT_Load_Glyph)( FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags);
- -static FT_Error (*p_FT_Render_Glyph)( FT_GlyphSlot slot, FT_Render_Mode render_mode );
- +FT_Error (*p_FT_Select_Charmap)( FT_Face face, FT_Encoding encoding );
- +FT_UInt (*p_FT_Get_Char_Index)( FT_Face face, FT_ULong charcode);
- +FT_Error (*p_FT_Load_Glyph)( FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags);
- +FT_Error (*p_FT_Render_Glyph)( FT_GlyphSlot slot, FT_Render_Mode render_mode );
-
- static void *ftLibHandle;
-
- diff -Naur cce-0.51/src/display/fb.c cce-0.51-gcc4fix/src/display/fb.c
- --- cce-0.51/src/display/fb.c 2004-01-04 23:22:41.000000000 +0800
- +++ cce-0.51-gcc4fix/src/display/fb.c 2006-03-03 01:54:55.205484250 +0800
- @@ -372,7 +372,7 @@
- break;
- case 15:
- case 16:
- - *((u_short *)dest)++ = (u_short)(pix);
- + *((u_short *)dest++) = (u_short)(pix);
- break;
- case 24:
- *dest++ = (u_char)(pix); pix >>= 8;
- @@ -380,7 +380,7 @@
- *dest++ = (u_char)(pix);
- break;
- case 32:
- - *((u_int *)dest)++ = (u_int)(pix);
- + *((u_int *)dest++) = (u_int)(pix);
- break;
- }
- }
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|