Date:2010-10-30 16:58:45 (13 years 4 months ago)
Author:Xiangfu Liu
Commit:f187a489f1f5ce3dfbd9071049c725967a199388
Message:some cleanup about xburst target - make zImage compile fine - set the ip addr to 192.168.254.101 - add more tty - format nand partition to 3 - cleanup keyboard - cleanup gmp940b driver - add color font patch, use setfont2 in userspace - add FPU in config, change font to 6x11 - add default CMDLINE, which is for zImage

Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
Files: target/linux/xburst/Makefile (1 diff)
target/linux/xburst/base-files/etc/config/fstab (1 diff)
target/linux/xburst/base-files/etc/config/network (1 diff)
target/linux/xburst/base-files/etc/inittab (1 diff)
target/linux/xburst/base-files/etc/opkg.conf (1 diff)
target/linux/xburst/config-2.6.32 (1 diff)
target/linux/xburst/files-2.6.32/arch/mips/include/asm/mach-jz4740/jz4740.h (3 diffs)
target/linux/xburst/files-2.6.32/arch/mips/include/asm/mach-jz4740/serial.h (1 diff)
target/linux/xburst/files-2.6.32/arch/mips/jz4740/board-qi_lb60.c (5 diffs)
target/linux/xburst/files-2.6.32/arch/mips/jz4740/setup.c (1 diff)
target/linux/xburst/files-2.6.32/arch/mips/jz4740/time.c (1 diff)
target/linux/xburst/files-2.6.32/drivers/char/defkeymap.c_shipped (8 diffs)
target/linux/xburst/files-2.6.32/drivers/video/backlight/gpm940b0.c (1 diff)
target/linux/xburst/files-2.6.32/drivers/video/jz4740_fb.c (1 diff)
target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-i2s.c (4 diffs)
target/linux/xburst/image/Makefile (1 diff)
target/linux/xburst/patches-2.6.32/450-fbcon-color-fonts.patch (1 diff)
target/linux/xburst/patches-2.6.32/500-modifier-keys.patch (5 diffs)
target/linux/xburst/patches-2.6.32/600-fix-compile-zImage.patch (1 diff)
target/linux/xburst/qi_lb60/config-2.6.32 (2 diffs)

Change Details

