target/linux/xburst/files-2.6.32/arch/mips/jz4740/board-qi_lb60.c |
94 | 94 | }, |
95 | 95 | { .name = "NAND ROOTFS partition", |
96 | 96 | .offset = 8 * 0x100000, |
97 | | .size = (504 + 512 + 1024) * 0x100000, |
| 97 | .size = 256 * 0x100000, |
98 | 98 | }, |
| 99 | { .name = "NAND DATA partition", |
| 100 | .offset = 264 * 0x100000, |
| 101 | .size = 1784 * 0x100000, |
| 102 | }, |
99 | 103 | }; |
100 | 104 | |
101 | 105 | static void qi_lb60_nand_ident(struct platform_device *pdev, |
... | ... | |
120 | 124 | }; |
121 | 125 | |
122 | 126 | /* Keyboard*/ |
123 | | |
124 | | /* #define KEEP_UART_ALIVE |
125 | | * don't define this. the keyboard and keyboard both work |
126 | | */ |
127 | | |
| 127 | #define KEY_QI_VOLUP KEY_F11 |
| 128 | #define KEY_QI_VOLDOWN KEY_F12 |
128 | 129 | #define KEY_QI_QI KEY_F13 |
129 | | #define KEY_QI_UPRED KEY_RIGHTALT |
130 | | #define KEY_QI_VOLUP KEY_VOLUMEUP |
131 | | #define KEY_QI_VOLDOWN KEY_VOLUMEDOWN |
| 130 | #define KEY_QI_ACUTE KEY_GRAVE |
132 | 131 | #define KEY_QI_FN KEY_LEFTCTRL |
| 132 | #define KEY_QI_UPRED KEY_RIGHTALT |
133 | 133 | |
134 | 134 | static const uint32_t qi_lb60_keymap[] = { |
135 | 135 | KEY(0, 0, KEY_F1), /* S2 */ |
... | ... | |
167 | 167 | KEY(4, 0, KEY_TAB), /* S34 */ |
168 | 168 | KEY(4, 1, KEY_CAPSLOCK), /* S35 */ |
169 | 169 | KEY(4, 2, KEY_BACKSLASH), /* S36 */ |
170 | | KEY(4, 3, KEY_APOSTROPHE), /* S37 */ |
| 170 | KEY(4, 3, KEY_QI_ACUTE), /* S37 */ |
171 | 171 | KEY(4, 4, KEY_COMMA), /* S38 */ |
172 | 172 | KEY(4, 5, KEY_DOT), /* S39 */ |
173 | 173 | KEY(4, 6, KEY_SLASH), /* S40 */ |
... | ... | |
188 | 188 | KEY(6, 5, KEY_QI_VOLDOWN), /* S55 */ |
189 | 189 | KEY(6, 6, KEY_DOWN), /* S56 */ |
190 | 190 | KEY(6, 7, KEY_RIGHT), /* S57 */ |
191 | | |
192 | | #ifndef KEEP_UART_ALIVE |
193 | 191 | KEY(7, 0, KEY_LEFTSHIFT), /* S58 */ |
194 | 192 | KEY(7, 1, KEY_LEFTALT), /* S59 */ |
195 | 193 | KEY(7, 2, KEY_QI_FN), /* S60 */ |
196 | | #endif |
197 | 194 | }; |
198 | 195 | |
199 | 196 | static const struct matrix_keymap_data qi_lb60_keymap_data = { |
... | ... | |
206 | 203 | }; |
207 | 204 | |
208 | 205 | static const unsigned int qi_lb60_keypad_rows[] = { |
209 | | 114, 115, 116, 117, 118, 119, 120, |
210 | | #ifndef KEEP_UART_ALIVE |
211 | | 122, |
212 | | #endif |
| 206 | 114, 115, 116, 117, 118, 119, 120, 122, |
213 | 207 | }; |
214 | 208 | |
215 | 209 | static struct matrix_keypad_platform_data qi_lb60_pdata = { |
target/linux/xburst/files-2.6.32/drivers/char/defkeymap.c_shipped |
11 | 11 | 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69, |
12 | 12 | 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf706, 0xfb61, 0xfb73, |
13 | 13 | 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b, |
14 | | 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76, |
| 14 | 0xf027, 0xf0b4, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76, |
15 | 15 | 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf701, 0xf30c, |
16 | 16 | 0xf703, 0xf020, 0xf207, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, |
17 | 17 | 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307, |
... | ... | |
46 | 46 | 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49, |
47 | 47 | 0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf706, 0xfb41, 0xfb53, |
48 | 48 | 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03a, |
49 | | 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56, |
| 49 | 0xf022, 0xf060, 0xf700, 0xf07c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56, |
50 | 50 | 0xfb42, 0xfb4e, 0xfb4d, 0xf03b, 0xf03a, 0xf03f, 0xf701, 0xf30c, |
51 | 51 | 0xf703, 0xf020, 0xf207, 0xf10a, 0xf10b, 0xf10c, 0xf10d, 0xf10e, |
52 | 52 | 0xf10f, 0xf110, 0xf111, 0xf112, 0xf113, 0xf213, 0xf203, 0xf307, |
53 | 53 | 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, |
54 | | 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf10a, |
55 | | 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, |
| 54 | 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf20b, |
| 55 | 0xf20a, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, |
56 | 56 | 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, |
57 | 57 | 0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116, |
58 | 58 | 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, |
... | ... | |
77 | 77 | |
78 | 78 | static u_short altgr_map[NR_KEYS] = { |
79 | 79 | 0xf200, 0xf200, 0xf200, 0xf040, 0xf200, 0xf024, 0xf200, 0xf200, |
80 | | 0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf05c, 0xf07e, 0xf008, 0xf200, |
| 80 | 0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf05c, 0xf07e, 0xf116, 0xf200, |
81 | 81 | 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e, 0xf026, 0xf02a, |
82 | 82 | 0xf028, 0xf029, 0xf200, 0xf07e, 0xf201, 0xf706, 0xf0b0, 0xf0a8, |
83 | 83 | 0xf0a4, 0xf02d, 0xf05f, 0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf200, |
84 | | 0xf200, 0xf200, 0xf700, 0xf200, 0xf039, 0xf030, 0xf916, 0xfb76, |
| 84 | 0xf200, 0xf200, 0xf700, 0xf200, 0xfb7a, 0xfb78, 0xf916, 0xfb76, |
85 | 85 | 0xf915, 0xf03c, 0xf03e, 0xf027, 0xf022, 0xf200, 0xf701, 0xf30c, |
86 | | 0xf703, 0xf200, 0xf207, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, |
87 | | 0xf036, 0xf037, 0xf038, 0xf514, 0xf515, 0xf208, 0xf202, 0xf911, |
| 86 | 0xf703, 0xf200, 0xf207, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510, |
| 87 | 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf202, 0xf911, |
88 | 88 | 0xf912, 0xf913, 0xf30b, 0xf90e, 0xf90f, 0xf910, 0xf30a, 0xf90b, |
89 | | 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf516, |
90 | | 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, |
| 89 | 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf118, |
| 90 | 0xf119, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, |
91 | 91 | 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, |
92 | 92 | 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, |
93 | 93 | 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, |
... | ... | |
116 | 116 | 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009, |
117 | 117 | 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf201, 0xf706, 0xf001, 0xf013, |
118 | 118 | 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200, |
119 | | 0xf007, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016, |
| 119 | 0xf007, 0xf200, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016, |
120 | 120 | 0xf002, 0xf00e, 0xf00d, 0xf200, 0xf20e, 0xf07f, 0xf701, 0xf30c, |
121 | 121 | 0xf703, 0xf000, 0xf207, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, |
122 | 122 | 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf204, 0xf307, |
... | ... | |
186 | 186 | 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869, |
187 | 187 | 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf706, 0xf861, 0xf873, |
188 | 188 | 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b, |
189 | | 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876, |
| 189 | 0xf827, 0xf200, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876, |
190 | 190 | 0xf862, 0xf86e, 0xf86d, 0xf200, 0xf200, 0xf82f, 0xf701, 0xf30c, |
191 | 191 | 0xf703, 0xf820, 0xf207, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504, |
192 | 192 | 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf209, 0xf907, |
... | ... | |
324 | 324 | '\033', '[', '1', '9', '~', 0, |
325 | 325 | '\033', '[', '2', '0', '~', 0, |
326 | 326 | '\033', '[', '2', '1', '~', 0, |
327 | | '\033', '[', '2', '3', '~', 0, |
328 | | '\033', '[', '2', '4', '~', 0, |
329 | 327 | '\033', '[', '2', '5', '~', 0, |
330 | 328 | '\033', '[', '2', '6', '~', 0, |
331 | 329 | '\033', '[', '2', '8', '~', 0, |
... | ... | |
359 | 357 | func_buf + 37, |
360 | 358 | func_buf + 43, |
361 | 359 | func_buf + 49, |
| 360 | 0, |
| 361 | 0, |
362 | 362 | func_buf + 55, |
363 | 363 | func_buf + 61, |
364 | 364 | func_buf + 67, |
... | ... | |
368 | 368 | func_buf + 91, |
369 | 369 | func_buf + 97, |
370 | 370 | func_buf + 103, |
371 | | func_buf + 109, |
372 | | func_buf + 115, |
373 | | func_buf + 120, |
374 | | func_buf + 125, |
375 | | func_buf + 130, |
376 | | func_buf + 135, |
377 | | func_buf + 140, |
378 | | func_buf + 145, |
| 371 | func_buf + 108, |
| 372 | func_buf + 113, |
| 373 | func_buf + 118, |
| 374 | func_buf + 123, |
| 375 | func_buf + 128, |
| 376 | func_buf + 133, |
379 | 377 | 0, |
380 | 378 | 0, |
381 | | func_buf + 149, |
| 379 | func_buf + 137, |
382 | 380 | 0, |
383 | 381 | }; |
384 | 382 | |
target/linux/xburst/patches-2.6.32/450-fbcon-color-fonts.patch |
| 1 | --- ./drivers/char/vt.c.orig 2010-03-16 04:52:04.000000000 +1300 |
| 2 | @@ -3894,6 +3894,7 @@ |
| 3 | struct console_font font; |
| 4 | int rc = -EINVAL; |
| 5 | int size; |
| 6 | + u8 std_font = *((u32*)op->data) != 0x6a127efd; |
| 7 | |
| 8 | if (vc->vc_mode != KD_TEXT) |
| 9 | return -EINVAL; |
| 10 | @@ -3923,7 +3924,7 @@ |
| 11 | } |
| 12 | if (op->width <= 0 || op->width > 32 || op->height > 32) |
| 13 | return -EINVAL; |
| 14 | - size = (op->width+7)/8 * 32 * op->charcount; |
| 15 | + size = ( std_font ? (op->width+7)/8 * 32 : 4 * op->width * op->height) * op->charcount; |
| 16 | if (size > max_font_size) |
| 17 | return -ENOSPC; |
| 18 | font.charcount = op->charcount; |
| 19 | --- ./drivers/video/console/bitblit.c.orig 2010-07-01 11:30:17.000000000 +1200 |
| 20 | @@ -110,6 +110,12 @@ |
| 21 | info->fbops->fb_imageblit(info, image); |
| 22 | } |
| 23 | |
| 24 | +/* info: details of the framebuffer |
| 25 | + * image: the off-screen image in which the character (sub)string is being |
| 26 | + * prepared |
| 27 | + * dst: a pointer to the top-left pixel in the off-screen image where the |
| 28 | + * character (sub)string should go |
| 29 | + */ |
| 30 | static inline void bit_putcs_unaligned(struct vc_data *vc, |
| 31 | struct fb_info *info, const u16 *s, |
| 32 | u32 attr, u32 cnt, u32 d_pitch, |
| 33 | @@ -145,12 +151,62 @@ |
| 34 | |
| 35 | } |
| 36 | |
| 37 | +void inline draw_glyph_row_inv( int pixels_across_glyph, u8 *src, u8 *target) { |
| 38 | + u32 *pixel_on_glyph_sheet = (u32*) src; |
| 39 | + u32 *pixel_on_screen = (u32*) target; |
| 40 | + |
| 41 | + while( pixels_across_glyph--) { |
| 42 | + *pixel_on_screen = ~(*pixel_on_glyph_sheet); |
| 43 | + ++ pixel_on_glyph_sheet; |
| 44 | + ++ pixel_on_screen; |
| 45 | + } |
| 46 | +} |
| 47 | + |
| 48 | +void inline draw_glyph_row_75( int pixels_across_glyph, u8 *src, u8 *target) { |
| 49 | + u32 pixel; |
| 50 | + u32 *pixel_on_glyph_sheet = (u32*) src; |
| 51 | + u32 *pixel_on_screen = (u32*) target; |
| 52 | + /* Copy the pixels at 75% brightness */ |
| 53 | + while( pixels_across_glyph--) { |
| 54 | + pixel = *pixel_on_glyph_sheet; |
| 55 | + /* This is a cheeky way of multiplying by 0.75 */ |
| 56 | + pixel = ( pixel >> 1) & 0x7f7f7f7f; |
| 57 | + pixel += ( pixel >> 1) & 0x7f7f7f7f; |
| 58 | + *pixel_on_screen = pixel; |
| 59 | + ++ pixel_on_glyph_sheet; |
| 60 | + ++ pixel_on_screen; |
| 61 | + } |
| 62 | +} |
| 63 | + |
| 64 | +/* |
| 65 | + * width: the number of bytes required to store a single row of pixels from |
| 66 | + * a glyph |
| 67 | + * cellsize: the number of bytes required to store the pixels for a single |
| 68 | + * glyph |
| 69 | + * maxcnt: the maximum number of characters that can be blasted to the screen |
| 70 | + * at one time ( limited by the amount of video RAM available for a |
| 71 | + * (sub)string of characters) |
| 72 | + * The NanoNote has 32-bits per pixel arranged BGRA |
| 73 | + * info->fix.line_length: the number of bytes to advance through the frame |
| 74 | + * buffer in order to get from the address of a pixel to |
| 75 | + * the address of the pixel directly below it |
| 76 | + * screen_row_hop: the number of 32-bit words to advance through the frame |
| 77 | + * buffer in order to get from the address of a pixel to the |
| 78 | + * address of the pixel directly below it on the screen |
| 79 | + * glyph_on_screen: the address of the pixel on screen where the top-left of |
| 80 | + * the next glyph should go |
| 81 | + * row_on_screen: the address of the pixel on screen where the next row of |
| 82 | + * pixels from the glyph should go |
| 83 | + * row_on_glyph_sheet: pointer within font.data ( the glyph sheet) of the |
| 84 | + * left-most pixel from the next row to be drawn |
| 85 | + */ |
| 86 | static void bit_putcs(struct vc_data *vc, struct fb_info *info, |
| 87 | const unsigned short *s, int count, int yy, int xx, |
| 88 | int fg, int bg) |
| 89 | { |
| 90 | struct fb_image image; |
| 91 | - u32 width = DIV_ROUND_UP(vc->vc_font.width, 8); |
| 92 | + u8 std_font = *((u32*)vc->vc_font.data) != 0x6a127efd; |
| 93 | + u32 width = std_font ? DIV_ROUND_UP(vc->vc_font.width, 8) : 4 * vc->vc_font.width; |
| 94 | u32 cellsize = width * vc->vc_font.height; |
| 95 | u32 maxcnt = info->pixmap.size/cellsize; |
| 96 | u32 scan_align = info->pixmap.scan_align - 1; |
| 97 | @@ -158,6 +214,10 @@ |
| 98 | u32 mod = vc->vc_font.width % 8, cnt, pitch, size; |
| 99 | u32 attribute = get_attribute(info, scr_readw(s)); |
| 100 | u8 *dst, *buf = NULL; |
| 101 | + u32 screen_row_hop; |
| 102 | + u16 charmask; |
| 103 | + u8 *row_on_glyph_sheet, *glyph_on_screen, *row_on_screen; |
| 104 | + u8 code_point, rows_left; |
| 105 | |
| 106 | image.fg_color = fg; |
| 107 | image.bg_color = bg; |
| 108 | @@ -172,31 +232,73 @@ |
| 109 | return; |
| 110 | } |
| 111 | |
| 112 | - while (count) { |
| 113 | - if (count > maxcnt) |
| 114 | - cnt = maxcnt; |
| 115 | - else |
| 116 | - cnt = count; |
| 117 | - |
| 118 | - image.width = vc->vc_font.width * cnt; |
| 119 | - pitch = DIV_ROUND_UP(image.width, 8) + scan_align; |
| 120 | - pitch &= ~scan_align; |
| 121 | - size = pitch * image.height + buf_align; |
| 122 | - size &= ~buf_align; |
| 123 | - dst = fb_get_buffer_offset(info, &info->pixmap, size); |
| 124 | - image.data = dst; |
| 125 | - |
| 126 | - if (!mod) |
| 127 | - bit_putcs_aligned(vc, info, s, attribute, cnt, pitch, |
| 128 | - width, cellsize, &image, buf, dst); |
| 129 | - else |
| 130 | - bit_putcs_unaligned(vc, info, s, attribute, cnt, |
| 131 | - pitch, width, cellsize, &image, |
| 132 | - buf, dst); |
| 133 | - |
| 134 | - image.dx += cnt * vc->vc_font.width; |
| 135 | - count -= cnt; |
| 136 | - s += cnt; |
| 137 | + if ( std_font) { |
| 138 | + while (count) { |
| 139 | + if (count > maxcnt) |
| 140 | + cnt = maxcnt; |
| 141 | + else |
| 142 | + cnt = count; |
| 143 | + |
| 144 | + image.width = vc->vc_font.width * cnt; |
| 145 | + pitch = DIV_ROUND_UP(image.width, 8) + scan_align; |
| 146 | + pitch &= ~scan_align; |
| 147 | + size = pitch * image.height + buf_align; |
| 148 | + size &= ~buf_align; |
| 149 | + dst = fb_get_buffer_offset(info, &info->pixmap, size); |
| 150 | + image.data = dst; |
| 151 | + |
| 152 | + if (!mod) |
| 153 | + bit_putcs_aligned(vc, info, s, attribute, cnt, |
| 154 | + pitch, width, cellsize, |
| 155 | + &image, buf, dst); |
| 156 | + else |
| 157 | + bit_putcs_unaligned(vc, info, s, attribute, cnt, |
| 158 | + pitch, width, cellsize, |
| 159 | + &image, buf, dst); |
| 160 | + |
| 161 | + image.dx += cnt * vc->vc_font.width; |
| 162 | + count -= cnt; |
| 163 | + s += cnt; |
| 164 | + } |
| 165 | + } |
| 166 | + else { /* The font is not a standard 1-bit font */ |
| 167 | + charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; |
| 168 | + screen_row_hop = info->fix.line_length; |
| 169 | + glyph_on_screen = info->screen_base + |
| 170 | + screen_row_hop * image.dy + |
| 171 | + 4 * image.dx; |
| 172 | + /* While there are still characters to draw.. */ |
| 173 | + while (count--) { |
| 174 | + code_point = scr_readw(s++) & charmask; |
| 175 | + row_on_glyph_sheet = vc->vc_font.data + |
| 176 | + cellsize * code_point; |
| 177 | + /* Draw every row of the glyph */ |
| 178 | + row_on_screen = glyph_on_screen; |
| 179 | + rows_left = vc->vc_font.height; |
| 180 | + while( rows_left--) |
| 181 | + { |
| 182 | + /* If the background color is NOT black then do |
| 183 | + * reverse video */ |
| 184 | + if ( 0 < bg) { |
| 185 | + draw_glyph_row_inv( vc->vc_font.width, |
| 186 | + row_on_glyph_sheet, |
| 187 | + row_on_screen); |
| 188 | + } |
| 189 | + /* If the foreground color is high-intensity */ |
| 190 | + else if ( 8 <= fg) { |
| 191 | + memcpy( row_on_screen, |
| 192 | + row_on_glyph_sheet, width); |
| 193 | + } |
| 194 | + else { |
| 195 | + draw_glyph_row_75( vc->vc_font.width, |
| 196 | + row_on_glyph_sheet, |
| 197 | + row_on_screen); |
| 198 | + } |
| 199 | + row_on_glyph_sheet += width; |
| 200 | + row_on_screen += screen_row_hop; |
| 201 | + } |
| 202 | + glyph_on_screen += width; |
| 203 | + } |
| 204 | } |
| 205 | |
| 206 | /* buf is always NULL except when in monochrome mode, so in this case |
| 207 | @@ -239,6 +341,29 @@ |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | +static void bgra_cursor( struct vc_data *vc, struct fb_info *info, short c, |
| 212 | + struct fb_cursor *cursor) |
| 213 | +{ |
| 214 | + u32 x = cursor->image.dx; |
| 215 | + u32 y = cursor->image.dy; |
| 216 | + u32 gw = vc->vc_font.width; |
| 217 | + u32 gh = vc->vc_font.height; |
| 218 | + u32 *pixel; |
| 219 | + |
| 220 | + /* Draw the glyph to the screen */ |
| 221 | + bit_putcs( vc, info, &c, 1, y/gh, x/gw, 0, 0); |
| 222 | + |
| 223 | + if ( cursor->enable) { |
| 224 | + /* Invert the last row of pixels */ |
| 225 | + pixel = (u32*) ( info->screen_base + |
| 226 | + info->fix.line_length * ( y + gh - 1) + 4 * x); |
| 227 | + while ( gw--) { |
| 228 | + *pixel ^= 0xffffffff; |
| 229 | + ++ pixel; |
| 230 | + } |
| 231 | + } |
| 232 | +} |
| 233 | + |
| 234 | static void bit_cursor(struct vc_data *vc, struct fb_info *info, int mode, |
| 235 | int softback_lines, int fg, int bg) |
| 236 | { |
| 237 | @@ -250,6 +375,7 @@ |
| 238 | int attribute, use_sw = (vc->vc_cursor_type & 0x10); |
| 239 | int err = 1; |
| 240 | char *src; |
| 241 | + u8 std_font = *((u32*)vc->vc_font.data) != 0x6a127efd; |
| 242 | |
| 243 | cursor.set = 0; |
| 244 | |
| 245 | @@ -388,8 +514,14 @@ |
| 246 | if (info->fbops->fb_cursor) |
| 247 | err = info->fbops->fb_cursor(info, &cursor); |
| 248 | |
| 249 | - if (err) |
| 250 | - soft_cursor(info, &cursor); |
| 251 | + if (err) { |
| 252 | + if ( std_font) { |
| 253 | + soft_cursor(info, &cursor); |
| 254 | + } |
| 255 | + else { |
| 256 | + bgra_cursor( vc, info, c, &cursor); |
| 257 | + } |
| 258 | + } |
| 259 | |
| 260 | ops->cursor_reset = 0; |
| 261 | } |
| 262 | --- ./drivers/video/console/fbcon.c.orig 2010-07-12 23:19:39.000000000 +1200 |
| 263 | @@ -2528,7 +2528,8 @@ |
| 264 | int size; |
| 265 | int i, csum; |
| 266 | u8 *new_data, *data = font->data; |
| 267 | - int pitch = (font->width+7) >> 3; |
| 268 | + u8 std_font = *((u32*)data) != 0x6a127efd; |
| 269 | + int pitch = std_font ? (font->width+7) >> 3 : 4 * font->width; |
| 270 | |
| 271 | /* Is there a reason why fbconsole couldn't handle any charcount >256? |
| 272 | * If not this check should be changed to charcount < 256 */ |
| 273 | @@ -2547,6 +2548,7 @@ |
| 274 | size = h * pitch * charcount; |
| 275 | |
| 276 | new_data = kmalloc(FONT_EXTRA_WORDS * sizeof(int) + size, GFP_USER); |
| 277 | + DPRINTK(KERN_INFO "fbcon_set_font size:%d\n", size); |
| 278 | |
| 279 | if (!new_data) |
| 280 | return -ENOMEM; |
| 281 | @@ -2555,8 +2557,14 @@ |
| 282 | FNTSIZE(new_data) = size; |
| 283 | FNTCHARCNT(new_data) = charcount; |
| 284 | REFCOUNT(new_data) = 0; /* usage counter */ |
| 285 | - for (i=0; i< charcount; i++) { |
| 286 | - memcpy(new_data + i*h*pitch, data + i*32*pitch, h*pitch); |
| 287 | + if ( std_font) { |
| 288 | + for (i=0; i< charcount; i++) { |
| 289 | + memcpy(new_data + i*h*pitch, data + i*32*pitch, |
| 290 | + h*pitch); |
| 291 | + } |
| 292 | + } |
| 293 | + else { |
| 294 | + memcpy( new_data, data, size); |
| 295 | } |
| 296 | |
| 297 | /* Since linux has a nice crc32 function use it for counting font |
target/linux/xburst/patches-2.6.32/500-modifier-keys.patch |
1 | 1 | From d76e6b85f28891eecded962793fb8a02cdf26f39 Mon Sep 17 00:00:00 2001 |
| 2 | |
2 | 3 | From: Lars-Peter Clausen <lars@metafoo.de> |
3 | | Date: Mon, 11 Jan 2010 04:29:51 +0100 |
4 | | Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/500-modifier-keys.patch |
5 | 4 | |
| 5 | Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/500-modifier-keys.patch |
6 | 6 | --- |
7 | | drivers/char/defkeymap.map | 74 +++++++++++++++++++++++++++++++------------- |
8 | | 1 files changed, 52 insertions(+), 22 deletions(-) |
9 | 7 | |
10 | | +++ b/drivers/char/defkeymap.map |
| 8 | drivers/char/defkeymap.map | 80 ++++++++++++++++++++++++++++++-------------- |
| 9 | 1 files changed, 54 insertions(+), 26 deletions(-) |
| 10 | |
| 11 | |
| 12 | Index: linux-2.6.32.10/drivers/char/defkeymap.map |
| 13 | =================================================================== |
| 14 | --- linux-2.6.32.10.orig/drivers/char/defkeymap.map 2010-03-15 23:52:04.000000000 +0800 |
11 | 15 | @@ -1,5 +1,5 @@ |
12 | 16 | # Default kernel keymap. This uses 7 modifier combinations. |
13 | 17 | -keymaps 0-2,4-5,8,12 |
... | ... | |
16 | 20 | # Change the above line into |
17 | 21 | # keymaps 0-2,4-6,8,12 |
18 | 22 | # in case you want the entries |
19 | | @@ -45,24 +45,38 @@ keycode 12 = minus underscor |
20 | | control keycode 12 = Control_underscore |
21 | | shift control keycode 12 = Control_underscore |
| 23 | @@ -47,22 +47,36 @@ |
22 | 24 | alt keycode 12 = Meta_minus |
23 | | -keycode 13 = equal plus |
24 | | +keycode 13 = equal plus |
| 25 | keycode 13 = equal plus |
25 | 26 | alt keycode 13 = Meta_equal |
26 | 27 | + altgr keycode 13 = asciitilde |
27 | 28 | + ctrll keycode 13 = three |
28 | 29 | keycode 14 = Delete Delete |
29 | 30 | - control keycode 14 = BackSpace |
30 | | + altgr keycode 14 = BackSpace |
| 31 | + altgr keycode 14 = Remove |
31 | 32 | alt keycode 14 = Meta_Delete |
32 | 33 | keycode 15 = Tab Tab |
33 | 34 | alt keycode 15 = Meta_Tab |
... | ... | |
58 | 59 | keycode 26 = bracketleft braceleft |
59 | 60 | control keycode 26 = Escape |
60 | 61 | alt keycode 26 = Meta_bracketleft |
61 | | @@ -71,19 +85,28 @@ keycode 27 = bracketright bracerigh |
| 62 | @@ -71,27 +85,34 @@ |
62 | 63 | alt keycode 27 = Meta_bracketright |
63 | 64 | keycode 28 = Return |
64 | 65 | alt keycode 28 = Meta_Control_m |
... | ... | |
91 | 92 | keycode 39 = semicolon colon |
92 | 93 | alt keycode 39 = Meta_semicolon |
93 | 94 | keycode 40 = apostrophe quotedbl |
94 | | @@ -97,58 +120,65 @@ keycode 43 = backslash bar |
| 95 | control keycode 40 = Control_g |
| 96 | alt keycode 40 = Meta_apostrophe |
| 97 | -keycode 41 = grave asciitilde |
| 98 | - control keycode 41 = nul |
| 99 | - alt keycode 41 = Meta_grave |
| 100 | +keycode 41 = U+00B4 grave |
| 101 | keycode 42 = Shift |
| 102 | keycode 43 = backslash bar |
95 | 103 | control keycode 43 = Control_backslash |
96 | | alt keycode 43 = Meta_backslash |
97 | | keycode 44 = z |
98 | | + altgr keycode 44 = nine |
99 | | keycode 45 = x |
100 | | + altgr keycode 45 = zero |
101 | | keycode 46 = c |
102 | | altgr keycode 46 = Hex_C |
103 | | keycode 47 = v |
| 104 | @@ -104,16 +125,21 @@ |
104 | 105 | keycode 48 = b |
105 | 106 | altgr keycode 48 = Hex_B |
106 | 107 | keycode 49 = n |
... | ... | |
127 | 128 | keycode 55 = KP_Multiply |
128 | 129 | keycode 56 = Alt |
129 | 130 | keycode 57 = space space |
130 | | control keycode 57 = nul |
131 | | alt keycode 57 = Meta_space |
132 | | keycode 58 = Caps_Lock |
133 | | -keycode 59 = F1 F11 Console_13 |
134 | | +keycode 59 = F1 F11 one |
135 | | control keycode 59 = F1 |
136 | | alt keycode 59 = Console_1 |
137 | | control alt keycode 59 = Console_1 |
138 | | -keycode 60 = F2 F12 Console_14 |
139 | | +keycode 60 = F2 F12 two |
140 | | control keycode 60 = F2 |
141 | | alt keycode 60 = Console_2 |
142 | | control alt keycode 60 = Console_2 |
143 | | -keycode 61 = F3 F13 Console_15 |
144 | | +keycode 61 = F3 F13 three |
145 | | control keycode 61 = F3 |
146 | | alt keycode 61 = Console_3 |
147 | | control alt keycode 61 = Console_3 |
148 | | -keycode 62 = F4 F14 Console_16 |
149 | | +keycode 62 = F4 F14 four |
150 | | control keycode 62 = F4 |
151 | | alt keycode 62 = Console_4 |
152 | | control alt keycode 62 = Console_4 |
153 | | -keycode 63 = F5 F15 Console_17 |
154 | | +keycode 63 = F5 F15 five |
155 | | control keycode 63 = F5 |
156 | | alt keycode 63 = Console_5 |
157 | | control alt keycode 63 = Console_5 |
158 | | -keycode 64 = F6 F16 Console_18 |
159 | | +keycode 64 = F6 F16 six |
160 | | control keycode 64 = F6 |
161 | | alt keycode 64 = Console_6 |
162 | | control alt keycode 64 = Console_6 |
163 | | -keycode 65 = F7 F17 Console_19 |
164 | | +keycode 65 = F7 F17 seven |
165 | | control keycode 65 = F7 |
166 | | alt keycode 65 = Console_7 |
167 | | control alt keycode 65 = Console_7 |
168 | | -keycode 66 = F8 F18 Console_20 |
169 | | +keycode 66 = F8 F18 eight |
170 | | control keycode 66 = F8 |
171 | | alt keycode 66 = Console_8 |
172 | | control alt keycode 66 = Console_8 |
173 | | @@ -220,7 +250,7 @@ keycode 93 = |
174 | | keycode 94 = |
175 | | keycode 95 = |
176 | | keycode 96 = KP_Enter |
177 | | -keycode 97 = Control |
178 | | +keycode 97 = Control |
179 | | keycode 98 = KP_Divide |
180 | | keycode 99 = Control_backslash |
181 | | control keycode 99 = Control_backslash |
| 131 | @@ -204,11 +230,11 @@ |
| 132 | keycode 85 = |
| 133 | keycode 86 = less greater bar |
| 134 | alt keycode 86 = Meta_less |
| 135 | -keycode 87 = F11 F11 Console_23 |
| 136 | +keycode 87 = F11 Scroll_Backward Prior |
| 137 | control keycode 87 = F11 |
| 138 | alt keycode 87 = Console_11 |
| 139 | control alt keycode 87 = Console_11 |
| 140 | -keycode 88 = F12 F12 Console_24 |
| 141 | +keycode 88 = F12 Scroll_Forward Next |
| 142 | control keycode 88 = F12 |
| 143 | alt keycode 88 = Console_12 |
| 144 | control alt keycode 88 = Console_12 |
| 145 | @@ -269,8 +295,6 @@ |
| 146 | string F8 = "\033[19~" |
| 147 | string F9 = "\033[20~" |
| 148 | string F10 = "\033[21~" |
| 149 | -string F11 = "\033[23~" |
| 150 | -string F12 = "\033[24~" |
| 151 | string F13 = "\033[25~" |
| 152 | string F14 = "\033[26~" |
| 153 | string F15 = "\033[28~" |