diff options
-rw-r--r-- | bootloader/SOURCES | 2 | ||||
-rw-r--r-- | bootloader/ipodnano2g.c | 54 | ||||
-rw-r--r-- | firmware/SOURCES | 4 | ||||
-rw-r--r-- | firmware/export/config-ipodnano2g.h | 184 | ||||
-rw-r--r-- | firmware/export/config.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/s5l8700/boot.lds | 19 | ||||
-rw-r--r-- | firmware/target/arm/s5l8700/ipodnano2g/button-target.h | 78 | ||||
-rw-r--r-- | firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c | 142 | ||||
-rwxr-xr-x | tools/configure | 74 |
9 files changed, 533 insertions, 26 deletions
diff --git a/bootloader/SOURCES b/bootloader/SOURCES index 942467af4d..f748403a85 100644 --- a/bootloader/SOURCES +++ b/bootloader/SOURCES | |||
@@ -51,4 +51,6 @@ show_logo.c | |||
51 | #elif defined(LYRE_PROTO1) | 51 | #elif defined(LYRE_PROTO1) |
52 | lyre_proto1.c | 52 | lyre_proto1.c |
53 | show_logo.c | 53 | show_logo.c |
54 | #elif defined(IPOD_NANO2G) | ||
55 | ipodnano2g.c | ||
54 | #endif | 56 | #endif |
diff --git a/bootloader/ipodnano2g.c b/bootloader/ipodnano2g.c new file mode 100644 index 0000000000..637d405f01 --- /dev/null +++ b/bootloader/ipodnano2g.c | |||
@@ -0,0 +1,54 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2009 by ???? [to be completed by first author] | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #include <stdlib.h> | ||
23 | #include <stdio.h> | ||
24 | #include <stdarg.h> | ||
25 | #include <string.h> | ||
26 | |||
27 | #include "config.h" | ||
28 | |||
29 | #include "inttypes.h" | ||
30 | #include "cpu.h" | ||
31 | #include "system.h" | ||
32 | #include "lcd.h" | ||
33 | #include "kernel.h" | ||
34 | #include "thread.h" | ||
35 | #include "storage.h" | ||
36 | #include "fat.h" | ||
37 | #include "disk.h" | ||
38 | #include "font.h" | ||
39 | #include "backlight.h" | ||
40 | #include "backlight-target.h" | ||
41 | #include "button.h" | ||
42 | #include "panic.h" | ||
43 | #include "power.h" | ||
44 | #include "file.h" | ||
45 | #include "common.h" | ||
46 | |||
47 | char version[] = APPSVERSION; | ||
48 | |||
49 | void main(void) | ||
50 | { | ||
51 | /* Do nothing... */ | ||
52 | while(1); | ||
53 | } | ||
54 | |||
diff --git a/firmware/SOURCES b/firmware/SOURCES index 7c1a17ff7f..0ad0d5ebfe 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -1272,6 +1272,10 @@ target/arm/s5l8700/udacodec-meizu.c | |||
1272 | #endif /* SIMULATOR */ | 1272 | #endif /* SIMULATOR */ |
1273 | #endif /* MEIZU_M3 */ | 1273 | #endif /* MEIZU_M3 */ |
1274 | 1274 | ||
1275 | #ifdef IPOD_NANO2G | ||
1276 | target/arm/s5l8700/ipodnano2g/lcd-nano2g.c | ||
1277 | #endif | ||
1278 | |||
1275 | #ifndef SIMULATOR | 1279 | #ifndef SIMULATOR |
1276 | #if CONFIG_CPU == JZ4732 | 1280 | #if CONFIG_CPU == JZ4732 |
1277 | target/mips/ingenic_jz47xx/ata-nand-jz4740.c | 1281 | target/mips/ingenic_jz47xx/ata-nand-jz4740.c |
diff --git a/firmware/export/config-ipodnano2g.h b/firmware/export/config-ipodnano2g.h new file mode 100644 index 0000000000..393151961f --- /dev/null +++ b/firmware/export/config-ipodnano2g.h | |||
@@ -0,0 +1,184 @@ | |||
1 | /* | ||
2 | * This config file is for iPod Nano 2nd Generation | ||
3 | */ | ||
4 | #define TARGET_TREE /* this target is using the target tree system */ | ||
5 | |||
6 | /* For Rolo and boot loader */ | ||
7 | #define MODEL_NUMBER 62 | ||
8 | |||
9 | #define MODEL_NAME "Apple iPod Nano 2g" | ||
10 | |||
11 | /* define this if you have recording possibility */ | ||
12 | //#define HAVE_RECORDING | ||
13 | |||
14 | /* Define bitmask of input sources - recordable bitmask can be defined | ||
15 | explicitly if different */ | ||
16 | #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN | SRC_CAP_FMRADIO) | ||
17 | |||
18 | /* define the bitmask of hardware sample rates */ | ||
19 | #define HW_SAMPR_CAPS (SAMPR_CAP_88 | SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11) | ||
20 | |||
21 | /* define the bitmask of recording sample rates */ | ||
22 | #define REC_SAMPR_CAPS (SAMPR_CAP_88 | SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11) | ||
23 | |||
24 | /* define this if you have a bitmap LCD display */ | ||
25 | #define HAVE_LCD_BITMAP | ||
26 | |||
27 | /* define this if you can flip your LCD */ | ||
28 | //#define HAVE_LCD_FLIP | ||
29 | |||
30 | /* define this if you have a colour LCD */ | ||
31 | #define HAVE_LCD_COLOR | ||
32 | |||
33 | /* define this if you want album art for this target */ | ||
34 | #define HAVE_ALBUMART | ||
35 | |||
36 | /* define this to enable bitmap scaling */ | ||
37 | #define HAVE_BMP_SCALING | ||
38 | |||
39 | /* define this to enable JPEG decoding */ | ||
40 | #define HAVE_JPEG | ||
41 | |||
42 | /* define this if you can invert the colours on your LCD */ | ||
43 | //#define HAVE_LCD_INVERT | ||
44 | |||
45 | /* define this if you have access to the quickscreen */ | ||
46 | #define HAVE_QUICKSCREEN | ||
47 | |||
48 | /* define this if you have access to the pitchscreen */ | ||
49 | #define HAVE_PITCHSCREEN | ||
50 | |||
51 | /* define this if you would like tagcache to build on this target */ | ||
52 | #define HAVE_TAGCACHE | ||
53 | |||
54 | /* define this if you have a flash memory storage */ | ||
55 | #define HAVE_FLASH_STORAGE | ||
56 | |||
57 | #define CONFIG_STORAGE STORAGE_NAND | ||
58 | |||
59 | #define CONFIG_NAND NAND_SAMSUNG | ||
60 | |||
61 | /* LCD dimensions */ | ||
62 | #define LCD_WIDTH 176 | ||
63 | #define LCD_HEIGHT 132 | ||
64 | #define LCD_DEPTH 16 /* pseudo 262.144 colors */ | ||
65 | #define LCD_PIXELFORMAT RGB565 /* rgb565 */ | ||
66 | |||
67 | /* Define this if your LCD can be enabled/disabled */ | ||
68 | //#define HAVE_LCD_ENABLE | ||
69 | |||
70 | /* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE | ||
71 | should be defined as well. */ | ||
72 | //#define HAVE_LCD_SLEEP | ||
73 | |||
74 | #define CONFIG_KEYPAD IPOD_4G_PAD | ||
75 | |||
76 | //#define AB_REPEAT_ENABLE 1 | ||
77 | //#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE | ||
78 | |||
79 | /* Define this if you do software codec */ | ||
80 | #define CONFIG_CODEC SWCODEC | ||
81 | |||
82 | /* define this if you have a real-time clock */ | ||
83 | //#define CONFIG_RTC RTC_S5L8700 | ||
84 | #define CONFIG_RTC RTC_S35390A | ||
85 | |||
86 | #define CONFIG_LCD LCD_NANO2G | ||
87 | |||
88 | /* Define the type of audio codec */ | ||
89 | #define HAVE_UDA1380 | ||
90 | |||
91 | /* Define this for LCD backlight available */ | ||
92 | #define HAVE_BACKLIGHT | ||
93 | #define HAVE_BACKLIGHT_BRIGHTNESS | ||
94 | |||
95 | /* Define this if you have a software controlled poweroff */ | ||
96 | #define HAVE_SW_POWEROFF | ||
97 | |||
98 | /* The number of bytes reserved for loadable codecs */ | ||
99 | #define CODEC_SIZE 0x100000 | ||
100 | |||
101 | /* The number of bytes reserved for loadable plugins */ | ||
102 | #define PLUGIN_BUFFER_SIZE 0x80000 | ||
103 | |||
104 | /* FM Tuner */ | ||
105 | #define CONFIG_TUNER TEA5760 | ||
106 | #define CONFIG_TUNER_XTAL 32768 | ||
107 | |||
108 | //#define HAVE_TLV320 | ||
109 | |||
110 | /* TLV320 has no tone controls, so we use the software ones */ | ||
111 | #define HAVE_SW_TONE_CONTROLS | ||
112 | |||
113 | #define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity */ | ||
114 | #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ | ||
115 | #define BATTERY_CAPACITY_MAX 2250 /* max. capacity selectable */ | ||
116 | #define BATTERY_CAPACITY_INC 50 /* capacity increment */ | ||
117 | #define BATTERY_TYPES_COUNT 1 /* only one type */ | ||
118 | |||
119 | /* Hardware controlled charging? FIXME */ | ||
120 | #define CONFIG_CHARGING CHARGING_SIMPLE | ||
121 | |||
122 | #ifndef SIMULATOR | ||
123 | |||
124 | /* Define this if your LCD can set contrast */ | ||
125 | //#define HAVE_LCD_CONTRAST | ||
126 | |||
127 | /* Define this if you have a Motorola SCF5250 */ | ||
128 | #define CONFIG_CPU S5L8700 | ||
129 | |||
130 | /* Define this if you want to use coldfire's i2c interface */ | ||
131 | #define CONFIG_I2C I2C_S5L8700 | ||
132 | |||
133 | /* define this if the hardware can be powered off while charging */ | ||
134 | #define HAVE_POWEROFF_WHILE_CHARGING | ||
135 | |||
136 | /* The size of the flash ROM */ | ||
137 | #define FLASH_SIZE 0x400000 | ||
138 | |||
139 | /* Define this to the CPU frequency */ | ||
140 | #define CPU_FREQ 11289600 | ||
141 | |||
142 | /* Define this if you have ATA power-off control */ | ||
143 | //#define HAVE_ATA_POWER_OFF | ||
144 | |||
145 | /* Virtual LED (icon) */ | ||
146 | #define CONFIG_LED LED_VIRTUAL | ||
147 | |||
148 | /* Offset ( in the firmware file's header ) to the file CRC */ | ||
149 | #define FIRMWARE_OFFSET_FILE_CRC 0 | ||
150 | |||
151 | /* Offset ( in the firmware file's header ) to the real data */ | ||
152 | #define FIRMWARE_OFFSET_FILE_DATA 8 | ||
153 | |||
154 | /* USB On-the-go */ | ||
155 | //#define CONFIG_USBOTG USBOTG_M5636 | ||
156 | |||
157 | /* Define this if you have adjustable CPU frequency */ | ||
158 | #define HAVE_ADJUSTABLE_CPU_FREQ | ||
159 | |||
160 | #define BOOTFILE_EXT "ipod" | ||
161 | #define BOOTFILE "rockbox." BOOTFILE_EXT | ||
162 | #define BOOTDIR "/.rockbox" | ||
163 | |||
164 | #define BOOTLOADER_ENTRYPOINT 0x001F0000 | ||
165 | #define FLASH_ENTRYPOINT 0x00001000 | ||
166 | #define FLASH_MAGIC 0xfbfbfbf1 | ||
167 | |||
168 | #endif /* SIMULATOR */ | ||
169 | |||
170 | /* Define this for FM radio input available */ | ||
171 | #define HAVE_FMRADIO_IN | ||
172 | |||
173 | /** Port-specific settings **/ | ||
174 | |||
175 | /* Main LCD contrast range and defaults */ | ||
176 | #define MIN_CONTRAST_SETTING 1 | ||
177 | #define MAX_CONTRAST_SETTING 30 | ||
178 | #define DEFAULT_CONTRAST_SETTING 19 /* Match boot contrast */ | ||
179 | |||
180 | /* Main LCD backlight brightness range and defaults */ | ||
181 | #define MIN_BRIGHTNESS_SETTING 0 | ||
182 | #define MAX_BRIGHTNESS_SETTING 15 | ||
183 | #define DEFAULT_BRIGHTNESS_SETTING 10 | ||
184 | |||
diff --git a/firmware/export/config.h b/firmware/export/config.h index 6e4f9d05c9..22d7090f96 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -302,6 +302,8 @@ Lyre prototype 1*/ | |||
302 | #include "config-ipod3g.h" | 302 | #include "config-ipod3g.h" |
303 | #elif defined(IPOD_4G) | 303 | #elif defined(IPOD_4G) |
304 | #include "config-ipod4g.h" | 304 | #include "config-ipod4g.h" |
305 | #elif defined(IPOD_NANO2G) | ||
306 | #include "config-ipodnano2g.h" | ||
305 | #elif defined(IRIVER_IFP7XX) | 307 | #elif defined(IRIVER_IFP7XX) |
306 | #include "config-ifp7xx.h" | 308 | #include "config-ifp7xx.h" |
307 | #elif defined(GIGABEAT_F) | 309 | #elif defined(GIGABEAT_F) |
diff --git a/firmware/target/arm/s5l8700/boot.lds b/firmware/target/arm/s5l8700/boot.lds index 317e40b2ca..28271822e8 100644 --- a/firmware/target/arm/s5l8700/boot.lds +++ b/firmware/target/arm/s5l8700/boot.lds | |||
@@ -1,7 +1,11 @@ | |||
1 | #include "config.h" | 1 | #include "config.h" |
2 | 2 | ||
3 | ENTRY(_start) | 3 | ENTRY(_start) |
4 | #ifdef ROCKBOX_LITTLE_ENDIAN | ||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | #else | ||
4 | OUTPUT_FORMAT(elf32-bigarm) | 7 | OUTPUT_FORMAT(elf32-bigarm) |
8 | #endif | ||
5 | OUTPUT_ARCH(arm) | 9 | OUTPUT_ARCH(arm) |
6 | STARTUP(target/arm/s5l8700/crt0.o) | 10 | STARTUP(target/arm/s5l8700/crt0.o) |
7 | 11 | ||
@@ -28,7 +32,12 @@ MEMORY | |||
28 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | 32 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE |
29 | FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE | 33 | FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE |
30 | } | 34 | } |
31 | 35 | ||
36 | #ifdef IPOD_NANO2G | ||
37 | #define LOAD_AREA IRAM | ||
38 | #else | ||
39 | #define LOAD_AREA FLASH | ||
40 | #endif | ||
32 | 41 | ||
33 | SECTIONS | 42 | SECTIONS |
34 | { | 43 | { |
@@ -36,19 +45,19 @@ SECTIONS | |||
36 | _intvectstart = . ; | 45 | _intvectstart = . ; |
37 | *(.intvect) | 46 | *(.intvect) |
38 | _intvectend = _newstart ; | 47 | _intvectend = _newstart ; |
39 | } >IRAM AT> FLASH | 48 | } >IRAM AT> LOAD_AREA |
40 | _intvectcopy = LOADADDR(.intvect) ; | 49 | _intvectcopy = LOADADDR(.intvect) ; |
41 | 50 | ||
42 | .text : { | 51 | .text : { |
43 | *(.init.text) | 52 | *(.init.text) |
44 | *(.text*) | 53 | *(.text*) |
45 | *(.glue_7*) | 54 | *(.glue_7*) |
46 | } > FLASH | 55 | } > LOAD_AREA |
47 | 56 | ||
48 | .rodata : { | 57 | .rodata : { |
49 | *(.rodata*) | 58 | *(.rodata*) |
50 | . = ALIGN(0x4); | 59 | . = ALIGN(0x4); |
51 | } > FLASH | 60 | } > LOAD_AREA |
52 | 61 | ||
53 | .data : { | 62 | .data : { |
54 | _datastart = . ; | 63 | _datastart = . ; |
@@ -59,7 +68,7 @@ SECTIONS | |||
59 | *(.ncdata*); | 68 | *(.ncdata*); |
60 | . = ALIGN(0x4); | 69 | . = ALIGN(0x4); |
61 | _dataend = . ; | 70 | _dataend = . ; |
62 | } > IRAM AT> FLASH | 71 | } > IRAM AT> LOAD_AREA |
63 | _datacopy = LOADADDR(.data) ; | 72 | _datacopy = LOADADDR(.data) ; |
64 | 73 | ||
65 | .stack : | 74 | .stack : |
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/button-target.h b/firmware/target/arm/s5l8700/ipodnano2g/button-target.h new file mode 100644 index 0000000000..67bdc72955 --- /dev/null +++ b/firmware/target/arm/s5l8700/ipodnano2g/button-target.h | |||
@@ -0,0 +1,78 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef _BUTTON_TARGET_H_ | ||
22 | #define _BUTTON_TARGET_H_ | ||
23 | |||
24 | #include <stdbool.h> | ||
25 | #include "config.h" | ||
26 | |||
27 | #define HAS_BUTTON_HOLD | ||
28 | |||
29 | bool button_hold(void); | ||
30 | void button_init_device(void); | ||
31 | int button_read_device(void); | ||
32 | |||
33 | void ipod_mini_button_int(void); | ||
34 | void ipod_3g_button_int(void); | ||
35 | void ipod_4g_button_int(void); | ||
36 | |||
37 | /* iPod specific button codes */ | ||
38 | |||
39 | #define BUTTON_SELECT 0x00000001 | ||
40 | #define BUTTON_MENU 0x00000002 | ||
41 | |||
42 | #define BUTTON_LEFT 0x00000004 | ||
43 | #define BUTTON_RIGHT 0x00000008 | ||
44 | #define BUTTON_SCROLL_FWD 0x00000010 | ||
45 | #define BUTTON_SCROLL_BACK 0x00000020 | ||
46 | |||
47 | #define BUTTON_PLAY 0x00000040 | ||
48 | |||
49 | #define BUTTON_MAIN (BUTTON_SELECT|BUTTON_MENU\ | ||
50 | |BUTTON_LEFT|BUTTON_RIGHT|BUTTON_SCROLL_FWD\ | ||
51 | |BUTTON_SCROLL_BACK|BUTTON_PLAY) | ||
52 | |||
53 | /* Remote control's buttons */ | ||
54 | #ifdef IPOD_ACCESSORY_PROTOCOL | ||
55 | #define BUTTON_RC_PLAY 0x00100000 | ||
56 | #define BUTTON_RC_STOP 0x00080000 | ||
57 | |||
58 | #define BUTTON_RC_LEFT 0x00040000 | ||
59 | #define BUTTON_RC_RIGHT 0x00020000 | ||
60 | #define BUTTON_RC_VOL_UP 0x00010000 | ||
61 | #define BUTTON_RC_VOL_DOWN 0x00008000 | ||
62 | |||
63 | #define BUTTON_REMOTE (BUTTON_RC_PLAY|BUTTON_RC_STOP\ | ||
64 | |BUTTON_RC_LEFT|BUTTON_RC_RIGHT\ | ||
65 | |BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN) | ||
66 | #else | ||
67 | #define BUTTON_REMOTE 0 | ||
68 | #endif | ||
69 | |||
70 | /* This is for later | ||
71 | #define BUTTON_SCROLL_TOUCH 0x00000200 | ||
72 | */ | ||
73 | |||
74 | |||
75 | #define POWEROFF_BUTTON BUTTON_PLAY | ||
76 | #define POWEROFF_COUNT 40 | ||
77 | |||
78 | #endif /* _BUTTON_TARGET_H_ */ | ||
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c new file mode 100644 index 0000000000..daf8869c9c --- /dev/null +++ b/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c | |||
@@ -0,0 +1,142 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2009 by ???? | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include "config.h" | ||
22 | |||
23 | #include "hwcompat.h" | ||
24 | #include "kernel.h" | ||
25 | #include "lcd.h" | ||
26 | #include "system.h" | ||
27 | #include "cpu.h" | ||
28 | |||
29 | /** globals **/ | ||
30 | |||
31 | static int xoffset; /* needed for flip */ | ||
32 | |||
33 | /*** hardware configuration ***/ | ||
34 | |||
35 | int lcd_default_contrast(void) | ||
36 | { | ||
37 | return 0x1f; | ||
38 | } | ||
39 | |||
40 | void lcd_set_contrast(int val) | ||
41 | { | ||
42 | } | ||
43 | |||
44 | void lcd_set_invert_display(bool yesno) | ||
45 | { | ||
46 | } | ||
47 | |||
48 | /* turn the display upside down (call lcd_update() afterwards) */ | ||
49 | void lcd_set_flip(bool yesno) | ||
50 | { | ||
51 | /* TODO: flip mode isn't working. The commands in the else part of | ||
52 | this function are how the original firmware inits the LCD */ | ||
53 | |||
54 | if (yesno) | ||
55 | { | ||
56 | xoffset = 132 - LCD_WIDTH; /* 132 colums minus the 128 we have */ | ||
57 | } | ||
58 | else | ||
59 | { | ||
60 | xoffset = 0; | ||
61 | } | ||
62 | } | ||
63 | |||
64 | |||
65 | |||
66 | void lcd_off(void) | ||
67 | { | ||
68 | } | ||
69 | |||
70 | void lcd_on(void) | ||
71 | { | ||
72 | } | ||
73 | |||
74 | /* LCD init */ | ||
75 | void lcd_init_device(void) | ||
76 | { | ||
77 | } | ||
78 | |||
79 | |||
80 | /*** Update functions ***/ | ||
81 | |||
82 | /* Performance function that works with an external buffer | ||
83 | note that by and bheight are in 8-pixel units! */ | ||
84 | void lcd_blit_mono(const unsigned char *data, int x, int by, int width, | ||
85 | int bheight, int stride) | ||
86 | { | ||
87 | /* Copy display bitmap to hardware */ | ||
88 | while (bheight--) | ||
89 | { | ||
90 | } | ||
91 | } | ||
92 | |||
93 | |||
94 | /* Performance function that works with an external buffer | ||
95 | note that by and bheight are in 8-pixel units! */ | ||
96 | void lcd_blit_grey_phase_blit(unsigned char *values, unsigned char *phases, | ||
97 | int x, int by, int width, int bheight, int stride) | ||
98 | { | ||
99 | (void)values; | ||
100 | (void)phases; | ||
101 | (void)x; | ||
102 | (void)by; | ||
103 | (void)width; | ||
104 | (void)bheight; | ||
105 | (void)stride; | ||
106 | } | ||
107 | |||
108 | /* Update the display. | ||
109 | This must be called after all other LCD functions that change the display. */ | ||
110 | void lcd_update(void) ICODE_ATTR; | ||
111 | void lcd_update(void) | ||
112 | { | ||
113 | int y; | ||
114 | |||
115 | /* Copy display bitmap to hardware */ | ||
116 | for (y = 0; y < LCD_FBHEIGHT; y++) | ||
117 | { | ||
118 | } | ||
119 | } | ||
120 | |||
121 | /* Update a fraction of the display. */ | ||
122 | void lcd_update_rect(int, int, int, int) ICODE_ATTR; | ||
123 | void lcd_update_rect(int x, int y, int width, int height) | ||
124 | { | ||
125 | int ymax; | ||
126 | |||
127 | /* The Y coordinates have to work on even 8 pixel rows */ | ||
128 | ymax = (y + height-1) >> 3; | ||
129 | y >>= 3; | ||
130 | |||
131 | if(x + width > LCD_WIDTH) | ||
132 | width = LCD_WIDTH - x; | ||
133 | if (width <= 0) | ||
134 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ | ||
135 | if(ymax >= LCD_FBHEIGHT) | ||
136 | ymax = LCD_FBHEIGHT-1; | ||
137 | |||
138 | /* Copy specified rectange bitmap to hardware */ | ||
139 | for (; y <= ymax; y++) | ||
140 | { | ||
141 | } | ||
142 | } | ||
diff --git a/tools/configure b/tools/configure index e543919ca6..42854fba79 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -275,6 +275,14 @@ arm940tbecc () { | |||
275 | gccchoice="4.0.3" | 275 | gccchoice="4.0.3" |
276 | } | 276 | } |
277 | 277 | ||
278 | arm940tcc () { | ||
279 | prefixtools arm-elf- | ||
280 | GCCOPTS="$CCOPTS -mcpu=arm940t -mlong-calls" | ||
281 | GCCOPTIMIZE="-fomit-frame-pointer" | ||
282 | endian="little" | ||
283 | gccchoice="4.0.3" | ||
284 | } | ||
285 | |||
278 | arm946cc () { | 286 | arm946cc () { |
279 | prefixtools arm-elf- | 287 | prefixtools arm-elf- |
280 | GCCOPTS="$CCOPTS -mcpu=arm9e -mlong-calls" | 288 | GCCOPTS="$CCOPTS -mcpu=arm9e -mlong-calls" |
@@ -769,27 +777,27 @@ cat <<EOF | |||
769 | 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G | 777 | 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G |
770 | 6) AV300 26) Mini 2G | 778 | 6) AV300 26) Mini 2G |
771 | ==Toshiba== 27) 1G, 2G | 779 | ==Toshiba== 27) 1G, 2G |
772 | ==Cowon/iAudio== 40) Gigabeat F | 780 | ==Cowon/iAudio== 40) Gigabeat F 28) Nano 2G |
773 | 30) X5/X5V/X5L 41) Gigabeat S ==SanDisk== | 781 | 30) X5/X5V/X5L 41) Gigabeat S |
774 | 31) M5/M5L 50) Sansa e200 | 782 | 31) M5/M5L ==SanDisk== |
775 | 32) 7 ==Olympus= 51) Sansa e200R | 783 | 32) 7 ==Olympus= 50) Sansa e200 |
776 | 33) D2 70) M:Robe 500 52) Sansa c200 | 784 | 33) D2 70) M:Robe 500 51) Sansa e200R |
777 | 34) M3/M3L 71) M:Robe 100 53) Sansa m200 | 785 | 34) M3/M3L 71) M:Robe 100 52) Sansa c200 |
778 | 54) Sansa c100 | 786 | 53) Sansa m200 |
779 | ==Creative== ==Philips== 55) Sansa Clip | 787 | ==Creative== ==Philips== 54) Sansa c100 |
780 | 90) Zen Vision:M 30GB 100) GoGear SA9200 56) Sansa e200v2 | 788 | 90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip |
781 | 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 57) Sansa m200v4 | 789 | 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2 |
782 | 92) Zen Vision HDD1830 58) Sansa Fuze | 790 | 92) Zen Vision HDD1830 57) Sansa m200v4 |
783 | 59) Sansa c200v2 | 791 | 58) Sansa Fuze |
784 | ==Onda== ==Meizu== 60) Sansa Clipv2 | 792 | ==Onda== ==Meizu== 59) Sansa c200v2 |
785 | 120) VX747 110) M6SL | 793 | 120) VX747 110) M6SL 60) Sansa Clipv2 |
786 | 121) VX767 111) M6SP ==Logik== | 794 | 121) VX767 111) M6SP |
787 | 122) VX747+ 112) M3 80) DAX 1GB MP3/DAB | 795 | 122) VX747+ 112) M3 ==Logik== |
788 | 123) VX777 | 796 | 123) VX777 80) DAX 1GB MP3/DAB |
789 | 797 | ||
790 | ==Samsung== ==Tatung== ==Lyre project== | 798 | ==Samsung== ==Tatung== |
791 | 140) YH-820 150) Elio TPJ-1022 130) Lyre proto 1 | 799 | 140) YH-820 150) Elio TPJ-1022 ==Lyre project== |
792 | 141) YH-920 | 800 | 141) YH-920 130) Lyre proto 1 |
793 | 142) YH-925 | 801 | 142) YH-925 |
794 | EOF | 802 | EOF |
795 | 803 | ||
@@ -1329,6 +1337,30 @@ fi | |||
1329 | t_model="1g2g" | 1337 | t_model="1g2g" |
1330 | ;; | 1338 | ;; |
1331 | 1339 | ||
1340 | 28|ipodnano2g) | ||
1341 | target_id=62 | ||
1342 | modelname="ipodnano2g" | ||
1343 | target="-DIPOD_NANO2G" | ||
1344 | memory=32 # always | ||
1345 | arm940tcc | ||
1346 | tool="$rootdir/tools/scramble -add=nn2g" | ||
1347 | bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" | ||
1348 | bmp2rb_native="$rootdir/tools/bmp2rb -f 6" | ||
1349 | output="rockbox.ipod" | ||
1350 | appextra="recorder:gui" | ||
1351 | plugins="yes" | ||
1352 | swcodec="yes" | ||
1353 | boottool="cp" | ||
1354 | bootoutput="bootloader-$modelname.bin" | ||
1355 | # toolset is the tools within the tools directory that we build for | ||
1356 | # this particular target. | ||
1357 | toolset=$ipodbitmaptools | ||
1358 | # architecture, manufacturer and model for the target-tree build | ||
1359 | t_cpu="arm" | ||
1360 | t_manufacturer="s5l8700" | ||
1361 | t_model="ipodnano2g" | ||
1362 | ;; | ||
1363 | |||
1332 | 30|x5) | 1364 | 30|x5) |
1333 | target_id=12 | 1365 | target_id=12 |
1334 | modelname="x5" | 1366 | modelname="x5" |