target/linux/xburst/Makefile
1818
1919include $(INCLUDE_DIR)/target.mk
2020
21KERNELNAME:=uImage
21KERNELNAME:=uImage zImage
2222
2323define Target/Description
2424    Build firmware images for XBurst JZ47x0 based boards.
target/linux/xburst/base-files/etc/config/fstab
1config mount
2    option target /card
3    option device /dev/mmcblk0p1
4    option fstype auto
5    option options rw,sync
6    option enabled 1
target/linux/xburst/base-files/etc/config/network
99config interface lan
1010    option ifname usb0
1111    option proto static
12    option ipaddr 192.168.1.1
12    option ipaddr 192.168.254.101
1313    option netmask 255.255.255.0
14    option gateway 192.168.254.100
15    option dns 208.67.222.222
target/linux/xburst/base-files/etc/inittab
1::sysinit:/etc/init.d/rcS S boot
2::shutdown:/etc/init.d/rcS K stop
3tts/0::askfirst:/bin/ash --login
4ttyS0::askfirst:/bin/ash --login
5tty1::respawn:/bin/ash --login
6tty2::askfirst:/bin/ash --login
7tty3::askfirst:/bin/ash --login
8tty4::askfirst:/bin/ash --login
target/linux/xburst/base-files/etc/opkg.conf
1src/gz snapshots http://downloads.qi-hardware.com/software/packages/openwrt/xburst/latest
2dest root /
3dest ram /tmp
4lists_dir ext /var/opkg-lists
5option overlay_root /overlay
target/linux/xburst/config-2.6.32
9494# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
9595# CONFIG_FRAMEBUFFER_CONSOLE is not set
9696CONFIG_FREEZER=y
97# CONFIG_FSNOTIFY is not set
97CONFIG_INOTIFY=y
98CONFIG_INOTIFY_USER=y
9899CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
99100CONFIG_GENERIC_CLOCKEVENTS=y
100101CONFIG_GENERIC_CMOS_UPDATE=y
target/linux/xburst/files-2.6.32/arch/mips/include/asm/mach-jz4740/jz4740.h
11/*
2 * linux/include/asm-mips/mach-jz4740/jz4740.h
2 * arch/mips/include/asm/mach-jz4740/jz4740.h
3 * JZ4740 common definition.
34 *
4 * JZ4740 common definition.
5 *
6 * Copyright (C) 2006 - 2007 Ingenic Semiconductor Inc.
7 *
8 * Author: <lhhuang@ingenic.cn>
5 * Copyright (C) 2006 - 2007 Ingenic Semiconductor Inc.
6 * Author: <lhhuang@ingenic.cn>
97 *
108 * This program is free software; you can redistribute it and/or modify
119 * it under the terms of the GNU General Public License version 2 as
...... 
1816#include <asm/mach-jz4740/regs.h>
1917#include <asm/mach-jz4740/dma.h>
2018
21/*------------------------------------------------------------------
19/*
2220 * Platform definitions
2321 */
2422
...... 
2624#include <asm/mach-jz4740/board-qi_lb60.h>
2725#endif
2826
29/*------------------------------------------------------------------
30 * Follows are related to platform definitions
31 */
32
33#include <asm/mach-jz4740/serial.h>
34
3527#endif /* __ASM_JZ4740_H__ */
target/linux/xburst/files-2.6.32/arch/mips/include/asm/mach-jz4740/serial.h
1/*
2 * linux/include/asm-mips/mach-jz4740/serial.h
3 *
4 * Ingenic's JZ4740 common include.
5 *
6 * Copyright (C) 2006 - 2007 Ingenic Semiconductor Inc.
7 *
8 * Author: <yliu@ingenic.cn>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_BOARD_SERIAL_H__
16#define __ASM_BOARD_SERIAL_H__
17
18#ifndef CONFIG_SERIAL_MANY_PORTS
19#undef RS_TABLE_SIZE
20#define RS_TABLE_SIZE 1
21#endif
22
23#define JZ_BASE_BAUD (12000000/16)
24
25#define JZ_SERIAL_PORT_DEFNS \
26    { .baud_base = JZ_BASE_BAUD, .irq = IRQ_UART0, \
27      .flags = STD_COM_FLAGS, .iomem_base = (u8 *)UART0_BASE, \
28      .iomem_reg_shift = 2, .io_type = SERIAL_IO_MEM },
29
30#endif /* __ASM_BORAD_SERIAL_H__ */
target/linux/xburst/files-2.6.32/arch/mips/jz4740/board-qi_lb60.c
9494     },
9595    { .name = "NAND ROOTFS partition",
9696      .offset = 8 * 0x100000,
97      .size = (504 + 512 + 1024) * 0x100000,
97      .size = 256 * 0x100000,
9898     },
99    { .name = "NAND DATA partition",
100      .offset = 264 * 0x100000,
101      .size = 1784 * 0x100000,
102    },
99103};
100104
101105static void qi_lb60_nand_ident(struct platform_device *pdev,
...... 
120124};
121125
122126/* 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
128129#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
132131#define KEY_QI_FN KEY_LEFTCTRL
132#define KEY_QI_UPRED KEY_RIGHTALT
133133
134134static const uint32_t qi_lb60_keymap[] = {
135135    KEY(0, 0, KEY_F1), /* S2 */
...... 
167167    KEY(4, 0, KEY_TAB), /* S34 */
168168    KEY(4, 1, KEY_CAPSLOCK), /* S35 */
169169    KEY(4, 2, KEY_BACKSLASH), /* S36 */
170    KEY(4, 3, KEY_APOSTROPHE), /* S37 */
170    KEY(4, 3, KEY_QI_ACUTE), /* S37 */
171171    KEY(4, 4, KEY_COMMA), /* S38 */
172172    KEY(4, 5, KEY_DOT), /* S39 */
173173    KEY(4, 6, KEY_SLASH), /* S40 */
...... 
188188    KEY(6, 5, KEY_QI_VOLDOWN), /* S55 */
189189    KEY(6, 6, KEY_DOWN), /* S56 */
190190    KEY(6, 7, KEY_RIGHT), /* S57 */
191
192#ifndef KEEP_UART_ALIVE
193191    KEY(7, 0, KEY_LEFTSHIFT), /* S58 */
194192    KEY(7, 1, KEY_LEFTALT), /* S59 */
195193    KEY(7, 2, KEY_QI_FN), /* S60 */
196#endif
197194};
198195
199196static const struct matrix_keymap_data qi_lb60_keymap_data = {
...... 
206203};
207204
208205static 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,
213207};
214208
215209static struct matrix_keypad_platform_data qi_lb60_pdata = {
target/linux/xburst/files-2.6.32/arch/mips/jz4740/setup.c
3939#include <asm/mach-jz4740/jz4740.h>
4040#include <asm/mach-jz4740/regs.h>
4141#include <asm/mach-jz4740/clock.h>
42#include <asm/mach-jz4740/serial.h>
4342
4443#include "clock.h"
4544
target/linux/xburst/files-2.6.32/arch/mips/jz4740/time.c
9898static void jz4740_timer_enable(unsigned int timer)
9999{
100100    writel(BIT(timer), jz4740_timer_base + JZ_REG_TIMER_STOP_CLEAR);
101    writel(BIT(timer), jz4740_timer_base + JZ_REG_TIMER_ENABLE_SET);
101    writeb(BIT(timer), jz4740_timer_base + JZ_REG_TIMER_ENABLE_SET);
102102}
103103
104104static void jz4740_timer_disable(unsigned int timer)
105105{
106    writel(BIT(timer), jz4740_timer_base + JZ_REG_TIMER_ENABLE_CLEAR);
106    writeb(BIT(timer), jz4740_timer_base + JZ_REG_TIMER_ENABLE_CLEAR);
107107    writel(BIT(timer), jz4740_timer_base + JZ_REG_TIMER_STOP_SET);
108108}
109109
target/linux/xburst/files-2.6.32/drivers/char/defkeymap.c_shipped
1111    0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
1212    0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf706, 0xfb61, 0xfb73,
1313    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,
1515    0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf701, 0xf30c,
1616    0xf703, 0xf020, 0xf207, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
1717    0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
...... 
4646    0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
4747    0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf706, 0xfb41, 0xfb53,
4848    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,
5050    0xfb42, 0xfb4e, 0xfb4d, 0xf03b, 0xf03a, 0xf03f, 0xf701, 0xf30c,
5151    0xf703, 0xf020, 0xf207, 0xf10a, 0xf10b, 0xf10c, 0xf10d, 0xf10e,
5252    0xf10f, 0xf110, 0xf111, 0xf112, 0xf113, 0xf213, 0xf203, 0xf307,
5353    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,
5656    0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603,
5757    0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116,
5858    0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d,
...... 
7777
7878static u_short altgr_map[NR_KEYS] = {
7979    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,
8181    0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e, 0xf026, 0xf02a,
8282    0xf028, 0xf029, 0xf200, 0xf07e, 0xf201, 0xf706, 0xf0b0, 0xf0a8,
8383    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,
8585    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,
8888    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,
9191    0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603,
9292    0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
9393    0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d,
...... 
116116    0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
117117    0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf201, 0xf706, 0xf001, 0xf013,
118118    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,
120120    0xf002, 0xf00e, 0xf00d, 0xf200, 0xf20e, 0xf07f, 0xf701, 0xf30c,
121121    0xf703, 0xf000, 0xf207, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
122122    0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf204, 0xf307,
...... 
186186    0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
187187    0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf706, 0xf861, 0xf873,
188188    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,
190190    0xf862, 0xf86e, 0xf86d, 0xf200, 0xf200, 0xf82f, 0xf701, 0xf30c,
191191    0xf703, 0xf820, 0xf207, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
192192    0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf209, 0xf907,
...... 
324324    '\033', '[', '1', '9', '~', 0,
325325    '\033', '[', '2', '0', '~', 0,
326326    '\033', '[', '2', '1', '~', 0,
327    '\033', '[', '2', '3', '~', 0,
328    '\033', '[', '2', '4', '~', 0,
329327    '\033', '[', '2', '5', '~', 0,
330328    '\033', '[', '2', '6', '~', 0,
331329    '\033', '[', '2', '8', '~', 0,
...... 
359357    func_buf + 37,
360358    func_buf + 43,
361359    func_buf + 49,
360    0,
361    0,
362362    func_buf + 55,
363363    func_buf + 61,
364364    func_buf + 67,
...... 
368368    func_buf + 91,
369369    func_buf + 97,
370370    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,
379377    0,
380378    0,
381    func_buf + 149,
379    func_buf + 137,
382380    0,
383381};
384382
target/linux/xburst/files-2.6.32/drivers/video/backlight/gpm940b0.c
176176    gpm940b0->enabled = 1;
177177    dev_set_drvdata(&spi->dev, gpm940b0);
178178
179    gpm940b0_write_reg(spi, 0x07, 0x8d);
179180    gpm940b0_write_reg(spi, 0x13, 0x01);
180181    gpm940b0_write_reg(spi, 0x5, 0xc7);
181182    return 0;
target/linux/xburst/files-2.6.32/drivers/video/jz4740_fb.c
221221    if (regno >= fb->cmap.len)
222222        return -EINVAL;
223223
224    red >>= 8;
225    green >>= 8;
226    blue >>= 8;
227
224228    ((uint32_t*)fb->pseudo_palette)[regno] = red << 16 | green << 8 | blue;
225229
226230    return 0;
target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-i2s.c
259259}
260260
261261static int jz4740_i2s_hw_params(struct snd_pcm_substream *substream,
262                 struct snd_pcm_hw_params *params,
263                 struct snd_soc_dai *dai)
262                struct snd_pcm_hw_params *params,
263                struct snd_soc_dai *dai)
264264{
265265    struct jz4740_i2s *i2s = jz4740_dai_to_i2s(dai);
266266    bool playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
...... 
272272
273273    switch (params_format(params)) {
274274    case SNDRV_PCM_FORMAT_S8:
275        sample_size = 0;
275        sample_size = 0;
276276        dma_width = JZ4740_DMA_WIDTH_8BIT;
277        break;
277        break;
278278    case SNDRV_PCM_FORMAT_S16:
279        sample_size = 1;
279        sample_size = 1;
280280        dma_width = JZ4740_DMA_WIDTH_16BIT;
281281        break;
282282    default:
...... 
285285
286286    if (playback) {
287287        ctrl &= ~JZ_AIC_CTRL_OUTPUT_SAMPLE_SIZE_MASK;
288        ctrl |= sample_size << JZ_AIC_CTRL_OUTPUT_SAMPLE_SIZE_OFFSET;
288        ctrl |= sample_size << JZ_AIC_CTRL_OUTPUT_SAMPLE_SIZE_OFFSET;
289289    } else {
290290        ctrl &= ~JZ_AIC_CTRL_INPUT_SAMPLE_SIZE_MASK;
291        ctrl |= sample_size << JZ_AIC_CTRL_INPUT_SAMPLE_SIZE_OFFSET;
291        ctrl |= sample_size << JZ_AIC_CTRL_INPUT_SAMPLE_SIZE_OFFSET;
292292    }
293293
294294    switch (params_channels(params)) {
295295    case 2:
296        break;
296        break;
297297    case 1:
298        if (playback) {
299            ctrl |= JZ_AIC_CTRL_MONO_TO_STEREO;
300            break;
301        }
298        if (playback) {
299            ctrl |= JZ_AIC_CTRL_MONO_TO_STEREO;
300            break;
301        }
302302    default:
303        return -EINVAL;
303        return -EINVAL;
304304    }
305305
306306    jz4740_i2s_write(i2s, JZ_REG_AIC_CTRL, ctrl);
...... 
410410    conf = (7 << JZ_AIC_CONF_FIFO_RX_THRESHOLD_OFFSET) |
411411           (8 << JZ_AIC_CONF_FIFO_TX_THRESHOLD_OFFSET) |
412412           JZ_AIC_CONF_OVERFLOW_PLAY_LAST |
413           JZ_AIC_CONF_I2S |
413           JZ_AIC_CONF_I2S |
414414           JZ_AIC_CONF_INTERNAL_CODEC;
415415
416416    jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, JZ_AIC_CONF_RESET);
target/linux/xburst/image/Makefile
1919
2020define Image/BuildKernel
2121    cp $(LINUX_DIR)/arch/mips/boot/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage.bin
22ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
23    cp $(LINUX_DIR)/arch/mips/boot/compressed/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage.bin
24endif
2225endef
2326
2427define Image/Build/squashfs
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
11From d76e6b85f28891eecded962793fb8a02cdf26f39 Mon Sep 17 00:00:00 2001
2
23From: Lars-Peter Clausen <lars@metafoo.de>
3Date: Mon, 11 Jan 2010 04:29:51 +0100
4Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/500-modifier-keys.patch
54
5Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/500-modifier-keys.patch
66---
7 drivers/char/defkeymap.map | 74 +++++++++++++++++++++++++++++++-------------
8 1 files changed, 52 insertions(+), 22 deletions(-)
97
10+++ b/drivers/char/defkeymap.map
8 drivers/char/defkeymap.map | 80 ++++++++++++++++++++++++++++++--------------
9 1 files changed, 54 insertions(+), 26 deletions(-)
10
11
12Index: 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
1115@@ -1,5 +1,5 @@
1216 # Default kernel keymap. This uses 7 modifier combinations.
1317-keymaps 0-2,4-5,8,12
...... 
1620 # Change the above line into
1721 # keymaps 0-2,4-6,8,12
1822 # 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 @@
2224     alt keycode 12 = Meta_minus
23-keycode 13 = equal plus
24+keycode 13 = equal plus
25 keycode 13 = equal plus
2526     alt keycode 13 = Meta_equal
2627+ altgr keycode 13 = asciitilde
2728+ ctrll keycode 13 = three
2829 keycode 14 = Delete Delete
2930- control keycode 14 = BackSpace
30+ altgr keycode 14 = BackSpace
31+ altgr keycode 14 = Remove
3132     alt keycode 14 = Meta_Delete
3233 keycode 15 = Tab Tab
3334     alt keycode 15 = Meta_Tab
...... 
5859 keycode 26 = bracketleft braceleft
5960     control keycode 26 = Escape
6061     alt keycode 26 = Meta_bracketleft
61@@ -71,19 +85,28 @@ keycode 27 = bracketright bracerigh
62@@ -71,27 +85,34 @@
6263     alt keycode 27 = Meta_bracketright
6364 keycode 28 = Return
6465     alt keycode 28 = Meta_Control_m
...... 
9192 keycode 39 = semicolon colon
9293     alt keycode 39 = Meta_semicolon
9394 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
95103     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 @@
104105 keycode 48 = b
105106     altgr keycode 48 = Hex_B
106107 keycode 49 = n
...... 
127128 keycode 55 = KP_Multiply
128129 keycode 56 = Alt
129130 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~"
target/linux/xburst/patches-2.6.32/600-fix-compile-zImage.patch
1From 4939c63a61175f87d93ac0164c7adb40e8410a47 Mon Sep 17 00:00:00 2001
2From: Xiangfu Liu <xiangfu@qi-hardware.com>
3Date: Sun, 17 Jan 2010 23:38:35 +0800
4Subject: [PATCH] ix upload zImage
5
6---
7 arch/mips/boot/compressed/head.S | 1 -
8 arch/mips/boot/compressed/misc.c | 22 ----------------------
9 2 files changed, 0 insertions(+), 23 deletions(-)
10
11diff --git a/arch/mips/boot/compressed/head.S b/arch/mips/boot/compressed/head.S
12index d9700eb..6a4e685 100644
13--- a/arch/mips/boot/compressed/head.S
14@@ -5,7 +5,6 @@
15  */
16
17 #include <asm/asm.h>
18-#include <asm/cacheops.h>
19 #include <asm/cachectl.h>
20 #include <asm/regdef.h>
21
22diff --git a/arch/mips/boot/compressed/misc.c b/arch/mips/boot/compressed/misc.c
23index 2309fee..c0b041b 100644
24--- a/arch/mips/boot/compressed/misc.c
25@@ -103,28 +103,6 @@ static unsigned long free_mem_end_ptr;
26
27 #include "../../../../lib/inflate.c"
28
29-static void *malloc(int size)
30-{
31- void *p;
32-
33- if (size <0) error("Malloc error\n");
34- if (free_mem_ptr == 0) error("Memory error\n");
35-
36- free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */
37-
38- p = (void *)free_mem_ptr;
39- free_mem_ptr += size;
40-
41- if (free_mem_ptr >= free_mem_end_ptr)
42- error("\nOut of memory\n");
43-
44- return p;
45-}
46-
47-static void free(void *where)
48-{ /* Don't care */
49-}
50-
51 static void gzip_mark(void **ptr)
52 {
53     *ptr = (void *) free_mem_ptr;
54--
551.6.3.3
56
target/linux/xburst/qi_lb60/config-2.6.32
11CONFIG_BACKLIGHT_LCD_SUPPORT=y
22CONFIG_BATTERY_JZ4740=y
3CONFIG_CHARGER_GPIO=y
3CONFIG_CMDLINE="root=/dev/ram0 rootfstype=ramfs console=ttyS0,57600 console=tty0 mem=32M"
44CONFIG_FB_JZ4740=y
5CONFIG_FONT_6x11=y
6# CONFIG_FONT_SUN8x16 is not set
57CONFIG_FRAMEBUFFER_CONSOLE=y
68CONFIG_JZ4740_ADC=y
79CONFIG_JZ4740_QI_LB60=y
...... 
1113CONFIG_LCD_GPM940B0=y
1214CONFIG_LOGO=y
1315CONFIG_LOGO_OPENWRT_CLUT224=y
16CONFIG_MIPS_FPU_EMU=y
17CONFIG_SOC_JZ4740=y
1418CONFIG_SPI=y
1519CONFIG_SPI_BITBANG=y
1620CONFIG_SPI_GPIO=y
1721CONFIG_SPI_MASTER=y
22CONFIG_USB_ETH_RNDIS=n

Archive Download the corresponding diff file



interactive