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