Fix FS#12408 - don't load skins too early causing buflib handles to leak
[maemo-rb.git] / tools / configure
blob8a622af7e7176682d54c0d43646d35f82663d1e1
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 # sdl-config might (not) be prefixed for cross compiles so try both.
151 files="sdl-config:${CROSS}sdl-config"
152 winbuild="$1"
154 IFS=":"
155 for file in $files
157 for path in $PATH
159 #echo "checks for $file in $path" >&2
160 if test -f "$path/$file"; then
161 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
162 if [ "yes" = "${winbuild}" ]; then
163 echo "$path/$file"
164 return
166 else
167 if [ "yes" != "${winbuild}" ]; then
168 echo "$path/$file"
169 return
173 done
174 done
177 # check for availability of sigaltstack to support our thread engine
178 check_sigaltstack() {
179 cat >$tmpdir/check_threads.c <<EOF
180 #include <signal.h>
181 int main(int argc, char **argv)
183 #ifndef NULL
184 #define NULL (void*)0
185 #endif
186 sigaltstack(NULL, NULL);
187 return 0;
190 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 1> /dev/null
191 result=$?
192 rm -rf $tmpdir/check_threads*
193 echo $result
196 # check for availability of Fiber on Win32 to support our thread engine
197 check_fiber() {
198 cat >$tmpdir/check_threads.c <<EOF
199 #include <windows.h>
200 int main(int argc, char **argv)
202 ConvertThreadToFiber(NULL);
203 return 0;
206 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 2>/dev/null
207 result=$?
208 rm -rf $tmpdir/check_threads*
209 echo $result
212 simcc () {
214 # default tool setup for native building
215 prefixtools "$CROSS_COMPILE"
216 ARG_ARM_THUMB=0 # can't use thumb in native builds
218 app_type=$1
219 winbuild=""
220 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef// -e s/-O//`
221 GCCOPTS="$GCCOPTS -fno-builtin -g"
222 GCCOPTIMIZE=''
223 LDOPTS='-lm' # button-sdl.c uses sqrt()
224 sigaltstack=""
225 fibers=""
227 # default output binary name, don't override app_get_platform()
228 if [ "$app_type" != "sdl-app" ]; then
229 output="rockboxui"
232 # default share option, override below if needed
233 SHARED_LDFLAG="-shared"
234 SHARED_CFLAGS="-fPIC -fvisibility=hidden"
236 if [ "$win32crosscompile" = "yes" ]; then
237 LDOPTS="$LDOPTS -mconsole"
238 output="$output.exe"
239 winbuild="yes"
240 CROSS=${CROSS:-"i586-mingw32msvc-"}
241 SHARED_CFLAGS=''
242 else
243 case $uname in
244 CYGWIN*)
245 echo "Cygwin host detected"
247 fibers=`check_fiber`
248 LDOPTS="$LDOPTS -mconsole"
249 output="$output.exe"
250 winbuild="yes"
251 SHARED_CFLAGS=''
254 MINGW*)
255 echo "MinGW host detected"
257 fibers=`check_fiber`
258 LDOPTS="$LDOPTS -mconsole"
259 output="$output.exe"
260 winbuild="yes"
263 Linux)
264 sigaltstack=`check_sigaltstack`
265 echo "Linux host detected"
266 LDOPTS="$LDOPTS -ldl"
269 FreeBSD)
270 sigaltstack=`check_sigaltstack`
271 echo "FreeBSD host detected"
272 LDOPTS="$LDOPTS -ldl"
275 Darwin)
276 sigaltstack=`check_sigaltstack`
277 echo "Darwin host detected"
278 LDOPTS="$LDOPTS -ldl"
279 SHARED_LDFLAG="-dynamiclib -Wl\,-single_module"
282 SunOS)
283 sigaltstack=`check_sigaltstack`
284 echo "*Solaris host detected"
286 GCCOPTS="$GCCOPTS -fPIC"
287 LDOPTS="$LDOPTS -ldl"
291 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
292 exit 1
294 esac
297 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
298 sdl=`findsdl $winbuild`
300 if [ -n `echo $app_type | grep "sdl"` ]; then
301 if [ -z "$sdl" ]; then
302 echo "configure didn't find sdl-config, which indicates that you"
303 echo "don't have SDL (properly) installed. Please correct and"
304 echo "re-run configure!"
305 exit 2
306 else
307 # generic sdl-config checker
308 GCCOPTS="$GCCOPTS `$sdl --cflags`"
309 LDOPTS="$LDOPTS `$sdl --libs`"
314 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
316 if test "X$win32crosscompile" != "Xyes"; then
317 if test "`uname -m`" = "i686"; then
318 echo "Enabling MMX support"
319 GCCOPTS="$GCCOPTS -mmmx"
321 # x86_64 supports MMX by default
323 id=$$
324 cat >$tmpdir/conftest-$id.c <<EOF
325 #include <stdio.h>
326 int main(int argc, char **argv)
328 int var=0;
329 char *varp = (char *)&var;
330 *varp=1;
332 printf("%d\n", var);
333 return 0;
337 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
339 # when cross compiling, the endianess cannot be detected because the above program doesn't run
340 # on the local machine. assume little endian but print a warning
341 endian=`$tmpdir/conftest-$id 2> /dev/null`
342 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
343 # big endian
344 endian="big"
345 else
346 # little endian
347 endian="little"
350 if [ "$CROSS_COMPILE" != "" ]; then
351 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
354 if [ "$app_type" = "sdl-sim" ]; then
355 echo "Simulator environment deemed $endian endian"
356 elif [ "$app_type" = "sdl-app" ]; then
357 echo "Application environment deemed $endian endian"
358 elif [ "$app_type" = "checkwps" ]; then
359 echo "CheckWPS environment deemed $endian endian"
362 # use wildcard here to make it work even if it was named *.exe like
363 # on cygwin
364 rm -f $tmpdir/conftest-$id*
365 else
366 # We are crosscompiling
367 # add cross-compiler option(s)
368 prefixtools $CROSS
369 LDOPTS="$LDOPTS -mconsole"
370 fibers=`check_fiber`
371 output="rockboxui.exe"
372 endian="little" # windows is little endian
373 echo "Enabling MMX support"
374 GCCOPTS="$GCCOPTS -mmmx"
377 thread_support=
378 if [ -z "$ARG_THREAD_SUPPORT" ] || [ "$ARG_THREAD_SUPPORT" = "0" ]; then
379 if [ "$sigaltstack" = "0" ]; then
380 thread_support="HAVE_SIGALTSTACK_THREADS"
381 LDOPTS="$LDOPTS -lpthread" # pthread needed
382 echo "Selected sigaltstack threads"
383 elif [ "$fibers" = "0" ]; then
384 thread_support="HAVE_WIN32_FIBER_THREADS"
385 echo "Selected Win32 Fiber threads"
389 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
390 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
391 thread_support="HAVE_SDL_THREADS"
392 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
393 echo "Selected SDL threads"
394 else
395 echo "WARNING: Falling back to SDL threads"
401 # functions for setting up cross-compiler names and options
402 # also set endianess and what the exact recommended gcc version is
403 # the gcc version should most likely match what versions we build with
404 # rockboxdev.sh
406 shcc () {
407 prefixtools sh-elf-
408 GCCOPTS="$CCOPTS -m1"
409 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
410 endian="big"
411 gccchoice="4.0.3"
414 calmrisccc () {
415 prefixtools calmrisc16-unknown-elf-
416 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
417 GCCOPTIMIZE="-fomit-frame-pointer"
418 endian="big"
421 coldfirecc () {
422 prefixtools m68k-elf-
423 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
424 GCCOPTIMIZE="-fomit-frame-pointer"
425 endian="big"
426 gccchoice="4.5.2"
429 arm7tdmicc () {
430 findarmgcc
431 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
432 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
433 GCCOPTS="$GCCOPTS -mlong-calls"
435 GCCOPTIMIZE="-fomit-frame-pointer"
436 endian="little"
439 arm9tdmicc () {
440 findarmgcc
441 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
442 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
443 GCCOPTS="$GCCOPTS -mlong-calls"
445 GCCOPTIMIZE="-fomit-frame-pointer"
446 endian="little"
449 arm940tbecc () {
450 findarmgcc
451 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
452 if test "$ARG_ARM_EABI" = "0"; then
453 GCCOPTS="$GCCOPTS -mlong-calls"
455 GCCOPTIMIZE="-fomit-frame-pointer"
456 endian="big"
459 arm940tcc () {
460 findarmgcc
461 GCCOPTS="$CCOPTS -mcpu=arm940t"
462 if test "$ARG_ARM_EABI" = "0"; then
463 GCCOPTS="$GCCOPTS -mlong-calls"
465 GCCOPTIMIZE="-fomit-frame-pointer"
466 endian="little"
469 arm946cc () {
470 findarmgcc
471 GCCOPTS="$CCOPTS -mcpu=arm9e"
472 if test "$ARG_ARM_EABI" = "0"; then
473 GCCOPTS="$GCCOPTS -mlong-calls"
475 GCCOPTIMIZE="-fomit-frame-pointer"
476 endian="little"
479 arm926ejscc () {
480 findarmgcc
481 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
482 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
483 GCCOPTS="$GCCOPTS -mlong-calls"
485 GCCOPTIMIZE="-fomit-frame-pointer"
486 endian="little"
489 arm1136jfscc () {
490 findarmgcc
491 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
492 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
493 GCCOPTS="$GCCOPTS -mlong-calls"
495 GCCOPTIMIZE="-fomit-frame-pointer"
496 endian="little"
499 arm1176jzscc () {
500 findarmgcc
501 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
502 if test "$ARG_ARM_EABI" = "0"; then
503 GCCOPTS="$GCCOPTS -mlong-calls"
505 GCCOPTIMIZE="-fomit-frame-pointer"
506 endian="little"
509 arm7ejscc () {
510 findarmgcc
511 GCCOPTS="$CCOPTS -march=armv5te"
512 GCCOPTIMIZE="-fomit-frame-pointer"
513 endian="little"
516 mipselcc () {
517 prefixtools mipsel-elf-
518 # mips is predefined, but we want it for paths. use __mips instead
519 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
520 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
521 GCCOPTIMIZE="-fomit-frame-pointer"
522 endian="little"
523 gccchoice="4.1.2"
526 maemocc () {
527 # Scratchbox sets up "gcc" based on the active target
528 prefixtools ""
530 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
531 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
532 GCCOPTIMIZE=''
533 LDOPTS="-lm -ldl $LDOPTS"
534 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
535 SHARED_LDFLAG="-shared"
536 SHARED_CFLAGS=''
537 endian="little"
538 thread_support="HAVE_SIGALTSTACK_THREADS"
540 is_n900=0
541 # Determine maemo version
542 if pkg-config --atleast-version=5 maemo-version; then
543 if [ "$1" == "4" ]; then
544 echo "ERROR: Maemo 4 SDK required."
545 exit 1
547 extradefines="$extradefines -DMAEMO5"
548 echo "Found N900 maemo version"
549 is_n900=1
550 elif pkg-config --atleast-version=4 maemo-version; then
551 if [ "$1" == "5" ]; then
552 echo "ERROR: Maemo 5 SDK required."
553 exit 1
555 extradefines="$extradefines -DMAEMO4"
556 echo "Found N8xx maemo version"
557 else
558 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
559 exit 1
562 # SDL
563 if [ $is_n900 -eq 1 ]; then
564 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
565 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
566 else
567 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
568 LDOPTS="$LDOPTS `sdl-config --libs`"
571 # glib and libosso support
572 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
573 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
575 # libhal support: Battery monitoring
576 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
577 LDOPTS="$LDOPTS `pkg-config --libs hal`"
579 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
580 if [ $is_n900 -eq 1 ]; then
581 # gstreamer support: Audio output.
582 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
583 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
585 # N900 specific: libplayback support
586 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
587 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
589 # N900 specific: Enable ARMv7 NEON support
590 if sb-conf show -A |grep -q -i arm; then
591 echo "Detected ARM target"
592 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
593 extradefines="$extradefines -DMAEMO_ARM_BUILD"
594 else
595 echo "Detected x86 target"
597 else
598 # N8xx specific: Enable armv5te instructions
599 if sb-conf show -A |grep -q -i arm; then
600 echo "Detected ARM target"
601 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
602 extradefines="$extradefines -DMAEMO_ARM_BUILD"
603 else
604 echo "Detected x86 target"
609 pandoracc () {
610 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
611 # You have to use the sebt3 toolchain:
612 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
614 PNDSDK="/usr/local/angstrom/arm"
615 if [ ! -x $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc ]; then
616 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
617 exit
620 PATH=$PNDSDK/bin:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi/usr/bin
621 PKG_CONFIG_PATH=$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib/pkgconfig
622 LDOPTS="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
623 PKG_CONFIG="pkg-config"
625 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
626 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
627 GCCOPTIMIZE=''
628 LDOPTS="-lm -ldl $LDOPTS"
629 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
630 SHARED_LDFLAG="-shared"
631 SHARED_CFLAGS=''
632 endian="little"
633 thread_support="HAVE_SIGALTSTACK_THREADS"
635 # Include path
636 GCCOPTS="-I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
638 # Set up compiler
639 gccchoice="4.3.3"
640 prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
642 # Detect SDL
643 GCCOPTS="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
644 LDOPTS="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
646 # Compiler options
647 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
648 GCCOPTS="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
649 GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant"
652 androidcc () {
653 if [ -z "$ANDROID_SDK_PATH" ]; then
654 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
655 echo "environment variable point to the root directory of the Android SDK."
656 exit
658 if [ -z "$ANDROID_NDK_PATH" ]; then
659 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
660 echo "environment variable point to the root directory of the Android NDK."
661 exit
663 buildhost=$(uname | tr "[:upper:]" "[:lower:]")
664 gccchoice="4.4.3"
665 gcctarget="arm-linux-androideabi-"
666 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
667 PATH=$PATH:$gccprefix/bin
668 prefixtools $gcctarget
669 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
670 GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
671 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
672 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
673 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
674 LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog"
675 endian="little"
676 SHARED_LDFLAG="-shared"
677 SHARED_CFLAGS=''
680 whichadvanced () {
681 atype=`echo "$1" | cut -c 2-`
682 ##################################################################
683 # Prompt for specific developer options
685 if [ "$atype" ]; then
686 interact=
687 else
688 interact=1
689 echo ""
690 printf "Enter your developer options (press only enter when done)\n\
691 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
692 (T)est plugins, S(m)all C lib:"
693 if [ "$memory" = "2" ]; then
694 printf ", (8)MB MOD"
696 if [ "$modelname" = "archosplayer" ]; then
697 printf ", Use (A)TA poweroff"
699 if [ "$t_model" = "ondio" ]; then
700 printf ", (B)acklight MOD"
702 if [ "$modelname" = "iaudiom5" ]; then
703 printf ", (F)M radio MOD"
705 if [ "$modelname" = "iriverh120" ]; then
706 printf ", (R)TC MOD"
708 echo ""
711 cont=1
712 while [ $cont = "1" ]; do
714 if [ "$interact" ]; then
715 option=`input`
716 else
717 option=`echo "$atype" | cut -c 1`
720 case $option in
721 [Dd])
722 if [ "yes" = "$profile" ]; then
723 echo "Debug is incompatible with profiling"
724 else
725 echo "DEBUG build enabled"
726 use_debug="yes"
729 [Ll])
730 echo "logf() support enabled"
731 logf="yes"
733 [Mm])
734 echo "Using Rockbox' small C library"
735 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
737 [Tt])
738 echo "Including test plugins"
739 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
741 [Cc])
742 echo "bootchart enabled (logf also enabled)"
743 bootchart="yes"
744 logf="yes"
746 [Ss])
747 echo "Simulator build enabled"
748 simulator="yes"
750 [Pp])
751 if [ "yes" = "$use_debug" ]; then
752 echo "Profiling is incompatible with debug"
753 else
754 echo "Profiling support is enabled"
755 profile="yes"
758 [Vv])
759 echo "Voice build selected"
760 voice="yes"
763 if [ "$memory" = "2" ]; then
764 memory="8"
765 echo "Memory size selected: 8MB"
768 [Aa])
769 if [ "$modelname" = "archosplayer" ]; then
770 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
771 echo "ATA power off enabled"
774 [Bb])
775 if [ "$t_model" = "ondio" ]; then
776 have_backlight="#define HAVE_BACKLIGHT"
777 echo "Backlight functions enabled"
780 [Ff])
781 if [ "$modelname" = "iaudiom5" ]; then
782 have_fmradio_in="#define HAVE_FMRADIO_IN"
783 echo "FM radio functions enabled"
786 [Rr])
787 if [ "$modelname" = "iriverh120" ]; then
788 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
789 have_rtc_alarm="#define HAVE_RTC_ALARM"
790 echo "RTC functions enabled (DS1339/DS3231)"
793 [Ww])
794 echo "Enabling Windows 32 cross-compiling"
795 win32crosscompile="yes"
797 "") # Match enter press when finished with advanced options
798 cont=0
801 echo "[ERROR] Option $option unsupported"
803 esac
804 if [ "$interact" ]; then
805 btype="$btype$option"
806 else
807 atype=`echo "$atype" | cut -c 2-`
808 [ "$atype" ] || cont=0
810 done
811 echo "done"
813 if [ "yes" = "$voice" ]; then
814 # Ask about languages to build
815 picklang
816 voicelanguage=`whichlang`
817 echo "Voice language set to $voicelanguage"
819 # Configure encoder and TTS engine for each language
820 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
821 voiceconfig "$thislang"
822 done
824 if [ "yes" = "$use_debug" ]; then
825 debug="-DDEBUG"
826 GCCOPTS="$GCCOPTS -g -DDEBUG"
828 if [ "yes" = "$logf" ]; then
829 use_logf="#define ROCKBOX_HAS_LOGF 1"
831 if [ "yes" = "$bootchart" ]; then
832 use_bootchart="#define DO_BOOTCHART 1"
834 if [ "yes" = "$simulator" ]; then
835 debug="-DDEBUG"
836 extradefines="$extradefines -DSIMULATOR"
837 archosrom=""
838 flash=""
840 if [ "yes" = "$profile" ]; then
841 extradefines="$extradefines -DRB_PROFILE"
842 PROFILE_OPTS="-finstrument-functions"
846 # Configure voice settings
847 voiceconfig () {
848 thislang=$1
849 if [ ! "$ARG_TTS" ]; then
850 echo "Building $thislang voice for $modelname. Select options"
851 echo ""
854 if [ -n "`findtool flite`" ]; then
855 FLITE="F(l)ite "
856 FLITE_OPTS=""
857 DEFAULT_TTS="flite"
858 DEFAULT_TTS_OPTS=$FLITE_OPTS
859 DEFAULT_NOISEFLOOR="500"
860 DEFAULT_CHOICE="L"
862 if [ -n "`findtool espeak`" ]; then
863 ESPEAK="(e)Speak "
864 ESPEAK_OPTS=""
865 DEFAULT_TTS="espeak"
866 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
867 DEFAULT_NOISEFLOOR="500"
868 DEFAULT_CHOICE="e"
870 if [ -n "`findtool festival`" ]; then
871 FESTIVAL="(F)estival "
872 case "$thislang" in
873 "italiano")
874 FESTIVAL_OPTS="--language italian"
876 "espanol")
877 FESTIVAL_OPTS="--language spanish"
879 "finnish")
880 FESTIVAL_OPTS="--language finnish"
882 "czech")
883 FESTIVAL_OPTS="--language czech"
886 FESTIVAL_OPTS=""
888 esac
889 DEFAULT_TTS="festival"
890 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
891 DEFAULT_NOISEFLOOR="500"
892 DEFAULT_CHOICE="F"
894 if [ -n "`findtool swift`" ]; then
895 SWIFT="S(w)ift "
896 SWIFT_OPTS=""
897 DEFAULT_TTS="swift"
898 DEFAULT_TTS_OPTS=$SWIFT_OPTS
899 DEFAULT_NOISEFLOOR="500"
900 DEFAULT_CHOICE="w"
902 # Allow SAPI if Windows is in use
903 if [ -n "`findtool winver`" ]; then
904 SAPI="(S)API "
905 SAPI_OPTS=""
906 DEFAULT_TTS="sapi"
907 DEFAULT_TTS_OPTS=$SAPI_OPTS
908 DEFAULT_NOISEFLOOR="500"
909 DEFAULT_CHOICE="S"
912 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
913 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
914 exit 3
917 if [ "$ARG_TTS" ]; then
918 option=$ARG_TTS
919 else
920 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
921 option=`input`
923 advopts="$advopts --tts=$option"
924 case "$option" in
925 [Ll])
926 TTS_ENGINE="flite"
927 NOISEFLOOR="500" # TODO: check this value
928 TTS_OPTS=$FLITE_OPTS
930 [Ee])
931 TTS_ENGINE="espeak"
932 NOISEFLOOR="500"
933 TTS_OPTS=$ESPEAK_OPTS
935 [Ff])
936 TTS_ENGINE="festival"
937 NOISEFLOOR="500"
938 TTS_OPTS=$FESTIVAL_OPTS
940 [Ss])
941 TTS_ENGINE="sapi"
942 NOISEFLOOR="500"
943 TTS_OPTS=$SAPI_OPTS
945 [Ww])
946 TTS_ENGINE="swift"
947 NOISEFLOOR="500"
948 TTS_OPTS=$SWIFT_OPTS
951 TTS_ENGINE=$DEFAULT_TTS
952 TTS_OPTS=$DEFAULT_TTS_OPTS
953 NOISEFLOOR=$DEFAULT_NOISEFLOOR
954 esac
955 echo "Using $TTS_ENGINE for TTS"
957 # Select which voice to use for Festival
958 if [ "$TTS_ENGINE" = "festival" ]; then
959 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
960 for voice in $voicelist; do
961 TTS_FESTIVAL_VOICE="$voice" # Default choice
962 break
963 done
964 if [ "$ARG_VOICE" ]; then
965 CHOICE=$ARG_VOICE
966 else
968 for voice in $voicelist; do
969 printf "%3d. %s\n" "$i" "$voice"
970 i=`expr $i + 1`
971 done
972 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
973 CHOICE=`input`
976 for voice in $voicelist; do
977 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
978 TTS_FESTIVAL_VOICE="$voice"
980 i=`expr $i + 1`
981 done
982 advopts="$advopts --voice=$CHOICE"
983 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
984 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
987 # Read custom tts options from command line
988 if [ "$ARG_TTSOPTS" ]; then
989 TTS_OPTS="$ARG_TTSOPTS"
990 advopts="$advopts --ttsopts='$TTS_OPTS'"
991 echo "$TTS_ENGINE options set to $TTS_OPTS"
994 if [ "$swcodec" = "yes" ]; then
995 ENCODER="rbspeexenc"
996 ENC_OPTS="-q 4 -c 10"
997 else
998 if [ -n "`findtool lame`" ]; then
999 ENCODER="lame"
1000 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1001 else
1002 echo "You need LAME in the system path to build voice files for"
1003 echo "HWCODEC targets."
1004 exit 4
1008 echo "Using $ENCODER for encoding voice clips"
1010 # Read custom encoder options from command line
1011 if [ "$ARG_ENCOPTS" ]; then
1012 ENC_OPTS="$ARG_ENCOPTS"
1013 advopts="$advopts --encopts='$ENC_OPTS'"
1014 echo "$ENCODER options set to $ENC_OPTS"
1017 TEMPDIR="${pwd}"
1018 if [ -n "`findtool cygpath`" ]; then
1019 TEMPDIR=`cygpath . -a -w`
1023 picklang() {
1024 # figure out which languages that are around
1025 for file in $rootdir/apps/lang/*.lang; do
1026 clean=`basename $file .lang`
1027 langs="$langs $clean"
1028 done
1030 if [ "$ARG_LANG" ]; then
1031 pick=$ARG_LANG
1032 else
1033 echo "Select a number for the language to use (default is english)"
1034 # FIXME The multiple-language feature is currently broken
1035 # echo "You may enter a comma-separated list of languages to build"
1037 num=1
1038 for one in $langs; do
1039 echo "$num. $one"
1040 num=`expr $num + 1`
1041 done
1042 pick=`input`
1044 advopts="$advopts --language=$pick"
1047 whichlang() {
1048 output=""
1049 # Allow the user to pass a comma-separated list of langauges
1050 for thispick in `echo $pick | sed 's/,/ /g'`; do
1051 num=1
1052 for one in $langs; do
1053 # Accept both the language number and name
1054 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
1055 if [ "$output" = "" ]; then
1056 output=$one
1057 else
1058 output=$output,$one
1061 num=`expr $num + 1`
1062 done
1063 done
1064 if [ -z "$output" ]; then
1065 # pick a default
1066 output="english"
1068 echo $output
1071 help() {
1072 echo "Rockbox configure script."
1073 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1074 echo "Do *NOT* run this within the tools directory!"
1075 echo ""
1076 cat <<EOF
1077 Usage: configure [OPTION]...
1078 Options:
1079 --target=TARGET Sets the target, TARGET can be either the target ID or
1080 corresponding string. Run without this option to see all
1081 available targets.
1083 --ram=RAM Sets the RAM for certain targets. Even though any number
1084 is accepted, not every number is correct. The default
1085 value will be applied, if you entered a wrong number
1086 (which depends on the target). Watch the output. Run
1087 without this option if you are not sure which the right
1088 number is.
1090 --type=TYPE Sets the build type. Shortcuts are also valid.
1091 Run without this option to see all available types.
1092 Multiple values are allowed and managed in the input
1093 order. So --type=b stands for Bootloader build, while
1094 --type=ab stands for "Backlight MOD" build.
1096 --lcdwidth=X Sets the width of the LCD. Used only for application
1097 targets.
1099 --lcdheight=Y Sets the height of the LCD. Used only for application
1100 targets.
1102 --language=LANG Set the language used for voice generation (used only if
1103 TYPE is AV).
1105 --tts=ENGINE Set the TTS engine used for voice generation (used only
1106 if TYPE is AV).
1108 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1109 AV).
1111 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1113 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1115 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1116 This is useful for having multiple alternate builds on
1117 your device that you can load with ROLO. However as the
1118 bootloader looks for .rockbox you won't be able to boot
1119 into this build.
1121 --ccache Enable ccache use (done by default these days)
1122 --no-ccache Disable ccache use
1124 --eabi Make configure prefer toolchains that are able to compile
1125 for the new ARM standard abi EABI
1126 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1127 --thumb Build with -mthumb (for ARM builds)
1128 --no-thumb The opposite of --thumb (don't use thumb even for targets
1129 where this is the default
1130 --sdl-threads Force use of SDL threads. They have inferior performance,
1131 but are better debuggable with GDB
1132 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1133 behavior of falling back to them if no native thread
1134 support was found.
1135 --prefix Target installation directory
1136 --help Shows this message (must not be used with other options)
1140 exit
1143 ARG_CCACHE=
1144 ARG_ENCOPTS=
1145 ARG_LANG=
1146 ARG_RAM=
1147 ARG_RBDIR=
1148 ARG_TARGET=
1149 ARG_TTS=
1150 ARG_TTSOPTS=
1151 ARG_TYPE=
1152 ARG_VOICE=
1153 ARG_ARM_EABI=
1154 ARG_ARM_THUMB=
1155 ARG_PREFIX="$PREFIX"
1156 ARG_THREAD_SUPPORT=
1157 err=
1158 for arg in "$@"; do
1159 case "$arg" in
1160 --ccache) ARG_CCACHE=1;;
1161 --no-ccache) ARG_CCACHE=0;;
1162 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1163 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
1164 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1165 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
1166 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1167 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1168 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1169 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1170 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1171 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1172 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
1173 --eabi) ARG_ARM_EABI=1;;
1174 --no-eabi) ARG_ARM_EABI=0;;
1175 --thumb) ARG_ARM_THUMB=1;;
1176 --no-thumb) ARG_ARM_THUMB=0;;
1177 --sdl-threads)ARG_THREAD_SUPPORT=1;;
1178 --no-sdl-threads)
1179 ARG_THREAD_SUPPORT=0;;
1180 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
1181 --help) help;;
1182 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1183 esac
1184 done
1185 [ "$err" ] && exit 1
1187 advopts=
1189 if [ "$TMPDIR" != "" ]; then
1190 tmpdir=$TMPDIR
1191 else
1192 tmpdir=/tmp
1194 echo Using temporary directory $tmpdir
1196 if test -r "configure"; then
1197 # this is a check for a configure script in the current directory, it there
1198 # is one, try to figure out if it is this one!
1200 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1201 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1202 echo "It will only cause you pain and grief. Instead do this:"
1203 echo ""
1204 echo " cd .."
1205 echo " mkdir build-dir"
1206 echo " cd build-dir"
1207 echo " ../tools/configure"
1208 echo ""
1209 echo "Much happiness will arise from this. Enjoy"
1210 exit 5
1214 # get our current directory
1215 pwd=`pwd`;
1217 if { echo $pwd | grep " "; } then
1218 echo "You're running this script in a path that contains space. The build"
1219 echo "system is unfortunately not clever enough to deal with this. Please"
1220 echo "run the script from a different path, rename the path or fix the build"
1221 echo "system!"
1222 exit 6
1225 if [ -z "$rootdir" ]; then
1226 ##################################################################
1227 # Figure out where the source code root is!
1229 rootdir=`dirname $0`/../
1231 #####################################################################
1232 # Convert the possibly relative directory name to an absolute version
1234 now=`pwd`
1235 cd $rootdir
1236 rootdir=`pwd`
1238 # cd back to the build dir
1239 cd $now
1242 apps="apps"
1243 appsdir='$(ROOTDIR)/apps'
1244 toolsdir='$(ROOTDIR)/tools'
1247 ##################################################################
1248 # Figure out target platform
1251 if [ "$ARG_TARGET" ]; then
1252 buildfor=$ARG_TARGET
1253 else
1254 echo "Enter target platform:"
1255 cat <<EOF
1256 ==Archos== ==iriver== ==Apple iPod==
1257 0) Player/Studio 10) H120/H140 20) Color/Photo
1258 1) Recorder 11) H320/H340 21) Nano 1G
1259 2) FM Recorder 12) iHP-100/110/115 22) Video
1260 3) Recorder v2 13) iFP-790 23) 3G
1261 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1262 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1263 6) AV300 26) Mini 2G
1264 ==Toshiba== 27) 1G, 2G
1265 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1266 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1267 31) M5/M5L
1268 32) 7 ==Olympus= ==SanDisk==
1269 33) D2 70) M:Robe 500 50) Sansa e200
1270 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1271 52) Sansa c200
1272 ==Creative== ==Philips== 53) Sansa m200
1273 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1274 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1275 92) Zen Vision HDD1830 56) Sansa e200v2
1276 102) GoGear HDD6330 57) Sansa m200v4
1277 ==Onda== 58) Sansa Fuze
1278 120) VX747 ==Meizu== 59) Sansa c200v2
1279 121) VX767 110) M6SL 60) Sansa Clipv2
1280 122) VX747+ 111) M6SP 61) Sansa View
1281 123) VX777 112) M3 62) Sansa Clip+
1282 63) Sansa Fuze v2
1283 ==Samsung== ==Tatung== 64) Sansa Fuze+
1284 140) YH-820 150) Elio TPJ-1022 65) Sansa Clip Zip
1285 141) YH-920 66) Sansa Connect
1286 142) YH-925 ==Packard Bell==
1287 143) YP-S3 160) Vibe 500 ==Logik==
1288 80) DAX 1GB MP3/DAB
1289 ==Application== ==MPIO==
1290 200) SDL 170) HD200 ==Lyre project==
1291 201) Android 171) HD300 130) Lyre proto 1
1292 202) Nokia N8xx 131) Mini2440
1293 203) Nokia N900 ==ROCKCHIP== ==HiFiMAN==
1294 204) Pandora 180) rk27xx generic 190) HM-60x
1295 191) HM-801
1299 buildfor=`input`;
1302 # Set of tools built for all target platforms:
1303 toolset="rdf2binary convbdf codepages"
1305 # Toolsets for some target families:
1306 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1307 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1308 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1309 ipodbitmaptools="$toolset scramble bmp2rb"
1310 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1311 tccbitmaptools="$toolset scramble bmp2rb"
1312 # generic is used by IFP, Meizu and Onda
1313 genericbitmaptools="$toolset bmp2rb"
1314 # scramble is used by all other targets
1315 scramblebitmaptools="$genericbitmaptools scramble"
1318 # ---- For each target ----
1320 # *Variables*
1321 # target_id: a unique number identifying this target, IS NOT the menu number.
1322 # Just use the currently highest number+1 when you add a new
1323 # target.
1324 # modelname: short model name used all over to identify this target
1325 # memory: number of megabytes of RAM this target has. If the amount can
1326 # be selected by the size prompt, let memory be unset here
1327 # target: -Ddefine passed to the build commands to make the correct
1328 # config-*.h file get included etc
1329 # tool: the tool that takes a plain binary and converts that into a
1330 # working "firmware" file for your target
1331 # output: the final output file name
1332 # boottool: the tool that takes a plain binary and generates a bootloader
1333 # file for your target (or blank to use $tool)
1334 # bootoutput:the final output file name for the bootloader (or blank to use
1335 # $output)
1336 # appextra: passed to the APPEXTRA variable in the Makefiles.
1337 # TODO: add proper explanation
1338 # archosrom: used only for Archos targets that build a special flashable .ucl
1339 # image.
1340 # flash: name of output for flashing, for targets where there's a special
1341 # file output for this.
1342 # plugins: set to 'yes' to build the plugins. Early development builds can
1343 # set this to no in the early stages to have an easier life for a
1344 # while
1345 # swcodec: set 'yes' on swcodec targets
1346 # toolset: lists what particular tools in the tools/ directory that this
1347 # target needs to have built prior to building Rockbox
1349 # *Functions*
1350 # *cc: sets up gcc and compiler options for your target builds. Note
1351 # that if you select a simulator build, the compiler selection is
1352 # overridden later in the script.
1354 case $buildfor in
1356 0|archosplayer)
1357 target_id=1
1358 modelname="archosplayer"
1359 target="-DARCHOS_PLAYER"
1360 shcc
1361 tool="$rootdir/tools/scramble"
1362 output="archos.mod"
1363 appextra="player:gui"
1364 archosrom="$pwd/rombox.ucl"
1365 flash="$pwd/rockbox.ucl"
1366 plugins="yes"
1367 swcodec=""
1369 # toolset is the tools within the tools directory that we build for
1370 # this particular target.
1371 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1373 # Note: the convbdf is present in the toolset just because: 1) the
1374 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1375 # build the player simulator
1377 t_cpu="sh"
1378 t_manufacturer="archos"
1379 t_model="player"
1382 1|archosrecorder)
1383 target_id=2
1384 modelname="archosrecorder"
1385 target="-DARCHOS_RECORDER"
1386 shcc
1387 tool="$rootdir/tools/scramble"
1388 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1389 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1390 output="ajbrec.ajz"
1391 appextra="recorder:gui:radio"
1392 #archosrom="$pwd/rombox.ucl"
1393 flash="$pwd/rockbox.ucl"
1394 plugins="yes"
1395 swcodec=""
1396 # toolset is the tools within the tools directory that we build for
1397 # this particular target.
1398 toolset=$archosbitmaptools
1399 t_cpu="sh"
1400 t_manufacturer="archos"
1401 t_model="recorder"
1404 2|archosfmrecorder)
1405 target_id=3
1406 modelname="archosfmrecorder"
1407 target="-DARCHOS_FMRECORDER"
1408 shcc
1409 tool="$rootdir/tools/scramble -fm"
1410 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1411 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1412 output="ajbrec.ajz"
1413 appextra="recorder:gui:radio"
1414 #archosrom="$pwd/rombox.ucl"
1415 flash="$pwd/rockbox.ucl"
1416 plugins="yes"
1417 swcodec=""
1418 # toolset is the tools within the tools directory that we build for
1419 # this particular target.
1420 toolset=$archosbitmaptools
1421 t_cpu="sh"
1422 t_manufacturer="archos"
1423 t_model="fm_v2"
1426 3|archosrecorderv2)
1427 target_id=4
1428 modelname="archosrecorderv2"
1429 target="-DARCHOS_RECORDERV2"
1430 shcc
1431 tool="$rootdir/tools/scramble -v2"
1432 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1433 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1434 output="ajbrec.ajz"
1435 appextra="recorder:gui:radio"
1436 #archosrom="$pwd/rombox.ucl"
1437 flash="$pwd/rockbox.ucl"
1438 plugins="yes"
1439 swcodec=""
1440 # toolset is the tools within the tools directory that we build for
1441 # this particular target.
1442 toolset=$archosbitmaptools
1443 t_cpu="sh"
1444 t_manufacturer="archos"
1445 t_model="fm_v2"
1448 4|archosondiosp)
1449 target_id=7
1450 modelname="archosondiosp"
1451 target="-DARCHOS_ONDIOSP"
1452 shcc
1453 tool="$rootdir/tools/scramble -osp"
1454 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1455 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1456 output="ajbrec.ajz"
1457 appextra="recorder:gui:radio"
1458 #archosrom="$pwd/rombox.ucl"
1459 flash="$pwd/rockbox.ucl"
1460 plugins="yes"
1461 swcodec=""
1462 # toolset is the tools within the tools directory that we build for
1463 # this particular target.
1464 toolset=$archosbitmaptools
1465 t_cpu="sh"
1466 t_manufacturer="archos"
1467 t_model="ondio"
1470 5|archosondiofm)
1471 target_id=8
1472 modelname="archosondiofm"
1473 target="-DARCHOS_ONDIOFM"
1474 shcc
1475 tool="$rootdir/tools/scramble -ofm"
1476 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1477 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1478 output="ajbrec.ajz"
1479 appextra="recorder:gui:radio"
1480 #archosrom="$pwd/rombox.ucl"
1481 flash="$pwd/rockbox.ucl"
1482 plugins="yes"
1483 swcodec=""
1484 toolset=$archosbitmaptools
1485 t_cpu="sh"
1486 t_manufacturer="archos"
1487 t_model="ondio"
1490 6|archosav300)
1491 target_id=38
1492 modelname="archosav300"
1493 target="-DARCHOS_AV300"
1494 memory=16 # always
1495 arm7tdmicc
1496 tool="$rootdir/tools/scramble -mm=C"
1497 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1498 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1499 output="cjbm.ajz"
1500 appextra="recorder:gui:radio"
1501 plugins="yes"
1502 swcodec=""
1503 # toolset is the tools within the tools directory that we build for
1504 # this particular target.
1505 toolset="$toolset scramble descramble bmp2rb"
1506 # architecture, manufacturer and model for the target-tree build
1507 t_cpu="arm"
1508 t_manufacturer="archos"
1509 t_model="av300"
1512 10|iriverh120)
1513 target_id=9
1514 modelname="iriverh120"
1515 target="-DIRIVER_H120"
1516 memory=32 # always
1517 coldfirecc
1518 tool="$rootdir/tools/scramble -add=h120"
1519 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1520 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1521 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1522 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1523 output="rockbox.iriver"
1524 bootoutput="bootloader.iriver"
1525 appextra="recorder:gui:radio"
1526 flash="$pwd/rombox.iriver"
1527 plugins="yes"
1528 swcodec="yes"
1529 # toolset is the tools within the tools directory that we build for
1530 # this particular target.
1531 toolset=$iriverbitmaptools
1532 t_cpu="coldfire"
1533 t_manufacturer="iriver"
1534 t_model="h100"
1537 11|iriverh300)
1538 target_id=10
1539 modelname="iriverh300"
1540 target="-DIRIVER_H300"
1541 memory=32 # always
1542 coldfirecc
1543 tool="$rootdir/tools/scramble -add=h300"
1544 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1545 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1546 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1547 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1548 output="rockbox.iriver"
1549 appextra="recorder:gui:radio"
1550 plugins="yes"
1551 swcodec="yes"
1552 # toolset is the tools within the tools directory that we build for
1553 # this particular target.
1554 toolset=$iriverbitmaptools
1555 t_cpu="coldfire"
1556 t_manufacturer="iriver"
1557 t_model="h300"
1560 12|iriverh100)
1561 target_id=11
1562 modelname="iriverh100"
1563 target="-DIRIVER_H100"
1564 memory=16 # always
1565 coldfirecc
1566 tool="$rootdir/tools/scramble -add=h100"
1567 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1568 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1569 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1570 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1571 output="rockbox.iriver"
1572 bootoutput="bootloader.iriver"
1573 appextra="recorder:gui:radio"
1574 flash="$pwd/rombox.iriver"
1575 plugins="yes"
1576 swcodec="yes"
1577 # toolset is the tools within the tools directory that we build for
1578 # this particular target.
1579 toolset=$iriverbitmaptools
1580 t_cpu="coldfire"
1581 t_manufacturer="iriver"
1582 t_model="h100"
1585 13|iriverifp7xx)
1586 target_id=19
1587 modelname="iriverifp7xx"
1588 target="-DIRIVER_IFP7XX"
1589 memory=1
1590 arm7tdmicc short
1591 tool="cp"
1592 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1593 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1594 output="rockbox.wma"
1595 appextra="recorder:gui:radio"
1596 plugins="yes"
1597 swcodec="yes"
1598 # toolset is the tools within the tools directory that we build for
1599 # this particular target.
1600 toolset=$genericbitmaptools
1601 t_cpu="arm"
1602 t_manufacturer="pnx0101"
1603 t_model="iriver-ifp7xx"
1606 14|iriverh10)
1607 target_id=22
1608 modelname="iriverh10"
1609 target="-DIRIVER_H10"
1610 memory=32 # always
1611 arm7tdmicc
1612 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1613 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1614 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1615 output="rockbox.mi4"
1616 appextra="recorder:gui:radio"
1617 plugins="yes"
1618 swcodec="yes"
1619 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1620 bootoutput="H10_20GC.mi4"
1621 # toolset is the tools within the tools directory that we build for
1622 # this particular target.
1623 toolset=$scramblebitmaptools
1624 # architecture, manufacturer and model for the target-tree build
1625 t_cpu="arm"
1626 t_manufacturer="iriver"
1627 t_model="h10"
1630 15|iriverh10_5gb)
1631 target_id=24
1632 modelname="iriverh10_5gb"
1633 target="-DIRIVER_H10_5GB"
1634 memory=32 # always
1635 arm7tdmicc
1636 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1637 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1638 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1639 output="rockbox.mi4"
1640 appextra="recorder:gui:radio"
1641 plugins="yes"
1642 swcodec="yes"
1643 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1644 bootoutput="H10.mi4"
1645 # toolset is the tools within the tools directory that we build for
1646 # this particular target.
1647 toolset=$scramblebitmaptools
1648 # architecture, manufacturer and model for the target-tree build
1649 t_cpu="arm"
1650 t_manufacturer="iriver"
1651 t_model="h10"
1654 20|ipodcolor)
1655 target_id=13
1656 modelname="ipodcolor"
1657 target="-DIPOD_COLOR"
1658 memory=32 # always
1659 arm7tdmicc
1660 tool="$rootdir/tools/scramble -add=ipco"
1661 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1662 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1663 output="rockbox.ipod"
1664 appextra="recorder:gui:radio"
1665 plugins="yes"
1666 swcodec="yes"
1667 bootoutput="bootloader-$modelname.ipod"
1668 # toolset is the tools within the tools directory that we build for
1669 # this particular target.
1670 toolset=$ipodbitmaptools
1671 # architecture, manufacturer and model for the target-tree build
1672 t_cpu="arm"
1673 t_manufacturer="ipod"
1674 t_model="color"
1677 21|ipodnano1g)
1678 target_id=14
1679 modelname="ipodnano1g"
1680 target="-DIPOD_NANO"
1681 memory=32 # always
1682 arm7tdmicc
1683 tool="$rootdir/tools/scramble -add=nano"
1684 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1685 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1686 output="rockbox.ipod"
1687 appextra="recorder:gui:radio"
1688 plugins="yes"
1689 swcodec="yes"
1690 bootoutput="bootloader-$modelname.ipod"
1691 # toolset is the tools within the tools directory that we build for
1692 # this particular target.
1693 toolset=$ipodbitmaptools
1694 # architecture, manufacturer and model for the target-tree build
1695 t_cpu="arm"
1696 t_manufacturer="ipod"
1697 t_model="nano"
1700 22|ipodvideo)
1701 target_id=15
1702 modelname="ipodvideo"
1703 target="-DIPOD_VIDEO"
1704 memory=64 # always. This is reduced at runtime if needed
1705 arm7tdmicc
1706 tool="$rootdir/tools/scramble -add=ipvd"
1707 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1708 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1709 output="rockbox.ipod"
1710 appextra="recorder:gui:radio"
1711 plugins="yes"
1712 swcodec="yes"
1713 bootoutput="bootloader-$modelname.ipod"
1714 # toolset is the tools within the tools directory that we build for
1715 # this particular target.
1716 toolset=$ipodbitmaptools
1717 # architecture, manufacturer and model for the target-tree build
1718 t_cpu="arm"
1719 t_manufacturer="ipod"
1720 t_model="video"
1723 23|ipod3g)
1724 target_id=16
1725 modelname="ipod3g"
1726 target="-DIPOD_3G"
1727 memory=32 # always
1728 arm7tdmicc
1729 tool="$rootdir/tools/scramble -add=ip3g"
1730 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1731 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1732 output="rockbox.ipod"
1733 appextra="recorder:gui:radio"
1734 plugins="yes"
1735 swcodec="yes"
1736 bootoutput="bootloader-$modelname.ipod"
1737 # toolset is the tools within the tools directory that we build for
1738 # this particular target.
1739 toolset=$ipodbitmaptools
1740 # architecture, manufacturer and model for the target-tree build
1741 t_cpu="arm"
1742 t_manufacturer="ipod"
1743 t_model="3g"
1746 24|ipod4g)
1747 target_id=17
1748 modelname="ipod4g"
1749 target="-DIPOD_4G"
1750 memory=32 # always
1751 arm7tdmicc
1752 tool="$rootdir/tools/scramble -add=ip4g"
1753 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1754 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1755 output="rockbox.ipod"
1756 appextra="recorder:gui:radio"
1757 plugins="yes"
1758 swcodec="yes"
1759 bootoutput="bootloader-$modelname.ipod"
1760 # toolset is the tools within the tools directory that we build for
1761 # this particular target.
1762 toolset=$ipodbitmaptools
1763 # architecture, manufacturer and model for the target-tree build
1764 t_cpu="arm"
1765 t_manufacturer="ipod"
1766 t_model="4g"
1769 25|ipodmini1g)
1770 target_id=18
1771 modelname="ipodmini1g"
1772 target="-DIPOD_MINI"
1773 memory=32 # always
1774 arm7tdmicc
1775 tool="$rootdir/tools/scramble -add=mini"
1776 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1777 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1778 output="rockbox.ipod"
1779 appextra="recorder:gui:radio"
1780 plugins="yes"
1781 swcodec="yes"
1782 bootoutput="bootloader-$modelname.ipod"
1783 # toolset is the tools within the tools directory that we build for
1784 # this particular target.
1785 toolset=$ipodbitmaptools
1786 # architecture, manufacturer and model for the target-tree build
1787 t_cpu="arm"
1788 t_manufacturer="ipod"
1789 t_model="mini"
1792 26|ipodmini2g)
1793 target_id=21
1794 modelname="ipodmini2g"
1795 target="-DIPOD_MINI2G"
1796 memory=32 # always
1797 arm7tdmicc
1798 tool="$rootdir/tools/scramble -add=mn2g"
1799 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1800 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1801 output="rockbox.ipod"
1802 appextra="recorder:gui:radio"
1803 plugins="yes"
1804 swcodec="yes"
1805 bootoutput="bootloader-$modelname.ipod"
1806 # toolset is the tools within the tools directory that we build for
1807 # this particular target.
1808 toolset=$ipodbitmaptools
1809 # architecture, manufacturer and model for the target-tree build
1810 t_cpu="arm"
1811 t_manufacturer="ipod"
1812 t_model="mini2g"
1815 27|ipod1g2g)
1816 target_id=29
1817 modelname="ipod1g2g"
1818 target="-DIPOD_1G2G"
1819 memory=32 # always
1820 arm7tdmicc
1821 tool="$rootdir/tools/scramble -add=1g2g"
1822 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1823 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1824 output="rockbox.ipod"
1825 appextra="recorder:gui:radio"
1826 plugins="yes"
1827 swcodec="yes"
1828 bootoutput="bootloader-$modelname.ipod"
1829 # toolset is the tools within the tools directory that we build for
1830 # this particular target.
1831 toolset=$ipodbitmaptools
1832 # architecture, manufacturer and model for the target-tree build
1833 t_cpu="arm"
1834 t_manufacturer="ipod"
1835 t_model="1g2g"
1838 28|ipodnano2g)
1839 target_id=62
1840 modelname="ipodnano2g"
1841 target="-DIPOD_NANO2G"
1842 memory=32 # always
1843 arm940tcc
1844 tool="$rootdir/tools/scramble -add=nn2g"
1845 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1846 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1847 output="rockbox.ipod"
1848 appextra="recorder:gui:radio"
1849 plugins="yes"
1850 swcodec="yes"
1851 bootoutput="bootloader-$modelname.ipod"
1852 # toolset is the tools within the tools directory that we build for
1853 # this particular target.
1854 toolset=$ipodbitmaptools
1855 # architecture, manufacturer and model for the target-tree build
1856 t_cpu="arm"
1857 t_manufacturer="s5l8700"
1858 t_model="ipodnano2g"
1861 29|ipod6g)
1862 target_id=71
1863 modelname="ipod6g"
1864 target="-DIPOD_6G"
1865 memory=64 # always
1866 arm926ejscc
1867 tool="$rootdir/tools/scramble -add=ip6g"
1868 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1869 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1870 output="rockbox.ipod"
1871 appextra="recorder:gui:radio"
1872 plugins="yes"
1873 swcodec="yes"
1874 bootoutput="bootloader-$modelname.ipod"
1875 # toolset is the tools within the tools directory that we build for
1876 # this particular target.
1877 toolset=$ipodbitmaptools
1878 # architecture, manufacturer and model for the target-tree build
1879 t_cpu="arm"
1880 t_manufacturer="s5l8702"
1881 t_model="ipod6g"
1884 30|iaudiox5)
1885 target_id=12
1886 modelname="iaudiox5"
1887 target="-DIAUDIO_X5"
1888 memory=16 # always
1889 coldfirecc
1890 tool="$rootdir/tools/scramble -add=iax5"
1891 boottool="$rootdir/tools/scramble -iaudiox5"
1892 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1893 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1894 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1895 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1896 output="rockbox.iaudio"
1897 bootoutput="x5_fw.bin"
1898 appextra="recorder:gui:radio"
1899 plugins="yes"
1900 swcodec="yes"
1901 # toolset is the tools within the tools directory that we build for
1902 # this particular target.
1903 toolset="$iaudiobitmaptools"
1904 # architecture, manufacturer and model for the target-tree build
1905 t_cpu="coldfire"
1906 t_manufacturer="iaudio"
1907 t_model="x5"
1910 31|iaudiom5)
1911 target_id=28
1912 modelname="iaudiom5"
1913 target="-DIAUDIO_M5"
1914 memory=16 # always
1915 coldfirecc
1916 tool="$rootdir/tools/scramble -add=iam5"
1917 boottool="$rootdir/tools/scramble -iaudiom5"
1918 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1919 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1920 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1921 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1922 output="rockbox.iaudio"
1923 bootoutput="m5_fw.bin"
1924 appextra="recorder:gui:radio"
1925 plugins="yes"
1926 swcodec="yes"
1927 # toolset is the tools within the tools directory that we build for
1928 # this particular target.
1929 toolset="$iaudiobitmaptools"
1930 # architecture, manufacturer and model for the target-tree build
1931 t_cpu="coldfire"
1932 t_manufacturer="iaudio"
1933 t_model="m5"
1936 32|iaudio7)
1937 target_id=32
1938 modelname="iaudio7"
1939 target="-DIAUDIO_7"
1940 memory=16 # always
1941 arm946cc
1942 tool="$rootdir/tools/scramble -add=i7"
1943 boottool="$rootdir/tools/scramble -tcc=crc"
1944 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1945 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1946 output="rockbox.iaudio"
1947 appextra="recorder:gui:radio"
1948 plugins="yes"
1949 swcodec="yes"
1950 bootoutput="I7_FW.BIN"
1951 # toolset is the tools within the tools directory that we build for
1952 # this particular target.
1953 toolset="$tccbitmaptools"
1954 # architecture, manufacturer and model for the target-tree build
1955 t_cpu="arm"
1956 t_manufacturer="tcc77x"
1957 t_model="iaudio7"
1960 33|cowond2)
1961 target_id=34
1962 modelname="cowond2"
1963 target="-DCOWON_D2"
1964 memory=32
1965 arm926ejscc
1966 tool="$rootdir/tools/scramble -add=d2"
1967 boottool="cp "
1968 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1969 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1970 output="rockbox.d2"
1971 bootoutput="bootloader-cowond2.bin"
1972 appextra="recorder:gui:radio"
1973 plugins="yes"
1974 swcodec="yes"
1975 toolset="$tccbitmaptools"
1976 # architecture, manufacturer and model for the target-tree build
1977 t_cpu="arm"
1978 t_manufacturer="tcc780x"
1979 t_model="cowond2"
1982 34|iaudiom3)
1983 target_id=37
1984 modelname="iaudiom3"
1985 target="-DIAUDIO_M3"
1986 memory=16 # always
1987 coldfirecc
1988 tool="$rootdir/tools/scramble -add=iam3"
1989 boottool="$rootdir/tools/scramble -iaudiom3"
1990 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1991 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1992 output="rockbox.iaudio"
1993 bootoutput="cowon_m3.bin"
1994 appextra="recorder:gui:radio"
1995 plugins="yes"
1996 swcodec="yes"
1997 # toolset is the tools within the tools directory that we build for
1998 # this particular target.
1999 toolset="$iaudiobitmaptools"
2000 # architecture, manufacturer and model for the target-tree build
2001 t_cpu="coldfire"
2002 t_manufacturer="iaudio"
2003 t_model="m3"
2006 40|gigabeatfx)
2007 target_id=20
2008 modelname="gigabeatfx"
2009 target="-DGIGABEAT_F"
2010 memory=32 # always
2011 arm9tdmicc
2012 tool="$rootdir/tools/scramble -add=giga"
2013 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2014 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2015 output="rockbox.gigabeat"
2016 appextra="recorder:gui:radio"
2017 plugins="yes"
2018 swcodec="yes"
2019 toolset=$gigabeatbitmaptools
2020 boottool="$rootdir/tools/scramble -gigabeat"
2021 bootoutput="FWIMG01.DAT"
2022 # architecture, manufacturer and model for the target-tree build
2023 t_cpu="arm"
2024 t_manufacturer="s3c2440"
2025 t_model="gigabeat-fx"
2028 41|gigabeats)
2029 target_id=26
2030 modelname="gigabeats"
2031 target="-DGIGABEAT_S"
2032 memory=64
2033 arm1136jfscc
2034 tool="$rootdir/tools/scramble -add=gigs"
2035 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2036 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2037 output="rockbox.gigabeat"
2038 appextra="recorder:gui:radio"
2039 plugins="yes"
2040 swcodec="yes"
2041 toolset="$gigabeatbitmaptools"
2042 boottool="$rootdir/tools/scramble -gigabeats"
2043 bootoutput="nk.bin"
2044 # architecture, manufacturer and model for the target-tree build
2045 t_cpu="arm"
2046 t_manufacturer="imx31"
2047 t_model="gigabeat-s"
2050 70|mrobe500)
2051 target_id=36
2052 modelname="mrobe500"
2053 target="-DMROBE_500"
2054 memory=64 # always
2055 arm926ejscc
2056 tool="$rootdir/tools/scramble -add=m500"
2057 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2058 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
2059 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2060 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2061 output="rockbox.mrobe500"
2062 appextra="recorder:gui:radio"
2063 plugins="yes"
2064 swcodec="yes"
2065 toolset=$gigabeatbitmaptools
2066 boottool="cp "
2067 bootoutput="rockbox.mrboot"
2068 # architecture, manufacturer and model for the target-tree build
2069 t_cpu="arm"
2070 t_manufacturer="tms320dm320"
2071 t_model="mrobe-500"
2074 71|mrobe100)
2075 target_id=33
2076 modelname="mrobe100"
2077 target="-DMROBE_100"
2078 memory=32 # always
2079 arm7tdmicc
2080 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2081 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2082 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2083 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2084 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2085 output="rockbox.mi4"
2086 appextra="recorder:gui:radio"
2087 plugins="yes"
2088 swcodec="yes"
2089 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2090 bootoutput="pp5020.mi4"
2091 # toolset is the tools within the tools directory that we build for
2092 # this particular target.
2093 toolset=$scramblebitmaptools
2094 # architecture, manufacturer and model for the target-tree build
2095 t_cpu="arm"
2096 t_manufacturer="olympus"
2097 t_model="mrobe-100"
2100 80|logikdax)
2101 target_id=31
2102 modelname="logikdax"
2103 target="-DLOGIK_DAX"
2104 memory=2 # always
2105 arm946cc
2106 tool="$rootdir/tools/scramble -add=ldax"
2107 boottool="$rootdir/tools/scramble -tcc=crc"
2108 bootoutput="player.rom"
2109 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2110 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2111 output="rockbox.logik"
2112 appextra="recorder:gui:radio"
2113 plugins=""
2114 swcodec="yes"
2115 # toolset is the tools within the tools directory that we build for
2116 # this particular target.
2117 toolset=$tccbitmaptools
2118 # architecture, manufacturer and model for the target-tree build
2119 t_cpu="arm"
2120 t_manufacturer="tcc77x"
2121 t_model="logikdax"
2124 90|zenvisionm30gb)
2125 target_id=35
2126 modelname="zenvisionm30gb"
2127 target="-DCREATIVE_ZVM"
2128 memory=64
2129 arm926ejscc
2130 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2131 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2132 tool="$rootdir/tools/scramble -creative=zvm"
2133 USE_ELF="yes"
2134 output="rockbox.zvm"
2135 appextra="recorder:gui:radio"
2136 plugins="yes"
2137 swcodec="yes"
2138 toolset=$ipodbitmaptools
2139 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
2140 bootoutput="rockbox.zvmboot"
2141 # architecture, manufacturer and model for the target-tree build
2142 t_cpu="arm"
2143 t_manufacturer="tms320dm320"
2144 t_model="creative-zvm"
2147 91|zenvisionm60gb)
2148 target_id=40
2149 modelname="zenvisionm60gb"
2150 target="-DCREATIVE_ZVM60GB"
2151 memory=64
2152 arm926ejscc
2153 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2154 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2155 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2156 USE_ELF="yes"
2157 output="rockbox.zvm60"
2158 appextra="recorder:gui:radio"
2159 plugins="yes"
2160 swcodec="yes"
2161 toolset=$ipodbitmaptools
2162 boottool="$rootdir/tools/scramble -creative=zvm60"
2163 bootoutput="rockbox.zvm60boot"
2164 # architecture, manufacturer and model for the target-tree build
2165 t_cpu="arm"
2166 t_manufacturer="tms320dm320"
2167 t_model="creative-zvm"
2170 92|zenvision)
2171 target_id=39
2172 modelname="zenvision"
2173 target="-DCREATIVE_ZV"
2174 memory=64
2175 arm926ejscc
2176 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2177 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2178 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2179 USE_ELF="yes"
2180 output="rockbox.zv"
2181 appextra="recorder:gui:radio"
2182 plugins=""
2183 swcodec="yes"
2184 toolset=$ipodbitmaptools
2185 boottool="$rootdir/tools/scramble -creative=zenvision"
2186 bootoutput="rockbox.zvboot"
2187 # architecture, manufacturer and model for the target-tree build
2188 t_cpu="arm"
2189 t_manufacturer="tms320dm320"
2190 t_model="creative-zvm"
2193 50|sansae200)
2194 target_id=23
2195 modelname="sansae200"
2196 target="-DSANSA_E200"
2197 memory=32 # supposedly
2198 arm7tdmicc
2199 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2200 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2201 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2202 output="rockbox.mi4"
2203 appextra="recorder:gui:radio"
2204 plugins="yes"
2205 swcodec="yes"
2206 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2207 bootoutput="PP5022.mi4"
2208 # toolset is the tools within the tools directory that we build for
2209 # this particular target.
2210 toolset=$scramblebitmaptools
2211 # architecture, manufacturer and model for the target-tree build
2212 t_cpu="arm"
2213 t_manufacturer="sandisk"
2214 t_model="sansa-e200"
2217 51|sansae200r)
2218 # the e200R model is pretty much identical to the e200, it only has a
2219 # different option to the scramble tool when building a bootloader and
2220 # makes the bootloader output file name in all lower case.
2221 target_id=27
2222 modelname="sansae200r"
2223 target="-DSANSA_E200"
2224 memory=32 # supposedly
2225 arm7tdmicc
2226 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2227 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2228 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2229 output="rockbox.mi4"
2230 appextra="recorder:gui:radio"
2231 plugins="yes"
2232 swcodec="yes"
2233 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2234 bootoutput="pp5022.mi4"
2235 # toolset is the tools within the tools directory that we build for
2236 # this particular target.
2237 toolset=$scramblebitmaptools
2238 # architecture, manufacturer and model for the target-tree build
2239 t_cpu="arm"
2240 t_manufacturer="sandisk"
2241 t_model="sansa-e200"
2244 52|sansac200)
2245 target_id=30
2246 modelname="sansac200"
2247 target="-DSANSA_C200"
2248 memory=32 # supposedly
2249 arm7tdmicc
2250 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2251 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2252 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2253 output="rockbox.mi4"
2254 appextra="recorder:gui:radio"
2255 plugins="yes"
2256 swcodec="yes"
2257 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2258 bootoutput="firmware.mi4"
2259 # toolset is the tools within the tools directory that we build for
2260 # this particular target.
2261 toolset=$scramblebitmaptools
2262 # architecture, manufacturer and model for the target-tree build
2263 t_cpu="arm"
2264 t_manufacturer="sandisk"
2265 t_model="sansa-c200"
2268 53|sansam200)
2269 target_id=48
2270 modelname="sansam200"
2271 target="-DSANSA_M200"
2272 memory=1 # always
2273 arm946cc
2274 tool="$rootdir/tools/scramble -add=m200"
2275 boottool="$rootdir/tools/scramble -tcc=crc"
2276 bootoutput="player.rom"
2277 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2278 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2279 output="rockbox.m200"
2280 appextra="recorder:gui:radio"
2281 plugins=""
2282 swcodec="yes"
2283 # toolset is the tools within the tools directory that we build for
2284 # this particular target.
2285 toolset=$tccbitmaptools
2286 # architecture, manufacturer and model for the target-tree build
2287 t_cpu="arm"
2288 t_manufacturer="tcc77x"
2289 t_model="m200"
2292 54|sansac100)
2293 target_id=42
2294 modelname="sansac100"
2295 target="-DSANSA_C100"
2296 memory=2
2297 arm946cc
2298 tool="$rootdir/tools/scramble -add=c100"
2299 boottool="$rootdir/tools/scramble -tcc=crc"
2300 bootoutput="player.rom"
2301 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2302 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2303 output="rockbox.c100"
2304 appextra="recorder:gui:radio"
2305 plugins=""
2306 swcodec="yes"
2307 # toolset is the tools within the tools directory that we build for
2308 # this particular target.
2309 toolset=$tccbitmaptools
2310 # architecture, manufacturer and model for the target-tree build
2311 t_cpu="arm"
2312 t_manufacturer="tcc77x"
2313 t_model="c100"
2316 55|sansaclip)
2317 target_id=50
2318 modelname="sansaclip"
2319 target="-DSANSA_CLIP"
2320 memory=2
2321 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2322 bmp2rb_native="$bmp2rb_mono"
2323 tool="$rootdir/tools/scramble -add=clip"
2324 output="rockbox.sansa"
2325 bootoutput="bootloader-clip.sansa"
2326 appextra="recorder:gui:radio"
2327 plugins="yes"
2328 swcodec="yes"
2329 toolset=$scramblebitmaptools
2330 t_cpu="arm"
2331 t_manufacturer="as3525"
2332 t_model="sansa-clip"
2333 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2334 arm9tdmicc
2335 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2339 56|sansae200v2)
2340 target_id=51
2341 modelname="sansae200v2"
2342 target="-DSANSA_E200V2"
2343 memory=8
2344 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2345 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2346 tool="$rootdir/tools/scramble -add=e2v2"
2347 output="rockbox.sansa"
2348 bootoutput="bootloader-e200v2.sansa"
2349 appextra="recorder:gui:radio"
2350 plugins="yes"
2351 swcodec="yes"
2352 toolset=$scramblebitmaptools
2353 t_cpu="arm"
2354 t_manufacturer="as3525"
2355 t_model="sansa-e200v2"
2356 arm9tdmicc
2360 57|sansam200v4)
2361 target_id=52
2362 modelname="sansam200v4"
2363 target="-DSANSA_M200V4"
2364 memory=2
2365 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2366 bmp2rb_native="$bmp2rb_mono"
2367 tool="$rootdir/tools/scramble -add=m2v4"
2368 output="rockbox.sansa"
2369 bootoutput="bootloader-m200v4.sansa"
2370 appextra="recorder:gui:radio"
2371 plugins="yes"
2372 swcodec="yes"
2373 toolset=$scramblebitmaptools
2374 t_cpu="arm"
2375 t_manufacturer="as3525"
2376 t_model="sansa-m200v4"
2377 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2378 arm9tdmicc
2379 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2383 58|sansafuze)
2384 target_id=53
2385 modelname="sansafuze"
2386 target="-DSANSA_FUZE"
2387 memory=8
2388 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2389 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2390 tool="$rootdir/tools/scramble -add=fuze"
2391 output="rockbox.sansa"
2392 bootoutput="bootloader-fuze.sansa"
2393 appextra="recorder:gui:radio"
2394 plugins="yes"
2395 swcodec="yes"
2396 toolset=$scramblebitmaptools
2397 t_cpu="arm"
2398 t_manufacturer="as3525"
2399 t_model="sansa-fuze"
2400 arm9tdmicc
2404 59|sansac200v2)
2405 target_id=55
2406 modelname="sansac200v2"
2407 target="-DSANSA_C200V2"
2408 memory=2 # as per OF diagnosis mode
2409 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2410 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2411 tool="$rootdir/tools/scramble -add=c2v2"
2412 output="rockbox.sansa"
2413 bootoutput="bootloader-c200v2.sansa"
2414 appextra="recorder:gui:radio"
2415 plugins="yes"
2416 swcodec="yes"
2417 # toolset is the tools within the tools directory that we build for
2418 # this particular target.
2419 toolset=$scramblebitmaptools
2420 # architecture, manufacturer and model for the target-tree build
2421 t_cpu="arm"
2422 t_manufacturer="as3525"
2423 t_model="sansa-c200v2"
2424 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2425 arm9tdmicc
2426 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2429 60|sansaclipv2)
2430 target_id=60
2431 modelname="sansaclipv2"
2432 target="-DSANSA_CLIPV2"
2433 memory=8
2434 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2435 bmp2rb_native="$bmp2rb_mono"
2436 tool="$rootdir/tools/scramble -add=clv2"
2437 output="rockbox.sansa"
2438 bootoutput="bootloader-clipv2.sansa"
2439 appextra="recorder:gui:radio"
2440 plugins="yes"
2441 swcodec="yes"
2442 toolset=$scramblebitmaptools
2443 t_cpu="arm"
2444 t_manufacturer="as3525"
2445 t_model="sansa-clipv2"
2446 arm926ejscc
2449 61|sansaview)
2450 echo "Sansa View is not yet supported!"
2451 exit 1
2452 target_id=63
2453 modelname="sansaview"
2454 target="-DSANSA_VIEW"
2455 memory=32
2456 arm1176jzscc
2457 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2458 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2459 output="rockbox.mi4"
2460 appextra="gui"
2461 plugins=""
2462 swcodec="yes"
2463 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2464 bootoutput="firmware.mi4"
2465 # toolset is the tools within the tools directory that we build for
2466 # this particular target.
2467 toolset=$scramblebitmaptools
2468 t_cpu="arm"
2469 t_manufacturer="sandisk"
2470 t_model="sansa-view"
2473 62|sansaclipplus)
2474 target_id=66
2475 modelname="sansaclipplus"
2476 target="-DSANSA_CLIPPLUS"
2477 memory=8
2478 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2479 bmp2rb_native="$bmp2rb_mono"
2480 tool="$rootdir/tools/scramble -add=cli+"
2481 output="rockbox.sansa"
2482 bootoutput="bootloader-clipplus.sansa"
2483 appextra="recorder:gui:radio"
2484 plugins="yes"
2485 swcodec="yes"
2486 toolset=$scramblebitmaptools
2487 t_cpu="arm"
2488 t_manufacturer="as3525"
2489 t_model="sansa-clipplus"
2490 arm926ejscc
2493 63|sansafuzev2)
2494 target_id=68
2495 modelname="sansafuzev2"
2496 target="-DSANSA_FUZEV2"
2497 memory=8 # not sure
2498 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2499 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2500 tool="$rootdir/tools/scramble -add=fuz2"
2501 output="rockbox.sansa"
2502 bootoutput="bootloader-fuzev2.sansa"
2503 appextra="recorder:gui:radio"
2504 plugins="yes"
2505 swcodec="yes"
2506 toolset=$scramblebitmaptools
2507 t_cpu="arm"
2508 t_manufacturer="as3525"
2509 t_model="sansa-fuzev2"
2510 arm926ejscc
2513 64|sansafuzeplus)
2514 target_id=80
2515 modelname="sansafuzeplus"
2516 target="-DSANSA_FUZEPLUS"
2517 memory=64
2518 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2519 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2520 tool="$rootdir/tools/scramble -add=fuz+"
2521 output="rockbox.sansa"
2522 bootoutput="bootloader-fuzeplus.sansa"
2523 appextra="gui:recorder:radio"
2524 plugins="yes"
2525 swcodec="yes"
2526 toolset=$scramblebitmaptools
2527 t_cpu="arm"
2528 t_manufacturer="imx233"
2529 t_model="sansa-fuzeplus"
2530 arm926ejscc
2533 65|sansaclipzip)
2534 target_id=68
2535 modelname="sansaclipzip"
2536 target="-DSANSA_CLIPZIP"
2537 memory=8 # not sure
2538 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2539 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2540 tool="$rootdir/tools/scramble -add=clzp"
2541 output="rockbox.sansa"
2542 bootoutput="bootloader-clipzip.sansa"
2543 appextra="recorder:gui:radio"
2544 plugins=""
2545 swcodec="yes"
2546 toolset=$scramblebitmaptools
2547 t_cpu="arm"
2548 t_manufacturer="as3525"
2549 t_model="sansa-clipzip"
2550 arm926ejscc
2553 66|sansaconnect)
2554 target_id=81
2555 modelname="sansaconnect"
2556 target="-DSANSA_CONNECT"
2557 memory=64
2558 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2559 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2560 tool="$rootdir/tools/scramble -add=conn"
2561 output="rockbox.sansa"
2562 bootoutput="bootloader-connect.sansa"
2563 appextra="recorder:gui"
2564 plugins="yes"
2565 swcodec="yes"
2566 toolset=$scramblebitmaptools
2567 t_cpu="arm"
2568 t_manufacturer="tms320dm320"
2569 t_model="sansa-connect"
2570 arm926ejscc
2572 150|tatungtpj1022)
2573 target_id=25
2574 modelname="tatungtpj1022"
2575 target="-DTATUNG_TPJ1022"
2576 memory=32 # always
2577 arm7tdmicc
2578 tool="$rootdir/tools/scramble -add tpj2"
2579 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2580 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2581 output="rockbox.elio"
2582 appextra="recorder:gui:radio"
2583 plugins="yes"
2584 swcodec="yes"
2585 boottool="$rootdir/tools/scramble -mi4v2"
2586 bootoutput="pp5020.mi4"
2587 # toolset is the tools within the tools directory that we build for
2588 # this particular target.
2589 toolset=$scramblebitmaptools
2590 # architecture, manufacturer and model for the target-tree build
2591 t_cpu="arm"
2592 t_manufacturer="tatung"
2593 t_model="tpj1022"
2596 100|gogearsa9200)
2597 target_id=41
2598 modelname="gogearsa9200"
2599 target="-DPHILIPS_SA9200"
2600 memory=32 # supposedly
2601 arm7tdmicc
2602 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2603 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2604 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2605 output="rockbox.mi4"
2606 appextra="recorder:gui:radio"
2607 plugins="yes"
2608 swcodec="yes"
2609 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2610 bootoutput="FWImage.ebn"
2611 # toolset is the tools within the tools directory that we build for
2612 # this particular target.
2613 toolset=$scramblebitmaptools
2614 # architecture, manufacturer and model for the target-tree build
2615 t_cpu="arm"
2616 t_manufacturer="philips"
2617 t_model="sa9200"
2620 101|gogearhdd1630)
2621 target_id=43
2622 modelname="gogearhdd1630"
2623 target="-DPHILIPS_HDD1630"
2624 memory=32 # supposedly
2625 arm7tdmicc
2626 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2627 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2628 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2629 output="rockbox.mi4"
2630 appextra="recorder:gui:radio"
2631 plugins="yes"
2632 swcodec="yes"
2633 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2634 bootoutput="FWImage.ebn"
2635 # toolset is the tools within the tools directory that we build for
2636 # this particular target.
2637 toolset=$scramblebitmaptools
2638 # architecture, manufacturer and model for the target-tree build
2639 t_cpu="arm"
2640 t_manufacturer="philips"
2641 t_model="hdd1630"
2644 102|gogearhdd6330)
2645 target_id=65
2646 modelname="gogearhdd6330"
2647 target="-DPHILIPS_HDD6330"
2648 memory=64 # always
2649 arm7tdmicc
2650 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2651 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2652 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2653 output="rockbox.mi4"
2654 appextra="recorder:gui:radio"
2655 plugins="yes"
2656 swcodec="yes"
2657 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2658 bootoutput="FWImage.ebn"
2659 # toolset is the tools within the tools directory that we build for
2660 # this particular target.
2661 toolset=$scramblebitmaptools
2662 # architecture, manufacturer and model for the target-tree build
2663 t_cpu="arm"
2664 t_manufacturer="philips"
2665 t_model="hdd6330"
2668 110|meizum6sl)
2669 target_id=49
2670 modelname="meizum6sl"
2671 target="-DMEIZU_M6SL"
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-m6sl"
2690 111|meizum6sp)
2691 target_id=46
2692 modelname="meizum6sp"
2693 target="-DMEIZU_M6SP"
2694 memory=16 # always
2695 arm940tbecc
2696 tool="cp"
2697 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2698 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2699 output="rockbox.meizu"
2700 appextra="recorder:gui:radio"
2701 plugins="no" #FIXME
2702 swcodec="yes"
2703 toolset=$genericbitmaptools
2704 boottool="cp"
2705 bootoutput="rockboot.ebn"
2706 # architecture, manufacturer and model for the target-tree build
2707 t_cpu="arm"
2708 t_manufacturer="s5l8700"
2709 t_model="meizu-m6sp"
2712 112|meizum3)
2713 target_id=47
2714 modelname="meizum3"
2715 target="-DMEIZU_M3"
2716 memory=16 # always
2717 arm940tbecc
2718 tool="cp"
2719 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2720 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2721 output="rockbox.meizu"
2722 appextra="recorder:gui:radio"
2723 plugins="no" #FIXME
2724 swcodec="yes"
2725 toolset=$genericbitmaptools
2726 boottool="cp"
2727 bootoutput="rockboot.ebn"
2728 # architecture, manufacturer and model for the target-tree build
2729 t_cpu="arm"
2730 t_manufacturer="s5l8700"
2731 t_model="meizu-m3"
2734 120|ondavx747)
2735 target_id=45
2736 modelname="ondavx747"
2737 target="-DONDA_VX747"
2738 memory=16
2739 mipselcc
2740 tool="$rootdir/tools/scramble -add=x747"
2741 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2742 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2743 output="rockbox.vx747"
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 121|ondavx767)
2757 target_id=64
2758 modelname="ondavx767"
2759 target="-DONDA_VX767"
2760 memory=16 #FIXME
2761 mipselcc
2762 tool="cp"
2763 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2764 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2765 output="rockbox.vx767"
2766 appextra="recorder:gui:radio"
2767 plugins="" #FIXME
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_vx767"
2778 122|ondavx747p)
2779 target_id=54
2780 modelname="ondavx747p"
2781 target="-DONDA_VX747P"
2782 memory=16
2783 mipselcc
2784 tool="$rootdir/tools/scramble -add=747p"
2785 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2786 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2787 output="rockbox.vx747p"
2788 appextra="recorder:gui:radio"
2789 plugins="yes"
2790 swcodec="yes"
2791 toolset=$genericbitmaptools
2792 boottool="$rootdir/tools/scramble -ccpmp"
2793 bootoutput="ccpmp.bin"
2794 # architecture, manufacturer and model for the target-tree build
2795 t_cpu="mips"
2796 t_manufacturer="ingenic_jz47xx"
2797 t_model="onda_vx747"
2800 123|ondavx777)
2801 target_id=61
2802 modelname="ondavx777"
2803 target="-DONDA_VX777"
2804 memory=16
2805 mipselcc
2806 tool="$rootdir/tools/scramble -add=x777"
2807 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2808 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2809 output="rockbox.vx777"
2810 appextra="recorder:gui:radio"
2811 plugins="yes"
2812 swcodec="yes"
2813 toolset=$genericbitmaptools
2814 boottool="$rootdir/tools/scramble -ccpmp"
2815 bootoutput="ccpmp.bin"
2816 # architecture, manufacturer and model for the target-tree build
2817 t_cpu="mips"
2818 t_manufacturer="ingenic_jz47xx"
2819 t_model="onda_vx747"
2822 130|lyreproto1)
2823 target_id=56
2824 modelname="lyreproto1"
2825 target="-DLYRE_PROTO1"
2826 memory=64
2827 arm926ejscc
2828 tool="cp"
2829 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2830 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2831 output="rockbox.lyre"
2832 appextra="recorder:gui:radio"
2833 plugins=""
2834 swcodec="yes"
2835 toolset=$scramblebitmaptools
2836 boottool="cp"
2837 bootoutput="bootloader-proto1.lyre"
2838 # architecture, manufacturer and model for the target-tree build
2839 t_cpu="arm"
2840 t_manufacturer="at91sam"
2841 t_model="lyre_proto1"
2844 131|mini2440)
2845 target_id=99
2846 modelname="mini2440"
2847 target="-DMINI2440"
2848 memory=64
2849 arm9tdmicc
2850 tool="$rootdir/tools/scramble -add=m244"
2851 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2852 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2853 output="rockbox.mini2440"
2854 appextra="recorder:gui:radio"
2855 plugins=""
2856 swcodec="yes"
2857 toolset=$scramblebitmaptools
2858 boottool="cp"
2859 bootoutput="bootloader-mini2440.lyre"
2860 # architecture, manufacturer and model for the target-tree build
2861 t_cpu="arm"
2862 t_manufacturer="s3c2440"
2863 t_model="mini2440"
2866 140|samsungyh820)
2867 target_id=57
2868 modelname="samsungyh820"
2869 target="-DSAMSUNG_YH820"
2870 memory=32 # always
2871 arm7tdmicc
2872 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2873 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2874 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2875 output="rockbox.mi4"
2876 appextra="recorder:gui:radio"
2877 plugins="yes"
2878 swcodec="yes"
2879 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2880 bootoutput="FW_YH820.mi4"
2881 # toolset is the tools within the tools directory that we build for
2882 # this particular target.
2883 toolset=$scramblebitmaptools
2884 # architecture, manufacturer and model for the target-tree build
2885 t_cpu="arm"
2886 t_manufacturer="samsung"
2887 t_model="yh820"
2890 141|samsungyh920)
2891 target_id=58
2892 modelname="samsungyh920"
2893 target="-DSAMSUNG_YH920"
2894 memory=32 # always
2895 arm7tdmicc
2896 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2897 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2898 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2899 output="rockbox.mi4"
2900 appextra="recorder:gui:radio"
2901 plugins="yes"
2902 swcodec="yes"
2903 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2904 bootoutput="PP5020.mi4"
2905 # toolset is the tools within the tools directory that we build for
2906 # this particular target.
2907 toolset=$scramblebitmaptools
2908 # architecture, manufacturer and model for the target-tree build
2909 t_cpu="arm"
2910 t_manufacturer="samsung"
2911 t_model="yh920"
2914 142|samsungyh925)
2915 target_id=59
2916 modelname="samsungyh925"
2917 target="-DSAMSUNG_YH925"
2918 memory=32 # always
2919 arm7tdmicc
2920 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2921 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2922 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2923 output="rockbox.mi4"
2924 appextra="recorder:gui:radio"
2925 plugins="yes"
2926 swcodec="yes"
2927 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2928 bootoutput="FW_YH925.mi4"
2929 # toolset is the tools within the tools directory that we build for
2930 # this particular target.
2931 toolset=$scramblebitmaptools
2932 # architecture, manufacturer and model for the target-tree build
2933 t_cpu="arm"
2934 t_manufacturer="samsung"
2935 t_model="yh925"
2938 143|samsungyps3)
2939 target_id=72
2940 modelname="samsungyps3"
2941 target="-DSAMSUNG_YPS3"
2942 memory=16 # always
2943 arm940tbecc
2944 tool="cp"
2945 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2946 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2947 output="rockbox.yps3"
2948 appextra="recorder:gui:radio"
2949 plugins="no" #FIXME
2950 swcodec="yes"
2951 toolset=$genericbitmaptools
2952 boottool="cp"
2953 bootoutput="rockboot.ebn"
2954 # architecture, manufacturer and model for the target-tree build
2955 t_cpu="arm"
2956 t_manufacturer="s5l8700"
2957 t_model="yps3"
2960 160|vibe500)
2961 target_id=67
2962 modelname="vibe500"
2963 target="-DPBELL_VIBE500"
2964 memory=32 # always
2965 arm7tdmicc
2966 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2967 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2968 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2969 output="rockbox.mi4"
2970 appextra="recorder:gui:radio"
2971 plugins="yes"
2972 swcodec="yes"
2973 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2974 bootoutput="jukebox.mi4"
2975 # toolset is the tools within the tools directory that we build for
2976 # this particular target.
2977 toolset=$scramblebitmaptools
2978 # architecture, manufacturer and model for the target-tree build
2979 t_cpu="arm"
2980 t_manufacturer="pbell"
2981 t_model="vibe500"
2984 170|mpiohd200)
2985 target_id=69
2986 modelname="mpiohd200"
2987 target="-DMPIO_HD200"
2988 memory=16 # always
2989 coldfirecc
2990 tool="$rootdir/tools/scramble -add=hd20"
2991 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2992 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2993 output="rockbox.mpio"
2994 bootoutput="bootloader.mpio"
2995 appextra="recorder:gui:radio"
2996 plugins="yes"
2997 swcodec="yes"
2998 # toolset is the tools within the tools directory that we build for
2999 # this particular target.
3000 toolset="$genericbitmaptools"
3001 # architecture, manufacturer and model for the target-tree build
3002 t_cpu="coldfire"
3003 t_manufacturer="mpio"
3004 t_model="hd200"
3007 171|mpiohd300)
3008 target_id=70
3009 modelname="mpiohd300"
3010 target="-DMPIO_HD300"
3011 memory=16 # always
3012 coldfirecc
3013 tool="$rootdir/tools/scramble -add=hd30"
3014 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3015 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
3016 output="rockbox.mpio"
3017 bootoutput="bootloader.mpio"
3018 appextra="recorder:gui:radio"
3019 plugins="yes"
3020 swcodec="yes"
3021 # toolset is the tools within the tools directory that we build for
3022 # this particular target.
3023 toolset="$genericbitmaptools"
3024 # architecture, manufacturer and model for the target-tree build
3025 t_cpu="coldfire"
3026 t_manufacturer="mpio"
3027 t_model="hd300"
3030 180|rk27generic)
3031 target_id=78
3032 modelname="rk27generic"
3033 target="-DRK27_GENERIC"
3034 memory=16 # always
3035 arm7ejscc
3036 tool="$rootdir/tools/scramble -add=rk27"
3037 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3038 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3039 output="rockbox.rk27"
3040 bootoutput="bootloader.rk27"
3041 appextra="recorder:gui:radio"
3042 plugins="yes"
3043 swcodec="yes"
3044 # toolset is the tools within the tools directory that we build for
3045 # this particular target.
3046 toolset="$genericbitmaptools"
3047 # architecture, manufacturer and model for the target-tree build
3048 t_cpu="arm"
3049 t_manufacturer="rk27xx"
3050 t_model="rk27generic"
3053 190|hifimanhm60x)
3054 target_id=79
3055 modelname="hifimanhm60x"
3056 target="-DHM60X"
3057 memory=16
3058 arm7ejscc
3059 tool="$rootdir/tools/scramble -add=rk27"
3060 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3061 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3062 output="rockbox.rk27"
3063 bootoutput="bootloader.rk27"
3064 appextra="recorder:gui"
3065 plugins="yes"
3066 swcodec="yes"
3067 # toolset is the tools within the tools directory that we build for
3068 # this particular target.
3069 toolset="$genericbitmaptools"
3070 # architecture, manufacturer and model for the target-tree build
3071 t_cpu="arm"
3072 t_manufacturer="rk27xx"
3073 t_model="hm60x"
3076 191|hifimanhm801)
3077 target_id=82
3078 modelname="hifimanhm801"
3079 target="-DHM801"
3080 memory=16
3081 arm7ejscc
3082 tool="$rootdir/tools/scramble -add=rk27"
3083 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3084 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3085 output="rockbox.rk27"
3086 bootoutput="bootloader.rk27"
3087 appextra="recorder:gui"
3088 plugins="yes"
3089 swcodec="yes"
3090 # toolset is the tools within the tools directory that we build for
3091 # this particular target.
3092 toolset="$genericbitmaptools"
3093 # architecture, manufacturer and model for the target-tree build
3094 t_cpu="arm"
3095 t_manufacturer="rk27xx"
3096 t_model="hm801"
3099 200|sdlapp)
3100 application="yes"
3101 target_id=73
3102 modelname="sdlapp"
3103 target="-DSDLAPP"
3104 app_set_paths
3105 app_set_lcd_size
3106 memory=8
3107 uname=`uname`
3108 simcc "sdl-app"
3109 tool="cp "
3110 boottool="cp "
3111 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3112 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3113 output="rockbox"
3114 bootoutput="rockbox"
3115 appextra="recorder:gui:radio"
3116 plugins="yes"
3117 swcodec="yes"
3118 # architecture, manufacturer and model for the target-tree build
3119 t_cpu="hosted"
3120 t_manufacturer="sdl"
3121 t_model="app"
3124 201|android)
3125 application="yes"
3126 target_id=74
3127 modelname="android"
3128 target="-DANDROID"
3129 app_type="android"
3130 app_set_lcd_size
3131 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
3132 bindir="/data/data/org.rockbox/lib"
3133 libdir="/data/data/org.rockbox/app_rockbox"
3134 memory=8
3135 uname=`uname`
3136 androidcc
3137 tool="cp "
3138 boottool="cp "
3139 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3140 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3141 output="librockbox.so"
3142 bootoutput="librockbox.so"
3143 appextra="recorder:gui:radio:hosted/android"
3144 plugins="yes"
3145 swcodec="yes"
3146 # architecture, manufacturer and model for the target-tree build
3147 t_cpu="hosted"
3148 t_manufacturer="android"
3149 t_model="app"
3152 202|nokian8xx)
3153 application="yes"
3154 target_id=75
3155 modelname="nokian8xx"
3156 app_type="sdl-app"
3157 target="-DNOKIAN8XX"
3158 sharedir="/opt/rockbox/share/rockbox"
3159 bindir="/opt/rockbox/bin"
3160 libdir="/opt/rockbox/lib"
3161 memory=8
3162 uname=`uname`
3163 maemocc 4
3164 tool="cp "
3165 boottool="cp "
3166 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3167 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3168 output="rockbox"
3169 bootoutput="rockbox"
3170 appextra="recorder:gui:radio"
3171 plugins="yes"
3172 swcodec="yes"
3173 # architecture, manufacturer and model for the target-tree build
3174 t_cpu="hosted"
3175 t_manufacturer="maemo"
3176 t_model="app"
3179 203|nokian900)
3180 application="yes"
3181 target_id=76
3182 modelname="nokian900"
3183 app_type="sdl-app"
3184 target="-DNOKIAN900"
3185 sharedir="/opt/rockbox/share/rockbox"
3186 bindir="/opt/rockbox/bin"
3187 libdir="/opt/rockbox/lib"
3188 memory=8
3189 uname=`uname`
3190 maemocc 5
3191 tool="cp "
3192 boottool="cp "
3193 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3194 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3195 output="rockbox"
3196 bootoutput="rockbox"
3197 appextra="recorder:gui:radio"
3198 plugins="yes"
3199 swcodec="yes"
3200 # architecture, manufacturer and model for the target-tree build
3201 t_cpu="hosted"
3202 t_manufacturer="maemo"
3203 t_model="app"
3206 204|pandora)
3207 application="yes"
3208 target_id=77
3209 modelname="pandora"
3210 app_type="sdl-app"
3211 target="-DPANDORA"
3212 sharedir="rockbox/share/rockbox"
3213 bindir="rockbox/bin"
3214 libdir="rockbox/lib"
3215 memory=8
3216 uname=`uname`
3217 pandoracc
3218 tool="cp "
3219 boottool="cp "
3220 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3221 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3222 output="rockbox"
3223 bootoutput="rockbox"
3224 appextra="recorder:gui:radio"
3225 plugins="yes"
3226 swcodec="yes"
3227 # architecture, manufacturer and model for the target-tree build
3228 t_cpu="hosted"
3229 t_manufacturer="pandora"
3230 t_model="app"
3234 echo "Please select a supported target platform!"
3235 exit 7
3238 esac
3240 echo "Platform set to $modelname"
3243 #remove start
3244 ############################################################################
3245 # Amount of memory, for those that can differ. They have $memory unset at
3246 # this point.
3249 if [ -z "$memory" ]; then
3250 case $target_id in
3252 if [ "$ARG_RAM" ]; then
3253 size=$ARG_RAM
3254 else
3255 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3256 size=`input`;
3258 case $size in
3259 60|64)
3260 memory="64"
3263 memory="32"
3265 esac
3268 if [ "$ARG_RAM" ]; then
3269 size=$ARG_RAM
3270 else
3271 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3272 size=`input`;
3274 case $size in
3276 memory="8"
3279 memory="2"
3281 esac
3283 esac
3284 echo "Memory size selected: $memory MB"
3285 [ "$ARG_TYPE" ] || echo ""
3287 #remove end
3289 ##################################################################
3290 # Figure out build "type"
3293 # the ifp7x0 is the only platform that supports building a gdb stub like
3294 # this
3295 case $modelname in
3296 iriverifp7xx)
3297 gdbstub=", (G)DB stub"
3299 sansae200r|sansae200)
3300 gdbstub=", (I)nstaller"
3302 sansac200)
3303 gdbstub=", (E)raser"
3305 sansae200)
3306 gdbstub=", (E)raser"
3310 esac
3311 if [ "$ARG_TYPE" ]; then
3312 btype=$ARG_TYPE
3313 else
3314 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool$gdbstub: (Defaults to N)"
3315 btype=`input`;
3318 case $btype in
3319 [Ii])
3320 appsdir='$(ROOTDIR)/bootloader'
3321 apps="bootloader"
3322 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3323 bootloader="1"
3324 echo "e200R-installer build selected"
3326 [Ee])
3327 appsdir='$(ROOTDIR)/bootloader'
3328 apps="bootloader"
3329 extradefines="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3330 bootloader="1"
3331 echo "sansa eraser build selected"
3333 [Bb])
3334 if test $t_manufacturer = "archos"; then
3335 # Archos SH-based players do this somewhat differently for
3336 # some reason
3337 appsdir='$(ROOTDIR)/flash/bootbox'
3338 apps="bootbox"
3339 else
3340 appsdir='$(ROOTDIR)/bootloader'
3341 apps="bootloader"
3342 flash=""
3343 if test -n "$boottool"; then
3344 tool="$boottool"
3346 if test -n "$bootoutput"; then
3347 output=$bootoutput
3350 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3351 bootloader="1"
3352 echo "Bootloader build selected"
3354 [Ss])
3355 if [ "$modelname" = "sansae200r" ]; then
3356 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3357 exit 8
3359 debug="-DDEBUG"
3360 simulator="yes"
3361 extradefines="$extradefines -DSIMULATOR"
3362 archosrom=""
3363 flash=""
3364 echo "Simulator build selected"
3366 [Aa]*)
3367 echo "Advanced build selected"
3368 whichadvanced $btype
3370 [Gg])
3371 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3372 appsdir='$(ROOTDIR)/gdb'
3373 apps="stub"
3374 case $modelname in
3375 iriverifp7xx)
3376 output="stub.wma"
3380 esac
3381 echo "GDB stub build selected"
3383 [Cc])
3384 uname=`uname`
3385 simcc "checkwps"
3386 toolset='';
3387 t_cpu='';
3388 GCCOPTS='';
3389 extradefines="$extradefines -DDEBUG"
3390 appsdir='$(ROOTDIR)/tools/checkwps';
3391 output='checkwps.'${modelname};
3392 archosrom='';
3393 echo "CheckWPS build selected"
3395 [Dd])
3396 uname=`uname`
3397 simcc "database"
3398 toolset='';
3399 t_cpu='';
3400 GCCOPTS='';
3401 appsdir='$(ROOTDIR)/tools/database';
3402 archosrom='';
3404 case $uname in
3405 CYGWIN*|MINGW*)
3406 output="database_${modelname}.exe"
3409 output='database.'${modelname};
3411 esac
3413 echo "Database tool build selected"
3416 if [ "$modelname" = "sansae200r" ]; then
3417 echo "Do not use the e200R target for regular builds. Use e200 instead."
3418 exit 8
3420 debug=""
3421 btype="N" # set it explicitly since RET only gets here as well
3422 echo "Normal build selected"
3425 esac
3426 # to be able running "make manual" from non-manual configuration
3427 case $modelname in
3428 archosrecorderv2)
3429 manualdev="archosfmrecorder"
3431 iriverh1??)
3432 manualdev="iriverh100"
3434 ipodmini2g)
3435 manualdev="ipodmini1g"
3438 manualdev=$modelname
3440 esac
3442 if [ -z "$debug" ]; then
3443 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3446 if [ "yes" = "$application" ]; then
3447 echo Building Rockbox as an Application
3448 extradefines="$extradefines -DAPPLICATION"
3451 echo "Using source code root directory: $rootdir"
3453 # this was once possible to change at build-time, but no more:
3454 language="english"
3456 uname=`uname`
3458 if [ "yes" = "$simulator" ]; then
3459 # setup compiler and things for simulator
3460 simcc "sdl-sim"
3462 if [ -d "simdisk" ]; then
3463 echo "Subdirectory 'simdisk' already present"
3464 else
3465 mkdir simdisk
3466 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3470 # Now, figure out version number of the (gcc) compiler we are about to use
3471 gccver=`$CC -dumpversion`;
3473 # figure out the binutil version too and display it, mostly for the build
3474 # system etc to be able to see it easier
3475 if [ $uname = "Darwin" ]; then
3476 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3477 else
3478 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3481 if [ -z "$gccver" ]; then
3482 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3483 echo "[WARNING] this may cause your build to fail since we cannot do the"
3484 echo "[WARNING] checks we want now."
3485 else
3487 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3488 # DEPEND on it
3490 num1=`echo $gccver | cut -d . -f1`
3491 num2=`echo $gccver | cut -d . -f2`
3492 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3494 # This makes:
3495 # 3.3.X => 303
3496 # 3.4.X => 304
3497 # 2.95.3 => 295
3499 echo "Using $CC $gccver ($gccnum)"
3501 if test "$gccnum" -ge "400"; then
3502 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3503 # so we ignore that warnings for now
3504 # -Wno-pointer-sign
3505 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3508 if test "$gccnum" -ge "402"; then
3509 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3510 # and later would throw it for several valid cases
3511 GCCOPTS="$GCCOPTS -Wno-override-init"
3514 case $prefix in
3515 ""|"$CROSS_COMPILE")
3516 # simulator
3518 ${CROSS})
3519 # cross-compile for win32
3522 # Verify that the cross-compiler is of a recommended version!
3523 if test "$gccver" != "$gccchoice"; then
3524 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3525 echo "WARNING: version $gccchoice!"
3526 echo "WARNING: This may cause your build to fail since it may be a version"
3527 echo "WARNING: that isn't functional or known to not be the best choice."
3528 echo "WARNING: If you suffer from build problems, you know that this is"
3529 echo "WARNING: a likely source for them..."
3532 esac
3537 echo "Using $LD $ldver"
3539 # check the compiler for SH platforms
3540 if test "$CC" = "sh-elf-gcc"; then
3541 if test "$gccnum" -lt "400"; then
3542 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3543 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3544 else
3545 # figure out patch status
3546 gccpatch=`$CC --version`;
3548 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3549 echo "gcc $gccver is rockbox patched"
3550 # then convert -O to -Os to get smaller binaries!
3551 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3552 else
3553 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3554 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3559 if test "$CC" = "m68k-elf-gcc"; then
3560 # convert -O to -Os to get smaller binaries!
3561 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3564 if [ "$ARG_CCACHE" = "1" ]; then
3565 echo "Enable ccache for building"
3566 ccache="ccache"
3567 elif [ "$ARG_CCACHE" != "0" ]; then
3568 ccache=`findtool ccache`
3569 if test -n "$ccache"; then
3570 echo "Found and uses ccache ($ccache)"
3574 # figure out the full path to the various commands if possible
3575 HOSTCC=`findtool gcc --lit`
3576 HOSTAR=`findtool ar --lit`
3577 CC=`findtool ${CC} --lit`
3578 LD=`findtool ${AR} --lit`
3579 AR=`findtool ${AR} --lit`
3580 AS=`findtool ${AS} --lit`
3581 OC=`findtool ${OC} --lit`
3582 WINDRES=`findtool ${WINDRES} --lit`
3583 DLLTOOL=`findtool ${DLLTOOL} --lit`
3584 DLLWRAP=`findtool ${DLLWRAP} --lit`
3585 RANLIB=`findtool ${RANLIB} --lit`
3587 if test -n "$ccache"; then
3588 CC="$ccache $CC"
3591 if test "$ARG_ARM_THUMB" = "1"; then
3592 extradefines="$extradefines -DUSE_THUMB"
3593 CC="$toolsdir/thumb-cc.py $CC"
3596 if test "X$endian" = "Xbig"; then
3597 defendian="ROCKBOX_BIG_ENDIAN"
3598 else
3599 defendian="ROCKBOX_LITTLE_ENDIAN"
3602 if [ "$ARG_RBDIR" != "" ]; then
3603 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3604 rbdir="/"$ARG_RBDIR
3605 else
3606 rbdir=$ARG_RBDIR
3608 echo "Using alternate rockbox dir: ${rbdir}"
3611 cat > autoconf.h <<EOF
3612 /* This header was made by configure */
3613 #ifndef __BUILD_AUTOCONF_H
3614 #define __BUILD_AUTOCONF_H
3616 /* Define endianess for the target or simulator platform */
3617 #define ${defendian} 1
3619 /* Define this if you build rockbox to support the logf logging and display */
3620 ${use_logf}
3622 /* Define this to record a chart with timings for the stages of boot */
3623 ${use_bootchart}
3625 /* optional define for a backlight modded Ondio */
3626 ${have_backlight}
3628 /* optional define for FM radio mod for iAudio M5 */
3629 ${have_fmradio_in}
3631 /* optional define for ATA poweroff on Player */
3632 ${have_ata_poweroff}
3634 /* optional defines for RTC mod for h1x0 */
3635 ${config_rtc}
3636 ${have_rtc_alarm}
3638 /* the threading backend we use */
3639 #define ${thread_support}
3641 /* lcd dimensions for application builds from configure */
3642 ${app_lcd_width}
3643 ${app_lcd_height}
3645 /* root of Rockbox */
3646 #define ROCKBOX_DIR "${rbdir}"
3647 #define ROCKBOX_SHARE_PATH "${sharedir}"
3648 #define ROCKBOX_BINARY_PATH "${bindir}"
3649 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3651 #endif /* __BUILD_AUTOCONF_H */
3654 if test -n "$t_cpu"; then
3655 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3657 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3658 # Maemo needs the SDL port, too
3659 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3660 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3661 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3662 # Pandora needs the SDL port, too
3663 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3664 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3665 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3666 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3667 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3670 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3671 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3672 GCCOPTS="$GCCOPTS"
3675 if test "$swcodec" = "yes"; then
3676 voicetoolset="rbspeexenc voicefont wavtrim"
3677 else
3678 voicetoolset="voicefont wavtrim"
3681 if test "$apps" = "apps"; then
3682 # only when we build "real" apps we build the .lng files
3683 buildlangs="langs"
3686 #### Fix the cmdline ###
3687 if [ -n "$ARG_PREFIX" ]; then
3688 cmdline="$cmdline --prefix=\$(PREFIX)"
3690 if [ -n "$ARG_LCDWIDTH" ]; then
3691 cmdline="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3694 # remove parts from the cmdline we're going to set unconditionally
3695 cmdline=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3696 -e s,--ram=[0-9]\*,,g \
3697 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3698 -e s,--type=[a-zA-Z]\*,,g`
3699 cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3701 ### end of cmdline
3703 cat > Makefile <<EOF
3704 ## Automatically generated. http://www.rockbox.org/
3706 export ROOTDIR=${rootdir}
3707 export FIRMDIR=\$(ROOTDIR)/firmware
3708 export APPSDIR=${appsdir}
3709 export TOOLSDIR=${toolsdir}
3710 export DOCSDIR=${rootdir}/docs
3711 export MANUALDIR=${rootdir}/manual
3712 export DEBUG=${debug}
3713 export MODELNAME=${modelname}
3714 export ARCHOSROM=${archosrom}
3715 export FLASHFILE=${flash}
3716 export TARGET_ID=${target_id}
3717 export TARGET=${target}
3718 export CPU=${t_cpu}
3719 export MANUFACTURER=${t_manufacturer}
3720 export OBJDIR=${pwd}
3721 export BUILDDIR=${pwd}
3722 export LANGUAGE=${language}
3723 export VOICELANGUAGE=${voicelanguage}
3724 export MEMORYSIZE=${memory}
3725 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3726 export MKFIRMWARE=${tool}
3727 export BMP2RB_MONO=${bmp2rb_mono}
3728 export BMP2RB_NATIVE=${bmp2rb_native}
3729 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3730 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3731 export BINARY=${output}
3732 export APPEXTRA=${appextra}
3733 export ENABLEDPLUGINS=${plugins}
3734 export SOFTWARECODECS=${swcodec}
3735 export EXTRA_DEFINES=${extradefines}
3736 export HOSTCC=${HOSTCC}
3737 export HOSTAR=${HOSTAR}
3738 export CC=${CC}
3739 export LD=${LD}
3740 export AR=${AR}
3741 export AS=${AS}
3742 export OC=${OC}
3743 export WINDRES=${WINDRES}
3744 export DLLTOOL=${DLLTOOL}
3745 export DLLWRAP=${DLLWRAP}
3746 export RANLIB=${RANLIB}
3747 export PREFIX=${ARG_PREFIX}
3748 export PROFILE_OPTS=${PROFILE_OPTS}
3749 export APP_TYPE=${app_type}
3750 export APPLICATION=${application}
3751 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3752 export GCCOPTS=${GCCOPTS}
3753 export TARGET_INC=${TARGET_INC}
3754 export LOADADDRESS=${loadaddress}
3755 export SHARED_LDFLAG=${SHARED_LDFLAG}
3756 export SHARED_CFLAGS=${SHARED_CFLAGS}
3757 export LDOPTS=${LDOPTS}
3758 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3759 export GCCVER=${gccver}
3760 export GCCNUM=${gccnum}
3761 export UNAME=${uname}
3762 export MANUALDEV=${manualdev}
3763 export TTS_OPTS=${TTS_OPTS}
3764 export TTS_ENGINE=${TTS_ENGINE}
3765 export ENC_OPTS=${ENC_OPTS}
3766 export ENCODER=${ENCODER}
3767 export USE_ELF=${USE_ELF}
3768 export RBDIR=${rbdir}
3769 export ROCKBOX_SHARE_PATH=${sharedir}
3770 export ROCKBOX_BINARY_PATH=${bindir}
3771 export ROCKBOX_LIBRARY_PATH=${libdir}
3772 export SDLCONFIG=${sdl}
3773 export LCDORIENTATION=${lcd_orientation}
3775 CONFIGURE_OPTIONS=${cmdline}
3777 include \$(TOOLSDIR)/root.make
3780 echo "Created Makefile"