Fix playlist catalog directory manual spelling
[maemo-rb.git] / tools / configure
blob5b84f8774e639ee0c4590e19014bc6ea8f6205e1
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
1286 142) YH-925 ==Packard Bell== ==Logik==
1287 143) YP-S3 160) Vibe 500 80) DAX 1GB MP3/DAB
1289 ==Application== ==MPIO== ==Lyre project==
1290 200) SDL 170) HD200 130) Lyre proto 1
1291 201) Android 171) HD300 131) Mini2440
1292 202) Nokia N8xx
1293 203) Nokia N900 ==ROCKCHIP== ==HiFiMAN==
1294 204) Pandora 180) rk27xx generic 190) HM-60x
1298 buildfor=`input`;
1301 # Set of tools built for all target platforms:
1302 toolset="rdf2binary convbdf codepages"
1304 # Toolsets for some target families:
1305 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1306 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1307 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1308 ipodbitmaptools="$toolset scramble bmp2rb"
1309 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1310 tccbitmaptools="$toolset scramble bmp2rb"
1311 # generic is used by IFP, Meizu and Onda
1312 genericbitmaptools="$toolset bmp2rb"
1313 # scramble is used by all other targets
1314 scramblebitmaptools="$genericbitmaptools scramble"
1317 # ---- For each target ----
1319 # *Variables*
1320 # target_id: a unique number identifying this target, IS NOT the menu number.
1321 # Just use the currently highest number+1 when you add a new
1322 # target.
1323 # modelname: short model name used all over to identify this target
1324 # memory: number of megabytes of RAM this target has. If the amount can
1325 # be selected by the size prompt, let memory be unset here
1326 # target: -Ddefine passed to the build commands to make the correct
1327 # config-*.h file get included etc
1328 # tool: the tool that takes a plain binary and converts that into a
1329 # working "firmware" file for your target
1330 # output: the final output file name
1331 # boottool: the tool that takes a plain binary and generates a bootloader
1332 # file for your target (or blank to use $tool)
1333 # bootoutput:the final output file name for the bootloader (or blank to use
1334 # $output)
1335 # appextra: passed to the APPEXTRA variable in the Makefiles.
1336 # TODO: add proper explanation
1337 # archosrom: used only for Archos targets that build a special flashable .ucl
1338 # image.
1339 # flash: name of output for flashing, for targets where there's a special
1340 # file output for this.
1341 # plugins: set to 'yes' to build the plugins. Early development builds can
1342 # set this to no in the early stages to have an easier life for a
1343 # while
1344 # swcodec: set 'yes' on swcodec targets
1345 # toolset: lists what particular tools in the tools/ directory that this
1346 # target needs to have built prior to building Rockbox
1348 # *Functions*
1349 # *cc: sets up gcc and compiler options for your target builds. Note
1350 # that if you select a simulator build, the compiler selection is
1351 # overridden later in the script.
1353 case $buildfor in
1355 0|archosplayer)
1356 target_id=1
1357 modelname="archosplayer"
1358 target="-DARCHOS_PLAYER"
1359 shcc
1360 tool="$rootdir/tools/scramble"
1361 output="archos.mod"
1362 appextra="player:gui"
1363 archosrom="$pwd/rombox.ucl"
1364 flash="$pwd/rockbox.ucl"
1365 plugins="yes"
1366 swcodec=""
1368 # toolset is the tools within the tools directory that we build for
1369 # this particular target.
1370 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1372 # Note: the convbdf is present in the toolset just because: 1) the
1373 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1374 # build the player simulator
1376 t_cpu="sh"
1377 t_manufacturer="archos"
1378 t_model="player"
1381 1|archosrecorder)
1382 target_id=2
1383 modelname="archosrecorder"
1384 target="-DARCHOS_RECORDER"
1385 shcc
1386 tool="$rootdir/tools/scramble"
1387 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1388 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1389 output="ajbrec.ajz"
1390 appextra="recorder:gui:radio"
1391 #archosrom="$pwd/rombox.ucl"
1392 flash="$pwd/rockbox.ucl"
1393 plugins="yes"
1394 swcodec=""
1395 # toolset is the tools within the tools directory that we build for
1396 # this particular target.
1397 toolset=$archosbitmaptools
1398 t_cpu="sh"
1399 t_manufacturer="archos"
1400 t_model="recorder"
1403 2|archosfmrecorder)
1404 target_id=3
1405 modelname="archosfmrecorder"
1406 target="-DARCHOS_FMRECORDER"
1407 shcc
1408 tool="$rootdir/tools/scramble -fm"
1409 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1410 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1411 output="ajbrec.ajz"
1412 appextra="recorder:gui:radio"
1413 #archosrom="$pwd/rombox.ucl"
1414 flash="$pwd/rockbox.ucl"
1415 plugins="yes"
1416 swcodec=""
1417 # toolset is the tools within the tools directory that we build for
1418 # this particular target.
1419 toolset=$archosbitmaptools
1420 t_cpu="sh"
1421 t_manufacturer="archos"
1422 t_model="fm_v2"
1425 3|archosrecorderv2)
1426 target_id=4
1427 modelname="archosrecorderv2"
1428 target="-DARCHOS_RECORDERV2"
1429 shcc
1430 tool="$rootdir/tools/scramble -v2"
1431 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1432 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1433 output="ajbrec.ajz"
1434 appextra="recorder:gui:radio"
1435 #archosrom="$pwd/rombox.ucl"
1436 flash="$pwd/rockbox.ucl"
1437 plugins="yes"
1438 swcodec=""
1439 # toolset is the tools within the tools directory that we build for
1440 # this particular target.
1441 toolset=$archosbitmaptools
1442 t_cpu="sh"
1443 t_manufacturer="archos"
1444 t_model="fm_v2"
1447 4|archosondiosp)
1448 target_id=7
1449 modelname="archosondiosp"
1450 target="-DARCHOS_ONDIOSP"
1451 shcc
1452 tool="$rootdir/tools/scramble -osp"
1453 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1454 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1455 output="ajbrec.ajz"
1456 appextra="recorder:gui:radio"
1457 #archosrom="$pwd/rombox.ucl"
1458 flash="$pwd/rockbox.ucl"
1459 plugins="yes"
1460 swcodec=""
1461 # toolset is the tools within the tools directory that we build for
1462 # this particular target.
1463 toolset=$archosbitmaptools
1464 t_cpu="sh"
1465 t_manufacturer="archos"
1466 t_model="ondio"
1469 5|archosondiofm)
1470 target_id=8
1471 modelname="archosondiofm"
1472 target="-DARCHOS_ONDIOFM"
1473 shcc
1474 tool="$rootdir/tools/scramble -ofm"
1475 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1476 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1477 output="ajbrec.ajz"
1478 appextra="recorder:gui:radio"
1479 #archosrom="$pwd/rombox.ucl"
1480 flash="$pwd/rockbox.ucl"
1481 plugins="yes"
1482 swcodec=""
1483 toolset=$archosbitmaptools
1484 t_cpu="sh"
1485 t_manufacturer="archos"
1486 t_model="ondio"
1489 6|archosav300)
1490 target_id=38
1491 modelname="archosav300"
1492 target="-DARCHOS_AV300"
1493 memory=16 # always
1494 arm7tdmicc
1495 tool="$rootdir/tools/scramble -mm=C"
1496 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1497 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1498 output="cjbm.ajz"
1499 appextra="recorder:gui:radio"
1500 plugins="yes"
1501 swcodec=""
1502 # toolset is the tools within the tools directory that we build for
1503 # this particular target.
1504 toolset="$toolset scramble descramble bmp2rb"
1505 # architecture, manufacturer and model for the target-tree build
1506 t_cpu="arm"
1507 t_manufacturer="archos"
1508 t_model="av300"
1511 10|iriverh120)
1512 target_id=9
1513 modelname="iriverh120"
1514 target="-DIRIVER_H120"
1515 memory=32 # always
1516 coldfirecc
1517 tool="$rootdir/tools/scramble -add=h120"
1518 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1519 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1520 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1521 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1522 output="rockbox.iriver"
1523 bootoutput="bootloader.iriver"
1524 appextra="recorder:gui:radio"
1525 flash="$pwd/rombox.iriver"
1526 plugins="yes"
1527 swcodec="yes"
1528 # toolset is the tools within the tools directory that we build for
1529 # this particular target.
1530 toolset=$iriverbitmaptools
1531 t_cpu="coldfire"
1532 t_manufacturer="iriver"
1533 t_model="h100"
1536 11|iriverh300)
1537 target_id=10
1538 modelname="iriverh300"
1539 target="-DIRIVER_H300"
1540 memory=32 # always
1541 coldfirecc
1542 tool="$rootdir/tools/scramble -add=h300"
1543 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1544 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1545 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1546 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1547 output="rockbox.iriver"
1548 appextra="recorder:gui:radio"
1549 plugins="yes"
1550 swcodec="yes"
1551 # toolset is the tools within the tools directory that we build for
1552 # this particular target.
1553 toolset=$iriverbitmaptools
1554 t_cpu="coldfire"
1555 t_manufacturer="iriver"
1556 t_model="h300"
1559 12|iriverh100)
1560 target_id=11
1561 modelname="iriverh100"
1562 target="-DIRIVER_H100"
1563 memory=16 # always
1564 coldfirecc
1565 tool="$rootdir/tools/scramble -add=h100"
1566 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1567 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1568 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1569 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1570 output="rockbox.iriver"
1571 bootoutput="bootloader.iriver"
1572 appextra="recorder:gui:radio"
1573 flash="$pwd/rombox.iriver"
1574 plugins="yes"
1575 swcodec="yes"
1576 # toolset is the tools within the tools directory that we build for
1577 # this particular target.
1578 toolset=$iriverbitmaptools
1579 t_cpu="coldfire"
1580 t_manufacturer="iriver"
1581 t_model="h100"
1584 13|iriverifp7xx)
1585 target_id=19
1586 modelname="iriverifp7xx"
1587 target="-DIRIVER_IFP7XX"
1588 memory=1
1589 arm7tdmicc short
1590 tool="cp"
1591 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1592 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1593 output="rockbox.wma"
1594 appextra="recorder:gui:radio"
1595 plugins="yes"
1596 swcodec="yes"
1597 # toolset is the tools within the tools directory that we build for
1598 # this particular target.
1599 toolset=$genericbitmaptools
1600 t_cpu="arm"
1601 t_manufacturer="pnx0101"
1602 t_model="iriver-ifp7xx"
1605 14|iriverh10)
1606 target_id=22
1607 modelname="iriverh10"
1608 target="-DIRIVER_H10"
1609 memory=32 # always
1610 arm7tdmicc
1611 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1612 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1613 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1614 output="rockbox.mi4"
1615 appextra="recorder:gui:radio"
1616 plugins="yes"
1617 swcodec="yes"
1618 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1619 bootoutput="H10_20GC.mi4"
1620 # toolset is the tools within the tools directory that we build for
1621 # this particular target.
1622 toolset=$scramblebitmaptools
1623 # architecture, manufacturer and model for the target-tree build
1624 t_cpu="arm"
1625 t_manufacturer="iriver"
1626 t_model="h10"
1629 15|iriverh10_5gb)
1630 target_id=24
1631 modelname="iriverh10_5gb"
1632 target="-DIRIVER_H10_5GB"
1633 memory=32 # always
1634 arm7tdmicc
1635 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1636 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1637 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1638 output="rockbox.mi4"
1639 appextra="recorder:gui:radio"
1640 plugins="yes"
1641 swcodec="yes"
1642 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1643 bootoutput="H10.mi4"
1644 # toolset is the tools within the tools directory that we build for
1645 # this particular target.
1646 toolset=$scramblebitmaptools
1647 # architecture, manufacturer and model for the target-tree build
1648 t_cpu="arm"
1649 t_manufacturer="iriver"
1650 t_model="h10"
1653 20|ipodcolor)
1654 target_id=13
1655 modelname="ipodcolor"
1656 target="-DIPOD_COLOR"
1657 memory=32 # always
1658 arm7tdmicc
1659 tool="$rootdir/tools/scramble -add=ipco"
1660 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1661 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1662 output="rockbox.ipod"
1663 appextra="recorder:gui:radio"
1664 plugins="yes"
1665 swcodec="yes"
1666 bootoutput="bootloader-$modelname.ipod"
1667 # toolset is the tools within the tools directory that we build for
1668 # this particular target.
1669 toolset=$ipodbitmaptools
1670 # architecture, manufacturer and model for the target-tree build
1671 t_cpu="arm"
1672 t_manufacturer="ipod"
1673 t_model="color"
1676 21|ipodnano1g)
1677 target_id=14
1678 modelname="ipodnano1g"
1679 target="-DIPOD_NANO"
1680 memory=32 # always
1681 arm7tdmicc
1682 tool="$rootdir/tools/scramble -add=nano"
1683 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1684 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1685 output="rockbox.ipod"
1686 appextra="recorder:gui:radio"
1687 plugins="yes"
1688 swcodec="yes"
1689 bootoutput="bootloader-$modelname.ipod"
1690 # toolset is the tools within the tools directory that we build for
1691 # this particular target.
1692 toolset=$ipodbitmaptools
1693 # architecture, manufacturer and model for the target-tree build
1694 t_cpu="arm"
1695 t_manufacturer="ipod"
1696 t_model="nano"
1699 22|ipodvideo)
1700 target_id=15
1701 modelname="ipodvideo"
1702 target="-DIPOD_VIDEO"
1703 memory=64 # always. This is reduced at runtime if needed
1704 arm7tdmicc
1705 tool="$rootdir/tools/scramble -add=ipvd"
1706 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1707 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1708 output="rockbox.ipod"
1709 appextra="recorder:gui:radio"
1710 plugins="yes"
1711 swcodec="yes"
1712 bootoutput="bootloader-$modelname.ipod"
1713 # toolset is the tools within the tools directory that we build for
1714 # this particular target.
1715 toolset=$ipodbitmaptools
1716 # architecture, manufacturer and model for the target-tree build
1717 t_cpu="arm"
1718 t_manufacturer="ipod"
1719 t_model="video"
1722 23|ipod3g)
1723 target_id=16
1724 modelname="ipod3g"
1725 target="-DIPOD_3G"
1726 memory=32 # always
1727 arm7tdmicc
1728 tool="$rootdir/tools/scramble -add=ip3g"
1729 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1730 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1731 output="rockbox.ipod"
1732 appextra="recorder:gui:radio"
1733 plugins="yes"
1734 swcodec="yes"
1735 bootoutput="bootloader-$modelname.ipod"
1736 # toolset is the tools within the tools directory that we build for
1737 # this particular target.
1738 toolset=$ipodbitmaptools
1739 # architecture, manufacturer and model for the target-tree build
1740 t_cpu="arm"
1741 t_manufacturer="ipod"
1742 t_model="3g"
1745 24|ipod4g)
1746 target_id=17
1747 modelname="ipod4g"
1748 target="-DIPOD_4G"
1749 memory=32 # always
1750 arm7tdmicc
1751 tool="$rootdir/tools/scramble -add=ip4g"
1752 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1753 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1754 output="rockbox.ipod"
1755 appextra="recorder:gui:radio"
1756 plugins="yes"
1757 swcodec="yes"
1758 bootoutput="bootloader-$modelname.ipod"
1759 # toolset is the tools within the tools directory that we build for
1760 # this particular target.
1761 toolset=$ipodbitmaptools
1762 # architecture, manufacturer and model for the target-tree build
1763 t_cpu="arm"
1764 t_manufacturer="ipod"
1765 t_model="4g"
1768 25|ipodmini1g)
1769 target_id=18
1770 modelname="ipodmini1g"
1771 target="-DIPOD_MINI"
1772 memory=32 # always
1773 arm7tdmicc
1774 tool="$rootdir/tools/scramble -add=mini"
1775 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1776 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1777 output="rockbox.ipod"
1778 appextra="recorder:gui:radio"
1779 plugins="yes"
1780 swcodec="yes"
1781 bootoutput="bootloader-$modelname.ipod"
1782 # toolset is the tools within the tools directory that we build for
1783 # this particular target.
1784 toolset=$ipodbitmaptools
1785 # architecture, manufacturer and model for the target-tree build
1786 t_cpu="arm"
1787 t_manufacturer="ipod"
1788 t_model="mini"
1791 26|ipodmini2g)
1792 target_id=21
1793 modelname="ipodmini2g"
1794 target="-DIPOD_MINI2G"
1795 memory=32 # always
1796 arm7tdmicc
1797 tool="$rootdir/tools/scramble -add=mn2g"
1798 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1799 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1800 output="rockbox.ipod"
1801 appextra="recorder:gui:radio"
1802 plugins="yes"
1803 swcodec="yes"
1804 bootoutput="bootloader-$modelname.ipod"
1805 # toolset is the tools within the tools directory that we build for
1806 # this particular target.
1807 toolset=$ipodbitmaptools
1808 # architecture, manufacturer and model for the target-tree build
1809 t_cpu="arm"
1810 t_manufacturer="ipod"
1811 t_model="mini2g"
1814 27|ipod1g2g)
1815 target_id=29
1816 modelname="ipod1g2g"
1817 target="-DIPOD_1G2G"
1818 memory=32 # always
1819 arm7tdmicc
1820 tool="$rootdir/tools/scramble -add=1g2g"
1821 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1822 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1823 output="rockbox.ipod"
1824 appextra="recorder:gui:radio"
1825 plugins="yes"
1826 swcodec="yes"
1827 bootoutput="bootloader-$modelname.ipod"
1828 # toolset is the tools within the tools directory that we build for
1829 # this particular target.
1830 toolset=$ipodbitmaptools
1831 # architecture, manufacturer and model for the target-tree build
1832 t_cpu="arm"
1833 t_manufacturer="ipod"
1834 t_model="1g2g"
1837 28|ipodnano2g)
1838 target_id=62
1839 modelname="ipodnano2g"
1840 target="-DIPOD_NANO2G"
1841 memory=32 # always
1842 arm940tcc
1843 tool="$rootdir/tools/scramble -add=nn2g"
1844 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1845 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1846 output="rockbox.ipod"
1847 appextra="recorder:gui:radio"
1848 plugins="yes"
1849 swcodec="yes"
1850 bootoutput="bootloader-$modelname.ipod"
1851 # toolset is the tools within the tools directory that we build for
1852 # this particular target.
1853 toolset=$ipodbitmaptools
1854 # architecture, manufacturer and model for the target-tree build
1855 t_cpu="arm"
1856 t_manufacturer="s5l8700"
1857 t_model="ipodnano2g"
1860 29|ipod6g)
1861 target_id=71
1862 modelname="ipod6g"
1863 target="-DIPOD_6G"
1864 memory=64 # always
1865 arm926ejscc
1866 tool="$rootdir/tools/scramble -add=ip6g"
1867 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1868 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1869 output="rockbox.ipod"
1870 appextra="recorder:gui:radio"
1871 plugins="yes"
1872 swcodec="yes"
1873 bootoutput="bootloader-$modelname.ipod"
1874 # toolset is the tools within the tools directory that we build for
1875 # this particular target.
1876 toolset=$ipodbitmaptools
1877 # architecture, manufacturer and model for the target-tree build
1878 t_cpu="arm"
1879 t_manufacturer="s5l8702"
1880 t_model="ipod6g"
1883 30|iaudiox5)
1884 target_id=12
1885 modelname="iaudiox5"
1886 target="-DIAUDIO_X5"
1887 memory=16 # always
1888 coldfirecc
1889 tool="$rootdir/tools/scramble -add=iax5"
1890 boottool="$rootdir/tools/scramble -iaudiox5"
1891 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1892 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1893 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1894 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1895 output="rockbox.iaudio"
1896 bootoutput="x5_fw.bin"
1897 appextra="recorder:gui:radio"
1898 plugins="yes"
1899 swcodec="yes"
1900 # toolset is the tools within the tools directory that we build for
1901 # this particular target.
1902 toolset="$iaudiobitmaptools"
1903 # architecture, manufacturer and model for the target-tree build
1904 t_cpu="coldfire"
1905 t_manufacturer="iaudio"
1906 t_model="x5"
1909 31|iaudiom5)
1910 target_id=28
1911 modelname="iaudiom5"
1912 target="-DIAUDIO_M5"
1913 memory=16 # always
1914 coldfirecc
1915 tool="$rootdir/tools/scramble -add=iam5"
1916 boottool="$rootdir/tools/scramble -iaudiom5"
1917 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1918 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1919 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1920 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1921 output="rockbox.iaudio"
1922 bootoutput="m5_fw.bin"
1923 appextra="recorder:gui:radio"
1924 plugins="yes"
1925 swcodec="yes"
1926 # toolset is the tools within the tools directory that we build for
1927 # this particular target.
1928 toolset="$iaudiobitmaptools"
1929 # architecture, manufacturer and model for the target-tree build
1930 t_cpu="coldfire"
1931 t_manufacturer="iaudio"
1932 t_model="m5"
1935 32|iaudio7)
1936 target_id=32
1937 modelname="iaudio7"
1938 target="-DIAUDIO_7"
1939 memory=16 # always
1940 arm946cc
1941 tool="$rootdir/tools/scramble -add=i7"
1942 boottool="$rootdir/tools/scramble -tcc=crc"
1943 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1944 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1945 output="rockbox.iaudio"
1946 appextra="recorder:gui:radio"
1947 plugins="yes"
1948 swcodec="yes"
1949 bootoutput="I7_FW.BIN"
1950 # toolset is the tools within the tools directory that we build for
1951 # this particular target.
1952 toolset="$tccbitmaptools"
1953 # architecture, manufacturer and model for the target-tree build
1954 t_cpu="arm"
1955 t_manufacturer="tcc77x"
1956 t_model="iaudio7"
1959 33|cowond2)
1960 target_id=34
1961 modelname="cowond2"
1962 target="-DCOWON_D2"
1963 memory=32
1964 arm926ejscc
1965 tool="$rootdir/tools/scramble -add=d2"
1966 boottool="cp "
1967 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1968 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1969 output="rockbox.d2"
1970 bootoutput="bootloader-cowond2.bin"
1971 appextra="recorder:gui:radio"
1972 plugins="yes"
1973 swcodec="yes"
1974 toolset="$tccbitmaptools"
1975 # architecture, manufacturer and model for the target-tree build
1976 t_cpu="arm"
1977 t_manufacturer="tcc780x"
1978 t_model="cowond2"
1981 34|iaudiom3)
1982 target_id=37
1983 modelname="iaudiom3"
1984 target="-DIAUDIO_M3"
1985 memory=16 # always
1986 coldfirecc
1987 tool="$rootdir/tools/scramble -add=iam3"
1988 boottool="$rootdir/tools/scramble -iaudiom3"
1989 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1990 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1991 output="rockbox.iaudio"
1992 bootoutput="cowon_m3.bin"
1993 appextra="recorder:gui:radio"
1994 plugins="yes"
1995 swcodec="yes"
1996 # toolset is the tools within the tools directory that we build for
1997 # this particular target.
1998 toolset="$iaudiobitmaptools"
1999 # architecture, manufacturer and model for the target-tree build
2000 t_cpu="coldfire"
2001 t_manufacturer="iaudio"
2002 t_model="m3"
2005 40|gigabeatfx)
2006 target_id=20
2007 modelname="gigabeatfx"
2008 target="-DGIGABEAT_F"
2009 memory=32 # always
2010 arm9tdmicc
2011 tool="$rootdir/tools/scramble -add=giga"
2012 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2013 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2014 output="rockbox.gigabeat"
2015 appextra="recorder:gui:radio"
2016 plugins="yes"
2017 swcodec="yes"
2018 toolset=$gigabeatbitmaptools
2019 boottool="$rootdir/tools/scramble -gigabeat"
2020 bootoutput="FWIMG01.DAT"
2021 # architecture, manufacturer and model for the target-tree build
2022 t_cpu="arm"
2023 t_manufacturer="s3c2440"
2024 t_model="gigabeat-fx"
2027 41|gigabeats)
2028 target_id=26
2029 modelname="gigabeats"
2030 target="-DGIGABEAT_S"
2031 memory=64
2032 arm1136jfscc
2033 tool="$rootdir/tools/scramble -add=gigs"
2034 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2035 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2036 output="rockbox.gigabeat"
2037 appextra="recorder:gui:radio"
2038 plugins="yes"
2039 swcodec="yes"
2040 toolset="$gigabeatbitmaptools"
2041 boottool="$rootdir/tools/scramble -gigabeats"
2042 bootoutput="nk.bin"
2043 # architecture, manufacturer and model for the target-tree build
2044 t_cpu="arm"
2045 t_manufacturer="imx31"
2046 t_model="gigabeat-s"
2049 70|mrobe500)
2050 target_id=36
2051 modelname="mrobe500"
2052 target="-DMROBE_500"
2053 memory=64 # always
2054 arm926ejscc
2055 tool="$rootdir/tools/scramble -add=m500"
2056 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2057 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
2058 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2059 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2060 output="rockbox.mrobe500"
2061 appextra="recorder:gui:radio"
2062 plugins="yes"
2063 swcodec="yes"
2064 toolset=$gigabeatbitmaptools
2065 boottool="cp "
2066 bootoutput="rockbox.mrboot"
2067 # architecture, manufacturer and model for the target-tree build
2068 t_cpu="arm"
2069 t_manufacturer="tms320dm320"
2070 t_model="mrobe-500"
2073 71|mrobe100)
2074 target_id=33
2075 modelname="mrobe100"
2076 target="-DMROBE_100"
2077 memory=32 # always
2078 arm7tdmicc
2079 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2080 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2081 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2082 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2083 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2084 output="rockbox.mi4"
2085 appextra="recorder:gui:radio"
2086 plugins="yes"
2087 swcodec="yes"
2088 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2089 bootoutput="pp5020.mi4"
2090 # toolset is the tools within the tools directory that we build for
2091 # this particular target.
2092 toolset=$scramblebitmaptools
2093 # architecture, manufacturer and model for the target-tree build
2094 t_cpu="arm"
2095 t_manufacturer="olympus"
2096 t_model="mrobe-100"
2099 80|logikdax)
2100 target_id=31
2101 modelname="logikdax"
2102 target="-DLOGIK_DAX"
2103 memory=2 # always
2104 arm946cc
2105 tool="$rootdir/tools/scramble -add=ldax"
2106 boottool="$rootdir/tools/scramble -tcc=crc"
2107 bootoutput="player.rom"
2108 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2109 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2110 output="rockbox.logik"
2111 appextra="recorder:gui:radio"
2112 plugins=""
2113 swcodec="yes"
2114 # toolset is the tools within the tools directory that we build for
2115 # this particular target.
2116 toolset=$tccbitmaptools
2117 # architecture, manufacturer and model for the target-tree build
2118 t_cpu="arm"
2119 t_manufacturer="tcc77x"
2120 t_model="logikdax"
2123 90|zenvisionm30gb)
2124 target_id=35
2125 modelname="zenvisionm30gb"
2126 target="-DCREATIVE_ZVM"
2127 memory=64
2128 arm926ejscc
2129 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2130 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2131 tool="$rootdir/tools/scramble -creative=zvm"
2132 USE_ELF="yes"
2133 output="rockbox.zvm"
2134 appextra="recorder:gui:radio"
2135 plugins="yes"
2136 swcodec="yes"
2137 toolset=$ipodbitmaptools
2138 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
2139 bootoutput="rockbox.zvmboot"
2140 # architecture, manufacturer and model for the target-tree build
2141 t_cpu="arm"
2142 t_manufacturer="tms320dm320"
2143 t_model="creative-zvm"
2146 91|zenvisionm60gb)
2147 target_id=40
2148 modelname="zenvisionm60gb"
2149 target="-DCREATIVE_ZVM60GB"
2150 memory=64
2151 arm926ejscc
2152 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2153 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2154 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2155 USE_ELF="yes"
2156 output="rockbox.zvm60"
2157 appextra="recorder:gui:radio"
2158 plugins="yes"
2159 swcodec="yes"
2160 toolset=$ipodbitmaptools
2161 boottool="$rootdir/tools/scramble -creative=zvm60"
2162 bootoutput="rockbox.zvm60boot"
2163 # architecture, manufacturer and model for the target-tree build
2164 t_cpu="arm"
2165 t_manufacturer="tms320dm320"
2166 t_model="creative-zvm"
2169 92|zenvision)
2170 target_id=39
2171 modelname="zenvision"
2172 target="-DCREATIVE_ZV"
2173 memory=64
2174 arm926ejscc
2175 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2176 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2177 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2178 USE_ELF="yes"
2179 output="rockbox.zv"
2180 appextra="recorder:gui:radio"
2181 plugins=""
2182 swcodec="yes"
2183 toolset=$ipodbitmaptools
2184 boottool="$rootdir/tools/scramble -creative=zenvision"
2185 bootoutput="rockbox.zvboot"
2186 # architecture, manufacturer and model for the target-tree build
2187 t_cpu="arm"
2188 t_manufacturer="tms320dm320"
2189 t_model="creative-zvm"
2192 50|sansae200)
2193 target_id=23
2194 modelname="sansae200"
2195 target="-DSANSA_E200"
2196 memory=32 # supposedly
2197 arm7tdmicc
2198 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2199 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2200 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2201 output="rockbox.mi4"
2202 appextra="recorder:gui:radio"
2203 plugins="yes"
2204 swcodec="yes"
2205 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2206 bootoutput="PP5022.mi4"
2207 # toolset is the tools within the tools directory that we build for
2208 # this particular target.
2209 toolset=$scramblebitmaptools
2210 # architecture, manufacturer and model for the target-tree build
2211 t_cpu="arm"
2212 t_manufacturer="sandisk"
2213 t_model="sansa-e200"
2216 51|sansae200r)
2217 # the e200R model is pretty much identical to the e200, it only has a
2218 # different option to the scramble tool when building a bootloader and
2219 # makes the bootloader output file name in all lower case.
2220 target_id=27
2221 modelname="sansae200r"
2222 target="-DSANSA_E200"
2223 memory=32 # supposedly
2224 arm7tdmicc
2225 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2226 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2227 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2228 output="rockbox.mi4"
2229 appextra="recorder:gui:radio"
2230 plugins="yes"
2231 swcodec="yes"
2232 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2233 bootoutput="pp5022.mi4"
2234 # toolset is the tools within the tools directory that we build for
2235 # this particular target.
2236 toolset=$scramblebitmaptools
2237 # architecture, manufacturer and model for the target-tree build
2238 t_cpu="arm"
2239 t_manufacturer="sandisk"
2240 t_model="sansa-e200"
2243 52|sansac200)
2244 target_id=30
2245 modelname="sansac200"
2246 target="-DSANSA_C200"
2247 memory=32 # supposedly
2248 arm7tdmicc
2249 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2250 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2251 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2252 output="rockbox.mi4"
2253 appextra="recorder:gui:radio"
2254 plugins="yes"
2255 swcodec="yes"
2256 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2257 bootoutput="firmware.mi4"
2258 # toolset is the tools within the tools directory that we build for
2259 # this particular target.
2260 toolset=$scramblebitmaptools
2261 # architecture, manufacturer and model for the target-tree build
2262 t_cpu="arm"
2263 t_manufacturer="sandisk"
2264 t_model="sansa-c200"
2267 53|sansam200)
2268 target_id=48
2269 modelname="sansam200"
2270 target="-DSANSA_M200"
2271 memory=1 # always
2272 arm946cc
2273 tool="$rootdir/tools/scramble -add=m200"
2274 boottool="$rootdir/tools/scramble -tcc=crc"
2275 bootoutput="player.rom"
2276 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2277 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2278 output="rockbox.m200"
2279 appextra="recorder:gui:radio"
2280 plugins=""
2281 swcodec="yes"
2282 # toolset is the tools within the tools directory that we build for
2283 # this particular target.
2284 toolset=$tccbitmaptools
2285 # architecture, manufacturer and model for the target-tree build
2286 t_cpu="arm"
2287 t_manufacturer="tcc77x"
2288 t_model="m200"
2291 54|sansac100)
2292 target_id=42
2293 modelname="sansac100"
2294 target="-DSANSA_C100"
2295 memory=2
2296 arm946cc
2297 tool="$rootdir/tools/scramble -add=c100"
2298 boottool="$rootdir/tools/scramble -tcc=crc"
2299 bootoutput="player.rom"
2300 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2301 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2302 output="rockbox.c100"
2303 appextra="recorder:gui:radio"
2304 plugins=""
2305 swcodec="yes"
2306 # toolset is the tools within the tools directory that we build for
2307 # this particular target.
2308 toolset=$tccbitmaptools
2309 # architecture, manufacturer and model for the target-tree build
2310 t_cpu="arm"
2311 t_manufacturer="tcc77x"
2312 t_model="c100"
2315 55|sansaclip)
2316 target_id=50
2317 modelname="sansaclip"
2318 target="-DSANSA_CLIP"
2319 memory=2
2320 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2321 bmp2rb_native="$bmp2rb_mono"
2322 tool="$rootdir/tools/scramble -add=clip"
2323 output="rockbox.sansa"
2324 bootoutput="bootloader-clip.sansa"
2325 appextra="recorder:gui:radio"
2326 plugins="yes"
2327 swcodec="yes"
2328 toolset=$scramblebitmaptools
2329 t_cpu="arm"
2330 t_manufacturer="as3525"
2331 t_model="sansa-clip"
2332 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2333 arm9tdmicc
2334 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2338 56|sansae200v2)
2339 target_id=51
2340 modelname="sansae200v2"
2341 target="-DSANSA_E200V2"
2342 memory=8
2343 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2344 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2345 tool="$rootdir/tools/scramble -add=e2v2"
2346 output="rockbox.sansa"
2347 bootoutput="bootloader-e200v2.sansa"
2348 appextra="recorder:gui:radio"
2349 plugins="yes"
2350 swcodec="yes"
2351 toolset=$scramblebitmaptools
2352 t_cpu="arm"
2353 t_manufacturer="as3525"
2354 t_model="sansa-e200v2"
2355 arm9tdmicc
2359 57|sansam200v4)
2360 target_id=52
2361 modelname="sansam200v4"
2362 target="-DSANSA_M200V4"
2363 memory=2
2364 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2365 bmp2rb_native="$bmp2rb_mono"
2366 tool="$rootdir/tools/scramble -add=m2v4"
2367 output="rockbox.sansa"
2368 bootoutput="bootloader-m200v4.sansa"
2369 appextra="recorder:gui:radio"
2370 plugins="yes"
2371 swcodec="yes"
2372 toolset=$scramblebitmaptools
2373 t_cpu="arm"
2374 t_manufacturer="as3525"
2375 t_model="sansa-m200v4"
2376 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2377 arm9tdmicc
2378 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2382 58|sansafuze)
2383 target_id=53
2384 modelname="sansafuze"
2385 target="-DSANSA_FUZE"
2386 memory=8
2387 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2388 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2389 tool="$rootdir/tools/scramble -add=fuze"
2390 output="rockbox.sansa"
2391 bootoutput="bootloader-fuze.sansa"
2392 appextra="recorder:gui:radio"
2393 plugins="yes"
2394 swcodec="yes"
2395 toolset=$scramblebitmaptools
2396 t_cpu="arm"
2397 t_manufacturer="as3525"
2398 t_model="sansa-fuze"
2399 arm9tdmicc
2403 59|sansac200v2)
2404 target_id=55
2405 modelname="sansac200v2"
2406 target="-DSANSA_C200V2"
2407 memory=2 # as per OF diagnosis mode
2408 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2409 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2410 tool="$rootdir/tools/scramble -add=c2v2"
2411 output="rockbox.sansa"
2412 bootoutput="bootloader-c200v2.sansa"
2413 appextra="recorder:gui:radio"
2414 plugins="yes"
2415 swcodec="yes"
2416 # toolset is the tools within the tools directory that we build for
2417 # this particular target.
2418 toolset=$scramblebitmaptools
2419 # architecture, manufacturer and model for the target-tree build
2420 t_cpu="arm"
2421 t_manufacturer="as3525"
2422 t_model="sansa-c200v2"
2423 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2424 arm9tdmicc
2425 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2428 60|sansaclipv2)
2429 target_id=60
2430 modelname="sansaclipv2"
2431 target="-DSANSA_CLIPV2"
2432 memory=8
2433 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2434 bmp2rb_native="$bmp2rb_mono"
2435 tool="$rootdir/tools/scramble -add=clv2"
2436 output="rockbox.sansa"
2437 bootoutput="bootloader-clipv2.sansa"
2438 appextra="recorder:gui:radio"
2439 plugins="yes"
2440 swcodec="yes"
2441 toolset=$scramblebitmaptools
2442 t_cpu="arm"
2443 t_manufacturer="as3525"
2444 t_model="sansa-clipv2"
2445 arm926ejscc
2448 61|sansaview)
2449 echo "Sansa View is not yet supported!"
2450 exit 1
2451 target_id=63
2452 modelname="sansaview"
2453 target="-DSANSA_VIEW"
2454 memory=32
2455 arm1176jzscc
2456 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2457 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2458 output="rockbox.mi4"
2459 appextra="gui"
2460 plugins=""
2461 swcodec="yes"
2462 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2463 bootoutput="firmware.mi4"
2464 # toolset is the tools within the tools directory that we build for
2465 # this particular target.
2466 toolset=$scramblebitmaptools
2467 t_cpu="arm"
2468 t_manufacturer="sandisk"
2469 t_model="sansa-view"
2472 62|sansaclipplus)
2473 target_id=66
2474 modelname="sansaclipplus"
2475 target="-DSANSA_CLIPPLUS"
2476 memory=8
2477 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2478 bmp2rb_native="$bmp2rb_mono"
2479 tool="$rootdir/tools/scramble -add=cli+"
2480 output="rockbox.sansa"
2481 bootoutput="bootloader-clipplus.sansa"
2482 appextra="recorder:gui:radio"
2483 plugins="yes"
2484 swcodec="yes"
2485 toolset=$scramblebitmaptools
2486 t_cpu="arm"
2487 t_manufacturer="as3525"
2488 t_model="sansa-clipplus"
2489 arm926ejscc
2492 63|sansafuzev2)
2493 target_id=68
2494 modelname="sansafuzev2"
2495 target="-DSANSA_FUZEV2"
2496 memory=8 # not sure
2497 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2498 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2499 tool="$rootdir/tools/scramble -add=fuz2"
2500 output="rockbox.sansa"
2501 bootoutput="bootloader-fuzev2.sansa"
2502 appextra="recorder:gui:radio"
2503 plugins="yes"
2504 swcodec="yes"
2505 toolset=$scramblebitmaptools
2506 t_cpu="arm"
2507 t_manufacturer="as3525"
2508 t_model="sansa-fuzev2"
2509 arm926ejscc
2512 64|sansafuzeplus)
2513 target_id=80
2514 modelname="sansafuzeplus"
2515 target="-DSANSA_FUZEPLUS"
2516 memory=64
2517 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2518 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2519 tool="$rootdir/tools/scramble -add=fuz+"
2520 output="rockbox.sansa"
2521 boottool="true"
2522 bootoutput=""
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 150|tatungtpj1022)
2554 target_id=25
2555 modelname="tatungtpj1022"
2556 target="-DTATUNG_TPJ1022"
2557 memory=32 # always
2558 arm7tdmicc
2559 tool="$rootdir/tools/scramble -add tpj2"
2560 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2561 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2562 output="rockbox.elio"
2563 appextra="recorder:gui:radio"
2564 plugins="yes"
2565 swcodec="yes"
2566 boottool="$rootdir/tools/scramble -mi4v2"
2567 bootoutput="pp5020.mi4"
2568 # toolset is the tools within the tools directory that we build for
2569 # this particular target.
2570 toolset=$scramblebitmaptools
2571 # architecture, manufacturer and model for the target-tree build
2572 t_cpu="arm"
2573 t_manufacturer="tatung"
2574 t_model="tpj1022"
2577 100|gogearsa9200)
2578 target_id=41
2579 modelname="gogearsa9200"
2580 target="-DPHILIPS_SA9200"
2581 memory=32 # supposedly
2582 arm7tdmicc
2583 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2584 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2585 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2586 output="rockbox.mi4"
2587 appextra="recorder:gui:radio"
2588 plugins="yes"
2589 swcodec="yes"
2590 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2591 bootoutput="FWImage.ebn"
2592 # toolset is the tools within the tools directory that we build for
2593 # this particular target.
2594 toolset=$scramblebitmaptools
2595 # architecture, manufacturer and model for the target-tree build
2596 t_cpu="arm"
2597 t_manufacturer="philips"
2598 t_model="sa9200"
2601 101|gogearhdd1630)
2602 target_id=43
2603 modelname="gogearhdd1630"
2604 target="-DPHILIPS_HDD1630"
2605 memory=32 # supposedly
2606 arm7tdmicc
2607 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2608 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2609 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2610 output="rockbox.mi4"
2611 appextra="recorder:gui:radio"
2612 plugins="yes"
2613 swcodec="yes"
2614 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2615 bootoutput="FWImage.ebn"
2616 # toolset is the tools within the tools directory that we build for
2617 # this particular target.
2618 toolset=$scramblebitmaptools
2619 # architecture, manufacturer and model for the target-tree build
2620 t_cpu="arm"
2621 t_manufacturer="philips"
2622 t_model="hdd1630"
2625 102|gogearhdd6330)
2626 target_id=65
2627 modelname="gogearhdd6330"
2628 target="-DPHILIPS_HDD6330"
2629 memory=64 # always
2630 arm7tdmicc
2631 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2632 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2633 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2634 output="rockbox.mi4"
2635 appextra="recorder:gui:radio"
2636 plugins="yes"
2637 swcodec="yes"
2638 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2639 bootoutput="FWImage.ebn"
2640 # toolset is the tools within the tools directory that we build for
2641 # this particular target.
2642 toolset=$scramblebitmaptools
2643 # architecture, manufacturer and model for the target-tree build
2644 t_cpu="arm"
2645 t_manufacturer="philips"
2646 t_model="hdd6330"
2649 110|meizum6sl)
2650 target_id=49
2651 modelname="meizum6sl"
2652 target="-DMEIZU_M6SL"
2653 memory=16 # always
2654 arm940tbecc
2655 tool="cp"
2656 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2657 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2658 output="rockbox.meizu"
2659 appextra="recorder:gui:radio"
2660 plugins="no" #FIXME
2661 swcodec="yes"
2662 toolset=$genericbitmaptools
2663 boottool="cp"
2664 bootoutput="rockboot.ebn"
2665 # architecture, manufacturer and model for the target-tree build
2666 t_cpu="arm"
2667 t_manufacturer="s5l8700"
2668 t_model="meizu-m6sl"
2671 111|meizum6sp)
2672 target_id=46
2673 modelname="meizum6sp"
2674 target="-DMEIZU_M6SP"
2675 memory=16 # always
2676 arm940tbecc
2677 tool="cp"
2678 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2679 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2680 output="rockbox.meizu"
2681 appextra="recorder:gui:radio"
2682 plugins="no" #FIXME
2683 swcodec="yes"
2684 toolset=$genericbitmaptools
2685 boottool="cp"
2686 bootoutput="rockboot.ebn"
2687 # architecture, manufacturer and model for the target-tree build
2688 t_cpu="arm"
2689 t_manufacturer="s5l8700"
2690 t_model="meizu-m6sp"
2693 112|meizum3)
2694 target_id=47
2695 modelname="meizum3"
2696 target="-DMEIZU_M3"
2697 memory=16 # always
2698 arm940tbecc
2699 tool="cp"
2700 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2701 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2702 output="rockbox.meizu"
2703 appextra="recorder:gui:radio"
2704 plugins="no" #FIXME
2705 swcodec="yes"
2706 toolset=$genericbitmaptools
2707 boottool="cp"
2708 bootoutput="rockboot.ebn"
2709 # architecture, manufacturer and model for the target-tree build
2710 t_cpu="arm"
2711 t_manufacturer="s5l8700"
2712 t_model="meizu-m3"
2715 120|ondavx747)
2716 target_id=45
2717 modelname="ondavx747"
2718 target="-DONDA_VX747"
2719 memory=16
2720 mipselcc
2721 tool="$rootdir/tools/scramble -add=x747"
2722 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2723 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2724 output="rockbox.vx747"
2725 appextra="recorder:gui:radio"
2726 plugins="yes"
2727 swcodec="yes"
2728 toolset=$genericbitmaptools
2729 boottool="$rootdir/tools/scramble -ccpmp"
2730 bootoutput="ccpmp.bin"
2731 # architecture, manufacturer and model for the target-tree build
2732 t_cpu="mips"
2733 t_manufacturer="ingenic_jz47xx"
2734 t_model="onda_vx747"
2737 121|ondavx767)
2738 target_id=64
2739 modelname="ondavx767"
2740 target="-DONDA_VX767"
2741 memory=16 #FIXME
2742 mipselcc
2743 tool="cp"
2744 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2745 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2746 output="rockbox.vx767"
2747 appextra="recorder:gui:radio"
2748 plugins="" #FIXME
2749 swcodec="yes"
2750 toolset=$genericbitmaptools
2751 boottool="$rootdir/tools/scramble -ccpmp"
2752 bootoutput="ccpmp.bin"
2753 # architecture, manufacturer and model for the target-tree build
2754 t_cpu="mips"
2755 t_manufacturer="ingenic_jz47xx"
2756 t_model="onda_vx767"
2759 122|ondavx747p)
2760 target_id=54
2761 modelname="ondavx747p"
2762 target="-DONDA_VX747P"
2763 memory=16
2764 mipselcc
2765 tool="$rootdir/tools/scramble -add=747p"
2766 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2767 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2768 output="rockbox.vx747p"
2769 appextra="recorder:gui:radio"
2770 plugins="yes"
2771 swcodec="yes"
2772 toolset=$genericbitmaptools
2773 boottool="$rootdir/tools/scramble -ccpmp"
2774 bootoutput="ccpmp.bin"
2775 # architecture, manufacturer and model for the target-tree build
2776 t_cpu="mips"
2777 t_manufacturer="ingenic_jz47xx"
2778 t_model="onda_vx747"
2781 123|ondavx777)
2782 target_id=61
2783 modelname="ondavx777"
2784 target="-DONDA_VX777"
2785 memory=16
2786 mipselcc
2787 tool="$rootdir/tools/scramble -add=x777"
2788 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2789 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2790 output="rockbox.vx777"
2791 appextra="recorder:gui:radio"
2792 plugins="yes"
2793 swcodec="yes"
2794 toolset=$genericbitmaptools
2795 boottool="$rootdir/tools/scramble -ccpmp"
2796 bootoutput="ccpmp.bin"
2797 # architecture, manufacturer and model for the target-tree build
2798 t_cpu="mips"
2799 t_manufacturer="ingenic_jz47xx"
2800 t_model="onda_vx747"
2803 130|lyreproto1)
2804 target_id=56
2805 modelname="lyreproto1"
2806 target="-DLYRE_PROTO1"
2807 memory=64
2808 arm926ejscc
2809 tool="cp"
2810 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2811 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2812 output="rockbox.lyre"
2813 appextra="recorder:gui:radio"
2814 plugins=""
2815 swcodec="yes"
2816 toolset=$scramblebitmaptools
2817 boottool="cp"
2818 bootoutput="bootloader-proto1.lyre"
2819 # architecture, manufacturer and model for the target-tree build
2820 t_cpu="arm"
2821 t_manufacturer="at91sam"
2822 t_model="lyre_proto1"
2825 131|mini2440)
2826 target_id=99
2827 modelname="mini2440"
2828 target="-DMINI2440"
2829 memory=64
2830 arm9tdmicc
2831 tool="$rootdir/tools/scramble -add=m244"
2832 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2833 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2834 output="rockbox.mini2440"
2835 appextra="recorder:gui:radio"
2836 plugins=""
2837 swcodec="yes"
2838 toolset=$scramblebitmaptools
2839 boottool="cp"
2840 bootoutput="bootloader-mini2440.lyre"
2841 # architecture, manufacturer and model for the target-tree build
2842 t_cpu="arm"
2843 t_manufacturer="s3c2440"
2844 t_model="mini2440"
2847 140|samsungyh820)
2848 target_id=57
2849 modelname="samsungyh820"
2850 target="-DSAMSUNG_YH820"
2851 memory=32 # always
2852 arm7tdmicc
2853 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2854 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2855 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2856 output="rockbox.mi4"
2857 appextra="recorder:gui:radio"
2858 plugins="yes"
2859 swcodec="yes"
2860 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2861 bootoutput="FW_YH820.mi4"
2862 # toolset is the tools within the tools directory that we build for
2863 # this particular target.
2864 toolset=$scramblebitmaptools
2865 # architecture, manufacturer and model for the target-tree build
2866 t_cpu="arm"
2867 t_manufacturer="samsung"
2868 t_model="yh820"
2871 141|samsungyh920)
2872 target_id=58
2873 modelname="samsungyh920"
2874 target="-DSAMSUNG_YH920"
2875 memory=32 # always
2876 arm7tdmicc
2877 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2878 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2879 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2880 output="rockbox.mi4"
2881 appextra="recorder:gui:radio"
2882 plugins="yes"
2883 swcodec="yes"
2884 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2885 bootoutput="PP5020.mi4"
2886 # toolset is the tools within the tools directory that we build for
2887 # this particular target.
2888 toolset=$scramblebitmaptools
2889 # architecture, manufacturer and model for the target-tree build
2890 t_cpu="arm"
2891 t_manufacturer="samsung"
2892 t_model="yh920"
2895 142|samsungyh925)
2896 target_id=59
2897 modelname="samsungyh925"
2898 target="-DSAMSUNG_YH925"
2899 memory=32 # always
2900 arm7tdmicc
2901 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2902 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2903 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2904 output="rockbox.mi4"
2905 appextra="recorder:gui:radio"
2906 plugins="yes"
2907 swcodec="yes"
2908 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2909 bootoutput="FW_YH925.mi4"
2910 # toolset is the tools within the tools directory that we build for
2911 # this particular target.
2912 toolset=$scramblebitmaptools
2913 # architecture, manufacturer and model for the target-tree build
2914 t_cpu="arm"
2915 t_manufacturer="samsung"
2916 t_model="yh925"
2919 143|samsungyps3)
2920 target_id=72
2921 modelname="samsungyps3"
2922 target="-DSAMSUNG_YPS3"
2923 memory=16 # always
2924 arm940tbecc
2925 tool="cp"
2926 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2927 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2928 output="rockbox.yps3"
2929 appextra="recorder:gui:radio"
2930 plugins="no" #FIXME
2931 swcodec="yes"
2932 toolset=$genericbitmaptools
2933 boottool="cp"
2934 bootoutput="rockboot.ebn"
2935 # architecture, manufacturer and model for the target-tree build
2936 t_cpu="arm"
2937 t_manufacturer="s5l8700"
2938 t_model="yps3"
2941 160|vibe500)
2942 target_id=67
2943 modelname="vibe500"
2944 target="-DPBELL_VIBE500"
2945 memory=32 # always
2946 arm7tdmicc
2947 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2948 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2949 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2950 output="rockbox.mi4"
2951 appextra="recorder:gui:radio"
2952 plugins="yes"
2953 swcodec="yes"
2954 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2955 bootoutput="jukebox.mi4"
2956 # toolset is the tools within the tools directory that we build for
2957 # this particular target.
2958 toolset=$scramblebitmaptools
2959 # architecture, manufacturer and model for the target-tree build
2960 t_cpu="arm"
2961 t_manufacturer="pbell"
2962 t_model="vibe500"
2965 170|mpiohd200)
2966 target_id=69
2967 modelname="mpiohd200"
2968 target="-DMPIO_HD200"
2969 memory=16 # always
2970 coldfirecc
2971 tool="$rootdir/tools/scramble -add=hd20"
2972 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2973 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2974 output="rockbox.mpio"
2975 bootoutput="bootloader.mpio"
2976 appextra="recorder:gui:radio"
2977 plugins="yes"
2978 swcodec="yes"
2979 # toolset is the tools within the tools directory that we build for
2980 # this particular target.
2981 toolset="$genericbitmaptools"
2982 # architecture, manufacturer and model for the target-tree build
2983 t_cpu="coldfire"
2984 t_manufacturer="mpio"
2985 t_model="hd200"
2988 171|mpiohd300)
2989 target_id=70
2990 modelname="mpiohd300"
2991 target="-DMPIO_HD300"
2992 memory=16 # always
2993 coldfirecc
2994 tool="$rootdir/tools/scramble -add=hd30"
2995 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2996 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2997 output="rockbox.mpio"
2998 bootoutput="bootloader.mpio"
2999 appextra="recorder:gui:radio"
3000 plugins="yes"
3001 swcodec="yes"
3002 # toolset is the tools within the tools directory that we build for
3003 # this particular target.
3004 toolset="$genericbitmaptools"
3005 # architecture, manufacturer and model for the target-tree build
3006 t_cpu="coldfire"
3007 t_manufacturer="mpio"
3008 t_model="hd300"
3011 180|rk27generic)
3012 target_id=78
3013 modelname="rk27generic"
3014 target="-DRK27_GENERIC"
3015 memory=16 # always
3016 arm7ejscc
3017 tool="$rootdir/tools/scramble -add=rk27"
3018 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3019 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3020 output="rockbox.rk27"
3021 bootoutput="bootloader.rk27"
3022 appextra="recorder:gui:radio"
3023 plugins="yes"
3024 swcodec="yes"
3025 # toolset is the tools within the tools directory that we build for
3026 # this particular target.
3027 toolset="$genericbitmaptools"
3028 # architecture, manufacturer and model for the target-tree build
3029 t_cpu="arm"
3030 t_manufacturer="rk27xx"
3031 t_model="rk27generic"
3034 190|hifimanhm60x)
3035 target_id=79
3036 modelname="hifimanhm60x"
3037 target="-DHM60X"
3038 memory=16
3039 arm7ejscc
3040 tool="$rootdir/tools/scramble -add=rk27"
3041 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3042 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3043 output="rockbox.rk27"
3044 bootoutput="bootloader.rk27"
3045 appextra="recorder:gui"
3046 plugins="yes"
3047 swcodec="yes"
3048 # toolset is the tools within the tools directory that we build for
3049 # this particular target.
3050 toolset="$genericbitmaptools"
3051 # architecture, manufacturer and model for the target-tree build
3052 t_cpu="arm"
3053 t_manufacturer="rk27xx"
3054 t_model="hm60x"
3057 200|sdlapp)
3058 application="yes"
3059 target_id=73
3060 modelname="sdlapp"
3061 target="-DSDLAPP"
3062 app_set_paths
3063 app_set_lcd_size
3064 memory=8
3065 uname=`uname`
3066 simcc "sdl-app"
3067 tool="cp "
3068 boottool="cp "
3069 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3070 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3071 output="rockbox"
3072 bootoutput="rockbox"
3073 appextra="recorder:gui:radio"
3074 plugins="yes"
3075 swcodec="yes"
3076 # architecture, manufacturer and model for the target-tree build
3077 t_cpu="hosted"
3078 t_manufacturer="sdl"
3079 t_model="app"
3082 201|android)
3083 application="yes"
3084 target_id=74
3085 modelname="android"
3086 target="-DANDROID"
3087 app_type="android"
3088 app_set_lcd_size
3089 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
3090 bindir="/data/data/org.rockbox/lib"
3091 libdir="/data/data/org.rockbox/app_rockbox"
3092 memory=8
3093 uname=`uname`
3094 androidcc
3095 tool="cp "
3096 boottool="cp "
3097 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3098 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3099 output="librockbox.so"
3100 bootoutput="librockbox.so"
3101 appextra="recorder:gui:radio:hosted/android"
3102 plugins="yes"
3103 swcodec="yes"
3104 # architecture, manufacturer and model for the target-tree build
3105 t_cpu="hosted"
3106 t_manufacturer="android"
3107 t_model="app"
3110 202|nokian8xx)
3111 application="yes"
3112 target_id=75
3113 modelname="nokian8xx"
3114 app_type="sdl-app"
3115 target="-DNOKIAN8XX"
3116 sharedir="/opt/rockbox/share/rockbox"
3117 bindir="/opt/rockbox/bin"
3118 libdir="/opt/rockbox/lib"
3119 memory=8
3120 uname=`uname`
3121 maemocc 4
3122 tool="cp "
3123 boottool="cp "
3124 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3125 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3126 output="rockbox"
3127 bootoutput="rockbox"
3128 appextra="recorder:gui:radio"
3129 plugins="yes"
3130 swcodec="yes"
3131 # architecture, manufacturer and model for the target-tree build
3132 t_cpu="hosted"
3133 t_manufacturer="maemo"
3134 t_model="app"
3137 203|nokian900)
3138 application="yes"
3139 target_id=76
3140 modelname="nokian900"
3141 app_type="sdl-app"
3142 target="-DNOKIAN900"
3143 sharedir="/opt/rockbox/share/rockbox"
3144 bindir="/opt/rockbox/bin"
3145 libdir="/opt/rockbox/lib"
3146 memory=8
3147 uname=`uname`
3148 maemocc 5
3149 tool="cp "
3150 boottool="cp "
3151 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3152 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3153 output="rockbox"
3154 bootoutput="rockbox"
3155 appextra="recorder:gui:radio"
3156 plugins="yes"
3157 swcodec="yes"
3158 # architecture, manufacturer and model for the target-tree build
3159 t_cpu="hosted"
3160 t_manufacturer="maemo"
3161 t_model="app"
3164 204|pandora)
3165 application="yes"
3166 target_id=77
3167 modelname="pandora"
3168 app_type="sdl-app"
3169 target="-DPANDORA"
3170 sharedir="rockbox/share/rockbox"
3171 bindir="rockbox/bin"
3172 libdir="rockbox/lib"
3173 memory=8
3174 uname=`uname`
3175 pandoracc
3176 tool="cp "
3177 boottool="cp "
3178 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3179 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3180 output="rockbox"
3181 bootoutput="rockbox"
3182 appextra="recorder:gui:radio"
3183 plugins="yes"
3184 swcodec="yes"
3185 # architecture, manufacturer and model for the target-tree build
3186 t_cpu="hosted"
3187 t_manufacturer="pandora"
3188 t_model="app"
3192 echo "Please select a supported target platform!"
3193 exit 7
3196 esac
3198 echo "Platform set to $modelname"
3201 #remove start
3202 ############################################################################
3203 # Amount of memory, for those that can differ. They have $memory unset at
3204 # this point.
3207 if [ -z "$memory" ]; then
3208 case $target_id in
3210 if [ "$ARG_RAM" ]; then
3211 size=$ARG_RAM
3212 else
3213 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3214 size=`input`;
3216 case $size in
3217 60|64)
3218 memory="64"
3221 memory="32"
3223 esac
3226 if [ "$ARG_RAM" ]; then
3227 size=$ARG_RAM
3228 else
3229 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3230 size=`input`;
3232 case $size in
3234 memory="8"
3237 memory="2"
3239 esac
3241 esac
3242 echo "Memory size selected: $memory MB"
3243 [ "$ARG_TYPE" ] || echo ""
3245 #remove end
3247 ##################################################################
3248 # Figure out build "type"
3251 # the ifp7x0 is the only platform that supports building a gdb stub like
3252 # this
3253 case $modelname in
3254 iriverifp7xx)
3255 gdbstub=", (G)DB stub"
3257 sansae200r|sansae200)
3258 gdbstub=", (I)nstaller"
3260 sansac200)
3261 gdbstub=", (E)raser"
3263 sansae200)
3264 gdbstub=", (E)raser"
3268 esac
3269 if [ "$ARG_TYPE" ]; then
3270 btype=$ARG_TYPE
3271 else
3272 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool$gdbstub: (Defaults to N)"
3273 btype=`input`;
3276 case $btype in
3277 [Ii])
3278 appsdir='$(ROOTDIR)/bootloader'
3279 apps="bootloader"
3280 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3281 bootloader="1"
3282 echo "e200R-installer build selected"
3284 [Ee])
3285 appsdir='$(ROOTDIR)/bootloader'
3286 apps="bootloader"
3287 extradefines="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3288 bootloader="1"
3289 echo "sansa eraser build selected"
3291 [Bb])
3292 if test $t_manufacturer = "archos"; then
3293 # Archos SH-based players do this somewhat differently for
3294 # some reason
3295 appsdir='$(ROOTDIR)/flash/bootbox'
3296 apps="bootbox"
3297 else
3298 appsdir='$(ROOTDIR)/bootloader'
3299 apps="bootloader"
3300 flash=""
3301 if test -n "$boottool"; then
3302 tool="$boottool"
3304 if test -n "$bootoutput"; then
3305 output=$bootoutput
3308 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3309 bootloader="1"
3310 echo "Bootloader build selected"
3312 [Ss])
3313 if [ "$modelname" = "sansae200r" ]; then
3314 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3315 exit 8
3317 debug="-DDEBUG"
3318 simulator="yes"
3319 extradefines="$extradefines -DSIMULATOR"
3320 archosrom=""
3321 flash=""
3322 echo "Simulator build selected"
3324 [Aa]*)
3325 echo "Advanced build selected"
3326 whichadvanced $btype
3328 [Gg])
3329 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3330 appsdir='$(ROOTDIR)/gdb'
3331 apps="stub"
3332 case $modelname in
3333 iriverifp7xx)
3334 output="stub.wma"
3338 esac
3339 echo "GDB stub build selected"
3341 [Cc])
3342 uname=`uname`
3343 simcc "checkwps"
3344 toolset='';
3345 t_cpu='';
3346 GCCOPTS='';
3347 extradefines="$extradefines -DDEBUG"
3348 appsdir='$(ROOTDIR)/tools/checkwps';
3349 output='checkwps.'${modelname};
3350 archosrom='';
3351 echo "CheckWPS build selected"
3353 [Dd])
3354 uname=`uname`
3355 simcc "database"
3356 toolset='';
3357 t_cpu='';
3358 GCCOPTS='';
3359 appsdir='$(ROOTDIR)/tools/database';
3360 archosrom='';
3362 case $uname in
3363 CYGWIN*|MINGW*)
3364 output="database_${modelname}.exe"
3367 output='database.'${modelname};
3369 esac
3371 echo "Database tool build selected"
3374 if [ "$modelname" = "sansae200r" ]; then
3375 echo "Do not use the e200R target for regular builds. Use e200 instead."
3376 exit 8
3378 debug=""
3379 btype="N" # set it explicitly since RET only gets here as well
3380 echo "Normal build selected"
3383 esac
3384 # to be able running "make manual" from non-manual configuration
3385 case $modelname in
3386 archosrecorderv2)
3387 manualdev="archosfmrecorder"
3389 iriverh1??)
3390 manualdev="iriverh100"
3392 ipodmini2g)
3393 manualdev="ipodmini1g"
3396 manualdev=$modelname
3398 esac
3400 if [ -z "$debug" ]; then
3401 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3404 if [ "yes" = "$application" ]; then
3405 echo Building Rockbox as an Application
3406 extradefines="$extradefines -DAPPLICATION"
3409 echo "Using source code root directory: $rootdir"
3411 # this was once possible to change at build-time, but no more:
3412 language="english"
3414 uname=`uname`
3416 if [ "yes" = "$simulator" ]; then
3417 # setup compiler and things for simulator
3418 simcc "sdl-sim"
3420 if [ -d "simdisk" ]; then
3421 echo "Subdirectory 'simdisk' already present"
3422 else
3423 mkdir simdisk
3424 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3428 # Now, figure out version number of the (gcc) compiler we are about to use
3429 gccver=`$CC -dumpversion`;
3431 # figure out the binutil version too and display it, mostly for the build
3432 # system etc to be able to see it easier
3433 if [ $uname = "Darwin" ]; then
3434 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3435 else
3436 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3439 if [ -z "$gccver" ]; then
3440 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3441 echo "[WARNING] this may cause your build to fail since we cannot do the"
3442 echo "[WARNING] checks we want now."
3443 else
3445 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3446 # DEPEND on it
3448 num1=`echo $gccver | cut -d . -f1`
3449 num2=`echo $gccver | cut -d . -f2`
3450 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3452 # This makes:
3453 # 3.3.X => 303
3454 # 3.4.X => 304
3455 # 2.95.3 => 295
3457 echo "Using $CC $gccver ($gccnum)"
3459 if test "$gccnum" -ge "400"; then
3460 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3461 # so we ignore that warnings for now
3462 # -Wno-pointer-sign
3463 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3466 if test "$gccnum" -ge "402"; then
3467 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3468 # and later would throw it for several valid cases
3469 GCCOPTS="$GCCOPTS -Wno-override-init"
3472 case $prefix in
3473 ""|"$CROSS_COMPILE")
3474 # simulator
3476 ${CROSS})
3477 # cross-compile for win32
3480 # Verify that the cross-compiler is of a recommended version!
3481 if test "$gccver" != "$gccchoice"; then
3482 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3483 echo "WARNING: version $gccchoice!"
3484 echo "WARNING: This may cause your build to fail since it may be a version"
3485 echo "WARNING: that isn't functional or known to not be the best choice."
3486 echo "WARNING: If you suffer from build problems, you know that this is"
3487 echo "WARNING: a likely source for them..."
3490 esac
3495 echo "Using $LD $ldver"
3497 # check the compiler for SH platforms
3498 if test "$CC" = "sh-elf-gcc"; then
3499 if test "$gccnum" -lt "400"; then
3500 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3501 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3502 else
3503 # figure out patch status
3504 gccpatch=`$CC --version`;
3506 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3507 echo "gcc $gccver is rockbox patched"
3508 # then convert -O to -Os to get smaller binaries!
3509 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3510 else
3511 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3512 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3517 if test "$CC" = "m68k-elf-gcc"; then
3518 # convert -O to -Os to get smaller binaries!
3519 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3522 if [ "$ARG_CCACHE" = "1" ]; then
3523 echo "Enable ccache for building"
3524 ccache="ccache"
3525 elif [ "$ARG_CCACHE" != "0" ]; then
3526 ccache=`findtool ccache`
3527 if test -n "$ccache"; then
3528 echo "Found and uses ccache ($ccache)"
3532 # figure out the full path to the various commands if possible
3533 HOSTCC=`findtool gcc --lit`
3534 HOSTAR=`findtool ar --lit`
3535 CC=`findtool ${CC} --lit`
3536 LD=`findtool ${AR} --lit`
3537 AR=`findtool ${AR} --lit`
3538 AS=`findtool ${AS} --lit`
3539 OC=`findtool ${OC} --lit`
3540 WINDRES=`findtool ${WINDRES} --lit`
3541 DLLTOOL=`findtool ${DLLTOOL} --lit`
3542 DLLWRAP=`findtool ${DLLWRAP} --lit`
3543 RANLIB=`findtool ${RANLIB} --lit`
3545 if test -n "$ccache"; then
3546 CC="$ccache $CC"
3549 if test "$ARG_ARM_THUMB" = "1"; then
3550 extradefines="$extradefines -DUSE_THUMB"
3551 CC="$toolsdir/thumb-cc.py $CC"
3554 if test "X$endian" = "Xbig"; then
3555 defendian="ROCKBOX_BIG_ENDIAN"
3556 else
3557 defendian="ROCKBOX_LITTLE_ENDIAN"
3560 if [ "$ARG_RBDIR" != "" ]; then
3561 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3562 rbdir="/"$ARG_RBDIR
3563 else
3564 rbdir=$ARG_RBDIR
3566 echo "Using alternate rockbox dir: ${rbdir}"
3569 cat > autoconf.h <<EOF
3570 /* This header was made by configure */
3571 #ifndef __BUILD_AUTOCONF_H
3572 #define __BUILD_AUTOCONF_H
3574 /* Define endianess for the target or simulator platform */
3575 #define ${defendian} 1
3577 /* Define this if you build rockbox to support the logf logging and display */
3578 ${use_logf}
3580 /* Define this to record a chart with timings for the stages of boot */
3581 ${use_bootchart}
3583 /* optional define for a backlight modded Ondio */
3584 ${have_backlight}
3586 /* optional define for FM radio mod for iAudio M5 */
3587 ${have_fmradio_in}
3589 /* optional define for ATA poweroff on Player */
3590 ${have_ata_poweroff}
3592 /* optional defines for RTC mod for h1x0 */
3593 ${config_rtc}
3594 ${have_rtc_alarm}
3596 /* the threading backend we use */
3597 #define ${thread_support}
3599 /* lcd dimensions for application builds from configure */
3600 ${app_lcd_width}
3601 ${app_lcd_height}
3603 /* root of Rockbox */
3604 #define ROCKBOX_DIR "${rbdir}"
3605 #define ROCKBOX_SHARE_PATH "${sharedir}"
3606 #define ROCKBOX_BINARY_PATH "${bindir}"
3607 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3609 #endif /* __BUILD_AUTOCONF_H */
3612 if test -n "$t_cpu"; then
3613 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3615 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3616 # Maemo needs the SDL port, too
3617 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3618 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3619 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3620 # Pandora needs the SDL port, too
3621 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3622 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3623 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3624 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3625 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3628 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3629 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3630 GCCOPTS="$GCCOPTS"
3633 if test "$swcodec" = "yes"; then
3634 voicetoolset="rbspeexenc voicefont wavtrim"
3635 else
3636 voicetoolset="voicefont wavtrim"
3639 if test "$apps" = "apps"; then
3640 # only when we build "real" apps we build the .lng files
3641 buildlangs="langs"
3644 #### Fix the cmdline ###
3645 if [ -n "$ARG_PREFIX" ]; then
3646 cmdline="$cmdline --prefix=\$(PREFIX)"
3648 if [ -n "$ARG_LCDWIDTH" ]; then
3649 cmdline="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3652 # remove parts from the cmdline we're going to set unconditionally
3653 cmdline=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3654 -e s,--ram=[0-9]\*,,g \
3655 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3656 -e s,--type=[a-zA-Z]\*,,g`
3657 cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3659 ### end of cmdline
3661 cat > Makefile <<EOF
3662 ## Automatically generated. http://www.rockbox.org/
3664 export ROOTDIR=${rootdir}
3665 export FIRMDIR=\$(ROOTDIR)/firmware
3666 export APPSDIR=${appsdir}
3667 export TOOLSDIR=${toolsdir}
3668 export DOCSDIR=${rootdir}/docs
3669 export MANUALDIR=${rootdir}/manual
3670 export DEBUG=${debug}
3671 export MODELNAME=${modelname}
3672 export ARCHOSROM=${archosrom}
3673 export FLASHFILE=${flash}
3674 export TARGET_ID=${target_id}
3675 export TARGET=${target}
3676 export CPU=${t_cpu}
3677 export MANUFACTURER=${t_manufacturer}
3678 export OBJDIR=${pwd}
3679 export BUILDDIR=${pwd}
3680 export LANGUAGE=${language}
3681 export VOICELANGUAGE=${voicelanguage}
3682 export MEMORYSIZE=${memory}
3683 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3684 export MKFIRMWARE=${tool}
3685 export BMP2RB_MONO=${bmp2rb_mono}
3686 export BMP2RB_NATIVE=${bmp2rb_native}
3687 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3688 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3689 export BINARY=${output}
3690 export APPEXTRA=${appextra}
3691 export ENABLEDPLUGINS=${plugins}
3692 export SOFTWARECODECS=${swcodec}
3693 export EXTRA_DEFINES=${extradefines}
3694 export HOSTCC=${HOSTCC}
3695 export HOSTAR=${HOSTAR}
3696 export CC=${CC}
3697 export LD=${LD}
3698 export AR=${AR}
3699 export AS=${AS}
3700 export OC=${OC}
3701 export WINDRES=${WINDRES}
3702 export DLLTOOL=${DLLTOOL}
3703 export DLLWRAP=${DLLWRAP}
3704 export RANLIB=${RANLIB}
3705 export PREFIX=${ARG_PREFIX}
3706 export PROFILE_OPTS=${PROFILE_OPTS}
3707 export APP_TYPE=${app_type}
3708 export APPLICATION=${application}
3709 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3710 export GCCOPTS=${GCCOPTS}
3711 export TARGET_INC=${TARGET_INC}
3712 export LOADADDRESS=${loadaddress}
3713 export SHARED_LDFLAG=${SHARED_LDFLAG}
3714 export SHARED_CFLAGS=${SHARED_CFLAGS}
3715 export LDOPTS=${LDOPTS}
3716 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3717 export GCCVER=${gccver}
3718 export GCCNUM=${gccnum}
3719 export UNAME=${uname}
3720 export MANUALDEV=${manualdev}
3721 export TTS_OPTS=${TTS_OPTS}
3722 export TTS_ENGINE=${TTS_ENGINE}
3723 export ENC_OPTS=${ENC_OPTS}
3724 export ENCODER=${ENCODER}
3725 export USE_ELF=${USE_ELF}
3726 export RBDIR=${rbdir}
3727 export ROCKBOX_SHARE_PATH=${sharedir}
3728 export ROCKBOX_BINARY_PATH=${bindir}
3729 export ROCKBOX_LIBRARY_PATH=${libdir}
3730 export SDLCONFIG=${sdl}
3731 export LCDORIENTATION=${lcd_orientation}
3733 CONFIGURE_OPTIONS=${cmdline}
3735 include \$(TOOLSDIR)/root.make
3738 echo "Created Makefile"