forked from len0rd/rockbox
New port: iPod Nano 3G
Currently, only a bootloader can be built successfully. The development bootloader is functional, it enables further progress on the port. This is a part of the large iPod Nano 3G and iPod Nano 4G support patch. Credit: Cástor Muñoz <cmvidal@gmail.com> Change-Id: Idf85e42334b0e0ae36f9ed273e2940d5d7736e34
This commit is contained in:
parent
96615af033
commit
d6cd237f80
24 changed files with 2458 additions and 68 deletions
109
tools/configure
vendored
109
tools/configure
vendored
|
|
@ -1678,49 +1678,49 @@ cat <<EOF
|
|||
40) Gigabeat F/X 27) 1G, 2G 51) Sansa e200R
|
||||
41) Gigabeat S 28) Nano 2G 52) Sansa c200
|
||||
29) Classic/6G 55) Sansa Clip
|
||||
==Olympus= 56) Sansa e200v2
|
||||
70) M:Robe 50 ==Creative== 57) Sansa m200v4
|
||||
71) M:Robe 100 89) Zen X-Fi Style 58) Sansa Fuze
|
||||
90) Zen Vision:M 30GB 59) Sansa c200v2
|
||||
==Philips== 91) Zen Vision:M 60GB 60) Sansa Clipv2
|
||||
100) GoGear SA9200 92) Zen Vision 61) Sansa View
|
||||
101) GoGear HDD1630/ 93) Zen X-Fi2 62) Sansa Clip+
|
||||
HDD1830 94) Zen X-Fi3 63) Sansa Fuze v2
|
||||
102) GoGear HDD6330 95) Zen V 64) Sansa Fuze+
|
||||
96) Zen X-Fi 65) Sansa Clip Zip
|
||||
==Meizu== 97) Zen Mozaic 66) Sansa Connect
|
||||
110) M6SL 98) Zen
|
||||
111) M6SP ==Lyre project==
|
||||
112) M3 ==Onda== 130) Lyre proto 1
|
||||
120) VX747 131) Mini2440
|
||||
==Samsung== 121) VX767
|
||||
140) YH-820 122) VX747+ ==Packard Bell==
|
||||
141) YH-920 123) VX777 160) Vibe 500
|
||||
142) YH-925
|
||||
143) YP-S3 ==MPIO== ==ROCKCHIP==
|
||||
170) HD200 180) rk27xx generic
|
||||
==HiFiMAN== 171) HD300
|
||||
190) HM-60x ==HiFi E.T.==
|
||||
191) HM-801 ==Application== 210) MA9
|
||||
200) SDL 211) MA9C
|
||||
==Sony== 201) Android 212) MA8
|
||||
219) NWZ-E350 series 202) Nokia N8xx 213) MA8C
|
||||
220) NWZ-E370/E380 series 203) Nokia N900
|
||||
221) NWZ-E360 series 204) Pandora ==IHIFI==
|
||||
222) NWZ-E450 series 205) Samsung YP-R0 230) 760
|
||||
223) NWZ-E460 series 206) Android MIPS 231) 960
|
||||
224) NWZ-E470 series 207) Android x86 250) 770C
|
||||
225) NWZ-E580 series 208) Samsung YP-R1 251) 770
|
||||
226) NWZ-A10 series 252) 800
|
||||
227) NW-A20 series ==iBasso==
|
||||
228) NWZ-A860 series 232) DX50 ==AgpTek==
|
||||
229) NWZ-S750 series 233) DX90 240) Rocker
|
||||
|
||||
==FiiO== ==xDuoo== ==AIGO==
|
||||
244) M3K Linux 241) X3 245) Eros Q / K
|
||||
246) M3K baremetal 242) X3II 247) Eros Q / K native
|
||||
243) X20 (hw1/hw2 bl, all hw rb)
|
||||
==Shanling== 248) Eros Q / K native
|
||||
==Olympus= 80) Nano 3G (WIP) 56) Sansa e200v2
|
||||
70) M:Robe 50 57) Sansa m200v4
|
||||
71) M:Robe 100 ==Creative== 58) Sansa Fuze
|
||||
89) Zen X-Fi Style 59) Sansa c200v2
|
||||
==Philips== 90) Zen Vision:M 30GB 60) Sansa Clipv2
|
||||
100) GoGear SA9200 91) Zen Vision:M 60GB 61) Sansa View
|
||||
101) GoGear HDD1630/ 92) Zen Vision 62) Sansa Clip+
|
||||
HDD1830 93) Zen X-Fi2 63) Sansa Fuze v2
|
||||
102) GoGear HDD6330 94) Zen X-Fi3 64) Sansa Fuze+
|
||||
95) Zen V 65) Sansa Clip Zip
|
||||
==Meizu== 96) Zen X-Fi 66) Sansa Connect
|
||||
110) M6SL 97) Zen Mozaic
|
||||
111) M6SP 98) Zen ==Lyre project==
|
||||
112) M3 130) Lyre proto 1
|
||||
==Onda== 131) Mini2440
|
||||
==Samsung== 120) VX747
|
||||
140) YH-820 121) VX767 ==Packard Bell==
|
||||
141) YH-920 122) VX747+ 160) Vibe 500
|
||||
142) YH-925 123) VX777
|
||||
143) YP-S3 ==ROCKCHIP==
|
||||
==MPIO== 180) rk27xx generic
|
||||
==HiFiMAN== 170) HD200
|
||||
190) HM-60x 171) HD300 ==HiFi E.T.==
|
||||
191) HM-801 210) MA9
|
||||
==Application== 211) MA9C
|
||||
==Sony== 200) SDL 212) MA8
|
||||
219) NWZ-E350 series 201) Android 213) MA8C
|
||||
220) NWZ-E370/E380 series 202) Nokia N8xx
|
||||
221) NWZ-E360 series 203) Nokia N900 ==IHIFI==
|
||||
222) NWZ-E450 series 204) Pandora 230) 760
|
||||
223) NWZ-E460 series 205) Samsung YP-R0 231) 960
|
||||
224) NWZ-E470 series 206) Android MIPS 250) 770C
|
||||
225) NWZ-E580 series 207) Android x86 251) 770
|
||||
226) NWZ-A10 series 208) Samsung YP-R1 252) 800
|
||||
227) NW-A20 series
|
||||
228) NWZ-A860 series ==iBasso== ==AgpTek==
|
||||
229) NWZ-S750 series 232) DX50 240) Rocker
|
||||
233) DX90
|
||||
==FiiO== ==AIGO==
|
||||
244) M3K Linux ==xDuoo== 245) Eros Q / K
|
||||
246) M3K baremetal 241) X3 247) Eros Q / K native
|
||||
242) X3II (hw1/hw2 bl, all hw rb)
|
||||
==Shanling== 243) X20 248) Eros Q / K native
|
||||
260) Q1 (hw3 bl only)
|
||||
249) Eros Q / K native
|
||||
(hw4 bl only)
|
||||
|
|
@ -2630,6 +2630,29 @@ fi
|
|||
t_model="mrobe-100"
|
||||
;;
|
||||
|
||||
80|ipodnano3g)
|
||||
target_id=117
|
||||
modelname="ipodnano3g"
|
||||
target="IPOD_NANO3G"
|
||||
memory=32 # always
|
||||
arm926ejscc
|
||||
tool="$rootdir/tools/scramble -add=nn3g"
|
||||
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
||||
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
||||
output="rockbox.ipod"
|
||||
appextra="recorder:gui:radio"
|
||||
plugins="yes"
|
||||
swcodec="yes"
|
||||
bootoutput="bootloader-$modelname.ipod"
|
||||
# toolset is the tools within the tools directory that we build for
|
||||
# this particular target.
|
||||
toolset=$ipodbitmaptools
|
||||
# architecture, manufacturer and model for the target-tree build
|
||||
t_cpu="arm"
|
||||
t_manufacturer="s5l8702"
|
||||
t_model="ipodnano3g"
|
||||
;;
|
||||
|
||||
89|creativezenxfistyle)
|
||||
target_id=94
|
||||
modelname="creativezenxfistyle"
|
||||
|
|
|
|||
|
|
@ -107,7 +107,8 @@ void usage(void)
|
|||
"\t 747p, x777, nn2g, m244, cli+, fuz2, hd20, hd30,\n"
|
||||
"\t ip6g, rk27, clzp, zxf2, zxf3, fuz+, e370, e360,\n"
|
||||
"\t zxfi, zmoz, zen, zenv, zxfs, e450, e460,\n"
|
||||
"\t e470, e580, a10, a20, a860, s750, e350, xdx3)\n");
|
||||
"\t e470, e580, a10, a20, a860, s750, e350, xdx3,\n"
|
||||
"\t nn3g)\n");
|
||||
printf("\nNo option results in nothing being done.\n");
|
||||
|
||||
exit(1);
|
||||
|
|
@ -231,8 +232,8 @@ int main (int argc, char** argv)
|
|||
modelnum = 25;
|
||||
else if (!strcmp(&argv[1][5], "m200"))
|
||||
modelnum = 29;
|
||||
else if(!strcmp(&argv[1][5], "c100"))
|
||||
modelnum = 30;
|
||||
else if(!strcmp(&argv[1][5], "c100"))
|
||||
modelnum = 30;
|
||||
else if(!strcmp(&argv[1][5], "1630")) /* Philips HDD1630 */
|
||||
modelnum = 31;
|
||||
else if (!strcmp(&argv[1][5], "i7"))
|
||||
|
|
@ -335,6 +336,8 @@ int main (int argc, char** argv)
|
|||
modelnum = 115;
|
||||
else if (!strcmp(&argv[1][5], "erosqnative")) /* Aigo Eros Q Native */
|
||||
modelnum = 116;
|
||||
else if (!strcmp(&argv[1][5], "nn3g")) /* iPod Nano 3rd Gen */
|
||||
modelnum = 117;
|
||||
else {
|
||||
fprintf(stderr, "unsupported model: %s\n", &argv[1][5]);
|
||||
return 2;
|
||||
|
|
@ -440,7 +443,7 @@ int main (int argc, char** argv)
|
|||
int mi4magic;
|
||||
char model[4] = "";
|
||||
char type[4] = "";
|
||||
|
||||
|
||||
if(!strcmp(&argv[1][4], "v2")) {
|
||||
mi4magic = MI4_MAGIC_DEFAULT;
|
||||
version = 0x00010201;
|
||||
|
|
@ -460,12 +463,12 @@ int main (int argc, char** argv)
|
|||
|
||||
iname = argv[2];
|
||||
oname = argv[3];
|
||||
|
||||
|
||||
if(!strncmp(argv[2], "-model=", 7)) {
|
||||
iname = argv[3];
|
||||
oname = argv[4];
|
||||
strncpy(model, &argv[2][7], 4);
|
||||
|
||||
|
||||
if(!strncmp(argv[3], "-type=", 6)) {
|
||||
iname = argv[4];
|
||||
oname = argv[5];
|
||||
|
|
@ -475,7 +478,7 @@ int main (int argc, char** argv)
|
|||
|
||||
return mi4_encode(iname, oname, version, mi4magic, model, type);
|
||||
}
|
||||
|
||||
|
||||
/* open file */
|
||||
file = fopen(iname,"rb");
|
||||
if (!file) {
|
||||
|
|
@ -485,9 +488,9 @@ int main (int argc, char** argv)
|
|||
fseek(file,0,SEEK_END);
|
||||
length = ftell(file);
|
||||
length = (length + 3) & ~3; /* Round up to nearest 4 byte boundary */
|
||||
|
||||
|
||||
fseek(file,0,SEEK_SET);
|
||||
|
||||
fseek(file,0,SEEK_SET);
|
||||
inbuf = malloc(length);
|
||||
if(method == add)
|
||||
outbuf = malloc(length + 8);
|
||||
|
|
@ -582,10 +585,10 @@ int main (int argc, char** argv)
|
|||
return -1;
|
||||
}
|
||||
fclose(file);
|
||||
|
||||
|
||||
free(inbuf);
|
||||
free(outbuf);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -597,7 +600,7 @@ static int iaudio_encode(char *iname, char *oname, char *idstring)
|
|||
unsigned char *outbuf;
|
||||
int i;
|
||||
unsigned char sum = 0;
|
||||
|
||||
|
||||
file = fopen(iname, "rb");
|
||||
if (!file) {
|
||||
perror(iname);
|
||||
|
|
@ -605,8 +608,8 @@ static int iaudio_encode(char *iname, char *oname, char *idstring)
|
|||
}
|
||||
fseek(file,0,SEEK_END);
|
||||
length = ftell(file);
|
||||
|
||||
fseek(file,0,SEEK_SET);
|
||||
|
||||
fseek(file,0,SEEK_SET);
|
||||
outbuf = malloc(length+0x1030);
|
||||
|
||||
if ( !outbuf ) {
|
||||
|
|
@ -619,10 +622,10 @@ static int iaudio_encode(char *iname, char *oname, char *idstring)
|
|||
perror(iname);
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
||||
memset(outbuf, 0, 0x1030);
|
||||
strcpy((char *)outbuf, idstring);
|
||||
memcpy(outbuf+0x20, iaudio_bl_flash,
|
||||
memcpy(outbuf+0x20, iaudio_bl_flash,
|
||||
BMPWIDTH_iaudio_bl_flash * (BMPHEIGHT_iaudio_bl_flash/8) * 2);
|
||||
short2be(BMPWIDTH_iaudio_bl_flash, &outbuf[0x10]);
|
||||
short2be((BMPHEIGHT_iaudio_bl_flash/8), &outbuf[0x12]);
|
||||
|
|
@ -641,7 +644,7 @@ static int iaudio_encode(char *iname, char *oname, char *idstring)
|
|||
perror(oname);
|
||||
return -3;
|
||||
}
|
||||
|
||||
|
||||
len = fwrite(outbuf, 1, length+0x1030, file);
|
||||
if(len < (size_t)length) {
|
||||
perror(oname);
|
||||
|
|
@ -653,14 +656,14 @@ static int iaudio_encode(char *iname, char *oname, char *idstring)
|
|||
}
|
||||
|
||||
|
||||
/* Create an ipod firmware partition image
|
||||
/* Create an ipod firmware partition image
|
||||
|
||||
fw_ver = 2 for 3rd Gen ipods, 3 for all later ipods including 5g.
|
||||
|
||||
This function doesn't yet handle the Broadcom resource image for the 5g,
|
||||
so the resulting images won't be usable.
|
||||
|
||||
This has also only been tested on an ipod Photo
|
||||
This has also only been tested on an ipod Photo
|
||||
*/
|
||||
|
||||
static int ipod_encode(char *iname, char *oname, int fw_ver, bool fake_rsrc)
|
||||
|
|
@ -699,7 +702,7 @@ static int ipod_encode(char *iname, char *oname, int fw_ver, bool fake_rsrc)
|
|||
}
|
||||
fseek(file,0,SEEK_END);
|
||||
length = ftell(file);
|
||||
|
||||
|
||||
fseek(file,0,SEEK_SET);
|
||||
|
||||
bufsize=(length+0x4600);
|
||||
|
|
@ -721,7 +724,7 @@ static int ipod_encode(char *iname, char *oname, int fw_ver, bool fake_rsrc)
|
|||
}
|
||||
fclose(file);
|
||||
|
||||
/* Calculate checksum for later use in header */
|
||||
/* Calculate checksum for later use in header */
|
||||
for(i = 0x4600; i < 0x4600+length;i++)
|
||||
sum += outbuf[i];
|
||||
|
||||
|
|
@ -770,7 +773,7 @@ static int ipod_encode(char *iname, char *oname, int fw_ver, bool fake_rsrc)
|
|||
perror(oname);
|
||||
return -3;
|
||||
}
|
||||
|
||||
|
||||
len = fwrite(outbuf, 1, length+0x4600, file);
|
||||
if(len < (size_t)length) {
|
||||
perror(oname);
|
||||
|
|
@ -797,7 +800,7 @@ static int ccpmp_encode(char *iname, char *oname)
|
|||
}
|
||||
fseek(file,0,SEEK_END);
|
||||
length = ftell(file);
|
||||
|
||||
|
||||
fseek(file,0,SEEK_SET);
|
||||
|
||||
outbuf = malloc(CCPMP_SIZE);
|
||||
|
|
@ -825,7 +828,7 @@ static int ccpmp_encode(char *iname, char *oname)
|
|||
perror(oname);
|
||||
return -3;
|
||||
}
|
||||
|
||||
|
||||
len = fwrite(outbuf, 1, CCPMP_SIZE, file);
|
||||
if(len < (size_t)length) {
|
||||
perror(oname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue