Extension entries need an extra nul byte.
[kugel-rb.git] / tools / configure
blobb28d3c4c97492114daa9a042e5186bb33f93aa40
1 #!/bin/sh
2 # __________ __ ___.
3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 # \/ \/ \/ \/ \/
8 # $Id$
11 # global CC options for all platforms
12 CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
14 # global LD options for all platforms
15 GLOBAL_LDOPTS=""
17 extradefines=""
18 use_logf="#undef ROCKBOX_HAS_LOGF"
19 use_bootchart="#undef DO_BOOTCHART"
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=
32 cmdline="$@"
34 # Begin Function Definitions
36 input() {
37 read response
38 echo $response
41 prefixtools () {
42 prefix="$1"
43 CC=${prefix}gcc
44 WINDRES=${prefix}windres
45 DLLTOOL=${prefix}dlltool
46 DLLWRAP=${prefix}dllwrap
47 RANLIB=${prefix}ranlib
48 LD=${prefix}ld
49 AR=${prefix}ar
50 AS=${prefix}as
51 OC=${prefix}objcopy
54 app_set_paths () {
55 # setup files and paths depending on the platform
56 if [ -z "$ARG_PREFIX" ]; then
57 sharedir="/usr/local/share/rockbox"
58 bindir="/usr/local/bin"
59 libdir="/usr/local/lib"
60 else
61 if [ -d "$ARG_PREFIX" ]; then
62 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
63 ARG_PREFIX=`realpath $ARG_PREFIX`
64 if [ "0" != "$?" ]; then
65 echo "ERROR: Could not get prefix path (is realpath installed?)."
66 exit
69 sharedir="$ARG_PREFIX/share/rockbox"
70 bindir="$ARG_PREFIX/bin"
71 libdir="$ARG_PREFIX/lib"
72 else
73 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
74 exit
79 # Set the application LCD size according to the following priorities:
80 # 1) If --lcdwidth and --lcdheight are set, use them
81 # 2) If a size is passed to the app_set_lcd_size() function, use that
82 # 3) Otherwise ask the user
83 app_set_lcd_size () {
84 if [ -z "$ARG_LCDWIDTH" ]; then
85 ARG_LCDWIDTH=$1
87 if [ -z "$ARG_LCDHEIGHT" ]; then
88 ARG_LCDHEIGHT=$2
91 echo "Enter the LCD width (default: 320)"
92 if [ -z "$ARG_LCDWIDTH" ]; then
93 app_lcd_width=`input`
94 else
95 app_lcd_width="$ARG_LCDWIDTH"
97 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
98 echo "Enter the LCD height (default: 480)"
99 if [ -z "$ARG_LCDHEIGHT" ]; then
100 app_lcd_height=`input`
101 else
102 app_lcd_height="$ARG_LCDHEIGHT"
104 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
105 if [ $app_lcd_width -gt $app_lcd_height ]; then
106 lcd_orientation="landscape"
107 else
108 lcd_orientation="portrait"
110 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
111 ARG_LCDWIDTH=$app_lcd_width
112 ARG_LCDHEIGHT=$app_lcd_height
114 app_lcd_width="#define LCD_WIDTH $app_lcd_width"
115 app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
118 findarmgcc() {
119 if [ "$ARG_ARM_EABI" != "0" ]; then
120 prefixtools arm-elf-eabi-
121 gccchoice="4.4.4"
122 else
123 prefixtools arm-elf-
124 gccchoice="4.0.3"
128 # scan the $PATH for the given command
129 findtool(){
130 file="$1"
132 IFS=":"
133 for path in $PATH
135 # echo "checks for $file in $path" >&2
136 if test -f "$path/$file"; then
137 echo "$path/$file"
138 return
140 done
141 # check whether caller wants literal return value if not found
142 if [ "$2" = "--lit" ]; then
143 echo "$file"
147 # scan the $PATH for sdl-config - check whether for a (cross-)win32
148 # sdl as requested
149 findsdl(){
150 file="sdl-config"
151 winbuild="$1"
153 IFS=":"
154 for path in $PATH
156 #echo "checks for $file in $path" >&2
157 if test -f "$path/$file"; then
158 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
159 if [ "yes" = "${winbuild}" ]; then
160 echo "$path/$file"
161 return
163 else
164 if [ "yes" != "${winbuild}" ]; then
165 echo "$path/$file"
166 return
170 done
173 # check for availability of sigaltstack to support our thread engine
174 check_sigaltstack() {
175 cat >$tmpdir/check_threads.c <<EOF
176 #include <signal.h>
177 int main(int argc, char **argv)
179 #ifndef NULL
180 #define NULL (void*)0
181 #endif
182 sigaltstack(NULL, NULL);
183 return 0;
186 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 1> /dev/null
187 result=$?
188 rm -rf $tmpdir/check_threads*
189 echo $result
192 # check for availability of Fiber on Win32 to support our thread engine
193 check_fiber() {
194 cat >$tmpdir/check_threads.c <<EOF
195 #include <windows.h>
196 int main(int argc, char **argv)
198 ConvertThreadToFiber(NULL);
199 return 0;
202 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 2>/dev/null
203 result=$?
204 rm -rf $tmpdir/check_threads*
205 echo $result
208 simcc () {
210 # default tool setup for native building
211 prefixtools "$CROSS_COMPILE"
212 ARG_ARM_THUMB=0 # can't use thumb in native builds
214 app_type=$1
215 winbuild=""
216 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef// -e s/-O//`
217 GCCOPTS="$GCCOPTS -fno-builtin -g"
218 GCCOPTIMIZE=''
219 LDOPTS='-lm' # button-sdl.c uses sqrt()
220 sigaltstack=""
221 fibers=""
223 # default output binary name, don't override app_get_platform()
224 if [ "$app_type" != "sdl-app" ]; then
225 output="rockboxui"
228 # default share option, override below if needed
229 SHARED_LDFLAG="-shared"
230 SHARED_CFLAGS="-fPIC -fvisibility=hidden"
232 if [ "$win32crosscompile" = "yes" ]; then
233 LDOPTS="$LDOPTS -mconsole"
234 output="$output.exe"
235 winbuild="yes"
236 SHARED_CFLAGS=''
237 else
238 case $uname in
239 CYGWIN*)
240 echo "Cygwin host detected"
242 fibers=`check_fiber`
243 LDOPTS="$LDOPTS -mconsole"
244 output="$output.exe"
245 winbuild="yes"
246 SHARED_CFLAGS=''
249 MINGW*)
250 echo "MinGW host detected"
252 fibers=`check_fiber`
253 LDOPTS="$LDOPTS -mconsole"
254 output="$output.exe"
255 winbuild="yes"
258 Linux)
259 sigaltstack=`check_sigaltstack`
260 echo "Linux host detected"
261 LDOPTS="$LDOPTS -ldl"
264 FreeBSD)
265 sigaltstack=`check_sigaltstack`
266 echo "FreeBSD host detected"
267 LDOPTS="$LDOPTS -ldl"
270 Darwin)
271 sigaltstack=`check_sigaltstack`
272 echo "Darwin host detected"
273 LDOPTS="$LDOPTS -ldl"
274 SHARED_LDFLAG="-dynamiclib -Wl\,-single_module"
277 SunOS)
278 sigaltstack=`check_sigaltstack`
279 echo "*Solaris host detected"
281 GCCOPTS="$GCCOPTS -fPIC"
282 LDOPTS="$LDOPTS -ldl"
286 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
287 exit 1
289 esac
292 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
293 sdl=`findsdl $winbuild`
295 if [ -n `echo $app_type | grep "sdl"` ]; then
296 if [ -z "$sdl" ]; then
297 echo "configure didn't find sdl-config, which indicates that you"
298 echo "don't have SDL (properly) installed. Please correct and"
299 echo "re-run configure!"
300 exit 2
301 else
302 # generic sdl-config checker
303 GCCOPTS="$GCCOPTS `$sdl --cflags`"
304 LDOPTS="$LDOPTS `$sdl --libs`"
309 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
311 if test "X$win32crosscompile" != "Xyes"; then
312 if test "`uname -m`" = "i686"; then
313 echo "Enabling MMX support"
314 GCCOPTS="$GCCOPTS -mmmx"
316 # x86_64 supports MMX by default
318 id=$$
319 cat >$tmpdir/conftest-$id.c <<EOF
320 #include <stdio.h>
321 int main(int argc, char **argv)
323 int var=0;
324 char *varp = (char *)&var;
325 *varp=1;
327 printf("%d\n", var);
328 return 0;
332 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
334 # when cross compiling, the endianess cannot be detected because the above program doesn't run
335 # on the local machine. assume little endian but print a warning
336 endian=`$tmpdir/conftest-$id 2> /dev/null`
337 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
338 # big endian
339 endian="big"
340 else
341 # little endian
342 endian="little"
345 if [ "$CROSS_COMPILE" != "" ]; then
346 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
349 if [ "$app_type" = "sdl-sim" ]; then
350 echo "Simulator environment deemed $endian endian"
351 elif [ "$app_type" = "sdl-app" ]; then
352 echo "Application environment deemed $endian endian"
353 elif [ "$app_type" = "checkwps" ]; then
354 echo "CheckWPS environment deemed $endian endian"
357 # use wildcard here to make it work even if it was named *.exe like
358 # on cygwin
359 rm -f $tmpdir/conftest-$id*
360 else
361 # We are crosscompiling
362 # add cross-compiler option(s)
363 prefixtools i586-mingw32msvc-
364 LDOPTS="$LDOPTS -mconsole"
365 fibers=`check_fiber`
366 output="rockboxui.exe"
367 endian="little" # windows is little endian
368 echo "Enabling MMX support"
369 GCCOPTS="$GCCOPTS -mmmx"
372 thread_support=
373 if [ -z "$ARG_THREAD_SUPPORT" ] || [ "$ARG_THREAD_SUPPORT" = "0" ]; then
374 if [ "$sigaltstack" = "0" ]; then
375 thread_support="HAVE_SIGALTSTACK_THREADS"
376 LDOPTS="$LDOPTS -lpthread" # pthread needed
377 echo "Selected sigaltstack threads"
378 elif [ "$fibers" = "0" ]; then
379 thread_support="HAVE_WIN32_FIBER_THREADS"
380 echo "Selected Win32 Fiber threads"
384 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
385 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
386 thread_support="HAVE_SDL_THREADS"
387 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
388 echo "Selected SDL threads"
389 else
390 echo "WARNING: Falling back to SDL threads"
396 # functions for setting up cross-compiler names and options
397 # also set endianess and what the exact recommended gcc version is
398 # the gcc version should most likely match what versions we build with
399 # rockboxdev.sh
401 shcc () {
402 prefixtools sh-elf-
403 GCCOPTS="$CCOPTS -m1"
404 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
405 endian="big"
406 gccchoice="4.0.3"
409 calmrisccc () {
410 prefixtools calmrisc16-unknown-elf-
411 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
412 GCCOPTIMIZE="-fomit-frame-pointer"
413 endian="big"
416 coldfirecc () {
417 prefixtools m68k-elf-
418 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
419 GCCOPTIMIZE="-fomit-frame-pointer"
420 endian="big"
421 gccchoice="4.5.2"
424 arm7tdmicc () {
425 findarmgcc
426 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
427 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
428 GCCOPTS="$GCCOPTS -mlong-calls"
430 GCCOPTIMIZE="-fomit-frame-pointer"
431 endian="little"
434 arm9tdmicc () {
435 findarmgcc
436 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
437 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
438 GCCOPTS="$GCCOPTS -mlong-calls"
440 GCCOPTIMIZE="-fomit-frame-pointer"
441 endian="little"
444 arm940tbecc () {
445 findarmgcc
446 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
447 if test "$ARG_ARM_EABI" = "0"; then
448 GCCOPTS="$GCCOPTS -mlong-calls"
450 GCCOPTIMIZE="-fomit-frame-pointer"
451 endian="big"
454 arm940tcc () {
455 findarmgcc
456 GCCOPTS="$CCOPTS -mcpu=arm940t"
457 if test "$ARG_ARM_EABI" = "0"; then
458 GCCOPTS="$GCCOPTS -mlong-calls"
460 GCCOPTIMIZE="-fomit-frame-pointer"
461 endian="little"
464 arm946cc () {
465 findarmgcc
466 GCCOPTS="$CCOPTS -mcpu=arm9e"
467 if test "$ARG_ARM_EABI" = "0"; then
468 GCCOPTS="$GCCOPTS -mlong-calls"
470 GCCOPTIMIZE="-fomit-frame-pointer"
471 endian="little"
474 arm926ejscc () {
475 findarmgcc
476 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
477 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
478 GCCOPTS="$GCCOPTS -mlong-calls"
480 GCCOPTIMIZE="-fomit-frame-pointer"
481 endian="little"
484 arm1136jfscc () {
485 findarmgcc
486 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
487 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
488 GCCOPTS="$GCCOPTS -mlong-calls"
490 GCCOPTIMIZE="-fomit-frame-pointer"
491 endian="little"
494 arm1176jzscc () {
495 findarmgcc
496 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
497 if test "$ARG_ARM_EABI" = "0"; then
498 GCCOPTS="$GCCOPTS -mlong-calls"
500 GCCOPTIMIZE="-fomit-frame-pointer"
501 endian="little"
504 arm7ejscc () {
505 findarmgcc
506 GCCOPTS="$CCOPTS -march=armv5te"
507 GCCOPTIMIZE="-fomit-frame-pointer"
508 endian="little"
511 mipselcc () {
512 prefixtools mipsel-elf-
513 # mips is predefined, but we want it for paths. use __mips instead
514 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
515 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
516 GCCOPTIMIZE="-fomit-frame-pointer"
517 endian="little"
518 gccchoice="4.1.2"
521 maemocc () {
522 # Scratchbox sets up "gcc" based on the active target
523 prefixtools ""
525 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
526 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
527 GCCOPTIMIZE=''
528 LDOPTS="-lm -ldl $LDOPTS"
529 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
530 SHARED_LDFLAG="-shared"
531 SHARED_CFLAGS=''
532 endian="little"
533 thread_support="HAVE_SIGALTSTACK_THREADS"
535 is_n900=0
536 # Determine maemo version
537 if pkg-config --atleast-version=5 maemo-version; then
538 if [ "$1" == "4" ]; then
539 echo "ERROR: Maemo 4 SDK required."
540 exit 1
542 extradefines="$extradefines -DMAEMO5"
543 echo "Found N900 maemo version"
544 is_n900=1
545 elif pkg-config --atleast-version=4 maemo-version; then
546 if [ "$1" == "5" ]; then
547 echo "ERROR: Maemo 5 SDK required."
548 exit 1
550 extradefines="$extradefines -DMAEMO4"
551 echo "Found N8xx maemo version"
552 else
553 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
554 exit 1
557 # SDL
558 if [ $is_n900 -eq 1 ]; then
559 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
560 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
561 else
562 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
563 LDOPTS="$LDOPTS `sdl-config --libs`"
566 # glib and libosso support
567 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
568 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
570 # libhal support: Battery monitoring
571 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
572 LDOPTS="$LDOPTS `pkg-config --libs hal`"
574 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
575 if [ $is_n900 -eq 1 ]; then
576 # gstreamer support: Audio output.
577 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
578 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
580 # N900 specific: libplayback support
581 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
582 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
584 # N900 specific: Enable ARMv7 NEON support
585 if sb-conf show -A |grep -q -i arm; then
586 echo "Detected ARM target"
587 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
588 extradefines="$extradefines -DMAEMO_ARM_BUILD"
589 else
590 echo "Detected x86 target"
592 else
593 # N8xx specific: Enable armv5te instructions
594 if sb-conf show -A |grep -q -i arm; then
595 echo "Detected ARM target"
596 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
597 extradefines="$extradefines -DMAEMO_ARM_BUILD"
598 else
599 echo "Detected x86 target"
604 pandoracc () {
605 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
606 # You have to use the sebt3 toolchain:
607 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
609 PNDSDK="/usr/local/angstrom/arm"
610 if [ ! -x $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc ]; then
611 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
612 exit
615 PATH=$PNDSDK/bin:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi/usr/bin
616 PKG_CONFIG_PATH=$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib/pkgconfig
617 LDOPTS="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
618 PKG_CONFIG="pkg-config"
620 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
621 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
622 GCCOPTIMIZE=''
623 LDOPTS="-lm -ldl $LDOPTS"
624 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
625 SHARED_LDFLAG="-shared"
626 SHARED_CFLAGS=''
627 endian="little"
628 thread_support="HAVE_SIGALTSTACK_THREADS"
630 # Include path
631 GCCOPTS="-I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
633 # Set up compiler
634 gccchoice="4.3.3"
635 prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
637 # Detect SDL
638 GCCOPTS="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
639 LDOPTS="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
641 # Compiler options
642 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
643 GCCOPTS="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
644 GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant"
647 androidcc () {
648 if [ -z "$ANDROID_SDK_PATH" ]; then
649 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
650 echo "environment variable point to the root directory of the Android SDK."
651 exit
653 if [ -z "$ANDROID_NDK_PATH" ]; then
654 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
655 echo "environment variable point to the root directory of the Android NDK."
656 exit
658 buildhost=`uname | tr [:upper:] [:lower:]`
659 gccchoice="4.4.3"
660 gcctarget="arm-linux-androideabi-"
661 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
662 PATH=$PATH:$gccprefix/bin
663 prefixtools $gcctarget
664 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
665 GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
666 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
667 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
668 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
669 LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog"
670 endian="little"
671 SHARED_LDFLAG="-shared"
672 SHARED_CFLAGS=''
675 whichadvanced () {
676 atype=`echo "$1" | cut -c 2-`
677 ##################################################################
678 # Prompt for specific developer options
680 if [ "$atype" ]; then
681 interact=
682 else
683 interact=1
684 echo ""
685 printf "Enter your developer options (press only enter when done)\n\
686 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
687 (T)est plugins, S(m)all C lib:"
688 if [ "$memory" = "2" ]; then
689 printf ", (8)MB MOD"
691 if [ "$modelname" = "archosplayer" ]; then
692 printf ", Use (A)TA poweroff"
694 if [ "$t_model" = "ondio" ]; then
695 printf ", (B)acklight MOD"
697 if [ "$modelname" = "iaudiom5" ]; then
698 printf ", (F)M radio MOD"
700 if [ "$modelname" = "iriverh120" ]; then
701 printf ", (R)TC MOD"
703 echo ""
706 cont=1
707 while [ $cont = "1" ]; do
709 if [ "$interact" ]; then
710 option=`input`
711 else
712 option=`echo "$atype" | cut -c 1`
715 case $option in
716 [Dd])
717 if [ "yes" = "$profile" ]; then
718 echo "Debug is incompatible with profiling"
719 else
720 echo "DEBUG build enabled"
721 use_debug="yes"
724 [Ll])
725 echo "logf() support enabled"
726 logf="yes"
728 [Mm])
729 echo "Using Rockbox' small C library"
730 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
732 [Tt])
733 echo "Including test plugins"
734 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
736 [Cc])
737 echo "bootchart enabled (logf also enabled)"
738 bootchart="yes"
739 logf="yes"
741 [Ss])
742 echo "Simulator build enabled"
743 simulator="yes"
745 [Pp])
746 if [ "yes" = "$use_debug" ]; then
747 echo "Profiling is incompatible with debug"
748 else
749 echo "Profiling support is enabled"
750 profile="yes"
753 [Vv])
754 echo "Voice build selected"
755 voice="yes"
758 if [ "$memory" = "2" ]; then
759 memory="8"
760 echo "Memory size selected: 8MB"
763 [Aa])
764 if [ "$modelname" = "archosplayer" ]; then
765 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
766 echo "ATA power off enabled"
769 [Bb])
770 if [ "$t_model" = "ondio" ]; then
771 have_backlight="#define HAVE_BACKLIGHT"
772 echo "Backlight functions enabled"
775 [Ff])
776 if [ "$modelname" = "iaudiom5" ]; then
777 have_fmradio_in="#define HAVE_FMRADIO_IN"
778 echo "FM radio functions enabled"
781 [Rr])
782 if [ "$modelname" = "iriverh120" ]; then
783 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
784 have_rtc_alarm="#define HAVE_RTC_ALARM"
785 echo "RTC functions enabled (DS1339/DS3231)"
788 [Ww])
789 echo "Enabling Windows 32 cross-compiling"
790 win32crosscompile="yes"
792 "") # Match enter press when finished with advanced options
793 cont=0
796 echo "[ERROR] Option $option unsupported"
798 esac
799 if [ "$interact" ]; then
800 btype="$btype$option"
801 else
802 atype=`echo "$atype" | cut -c 2-`
803 [ "$atype" ] || cont=0
805 done
806 echo "done"
808 if [ "yes" = "$voice" ]; then
809 # Ask about languages to build
810 picklang
811 voicelanguage=`whichlang`
812 echo "Voice language set to $voicelanguage"
814 # Configure encoder and TTS engine for each language
815 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
816 voiceconfig "$thislang"
817 done
819 if [ "yes" = "$use_debug" ]; then
820 debug="-DDEBUG"
821 GCCOPTS="$GCCOPTS -g -DDEBUG"
823 if [ "yes" = "$logf" ]; then
824 use_logf="#define ROCKBOX_HAS_LOGF 1"
826 if [ "yes" = "$bootchart" ]; then
827 use_bootchart="#define DO_BOOTCHART 1"
829 if [ "yes" = "$simulator" ]; then
830 debug="-DDEBUG"
831 extradefines="$extradefines -DSIMULATOR"
832 archosrom=""
833 flash=""
835 if [ "yes" = "$profile" ]; then
836 extradefines="$extradefines -DRB_PROFILE"
837 PROFILE_OPTS="-finstrument-functions"
841 # Configure voice settings
842 voiceconfig () {
843 thislang=$1
844 if [ ! "$ARG_TTS" ]; then
845 echo "Building $thislang voice for $modelname. Select options"
846 echo ""
849 if [ -n "`findtool flite`" ]; then
850 FLITE="F(l)ite "
851 FLITE_OPTS=""
852 DEFAULT_TTS="flite"
853 DEFAULT_TTS_OPTS=$FLITE_OPTS
854 DEFAULT_NOISEFLOOR="500"
855 DEFAULT_CHOICE="L"
857 if [ -n "`findtool espeak`" ]; then
858 ESPEAK="(e)Speak "
859 ESPEAK_OPTS=""
860 DEFAULT_TTS="espeak"
861 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
862 DEFAULT_NOISEFLOOR="500"
863 DEFAULT_CHOICE="e"
865 if [ -n "`findtool festival`" ]; then
866 FESTIVAL="(F)estival "
867 case "$thislang" in
868 "italiano")
869 FESTIVAL_OPTS="--language italian"
871 "espanol")
872 FESTIVAL_OPTS="--language spanish"
874 "finnish")
875 FESTIVAL_OPTS="--language finnish"
877 "czech")
878 FESTIVAL_OPTS="--language czech"
881 FESTIVAL_OPTS=""
883 esac
884 DEFAULT_TTS="festival"
885 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
886 DEFAULT_NOISEFLOOR="500"
887 DEFAULT_CHOICE="F"
889 if [ -n "`findtool swift`" ]; then
890 SWIFT="S(w)ift "
891 SWIFT_OPTS=""
892 DEFAULT_TTS="swift"
893 DEFAULT_TTS_OPTS=$SWIFT_OPTS
894 DEFAULT_NOISEFLOOR="500"
895 DEFAULT_CHOICE="w"
897 # Allow SAPI if Windows is in use
898 if [ -n "`findtool winver`" ]; then
899 SAPI="(S)API "
900 SAPI_OPTS=""
901 DEFAULT_TTS="sapi"
902 DEFAULT_TTS_OPTS=$SAPI_OPTS
903 DEFAULT_NOISEFLOOR="500"
904 DEFAULT_CHOICE="S"
907 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
908 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
909 exit 3
912 if [ "$ARG_TTS" ]; then
913 option=$ARG_TTS
914 else
915 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
916 option=`input`
918 advopts="$advopts --tts=$option"
919 case "$option" in
920 [Ll])
921 TTS_ENGINE="flite"
922 NOISEFLOOR="500" # TODO: check this value
923 TTS_OPTS=$FLITE_OPTS
925 [Ee])
926 TTS_ENGINE="espeak"
927 NOISEFLOOR="500"
928 TTS_OPTS=$ESPEAK_OPTS
930 [Ff])
931 TTS_ENGINE="festival"
932 NOISEFLOOR="500"
933 TTS_OPTS=$FESTIVAL_OPTS
935 [Ss])
936 TTS_ENGINE="sapi"
937 NOISEFLOOR="500"
938 TTS_OPTS=$SAPI_OPTS
940 [Ww])
941 TTS_ENGINE="swift"
942 NOISEFLOOR="500"
943 TTS_OPTS=$SWIFT_OPTS
946 TTS_ENGINE=$DEFAULT_TTS
947 TTS_OPTS=$DEFAULT_TTS_OPTS
948 NOISEFLOOR=$DEFAULT_NOISEFLOOR
949 esac
950 echo "Using $TTS_ENGINE for TTS"
952 # Select which voice to use for Festival
953 if [ "$TTS_ENGINE" = "festival" ]; then
954 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
955 for voice in $voicelist; do
956 TTS_FESTIVAL_VOICE="$voice" # Default choice
957 break
958 done
959 if [ "$ARG_VOICE" ]; then
960 CHOICE=$ARG_VOICE
961 else
963 for voice in $voicelist; do
964 printf "%3d. %s\n" "$i" "$voice"
965 i=`expr $i + 1`
966 done
967 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
968 CHOICE=`input`
971 for voice in $voicelist; do
972 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
973 TTS_FESTIVAL_VOICE="$voice"
975 i=`expr $i + 1`
976 done
977 advopts="$advopts --voice=$CHOICE"
978 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
979 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
982 # Read custom tts options from command line
983 if [ "$ARG_TTSOPTS" ]; then
984 TTS_OPTS="$ARG_TTSOPTS"
985 advopts="$advopts --ttsopts='$TTS_OPTS'"
986 echo "$TTS_ENGINE options set to $TTS_OPTS"
989 if [ "$swcodec" = "yes" ]; then
990 ENCODER="rbspeexenc"
991 ENC_OPTS="-q 4 -c 10"
992 else
993 if [ -n "`findtool lame`" ]; then
994 ENCODER="lame"
995 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
996 else
997 echo "You need LAME in the system path to build voice files for"
998 echo "HWCODEC targets."
999 exit 4
1003 echo "Using $ENCODER for encoding voice clips"
1005 # Read custom encoder options from command line
1006 if [ "$ARG_ENCOPTS" ]; then
1007 ENC_OPTS="$ARG_ENCOPTS"
1008 advopts="$advopts --encopts='$ENC_OPTS'"
1009 echo "$ENCODER options set to $ENC_OPTS"
1012 TEMPDIR="${pwd}"
1013 if [ -n "`findtool cygpath`" ]; then
1014 TEMPDIR=`cygpath . -a -w`
1018 picklang() {
1019 # figure out which languages that are around
1020 for file in $rootdir/apps/lang/*.lang; do
1021 clean=`basename $file .lang`
1022 langs="$langs $clean"
1023 done
1025 if [ "$ARG_LANG" ]; then
1026 pick=$ARG_LANG
1027 else
1028 echo "Select a number for the language to use (default is english)"
1029 # FIXME The multiple-language feature is currently broken
1030 # echo "You may enter a comma-separated list of languages to build"
1032 num=1
1033 for one in $langs; do
1034 echo "$num. $one"
1035 num=`expr $num + 1`
1036 done
1037 pick=`input`
1039 advopts="$advopts --language=$pick"
1042 whichlang() {
1043 output=""
1044 # Allow the user to pass a comma-separated list of langauges
1045 for thispick in `echo $pick | sed 's/,/ /g'`; do
1046 num=1
1047 for one in $langs; do
1048 # Accept both the language number and name
1049 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
1050 if [ "$output" = "" ]; then
1051 output=$one
1052 else
1053 output=$output,$one
1056 num=`expr $num + 1`
1057 done
1058 done
1059 if [ -z "$output" ]; then
1060 # pick a default
1061 output="english"
1063 echo $output
1066 help() {
1067 echo "Rockbox configure script."
1068 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1069 echo "Do *NOT* run this within the tools directory!"
1070 echo ""
1071 cat <<EOF
1072 Usage: configure [OPTION]...
1073 Options:
1074 --target=TARGET Sets the target, TARGET can be either the target ID or
1075 corresponding string. Run without this option to see all
1076 available targets.
1078 --ram=RAM Sets the RAM for certain targets. Even though any number
1079 is accepted, not every number is correct. The default
1080 value will be applied, if you entered a wrong number
1081 (which depends on the target). Watch the output. Run
1082 without this option if you are not sure which the right
1083 number is.
1085 --type=TYPE Sets the build type. Shortcuts are also valid.
1086 Run without this option to see all available types.
1087 Multiple values are allowed and managed in the input
1088 order. So --type=b stands for Bootloader build, while
1089 --type=ab stands for "Backlight MOD" build.
1091 --lcdwidth=X Sets the width of the LCD. Used only for application
1092 targets.
1094 --lcdheight=Y Sets the height of the LCD. Used only for application
1095 targets.
1097 --language=LANG Set the language used for voice generation (used only if
1098 TYPE is AV).
1100 --tts=ENGINE Set the TTS engine used for voice generation (used only
1101 if TYPE is AV).
1103 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1104 AV).
1106 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1108 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1110 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1111 This is useful for having multiple alternate builds on
1112 your device that you can load with ROLO. However as the
1113 bootloader looks for .rockbox you won't be able to boot
1114 into this build.
1116 --ccache Enable ccache use (done by default these days)
1117 --no-ccache Disable ccache use
1119 --eabi Make configure prefer toolchains that are able to compile
1120 for the new ARM standard abi EABI
1121 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1122 --thumb Build with -mthumb (for ARM builds)
1123 --no-thumb The opposite of --thumb (don't use thumb even for targets
1124 where this is the default
1125 --sdl-threads Force use of SDL threads. They have inferior performance,
1126 but are better debuggable with GDB
1127 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1128 behavior of falling back to them if no native thread
1129 support was found.
1130 --prefix Target installation directory
1131 --help Shows this message (must not be used with other options)
1135 exit
1138 ARG_CCACHE=
1139 ARG_ENCOPTS=
1140 ARG_LANG=
1141 ARG_RAM=
1142 ARG_RBDIR=
1143 ARG_TARGET=
1144 ARG_TTS=
1145 ARG_TTSOPTS=
1146 ARG_TYPE=
1147 ARG_VOICE=
1148 ARG_ARM_EABI=
1149 ARG_ARM_THUMB=
1150 ARG_PREFIX="$PREFIX"
1151 ARG_THREAD_SUPPORT=
1152 err=
1153 for arg in "$@"; do
1154 case "$arg" in
1155 --ccache) ARG_CCACHE=1;;
1156 --no-ccache) ARG_CCACHE=0;;
1157 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1158 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
1159 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1160 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
1161 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1162 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1163 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1164 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1165 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1166 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1167 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
1168 --eabi) ARG_ARM_EABI=1;;
1169 --no-eabi) ARG_ARM_EABI=0;;
1170 --thumb) ARG_ARM_THUMB=1;;
1171 --no-thumb) ARG_ARM_THUMB=0;;
1172 --sdl-threads)ARG_THREAD_SUPPORT=1;;
1173 --no-sdl-threads)
1174 ARG_THREAD_SUPPORT=0;;
1175 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
1176 --help) help;;
1177 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1178 esac
1179 done
1180 [ "$err" ] && exit 1
1182 advopts=
1184 if [ "$TMPDIR" != "" ]; then
1185 tmpdir=$TMPDIR
1186 else
1187 tmpdir=/tmp
1189 echo Using temporary directory $tmpdir
1191 if test -r "configure"; then
1192 # this is a check for a configure script in the current directory, it there
1193 # is one, try to figure out if it is this one!
1195 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1196 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1197 echo "It will only cause you pain and grief. Instead do this:"
1198 echo ""
1199 echo " cd .."
1200 echo " mkdir build-dir"
1201 echo " cd build-dir"
1202 echo " ../tools/configure"
1203 echo ""
1204 echo "Much happiness will arise from this. Enjoy"
1205 exit 5
1209 # get our current directory
1210 pwd=`pwd`;
1212 if { echo $pwd | grep " "; } then
1213 echo "You're running this script in a path that contains space. The build"
1214 echo "system is unfortunately not clever enough to deal with this. Please"
1215 echo "run the script from a different path, rename the path or fix the build"
1216 echo "system!"
1217 exit 6
1220 if [ -z "$rootdir" ]; then
1221 ##################################################################
1222 # Figure out where the source code root is!
1224 rootdir=`dirname $0`/../
1226 #####################################################################
1227 # Convert the possibly relative directory name to an absolute version
1229 now=`pwd`
1230 cd $rootdir
1231 rootdir=`pwd`
1233 # cd back to the build dir
1234 cd $now
1237 apps="apps"
1238 appsdir='$(ROOTDIR)/apps'
1239 toolsdir='$(ROOTDIR)/tools'
1242 ##################################################################
1243 # Figure out target platform
1246 if [ "$ARG_TARGET" ]; then
1247 buildfor=$ARG_TARGET
1248 else
1249 echo "Enter target platform:"
1250 cat <<EOF
1251 ==Archos== ==iriver== ==Apple iPod==
1252 0) Player/Studio 10) H120/H140 20) Color/Photo
1253 1) Recorder 11) H320/H340 21) Nano 1G
1254 2) FM Recorder 12) iHP-100/110/115 22) Video
1255 3) Recorder v2 13) iFP-790 23) 3G
1256 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1257 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1258 6) AV300 26) Mini 2G
1259 ==Toshiba== 27) 1G, 2G
1260 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1261 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1262 31) M5/M5L
1263 32) 7 ==Olympus= ==SanDisk==
1264 33) D2 70) M:Robe 500 50) Sansa e200
1265 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1266 52) Sansa c200
1267 ==Creative== ==Philips== 53) Sansa m200
1268 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1269 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1270 92) Zen Vision HDD1830 56) Sansa e200v2
1271 102) GoGear HDD6330 57) Sansa m200v4
1272 ==Onda== 58) Sansa Fuze
1273 120) VX747 ==Meizu== 59) Sansa c200v2
1274 121) VX767 110) M6SL 60) Sansa Clipv2
1275 122) VX747+ 111) M6SP 61) Sansa View
1276 123) VX777 112) M3 62) Sansa Clip+
1277 63) Sansa Fuze v2
1278 ==Samsung== ==Tatung== 64) Sansa Fuze+
1279 140) YH-820 150) Elio TPJ-1022
1280 141) YH-920 ==Logik==
1281 142) YH-925 ==Packard Bell== 80) DAX 1GB MP3/DAB
1282 143) YP-S3 160) Vibe 500
1283 ==Lyre project==
1284 ==Application== ==MPIO== 130) Lyre proto 1
1285 200) SDL 170) HD200 131) Mini2440
1286 201) Android 171) HD300
1287 202) Nokia N8xx
1288 203) Nokia N900 ==ROCKCHIP==
1289 204) Pandora 180) rk27xx generic
1293 buildfor=`input`;
1296 # Set of tools built for all target platforms:
1297 toolset="rdf2binary convbdf codepages"
1299 # Toolsets for some target families:
1300 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1301 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1302 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1303 ipodbitmaptools="$toolset scramble bmp2rb"
1304 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1305 tccbitmaptools="$toolset scramble bmp2rb"
1306 # generic is used by IFP, Meizu and Onda
1307 genericbitmaptools="$toolset bmp2rb"
1308 # scramble is used by all other targets
1309 scramblebitmaptools="$genericbitmaptools scramble"
1312 # ---- For each target ----
1314 # *Variables*
1315 # target_id: a unique number identifying this target, IS NOT the menu number.
1316 # Just use the currently highest number+1 when you add a new
1317 # target.
1318 # modelname: short model name used all over to identify this target
1319 # memory: number of megabytes of RAM this target has. If the amount can
1320 # be selected by the size prompt, let memory be unset here
1321 # target: -Ddefine passed to the build commands to make the correct
1322 # config-*.h file get included etc
1323 # tool: the tool that takes a plain binary and converts that into a
1324 # working "firmware" file for your target
1325 # output: the final output file name
1326 # boottool: the tool that takes a plain binary and generates a bootloader
1327 # file for your target (or blank to use $tool)
1328 # bootoutput:the final output file name for the bootloader (or blank to use
1329 # $output)
1330 # appextra: passed to the APPEXTRA variable in the Makefiles.
1331 # TODO: add proper explanation
1332 # archosrom: used only for Archos targets that build a special flashable .ucl
1333 # image.
1334 # flash: name of output for flashing, for targets where there's a special
1335 # file output for this.
1336 # plugins: set to 'yes' to build the plugins. Early development builds can
1337 # set this to no in the early stages to have an easier life for a
1338 # while
1339 # swcodec: set 'yes' on swcodec targets
1340 # toolset: lists what particular tools in the tools/ directory that this
1341 # target needs to have built prior to building Rockbox
1343 # *Functions*
1344 # *cc: sets up gcc and compiler options for your target builds. Note
1345 # that if you select a simulator build, the compiler selection is
1346 # overridden later in the script.
1348 case $buildfor in
1350 0|archosplayer)
1351 target_id=1
1352 modelname="archosplayer"
1353 target="-DARCHOS_PLAYER"
1354 shcc
1355 tool="$rootdir/tools/scramble"
1356 output="archos.mod"
1357 appextra="player:gui"
1358 archosrom="$pwd/rombox.ucl"
1359 flash="$pwd/rockbox.ucl"
1360 plugins="yes"
1361 swcodec=""
1363 # toolset is the tools within the tools directory that we build for
1364 # this particular target.
1365 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1367 # Note: the convbdf is present in the toolset just because: 1) the
1368 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1369 # build the player simulator
1371 t_cpu="sh"
1372 t_manufacturer="archos"
1373 t_model="player"
1376 1|archosrecorder)
1377 target_id=2
1378 modelname="archosrecorder"
1379 target="-DARCHOS_RECORDER"
1380 shcc
1381 tool="$rootdir/tools/scramble"
1382 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1383 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1384 output="ajbrec.ajz"
1385 appextra="recorder:gui:radio"
1386 #archosrom="$pwd/rombox.ucl"
1387 flash="$pwd/rockbox.ucl"
1388 plugins="yes"
1389 swcodec=""
1390 # toolset is the tools within the tools directory that we build for
1391 # this particular target.
1392 toolset=$archosbitmaptools
1393 t_cpu="sh"
1394 t_manufacturer="archos"
1395 t_model="recorder"
1398 2|archosfmrecorder)
1399 target_id=3
1400 modelname="archosfmrecorder"
1401 target="-DARCHOS_FMRECORDER"
1402 shcc
1403 tool="$rootdir/tools/scramble -fm"
1404 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1405 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1406 output="ajbrec.ajz"
1407 appextra="recorder:gui:radio"
1408 #archosrom="$pwd/rombox.ucl"
1409 flash="$pwd/rockbox.ucl"
1410 plugins="yes"
1411 swcodec=""
1412 # toolset is the tools within the tools directory that we build for
1413 # this particular target.
1414 toolset=$archosbitmaptools
1415 t_cpu="sh"
1416 t_manufacturer="archos"
1417 t_model="fm_v2"
1420 3|archosrecorderv2)
1421 target_id=4
1422 modelname="archosrecorderv2"
1423 target="-DARCHOS_RECORDERV2"
1424 shcc
1425 tool="$rootdir/tools/scramble -v2"
1426 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1427 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1428 output="ajbrec.ajz"
1429 appextra="recorder:gui:radio"
1430 #archosrom="$pwd/rombox.ucl"
1431 flash="$pwd/rockbox.ucl"
1432 plugins="yes"
1433 swcodec=""
1434 # toolset is the tools within the tools directory that we build for
1435 # this particular target.
1436 toolset=$archosbitmaptools
1437 t_cpu="sh"
1438 t_manufacturer="archos"
1439 t_model="fm_v2"
1442 4|archosondiosp)
1443 target_id=7
1444 modelname="archosondiosp"
1445 target="-DARCHOS_ONDIOSP"
1446 shcc
1447 tool="$rootdir/tools/scramble -osp"
1448 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1449 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1450 output="ajbrec.ajz"
1451 appextra="recorder:gui:radio"
1452 #archosrom="$pwd/rombox.ucl"
1453 flash="$pwd/rockbox.ucl"
1454 plugins="yes"
1455 swcodec=""
1456 # toolset is the tools within the tools directory that we build for
1457 # this particular target.
1458 toolset=$archosbitmaptools
1459 t_cpu="sh"
1460 t_manufacturer="archos"
1461 t_model="ondio"
1464 5|archosondiofm)
1465 target_id=8
1466 modelname="archosondiofm"
1467 target="-DARCHOS_ONDIOFM"
1468 shcc
1469 tool="$rootdir/tools/scramble -ofm"
1470 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1471 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1472 output="ajbrec.ajz"
1473 appextra="recorder:gui:radio"
1474 #archosrom="$pwd/rombox.ucl"
1475 flash="$pwd/rockbox.ucl"
1476 plugins="yes"
1477 swcodec=""
1478 toolset=$archosbitmaptools
1479 t_cpu="sh"
1480 t_manufacturer="archos"
1481 t_model="ondio"
1484 6|archosav300)
1485 target_id=38
1486 modelname="archosav300"
1487 target="-DARCHOS_AV300"
1488 memory=16 # always
1489 arm7tdmicc
1490 tool="$rootdir/tools/scramble -mm=C"
1491 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1492 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1493 output="cjbm.ajz"
1494 appextra="recorder:gui:radio"
1495 plugins="yes"
1496 swcodec=""
1497 # toolset is the tools within the tools directory that we build for
1498 # this particular target.
1499 toolset="$toolset scramble descramble bmp2rb"
1500 # architecture, manufacturer and model for the target-tree build
1501 t_cpu="arm"
1502 t_manufacturer="archos"
1503 t_model="av300"
1506 10|iriverh120)
1507 target_id=9
1508 modelname="iriverh120"
1509 target="-DIRIVER_H120"
1510 memory=32 # always
1511 coldfirecc
1512 tool="$rootdir/tools/scramble -add=h120"
1513 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1514 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1515 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1516 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1517 output="rockbox.iriver"
1518 bootoutput="bootloader.iriver"
1519 appextra="recorder:gui:radio"
1520 flash="$pwd/rombox.iriver"
1521 plugins="yes"
1522 swcodec="yes"
1523 # toolset is the tools within the tools directory that we build for
1524 # this particular target.
1525 toolset=$iriverbitmaptools
1526 t_cpu="coldfire"
1527 t_manufacturer="iriver"
1528 t_model="h100"
1531 11|iriverh300)
1532 target_id=10
1533 modelname="iriverh300"
1534 target="-DIRIVER_H300"
1535 memory=32 # always
1536 coldfirecc
1537 tool="$rootdir/tools/scramble -add=h300"
1538 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1539 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1540 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1541 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1542 output="rockbox.iriver"
1543 appextra="recorder:gui:radio"
1544 plugins="yes"
1545 swcodec="yes"
1546 # toolset is the tools within the tools directory that we build for
1547 # this particular target.
1548 toolset=$iriverbitmaptools
1549 t_cpu="coldfire"
1550 t_manufacturer="iriver"
1551 t_model="h300"
1554 12|iriverh100)
1555 target_id=11
1556 modelname="iriverh100"
1557 target="-DIRIVER_H100"
1558 memory=16 # always
1559 coldfirecc
1560 tool="$rootdir/tools/scramble -add=h100"
1561 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1562 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1563 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1564 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1565 output="rockbox.iriver"
1566 bootoutput="bootloader.iriver"
1567 appextra="recorder:gui:radio"
1568 flash="$pwd/rombox.iriver"
1569 plugins="yes"
1570 swcodec="yes"
1571 # toolset is the tools within the tools directory that we build for
1572 # this particular target.
1573 toolset=$iriverbitmaptools
1574 t_cpu="coldfire"
1575 t_manufacturer="iriver"
1576 t_model="h100"
1579 13|iriverifp7xx)
1580 target_id=19
1581 modelname="iriverifp7xx"
1582 target="-DIRIVER_IFP7XX"
1583 memory=1
1584 arm7tdmicc short
1585 tool="cp"
1586 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1587 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1588 output="rockbox.wma"
1589 appextra="recorder:gui:radio"
1590 plugins="yes"
1591 swcodec="yes"
1592 # toolset is the tools within the tools directory that we build for
1593 # this particular target.
1594 toolset=$genericbitmaptools
1595 t_cpu="arm"
1596 t_manufacturer="pnx0101"
1597 t_model="iriver-ifp7xx"
1600 14|iriverh10)
1601 target_id=22
1602 modelname="iriverh10"
1603 target="-DIRIVER_H10"
1604 memory=32 # always
1605 arm7tdmicc
1606 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1607 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1608 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1609 output="rockbox.mi4"
1610 appextra="recorder:gui:radio"
1611 plugins="yes"
1612 swcodec="yes"
1613 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1614 bootoutput="H10_20GC.mi4"
1615 # toolset is the tools within the tools directory that we build for
1616 # this particular target.
1617 toolset=$scramblebitmaptools
1618 # architecture, manufacturer and model for the target-tree build
1619 t_cpu="arm"
1620 t_manufacturer="iriver"
1621 t_model="h10"
1624 15|iriverh10_5gb)
1625 target_id=24
1626 modelname="iriverh10_5gb"
1627 target="-DIRIVER_H10_5GB"
1628 memory=32 # always
1629 arm7tdmicc
1630 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1631 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1632 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1633 output="rockbox.mi4"
1634 appextra="recorder:gui:radio"
1635 plugins="yes"
1636 swcodec="yes"
1637 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1638 bootoutput="H10.mi4"
1639 # toolset is the tools within the tools directory that we build for
1640 # this particular target.
1641 toolset=$scramblebitmaptools
1642 # architecture, manufacturer and model for the target-tree build
1643 t_cpu="arm"
1644 t_manufacturer="iriver"
1645 t_model="h10"
1648 20|ipodcolor)
1649 target_id=13
1650 modelname="ipodcolor"
1651 target="-DIPOD_COLOR"
1652 memory=32 # always
1653 arm7tdmicc
1654 tool="$rootdir/tools/scramble -add=ipco"
1655 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1656 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1657 output="rockbox.ipod"
1658 appextra="recorder:gui:radio"
1659 plugins="yes"
1660 swcodec="yes"
1661 bootoutput="bootloader-$modelname.ipod"
1662 # toolset is the tools within the tools directory that we build for
1663 # this particular target.
1664 toolset=$ipodbitmaptools
1665 # architecture, manufacturer and model for the target-tree build
1666 t_cpu="arm"
1667 t_manufacturer="ipod"
1668 t_model="color"
1671 21|ipodnano1g)
1672 target_id=14
1673 modelname="ipodnano1g"
1674 target="-DIPOD_NANO"
1675 memory=32 # always
1676 arm7tdmicc
1677 tool="$rootdir/tools/scramble -add=nano"
1678 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1679 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1680 output="rockbox.ipod"
1681 appextra="recorder:gui:radio"
1682 plugins="yes"
1683 swcodec="yes"
1684 bootoutput="bootloader-$modelname.ipod"
1685 # toolset is the tools within the tools directory that we build for
1686 # this particular target.
1687 toolset=$ipodbitmaptools
1688 # architecture, manufacturer and model for the target-tree build
1689 t_cpu="arm"
1690 t_manufacturer="ipod"
1691 t_model="nano"
1694 22|ipodvideo)
1695 target_id=15
1696 modelname="ipodvideo"
1697 target="-DIPOD_VIDEO"
1698 memory=64 # always. This is reduced at runtime if needed
1699 arm7tdmicc
1700 tool="$rootdir/tools/scramble -add=ipvd"
1701 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1702 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1703 output="rockbox.ipod"
1704 appextra="recorder:gui:radio"
1705 plugins="yes"
1706 swcodec="yes"
1707 bootoutput="bootloader-$modelname.ipod"
1708 # toolset is the tools within the tools directory that we build for
1709 # this particular target.
1710 toolset=$ipodbitmaptools
1711 # architecture, manufacturer and model for the target-tree build
1712 t_cpu="arm"
1713 t_manufacturer="ipod"
1714 t_model="video"
1717 23|ipod3g)
1718 target_id=16
1719 modelname="ipod3g"
1720 target="-DIPOD_3G"
1721 memory=32 # always
1722 arm7tdmicc
1723 tool="$rootdir/tools/scramble -add=ip3g"
1724 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1725 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1726 output="rockbox.ipod"
1727 appextra="recorder:gui:radio"
1728 plugins="yes"
1729 swcodec="yes"
1730 bootoutput="bootloader-$modelname.ipod"
1731 # toolset is the tools within the tools directory that we build for
1732 # this particular target.
1733 toolset=$ipodbitmaptools
1734 # architecture, manufacturer and model for the target-tree build
1735 t_cpu="arm"
1736 t_manufacturer="ipod"
1737 t_model="3g"
1740 24|ipod4g)
1741 target_id=17
1742 modelname="ipod4g"
1743 target="-DIPOD_4G"
1744 memory=32 # always
1745 arm7tdmicc
1746 tool="$rootdir/tools/scramble -add=ip4g"
1747 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1748 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1749 output="rockbox.ipod"
1750 appextra="recorder:gui:radio"
1751 plugins="yes"
1752 swcodec="yes"
1753 bootoutput="bootloader-$modelname.ipod"
1754 # toolset is the tools within the tools directory that we build for
1755 # this particular target.
1756 toolset=$ipodbitmaptools
1757 # architecture, manufacturer and model for the target-tree build
1758 t_cpu="arm"
1759 t_manufacturer="ipod"
1760 t_model="4g"
1763 25|ipodmini1g)
1764 target_id=18
1765 modelname="ipodmini1g"
1766 target="-DIPOD_MINI"
1767 memory=32 # always
1768 arm7tdmicc
1769 tool="$rootdir/tools/scramble -add=mini"
1770 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1771 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1772 output="rockbox.ipod"
1773 appextra="recorder:gui:radio"
1774 plugins="yes"
1775 swcodec="yes"
1776 bootoutput="bootloader-$modelname.ipod"
1777 # toolset is the tools within the tools directory that we build for
1778 # this particular target.
1779 toolset=$ipodbitmaptools
1780 # architecture, manufacturer and model for the target-tree build
1781 t_cpu="arm"
1782 t_manufacturer="ipod"
1783 t_model="mini"
1786 26|ipodmini2g)
1787 target_id=21
1788 modelname="ipodmini2g"
1789 target="-DIPOD_MINI2G"
1790 memory=32 # always
1791 arm7tdmicc
1792 tool="$rootdir/tools/scramble -add=mn2g"
1793 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1794 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1795 output="rockbox.ipod"
1796 appextra="recorder:gui:radio"
1797 plugins="yes"
1798 swcodec="yes"
1799 bootoutput="bootloader-$modelname.ipod"
1800 # toolset is the tools within the tools directory that we build for
1801 # this particular target.
1802 toolset=$ipodbitmaptools
1803 # architecture, manufacturer and model for the target-tree build
1804 t_cpu="arm"
1805 t_manufacturer="ipod"
1806 t_model="mini2g"
1809 27|ipod1g2g)
1810 target_id=29
1811 modelname="ipod1g2g"
1812 target="-DIPOD_1G2G"
1813 memory=32 # always
1814 arm7tdmicc
1815 tool="$rootdir/tools/scramble -add=1g2g"
1816 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1817 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1818 output="rockbox.ipod"
1819 appextra="recorder:gui:radio"
1820 plugins="yes"
1821 swcodec="yes"
1822 bootoutput="bootloader-$modelname.ipod"
1823 # toolset is the tools within the tools directory that we build for
1824 # this particular target.
1825 toolset=$ipodbitmaptools
1826 # architecture, manufacturer and model for the target-tree build
1827 t_cpu="arm"
1828 t_manufacturer="ipod"
1829 t_model="1g2g"
1832 28|ipodnano2g)
1833 target_id=62
1834 modelname="ipodnano2g"
1835 target="-DIPOD_NANO2G"
1836 memory=32 # always
1837 arm940tcc
1838 tool="$rootdir/tools/scramble -add=nn2g"
1839 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1840 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1841 output="rockbox.ipod"
1842 appextra="recorder:gui:radio"
1843 plugins="yes"
1844 swcodec="yes"
1845 bootoutput="bootloader-$modelname.ipod"
1846 # toolset is the tools within the tools directory that we build for
1847 # this particular target.
1848 toolset=$ipodbitmaptools
1849 # architecture, manufacturer and model for the target-tree build
1850 t_cpu="arm"
1851 t_manufacturer="s5l8700"
1852 t_model="ipodnano2g"
1855 29|ipod6g)
1856 target_id=71
1857 modelname="ipod6g"
1858 target="-DIPOD_6G"
1859 memory=64 # always
1860 arm926ejscc
1861 tool="$rootdir/tools/scramble -add=ip6g"
1862 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1863 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
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_manufacturer="s5l8702"
1875 t_model="ipod6g"
1878 30|iaudiox5)
1879 target_id=12
1880 modelname="iaudiox5"
1881 target="-DIAUDIO_X5"
1882 memory=16 # always
1883 coldfirecc
1884 tool="$rootdir/tools/scramble -add=iax5"
1885 boottool="$rootdir/tools/scramble -iaudiox5"
1886 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1887 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1888 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1889 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1890 output="rockbox.iaudio"
1891 bootoutput="x5_fw.bin"
1892 appextra="recorder:gui:radio"
1893 plugins="yes"
1894 swcodec="yes"
1895 # toolset is the tools within the tools directory that we build for
1896 # this particular target.
1897 toolset="$iaudiobitmaptools"
1898 # architecture, manufacturer and model for the target-tree build
1899 t_cpu="coldfire"
1900 t_manufacturer="iaudio"
1901 t_model="x5"
1904 31|iaudiom5)
1905 target_id=28
1906 modelname="iaudiom5"
1907 target="-DIAUDIO_M5"
1908 memory=16 # always
1909 coldfirecc
1910 tool="$rootdir/tools/scramble -add=iam5"
1911 boottool="$rootdir/tools/scramble -iaudiom5"
1912 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1913 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1914 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1915 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1916 output="rockbox.iaudio"
1917 bootoutput="m5_fw.bin"
1918 appextra="recorder:gui:radio"
1919 plugins="yes"
1920 swcodec="yes"
1921 # toolset is the tools within the tools directory that we build for
1922 # this particular target.
1923 toolset="$iaudiobitmaptools"
1924 # architecture, manufacturer and model for the target-tree build
1925 t_cpu="coldfire"
1926 t_manufacturer="iaudio"
1927 t_model="m5"
1930 32|iaudio7)
1931 target_id=32
1932 modelname="iaudio7"
1933 target="-DIAUDIO_7"
1934 memory=16 # always
1935 arm946cc
1936 tool="$rootdir/tools/scramble -add=i7"
1937 boottool="$rootdir/tools/scramble -tcc=crc"
1938 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1939 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1940 output="rockbox.iaudio"
1941 appextra="recorder:gui:radio"
1942 plugins="yes"
1943 swcodec="yes"
1944 bootoutput="I7_FW.BIN"
1945 # toolset is the tools within the tools directory that we build for
1946 # this particular target.
1947 toolset="$tccbitmaptools"
1948 # architecture, manufacturer and model for the target-tree build
1949 t_cpu="arm"
1950 t_manufacturer="tcc77x"
1951 t_model="iaudio7"
1954 33|cowond2)
1955 target_id=34
1956 modelname="cowond2"
1957 target="-DCOWON_D2"
1958 memory=32
1959 arm926ejscc
1960 tool="$rootdir/tools/scramble -add=d2"
1961 boottool="cp "
1962 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1963 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1964 output="rockbox.d2"
1965 bootoutput="bootloader-cowond2.bin"
1966 appextra="recorder:gui:radio"
1967 plugins="yes"
1968 swcodec="yes"
1969 toolset="$tccbitmaptools"
1970 # architecture, manufacturer and model for the target-tree build
1971 t_cpu="arm"
1972 t_manufacturer="tcc780x"
1973 t_model="cowond2"
1976 34|iaudiom3)
1977 target_id=37
1978 modelname="iaudiom3"
1979 target="-DIAUDIO_M3"
1980 memory=16 # always
1981 coldfirecc
1982 tool="$rootdir/tools/scramble -add=iam3"
1983 boottool="$rootdir/tools/scramble -iaudiom3"
1984 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1985 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1986 output="rockbox.iaudio"
1987 bootoutput="cowon_m3.bin"
1988 appextra="recorder:gui:radio"
1989 plugins="yes"
1990 swcodec="yes"
1991 # toolset is the tools within the tools directory that we build for
1992 # this particular target.
1993 toolset="$iaudiobitmaptools"
1994 # architecture, manufacturer and model for the target-tree build
1995 t_cpu="coldfire"
1996 t_manufacturer="iaudio"
1997 t_model="m3"
2000 40|gigabeatfx)
2001 target_id=20
2002 modelname="gigabeatfx"
2003 target="-DGIGABEAT_F"
2004 memory=32 # always
2005 arm9tdmicc
2006 tool="$rootdir/tools/scramble -add=giga"
2007 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2008 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2009 output="rockbox.gigabeat"
2010 appextra="recorder:gui:radio"
2011 plugins="yes"
2012 swcodec="yes"
2013 toolset=$gigabeatbitmaptools
2014 boottool="$rootdir/tools/scramble -gigabeat"
2015 bootoutput="FWIMG01.DAT"
2016 # architecture, manufacturer and model for the target-tree build
2017 t_cpu="arm"
2018 t_manufacturer="s3c2440"
2019 t_model="gigabeat-fx"
2022 41|gigabeats)
2023 target_id=26
2024 modelname="gigabeats"
2025 target="-DGIGABEAT_S"
2026 memory=64
2027 arm1136jfscc
2028 tool="$rootdir/tools/scramble -add=gigs"
2029 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2030 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2031 output="rockbox.gigabeat"
2032 appextra="recorder:gui:radio"
2033 plugins="yes"
2034 swcodec="yes"
2035 toolset="$gigabeatbitmaptools"
2036 boottool="$rootdir/tools/scramble -gigabeats"
2037 bootoutput="nk.bin"
2038 # architecture, manufacturer and model for the target-tree build
2039 t_cpu="arm"
2040 t_manufacturer="imx31"
2041 t_model="gigabeat-s"
2044 70|mrobe500)
2045 target_id=36
2046 modelname="mrobe500"
2047 target="-DMROBE_500"
2048 memory=64 # always
2049 arm926ejscc
2050 tool="$rootdir/tools/scramble -add=m500"
2051 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2052 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
2053 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2054 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2055 output="rockbox.mrobe500"
2056 appextra="recorder:gui:radio"
2057 plugins="yes"
2058 swcodec="yes"
2059 toolset=$gigabeatbitmaptools
2060 boottool="cp "
2061 bootoutput="rockbox.mrboot"
2062 # architecture, manufacturer and model for the target-tree build
2063 t_cpu="arm"
2064 t_manufacturer="tms320dm320"
2065 t_model="mrobe-500"
2068 71|mrobe100)
2069 target_id=33
2070 modelname="mrobe100"
2071 target="-DMROBE_100"
2072 memory=32 # always
2073 arm7tdmicc
2074 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2075 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2076 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2077 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2078 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2079 output="rockbox.mi4"
2080 appextra="recorder:gui:radio"
2081 plugins="yes"
2082 swcodec="yes"
2083 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2084 bootoutput="pp5020.mi4"
2085 # toolset is the tools within the tools directory that we build for
2086 # this particular target.
2087 toolset=$scramblebitmaptools
2088 # architecture, manufacturer and model for the target-tree build
2089 t_cpu="arm"
2090 t_manufacturer="olympus"
2091 t_model="mrobe-100"
2094 80|logikdax)
2095 target_id=31
2096 modelname="logikdax"
2097 target="-DLOGIK_DAX"
2098 memory=2 # always
2099 arm946cc
2100 tool="$rootdir/tools/scramble -add=ldax"
2101 boottool="$rootdir/tools/scramble -tcc=crc"
2102 bootoutput="player.rom"
2103 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2104 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2105 output="rockbox.logik"
2106 appextra="recorder:gui:radio"
2107 plugins=""
2108 swcodec="yes"
2109 # toolset is the tools within the tools directory that we build for
2110 # this particular target.
2111 toolset=$tccbitmaptools
2112 # architecture, manufacturer and model for the target-tree build
2113 t_cpu="arm"
2114 t_manufacturer="tcc77x"
2115 t_model="logikdax"
2118 90|zenvisionm30gb)
2119 target_id=35
2120 modelname="zenvisionm30gb"
2121 target="-DCREATIVE_ZVM"
2122 memory=64
2123 arm926ejscc
2124 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2125 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2126 tool="$rootdir/tools/scramble -creative=zvm"
2127 USE_ELF="yes"
2128 output="rockbox.zvm"
2129 appextra="recorder:gui:radio"
2130 plugins="yes"
2131 swcodec="yes"
2132 toolset=$ipodbitmaptools
2133 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
2134 bootoutput="rockbox.zvmboot"
2135 # architecture, manufacturer and model for the target-tree build
2136 t_cpu="arm"
2137 t_manufacturer="tms320dm320"
2138 t_model="creative-zvm"
2141 91|zenvisionm60gb)
2142 target_id=40
2143 modelname="zenvisionm60gb"
2144 target="-DCREATIVE_ZVM60GB"
2145 memory=64
2146 arm926ejscc
2147 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2148 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2149 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2150 USE_ELF="yes"
2151 output="rockbox.zvm60"
2152 appextra="recorder:gui:radio"
2153 plugins="yes"
2154 swcodec="yes"
2155 toolset=$ipodbitmaptools
2156 boottool="$rootdir/tools/scramble -creative=zvm60"
2157 bootoutput="rockbox.zvm60boot"
2158 # architecture, manufacturer and model for the target-tree build
2159 t_cpu="arm"
2160 t_manufacturer="tms320dm320"
2161 t_model="creative-zvm"
2164 92|zenvision)
2165 target_id=39
2166 modelname="zenvision"
2167 target="-DCREATIVE_ZV"
2168 memory=64
2169 arm926ejscc
2170 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2171 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2172 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2173 USE_ELF="yes"
2174 output="rockbox.zv"
2175 appextra="recorder:gui:radio"
2176 plugins=""
2177 swcodec="yes"
2178 toolset=$ipodbitmaptools
2179 boottool="$rootdir/tools/scramble -creative=zenvision"
2180 bootoutput="rockbox.zvboot"
2181 # architecture, manufacturer and model for the target-tree build
2182 t_cpu="arm"
2183 t_manufacturer="tms320dm320"
2184 t_model="creative-zvm"
2187 50|sansae200)
2188 target_id=23
2189 modelname="sansae200"
2190 target="-DSANSA_E200"
2191 memory=32 # supposedly
2192 arm7tdmicc
2193 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2194 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2195 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2196 output="rockbox.mi4"
2197 appextra="recorder:gui:radio"
2198 plugins="yes"
2199 swcodec="yes"
2200 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2201 bootoutput="PP5022.mi4"
2202 # toolset is the tools within the tools directory that we build for
2203 # this particular target.
2204 toolset=$scramblebitmaptools
2205 # architecture, manufacturer and model for the target-tree build
2206 t_cpu="arm"
2207 t_manufacturer="sandisk"
2208 t_model="sansa-e200"
2211 51|sansae200r)
2212 # the e200R model is pretty much identical to the e200, it only has a
2213 # different option to the scramble tool when building a bootloader and
2214 # makes the bootloader output file name in all lower case.
2215 target_id=27
2216 modelname="sansae200r"
2217 target="-DSANSA_E200"
2218 memory=32 # supposedly
2219 arm7tdmicc
2220 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2221 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2222 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2223 output="rockbox.mi4"
2224 appextra="recorder:gui:radio"
2225 plugins="yes"
2226 swcodec="yes"
2227 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2228 bootoutput="pp5022.mi4"
2229 # toolset is the tools within the tools directory that we build for
2230 # this particular target.
2231 toolset=$scramblebitmaptools
2232 # architecture, manufacturer and model for the target-tree build
2233 t_cpu="arm"
2234 t_manufacturer="sandisk"
2235 t_model="sansa-e200"
2238 52|sansac200)
2239 target_id=30
2240 modelname="sansac200"
2241 target="-DSANSA_C200"
2242 memory=32 # supposedly
2243 arm7tdmicc
2244 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2245 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2246 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2247 output="rockbox.mi4"
2248 appextra="recorder:gui:radio"
2249 plugins="yes"
2250 swcodec="yes"
2251 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2252 bootoutput="firmware.mi4"
2253 # toolset is the tools within the tools directory that we build for
2254 # this particular target.
2255 toolset=$scramblebitmaptools
2256 # architecture, manufacturer and model for the target-tree build
2257 t_cpu="arm"
2258 t_manufacturer="sandisk"
2259 t_model="sansa-c200"
2262 53|sansam200)
2263 target_id=48
2264 modelname="sansam200"
2265 target="-DSANSA_M200"
2266 memory=1 # always
2267 arm946cc
2268 tool="$rootdir/tools/scramble -add=m200"
2269 boottool="$rootdir/tools/scramble -tcc=crc"
2270 bootoutput="player.rom"
2271 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2272 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2273 output="rockbox.m200"
2274 appextra="recorder:gui:radio"
2275 plugins=""
2276 swcodec="yes"
2277 # toolset is the tools within the tools directory that we build for
2278 # this particular target.
2279 toolset=$tccbitmaptools
2280 # architecture, manufacturer and model for the target-tree build
2281 t_cpu="arm"
2282 t_manufacturer="tcc77x"
2283 t_model="m200"
2286 54|sansac100)
2287 target_id=42
2288 modelname="sansac100"
2289 target="-DSANSA_C100"
2290 memory=2
2291 arm946cc
2292 tool="$rootdir/tools/scramble -add=c100"
2293 boottool="$rootdir/tools/scramble -tcc=crc"
2294 bootoutput="player.rom"
2295 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2296 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2297 output="rockbox.c100"
2298 appextra="recorder:gui:radio"
2299 plugins=""
2300 swcodec="yes"
2301 # toolset is the tools within the tools directory that we build for
2302 # this particular target.
2303 toolset=$tccbitmaptools
2304 # architecture, manufacturer and model for the target-tree build
2305 t_cpu="arm"
2306 t_manufacturer="tcc77x"
2307 t_model="c100"
2310 55|sansaclip)
2311 target_id=50
2312 modelname="sansaclip"
2313 target="-DSANSA_CLIP"
2314 memory=2
2315 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2316 bmp2rb_native="$bmp2rb_mono"
2317 tool="$rootdir/tools/scramble -add=clip"
2318 output="rockbox.sansa"
2319 bootoutput="bootloader-clip.sansa"
2320 appextra="recorder:gui:radio"
2321 plugins="yes"
2322 swcodec="yes"
2323 toolset=$scramblebitmaptools
2324 t_cpu="arm"
2325 t_manufacturer="as3525"
2326 t_model="sansa-clip"
2327 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2328 arm9tdmicc
2329 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2333 56|sansae200v2)
2334 target_id=51
2335 modelname="sansae200v2"
2336 target="-DSANSA_E200V2"
2337 memory=8
2338 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2339 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2340 tool="$rootdir/tools/scramble -add=e2v2"
2341 output="rockbox.sansa"
2342 bootoutput="bootloader-e200v2.sansa"
2343 appextra="recorder:gui:radio"
2344 plugins="yes"
2345 swcodec="yes"
2346 toolset=$scramblebitmaptools
2347 t_cpu="arm"
2348 t_manufacturer="as3525"
2349 t_model="sansa-e200v2"
2350 arm9tdmicc
2354 57|sansam200v4)
2355 target_id=52
2356 modelname="sansam200v4"
2357 target="-DSANSA_M200V4"
2358 memory=2
2359 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2360 bmp2rb_native="$bmp2rb_mono"
2361 tool="$rootdir/tools/scramble -add=m2v4"
2362 output="rockbox.sansa"
2363 bootoutput="bootloader-m200v4.sansa"
2364 appextra="recorder:gui:radio"
2365 plugins="yes"
2366 swcodec="yes"
2367 toolset=$scramblebitmaptools
2368 t_cpu="arm"
2369 t_manufacturer="as3525"
2370 t_model="sansa-m200v4"
2371 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2372 arm9tdmicc
2373 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2377 58|sansafuze)
2378 target_id=53
2379 modelname="sansafuze"
2380 target="-DSANSA_FUZE"
2381 memory=8
2382 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2383 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2384 tool="$rootdir/tools/scramble -add=fuze"
2385 output="rockbox.sansa"
2386 bootoutput="bootloader-fuze.sansa"
2387 appextra="recorder:gui:radio"
2388 plugins="yes"
2389 swcodec="yes"
2390 toolset=$scramblebitmaptools
2391 t_cpu="arm"
2392 t_manufacturer="as3525"
2393 t_model="sansa-fuze"
2394 arm9tdmicc
2398 59|sansac200v2)
2399 target_id=55
2400 modelname="sansac200v2"
2401 target="-DSANSA_C200V2"
2402 memory=2 # as per OF diagnosis mode
2403 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2404 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2405 tool="$rootdir/tools/scramble -add=c2v2"
2406 output="rockbox.sansa"
2407 bootoutput="bootloader-c200v2.sansa"
2408 appextra="recorder:gui:radio"
2409 plugins="yes"
2410 swcodec="yes"
2411 # toolset is the tools within the tools directory that we build for
2412 # this particular target.
2413 toolset=$scramblebitmaptools
2414 # architecture, manufacturer and model for the target-tree build
2415 t_cpu="arm"
2416 t_manufacturer="as3525"
2417 t_model="sansa-c200v2"
2418 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2419 arm9tdmicc
2420 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2423 60|sansaclipv2)
2424 target_id=60
2425 modelname="sansaclipv2"
2426 target="-DSANSA_CLIPV2"
2427 memory=8
2428 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2429 bmp2rb_native="$bmp2rb_mono"
2430 tool="$rootdir/tools/scramble -add=clv2"
2431 output="rockbox.sansa"
2432 bootoutput="bootloader-clipv2.sansa"
2433 appextra="recorder:gui:radio"
2434 plugins="yes"
2435 swcodec="yes"
2436 toolset=$scramblebitmaptools
2437 t_cpu="arm"
2438 t_manufacturer="as3525"
2439 t_model="sansa-clipv2"
2440 arm926ejscc
2443 61|sansaview)
2444 echo "Sansa View is not yet supported!"
2445 exit 1
2446 target_id=63
2447 modelname="sansaview"
2448 target="-DSANSA_VIEW"
2449 memory=32
2450 arm1176jzscc
2451 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2452 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2453 output="rockbox.mi4"
2454 appextra="gui"
2455 plugins=""
2456 swcodec="yes"
2457 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2458 bootoutput="firmware.mi4"
2459 # toolset is the tools within the tools directory that we build for
2460 # this particular target.
2461 toolset=$scramblebitmaptools
2462 t_cpu="arm"
2463 t_manufacturer="sandisk"
2464 t_model="sansa-view"
2467 62|sansaclipplus)
2468 target_id=66
2469 modelname="sansaclipplus"
2470 target="-DSANSA_CLIPPLUS"
2471 memory=8
2472 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2473 bmp2rb_native="$bmp2rb_mono"
2474 tool="$rootdir/tools/scramble -add=cli+"
2475 output="rockbox.sansa"
2476 bootoutput="bootloader-clipplus.sansa"
2477 appextra="recorder:gui:radio"
2478 plugins="yes"
2479 swcodec="yes"
2480 toolset=$scramblebitmaptools
2481 t_cpu="arm"
2482 t_manufacturer="as3525"
2483 t_model="sansa-clipplus"
2484 arm926ejscc
2487 63|sansafuzev2)
2488 target_id=68
2489 modelname="sansafuzev2"
2490 target="-DSANSA_FUZEV2"
2491 memory=8 # not sure
2492 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2493 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2494 tool="$rootdir/tools/scramble -add=fuz2"
2495 output="rockbox.sansa"
2496 bootoutput="bootloader-fuzev2.sansa"
2497 appextra="recorder:gui:radio"
2498 plugins="yes"
2499 swcodec="yes"
2500 toolset=$scramblebitmaptools
2501 t_cpu="arm"
2502 t_manufacturer="as3525"
2503 t_model="sansa-fuzev2"
2504 arm926ejscc
2507 64|sansafuzeplus)
2508 target_id=80
2509 modelname="sansafuzeplus"
2510 target="-DSANSA_FUZEPLUS"
2511 memory=64
2512 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2513 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2514 tool="$rootdir/tools/scramble -add=fuz+"
2515 output="rockbox.sansa"
2516 boottool="true"
2517 bootoutput=""
2518 appextra="gui:recorder:radio"
2519 plugins="no"
2520 swcodec="yes"
2521 toolset=$scramblebitmaptools
2522 t_cpu="arm"
2523 t_manufacturer="imx233"
2524 t_model="sansa-fuzeplus"
2525 arm926ejscc
2528 150|tatungtpj1022)
2529 target_id=25
2530 modelname="tatungtpj1022"
2531 target="-DTATUNG_TPJ1022"
2532 memory=32 # always
2533 arm7tdmicc
2534 tool="$rootdir/tools/scramble -add tpj2"
2535 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2536 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2537 output="rockbox.elio"
2538 appextra="recorder:gui:radio"
2539 plugins="yes"
2540 swcodec="yes"
2541 boottool="$rootdir/tools/scramble -mi4v2"
2542 bootoutput="pp5020.mi4"
2543 # toolset is the tools within the tools directory that we build for
2544 # this particular target.
2545 toolset=$scramblebitmaptools
2546 # architecture, manufacturer and model for the target-tree build
2547 t_cpu="arm"
2548 t_manufacturer="tatung"
2549 t_model="tpj1022"
2552 100|gogearsa9200)
2553 target_id=41
2554 modelname="gogearsa9200"
2555 target="-DPHILIPS_SA9200"
2556 memory=32 # supposedly
2557 arm7tdmicc
2558 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2559 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2560 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2561 output="rockbox.mi4"
2562 appextra="recorder:gui:radio"
2563 plugins="yes"
2564 swcodec="yes"
2565 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2566 bootoutput="FWImage.ebn"
2567 # toolset is the tools within the tools directory that we build for
2568 # this particular target.
2569 toolset=$scramblebitmaptools
2570 # architecture, manufacturer and model for the target-tree build
2571 t_cpu="arm"
2572 t_manufacturer="philips"
2573 t_model="sa9200"
2576 101|gogearhdd1630)
2577 target_id=43
2578 modelname="gogearhdd1630"
2579 target="-DPHILIPS_HDD1630"
2580 memory=32 # supposedly
2581 arm7tdmicc
2582 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2583 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2584 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2585 output="rockbox.mi4"
2586 appextra="recorder:gui:radio"
2587 plugins="yes"
2588 swcodec="yes"
2589 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2590 bootoutput="FWImage.ebn"
2591 # toolset is the tools within the tools directory that we build for
2592 # this particular target.
2593 toolset=$scramblebitmaptools
2594 # architecture, manufacturer and model for the target-tree build
2595 t_cpu="arm"
2596 t_manufacturer="philips"
2597 t_model="hdd1630"
2600 102|gogearhdd6330)
2601 target_id=65
2602 modelname="gogearhdd6330"
2603 target="-DPHILIPS_HDD6330"
2604 memory=64 # always
2605 arm7tdmicc
2606 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2607 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2608 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2609 output="rockbox.mi4"
2610 appextra="recorder:gui:radio"
2611 plugins="yes"
2612 swcodec="yes"
2613 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2614 bootoutput="FWImage.ebn"
2615 # toolset is the tools within the tools directory that we build for
2616 # this particular target.
2617 toolset=$scramblebitmaptools
2618 # architecture, manufacturer and model for the target-tree build
2619 t_cpu="arm"
2620 t_manufacturer="philips"
2621 t_model="hdd6330"
2624 110|meizum6sl)
2625 target_id=49
2626 modelname="meizum6sl"
2627 target="-DMEIZU_M6SL"
2628 memory=16 # always
2629 arm940tbecc
2630 tool="cp"
2631 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2632 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2633 output="rockbox.meizu"
2634 appextra="recorder:gui:radio"
2635 plugins="no" #FIXME
2636 swcodec="yes"
2637 toolset=$genericbitmaptools
2638 boottool="cp"
2639 bootoutput="rockboot.ebn"
2640 # architecture, manufacturer and model for the target-tree build
2641 t_cpu="arm"
2642 t_manufacturer="s5l8700"
2643 t_model="meizu-m6sl"
2646 111|meizum6sp)
2647 target_id=46
2648 modelname="meizum6sp"
2649 target="-DMEIZU_M6SP"
2650 memory=16 # always
2651 arm940tbecc
2652 tool="cp"
2653 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2654 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2655 output="rockbox.meizu"
2656 appextra="recorder:gui:radio"
2657 plugins="no" #FIXME
2658 swcodec="yes"
2659 toolset=$genericbitmaptools
2660 boottool="cp"
2661 bootoutput="rockboot.ebn"
2662 # architecture, manufacturer and model for the target-tree build
2663 t_cpu="arm"
2664 t_manufacturer="s5l8700"
2665 t_model="meizu-m6sp"
2668 112|meizum3)
2669 target_id=47
2670 modelname="meizum3"
2671 target="-DMEIZU_M3"
2672 memory=16 # always
2673 arm940tbecc
2674 tool="cp"
2675 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2676 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2677 output="rockbox.meizu"
2678 appextra="recorder:gui:radio"
2679 plugins="no" #FIXME
2680 swcodec="yes"
2681 toolset=$genericbitmaptools
2682 boottool="cp"
2683 bootoutput="rockboot.ebn"
2684 # architecture, manufacturer and model for the target-tree build
2685 t_cpu="arm"
2686 t_manufacturer="s5l8700"
2687 t_model="meizu-m3"
2690 120|ondavx747)
2691 target_id=45
2692 modelname="ondavx747"
2693 target="-DONDA_VX747"
2694 memory=16
2695 mipselcc
2696 tool="$rootdir/tools/scramble -add=x747"
2697 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2698 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2699 output="rockbox.vx747"
2700 appextra="recorder:gui:radio"
2701 plugins="yes"
2702 swcodec="yes"
2703 toolset=$genericbitmaptools
2704 boottool="$rootdir/tools/scramble -ccpmp"
2705 bootoutput="ccpmp.bin"
2706 # architecture, manufacturer and model for the target-tree build
2707 t_cpu="mips"
2708 t_manufacturer="ingenic_jz47xx"
2709 t_model="onda_vx747"
2712 121|ondavx767)
2713 target_id=64
2714 modelname="ondavx767"
2715 target="-DONDA_VX767"
2716 memory=16 #FIXME
2717 mipselcc
2718 tool="cp"
2719 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2720 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2721 output="rockbox.vx767"
2722 appextra="recorder:gui:radio"
2723 plugins="" #FIXME
2724 swcodec="yes"
2725 toolset=$genericbitmaptools
2726 boottool="$rootdir/tools/scramble -ccpmp"
2727 bootoutput="ccpmp.bin"
2728 # architecture, manufacturer and model for the target-tree build
2729 t_cpu="mips"
2730 t_manufacturer="ingenic_jz47xx"
2731 t_model="onda_vx767"
2734 122|ondavx747p)
2735 target_id=54
2736 modelname="ondavx747p"
2737 target="-DONDA_VX747P"
2738 memory=16
2739 mipselcc
2740 tool="$rootdir/tools/scramble -add=747p"
2741 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2742 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2743 output="rockbox.vx747p"
2744 appextra="recorder:gui:radio"
2745 plugins="yes"
2746 swcodec="yes"
2747 toolset=$genericbitmaptools
2748 boottool="$rootdir/tools/scramble -ccpmp"
2749 bootoutput="ccpmp.bin"
2750 # architecture, manufacturer and model for the target-tree build
2751 t_cpu="mips"
2752 t_manufacturer="ingenic_jz47xx"
2753 t_model="onda_vx747"
2756 123|ondavx777)
2757 target_id=61
2758 modelname="ondavx777"
2759 target="-DONDA_VX777"
2760 memory=16
2761 mipselcc
2762 tool="$rootdir/tools/scramble -add=x777"
2763 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2764 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2765 output="rockbox.vx777"
2766 appextra="recorder:gui:radio"
2767 plugins="yes"
2768 swcodec="yes"
2769 toolset=$genericbitmaptools
2770 boottool="$rootdir/tools/scramble -ccpmp"
2771 bootoutput="ccpmp.bin"
2772 # architecture, manufacturer and model for the target-tree build
2773 t_cpu="mips"
2774 t_manufacturer="ingenic_jz47xx"
2775 t_model="onda_vx747"
2778 130|lyreproto1)
2779 target_id=56
2780 modelname="lyreproto1"
2781 target="-DLYRE_PROTO1"
2782 memory=64
2783 arm926ejscc
2784 tool="cp"
2785 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2786 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2787 output="rockbox.lyre"
2788 appextra="recorder:gui:radio"
2789 plugins=""
2790 swcodec="yes"
2791 toolset=$scramblebitmaptools
2792 boottool="cp"
2793 bootoutput="bootloader-proto1.lyre"
2794 # architecture, manufacturer and model for the target-tree build
2795 t_cpu="arm"
2796 t_manufacturer="at91sam"
2797 t_model="lyre_proto1"
2800 131|mini2440)
2801 target_id=99
2802 modelname="mini2440"
2803 target="-DMINI2440"
2804 memory=64
2805 arm9tdmicc
2806 tool="$rootdir/tools/scramble -add=m244"
2807 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2808 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2809 output="rockbox.mini2440"
2810 appextra="recorder:gui:radio"
2811 plugins=""
2812 swcodec="yes"
2813 toolset=$scramblebitmaptools
2814 boottool="cp"
2815 bootoutput="bootloader-mini2440.lyre"
2816 # architecture, manufacturer and model for the target-tree build
2817 t_cpu="arm"
2818 t_manufacturer="s3c2440"
2819 t_model="mini2440"
2822 140|samsungyh820)
2823 target_id=57
2824 modelname="samsungyh820"
2825 target="-DSAMSUNG_YH820"
2826 memory=32 # always
2827 arm7tdmicc
2828 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2829 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2830 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2831 output="rockbox.mi4"
2832 appextra="recorder:gui:radio"
2833 plugins="yes"
2834 swcodec="yes"
2835 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2836 bootoutput="FW_YH820.mi4"
2837 # toolset is the tools within the tools directory that we build for
2838 # this particular target.
2839 toolset=$scramblebitmaptools
2840 # architecture, manufacturer and model for the target-tree build
2841 t_cpu="arm"
2842 t_manufacturer="samsung"
2843 t_model="yh820"
2846 141|samsungyh920)
2847 target_id=58
2848 modelname="samsungyh920"
2849 target="-DSAMSUNG_YH920"
2850 memory=32 # always
2851 arm7tdmicc
2852 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2853 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2854 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2855 output="rockbox.mi4"
2856 appextra="recorder:gui:radio"
2857 plugins="yes"
2858 swcodec="yes"
2859 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2860 bootoutput="PP5020.mi4"
2861 # toolset is the tools within the tools directory that we build for
2862 # this particular target.
2863 toolset=$scramblebitmaptools
2864 # architecture, manufacturer and model for the target-tree build
2865 t_cpu="arm"
2866 t_manufacturer="samsung"
2867 t_model="yh920"
2870 142|samsungyh925)
2871 target_id=59
2872 modelname="samsungyh925"
2873 target="-DSAMSUNG_YH925"
2874 memory=32 # always
2875 arm7tdmicc
2876 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2877 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2878 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2879 output="rockbox.mi4"
2880 appextra="recorder:gui:radio"
2881 plugins="yes"
2882 swcodec="yes"
2883 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2884 bootoutput="FW_YH925.mi4"
2885 # toolset is the tools within the tools directory that we build for
2886 # this particular target.
2887 toolset=$scramblebitmaptools
2888 # architecture, manufacturer and model for the target-tree build
2889 t_cpu="arm"
2890 t_manufacturer="samsung"
2891 t_model="yh925"
2894 143|samsungyps3)
2895 target_id=72
2896 modelname="samsungyps3"
2897 target="-DSAMSUNG_YPS3"
2898 memory=16 # always
2899 arm940tbecc
2900 tool="cp"
2901 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2902 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2903 output="rockbox.yps3"
2904 appextra="recorder:gui:radio"
2905 plugins="no" #FIXME
2906 swcodec="yes"
2907 toolset=$genericbitmaptools
2908 boottool="cp"
2909 bootoutput="rockboot.ebn"
2910 # architecture, manufacturer and model for the target-tree build
2911 t_cpu="arm"
2912 t_manufacturer="s5l8700"
2913 t_model="yps3"
2916 160|vibe500)
2917 target_id=67
2918 modelname="vibe500"
2919 target="-DPBELL_VIBE500"
2920 memory=32 # always
2921 arm7tdmicc
2922 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2923 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2924 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2925 output="rockbox.mi4"
2926 appextra="recorder:gui:radio"
2927 plugins="yes"
2928 swcodec="yes"
2929 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2930 bootoutput="jukebox.mi4"
2931 # toolset is the tools within the tools directory that we build for
2932 # this particular target.
2933 toolset=$scramblebitmaptools
2934 # architecture, manufacturer and model for the target-tree build
2935 t_cpu="arm"
2936 t_manufacturer="pbell"
2937 t_model="vibe500"
2940 170|mpiohd200)
2941 target_id=69
2942 modelname="mpiohd200"
2943 target="-DMPIO_HD200"
2944 memory=16 # always
2945 coldfirecc
2946 tool="$rootdir/tools/scramble -add=hd20"
2947 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2948 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2949 output="rockbox.mpio"
2950 bootoutput="bootloader.mpio"
2951 appextra="recorder:gui:radio"
2952 plugins="yes"
2953 swcodec="yes"
2954 # toolset is the tools within the tools directory that we build for
2955 # this particular target.
2956 toolset="$genericbitmaptools"
2957 # architecture, manufacturer and model for the target-tree build
2958 t_cpu="coldfire"
2959 t_manufacturer="mpio"
2960 t_model="hd200"
2963 171|mpiohd300)
2964 target_id=70
2965 modelname="mpiohd300"
2966 target="-DMPIO_HD300"
2967 memory=16 # always
2968 coldfirecc
2969 tool="$rootdir/tools/scramble -add=hd30"
2970 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2971 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2972 output="rockbox.mpio"
2973 bootoutput="bootloader.mpio"
2974 appextra="recorder:gui:radio"
2975 plugins="yes"
2976 swcodec="yes"
2977 # toolset is the tools within the tools directory that we build for
2978 # this particular target.
2979 toolset="$genericbitmaptools"
2980 # architecture, manufacturer and model for the target-tree build
2981 t_cpu="coldfire"
2982 t_manufacturer="mpio"
2983 t_model="hd300"
2986 180|rk27generic)
2987 target_id=78
2988 modelname="rk27generic"
2989 target="-DRK27_GENERIC"
2990 memory=16 # always
2991 arm7ejscc
2992 tool="$rootdir/tools/scramble -add=rk27"
2993 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2994 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2995 output="rockbox.rk27"
2996 bootoutput="bootloader.rk27"
2997 appextra="recorder:gui:radio"
2998 plugins="yes"
2999 swcodec="yes"
3000 # toolset is the tools within the tools directory that we build for
3001 # this particular target.
3002 toolset="$genericbitmaptools"
3003 # architecture, manufacturer and model for the target-tree build
3004 t_cpu="arm"
3005 t_manufacturer="rk27xx"
3006 t_model="rk27generic"
3009 200|sdlapp)
3010 application="yes"
3011 target_id=73
3012 modelname="sdlapp"
3013 target="-DSDLAPP"
3014 app_set_paths
3015 app_set_lcd_size
3016 memory=8
3017 uname=`uname`
3018 simcc "sdl-app"
3019 tool="cp "
3020 boottool="cp "
3021 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3022 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3023 output="rockbox"
3024 bootoutput="rockbox"
3025 appextra="recorder:gui:radio"
3026 plugins="yes"
3027 swcodec="yes"
3028 # architecture, manufacturer and model for the target-tree build
3029 t_cpu="hosted"
3030 t_manufacturer="sdl"
3031 t_model="app"
3034 201|android)
3035 application="yes"
3036 target_id=74
3037 modelname="android"
3038 target="-DANDROID"
3039 app_type="android"
3040 app_set_lcd_size
3041 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
3042 bindir="/data/data/org.rockbox/lib"
3043 libdir="/data/data/org.rockbox/app_rockbox"
3044 memory=8
3045 uname=`uname`
3046 androidcc
3047 tool="cp "
3048 boottool="cp "
3049 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3050 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3051 output="librockbox.so"
3052 bootoutput="librockbox.so"
3053 appextra="recorder:gui:radio:hosted/android"
3054 plugins="yes"
3055 swcodec="yes"
3056 # architecture, manufacturer and model for the target-tree build
3057 t_cpu="hosted"
3058 t_manufacturer="android"
3059 t_model="app"
3062 202|nokian8xx)
3063 application="yes"
3064 target_id=75
3065 modelname="nokian8xx"
3066 app_type="sdl-app"
3067 target="-DNOKIAN8XX"
3068 sharedir="/opt/rockbox/share/rockbox"
3069 bindir="/opt/rockbox/bin"
3070 libdir="/opt/rockbox/lib"
3071 memory=8
3072 uname=`uname`
3073 maemocc 4
3074 tool="cp "
3075 boottool="cp "
3076 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3077 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3078 output="rockbox"
3079 bootoutput="rockbox"
3080 appextra="recorder:gui:radio"
3081 plugins="yes"
3082 swcodec="yes"
3083 # architecture, manufacturer and model for the target-tree build
3084 t_cpu="hosted"
3085 t_manufacturer="maemo"
3086 t_model="app"
3089 203|nokian900)
3090 application="yes"
3091 target_id=76
3092 modelname="nokian900"
3093 app_type="sdl-app"
3094 target="-DNOKIAN900"
3095 sharedir="/opt/rockbox/share/rockbox"
3096 bindir="/opt/rockbox/bin"
3097 libdir="/opt/rockbox/lib"
3098 memory=8
3099 uname=`uname`
3100 maemocc 5
3101 tool="cp "
3102 boottool="cp "
3103 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3104 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3105 output="rockbox"
3106 bootoutput="rockbox"
3107 appextra="recorder:gui:radio"
3108 plugins="yes"
3109 swcodec="yes"
3110 # architecture, manufacturer and model for the target-tree build
3111 t_cpu="hosted"
3112 t_manufacturer="maemo"
3113 t_model="app"
3116 204|pandora)
3117 application="yes"
3118 target_id=77
3119 modelname="pandora"
3120 app_type="sdl-app"
3121 target="-DPANDORA"
3122 sharedir="rockbox/share/rockbox"
3123 bindir="rockbox/bin"
3124 libdir="rockbox/lib"
3125 memory=8
3126 uname=`uname`
3127 pandoracc
3128 tool="cp "
3129 boottool="cp "
3130 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3131 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3132 output="rockbox"
3133 bootoutput="rockbox"
3134 appextra="recorder:gui:radio"
3135 plugins="yes"
3136 swcodec="yes"
3137 # architecture, manufacturer and model for the target-tree build
3138 t_cpu="hosted"
3139 t_manufacturer="pandora"
3140 t_model="app"
3144 echo "Please select a supported target platform!"
3145 exit 7
3148 esac
3150 echo "Platform set to $modelname"
3153 #remove start
3154 ############################################################################
3155 # Amount of memory, for those that can differ. They have $memory unset at
3156 # this point.
3159 if [ -z "$memory" ]; then
3160 case $target_id in
3162 if [ "$ARG_RAM" ]; then
3163 size=$ARG_RAM
3164 else
3165 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3166 size=`input`;
3168 case $size in
3169 60|64)
3170 memory="64"
3173 memory="32"
3175 esac
3178 if [ "$ARG_RAM" ]; then
3179 size=$ARG_RAM
3180 else
3181 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3182 size=`input`;
3184 case $size in
3186 memory="8"
3189 memory="2"
3191 esac
3193 esac
3194 echo "Memory size selected: $memory MB"
3195 [ "$ARG_TYPE" ] || echo ""
3197 #remove end
3199 ##################################################################
3200 # Figure out build "type"
3203 # the ifp7x0 is the only platform that supports building a gdb stub like
3204 # this
3205 case $modelname in
3206 iriverifp7xx)
3207 gdbstub=", (G)DB stub"
3209 sansae200r|sansae200)
3210 gdbstub=", (I)nstaller"
3212 sansac200)
3213 gdbstub=", (E)raser"
3217 esac
3218 if [ "$ARG_TYPE" ]; then
3219 btype=$ARG_TYPE
3220 else
3221 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool$gdbstub: (Defaults to N)"
3222 btype=`input`;
3225 case $btype in
3226 [Ii])
3227 appsdir='$(ROOTDIR)/bootloader'
3228 apps="bootloader"
3229 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3230 bootloader="1"
3231 echo "e200R-installer build selected"
3233 [Ee])
3234 appsdir='$(ROOTDIR)/bootloader'
3235 apps="bootloader"
3236 echo "C2(4)0 or C2(5)0"
3237 variant=`input`
3238 case $variant in
3240 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
3241 echo "c240 eraser build selected"
3244 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
3245 echo "c240 eraser build selected"
3247 esac
3248 bootloader="1"
3249 echo "c200 eraser build selected"
3251 [Bb])
3252 if test $t_manufacturer = "archos"; then
3253 # Archos SH-based players do this somewhat differently for
3254 # some reason
3255 appsdir='$(ROOTDIR)/flash/bootbox'
3256 apps="bootbox"
3257 else
3258 appsdir='$(ROOTDIR)/bootloader'
3259 apps="bootloader"
3260 flash=""
3261 if test -n "$boottool"; then
3262 tool="$boottool"
3264 if test -n "$bootoutput"; then
3265 output=$bootoutput
3268 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3269 bootloader="1"
3270 echo "Bootloader build selected"
3272 [Ss])
3273 if [ "$modelname" = "sansae200r" ]; then
3274 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3275 exit 8
3277 debug="-DDEBUG"
3278 simulator="yes"
3279 extradefines="$extradefines -DSIMULATOR"
3280 archosrom=""
3281 flash=""
3282 echo "Simulator build selected"
3284 [Aa]*)
3285 echo "Advanced build selected"
3286 whichadvanced $btype
3288 [Gg])
3289 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3290 appsdir='$(ROOTDIR)/gdb'
3291 apps="stub"
3292 case $modelname in
3293 iriverifp7xx)
3294 output="stub.wma"
3298 esac
3299 echo "GDB stub build selected"
3301 [Cc])
3302 uname=`uname`
3303 simcc "checkwps"
3304 toolset='';
3305 t_cpu='';
3306 GCCOPTS='';
3307 extradefines="$extradefines -DDEBUG"
3308 appsdir='$(ROOTDIR)/tools/checkwps';
3309 output='checkwps.'${modelname};
3310 archosrom='';
3311 echo "CheckWPS build selected"
3313 [Dd])
3314 uname=`uname`
3315 simcc "database"
3316 toolset='';
3317 t_cpu='';
3318 GCCOPTS='';
3319 appsdir='$(ROOTDIR)/tools/database';
3320 archosrom='';
3322 case $uname in
3323 CYGWIN*|MINGW*)
3324 output="database_${modelname}.exe"
3327 output='database.'${modelname};
3329 esac
3331 echo "Database tool build selected"
3334 if [ "$modelname" = "sansae200r" ]; then
3335 echo "Do not use the e200R target for regular builds. Use e200 instead."
3336 exit 8
3338 debug=""
3339 btype="N" # set it explicitly since RET only gets here as well
3340 echo "Normal build selected"
3343 esac
3344 # to be able running "make manual" from non-manual configuration
3345 case $modelname in
3346 archosrecorderv2)
3347 manualdev="archosfmrecorder"
3349 iriverh1??)
3350 manualdev="iriverh100"
3352 ipodmini2g)
3353 manualdev="ipodmini1g"
3356 manualdev=$modelname
3358 esac
3360 if [ -z "$debug" ]; then
3361 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3364 if [ "yes" = "$application" ]; then
3365 echo Building Rockbox as an Application
3366 extradefines="$extradefines -DAPPLICATION"
3369 echo "Using source code root directory: $rootdir"
3371 # this was once possible to change at build-time, but no more:
3372 language="english"
3374 uname=`uname`
3376 if [ "yes" = "$simulator" ]; then
3377 # setup compiler and things for simulator
3378 simcc "sdl-sim"
3380 if [ -d "simdisk" ]; then
3381 echo "Subdirectory 'simdisk' already present"
3382 else
3383 mkdir simdisk
3384 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3388 # Now, figure out version number of the (gcc) compiler we are about to use
3389 gccver=`$CC -dumpversion`;
3391 # figure out the binutil version too and display it, mostly for the build
3392 # system etc to be able to see it easier
3393 if [ $uname = "Darwin" ]; then
3394 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3395 else
3396 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3399 if [ -z "$gccver" ]; then
3400 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3401 echo "[WARNING] this may cause your build to fail since we cannot do the"
3402 echo "[WARNING] checks we want now."
3403 else
3405 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3406 # DEPEND on it
3408 num1=`echo $gccver | cut -d . -f1`
3409 num2=`echo $gccver | cut -d . -f2`
3410 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3412 # This makes:
3413 # 3.3.X => 303
3414 # 3.4.X => 304
3415 # 2.95.3 => 295
3417 echo "Using $CC $gccver ($gccnum)"
3419 if test "$gccnum" -ge "400"; then
3420 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3421 # so we ignore that warnings for now
3422 # -Wno-pointer-sign
3423 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3426 if test "$gccnum" -ge "402"; then
3427 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3428 # and later would throw it for several valid cases
3429 GCCOPTS="$GCCOPTS -Wno-override-init"
3432 case $prefix in
3433 ""|"$CROSS_COMPILE")
3434 # simulator
3436 i586-mingw32msvc-)
3437 # cross-compile for win32
3440 # Verify that the cross-compiler is of a recommended version!
3441 if test "$gccver" != "$gccchoice"; then
3442 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3443 echo "WARNING: version $gccchoice!"
3444 echo "WARNING: This may cause your build to fail since it may be a version"
3445 echo "WARNING: that isn't functional or known to not be the best choice."
3446 echo "WARNING: If you suffer from build problems, you know that this is"
3447 echo "WARNING: a likely source for them..."
3450 esac
3455 echo "Using $LD $ldver"
3457 # check the compiler for SH platforms
3458 if test "$CC" = "sh-elf-gcc"; then
3459 if test "$gccnum" -lt "400"; then
3460 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3461 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3462 else
3463 # figure out patch status
3464 gccpatch=`$CC --version`;
3466 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3467 echo "gcc $gccver is rockbox patched"
3468 # then convert -O to -Os to get smaller binaries!
3469 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3470 else
3471 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3472 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3477 if test "$CC" = "m68k-elf-gcc"; then
3478 # convert -O to -Os to get smaller binaries!
3479 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3482 if [ "$ARG_CCACHE" = "1" ]; then
3483 echo "Enable ccache for building"
3484 ccache="ccache"
3485 elif [ "$ARG_CCACHE" != "0" ]; then
3486 ccache=`findtool ccache`
3487 if test -n "$ccache"; then
3488 echo "Found and uses ccache ($ccache)"
3492 # figure out the full path to the various commands if possible
3493 HOSTCC=`findtool gcc --lit`
3494 HOSTAR=`findtool ar --lit`
3495 CC=`findtool ${CC} --lit`
3496 LD=`findtool ${AR} --lit`
3497 AR=`findtool ${AR} --lit`
3498 AS=`findtool ${AS} --lit`
3499 OC=`findtool ${OC} --lit`
3500 WINDRES=`findtool ${WINDRES} --lit`
3501 DLLTOOL=`findtool ${DLLTOOL} --lit`
3502 DLLWRAP=`findtool ${DLLWRAP} --lit`
3503 RANLIB=`findtool ${RANLIB} --lit`
3505 if test -n "$ccache"; then
3506 CC="$ccache $CC"
3509 if test "$ARG_ARM_THUMB" = "1"; then
3510 extradefines="$extradefines -DUSE_THUMB"
3511 CC="$toolsdir/thumb-cc.py $CC"
3514 if test "X$endian" = "Xbig"; then
3515 defendian="ROCKBOX_BIG_ENDIAN"
3516 else
3517 defendian="ROCKBOX_LITTLE_ENDIAN"
3520 if [ "$ARG_RBDIR" != "" ]; then
3521 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3522 rbdir="/"$ARG_RBDIR
3523 else
3524 rbdir=$ARG_RBDIR
3526 echo "Using alternate rockbox dir: ${rbdir}"
3529 cat > autoconf.h <<EOF
3530 /* This header was made by configure */
3531 #ifndef __BUILD_AUTOCONF_H
3532 #define __BUILD_AUTOCONF_H
3534 /* Define endianess for the target or simulator platform */
3535 #define ${defendian} 1
3537 /* Define this if you build rockbox to support the logf logging and display */
3538 ${use_logf}
3540 /* Define this to record a chart with timings for the stages of boot */
3541 ${use_bootchart}
3543 /* optional define for a backlight modded Ondio */
3544 ${have_backlight}
3546 /* optional define for FM radio mod for iAudio M5 */
3547 ${have_fmradio_in}
3549 /* optional define for ATA poweroff on Player */
3550 ${have_ata_poweroff}
3552 /* optional defines for RTC mod for h1x0 */
3553 ${config_rtc}
3554 ${have_rtc_alarm}
3556 /* the threading backend we use */
3557 #define ${thread_support}
3559 /* lcd dimensions for application builds from configure */
3560 ${app_lcd_width}
3561 ${app_lcd_height}
3563 /* root of Rockbox */
3564 #define ROCKBOX_DIR "${rbdir}"
3565 #define ROCKBOX_SHARE_PATH "${sharedir}"
3566 #define ROCKBOX_BINARY_PATH "${bindir}"
3567 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3569 #endif /* __BUILD_AUTOCONF_H */
3572 if test -n "$t_cpu"; then
3573 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3575 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3576 # Maemo needs the SDL port, too
3577 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3578 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3579 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3580 # Pandora needs the SDL port, too
3581 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3582 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3583 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3584 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3585 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3588 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3589 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3590 GCCOPTS="$GCCOPTS"
3593 if test "$swcodec" = "yes"; then
3594 voicetoolset="rbspeexenc voicefont wavtrim"
3595 else
3596 voicetoolset="voicefont wavtrim"
3599 if test "$apps" = "apps"; then
3600 # only when we build "real" apps we build the .lng files
3601 buildlangs="langs"
3604 #### Fix the cmdline ###
3605 if [ -n "$ARG_PREFIX" ]; then
3606 cmdline="$cmdline --prefix=\$(PREFIX)"
3608 if [ -n "$ARG_LCDWIDTH" ]; then
3609 cmdline="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3612 # remove parts from the cmdline we're going to set unconditionally
3613 cmdline=`echo $cmdline | sed -e s,--target=[a-zA-Z0-9]\*,,g \
3614 -e s,--ram=[0-9]\*,,g \
3615 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3616 -e s,--type=[a-zA-Z]\*,,g`
3617 cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3619 ### end of cmdline
3621 cat > Makefile <<EOF
3622 ## Automatically generated. http://www.rockbox.org/
3624 export ROOTDIR=${rootdir}
3625 export FIRMDIR=\$(ROOTDIR)/firmware
3626 export APPSDIR=${appsdir}
3627 export TOOLSDIR=${toolsdir}
3628 export DOCSDIR=${rootdir}/docs
3629 export MANUALDIR=${rootdir}/manual
3630 export DEBUG=${debug}
3631 export MODELNAME=${modelname}
3632 export ARCHOSROM=${archosrom}
3633 export FLASHFILE=${flash}
3634 export TARGET_ID=${target_id}
3635 export TARGET=${target}
3636 export CPU=${t_cpu}
3637 export MANUFACTURER=${t_manufacturer}
3638 export OBJDIR=${pwd}
3639 export BUILDDIR=${pwd}
3640 export LANGUAGE=${language}
3641 export VOICELANGUAGE=${voicelanguage}
3642 export MEMORYSIZE=${memory}
3643 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3644 export MKFIRMWARE=${tool}
3645 export BMP2RB_MONO=${bmp2rb_mono}
3646 export BMP2RB_NATIVE=${bmp2rb_native}
3647 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3648 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3649 export BINARY=${output}
3650 export APPEXTRA=${appextra}
3651 export ENABLEDPLUGINS=${plugins}
3652 export SOFTWARECODECS=${swcodec}
3653 export EXTRA_DEFINES=${extradefines}
3654 export HOSTCC=${HOSTCC}
3655 export HOSTAR=${HOSTAR}
3656 export CC=${CC}
3657 export LD=${LD}
3658 export AR=${AR}
3659 export AS=${AS}
3660 export OC=${OC}
3661 export WINDRES=${WINDRES}
3662 export DLLTOOL=${DLLTOOL}
3663 export DLLWRAP=${DLLWRAP}
3664 export RANLIB=${RANLIB}
3665 export PREFIX=${ARG_PREFIX}
3666 export PROFILE_OPTS=${PROFILE_OPTS}
3667 export APP_TYPE=${app_type}
3668 export APPLICATION=${application}
3669 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3670 export GCCOPTS=${GCCOPTS}
3671 export TARGET_INC=${TARGET_INC}
3672 export LOADADDRESS=${loadaddress}
3673 export SHARED_LDFLAG=${SHARED_LDFLAG}
3674 export SHARED_CFLAGS=${SHARED_CFLAGS}
3675 export LDOPTS=${LDOPTS}
3676 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3677 export GCCVER=${gccver}
3678 export GCCNUM=${gccnum}
3679 export UNAME=${uname}
3680 export MANUALDEV=${manualdev}
3681 export TTS_OPTS=${TTS_OPTS}
3682 export TTS_ENGINE=${TTS_ENGINE}
3683 export ENC_OPTS=${ENC_OPTS}
3684 export ENCODER=${ENCODER}
3685 export USE_ELF=${USE_ELF}
3686 export RBDIR=${rbdir}
3687 export ROCKBOX_SHARE_PATH=${sharedir}
3688 export ROCKBOX_BINARY_PATH=${bindir}
3689 export ROCKBOX_LIBRARY_PATH=${libdir}
3690 export SDLCONFIG=${sdl}
3691 export LCDORIENTATION=${lcd_orientation}
3693 CONFIGURE_OPTIONS=${cmdline}
3695 include \$(TOOLSDIR)/root.make
3698 echo "Created Makefile"