Override manually selected arch/arch_version in simcc().
[maemo-rb.git] / tools / configure
blobf8fd35773e39a8895682c2a04a296eadc49c948c
1 #!/bin/sh
2 # __________ __ ___.
3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 # \/ \/ \/ \/ \/
10 # global CC options for all platforms
11 CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
13 # global LD options for all platforms
14 GLOBAL_LDOPTS=""
16 extradefines=""
17 use_logf="#undef ROCKBOX_HAS_LOGF"
18 use_bootchart="#undef DO_BOOTCHART"
19 use_logf_serial="#undef LOGF_SERIAL"
21 scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
23 rbdir="/.rockbox"
24 bindir=
25 libdir=
26 sharedir=
28 thread_support="ASSEMBLER_THREADS"
29 app_lcd_width=
30 app_lcd_height=
31 app_lcd_orientation=
33 # Properly retain command line arguments containing spaces
34 cmdline=
35 for arg in "$@"; do
36 case "$arg" in
37 *\ *) cmdline="$cmdline \"$arg\"";;
38 *) cmdline="$cmdline $arg";;
39 esac
40 done
43 # Begin Function Definitions
45 input() {
46 read response
47 echo $response
50 prefixtools () {
51 prefix="$1"
52 CC=${prefix}gcc
53 CPP=${prefix}cpp
54 WINDRES=${prefix}windres
55 DLLTOOL=${prefix}dlltool
56 DLLWRAP=${prefix}dllwrap
57 RANLIB=${prefix}ranlib
58 LD=${prefix}ld
59 AR=${prefix}ar
60 AS=${prefix}as
61 OC=${prefix}objcopy
64 app_set_paths () {
65 # setup files and paths depending on the platform
66 if [ -z "$ARG_PREFIX" ]; then
67 sharedir="/usr/local/share/rockbox"
68 bindir="/usr/local/bin"
69 libdir="/usr/local/lib"
70 else
71 if [ -d "$ARG_PREFIX" ]; then
72 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
73 ARG_PREFIX=`realpath $ARG_PREFIX`
74 if [ "0" != "$?" ]; then
75 echo "ERROR: Could not get prefix path (is realpath installed?)."
76 exit
79 sharedir="$ARG_PREFIX/share/rockbox"
80 bindir="$ARG_PREFIX/bin"
81 libdir="$ARG_PREFIX/lib"
82 else
83 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
84 exit
89 # Set the application LCD size according to the following priorities:
90 # 1) If --lcdwidth and --lcdheight are set, use them
91 # 2) If a size is passed to the app_set_lcd_size() function, use that
92 # 3) Otherwise ask the user
93 app_set_lcd_size () {
94 if [ -z "$ARG_LCDWIDTH" ]; then
95 ARG_LCDWIDTH=$1
97 if [ -z "$ARG_LCDHEIGHT" ]; then
98 ARG_LCDHEIGHT=$2
101 echo "Enter the LCD width (default: 320)"
102 if [ -z "$ARG_LCDWIDTH" ]; then
103 app_lcd_width=`input`
104 else
105 app_lcd_width="$ARG_LCDWIDTH"
107 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
108 echo "Enter the LCD height (default: 480)"
109 if [ -z "$ARG_LCDHEIGHT" ]; then
110 app_lcd_height=`input`
111 else
112 app_lcd_height="$ARG_LCDHEIGHT"
114 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
115 if [ $app_lcd_width -gt $app_lcd_height ]; then
116 lcd_orientation="landscape"
117 else
118 lcd_orientation="portrait"
120 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
121 ARG_LCDWIDTH=$app_lcd_width
122 ARG_LCDHEIGHT=$app_lcd_height
124 app_lcd_width="#define LCD_WIDTH $app_lcd_width"
125 app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
128 findarmgcc() {
129 if [ "$ARG_ARM_EABI" != "0" ]; then
130 prefixtools arm-elf-eabi-
131 gccchoice="4.4.4"
132 else
133 prefixtools arm-elf-
134 gccchoice="4.0.3"
138 # scan the $PATH for the given command
139 findtool(){
140 file="$1"
142 IFS=":"
143 for path in $PATH
145 # echo "checks for $file in $path" >&2
146 if test -f "$path/$file"; then
147 echo "$path/$file"
148 return
150 done
151 # check whether caller wants literal return value if not found
152 if [ "$2" = "--lit" ]; then
153 echo "$file"
157 # scan the $PATH for sdl-config - check whether for a (cross-)win32
158 # sdl as requested
159 findsdl(){
160 # sdl-config might (not) be prefixed for cross compiles so try both.
161 files="${CROSS_COMPILE}sdl-config:sdl-config"
162 winbuild="$1"
164 IFS=":"
165 for file in $files
167 for path in $PATH
169 #echo "checks for $file in $path" >&2
170 if test -f "$path/$file"; then
171 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
172 if [ "yes" = "${winbuild}" ]; then
173 echo "$path/$file"
174 return
176 else
177 if [ "yes" != "${winbuild}" ]; then
178 echo "$path/$file"
179 return
183 done
184 done
187 # check for availability of sigaltstack to support our thread engine
188 check_sigaltstack() {
189 cat >$tmpdir/check_threads.c <<EOF
190 #include <signal.h>
191 int main(int argc, char **argv)
193 #ifndef NULL
194 #define NULL (void*)0
195 #endif
196 sigaltstack(NULL, NULL);
197 return 0;
200 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 1> /dev/null
201 result=$?
202 rm -rf $tmpdir/check_threads*
203 echo $result
206 # check for availability of Fiber on Win32 to support our thread engine
207 check_fiber() {
208 cat >$tmpdir/check_threads.c <<EOF
209 #include <windows.h>
210 int main(int argc, char **argv)
212 ConvertThreadToFiber(NULL);
213 return 0;
216 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 2>/dev/null
217 result=$?
218 rm -rf $tmpdir/check_threads*
219 echo $result
222 simcc () {
224 # default tool setup for native building
225 prefixtools "$CROSS_COMPILE"
226 ARG_ARM_THUMB=0 # can't use thumb in native builds
228 # unset arch if already set shcc() and friends
229 arch=
230 arch_version=
232 app_type=$1
233 winbuild=""
234 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
236 GCCOPTS="$GCCOPTS -fno-builtin -g"
237 GCCOPTIMIZE=''
238 LDOPTS='-lm' # button-sdl.c uses sqrt()
239 sigaltstack=""
240 fibers=""
241 endian="" # endianess of the dap doesnt matter here
243 # default output binary name, don't override app_get_platform()
244 if [ "$app_type" != "sdl-app" ]; then
245 output="rockboxui"
248 # default share option, override below if needed
249 SHARED_LDFLAG="-shared"
250 SHARED_CFLAGS="-fPIC -fvisibility=hidden"
252 if [ "$win32crosscompile" = "yes" ]; then
253 # We are crosscompiling
254 # add cross-compiler option(s)
255 LDOPTS="$LDOPTS -mconsole"
256 output="$output.exe"
257 winbuild="yes"
258 CROSS_COMPILE=${CROSS_COMPILE:-"i586-mingw32msvc-"}
259 SHARED_CFLAGS=''
260 prefixtools "$CROSS_COMPILE"
261 fibers=`check_fiber`
262 endian="little" # windows is little endian
263 echo "Enabling MMX support"
264 GCCOPTS="$GCCOPTS -mmmx"
265 else
266 case $uname in
267 CYGWIN*)
268 echo "Cygwin host detected"
270 fibers=`check_fiber`
271 LDOPTS="$LDOPTS -mconsole"
272 output="$output.exe"
273 winbuild="yes"
274 SHARED_CFLAGS=''
277 MINGW*)
278 echo "MinGW host detected"
280 fibers=`check_fiber`
281 LDOPTS="$LDOPTS -mconsole"
282 output="$output.exe"
283 winbuild="yes"
286 Linux)
287 sigaltstack=`check_sigaltstack`
288 echo "Linux host detected"
289 LDOPTS="$LDOPTS -ldl"
292 FreeBSD)
293 sigaltstack=`check_sigaltstack`
294 echo "FreeBSD host detected"
295 LDOPTS="$LDOPTS -ldl"
298 Darwin)
299 sigaltstack=`check_sigaltstack`
300 echo "Darwin host detected"
301 LDOPTS="$LDOPTS -ldl"
302 SHARED_LDFLAG="-dynamiclib -Wl\,-single_module"
305 SunOS)
306 sigaltstack=`check_sigaltstack`
307 echo "*Solaris host detected"
309 GCCOPTS="$GCCOPTS -fPIC"
310 LDOPTS="$LDOPTS -ldl"
314 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
315 exit 1
317 esac
320 if [ "$winbuild" != "yes" ]; then
321 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
322 if [ "`uname -m`" = "i686" ]; then
323 echo "Enabling MMX support"
324 GCCOPTS="$GCCOPTS -mmmx"
328 sdl=`findsdl $winbuild`
330 if [ -n `echo $app_type | grep "sdl"` ]; then
331 if [ -z "$sdl" ]; then
332 echo "configure didn't find sdl-config, which indicates that you"
333 echo "don't have SDL (properly) installed. Please correct and"
334 echo "re-run configure!"
335 exit 2
336 else
337 # generic sdl-config checker
338 GCCOPTS="$GCCOPTS `$sdl --cflags`"
339 LDOPTS="$LDOPTS `$sdl --libs`"
344 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
345 # x86_64 supports MMX by default
347 if [ "$endian" = "" ]; then
348 id=$$
349 cat >$tmpdir/conftest-$id.c <<EOF
350 #include <stdio.h>
351 int main(int argc, char **argv)
353 int var=0;
354 char *varp = (char *)&var;
355 *varp=1;
357 printf("%d\n", var);
358 return 0;
361 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
362 # when cross compiling, the endianess cannot be detected because the above program doesn't run
363 # on the local machine. assume little endian but print a warning
364 endian=`$tmpdir/conftest-$id 2> /dev/null`
365 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
366 # big endian
367 endian="big"
368 else
369 # little endian
370 endian="little"
374 if [ "$CROSS_COMPILE" != "" ]; then
375 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
378 if [ "$app_type" = "sdl-sim" ]; then
379 echo "Simulator environment deemed $endian endian"
380 elif [ "$app_type" = "sdl-app" ]; then
381 echo "Application environment deemed $endian endian"
382 elif [ "$app_type" = "checkwps" ]; then
383 echo "CheckWPS environment deemed $endian endian"
386 # use wildcard here to make it work even if it was named *.exe like
387 # on cygwin
388 rm -f $tmpdir/conftest-$id*
390 thread_support=
391 if [ -z "$ARG_THREAD_SUPPORT" ] || [ "$ARG_THREAD_SUPPORT" = "0" ]; then
392 if [ "$sigaltstack" = "0" ]; then
393 thread_support="HAVE_SIGALTSTACK_THREADS"
394 LDOPTS="$LDOPTS -lpthread" # pthread needed
395 echo "Selected sigaltstack threads"
396 elif [ "$fibers" = "0" ]; then
397 thread_support="HAVE_WIN32_FIBER_THREADS"
398 echo "Selected Win32 Fiber threads"
402 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
403 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
404 thread_support="HAVE_SDL_THREADS"
405 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
406 echo "Selected SDL threads"
407 else
408 echo "WARNING: Falling back to SDL threads"
414 # functions for setting up cross-compiler names and options
415 # also set endianess and what the exact recommended gcc version is
416 # the gcc version should most likely match what versions we build with
417 # rockboxdev.sh
419 shcc () {
420 prefixtools sh-elf-
421 GCCOPTS="$CCOPTS -m1"
422 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
423 endian="big"
424 gccchoice="4.0.3"
427 calmrisccc () {
428 prefixtools calmrisc16-unknown-elf-
429 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
430 GCCOPTIMIZE="-fomit-frame-pointer"
431 endian="big"
434 coldfirecc () {
435 prefixtools m68k-elf-
436 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
437 GCCOPTIMIZE="-fomit-frame-pointer"
438 endian="big"
439 gccchoice="4.5.2"
442 arm7tdmicc () {
443 findarmgcc
444 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
445 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
446 GCCOPTS="$GCCOPTS -mlong-calls"
448 GCCOPTIMIZE="-fomit-frame-pointer"
449 endian="little"
452 arm9tdmicc () {
453 findarmgcc
454 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
455 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
456 GCCOPTS="$GCCOPTS -mlong-calls"
458 GCCOPTIMIZE="-fomit-frame-pointer"
459 endian="little"
462 arm940tbecc () {
463 findarmgcc
464 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
465 if test "$ARG_ARM_EABI" = "0"; then
466 GCCOPTS="$GCCOPTS -mlong-calls"
468 GCCOPTIMIZE="-fomit-frame-pointer"
469 endian="big"
472 arm940tcc () {
473 findarmgcc
474 GCCOPTS="$CCOPTS -mcpu=arm940t"
475 if test "$ARG_ARM_EABI" = "0"; then
476 GCCOPTS="$GCCOPTS -mlong-calls"
478 GCCOPTIMIZE="-fomit-frame-pointer"
479 endian="little"
482 arm946cc () {
483 findarmgcc
484 GCCOPTS="$CCOPTS -mcpu=arm9e"
485 if test "$ARG_ARM_EABI" = "0"; then
486 GCCOPTS="$GCCOPTS -mlong-calls"
488 GCCOPTIMIZE="-fomit-frame-pointer"
489 endian="little"
492 arm926ejscc () {
493 findarmgcc
494 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
495 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
496 GCCOPTS="$GCCOPTS -mlong-calls"
498 GCCOPTIMIZE="-fomit-frame-pointer"
499 endian="little"
502 arm1136jfscc () {
503 findarmgcc
504 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
505 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
506 GCCOPTS="$GCCOPTS -mlong-calls"
508 GCCOPTIMIZE="-fomit-frame-pointer"
509 endian="little"
512 arm1176jzscc () {
513 findarmgcc
514 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
515 if test "$ARG_ARM_EABI" = "0"; then
516 GCCOPTS="$GCCOPTS -mlong-calls"
518 GCCOPTIMIZE="-fomit-frame-pointer"
519 endian="little"
522 arm7ejscc () {
523 findarmgcc
524 GCCOPTS="$CCOPTS -march=armv5te"
525 GCCOPTIMIZE="-fomit-frame-pointer"
526 endian="little"
529 mipselcc () {
530 arch="mips"
531 arch_version=32 # FIXME: autodetect version (32 or 64)
532 prefixtools mipsel-elf-
533 # mips is predefined, but we want it for paths. use __mips instead
534 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
535 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
536 GCCOPTIMIZE="-fomit-frame-pointer"
537 endian="little"
538 gccchoice="4.1.2"
541 maemocc () {
542 # Scratchbox sets up "gcc" based on the active target
543 prefixtools ""
545 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
546 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
547 GCCOPTIMIZE=''
548 LDOPTS="-lm -ldl $LDOPTS"
549 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
550 SHARED_LDFLAG="-shared"
551 SHARED_CFLAGS=''
552 endian="little"
553 thread_support="HAVE_SIGALTSTACK_THREADS"
555 is_n900=0
556 # Determine maemo version
557 if pkg-config --atleast-version=5 maemo-version; then
558 if [ "$1" == "4" ]; then
559 echo "ERROR: Maemo 4 SDK required."
560 exit 1
562 extradefines="$extradefines -DMAEMO5"
563 echo "Found N900 maemo version"
564 is_n900=1
565 elif pkg-config --atleast-version=4 maemo-version; then
566 if [ "$1" == "5" ]; then
567 echo "ERROR: Maemo 5 SDK required."
568 exit 1
570 extradefines="$extradefines -DMAEMO4"
571 echo "Found N8xx maemo version"
572 else
573 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
574 exit 1
577 # SDL
578 if [ $is_n900 -eq 1 ]; then
579 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
580 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
581 else
582 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
583 LDOPTS="$LDOPTS `sdl-config --libs`"
586 # glib and libosso support
587 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
588 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
590 # libhal support: Battery monitoring
591 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
592 LDOPTS="$LDOPTS `pkg-config --libs hal`"
594 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
595 if [ $is_n900 -eq 1 ]; then
596 # gstreamer support: Audio output.
597 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
598 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
600 # N900 specific: libplayback support
601 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
602 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
604 # N900 specific: Enable ARMv7 NEON support
605 if sb-conf show -A |grep -q -i arm; then
606 echo "Detected ARM target"
607 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
608 extradefines="$extradefines -DMAEMO_ARM_BUILD"
609 else
610 echo "Detected x86 target"
612 else
613 # N8xx specific: Enable armv5te instructions
614 if sb-conf show -A |grep -q -i arm; then
615 echo "Detected ARM target"
616 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
617 extradefines="$extradefines -DMAEMO_ARM_BUILD"
618 else
619 echo "Detected x86 target"
624 pandoracc () {
625 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
626 # You have to use the sebt3 toolchain:
627 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
629 PNDSDK="/usr/local/angstrom/arm"
630 if [ ! -x $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc ]; then
631 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
632 exit
635 PATH=$PNDSDK/bin:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi/usr/bin
636 PKG_CONFIG_PATH=$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib/pkgconfig
637 LDOPTS="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
638 PKG_CONFIG="pkg-config"
640 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
641 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
642 GCCOPTIMIZE=''
643 LDOPTS="-lm -ldl $LDOPTS"
644 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
645 SHARED_LDFLAG="-shared"
646 SHARED_CFLAGS=''
647 endian="little"
648 thread_support="HAVE_SIGALTSTACK_THREADS"
650 # Include path
651 GCCOPTS="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
653 # Set up compiler
654 gccchoice="4.3.3"
655 prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
657 # Detect SDL
658 GCCOPTS="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
659 LDOPTS="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
661 # Compiler options
662 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
663 GCCOPTS="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
664 GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant"
667 ypr0cc () {
669 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
670 GCCOPTIMIZE=''
671 LDOPTS="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
672 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
673 SHARED_LDFLAG="-shared"
674 SHARED_CFLAGS=''
675 endian="little"
676 thread_support="HAVE_SIGALTSTACK_THREADS"
677 app_type="ypr0"
679 # Include path
680 GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
682 # Set up compiler
683 gccchoice="4.4.6"
684 prefixtools "arm-ypr0-linux-gnueabi-"
687 androidcc () {
688 if [ -z "$ANDROID_SDK_PATH" ]; then
689 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
690 echo "environment variable point to the root directory of the Android SDK."
691 exit
693 if [ -z "$ANDROID_NDK_PATH" ]; then
694 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
695 echo "environment variable point to the root directory of the Android NDK."
696 exit
698 buildhost=$(uname | tr "[:upper:]" "[:lower:]")
699 gccchoice="4.4.3"
700 gcctarget="arm-linux-androideabi-"
701 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
702 PATH=$PATH:$gccprefix/bin
703 prefixtools $gcctarget
704 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
705 GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
706 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
707 GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack"
708 LDOPTS="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
709 endian="little"
710 SHARED_LDFLAG="-shared"
713 whichadvanced () {
714 atype=`echo "$1" | cut -c 2-`
715 ##################################################################
716 # Prompt for specific developer options
718 if [ "$atype" ]; then
719 interact=
720 else
721 interact=1
722 echo ""
723 printf "Enter your developer options (press only enter when done)\n\
724 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
725 (T)est plugins, S(m)all C lib, Logf to Ser(i)al port:"
726 if [ "$modelname" = "archosplayer" ]; then
727 printf ", Use (A)TA poweroff"
729 if [ "$t_model" = "ondio" ]; then
730 printf ", (B)acklight MOD"
732 if [ "$modelname" = "iaudiom5" ]; then
733 printf ", (F)M radio MOD"
735 if [ "$modelname" = "iriverh120" ]; then
736 printf ", (R)TC MOD"
738 echo ""
741 cont=1
742 while [ $cont = "1" ]; do
744 if [ "$interact" ]; then
745 option=`input`
746 else
747 option=`echo "$atype" | cut -c 1`
750 case $option in
751 [Dd])
752 if [ "yes" = "$profile" ]; then
753 echo "Debug is incompatible with profiling"
754 else
755 echo "DEBUG build enabled"
756 use_debug="yes"
759 [Ll])
760 echo "logf() support enabled"
761 logf="yes"
763 [Mm])
764 echo "Using Rockbox' small C library"
765 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
767 [Tt])
768 echo "Including test plugins"
769 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
771 [Cc])
772 echo "bootchart enabled (logf also enabled)"
773 bootchart="yes"
774 logf="yes"
776 [Ii])
777 echo "Logf to serial port enabled (logf also enabled)"
778 logf="yes"
779 logf_serial="yes"
781 [Ss])
782 echo "Simulator build enabled"
783 simulator="yes"
785 [Pp])
786 if [ "yes" = "$use_debug" ]; then
787 echo "Profiling is incompatible with debug"
788 else
789 echo "Profiling support is enabled"
790 profile="yes"
793 [Vv])
794 echo "Voice build selected"
795 voice="yes"
797 [Aa])
798 if [ "$modelname" = "archosplayer" ]; then
799 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
800 echo "ATA power off enabled"
803 [Bb])
804 if [ "$t_model" = "ondio" ]; then
805 have_backlight="#define HAVE_BACKLIGHT"
806 echo "Backlight functions enabled"
809 [Ff])
810 if [ "$modelname" = "iaudiom5" ]; then
811 have_fmradio_in="#define HAVE_FMRADIO_IN"
812 echo "FM radio functions enabled"
815 [Rr])
816 if [ "$modelname" = "iriverh120" ]; then
817 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
818 have_rtc_alarm="#define HAVE_RTC_ALARM"
819 echo "RTC functions enabled (DS1339/DS3231)"
822 [Ww])
823 echo "Enabling Windows 32 cross-compiling"
824 win32crosscompile="yes"
826 "") # Match enter press when finished with advanced options
827 cont=0
830 echo "[ERROR] Option $option unsupported"
832 esac
833 if [ "$interact" ]; then
834 btype="$btype$option"
835 else
836 atype=`echo "$atype" | cut -c 2-`
837 [ "$atype" ] || cont=0
839 done
840 echo "done"
842 if [ "yes" = "$voice" ]; then
843 # Ask about languages to build
844 picklang
845 voicelanguage=`whichlang`
846 echo "Voice language set to $voicelanguage"
848 # Configure encoder and TTS engine for each language
849 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
850 voiceconfig "$thislang"
851 done
853 if [ "yes" = "$use_debug" ]; then
854 debug="-DDEBUG"
855 GCCOPTS="$GCCOPTS -g -DDEBUG"
857 if [ "yes" = "$logf" ]; then
858 use_logf="#define ROCKBOX_HAS_LOGF 1"
860 if [ "yes" = "$logf_serial" ]; then
861 use_logf_serial="#define LOGF_SERIAL 1"
863 if [ "yes" = "$bootchart" ]; then
864 use_bootchart="#define DO_BOOTCHART 1"
866 if [ "yes" = "$simulator" ]; then
867 debug="-DDEBUG"
868 extradefines="$extradefines -DSIMULATOR"
869 archosrom=""
870 flash=""
872 if [ "yes" = "$profile" ]; then
873 extradefines="$extradefines -DRB_PROFILE"
874 PROFILE_OPTS="-finstrument-functions"
878 # Configure voice settings
879 voiceconfig () {
880 thislang=$1
881 if [ ! "$ARG_TTS" ]; then
882 echo "Building $thislang voice for $modelname. Select options"
883 echo ""
886 if [ -n "`findtool flite`" ]; then
887 FLITE="F(l)ite "
888 FLITE_OPTS=""
889 DEFAULT_TTS="flite"
890 DEFAULT_TTS_OPTS=$FLITE_OPTS
891 DEFAULT_NOISEFLOOR="500"
892 DEFAULT_CHOICE="l"
894 if [ -n "`findtool espeak`" ]; then
895 ESPEAK="(e)Speak "
896 ESPEAK_OPTS=""
897 DEFAULT_TTS="espeak"
898 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
899 DEFAULT_NOISEFLOOR="500"
900 DEFAULT_CHOICE="e"
902 if [ -n "`findtool festival`" ]; then
903 FESTIVAL="(F)estival "
904 case "$thislang" in
905 "italiano")
906 FESTIVAL_OPTS="--language italian"
908 "espanol")
909 FESTIVAL_OPTS="--language spanish"
911 "finnish")
912 FESTIVAL_OPTS="--language finnish"
914 "czech")
915 FESTIVAL_OPTS="--language czech"
918 FESTIVAL_OPTS=""
920 esac
921 DEFAULT_TTS="festival"
922 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
923 DEFAULT_NOISEFLOOR="500"
924 DEFAULT_CHOICE="f"
926 if [ -n "`findtool swift`" ]; then
927 SWIFT="S(w)ift "
928 SWIFT_OPTS=""
929 DEFAULT_TTS="swift"
930 DEFAULT_TTS_OPTS=$SWIFT_OPTS
931 DEFAULT_NOISEFLOOR="500"
932 DEFAULT_CHOICE="w"
934 # Allow SAPI if Windows is in use
935 if [ -n "`findtool winver`" ]; then
936 SAPI="(S)API "
937 SAPI_OPTS=""
938 DEFAULT_TTS="sapi"
939 DEFAULT_TTS_OPTS=$SAPI_OPTS
940 DEFAULT_NOISEFLOOR="500"
941 DEFAULT_CHOICE="s"
944 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
945 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
946 exit 3
949 if [ "$ARG_TTS" ]; then
950 option=$ARG_TTS
951 else
952 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
953 option=`input`
954 if [ -z "$option" ]; then option=${DEFAULT_CHOICE}; fi
955 advopts="$advopts --tts=$option"
957 case "$option" in
958 [Ll])
959 TTS_ENGINE="flite"
960 NOISEFLOOR="500" # TODO: check this value
961 TTS_OPTS=$FLITE_OPTS
963 [Ee])
964 TTS_ENGINE="espeak"
965 NOISEFLOOR="500"
966 TTS_OPTS=$ESPEAK_OPTS
968 [Ff])
969 TTS_ENGINE="festival"
970 NOISEFLOOR="500"
971 TTS_OPTS=$FESTIVAL_OPTS
973 [Ss])
974 TTS_ENGINE="sapi"
975 NOISEFLOOR="500"
976 TTS_OPTS=$SAPI_OPTS
978 [Ww])
979 TTS_ENGINE="swift"
980 NOISEFLOOR="500"
981 TTS_OPTS=$SWIFT_OPTS
984 TTS_ENGINE=$DEFAULT_TTS
985 TTS_OPTS=$DEFAULT_TTS_OPTS
986 NOISEFLOOR=$DEFAULT_NOISEFLOOR
987 esac
988 echo "Using $TTS_ENGINE for TTS"
990 # Select which voice to use for Festival
991 if [ "$TTS_ENGINE" = "festival" ]; then
992 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
993 for voice in $voicelist; do
994 TTS_FESTIVAL_VOICE="$voice" # Default choice
995 break
996 done
997 if [ "$ARG_VOICE" ]; then
998 CHOICE=$ARG_VOICE
999 else
1001 for voice in $voicelist; do
1002 printf "%3d. %s\n" "$i" "$voice"
1003 i=`expr $i + 1`
1004 done
1005 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
1006 CHOICE=`input`
1009 for voice in $voicelist; do
1010 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
1011 TTS_FESTIVAL_VOICE="$voice"
1013 i=`expr $i + 1`
1014 done
1015 advopts="$advopts --voice=$CHOICE"
1016 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1017 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1020 # Read custom tts options from command line
1021 if [ "$ARG_TTSOPTS" ]; then
1022 TTS_OPTS="$ARG_TTSOPTS"
1023 echo "$TTS_ENGINE options set to $TTS_OPTS"
1026 if [ "$swcodec" = "yes" ]; then
1027 ENCODER="rbspeexenc"
1028 ENC_OPTS="-q 4 -c 10"
1029 else
1030 if [ -n "`findtool lame`" ]; then
1031 ENCODER="lame"
1032 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1033 else
1034 echo "You need LAME in the system path to build voice files for"
1035 echo "HWCODEC targets."
1036 exit 4
1040 echo "Using $ENCODER for encoding voice clips"
1042 # Read custom encoder options from command line
1043 if [ "$ARG_ENCOPTS" ]; then
1044 ENC_OPTS="$ARG_ENCOPTS"
1045 echo "$ENCODER options set to $ENC_OPTS"
1048 TEMPDIR="${pwd}"
1049 if [ -n "`findtool cygpath`" ]; then
1050 TEMPDIR=`cygpath . -a -w`
1054 picklang() {
1055 # figure out which languages that are around
1056 for file in $rootdir/apps/lang/*.lang; do
1057 clean=`basename $file .lang`
1058 langs="$langs $clean"
1059 done
1061 if [ "$ARG_LANG" ]; then
1062 pick=$ARG_LANG
1063 else
1064 echo "Select a number for the language to use (default is english)"
1065 # FIXME The multiple-language feature is currently broken
1066 # echo "You may enter a comma-separated list of languages to build"
1068 num=1
1069 for one in $langs; do
1070 echo "$num. $one"
1071 num=`expr $num + 1`
1072 done
1073 pick=`input`
1074 advopts="$advopts --language=$pick"
1078 whichlang() {
1079 output=""
1080 # Allow the user to pass a comma-separated list of langauges
1081 for thispick in `echo $pick | sed 's/,/ /g'`; do
1082 num=1
1083 for one in $langs; do
1084 # Accept both the language number and name
1085 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
1086 if [ "$output" = "" ]; then
1087 output=$one
1088 else
1089 output=$output,$one
1092 num=`expr $num + 1`
1093 done
1094 done
1095 if [ -z "$output" ]; then
1096 # pick a default
1097 output="english"
1099 echo $output
1102 help() {
1103 echo "Rockbox configure script."
1104 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1105 echo "Do *NOT* run this within the tools directory!"
1106 echo ""
1107 cat <<EOF
1108 Usage: configure [OPTION]...
1109 Options:
1110 --target=TARGET Sets the target, TARGET can be either the target ID or
1111 corresponding string. Run without this option to see all
1112 available targets.
1114 --ram=RAM Sets the RAM for certain targets. Even though any number
1115 is accepted, not every number is correct. The default
1116 value will be applied, if you entered a wrong number
1117 (which depends on the target). Watch the output. Run
1118 without this option if you are not sure which the right
1119 number is.
1121 --type=TYPE Sets the build type. Shortcuts are also valid.
1122 Run without this option to see all available types.
1123 Multiple values are allowed and managed in the input
1124 order. So --type=b stands for Bootloader build, while
1125 --type=ab stands for "Backlight MOD" build.
1127 --lcdwidth=X Sets the width of the LCD. Used only for application
1128 targets.
1130 --lcdheight=Y Sets the height of the LCD. Used only for application
1131 targets.
1133 --language=LANG Set the language used for voice generation (used only if
1134 TYPE is AV).
1136 --tts=ENGINE Set the TTS engine used for voice generation (used only
1137 if TYPE is AV).
1139 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1140 AV).
1142 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1144 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1146 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1147 This is useful for having multiple alternate builds on
1148 your device that you can load with ROLO. However as the
1149 bootloader looks for .rockbox you won't be able to boot
1150 into this build.
1152 --ccache Enable ccache use (done by default these days)
1153 --no-ccache Disable ccache use
1155 --eabi Make configure prefer toolchains that are able to compile
1156 for the new ARM standard abi EABI
1157 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1158 --thumb Build with -mthumb (for ARM builds)
1159 --no-thumb The opposite of --thumb (don't use thumb even for targets
1160 where this is the default
1161 --sdl-threads Force use of SDL threads. They have inferior performance,
1162 but are better debuggable with GDB
1163 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1164 behavior of falling back to them if no native thread
1165 support was found.
1166 --prefix Target installation directory
1167 --help Shows this message (must not be used with other options)
1171 exit
1174 ARG_CCACHE=
1175 ARG_ENCOPTS=
1176 ARG_LANG=
1177 ARG_RAM=
1178 ARG_RBDIR=
1179 ARG_TARGET=
1180 ARG_TTS=
1181 ARG_TTSOPTS=
1182 ARG_TYPE=
1183 ARG_VOICE=
1184 ARG_ARM_EABI=
1185 ARG_ARM_THUMB=
1186 ARG_PREFIX="$PREFIX"
1187 ARG_THREAD_SUPPORT=
1188 err=
1189 for arg in "$@"; do
1190 case "$arg" in
1191 --ccache) ARG_CCACHE=1;;
1192 --no-ccache) ARG_CCACHE=0;;
1193 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1194 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
1195 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1196 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
1197 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1198 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1199 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1200 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1201 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1202 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1203 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
1204 --eabi) ARG_ARM_EABI=1;;
1205 --no-eabi) ARG_ARM_EABI=0;;
1206 --thumb) ARG_ARM_THUMB=1;;
1207 --no-thumb) ARG_ARM_THUMB=0;;
1208 --sdl-threads)ARG_THREAD_SUPPORT=1;;
1209 --no-sdl-threads)
1210 ARG_THREAD_SUPPORT=0;;
1211 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
1212 --help) help;;
1213 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1214 esac
1215 done
1216 [ "$err" ] && exit 1
1218 advopts=
1220 if [ "$TMPDIR" != "" ]; then
1221 tmpdir=$TMPDIR
1222 else
1223 tmpdir=/tmp
1225 echo Using temporary directory $tmpdir
1227 if test -r "configure"; then
1228 # this is a check for a configure script in the current directory, it there
1229 # is one, try to figure out if it is this one!
1231 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1232 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1233 echo "It will only cause you pain and grief. Instead do this:"
1234 echo ""
1235 echo " cd .."
1236 echo " mkdir build-dir"
1237 echo " cd build-dir"
1238 echo " ../tools/configure"
1239 echo ""
1240 echo "Much happiness will arise from this. Enjoy"
1241 exit 5
1245 # get our current directory
1246 pwd=`pwd`;
1248 if { echo $pwd | grep " "; } then
1249 echo "You're running this script in a path that contains space. The build"
1250 echo "system is unfortunately not clever enough to deal with this. Please"
1251 echo "run the script from a different path, rename the path or fix the build"
1252 echo "system!"
1253 exit 6
1256 if [ -z "$rootdir" ]; then
1257 ##################################################################
1258 # Figure out where the source code root is!
1260 rootdir=`dirname $0`/../
1262 #####################################################################
1263 # Convert the possibly relative directory name to an absolute version
1265 now=`pwd`
1266 cd $rootdir
1267 rootdir=`pwd`
1269 # cd back to the build dir
1270 cd $now
1273 apps="apps"
1274 appsdir='$(ROOTDIR)/apps'
1275 toolsdir='$(ROOTDIR)/tools'
1278 ##################################################################
1279 # Figure out target platform
1282 if [ "$ARG_TARGET" ]; then
1283 buildfor=$ARG_TARGET
1284 else
1285 echo "Enter target platform:"
1286 cat <<EOF
1287 ==Archos== ==iriver== ==Apple iPod==
1288 0) Player/Studio 10) H120/H140 20) Color/Photo
1289 1) Recorder 11) H320/H340 21) Nano 1G
1290 2) FM Recorder 12) iHP-100/110/115 22) Video
1291 3) Recorder v2 13) iFP-790 23) 3G
1292 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1293 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1294 6) AV300 26) Mini 2G
1295 ==Toshiba== 27) 1G, 2G
1296 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1297 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1298 31) M5/M5L
1299 32) 7 ==Olympus= ==SanDisk==
1300 33) D2 70) M:Robe 500 50) Sansa e200
1301 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1302 52) Sansa c200
1303 ==Creative== ==Philips== 53) Sansa m200
1304 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1305 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1306 92) Zen Vision HDD1830 56) Sansa e200v2
1307 102) GoGear HDD6330 57) Sansa m200v4
1308 ==Onda== 58) Sansa Fuze
1309 120) VX747 ==Meizu== 59) Sansa c200v2
1310 121) VX767 110) M6SL 60) Sansa Clipv2
1311 122) VX747+ 111) M6SP 61) Sansa View
1312 123) VX777 112) M3 62) Sansa Clip+
1313 63) Sansa Fuze v2
1314 ==Samsung== ==Tatung== 64) Sansa Fuze+
1315 140) YH-820 150) Elio TPJ-1022 65) Sansa Clip Zip
1316 141) YH-920 66) Sansa Connect
1317 142) YH-925 ==Packard Bell==
1318 143) YP-S3 160) Vibe 500 ==Logik==
1319 80) DAX 1GB MP3/DAB
1320 ==Application== ==MPIO==
1321 200) SDL 170) HD200 ==Lyre project==
1322 201) Android 171) HD300 130) Lyre proto 1
1323 202) Nokia N8xx 131) Mini2440
1324 203) Nokia N900 ==ROCKCHIP== ==HiFiMAN==
1325 204) Pandora 180) rk27xx generic 190) HM-60x
1326 205) Samsung YP-R0 191) HM-801
1330 buildfor=`input`;
1333 # Set of tools built for all target platforms:
1334 toolset="rdf2binary convbdf codepages"
1336 # Toolsets for some target families:
1337 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1338 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1339 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1340 ipodbitmaptools="$toolset scramble bmp2rb"
1341 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1342 tccbitmaptools="$toolset scramble bmp2rb"
1343 # generic is used by IFP, Meizu and Onda
1344 genericbitmaptools="$toolset bmp2rb"
1345 # scramble is used by all other targets
1346 scramblebitmaptools="$genericbitmaptools scramble"
1349 # ---- For each target ----
1351 # *Variables*
1352 # target_id: a unique number identifying this target, IS NOT the menu number.
1353 # Just use the currently highest number+1 when you add a new
1354 # target.
1355 # modelname: short model name used all over to identify this target
1356 # memory: number of megabytes of RAM this target has. If the amount can
1357 # be selected by the size prompt, let memory be unset here
1358 # target: -Ddefine passed to the build commands to make the correct
1359 # config-*.h file get included etc
1360 # tool: the tool that takes a plain binary and converts that into a
1361 # working "firmware" file for your target
1362 # output: the final output file name
1363 # boottool: the tool that takes a plain binary and generates a bootloader
1364 # file for your target (or blank to use $tool)
1365 # bootoutput:the final output file name for the bootloader (or blank to use
1366 # $output)
1367 # appextra: passed to the APPEXTRA variable in the Makefiles.
1368 # TODO: add proper explanation
1369 # archosrom: used only for Archos targets that build a special flashable .ucl
1370 # image.
1371 # flash: name of output for flashing, for targets where there's a special
1372 # file output for this.
1373 # plugins: set to 'yes' to build the plugins. Early development builds can
1374 # set this to no in the early stages to have an easier life for a
1375 # while
1376 # swcodec: set 'yes' on swcodec targets
1377 # toolset: lists what particular tools in the tools/ directory that this
1378 # target needs to have built prior to building Rockbox
1380 # *Functions*
1381 # *cc: sets up gcc and compiler options for your target builds. Note
1382 # that if you select a simulator build, the compiler selection is
1383 # overridden later in the script.
1385 case $buildfor in
1387 0|archosplayer)
1388 target_id=1
1389 modelname="archosplayer"
1390 target="ARCHOS_PLAYER"
1391 shcc
1392 tool="$rootdir/tools/scramble"
1393 output="archos.mod"
1394 appextra="player:gui"
1395 archosrom="$pwd/rombox.ucl"
1396 flash="$pwd/rockbox.ucl"
1397 plugins="yes"
1398 swcodec=""
1400 # toolset is the tools within the tools directory that we build for
1401 # this particular target.
1402 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1404 # Note: the convbdf is present in the toolset just because: 1) the
1405 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1406 # build the player simulator
1408 t_cpu="sh"
1409 t_manufacturer="archos"
1410 t_model="player"
1413 1|archosrecorder)
1414 target_id=2
1415 modelname="archosrecorder"
1416 target="ARCHOS_RECORDER"
1417 shcc
1418 tool="$rootdir/tools/scramble"
1419 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1420 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1421 output="ajbrec.ajz"
1422 appextra="recorder:gui:radio"
1423 #archosrom="$pwd/rombox.ucl"
1424 flash="$pwd/rockbox.ucl"
1425 plugins="yes"
1426 swcodec=""
1427 # toolset is the tools within the tools directory that we build for
1428 # this particular target.
1429 toolset=$archosbitmaptools
1430 t_cpu="sh"
1431 t_manufacturer="archos"
1432 t_model="recorder"
1435 2|archosfmrecorder)
1436 target_id=3
1437 modelname="archosfmrecorder"
1438 target="ARCHOS_FMRECORDER"
1439 shcc
1440 tool="$rootdir/tools/scramble -fm"
1441 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1442 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1443 output="ajbrec.ajz"
1444 appextra="recorder:gui:radio"
1445 #archosrom="$pwd/rombox.ucl"
1446 flash="$pwd/rockbox.ucl"
1447 plugins="yes"
1448 swcodec=""
1449 # toolset is the tools within the tools directory that we build for
1450 # this particular target.
1451 toolset=$archosbitmaptools
1452 t_cpu="sh"
1453 t_manufacturer="archos"
1454 t_model="fm_v2"
1457 3|archosrecorderv2)
1458 target_id=4
1459 modelname="archosrecorderv2"
1460 target="ARCHOS_RECORDERV2"
1461 shcc
1462 tool="$rootdir/tools/scramble -v2"
1463 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1464 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1465 output="ajbrec.ajz"
1466 appextra="recorder:gui:radio"
1467 #archosrom="$pwd/rombox.ucl"
1468 flash="$pwd/rockbox.ucl"
1469 plugins="yes"
1470 swcodec=""
1471 # toolset is the tools within the tools directory that we build for
1472 # this particular target.
1473 toolset=$archosbitmaptools
1474 t_cpu="sh"
1475 t_manufacturer="archos"
1476 t_model="fm_v2"
1479 4|archosondiosp)
1480 target_id=7
1481 modelname="archosondiosp"
1482 target="ARCHOS_ONDIOSP"
1483 shcc
1484 tool="$rootdir/tools/scramble -osp"
1485 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1486 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1487 output="ajbrec.ajz"
1488 appextra="recorder:gui:radio"
1489 #archosrom="$pwd/rombox.ucl"
1490 flash="$pwd/rockbox.ucl"
1491 plugins="yes"
1492 swcodec=""
1493 # toolset is the tools within the tools directory that we build for
1494 # this particular target.
1495 toolset=$archosbitmaptools
1496 t_cpu="sh"
1497 t_manufacturer="archos"
1498 t_model="ondio"
1501 5|archosondiofm)
1502 target_id=8
1503 modelname="archosondiofm"
1504 target="ARCHOS_ONDIOFM"
1505 shcc
1506 tool="$rootdir/tools/scramble -ofm"
1507 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1508 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1509 output="ajbrec.ajz"
1510 appextra="recorder:gui:radio"
1511 #archosrom="$pwd/rombox.ucl"
1512 flash="$pwd/rockbox.ucl"
1513 plugins="yes"
1514 swcodec=""
1515 toolset=$archosbitmaptools
1516 t_cpu="sh"
1517 t_manufacturer="archos"
1518 t_model="ondio"
1521 6|archosav300)
1522 target_id=38
1523 modelname="archosav300"
1524 target="ARCHOS_AV300"
1525 memory=16 # always
1526 arm7tdmicc
1527 tool="$rootdir/tools/scramble -mm=C"
1528 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1529 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1530 output="cjbm.ajz"
1531 appextra="recorder:gui:radio"
1532 plugins="yes"
1533 swcodec=""
1534 # toolset is the tools within the tools directory that we build for
1535 # this particular target.
1536 toolset="$toolset scramble descramble bmp2rb"
1537 # architecture, manufacturer and model for the target-tree build
1538 t_cpu="arm"
1539 t_manufacturer="archos"
1540 t_model="av300"
1543 10|iriverh120)
1544 target_id=9
1545 modelname="iriverh120"
1546 target="IRIVER_H120"
1547 memory=32 # always
1548 coldfirecc
1549 tool="$rootdir/tools/scramble -add=h120"
1550 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1551 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1552 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1553 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1554 output="rockbox.iriver"
1555 bootoutput="bootloader.iriver"
1556 appextra="recorder:gui:radio"
1557 flash="$pwd/rombox.iriver"
1558 plugins="yes"
1559 swcodec="yes"
1560 # toolset is the tools within the tools directory that we build for
1561 # this particular target.
1562 toolset=$iriverbitmaptools
1563 t_cpu="coldfire"
1564 t_manufacturer="iriver"
1565 t_model="h100"
1568 11|iriverh300)
1569 target_id=10
1570 modelname="iriverh300"
1571 target="IRIVER_H300"
1572 memory=32 # always
1573 coldfirecc
1574 tool="$rootdir/tools/scramble -add=h300"
1575 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1576 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1577 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1578 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1579 output="rockbox.iriver"
1580 appextra="recorder:gui:radio"
1581 plugins="yes"
1582 swcodec="yes"
1583 # toolset is the tools within the tools directory that we build for
1584 # this particular target.
1585 toolset=$iriverbitmaptools
1586 t_cpu="coldfire"
1587 t_manufacturer="iriver"
1588 t_model="h300"
1591 12|iriverh100)
1592 target_id=11
1593 modelname="iriverh100"
1594 target="IRIVER_H100"
1595 memory=16 # always
1596 coldfirecc
1597 tool="$rootdir/tools/scramble -add=h100"
1598 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1599 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1600 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1601 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1602 output="rockbox.iriver"
1603 bootoutput="bootloader.iriver"
1604 appextra="recorder:gui:radio"
1605 flash="$pwd/rombox.iriver"
1606 plugins="yes"
1607 swcodec="yes"
1608 # toolset is the tools within the tools directory that we build for
1609 # this particular target.
1610 toolset=$iriverbitmaptools
1611 t_cpu="coldfire"
1612 t_manufacturer="iriver"
1613 t_model="h100"
1616 13|iriverifp7xx)
1617 target_id=19
1618 modelname="iriverifp7xx"
1619 target="IRIVER_IFP7XX"
1620 memory=1
1621 arm7tdmicc short
1622 tool="cp"
1623 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1624 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1625 output="rockbox.wma"
1626 appextra="recorder:gui:radio"
1627 plugins="yes"
1628 swcodec="yes"
1629 # toolset is the tools within the tools directory that we build for
1630 # this particular target.
1631 toolset=$genericbitmaptools
1632 t_cpu="arm"
1633 t_manufacturer="pnx0101"
1634 t_model="iriver-ifp7xx"
1637 14|iriverh10)
1638 target_id=22
1639 modelname="iriverh10"
1640 target="IRIVER_H10"
1641 memory=32 # always
1642 arm7tdmicc
1643 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1644 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1645 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1646 output="rockbox.mi4"
1647 appextra="recorder:gui:radio"
1648 plugins="yes"
1649 swcodec="yes"
1650 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1651 bootoutput="H10_20GC.mi4"
1652 # toolset is the tools within the tools directory that we build for
1653 # this particular target.
1654 toolset=$scramblebitmaptools
1655 # architecture, manufacturer and model for the target-tree build
1656 t_cpu="arm"
1657 t_soc="pp"
1658 t_manufacturer="iriver"
1659 t_model="h10"
1662 15|iriverh10_5gb)
1663 target_id=24
1664 modelname="iriverh10_5gb"
1665 target="IRIVER_H10_5GB"
1666 memory=32 # always
1667 arm7tdmicc
1668 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1669 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1670 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1671 output="rockbox.mi4"
1672 appextra="recorder:gui:radio"
1673 plugins="yes"
1674 swcodec="yes"
1675 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1676 bootoutput="H10.mi4"
1677 # toolset is the tools within the tools directory that we build for
1678 # this particular target.
1679 toolset=$scramblebitmaptools
1680 # architecture, manufacturer and model for the target-tree build
1681 t_cpu="arm"
1682 t_soc="pp"
1683 t_manufacturer="iriver"
1684 t_model="h10"
1687 20|ipodcolor)
1688 target_id=13
1689 modelname="ipodcolor"
1690 target="IPOD_COLOR"
1691 memory=32 # always
1692 arm7tdmicc
1693 tool="$rootdir/tools/scramble -add=ipco"
1694 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1695 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1696 output="rockbox.ipod"
1697 appextra="recorder:gui:radio"
1698 plugins="yes"
1699 swcodec="yes"
1700 bootoutput="bootloader-$modelname.ipod"
1701 # toolset is the tools within the tools directory that we build for
1702 # this particular target.
1703 toolset=$ipodbitmaptools
1704 # architecture, manufacturer and model for the target-tree build
1705 t_cpu="arm"
1706 t_soc="pp"
1707 t_manufacturer="ipod"
1708 t_model="color"
1711 21|ipodnano1g)
1712 target_id=14
1713 modelname="ipodnano1g"
1714 target="IPOD_NANO"
1715 memory=32 # always
1716 arm7tdmicc
1717 tool="$rootdir/tools/scramble -add=nano"
1718 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1719 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1720 output="rockbox.ipod"
1721 appextra="recorder:gui:radio"
1722 plugins="yes"
1723 swcodec="yes"
1724 bootoutput="bootloader-$modelname.ipod"
1725 # toolset is the tools within the tools directory that we build for
1726 # this particular target.
1727 toolset=$ipodbitmaptools
1728 # architecture, manufacturer and model for the target-tree build
1729 t_cpu="arm"
1730 t_soc="pp"
1731 t_manufacturer="ipod"
1732 t_model="nano"
1735 22|ipodvideo)
1736 target_id=15
1737 modelname="ipodvideo"
1738 target="IPOD_VIDEO"
1739 memory=64 # always. This is reduced at runtime if needed
1740 arm7tdmicc
1741 tool="$rootdir/tools/scramble -add=ipvd"
1742 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1743 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1744 output="rockbox.ipod"
1745 appextra="recorder:gui:radio"
1746 plugins="yes"
1747 swcodec="yes"
1748 bootoutput="bootloader-$modelname.ipod"
1749 # toolset is the tools within the tools directory that we build for
1750 # this particular target.
1751 toolset=$ipodbitmaptools
1752 # architecture, manufacturer and model for the target-tree build
1753 t_cpu="arm"
1754 t_soc="pp"
1755 t_manufacturer="ipod"
1756 t_model="video"
1759 23|ipod3g)
1760 target_id=16
1761 modelname="ipod3g"
1762 target="IPOD_3G"
1763 memory=32 # always
1764 arm7tdmicc
1765 tool="$rootdir/tools/scramble -add=ip3g"
1766 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1767 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1768 output="rockbox.ipod"
1769 appextra="recorder:gui:radio"
1770 plugins="yes"
1771 swcodec="yes"
1772 bootoutput="bootloader-$modelname.ipod"
1773 # toolset is the tools within the tools directory that we build for
1774 # this particular target.
1775 toolset=$ipodbitmaptools
1776 # architecture, manufacturer and model for the target-tree build
1777 t_cpu="arm"
1778 t_soc="pp"
1779 t_manufacturer="ipod"
1780 t_model="3g"
1783 24|ipod4g)
1784 target_id=17
1785 modelname="ipod4g"
1786 target="IPOD_4G"
1787 memory=32 # always
1788 arm7tdmicc
1789 tool="$rootdir/tools/scramble -add=ip4g"
1790 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1791 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1792 output="rockbox.ipod"
1793 appextra="recorder:gui:radio"
1794 plugins="yes"
1795 swcodec="yes"
1796 bootoutput="bootloader-$modelname.ipod"
1797 # toolset is the tools within the tools directory that we build for
1798 # this particular target.
1799 toolset=$ipodbitmaptools
1800 # architecture, manufacturer and model for the target-tree build
1801 t_cpu="arm"
1802 t_soc="pp"
1803 t_manufacturer="ipod"
1804 t_model="4g"
1807 25|ipodmini1g)
1808 target_id=18
1809 modelname="ipodmini1g"
1810 target="IPOD_MINI"
1811 memory=32 # always
1812 arm7tdmicc
1813 tool="$rootdir/tools/scramble -add=mini"
1814 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1815 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1816 output="rockbox.ipod"
1817 appextra="recorder:gui:radio"
1818 plugins="yes"
1819 swcodec="yes"
1820 bootoutput="bootloader-$modelname.ipod"
1821 # toolset is the tools within the tools directory that we build for
1822 # this particular target.
1823 toolset=$ipodbitmaptools
1824 # architecture, manufacturer and model for the target-tree build
1825 t_cpu="arm"
1826 t_soc="pp"
1827 t_manufacturer="ipod"
1828 t_model="mini"
1831 26|ipodmini2g)
1832 target_id=21
1833 modelname="ipodmini2g"
1834 target="IPOD_MINI2G"
1835 memory=32 # always
1836 arm7tdmicc
1837 tool="$rootdir/tools/scramble -add=mn2g"
1838 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1839 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1840 output="rockbox.ipod"
1841 appextra="recorder:gui:radio"
1842 plugins="yes"
1843 swcodec="yes"
1844 bootoutput="bootloader-$modelname.ipod"
1845 # toolset is the tools within the tools directory that we build for
1846 # this particular target.
1847 toolset=$ipodbitmaptools
1848 # architecture, manufacturer and model for the target-tree build
1849 t_cpu="arm"
1850 t_soc="pp"
1851 t_manufacturer="ipod"
1852 t_model="mini2g"
1855 27|ipod1g2g)
1856 target_id=29
1857 modelname="ipod1g2g"
1858 target="IPOD_1G2G"
1859 memory=32 # always
1860 arm7tdmicc
1861 tool="$rootdir/tools/scramble -add=1g2g"
1862 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1863 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1864 output="rockbox.ipod"
1865 appextra="recorder:gui:radio"
1866 plugins="yes"
1867 swcodec="yes"
1868 bootoutput="bootloader-$modelname.ipod"
1869 # toolset is the tools within the tools directory that we build for
1870 # this particular target.
1871 toolset=$ipodbitmaptools
1872 # architecture, manufacturer and model for the target-tree build
1873 t_cpu="arm"
1874 t_soc="pp"
1875 t_manufacturer="ipod"
1876 t_model="1g2g"
1879 28|ipodnano2g)
1880 target_id=62
1881 modelname="ipodnano2g"
1882 target="IPOD_NANO2G"
1883 memory=32 # always
1884 arm940tcc
1885 tool="$rootdir/tools/scramble -add=nn2g"
1886 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1887 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1888 output="rockbox.ipod"
1889 appextra="recorder:gui:radio"
1890 plugins="yes"
1891 swcodec="yes"
1892 bootoutput="bootloader-$modelname.ipod"
1893 # toolset is the tools within the tools directory that we build for
1894 # this particular target.
1895 toolset=$ipodbitmaptools
1896 # architecture, manufacturer and model for the target-tree build
1897 t_cpu="arm"
1898 t_manufacturer="s5l8700"
1899 t_model="ipodnano2g"
1902 29|ipod6g)
1903 target_id=71
1904 modelname="ipod6g"
1905 target="IPOD_6G"
1906 memory=64 # always
1907 arm926ejscc
1908 tool="$rootdir/tools/scramble -add=ip6g"
1909 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1910 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1911 output="rockbox.ipod"
1912 appextra="recorder:gui:radio"
1913 plugins="yes"
1914 swcodec="yes"
1915 bootoutput="bootloader-$modelname.ipod"
1916 # toolset is the tools within the tools directory that we build for
1917 # this particular target.
1918 toolset=$ipodbitmaptools
1919 # architecture, manufacturer and model for the target-tree build
1920 t_cpu="arm"
1921 t_manufacturer="s5l8702"
1922 t_model="ipod6g"
1925 30|iaudiox5)
1926 target_id=12
1927 modelname="iaudiox5"
1928 target="IAUDIO_X5"
1929 memory=16 # always
1930 coldfirecc
1931 tool="$rootdir/tools/scramble -add=iax5"
1932 boottool="$rootdir/tools/scramble -iaudiox5"
1933 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1934 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1935 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1936 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1937 output="rockbox.iaudio"
1938 bootoutput="x5_fw.bin"
1939 appextra="recorder:gui:radio"
1940 plugins="yes"
1941 swcodec="yes"
1942 # toolset is the tools within the tools directory that we build for
1943 # this particular target.
1944 toolset="$iaudiobitmaptools"
1945 # architecture, manufacturer and model for the target-tree build
1946 t_cpu="coldfire"
1947 t_manufacturer="iaudio"
1948 t_model="x5"
1951 31|iaudiom5)
1952 target_id=28
1953 modelname="iaudiom5"
1954 target="IAUDIO_M5"
1955 memory=16 # always
1956 coldfirecc
1957 tool="$rootdir/tools/scramble -add=iam5"
1958 boottool="$rootdir/tools/scramble -iaudiom5"
1959 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1960 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1961 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1962 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1963 output="rockbox.iaudio"
1964 bootoutput="m5_fw.bin"
1965 appextra="recorder:gui:radio"
1966 plugins="yes"
1967 swcodec="yes"
1968 # toolset is the tools within the tools directory that we build for
1969 # this particular target.
1970 toolset="$iaudiobitmaptools"
1971 # architecture, manufacturer and model for the target-tree build
1972 t_cpu="coldfire"
1973 t_manufacturer="iaudio"
1974 t_model="m5"
1977 32|iaudio7)
1978 target_id=32
1979 modelname="iaudio7"
1980 target="IAUDIO_7"
1981 memory=16 # always
1982 arm946cc
1983 tool="$rootdir/tools/scramble -add=i7"
1984 boottool="$rootdir/tools/scramble -tcc=crc"
1985 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1986 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1987 output="rockbox.iaudio"
1988 appextra="recorder:gui:radio"
1989 plugins="yes"
1990 swcodec="yes"
1991 bootoutput="I7_FW.BIN"
1992 # toolset is the tools within the tools directory that we build for
1993 # this particular target.
1994 toolset="$tccbitmaptools"
1995 # architecture, manufacturer and model for the target-tree build
1996 t_cpu="arm"
1997 t_manufacturer="tcc77x"
1998 t_model="iaudio7"
2001 33|cowond2)
2002 target_id=34
2003 modelname="cowond2"
2004 target="COWON_D2"
2005 memory=32
2006 arm926ejscc
2007 tool="$rootdir/tools/scramble -add=d2"
2008 boottool="cp "
2009 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2010 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2011 output="rockbox.d2"
2012 bootoutput="bootloader-cowond2.bin"
2013 appextra="recorder:gui:radio"
2014 plugins="yes"
2015 swcodec="yes"
2016 toolset="$tccbitmaptools"
2017 # architecture, manufacturer and model for the target-tree build
2018 t_cpu="arm"
2019 t_manufacturer="tcc780x"
2020 t_model="cowond2"
2023 34|iaudiom3)
2024 target_id=37
2025 modelname="iaudiom3"
2026 target="IAUDIO_M3"
2027 memory=16 # always
2028 coldfirecc
2029 tool="$rootdir/tools/scramble -add=iam3"
2030 boottool="$rootdir/tools/scramble -iaudiom3"
2031 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2032 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2033 output="rockbox.iaudio"
2034 bootoutput="cowon_m3.bin"
2035 appextra="recorder:gui:radio"
2036 plugins="yes"
2037 swcodec="yes"
2038 # toolset is the tools within the tools directory that we build for
2039 # this particular target.
2040 toolset="$iaudiobitmaptools"
2041 # architecture, manufacturer and model for the target-tree build
2042 t_cpu="coldfire"
2043 t_manufacturer="iaudio"
2044 t_model="m3"
2047 40|gigabeatfx)
2048 target_id=20
2049 modelname="gigabeatfx"
2050 target="GIGABEAT_F"
2051 memory=32 # always
2052 arm9tdmicc
2053 tool="$rootdir/tools/scramble -add=giga"
2054 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2055 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2056 output="rockbox.gigabeat"
2057 appextra="recorder:gui:radio"
2058 plugins="yes"
2059 swcodec="yes"
2060 toolset=$gigabeatbitmaptools
2061 boottool="$rootdir/tools/scramble -gigabeat"
2062 bootoutput="FWIMG01.DAT"
2063 # architecture, manufacturer and model for the target-tree build
2064 t_cpu="arm"
2065 t_manufacturer="s3c2440"
2066 t_model="gigabeat-fx"
2069 41|gigabeats)
2070 target_id=26
2071 modelname="gigabeats"
2072 target="GIGABEAT_S"
2073 memory=64
2074 arm1136jfscc
2075 tool="$rootdir/tools/scramble -add=gigs"
2076 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2077 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2078 output="rockbox.gigabeat"
2079 appextra="recorder:gui:radio"
2080 plugins="yes"
2081 swcodec="yes"
2082 toolset="$gigabeatbitmaptools"
2083 boottool="$rootdir/tools/scramble -gigabeats"
2084 bootoutput="nk.bin"
2085 # architecture, manufacturer and model for the target-tree build
2086 t_cpu="arm"
2087 t_manufacturer="imx31"
2088 t_model="gigabeat-s"
2091 70|mrobe500)
2092 target_id=36
2093 modelname="mrobe500"
2094 target="MROBE_500"
2095 memory=64 # always
2096 arm926ejscc
2097 tool="$rootdir/tools/scramble -add=m500"
2098 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2099 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
2100 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2101 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2102 output="rockbox.mrobe500"
2103 appextra="recorder:gui:radio"
2104 plugins="yes"
2105 swcodec="yes"
2106 toolset=$gigabeatbitmaptools
2107 boottool="cp "
2108 bootoutput="rockbox.mrboot"
2109 # architecture, manufacturer and model for the target-tree build
2110 t_cpu="arm"
2111 t_manufacturer="tms320dm320"
2112 t_model="mrobe-500"
2115 71|mrobe100)
2116 target_id=33
2117 modelname="mrobe100"
2118 target="MROBE_100"
2119 memory=32 # always
2120 arm7tdmicc
2121 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2122 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2123 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2124 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2125 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2126 output="rockbox.mi4"
2127 appextra="recorder:gui:radio"
2128 plugins="yes"
2129 swcodec="yes"
2130 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2131 bootoutput="pp5020.mi4"
2132 # toolset is the tools within the tools directory that we build for
2133 # this particular target.
2134 toolset=$scramblebitmaptools
2135 # architecture, manufacturer and model for the target-tree build
2136 t_cpu="arm"
2137 t_soc="pp"
2138 t_manufacturer="olympus"
2139 t_model="mrobe-100"
2142 80|logikdax)
2143 target_id=31
2144 modelname="logikdax"
2145 target="LOGIK_DAX"
2146 memory=2 # always
2147 arm946cc
2148 tool="$rootdir/tools/scramble -add=ldax"
2149 boottool="$rootdir/tools/scramble -tcc=crc"
2150 bootoutput="player.rom"
2151 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2152 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2153 output="rockbox.logik"
2154 appextra="recorder:gui:radio"
2155 plugins=""
2156 swcodec="yes"
2157 # toolset is the tools within the tools directory that we build for
2158 # this particular target.
2159 toolset=$tccbitmaptools
2160 # architecture, manufacturer and model for the target-tree build
2161 t_cpu="arm"
2162 t_manufacturer="tcc77x"
2163 t_model="logikdax"
2166 90|zenvisionm30gb)
2167 target_id=35
2168 modelname="zenvisionm30gb"
2169 target="CREATIVE_ZVM"
2170 memory=64
2171 arm926ejscc
2172 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2173 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2174 tool="$rootdir/tools/scramble -creative=zvm"
2175 USE_ELF="yes"
2176 output="rockbox.zvm"
2177 appextra="recorder:gui:radio"
2178 plugins="yes"
2179 swcodec="yes"
2180 toolset=$ipodbitmaptools
2181 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
2182 bootoutput="rockbox.zvmboot"
2183 # architecture, manufacturer and model for the target-tree build
2184 t_cpu="arm"
2185 t_manufacturer="tms320dm320"
2186 t_model="creative-zvm"
2189 91|zenvisionm60gb)
2190 target_id=40
2191 modelname="zenvisionm60gb"
2192 target="CREATIVE_ZVM60GB"
2193 memory=64
2194 arm926ejscc
2195 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2196 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2197 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2198 USE_ELF="yes"
2199 output="rockbox.zvm60"
2200 appextra="recorder:gui:radio"
2201 plugins="yes"
2202 swcodec="yes"
2203 toolset=$ipodbitmaptools
2204 boottool="$rootdir/tools/scramble -creative=zvm60"
2205 bootoutput="rockbox.zvm60boot"
2206 # architecture, manufacturer and model for the target-tree build
2207 t_cpu="arm"
2208 t_manufacturer="tms320dm320"
2209 t_model="creative-zvm"
2212 92|zenvision)
2213 target_id=39
2214 modelname="zenvision"
2215 target="CREATIVE_ZV"
2216 memory=64
2217 arm926ejscc
2218 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2219 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2220 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2221 USE_ELF="yes"
2222 output="rockbox.zv"
2223 appextra="recorder:gui:radio"
2224 plugins=""
2225 swcodec="yes"
2226 toolset=$ipodbitmaptools
2227 boottool="$rootdir/tools/scramble -creative=zenvision"
2228 bootoutput="rockbox.zvboot"
2229 # architecture, manufacturer and model for the target-tree build
2230 t_cpu="arm"
2231 t_manufacturer="tms320dm320"
2232 t_model="creative-zvm"
2235 50|sansae200)
2236 target_id=23
2237 modelname="sansae200"
2238 target="SANSA_E200"
2239 memory=32 # supposedly
2240 arm7tdmicc
2241 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2242 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2243 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2244 output="rockbox.mi4"
2245 appextra="recorder:gui:radio"
2246 plugins="yes"
2247 swcodec="yes"
2248 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2249 bootoutput="PP5022.mi4"
2250 # toolset is the tools within the tools directory that we build for
2251 # this particular target.
2252 toolset=$scramblebitmaptools
2253 # architecture, manufacturer and model for the target-tree build
2254 t_cpu="arm"
2255 t_soc="pp"
2256 t_manufacturer="sandisk"
2257 t_model="sansa-e200"
2260 51|sansae200r)
2261 # the e200R model is pretty much identical to the e200, it only has a
2262 # different option to the scramble tool when building a bootloader and
2263 # makes the bootloader output file name in all lower case.
2264 target_id=27
2265 modelname="sansae200r"
2266 target="SANSA_E200"
2267 memory=32 # supposedly
2268 arm7tdmicc
2269 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2270 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2271 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2272 output="rockbox.mi4"
2273 appextra="recorder:gui:radio"
2274 plugins="yes"
2275 swcodec="yes"
2276 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2277 bootoutput="pp5022.mi4"
2278 # toolset is the tools within the tools directory that we build for
2279 # this particular target.
2280 toolset=$scramblebitmaptools
2281 # architecture, manufacturer and model for the target-tree build
2282 t_cpu="arm"
2283 t_soc="pp"
2284 t_manufacturer="sandisk"
2285 t_model="sansa-e200"
2288 52|sansac200)
2289 target_id=30
2290 modelname="sansac200"
2291 target="SANSA_C200"
2292 memory=32 # supposedly
2293 arm7tdmicc
2294 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2295 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2296 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2297 output="rockbox.mi4"
2298 appextra="recorder:gui:radio"
2299 plugins="yes"
2300 swcodec="yes"
2301 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2302 bootoutput="firmware.mi4"
2303 # toolset is the tools within the tools directory that we build for
2304 # this particular target.
2305 toolset=$scramblebitmaptools
2306 # architecture, manufacturer and model for the target-tree build
2307 t_cpu="arm"
2308 t_soc="pp"
2309 t_manufacturer="sandisk"
2310 t_model="sansa-c200"
2313 53|sansam200)
2314 target_id=48
2315 modelname="sansam200"
2316 target="SANSA_M200"
2317 memory=1 # always
2318 arm946cc
2319 tool="$rootdir/tools/scramble -add=m200"
2320 boottool="$rootdir/tools/scramble -tcc=crc"
2321 bootoutput="player.rom"
2322 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2323 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2324 output="rockbox.m200"
2325 appextra="recorder:gui:radio"
2326 plugins=""
2327 swcodec="yes"
2328 # toolset is the tools within the tools directory that we build for
2329 # this particular target.
2330 toolset=$tccbitmaptools
2331 # architecture, manufacturer and model for the target-tree build
2332 t_cpu="arm"
2333 t_manufacturer="tcc77x"
2334 t_model="m200"
2337 54|sansac100)
2338 target_id=42
2339 modelname="sansac100"
2340 target="SANSA_C100"
2341 memory=2
2342 arm946cc
2343 tool="$rootdir/tools/scramble -add=c100"
2344 boottool="$rootdir/tools/scramble -tcc=crc"
2345 bootoutput="player.rom"
2346 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2347 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2348 output="rockbox.c100"
2349 appextra="recorder:gui:radio"
2350 plugins=""
2351 swcodec="yes"
2352 # toolset is the tools within the tools directory that we build for
2353 # this particular target.
2354 toolset=$tccbitmaptools
2355 # architecture, manufacturer and model for the target-tree build
2356 t_cpu="arm"
2357 t_manufacturer="tcc77x"
2358 t_model="c100"
2361 55|sansaclip)
2362 target_id=50
2363 modelname="sansaclip"
2364 target="SANSA_CLIP"
2365 memory=2
2366 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2367 bmp2rb_native="$bmp2rb_mono"
2368 tool="$rootdir/tools/scramble -add=clip"
2369 output="rockbox.sansa"
2370 bootoutput="bootloader-clip.sansa"
2371 appextra="recorder:gui:radio"
2372 plugins="yes"
2373 swcodec="yes"
2374 toolset=$scramblebitmaptools
2375 t_cpu="arm"
2376 t_manufacturer="as3525"
2377 t_model="sansa-clip"
2378 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2379 arm9tdmicc
2380 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2384 56|sansae200v2)
2385 target_id=51
2386 modelname="sansae200v2"
2387 target="SANSA_E200V2"
2388 memory=8
2389 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2390 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2391 tool="$rootdir/tools/scramble -add=e2v2"
2392 output="rockbox.sansa"
2393 bootoutput="bootloader-e200v2.sansa"
2394 appextra="recorder:gui:radio"
2395 plugins="yes"
2396 swcodec="yes"
2397 toolset=$scramblebitmaptools
2398 t_cpu="arm"
2399 t_manufacturer="as3525"
2400 t_model="sansa-e200v2"
2401 arm9tdmicc
2405 57|sansam200v4)
2406 target_id=52
2407 modelname="sansam200v4"
2408 target="SANSA_M200V4"
2409 memory=2
2410 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2411 bmp2rb_native="$bmp2rb_mono"
2412 tool="$rootdir/tools/scramble -add=m2v4"
2413 output="rockbox.sansa"
2414 bootoutput="bootloader-m200v4.sansa"
2415 appextra="recorder:gui:radio"
2416 plugins="yes"
2417 swcodec="yes"
2418 toolset=$scramblebitmaptools
2419 t_cpu="arm"
2420 t_manufacturer="as3525"
2421 t_model="sansa-m200v4"
2422 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2423 arm9tdmicc
2424 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2428 58|sansafuze)
2429 target_id=53
2430 modelname="sansafuze"
2431 target="SANSA_FUZE"
2432 memory=8
2433 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2434 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2435 tool="$rootdir/tools/scramble -add=fuze"
2436 output="rockbox.sansa"
2437 bootoutput="bootloader-fuze.sansa"
2438 appextra="recorder:gui:radio"
2439 plugins="yes"
2440 swcodec="yes"
2441 toolset=$scramblebitmaptools
2442 t_cpu="arm"
2443 t_manufacturer="as3525"
2444 t_model="sansa-fuze"
2445 arm9tdmicc
2449 59|sansac200v2)
2450 target_id=55
2451 modelname="sansac200v2"
2452 target="SANSA_C200V2"
2453 memory=2 # as per OF diagnosis mode
2454 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2455 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2456 tool="$rootdir/tools/scramble -add=c2v2"
2457 output="rockbox.sansa"
2458 bootoutput="bootloader-c200v2.sansa"
2459 appextra="recorder:gui:radio"
2460 plugins="yes"
2461 swcodec="yes"
2462 # toolset is the tools within the tools directory that we build for
2463 # this particular target.
2464 toolset=$scramblebitmaptools
2465 # architecture, manufacturer and model for the target-tree build
2466 t_cpu="arm"
2467 t_manufacturer="as3525"
2468 t_model="sansa-c200v2"
2469 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2470 arm9tdmicc
2471 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2474 60|sansaclipv2)
2475 target_id=60
2476 modelname="sansaclipv2"
2477 target="SANSA_CLIPV2"
2478 memory=8
2479 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2480 bmp2rb_native="$bmp2rb_mono"
2481 tool="$rootdir/tools/scramble -add=clv2"
2482 output="rockbox.sansa"
2483 bootoutput="bootloader-clipv2.sansa"
2484 appextra="recorder:gui:radio"
2485 plugins="yes"
2486 swcodec="yes"
2487 toolset=$scramblebitmaptools
2488 t_cpu="arm"
2489 t_manufacturer="as3525"
2490 t_model="sansa-clipv2"
2491 arm926ejscc
2494 61|sansaview)
2495 echo "Sansa View is not yet supported!"
2496 exit 1
2497 target_id=63
2498 modelname="sansaview"
2499 target="SANSA_VIEW"
2500 memory=32
2501 arm1176jzscc
2502 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2503 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2504 output="rockbox.mi4"
2505 appextra="gui"
2506 plugins=""
2507 swcodec="yes"
2508 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2509 bootoutput="firmware.mi4"
2510 # toolset is the tools within the tools directory that we build for
2511 # this particular target.
2512 toolset=$scramblebitmaptools
2513 t_cpu="arm"
2514 t_soc="pp"
2515 t_manufacturer="sandisk"
2516 t_model="sansa-view"
2519 62|sansaclipplus)
2520 target_id=66
2521 modelname="sansaclipplus"
2522 target="SANSA_CLIPPLUS"
2523 memory=8
2524 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2525 bmp2rb_native="$bmp2rb_mono"
2526 tool="$rootdir/tools/scramble -add=cli+"
2527 output="rockbox.sansa"
2528 bootoutput="bootloader-clipplus.sansa"
2529 appextra="recorder:gui:radio"
2530 plugins="yes"
2531 swcodec="yes"
2532 toolset=$scramblebitmaptools
2533 t_cpu="arm"
2534 t_manufacturer="as3525"
2535 t_model="sansa-clipplus"
2536 arm926ejscc
2539 63|sansafuzev2)
2540 target_id=68
2541 modelname="sansafuzev2"
2542 target="SANSA_FUZEV2"
2543 memory=8 # not sure
2544 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2545 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2546 tool="$rootdir/tools/scramble -add=fuz2"
2547 output="rockbox.sansa"
2548 bootoutput="bootloader-fuzev2.sansa"
2549 appextra="recorder:gui:radio"
2550 plugins="yes"
2551 swcodec="yes"
2552 toolset=$scramblebitmaptools
2553 t_cpu="arm"
2554 t_manufacturer="as3525"
2555 t_model="sansa-fuzev2"
2556 arm926ejscc
2559 64|sansafuzeplus)
2560 target_id=80
2561 modelname="sansafuzeplus"
2562 target="SANSA_FUZEPLUS"
2563 memory=64
2564 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2565 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2566 tool="$rootdir/tools/scramble -add=fuz+"
2567 output="rockbox.sansa"
2568 bootoutput="bootloader-fuzeplus.sansa"
2569 appextra="gui:recorder:radio"
2570 plugins="yes"
2571 swcodec="yes"
2572 toolset=$scramblebitmaptools
2573 t_cpu="arm"
2574 t_manufacturer="imx233"
2575 t_model="sansa-fuzeplus"
2576 arm926ejscc
2579 65|sansaclipzip)
2580 target_id=68
2581 modelname="sansaclipzip"
2582 target="SANSA_CLIPZIP"
2583 memory=8 # not sure
2584 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2585 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2586 tool="$rootdir/tools/scramble -add=clzp"
2587 output="rockbox.sansa"
2588 bootoutput="bootloader-clipzip.sansa"
2589 appextra="recorder:gui:radio"
2590 plugins="yes"
2591 swcodec="yes"
2592 toolset=$scramblebitmaptools
2593 t_cpu="arm"
2594 t_manufacturer="as3525"
2595 t_model="sansa-clipzip"
2596 arm926ejscc
2599 66|sansaconnect)
2600 target_id=81
2601 modelname="sansaconnect"
2602 target="SANSA_CONNECT"
2603 memory=64
2604 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2605 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2606 tool="$rootdir/tools/scramble -add=conn"
2607 output="rockbox.sansa"
2608 bootoutput="bootloader-connect.sansa"
2609 appextra="recorder:gui"
2610 plugins="yes"
2611 swcodec="yes"
2612 toolset=$scramblebitmaptools
2613 t_cpu="arm"
2614 t_manufacturer="tms320dm320"
2615 t_model="sansa-connect"
2616 arm926ejscc
2619 150|tatungtpj1022)
2620 target_id=25
2621 modelname="tatungtpj1022"
2622 target="TATUNG_TPJ1022"
2623 memory=32 # always
2624 arm7tdmicc
2625 tool="$rootdir/tools/scramble -add tpj2"
2626 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2627 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2628 output="rockbox.elio"
2629 appextra="recorder:gui:radio"
2630 plugins="yes"
2631 swcodec="yes"
2632 boottool="$rootdir/tools/scramble -mi4v2"
2633 bootoutput="pp5020.mi4"
2634 # toolset is the tools within the tools directory that we build for
2635 # this particular target.
2636 toolset=$scramblebitmaptools
2637 # architecture, manufacturer and model for the target-tree build
2638 t_cpu="arm"
2639 t_soc="pp"
2640 t_manufacturer="tatung"
2641 t_model="tpj1022"
2644 100|gogearsa9200)
2645 target_id=41
2646 modelname="gogearsa9200"
2647 target="PHILIPS_SA9200"
2648 memory=32 # supposedly
2649 arm7tdmicc
2650 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2651 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2652 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2653 output="rockbox.mi4"
2654 appextra="recorder:gui:radio"
2655 plugins="yes"
2656 swcodec="yes"
2657 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2658 bootoutput="FWImage.ebn"
2659 # toolset is the tools within the tools directory that we build for
2660 # this particular target.
2661 toolset=$scramblebitmaptools
2662 # architecture, manufacturer and model for the target-tree build
2663 t_cpu="arm"
2664 t_soc="pp"
2665 t_manufacturer="philips"
2666 t_model="sa9200"
2669 101|gogearhdd1630)
2670 target_id=43
2671 modelname="gogearhdd1630"
2672 target="PHILIPS_HDD1630"
2673 memory=32 # supposedly
2674 arm7tdmicc
2675 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2676 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2677 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2678 output="rockbox.mi4"
2679 appextra="recorder:gui:radio"
2680 plugins="yes"
2681 swcodec="yes"
2682 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2683 bootoutput="FWImage.ebn"
2684 # toolset is the tools within the tools directory that we build for
2685 # this particular target.
2686 toolset=$scramblebitmaptools
2687 # architecture, manufacturer and model for the target-tree build
2688 t_cpu="arm"
2689 t_soc="pp"
2690 t_manufacturer="philips"
2691 t_model="hdd1630"
2694 102|gogearhdd6330)
2695 target_id=65
2696 modelname="gogearhdd6330"
2697 target="PHILIPS_HDD6330"
2698 memory=64 # always
2699 arm7tdmicc
2700 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2701 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2702 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2703 output="rockbox.mi4"
2704 appextra="recorder:gui:radio"
2705 plugins="yes"
2706 swcodec="yes"
2707 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2708 bootoutput="FWImage.ebn"
2709 # toolset is the tools within the tools directory that we build for
2710 # this particular target.
2711 toolset=$scramblebitmaptools
2712 # architecture, manufacturer and model for the target-tree build
2713 t_cpu="arm"
2714 t_soc="pp"
2715 t_manufacturer="philips"
2716 t_model="hdd6330"
2719 110|meizum6sl)
2720 target_id=49
2721 modelname="meizum6sl"
2722 target="MEIZU_M6SL"
2723 memory=16 # always
2724 arm940tbecc
2725 tool="cp"
2726 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2727 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2728 output="rockbox.meizu"
2729 appextra="recorder:gui:radio"
2730 plugins="no" #FIXME
2731 swcodec="yes"
2732 toolset=$genericbitmaptools
2733 boottool="cp"
2734 bootoutput="rockboot.ebn"
2735 # architecture, manufacturer and model for the target-tree build
2736 t_cpu="arm"
2737 t_manufacturer="s5l8700"
2738 t_model="meizu-m6sl"
2741 111|meizum6sp)
2742 target_id=46
2743 modelname="meizum6sp"
2744 target="MEIZU_M6SP"
2745 memory=16 # always
2746 arm940tbecc
2747 tool="cp"
2748 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2749 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2750 output="rockbox.meizu"
2751 appextra="recorder:gui:radio"
2752 plugins="no" #FIXME
2753 swcodec="yes"
2754 toolset=$genericbitmaptools
2755 boottool="cp"
2756 bootoutput="rockboot.ebn"
2757 # architecture, manufacturer and model for the target-tree build
2758 t_cpu="arm"
2759 t_manufacturer="s5l8700"
2760 t_model="meizu-m6sp"
2763 112|meizum3)
2764 target_id=47
2765 modelname="meizum3"
2766 target="MEIZU_M3"
2767 memory=16 # always
2768 arm940tbecc
2769 tool="cp"
2770 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2771 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2772 output="rockbox.meizu"
2773 appextra="recorder:gui:radio"
2774 plugins="no" #FIXME
2775 swcodec="yes"
2776 toolset=$genericbitmaptools
2777 boottool="cp"
2778 bootoutput="rockboot.ebn"
2779 # architecture, manufacturer and model for the target-tree build
2780 t_cpu="arm"
2781 t_manufacturer="s5l8700"
2782 t_model="meizu-m3"
2785 120|ondavx747)
2786 target_id=45
2787 modelname="ondavx747"
2788 target="ONDA_VX747"
2789 memory=16
2790 mipselcc
2791 tool="$rootdir/tools/scramble -add=x747"
2792 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2793 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2794 output="rockbox.vx747"
2795 appextra="recorder:gui:radio"
2796 plugins="yes"
2797 swcodec="yes"
2798 toolset=$genericbitmaptools
2799 boottool="$rootdir/tools/scramble -ccpmp"
2800 bootoutput="ccpmp.bin"
2801 # architecture, manufacturer and model for the target-tree build
2802 t_cpu="mips"
2803 t_manufacturer="ingenic_jz47xx"
2804 t_model="onda_vx747"
2807 121|ondavx767)
2808 target_id=64
2809 modelname="ondavx767"
2810 target="ONDA_VX767"
2811 memory=16 #FIXME
2812 mipselcc
2813 tool="cp"
2814 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2815 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2816 output="rockbox.vx767"
2817 appextra="recorder:gui:radio"
2818 plugins="" #FIXME
2819 swcodec="yes"
2820 toolset=$genericbitmaptools
2821 boottool="$rootdir/tools/scramble -ccpmp"
2822 bootoutput="ccpmp.bin"
2823 # architecture, manufacturer and model for the target-tree build
2824 t_cpu="mips"
2825 t_manufacturer="ingenic_jz47xx"
2826 t_model="onda_vx767"
2829 122|ondavx747p)
2830 target_id=54
2831 modelname="ondavx747p"
2832 target="ONDA_VX747P"
2833 memory=16
2834 mipselcc
2835 tool="$rootdir/tools/scramble -add=747p"
2836 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2837 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2838 output="rockbox.vx747p"
2839 appextra="recorder:gui:radio"
2840 plugins="yes"
2841 swcodec="yes"
2842 toolset=$genericbitmaptools
2843 boottool="$rootdir/tools/scramble -ccpmp"
2844 bootoutput="ccpmp.bin"
2845 # architecture, manufacturer and model for the target-tree build
2846 t_cpu="mips"
2847 t_manufacturer="ingenic_jz47xx"
2848 t_model="onda_vx747"
2851 123|ondavx777)
2852 target_id=61
2853 modelname="ondavx777"
2854 target="ONDA_VX777"
2855 memory=16
2856 mipselcc
2857 tool="$rootdir/tools/scramble -add=x777"
2858 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2859 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2860 output="rockbox.vx777"
2861 appextra="recorder:gui:radio"
2862 plugins="yes"
2863 swcodec="yes"
2864 toolset=$genericbitmaptools
2865 boottool="$rootdir/tools/scramble -ccpmp"
2866 bootoutput="ccpmp.bin"
2867 # architecture, manufacturer and model for the target-tree build
2868 t_cpu="mips"
2869 t_manufacturer="ingenic_jz47xx"
2870 t_model="onda_vx747"
2873 130|lyreproto1)
2874 target_id=56
2875 modelname="lyreproto1"
2876 target="LYRE_PROTO1"
2877 memory=64
2878 arm926ejscc
2879 tool="cp"
2880 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2881 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2882 output="rockbox.lyre"
2883 appextra="recorder:gui:radio"
2884 plugins=""
2885 swcodec="yes"
2886 toolset=$scramblebitmaptools
2887 boottool="cp"
2888 bootoutput="bootloader-proto1.lyre"
2889 # architecture, manufacturer and model for the target-tree build
2890 t_cpu="arm"
2891 t_manufacturer="at91sam"
2892 t_model="lyre_proto1"
2895 131|mini2440)
2896 target_id=99
2897 modelname="mini2440"
2898 target="MINI2440"
2899 memory=64
2900 arm9tdmicc
2901 tool="$rootdir/tools/scramble -add=m244"
2902 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2903 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2904 output="rockbox.mini2440"
2905 appextra="recorder:gui:radio"
2906 plugins=""
2907 swcodec="yes"
2908 toolset=$scramblebitmaptools
2909 boottool="cp"
2910 bootoutput="bootloader-mini2440.lyre"
2911 # architecture, manufacturer and model for the target-tree build
2912 t_cpu="arm"
2913 t_manufacturer="s3c2440"
2914 t_model="mini2440"
2917 140|samsungyh820)
2918 target_id=57
2919 modelname="samsungyh820"
2920 target="SAMSUNG_YH820"
2921 memory=32 # always
2922 arm7tdmicc
2923 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2924 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2925 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2926 output="rockbox.mi4"
2927 appextra="recorder:gui:radio"
2928 plugins="yes"
2929 swcodec="yes"
2930 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2931 bootoutput="FW_YH820.mi4"
2932 # toolset is the tools within the tools directory that we build for
2933 # this particular target.
2934 toolset=$scramblebitmaptools
2935 # architecture, manufacturer and model for the target-tree build
2936 t_cpu="arm"
2937 t_soc="pp"
2938 t_manufacturer="samsung"
2939 t_model="yh820"
2942 141|samsungyh920)
2943 target_id=58
2944 modelname="samsungyh920"
2945 target="SAMSUNG_YH920"
2946 memory=32 # always
2947 arm7tdmicc
2948 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2949 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2950 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2951 output="rockbox.mi4"
2952 appextra="recorder:gui:radio"
2953 plugins="yes"
2954 swcodec="yes"
2955 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2956 bootoutput="PP5020.mi4"
2957 # toolset is the tools within the tools directory that we build for
2958 # this particular target.
2959 toolset=$scramblebitmaptools
2960 # architecture, manufacturer and model for the target-tree build
2961 t_cpu="arm"
2962 t_soc="pp"
2963 t_manufacturer="samsung"
2964 t_model="yh920"
2967 142|samsungyh925)
2968 target_id=59
2969 modelname="samsungyh925"
2970 target="SAMSUNG_YH925"
2971 memory=32 # always
2972 arm7tdmicc
2973 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2974 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2975 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2976 output="rockbox.mi4"
2977 appextra="recorder:gui:radio"
2978 plugins="yes"
2979 swcodec="yes"
2980 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2981 bootoutput="FW_YH925.mi4"
2982 # toolset is the tools within the tools directory that we build for
2983 # this particular target.
2984 toolset=$scramblebitmaptools
2985 # architecture, manufacturer and model for the target-tree build
2986 t_cpu="arm"
2987 t_soc="pp"
2988 t_manufacturer="samsung"
2989 t_model="yh925"
2992 143|samsungyps3)
2993 target_id=72
2994 modelname="samsungyps3"
2995 target="SAMSUNG_YPS3"
2996 memory=16 # always
2997 arm940tbecc
2998 tool="cp"
2999 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3000 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3001 output="rockbox.yps3"
3002 appextra="recorder:gui:radio"
3003 plugins="no" #FIXME
3004 swcodec="yes"
3005 toolset=$genericbitmaptools
3006 boottool="cp"
3007 bootoutput="rockboot.ebn"
3008 # architecture, manufacturer and model for the target-tree build
3009 t_cpu="arm"
3010 t_manufacturer="s5l8700"
3011 t_model="yps3"
3014 160|vibe500)
3015 target_id=67
3016 modelname="vibe500"
3017 target="PBELL_VIBE500"
3018 memory=32 # always
3019 arm7tdmicc
3020 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
3021 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3022 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
3023 output="rockbox.mi4"
3024 appextra="recorder:gui:radio"
3025 plugins="yes"
3026 swcodec="yes"
3027 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
3028 bootoutput="jukebox.mi4"
3029 # toolset is the tools within the tools directory that we build for
3030 # this particular target.
3031 toolset=$scramblebitmaptools
3032 # architecture, manufacturer and model for the target-tree build
3033 t_cpu="arm"
3034 t_soc="pp"
3035 t_manufacturer="pbell"
3036 t_model="vibe500"
3039 170|mpiohd200)
3040 target_id=69
3041 modelname="mpiohd200"
3042 target="MPIO_HD200"
3043 memory=16 # always
3044 coldfirecc
3045 tool="$rootdir/tools/scramble -add=hd20"
3046 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3047 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
3048 output="rockbox.mpio"
3049 bootoutput="bootloader.mpio"
3050 appextra="recorder:gui:radio"
3051 plugins="yes"
3052 swcodec="yes"
3053 # toolset is the tools within the tools directory that we build for
3054 # this particular target.
3055 toolset="$genericbitmaptools"
3056 # architecture, manufacturer and model for the target-tree build
3057 t_cpu="coldfire"
3058 t_manufacturer="mpio"
3059 t_model="hd200"
3062 171|mpiohd300)
3063 target_id=70
3064 modelname="mpiohd300"
3065 target="MPIO_HD300"
3066 memory=16 # always
3067 coldfirecc
3068 tool="$rootdir/tools/scramble -add=hd30"
3069 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3070 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
3071 output="rockbox.mpio"
3072 bootoutput="bootloader.mpio"
3073 appextra="recorder:gui:radio"
3074 plugins="yes"
3075 swcodec="yes"
3076 # toolset is the tools within the tools directory that we build for
3077 # this particular target.
3078 toolset="$genericbitmaptools"
3079 # architecture, manufacturer and model for the target-tree build
3080 t_cpu="coldfire"
3081 t_manufacturer="mpio"
3082 t_model="hd300"
3085 180|rk27generic)
3086 target_id=78
3087 modelname="rk27generic"
3088 target="RK27_GENERIC"
3089 memory=16 # always
3090 arm7ejscc
3091 tool="$rootdir/tools/scramble -rkw -modelnum=73"
3092 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3093 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3094 output="rockbox.rkw"
3095 bootoutput="bootloader.rkw"
3096 appextra="recorder:gui:radio"
3097 plugins="yes"
3098 swcodec="yes"
3099 # toolset is the tools within the tools directory that we build for
3100 # this particular target.
3101 toolset="$genericbitmaptools"
3102 # architecture, manufacturer and model for the target-tree build
3103 t_cpu="arm"
3104 t_manufacturer="rk27xx"
3105 t_model="rk27generic"
3108 190|hifimanhm60x)
3109 target_id=79
3110 modelname="hifimanhm60x"
3111 target="HM60X"
3112 memory=16
3113 arm7ejscc
3114 tool="$rootdir/tools/scramble -rkw -modelnum=79"
3115 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3116 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3117 output="rockbox.rkw"
3118 bootoutput="bootloader.rkw"
3119 appextra="recorder:gui"
3120 plugins="yes"
3121 swcodec="yes"
3122 # toolset is the tools within the tools directory that we build for
3123 # this particular target.
3124 toolset="$genericbitmaptools"
3125 # architecture, manufacturer and model for the target-tree build
3126 t_cpu="arm"
3127 t_manufacturer="rk27xx"
3128 t_model="hm60x"
3131 191|hifimanhm801)
3132 target_id=82
3133 modelname="hifimanhm801"
3134 target="HM801"
3135 memory=16
3136 arm7ejscc
3137 tool="$rootdir/tools/scramble -rkw -modelnum=82"
3138 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3139 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3140 output="rockbox.rkw"
3141 bootoutput="bootloader.rkw"
3142 appextra="recorder:gui"
3143 plugins="yes"
3144 swcodec="yes"
3145 # toolset is the tools within the tools directory that we build for
3146 # this particular target.
3147 toolset="$genericbitmaptools"
3148 # architecture, manufacturer and model for the target-tree build
3149 t_cpu="arm"
3150 t_manufacturer="rk27xx"
3151 t_model="hm801"
3154 200|sdlapp)
3155 application="yes"
3156 target_id=73
3157 modelname="sdlapp"
3158 target="SDLAPP"
3159 app_set_paths
3160 app_set_lcd_size
3161 memory=8
3162 uname=`uname`
3163 simcc "sdl-app"
3164 tool="cp "
3165 boottool="cp "
3166 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3167 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3168 output="rockbox"
3169 bootoutput="rockbox"
3170 appextra="recorder:gui:radio"
3171 plugins="yes"
3172 swcodec="yes"
3173 # architecture, manufacturer and model for the target-tree build
3174 t_cpu="hosted"
3175 t_manufacturer="sdl"
3176 t_model="app"
3179 201|android)
3180 application="yes"
3181 target_id=74
3182 modelname="android"
3183 target="ANDROID"
3184 app_type="android"
3185 app_set_lcd_size
3186 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
3187 bindir="/data/data/org.rockbox/lib"
3188 libdir="/data/data/org.rockbox/app_rockbox"
3189 memory=8
3190 uname=`uname`
3191 androidcc
3192 tool="cp "
3193 boottool="cp "
3194 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3195 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3196 output="librockbox.so"
3197 bootoutput="librockbox.so"
3198 appextra="recorder:gui:radio:hosted/android"
3199 plugins="yes"
3200 swcodec="yes"
3201 # architecture, manufacturer and model for the target-tree build
3202 t_cpu="hosted"
3203 t_manufacturer="android"
3204 t_model="app"
3207 202|nokian8xx)
3208 application="yes"
3209 target_id=75
3210 modelname="nokian8xx"
3211 app_type="sdl-app"
3212 target="NOKIAN8XX"
3213 sharedir="/opt/rockbox/share/rockbox"
3214 bindir="/opt/rockbox/bin"
3215 libdir="/opt/rockbox/lib"
3216 memory=8
3217 uname=`uname`
3218 maemocc 4
3219 tool="cp "
3220 boottool="cp "
3221 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3222 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3223 output="rockbox"
3224 bootoutput="rockbox"
3225 appextra="recorder:gui:radio"
3226 plugins="yes"
3227 swcodec="yes"
3228 # architecture, manufacturer and model for the target-tree build
3229 t_cpu="hosted"
3230 t_manufacturer="maemo"
3231 t_model="app"
3234 203|nokian900)
3235 application="yes"
3236 target_id=76
3237 modelname="nokian900"
3238 app_type="sdl-app"
3239 target="NOKIAN900"
3240 sharedir="/opt/rockbox/share/rockbox"
3241 bindir="/opt/rockbox/bin"
3242 libdir="/opt/rockbox/lib"
3243 memory=8
3244 uname=`uname`
3245 maemocc 5
3246 tool="cp "
3247 boottool="cp "
3248 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3249 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3250 output="rockbox"
3251 bootoutput="rockbox"
3252 appextra="recorder:gui:radio"
3253 plugins="yes"
3254 swcodec="yes"
3255 # architecture, manufacturer and model for the target-tree build
3256 t_cpu="hosted"
3257 t_manufacturer="maemo"
3258 t_model="app"
3261 204|pandora)
3262 application="yes"
3263 target_id=77
3264 modelname="pandora"
3265 app_type="sdl-app"
3266 target="PANDORA"
3267 sharedir="rockbox/share/rockbox"
3268 bindir="rockbox/bin"
3269 libdir="rockbox/lib"
3270 memory=8
3271 uname=`uname`
3272 pandoracc
3273 tool="cp "
3274 boottool="cp "
3275 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3276 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3277 output="rockbox"
3278 bootoutput="rockbox"
3279 appextra="recorder:gui:radio"
3280 plugins="yes"
3281 swcodec="yes"
3282 # architecture, manufacturer and model for the target-tree build
3283 t_cpu="hosted"
3284 t_manufacturer="pandora"
3285 t_model="app"
3288 205|samsungypr0)
3289 application="yes"
3290 target_id=78
3291 modelname="samsungypr0"
3292 target="SAMSUNG_YPR0"
3293 memory=32
3294 uname=`uname`
3295 ypr0cc
3296 tool="cp "
3297 boottool="cp "
3298 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3299 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3300 output="rockbox"
3301 bootoutput="rockbox"
3302 appextra="recorder:gui:radio"
3303 plugins="yes"
3304 swcodec="yes"
3305 # architecture, manufacturer and model for the target-tree build
3306 t_cpu="hosted"
3307 t_manufacturer="ypr0"
3308 t_model="app"
3312 echo "Please select a supported target platform!"
3313 exit 7
3316 esac
3318 echo "Platform set to $modelname"
3321 #remove start
3322 ############################################################################
3323 # Amount of memory, for those that can differ. They have $memory unset at
3324 # this point.
3327 if [ -z "$memory" ]; then
3328 case $target_id in
3330 if [ "$ARG_RAM" ]; then
3331 size=$ARG_RAM
3332 else
3333 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3334 size=`input`;
3336 case $size in
3337 60|64)
3338 memory="64"
3341 memory="32"
3343 esac
3346 if [ "$ARG_RAM" ]; then
3347 size=$ARG_RAM
3348 else
3349 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3350 size=`input`;
3352 case $size in
3354 memory="8"
3357 memory="2"
3359 esac
3361 esac
3362 echo "Memory size selected: $memory MB"
3363 [ "$ARG_TYPE" ] || echo ""
3365 #remove end
3367 ##################################################################
3368 # Figure out build "type"
3371 # the ifp7x0 is the only platform that supports building a gdb stub like
3372 # this
3373 case $modelname in
3374 iriverifp7xx)
3375 gdbstub=", (G)DB stub"
3377 sansae200r|sansae200)
3378 gdbstub=", (I)nstaller"
3380 sansac200)
3381 gdbstub=", (E)raser"
3383 sansae200)
3384 gdbstub=", (E)raser"
3388 esac
3389 if [ "$ARG_TYPE" ]; then
3390 btype=$ARG_TYPE
3391 else
3392 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (W)arble codec tool$gdbstub: (Defaults to N)"
3393 btype=`input`;
3396 case $btype in
3397 [Ii])
3398 appsdir='$(ROOTDIR)/bootloader'
3399 apps="bootloader"
3400 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3401 bootloader="1"
3402 echo "e200R-installer build selected"
3404 [Ee])
3405 appsdir='$(ROOTDIR)/bootloader'
3406 apps="bootloader"
3407 extradefines="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3408 bootloader="1"
3409 echo "sansa eraser build selected"
3411 [Bb])
3412 if test $t_manufacturer = "archos"; then
3413 # Archos SH-based players do this somewhat differently for
3414 # some reason
3415 appsdir='$(ROOTDIR)/flash/bootbox'
3416 apps="bootbox"
3417 else
3418 appsdir='$(ROOTDIR)/bootloader'
3419 apps="bootloader"
3420 flash=""
3421 if test -n "$boottool"; then
3422 tool="$boottool"
3424 if test -n "$bootoutput"; then
3425 output=$bootoutput
3428 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3429 bootloader="1"
3430 echo "Bootloader build selected"
3432 [Ss])
3433 if [ "$modelname" = "sansae200r" ]; then
3434 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3435 exit 8
3437 debug="-DDEBUG"
3438 simulator="yes"
3439 extradefines="$extradefines -DSIMULATOR"
3440 archosrom=""
3441 flash=""
3442 echo "Simulator build selected"
3444 [Aa]*)
3445 echo "Advanced build selected"
3446 whichadvanced $btype
3448 [Gg])
3449 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3450 appsdir='$(ROOTDIR)/gdb'
3451 apps="stub"
3452 case $modelname in
3453 iriverifp7xx)
3454 output="stub.wma"
3458 esac
3459 echo "GDB stub build selected"
3461 [Cc])
3462 uname=`uname`
3463 simcc "checkwps"
3464 toolset='';
3465 t_cpu='';
3466 GCCOPTS='';
3467 extradefines="$extradefines -DDEBUG"
3468 appsdir='$(ROOTDIR)/tools/checkwps';
3469 output='checkwps.'${modelname};
3470 archosrom='';
3471 echo "CheckWPS build selected"
3473 [Dd])
3474 uname=`uname`
3475 simcc "database"
3476 toolset='';
3477 t_cpu='';
3478 GCCOPTS='';
3479 appsdir='$(ROOTDIR)/tools/database';
3480 archosrom='';
3482 case $uname in
3483 CYGWIN*|MINGW*)
3484 output="database_${modelname}.exe"
3487 output='database.'${modelname};
3489 esac
3491 echo "Database tool build selected"
3493 [Ww])
3494 uname=`uname`
3495 simcc "warble"
3496 toolset='';
3497 t_cpu='';
3498 GCCOPTS='';
3499 extradefines="$extradefines -DDEBUG"
3500 output='warble.'${modelname};
3501 archosrom='';
3502 echo "Warble build selected"
3505 if [ "$modelname" = "sansae200r" ]; then
3506 echo "Do not use the e200R target for regular builds. Use e200 instead."
3507 exit 8
3509 debug=""
3510 btype="N" # set it explicitly since RET only gets here as well
3511 echo "Normal build selected"
3514 esac
3515 # to be able running "make manual" from non-manual configuration
3516 case $modelname in
3517 archosrecorderv2)
3518 manualdev="archosfmrecorder"
3520 iriverh1??)
3521 manualdev="iriverh100"
3523 ipodmini2g)
3524 manualdev="ipodmini1g"
3527 manualdev=$modelname
3529 esac
3531 if [ -z "$debug" ]; then
3532 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3535 if [ "yes" = "$application" ]; then
3536 echo Building Rockbox as an Application
3537 extradefines="$extradefines -DAPPLICATION"
3540 echo "Using source code root directory: $rootdir"
3542 # this was once possible to change at build-time, but no more:
3543 language="english"
3545 uname=`uname`
3547 if [ "yes" = "$simulator" ]; then
3548 # setup compiler and things for simulator
3549 simcc "sdl-sim"
3551 if [ -d "simdisk" ]; then
3552 echo "Subdirectory 'simdisk' already present"
3553 else
3554 mkdir simdisk
3555 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3559 # Now, figure out version number of the (gcc) compiler we are about to use
3560 gccver=`$CC -dumpversion`;
3562 # figure out the binutil version too and display it, mostly for the build
3563 # system etc to be able to see it easier
3564 if [ $uname = "Darwin" ]; then
3565 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3566 else
3567 ldver=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
3570 if [ -z "$gccver" ]; then
3571 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3572 echo "[WARNING] this may cause your build to fail since we cannot do the"
3573 echo "[WARNING] checks we want now."
3574 else
3576 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3577 # DEPEND on it
3579 num1=`echo $gccver | cut -d . -f1`
3580 num2=`echo $gccver | cut -d . -f2`
3581 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3583 # This makes:
3584 # 3.3.X => 303
3585 # 3.4.X => 304
3586 # 2.95.3 => 295
3588 echo "Using $CC $gccver ($gccnum)"
3590 if test "$gccnum" -ge "400"; then
3591 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3592 # so we ignore that warnings for now
3593 # -Wno-pointer-sign
3594 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3597 if test "$gccnum" -ge "402"; then
3598 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3599 # and later would throw it for several valid cases
3600 GCCOPTS="$GCCOPTS -Wno-override-init"
3603 case $prefix in
3604 ""|"$CROSS_COMPILE")
3605 # simulator
3608 # Verify that the cross-compiler is of a recommended version!
3609 if test "$gccver" != "$gccchoice"; then
3610 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3611 echo "WARNING: version $gccchoice!"
3612 echo "WARNING: This may cause your build to fail since it may be a version"
3613 echo "WARNING: that isn't functional or known to not be the best choice."
3614 echo "WARNING: If you suffer from build problems, you know that this is"
3615 echo "WARNING: a likely source for them..."
3618 esac
3623 echo "Using $LD $ldver"
3625 # check the compiler for SH platforms
3626 if test "$CC" = "sh-elf-gcc"; then
3627 if test "$gccnum" -lt "400"; then
3628 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3629 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3630 else
3631 # figure out patch status
3632 gccpatch=`$CC --version`;
3634 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3635 echo "gcc $gccver is rockbox patched"
3636 # then convert -O to -Os to get smaller binaries!
3637 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3638 else
3639 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3640 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3645 if test "$CC" = "m68k-elf-gcc"; then
3646 # convert -O to -Os to get smaller binaries!
3647 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3650 if [ "$ARG_CCACHE" = "1" ]; then
3651 echo "Enable ccache for building"
3652 ccache="ccache"
3653 elif [ "$ARG_CCACHE" != "0" ]; then
3654 ccache=`findtool ccache`
3655 if test -n "$ccache"; then
3656 echo "Found and uses ccache ($ccache)"
3660 # figure out the full path to the various commands if possible
3661 HOSTCC=`findtool gcc --lit`
3662 HOSTAR=`findtool ar --lit`
3663 CC=`findtool ${CC} --lit`
3664 CPP=`findtool ${CPP} --lit`
3665 LD=`findtool ${LD} --lit`
3666 AR=`findtool ${AR} --lit`
3667 AS=`findtool ${AS} --lit`
3668 OC=`findtool ${OC} --lit`
3669 WINDRES=`findtool ${WINDRES} --lit`
3670 DLLTOOL=`findtool ${DLLTOOL} --lit`
3671 DLLWRAP=`findtool ${DLLWRAP} --lit`
3672 RANLIB=`findtool ${RANLIB} --lit`
3675 if [ -z "$arch" ]; then
3676 cpp_defines=$(echo "" | $CPP -dD)
3677 if [ -n "$(echo $cpp_defines | grep -w __sh__)" ]; then
3678 arch="sh"
3679 elif [ -n "$(echo $cpp_defines | grep -w __m68k__)" ]; then
3680 arch="m68k"
3681 elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then
3682 arch="arm"
3683 # cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4)
3684 arch_version="$(echo $cpp_defines | sed s,\ ,\\n,g | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,')"
3685 elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
3686 arch="mips" # FIXME: autodetect version (32 or 64)
3687 elif [ -n "$(echo $cpp_defines | grep -w _X86_)" ]; then
3688 arch="x86"
3689 elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
3690 arch="amd64"
3691 else
3692 arch="none"
3693 echo "Warning: Could not determine target arch"
3695 if [ "$arch" != "none" ]; then
3696 if [ -n "$arch_version" ]; then
3697 echo "Automatically selected arch: $arch (ver $arch_version)"
3698 else
3699 echo "Automatically selected arch: $arch"
3702 else
3703 if [ -n "$arch_version" ]; then
3704 echo "Manually selected arch: $arch (ver $arch_version)"
3705 else
3706 echo "Manually selected arch: $arch"
3710 arch="arch_$arch"
3711 if [ -n "$arch_version" ]; then
3712 Darch_version="#define ARCH_VERSION $arch_version"
3715 if test -n "$ccache"; then
3716 CC="$ccache $CC"
3719 if test "$ARG_ARM_THUMB" = "1"; then
3720 extradefines="$extradefines -DUSE_THUMB"
3721 CC="$toolsdir/thumb-cc.py $CC"
3724 if test "X$endian" = "Xbig"; then
3725 defendian="ROCKBOX_BIG_ENDIAN"
3726 else
3727 defendian="ROCKBOX_LITTLE_ENDIAN"
3730 if [ "$ARG_RBDIR" != "" ]; then
3731 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3732 rbdir="/"$ARG_RBDIR
3733 else
3734 rbdir=$ARG_RBDIR
3736 echo "Using alternate rockbox dir: ${rbdir}"
3739 cat > autoconf.h <<EOF
3740 /* This header was made by configure */
3741 #ifndef __BUILD_AUTOCONF_H
3742 #define __BUILD_AUTOCONF_H
3744 /* lower case names match the what's exported in the Makefile
3745 * upper case name looks nicer in the code */
3747 #define arch_none 0
3748 #define ARCH_NONE 0
3750 #define arch_sh 1
3751 #define ARCH_SH 1
3753 #define arch_m68k 2
3754 #define ARCH_M68K 2
3756 #define arch_arm 3
3757 #define ARCH_ARM 3
3759 #define arch_mips 4
3760 #define ARCH_MIPS 4
3762 #define arch_x86 5
3763 #define ARCH_X86 5
3765 #define arch_amd64 6
3766 #define ARCH_AMD64 6
3768 /* Define target machine architecture */
3769 #define ARCH ${arch}
3770 /* Optinally define architecture version */
3771 ${Darch_version}
3773 /* Define endianess for the target or simulator platform */
3774 #define ${defendian} 1
3776 /* Define this if you build rockbox to support the logf logging and display */
3777 ${use_logf}
3779 /* Define this if you want logf to output to the serial port */
3780 ${use_logf_serial}
3782 /* Define this to record a chart with timings for the stages of boot */
3783 ${use_bootchart}
3785 /* optional define for a backlight modded Ondio */
3786 ${have_backlight}
3788 /* optional define for FM radio mod for iAudio M5 */
3789 ${have_fmradio_in}
3791 /* optional define for ATA poweroff on Player */
3792 ${have_ata_poweroff}
3794 /* optional defines for RTC mod for h1x0 */
3795 ${config_rtc}
3796 ${have_rtc_alarm}
3798 /* the threading backend we use */
3799 #define ${thread_support}
3801 /* lcd dimensions for application builds from configure */
3802 ${app_lcd_width}
3803 ${app_lcd_height}
3805 /* root of Rockbox */
3806 #define ROCKBOX_DIR "${rbdir}"
3807 #define ROCKBOX_SHARE_PATH "${sharedir}"
3808 #define ROCKBOX_BINARY_PATH "${bindir}"
3809 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3811 #endif /* __BUILD_AUTOCONF_H */
3814 if test -n "$t_cpu"; then
3815 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3817 if [ "$application" = "yes" ] && [ "$t_manufacturer" = "maemo" ]; then
3818 # Maemo needs the SDL port, too
3819 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3820 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3821 elif [ "$application" = "yes" ] && [ "$t_manufacturer" = "pandora" ]; then
3822 # Pandora needs the SDL port, too
3823 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3824 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3825 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3826 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3827 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3830 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3831 test -n "$t_soc" && TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3832 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3833 GCCOPTS="$GCCOPTS"
3836 if test "$swcodec" = "yes"; then
3837 voicetoolset="rbspeexenc voicefont wavtrim"
3838 else
3839 voicetoolset="voicefont wavtrim"
3842 if test "$apps" = "apps"; then
3843 # only when we build "real" apps we build the .lng files
3844 buildlangs="langs"
3847 #### Fix the cmdline ###
3848 if [ -n "$ARG_PREFIX" ]; then
3849 cmdline="$cmdline --prefix=\$(PREFIX)"
3851 if [ -n "$ARG_LCDWIDTH" ]; then
3852 cmdline="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3855 # remove parts from the cmdline we're going to set unconditionally
3856 cmdline=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3857 -e s,--ram=[0-9]\*,,g \
3858 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3859 -e s,--type=[a-zA-Z]\*,,g`
3860 cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3862 ### end of cmdline
3864 cat > Makefile <<EOF
3865 ## Automatically generated. http://www.rockbox.org/
3867 export ROOTDIR=${rootdir}
3868 export FIRMDIR=\$(ROOTDIR)/firmware
3869 export APPSDIR=${appsdir}
3870 export TOOLSDIR=${toolsdir}
3871 export DOCSDIR=${rootdir}/docs
3872 export MANUALDIR=${rootdir}/manual
3873 export DEBUG=${debug}
3874 export MODELNAME=${modelname}
3875 export ARCHOSROM=${archosrom}
3876 export FLASHFILE=${flash}
3877 export TARGET_ID=${target_id}
3878 export TARGET=-D${target}
3879 export ARCH=${arch}
3880 export ARCH_VERSION=${arch_version}
3881 export CPU=${t_cpu}
3882 export MANUFACTURER=${t_manufacturer}
3883 export OBJDIR=${pwd}
3884 export BUILDDIR=${pwd}
3885 export LANGUAGE=${language}
3886 export VOICELANGUAGE=${voicelanguage}
3887 export MEMORYSIZE=${memory}
3888 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3889 export MKFIRMWARE=${tool}
3890 export BMP2RB_MONO=${bmp2rb_mono}
3891 export BMP2RB_NATIVE=${bmp2rb_native}
3892 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3893 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3894 export BINARY=${output}
3895 export APPEXTRA=${appextra}
3896 export ENABLEDPLUGINS=${plugins}
3897 export SOFTWARECODECS=${swcodec}
3898 export EXTRA_DEFINES=${extradefines}
3899 export HOSTCC=${HOSTCC}
3900 export HOSTAR=${HOSTAR}
3901 export CC=${CC}
3902 export CPP=${CPP}
3903 export LD=${LD}
3904 export AR=${AR}
3905 export AS=${AS}
3906 export OC=${OC}
3907 export WINDRES=${WINDRES}
3908 export DLLTOOL=${DLLTOOL}
3909 export DLLWRAP=${DLLWRAP}
3910 export RANLIB=${RANLIB}
3911 export PREFIX=${ARG_PREFIX}
3912 export PROFILE_OPTS=${PROFILE_OPTS}
3913 export APP_TYPE=${app_type}
3914 export APPLICATION=${application}
3915 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3916 export GCCOPTS=${GCCOPTS}
3917 export TARGET_INC=${TARGET_INC}
3918 export LOADADDRESS=${loadaddress}
3919 export SHARED_LDFLAG=${SHARED_LDFLAG}
3920 export SHARED_CFLAGS=${SHARED_CFLAGS}
3921 export LDOPTS=${LDOPTS}
3922 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3923 export GCCVER=${gccver}
3924 export GCCNUM=${gccnum}
3925 export UNAME=${uname}
3926 export MANUALDEV=${manualdev}
3927 export TTS_OPTS=${TTS_OPTS}
3928 export TTS_ENGINE=${TTS_ENGINE}
3929 export ENC_OPTS=${ENC_OPTS}
3930 export ENCODER=${ENCODER}
3931 export USE_ELF=${USE_ELF}
3932 export RBDIR=${rbdir}
3933 export ROCKBOX_SHARE_PATH=${sharedir}
3934 export ROCKBOX_BINARY_PATH=${bindir}
3935 export ROCKBOX_LIBRARY_PATH=${libdir}
3936 export SDLCONFIG=${sdl}
3937 export LCDORIENTATION=${lcd_orientation}
3939 CONFIGURE_OPTIONS=${cmdline}
3941 include \$(TOOLSDIR)/root.make
3944 echo "Created Makefile"