Implement cooperative threads on hosted platforms using C code.
[maemo-rb.git] / tools / configure
blob889012ab78dd75e5d7ce19568fa3eeefecd3d87e
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_modelname=
30 app_lcd_width=
31 app_lcd_height=
33 # Begin Function Definitions
35 input() {
36 read response
37 echo $response
40 prefixtools () {
41 prefix="$1"
42 CC=${prefix}gcc
43 WINDRES=${prefix}windres
44 DLLTOOL=${prefix}dlltool
45 DLLWRAP=${prefix}dllwrap
46 RANLIB=${prefix}ranlib
47 LD=${prefix}ld
48 AR=${prefix}ar
49 AS=${prefix}as
50 OC=${prefix}objcopy
53 app_set_paths () {
54 # setup files and paths depending on the platform
55 if [ -z "$ARG_PREFIX" ]; then
56 sharedir="/usr/local/share/rockbox"
57 bindir="/usr/local/bin"
58 libdir="/usr/local/lib"
59 else
60 if [ -d "$ARG_PREFIX" ]; then
61 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
62 ARG_PREFIX=`realpath $ARG_PREFIX`
63 if [ "0" != "$?" ]; then
64 echo "ERROR: Could not get prefix path (is realpath installed?)."
65 exit
68 sharedir="$ARG_PREFIX/share/rockbox"
69 bindir="$ARG_PREFIX/bin"
70 libdir="$ARG_PREFIX/lib"
71 else
72 echo "ERROR: PREFIX does not exist"
73 exit
78 # Set the application LCD size according to the following priorities:
79 # 1) If --lcdwidth and --lcdheight are set, use them
80 # 2) If a size is passed to the app_set_lcd_size() function, use that
81 # 3) Otherwise ask the user
82 app_set_lcd_size () {
83 if [ -z "$ARG_LCDWIDTH" ]; then
84 ARG_LCDWIDTH=$1
86 if [ -z "$ARG_LCDHEIGHT" ]; then
87 ARG_LCDHEIGHT=$2
90 echo "Enter the LCD width (default: 320)"
91 if [ -z "$ARG_LCDWIDTH" ]; then
92 app_lcd_width=`input`
93 else
94 app_lcd_width="$ARG_LCDWIDTH"
96 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
97 echo "Enter the LCD height (default: 480)"
98 if [ -z "$ARG_LCDHEIGHT" ]; then
99 app_lcd_height=`input`
100 else
101 app_lcd_height="$ARG_LCDHEIGHT"
103 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
104 echo "Selected $app_lcd_width x $app_lcd_height resolution"
105 ARG_LCDWIDTH=$app_lcd_width
106 ARG_LCDHEIGHT=$app_lcd_height
108 app_lcd_width="#define LCD_WIDTH $app_lcd_width"
109 app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
112 findarmgcc() {
113 if [ "$ARG_ARM_EABI" != "0" ]; then
114 prefixtools arm-elf-eabi-
115 gccchoice="4.4.4"
116 else
117 prefixtools arm-elf-
118 gccchoice="4.0.3"
122 # scan the $PATH for the given command
123 findtool(){
124 file="$1"
126 IFS=":"
127 for path in $PATH
129 # echo "checks for $file in $path" >&2
130 if test -f "$path/$file"; then
131 echo "$path/$file"
132 return
134 done
135 # check whether caller wants literal return value if not found
136 if [ "$2" = "--lit" ]; then
137 echo "$file"
141 # scan the $PATH for sdl-config - check whether for a (cross-)win32
142 # sdl as requested
143 findsdl(){
144 file="sdl-config"
145 winbuild="$1"
147 IFS=":"
148 for path in $PATH
150 #echo "checks for $file in $path" >&2
151 if test -f "$path/$file"; then
152 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
153 if [ "yes" = "${winbuild}" ]; then
154 echo "$path/$file"
155 return
157 else
158 if [ "yes" != "${winbuild}" ]; then
159 echo "$path/$file"
160 return
164 done
167 # check for availability of sigaltstack to support our thread engine
168 check_sigaltstack() {
169 cat >$tmpdir/check_threads.c <<EOF
170 #include <signal.h>
171 int main(int argc, char **argv)
173 #define NULL (void*)0
174 sigaltstack(NULL, NULL);
175 return 0;
178 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 1> /dev/null
179 result=$?
180 rm -rf $tmpdir/check_threads*
181 echo $result
184 # check for availability of Fiber on Win32 to support our thread engine
185 check_fiber() {
186 cat >$tmpdir/check_threads.c <<EOF
187 #include <windows.h>
188 int main(int argc, char **argv)
190 ConvertThreadToFiber(NULL);
191 return 0;
194 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 2>/dev/null
195 result=$?
196 rm -rf $tmpdir/check_threads*
197 echo $result
200 simcc () {
202 # default tool setup for native building
203 prefixtools "$CROSS_COMPILE"
204 ARG_ARM_THUMB=0 # can't use thumb in native builds
206 app_type=$1
207 winbuild=""
208 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef// -e s/-O//`
209 GCCOPTS="$GCCOPTS -fno-builtin -g"
210 GCCOPTIMIZE=''
211 LDOPTS='-lm' # button-sdl.c uses sqrt()
212 sigaltstack=""
213 fibers=""
215 # default output binary name, don't override app_get_platform()
216 if [ "$app_type" != "sdl-app" ]; then
217 output="rockboxui"
220 # default share option, override below if needed
221 SHARED_FLAG="-shared"
223 if [ "$win32crosscompile" = "yes" ]; then
224 LDOPTS="$LDOPTS -mconsole"
225 output="$output.exe"
226 winbuild="yes"
227 else
228 case $uname in
229 CYGWIN*)
230 echo "Cygwin host detected"
232 fibers=`check_fiber`
233 LDOPTS="$LDOPTS -mconsole"
234 output="$output.exe"
235 winbuild="yes"
238 MINGW*)
239 echo "MinGW host detected"
241 fibers=`check_fiber`
242 LDOPTS="$LDOPTS -mconsole"
243 output="$output.exe"
244 winbuild="yes"
247 Linux)
248 sigaltstack=`check_sigaltstack`
249 echo "Linux host detected"
250 LDOPTS="$LDOPTS -ldl"
253 FreeBSD)
254 sigaltstack=`check_sigaltstack`
255 echo "FreeBSD host detected"
256 LDOPTS="$LDOPTS -ldl"
259 Darwin)
260 sigaltstack=`check_sigaltstack`
261 echo "Darwin host detected"
262 LDOPTS="$LDOPTS -ldl"
263 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
266 SunOS)
267 sigaltstack=`check_sigaltstack`
268 echo "*Solaris host detected"
270 GCCOPTS="$GCCOPTS -fPIC"
271 LDOPTS="$LDOPTS -ldl"
275 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
276 exit 1
278 esac
281 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
282 sdl=`findsdl $winbuild`
284 if [ -n `echo $app_type | grep "sdl"` ]; then
285 if [ -z "$sdl" ]; then
286 echo "configure didn't find sdl-config, which indicates that you"
287 echo "don't have SDL (properly) installed. Please correct and"
288 echo "re-run configure!"
289 exit 2
290 else
291 # generic sdl-config checker
292 GCCOPTS="$GCCOPTS `$sdl --cflags`"
293 LDOPTS="$LDOPTS `$sdl --libs`"
298 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
300 if test "X$win32crosscompile" != "Xyes"; then
301 case `uname -m` in
302 x86_64|amd64)
303 # fPIC is needed to make shared objects link
304 # setting visibility to hidden is necessary to avoid strange crashes
305 # due to symbol clashing
306 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
307 # x86_64 supports MMX by default
310 i686)
311 echo "Enabling MMX support"
312 GCCOPTS="$GCCOPTS -mmmx"
314 esac
316 id=$$
317 cat >$tmpdir/conftest-$id.c <<EOF
318 #include <stdio.h>
319 int main(int argc, char **argv)
321 int var=0;
322 char *varp = (char *)&var;
323 *varp=1;
325 printf("%d\n", var);
326 return 0;
330 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
332 # when cross compiling, the endianess cannot be detected because the above program doesn't run
333 # on the local machine. assume little endian but print a warning
334 endian=`$tmpdir/conftest-$id 2> /dev/null`
335 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
336 # big endian
337 endian="big"
338 else
339 # little endian
340 endian="little"
343 if [ "$CROSS_COMPILE" != "" ]; then
344 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
347 if [ "$app_type" = "sdl-sim" ]; then
348 echo "Simulator environment deemed $endian endian"
349 elif [ "$app_type" = "sdl-app" ]; then
350 echo "Application environment deemed $endian endian"
351 elif [ "$app_type" = "checkwps" ]; then
352 echo "CheckWPS environment deemed $endian endian"
355 # use wildcard here to make it work even if it was named *.exe like
356 # on cygwin
357 rm -f $tmpdir/conftest-$id*
358 else
359 # We are crosscompiling
360 # add cross-compiler option(s)
361 prefixtools i586-mingw32msvc-
362 LDOPTS="$LDOPTS -mconsole"
363 fibers=`check_fiber`
364 output="rockboxui.exe"
365 endian="little" # windows is little endian
366 echo "Enabling MMX support"
367 GCCOPTS="$GCCOPTS -mmmx"
370 thread_support=
371 if [ -z "$ARG_THREAD_SUPPORT" ] || [ "$ARG_THREAD_SUPPORT" = "0" ]; then
372 if [ "$sigaltstack" = "0" ]; then
373 thread_support="HAVE_SIGALTSTACK_THREADS"
374 echo "Selected sigaltstack threads"
375 elif [ "$fibers" = "0" ]; then
376 thread_support="HAVE_WIN32_FIBER_THREADS"
377 echo "Selected Win32 Fiber threads"
381 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
382 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
383 thread_support="HAVE_SDL_THREADS"
384 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
385 echo "Selected SDL threads"
386 else
387 echo "WARNING: Falling back to SDL threads"
393 # functions for setting up cross-compiler names and options
394 # also set endianess and what the exact recommended gcc version is
395 # the gcc version should most likely match what versions we build with
396 # rockboxdev.sh
398 shcc () {
399 prefixtools sh-elf-
400 GCCOPTS="$CCOPTS -m1"
401 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
402 endian="big"
403 gccchoice="4.0.3"
406 calmrisccc () {
407 prefixtools calmrisc16-unknown-elf-
408 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
409 GCCOPTIMIZE="-fomit-frame-pointer"
410 endian="big"
413 coldfirecc () {
414 prefixtools m68k-elf-
415 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
416 GCCOPTIMIZE="-fomit-frame-pointer"
417 endian="big"
418 gccchoice="4.5.2"
421 arm7tdmicc () {
422 findarmgcc
423 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
424 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
425 GCCOPTS="$GCCOPTS -mlong-calls"
427 GCCOPTIMIZE="-fomit-frame-pointer"
428 endian="little"
431 arm9tdmicc () {
432 findarmgcc
433 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
434 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
435 GCCOPTS="$GCCOPTS -mlong-calls"
437 GCCOPTIMIZE="-fomit-frame-pointer"
438 endian="little"
441 arm940tbecc () {
442 findarmgcc
443 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
444 if test "$ARG_ARM_EABI" = "0"; then
445 GCCOPTS="$GCCOPTS -mlong-calls"
447 GCCOPTIMIZE="-fomit-frame-pointer"
448 endian="big"
451 arm940tcc () {
452 findarmgcc
453 GCCOPTS="$CCOPTS -mcpu=arm940t"
454 if test "$ARG_ARM_EABI" = "0"; then
455 GCCOPTS="$GCCOPTS -mlong-calls"
457 GCCOPTIMIZE="-fomit-frame-pointer"
458 endian="little"
461 arm946cc () {
462 findarmgcc
463 GCCOPTS="$CCOPTS -mcpu=arm9e"
464 if test "$ARG_ARM_EABI" = "0"; then
465 GCCOPTS="$GCCOPTS -mlong-calls"
467 GCCOPTIMIZE="-fomit-frame-pointer"
468 endian="little"
471 arm926ejscc () {
472 findarmgcc
473 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
474 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
475 GCCOPTS="$GCCOPTS -mlong-calls"
477 GCCOPTIMIZE="-fomit-frame-pointer"
478 endian="little"
481 arm1136jfscc () {
482 findarmgcc
483 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
484 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
485 GCCOPTS="$GCCOPTS -mlong-calls"
487 GCCOPTIMIZE="-fomit-frame-pointer"
488 endian="little"
491 arm1176jzscc () {
492 findarmgcc
493 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
494 if test "$ARG_ARM_EABI" = "0"; then
495 GCCOPTS="$GCCOPTS -mlong-calls"
497 GCCOPTIMIZE="-fomit-frame-pointer"
498 endian="little"
501 mipselcc () {
502 prefixtools mipsel-elf-
503 # mips is predefined, but we want it for paths. use __mips instead
504 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
505 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
506 GCCOPTIMIZE="-fomit-frame-pointer"
507 endian="little"
508 gccchoice="4.1.2"
511 maemocc () {
512 # Scratchbox sets up "gcc" based on the active target
513 prefixtools ""
515 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
516 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
517 GCCOPTIMIZE=''
518 LDOPTS="-lm -ldl $LDOPTS"
519 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
520 SHARED_FLAG="-shared"
521 endian="little"
523 is_n900=0
524 # Determine maemo version
525 if pkg-config --atleast-version=5 maemo-version; then
526 if [ "$1" == "4" ]; then
527 echo "ERROR: Maemo 4 SDK required."
528 exit 1
530 extradefines="$extradefines -DMAEMO5"
531 echo "Found N900 maemo version"
532 is_n900=1
533 elif pkg-config --atleast-version=4 maemo-version; then
534 if [ "$1" == "5" ]; then
535 echo "ERROR: Maemo 5 SDK required."
536 exit 1
538 extradefines="$extradefines -DMAEMO4"
539 echo "Found N8xx maemo version"
540 else
541 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
542 exit 1
545 # SDL
546 if [ $is_n900 -eq 1 ]; then
547 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
548 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
549 else
550 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
551 LDOPTS="$LDOPTS `sdl-config --libs`"
554 # glib and libosso support
555 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
556 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
558 # libhal support: Battery monitoring
559 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
560 LDOPTS="$LDOPTS `pkg-config --libs hal`"
562 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
563 if [ $is_n900 -eq 1 ]; then
564 # gstreamer support: Audio output.
565 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
566 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
568 # N900 specific: libplayback support
569 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
570 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
572 # N900 specific: Enable ARMv7 NEON support
573 if sb-conf current |grep ARMEL; then
574 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
575 extradefines="$extradefines -DMAEMO_ARM_BUILD"
577 else
578 # N8xx specific: Enable armv5te instructions
579 if sb-conf current |grep ARMEL; then
580 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
581 extradefines="$extradefines -DMAEMO_ARM_BUILD"
586 androidcc () {
587 if [ -z "$ANDROID_SDK_PATH" ]; then
588 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
589 echo "environment variable point to the root directory of the Android SDK."
590 exit
592 if [ -z "$ANDROID_NDK_PATH" ]; then
593 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
594 echo "environment variable point to the root directory of the Android NDK."
595 exit
597 buildhost=`uname | tr [:upper:] [:lower:]`
598 gccchoice="4.4.3"
599 gcctarget="arm-linux-androideabi-"
600 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
601 PATH=$PATH:$gccprefix/bin
602 prefixtools $gcctarget
603 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
604 GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
605 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
606 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
607 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
608 LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog"
609 extradefines="$extradefines -DANDROID"
610 endian="little"
611 SHARED_FLAG="-shared"
614 whichadvanced () {
615 atype=`echo "$1" | cut -c 2-`
616 ##################################################################
617 # Prompt for specific developer options
619 if [ "$atype" ]; then
620 interact=
621 else
622 interact=1
623 echo ""
624 printf "Enter your developer options (press only enter when done)\n\
625 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
626 (T)est plugins, S(m)all C lib:"
627 if [ "$memory" = "2" ]; then
628 printf ", (8)MB MOD"
630 if [ "$modelname" = "archosplayer" ]; then
631 printf ", Use (A)TA poweroff"
633 if [ "$t_model" = "ondio" ]; then
634 printf ", (B)acklight MOD"
636 if [ "$modelname" = "iaudiom5" ]; then
637 printf ", (F)M radio MOD"
639 if [ "$modelname" = "iriverh120" ]; then
640 printf ", (R)TC MOD"
642 echo ""
645 cont=1
646 while [ $cont = "1" ]; do
648 if [ "$interact" ]; then
649 option=`input`
650 else
651 option=`echo "$atype" | cut -c 1`
654 case $option in
655 [Dd])
656 if [ "yes" = "$profile" ]; then
657 echo "Debug is incompatible with profiling"
658 else
659 echo "DEBUG build enabled"
660 use_debug="yes"
663 [Ll])
664 echo "logf() support enabled"
665 logf="yes"
667 [Mm])
668 echo "Using Rockbox' small C library"
669 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
671 [Tt])
672 echo "Including test plugins"
673 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
675 [Cc])
676 echo "bootchart enabled (logf also enabled)"
677 bootchart="yes"
678 logf="yes"
680 [Ss])
681 echo "Simulator build enabled"
682 simulator="yes"
684 [Pp])
685 if [ "yes" = "$use_debug" ]; then
686 echo "Profiling is incompatible with debug"
687 else
688 echo "Profiling support is enabled"
689 profile="yes"
692 [Vv])
693 echo "Voice build selected"
694 voice="yes"
697 if [ "$memory" = "2" ]; then
698 memory="8"
699 echo "Memory size selected: 8MB"
702 [Aa])
703 if [ "$modelname" = "archosplayer" ]; then
704 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
705 echo "ATA power off enabled"
708 [Bb])
709 if [ "$t_model" = "ondio" ]; then
710 have_backlight="#define HAVE_BACKLIGHT"
711 echo "Backlight functions enabled"
714 [Ff])
715 if [ "$modelname" = "iaudiom5" ]; then
716 have_fmradio_in="#define HAVE_FMRADIO_IN"
717 echo "FM radio functions enabled"
720 [Rr])
721 if [ "$modelname" = "iriverh120" ]; then
722 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
723 have_rtc_alarm="#define HAVE_RTC_ALARM"
724 echo "RTC functions enabled (DS1339/DS3231)"
727 [Ww])
728 echo "Enabling Windows 32 cross-compiling"
729 win32crosscompile="yes"
731 "") # Match enter press when finished with advanced options
732 cont=0
735 echo "[ERROR] Option $option unsupported"
737 esac
738 if [ "$interact" ]; then
739 btype="$btype$option"
740 else
741 atype=`echo "$atype" | cut -c 2-`
742 [ "$atype" ] || cont=0
744 done
745 echo "done"
747 if [ "yes" = "$voice" ]; then
748 # Ask about languages to build
749 picklang
750 voicelanguage=`whichlang`
751 echo "Voice language set to $voicelanguage"
753 # Configure encoder and TTS engine for each language
754 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
755 voiceconfig "$thislang"
756 done
758 if [ "yes" = "$use_debug" ]; then
759 debug="-DDEBUG"
760 GCCOPTS="$GCCOPTS -g -DDEBUG"
762 if [ "yes" = "$logf" ]; then
763 use_logf="#define ROCKBOX_HAS_LOGF 1"
765 if [ "yes" = "$bootchart" ]; then
766 use_bootchart="#define DO_BOOTCHART 1"
768 if [ "yes" = "$simulator" ]; then
769 debug="-DDEBUG"
770 extradefines="$extradefines -DSIMULATOR"
771 archosrom=""
772 flash=""
774 if [ "yes" = "$profile" ]; then
775 extradefines="$extradefines -DRB_PROFILE"
776 PROFILE_OPTS="-finstrument-functions"
780 # Configure voice settings
781 voiceconfig () {
782 thislang=$1
783 if [ ! "$ARG_TTS" ]; then
784 echo "Building $thislang voice for $modelname. Select options"
785 echo ""
788 if [ -n "`findtool flite`" ]; then
789 FLITE="F(l)ite "
790 FLITE_OPTS=""
791 DEFAULT_TTS="flite"
792 DEFAULT_TTS_OPTS=$FLITE_OPTS
793 DEFAULT_NOISEFLOOR="500"
794 DEFAULT_CHOICE="L"
796 if [ -n "`findtool espeak`" ]; then
797 ESPEAK="(e)Speak "
798 ESPEAK_OPTS=""
799 DEFAULT_TTS="espeak"
800 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
801 DEFAULT_NOISEFLOOR="500"
802 DEFAULT_CHOICE="e"
804 if [ -n "`findtool festival`" ]; then
805 FESTIVAL="(F)estival "
806 case "$thislang" in
807 "italiano")
808 FESTIVAL_OPTS="--language italian"
810 "espanol")
811 FESTIVAL_OPTS="--language spanish"
813 "finnish")
814 FESTIVAL_OPTS="--language finnish"
816 "czech")
817 FESTIVAL_OPTS="--language czech"
820 FESTIVAL_OPTS=""
822 esac
823 DEFAULT_TTS="festival"
824 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
825 DEFAULT_NOISEFLOOR="500"
826 DEFAULT_CHOICE="F"
828 if [ -n "`findtool swift`" ]; then
829 SWIFT="S(w)ift "
830 SWIFT_OPTS=""
831 DEFAULT_TTS="swift"
832 DEFAULT_TTS_OPTS=$SWIFT_OPTS
833 DEFAULT_NOISEFLOOR="500"
834 DEFAULT_CHOICE="w"
836 # Allow SAPI if Windows is in use
837 if [ -n "`findtool winver`" ]; then
838 SAPI="(S)API "
839 SAPI_OPTS=""
840 DEFAULT_TTS="sapi"
841 DEFAULT_TTS_OPTS=$SAPI_OPTS
842 DEFAULT_NOISEFLOOR="500"
843 DEFAULT_CHOICE="S"
846 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
847 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
848 exit 3
851 if [ "$ARG_TTS" ]; then
852 option=$ARG_TTS
853 else
854 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
855 option=`input`
857 advopts="$advopts --tts=$option"
858 case "$option" in
859 [Ll])
860 TTS_ENGINE="flite"
861 NOISEFLOOR="500" # TODO: check this value
862 TTS_OPTS=$FLITE_OPTS
864 [Ee])
865 TTS_ENGINE="espeak"
866 NOISEFLOOR="500"
867 TTS_OPTS=$ESPEAK_OPTS
869 [Ff])
870 TTS_ENGINE="festival"
871 NOISEFLOOR="500"
872 TTS_OPTS=$FESTIVAL_OPTS
874 [Ss])
875 TTS_ENGINE="sapi"
876 NOISEFLOOR="500"
877 TTS_OPTS=$SAPI_OPTS
879 [Ww])
880 TTS_ENGINE="swift"
881 NOISEFLOOR="500"
882 TTS_OPTS=$SWIFT_OPTS
885 TTS_ENGINE=$DEFAULT_TTS
886 TTS_OPTS=$DEFAULT_TTS_OPTS
887 NOISEFLOOR=$DEFAULT_NOISEFLOOR
888 esac
889 echo "Using $TTS_ENGINE for TTS"
891 # Select which voice to use for Festival
892 if [ "$TTS_ENGINE" = "festival" ]; then
893 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
894 for voice in $voicelist; do
895 TTS_FESTIVAL_VOICE="$voice" # Default choice
896 break
897 done
898 if [ "$ARG_VOICE" ]; then
899 CHOICE=$ARG_VOICE
900 else
902 for voice in $voicelist; do
903 printf "%3d. %s\n" "$i" "$voice"
904 i=`expr $i + 1`
905 done
906 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
907 CHOICE=`input`
910 for voice in $voicelist; do
911 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
912 TTS_FESTIVAL_VOICE="$voice"
914 i=`expr $i + 1`
915 done
916 advopts="$advopts --voice=$CHOICE"
917 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
918 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
921 # Read custom tts options from command line
922 if [ "$ARG_TTSOPTS" ]; then
923 TTS_OPTS="$ARG_TTSOPTS"
924 advopts="$advopts --ttsopts='$TTS_OPTS'"
925 echo "$TTS_ENGINE options set to $TTS_OPTS"
928 if [ "$swcodec" = "yes" ]; then
929 ENCODER="rbspeexenc"
930 ENC_CMD="rbspeexenc"
931 ENC_OPTS="-q 4 -c 10"
932 else
933 if [ -n "`findtool lame`" ]; then
934 ENCODER="lame"
935 ENC_CMD="lame"
936 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
937 else
938 echo "You need LAME in the system path to build voice files for"
939 echo "HWCODEC targets."
940 exit 4
944 echo "Using $ENCODER for encoding voice clips"
946 # Read custom encoder options from command line
947 if [ "$ARG_ENCOPTS" ]; then
948 ENC_OPTS="$ARG_ENCOPTS"
949 advopts="$advopts --encopts='$ENC_OPTS'"
950 echo "$ENCODER options set to $ENC_OPTS"
953 TEMPDIR="${pwd}"
954 if [ -n "`findtool cygpath`" ]; then
955 TEMPDIR=`cygpath . -a -w`
959 picklang() {
960 # figure out which languages that are around
961 for file in $rootdir/apps/lang/*.lang; do
962 clean=`basename $file .lang`
963 langs="$langs $clean"
964 done
966 if [ "$ARG_LANG" ]; then
967 pick=$ARG_LANG
968 else
969 echo "Select a number for the language to use (default is english)"
970 # FIXME The multiple-language feature is currently broken
971 # echo "You may enter a comma-separated list of languages to build"
973 num=1
974 for one in $langs; do
975 echo "$num. $one"
976 num=`expr $num + 1`
977 done
978 pick=`input`
980 advopts="$advopts --language=$pick"
983 whichlang() {
984 output=""
985 # Allow the user to pass a comma-separated list of langauges
986 for thispick in `echo $pick | sed 's/,/ /g'`; do
987 num=1
988 for one in $langs; do
989 # Accept both the language number and name
990 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
991 if [ "$output" = "" ]; then
992 output=$one
993 else
994 output=$output,$one
997 num=`expr $num + 1`
998 done
999 done
1000 if [ -z "$output" ]; then
1001 # pick a default
1002 output="english"
1004 echo $output
1007 help() {
1008 echo "Rockbox configure script."
1009 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1010 echo "Do *NOT* run this within the tools directory!"
1011 echo ""
1012 cat <<EOF
1013 Usage: configure [OPTION]...
1014 Options:
1015 --target=TARGET Sets the target, TARGET can be either the target ID or
1016 corresponding string. Run without this option to see all
1017 available targets.
1019 --ram=RAM Sets the RAM for certain targets. Even though any number
1020 is accepted, not every number is correct. The default
1021 value will be applied, if you entered a wrong number
1022 (which depends on the target). Watch the output. Run
1023 without this option if you are not sure which the right
1024 number is.
1026 --type=TYPE Sets the build type. Shortcuts are also valid.
1027 Run without this option to see all available types.
1028 Multiple values are allowed and managed in the input
1029 order. So --type=b stands for Bootloader build, while
1030 --type=ab stands for "Backlight MOD" build.
1032 --language=LANG Set the language used for voice generation (used only if
1033 TYPE is AV).
1035 --tts=ENGINE Set the TTS engine used for voice generation (used only
1036 if TYPE is AV).
1038 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1039 AV).
1041 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1043 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1045 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1046 This is useful for having multiple alternate builds on
1047 your device that you can load with ROLO. However as the
1048 bootloader looks for .rockbox you won't be able to boot
1049 into this build.
1051 --ccache Enable ccache use (done by default these days)
1052 --no-ccache Disable ccache use
1054 --eabi Make configure prefer toolchains that are able to compile
1055 for the new ARM standard abi EABI
1056 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1057 --thumb Build with -mthumb (for ARM builds)
1058 --no-thumb The opposite of --thumb (don't use thumb even for targets
1059 where this is the default
1060 --sdl-threads Force use of SDL threads. They have inferior performance,
1061 but are better debuggable with GDB
1062 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1063 behavior of falling back to them if no native thread
1064 support was found.
1065 --prefix Target installation directory
1066 --help Shows this message (must not be used with other options)
1070 exit
1073 ARG_CCACHE=
1074 ARG_ENCOPTS=
1075 ARG_LANG=
1076 ARG_RAM=
1077 ARG_RBDIR=
1078 ARG_TARGET=
1079 ARG_TTS=
1080 ARG_TTSOPTS=
1081 ARG_TYPE=
1082 ARG_VOICE=
1083 ARG_ARM_EABI=
1084 ARG_ARM_THUMB=
1085 ARG_PREFIX="$PREFIX"
1086 ARG_THREAD_SUPPORT=
1087 err=
1088 for arg in "$@"; do
1089 case "$arg" in
1090 --ccache) ARG_CCACHE=1;;
1091 --no-ccache) ARG_CCACHE=0;;
1092 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1093 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
1094 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1095 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
1096 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1097 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1098 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1099 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1100 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1101 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1102 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
1103 --eabi) ARG_ARM_EABI=1;;
1104 --no-eabi) ARG_ARM_EABI=0;;
1105 --thumb) ARG_ARM_THUMB=1;;
1106 --no-thumb) ARG_ARM_THUMB=0;;
1107 --sdl-threads)ARG_THREAD_SUPPORT=1;;
1108 --no-sdl-threads)
1109 ARG_THREAD_SUPPORT=0;;
1110 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
1111 --help) help;;
1112 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1113 esac
1114 done
1115 [ "$err" ] && exit 1
1117 advopts=
1119 if [ "$TMPDIR" != "" ]; then
1120 tmpdir=$TMPDIR
1121 else
1122 tmpdir=/tmp
1124 echo Using temporary directory $tmpdir
1126 if test -r "configure"; then
1127 # this is a check for a configure script in the current directory, it there
1128 # is one, try to figure out if it is this one!
1130 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1131 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1132 echo "It will only cause you pain and grief. Instead do this:"
1133 echo ""
1134 echo " cd .."
1135 echo " mkdir build-dir"
1136 echo " cd build-dir"
1137 echo " ../tools/configure"
1138 echo ""
1139 echo "Much happiness will arise from this. Enjoy"
1140 exit 5
1144 # get our current directory
1145 pwd=`pwd`;
1147 if { echo $pwd | grep " "; } then
1148 echo "You're running this script in a path that contains space. The build"
1149 echo "system is unfortunately not clever enough to deal with this. Please"
1150 echo "run the script from a different path, rename the path or fix the build"
1151 echo "system!"
1152 exit 6
1155 if [ -z "$rootdir" ]; then
1156 ##################################################################
1157 # Figure out where the source code root is!
1159 rootdir=`dirname $0`/../
1161 #####################################################################
1162 # Convert the possibly relative directory name to an absolute version
1164 now=`pwd`
1165 cd $rootdir
1166 rootdir=`pwd`
1168 # cd back to the build dir
1169 cd $now
1172 apps="apps"
1173 appsdir='\$(ROOTDIR)/apps'
1174 firmdir='\$(ROOTDIR)/firmware'
1175 toolsdir='\$(ROOTDIR)/tools'
1178 ##################################################################
1179 # Figure out target platform
1182 if [ "$ARG_TARGET" ]; then
1183 buildfor=$ARG_TARGET
1184 else
1185 echo "Enter target platform:"
1186 cat <<EOF
1187 ==Archos== ==iriver== ==Apple iPod==
1188 0) Player/Studio 10) H120/H140 20) Color/Photo
1189 1) Recorder 11) H320/H340 21) Nano 1G
1190 2) FM Recorder 12) iHP-100/110/115 22) Video
1191 3) Recorder v2 13) iFP-790 23) 3G
1192 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1193 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1194 6) AV300 26) Mini 2G
1195 ==Toshiba== 27) 1G, 2G
1196 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1197 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1198 31) M5/M5L
1199 32) 7 ==Olympus= ==SanDisk==
1200 33) D2 70) M:Robe 500 50) Sansa e200
1201 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1202 52) Sansa c200
1203 ==Creative== ==Philips== 53) Sansa m200
1204 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1205 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1206 92) Zen Vision HDD1830 56) Sansa e200v2
1207 102) GoGear HDD6330 57) Sansa m200v4
1208 ==Onda== 58) Sansa Fuze
1209 120) VX747 ==Meizu== 59) Sansa c200v2
1210 121) VX767 110) M6SL 60) Sansa Clipv2
1211 122) VX747+ 111) M6SP 61) Sansa View
1212 123) VX777 112) M3 62) Sansa Clip+
1213 63) Sansa Fuze v2
1214 ==Samsung== ==Tatung==
1215 140) YH-820 150) Elio TPJ-1022 ==Logik==
1216 141) YH-920 80) DAX 1GB MP3/DAB
1217 142) YH-925 ==Packard Bell==
1218 143) YP-S3 160) Vibe 500 ==Lyre project==
1219 130) Lyre proto 1
1220 ==Application== ==MPIO== 131) Mini2440
1221 200) SDL 170) HD200
1222 201) Android 171) HD300
1223 202) Nokia N8xx
1224 203) Nokia N900
1228 buildfor=`input`;
1231 # Set of tools built for all target platforms:
1232 toolset="rdf2binary convbdf codepages"
1234 # Toolsets for some target families:
1235 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1236 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1237 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1238 ipodbitmaptools="$toolset scramble bmp2rb"
1239 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1240 tccbitmaptools="$toolset scramble bmp2rb"
1241 # generic is used by IFP, Meizu and Onda
1242 genericbitmaptools="$toolset bmp2rb"
1243 # scramble is used by all other targets
1244 scramblebitmaptools="$genericbitmaptools scramble"
1247 # ---- For each target ----
1249 # *Variables*
1250 # target_id: a unique number identifying this target, IS NOT the menu number.
1251 # Just use the currently highest number+1 when you add a new
1252 # target.
1253 # modelname: short model name used all over to identify this target
1254 # memory: number of megabytes of RAM this target has. If the amount can
1255 # be selected by the size prompt, let memory be unset here
1256 # target: -Ddefine passed to the build commands to make the correct
1257 # config-*.h file get included etc
1258 # tool: the tool that takes a plain binary and converts that into a
1259 # working "firmware" file for your target
1260 # output: the final output file name
1261 # boottool: the tool that takes a plain binary and generates a bootloader
1262 # file for your target (or blank to use $tool)
1263 # bootoutput:the final output file name for the bootloader (or blank to use
1264 # $output)
1265 # appextra: passed to the APPEXTRA variable in the Makefiles.
1266 # TODO: add proper explanation
1267 # archosrom: used only for Archos targets that build a special flashable .ucl
1268 # image.
1269 # flash: name of output for flashing, for targets where there's a special
1270 # file output for this.
1271 # plugins: set to 'yes' to build the plugins. Early development builds can
1272 # set this to no in the early stages to have an easier life for a
1273 # while
1274 # swcodec: set 'yes' on swcodec targets
1275 # toolset: lists what particular tools in the tools/ directory that this
1276 # target needs to have built prior to building Rockbox
1278 # *Functions*
1279 # *cc: sets up gcc and compiler options for your target builds. Note
1280 # that if you select a simulator build, the compiler selection is
1281 # overridden later in the script.
1283 case $buildfor in
1285 0|archosplayer)
1286 target_id=1
1287 modelname="archosplayer"
1288 target="-DARCHOS_PLAYER"
1289 shcc
1290 tool="$rootdir/tools/scramble"
1291 output="archos.mod"
1292 appextra="player:gui"
1293 archosrom="$pwd/rombox.ucl"
1294 flash="$pwd/rockbox.ucl"
1295 plugins="yes"
1296 swcodec=""
1298 # toolset is the tools within the tools directory that we build for
1299 # this particular target.
1300 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1302 # Note: the convbdf is present in the toolset just because: 1) the
1303 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1304 # build the player simulator
1306 t_cpu="sh"
1307 t_manufacturer="archos"
1308 t_model="player"
1311 1|archosrecorder)
1312 target_id=2
1313 modelname="archosrecorder"
1314 target="-DARCHOS_RECORDER"
1315 shcc
1316 tool="$rootdir/tools/scramble"
1317 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1318 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1319 output="ajbrec.ajz"
1320 appextra="recorder:gui:radio"
1321 #archosrom="$pwd/rombox.ucl"
1322 flash="$pwd/rockbox.ucl"
1323 plugins="yes"
1324 swcodec=""
1325 # toolset is the tools within the tools directory that we build for
1326 # this particular target.
1327 toolset=$archosbitmaptools
1328 t_cpu="sh"
1329 t_manufacturer="archos"
1330 t_model="recorder"
1333 2|archosfmrecorder)
1334 target_id=3
1335 modelname="archosfmrecorder"
1336 target="-DARCHOS_FMRECORDER"
1337 shcc
1338 tool="$rootdir/tools/scramble -fm"
1339 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1340 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1341 output="ajbrec.ajz"
1342 appextra="recorder:gui:radio"
1343 #archosrom="$pwd/rombox.ucl"
1344 flash="$pwd/rockbox.ucl"
1345 plugins="yes"
1346 swcodec=""
1347 # toolset is the tools within the tools directory that we build for
1348 # this particular target.
1349 toolset=$archosbitmaptools
1350 t_cpu="sh"
1351 t_manufacturer="archos"
1352 t_model="fm_v2"
1355 3|archosrecorderv2)
1356 target_id=4
1357 modelname="archosrecorderv2"
1358 target="-DARCHOS_RECORDERV2"
1359 shcc
1360 tool="$rootdir/tools/scramble -v2"
1361 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1362 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1363 output="ajbrec.ajz"
1364 appextra="recorder:gui:radio"
1365 #archosrom="$pwd/rombox.ucl"
1366 flash="$pwd/rockbox.ucl"
1367 plugins="yes"
1368 swcodec=""
1369 # toolset is the tools within the tools directory that we build for
1370 # this particular target.
1371 toolset=$archosbitmaptools
1372 t_cpu="sh"
1373 t_manufacturer="archos"
1374 t_model="fm_v2"
1377 4|archosondiosp)
1378 target_id=7
1379 modelname="archosondiosp"
1380 target="-DARCHOS_ONDIOSP"
1381 shcc
1382 tool="$rootdir/tools/scramble -osp"
1383 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1384 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1385 output="ajbrec.ajz"
1386 appextra="recorder:gui:radio"
1387 #archosrom="$pwd/rombox.ucl"
1388 flash="$pwd/rockbox.ucl"
1389 plugins="yes"
1390 swcodec=""
1391 # toolset is the tools within the tools directory that we build for
1392 # this particular target.
1393 toolset=$archosbitmaptools
1394 t_cpu="sh"
1395 t_manufacturer="archos"
1396 t_model="ondio"
1399 5|archosondiofm)
1400 target_id=8
1401 modelname="archosondiofm"
1402 target="-DARCHOS_ONDIOFM"
1403 shcc
1404 tool="$rootdir/tools/scramble -ofm"
1405 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1406 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1407 output="ajbrec.ajz"
1408 appextra="recorder:gui:radio"
1409 #archosrom="$pwd/rombox.ucl"
1410 flash="$pwd/rockbox.ucl"
1411 plugins="yes"
1412 swcodec=""
1413 toolset=$archosbitmaptools
1414 t_cpu="sh"
1415 t_manufacturer="archos"
1416 t_model="ondio"
1419 6|archosav300)
1420 target_id=38
1421 modelname="archosav300"
1422 target="-DARCHOS_AV300"
1423 memory=16 # always
1424 arm7tdmicc
1425 tool="$rootdir/tools/scramble -mm=C"
1426 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1427 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1428 output="cjbm.ajz"
1429 appextra="recorder:gui:radio"
1430 plugins="yes"
1431 swcodec=""
1432 # toolset is the tools within the tools directory that we build for
1433 # this particular target.
1434 toolset="$toolset scramble descramble bmp2rb"
1435 # architecture, manufacturer and model for the target-tree build
1436 t_cpu="arm"
1437 t_manufacturer="archos"
1438 t_model="av300"
1441 10|iriverh120)
1442 target_id=9
1443 modelname="iriverh120"
1444 target="-DIRIVER_H120"
1445 memory=32 # always
1446 coldfirecc
1447 tool="$rootdir/tools/scramble -add=h120"
1448 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1449 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1450 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1451 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1452 output="rockbox.iriver"
1453 bootoutput="bootloader.iriver"
1454 appextra="recorder:gui:radio"
1455 flash="$pwd/rombox.iriver"
1456 plugins="yes"
1457 swcodec="yes"
1458 # toolset is the tools within the tools directory that we build for
1459 # this particular target.
1460 toolset=$iriverbitmaptools
1461 t_cpu="coldfire"
1462 t_manufacturer="iriver"
1463 t_model="h100"
1466 11|iriverh300)
1467 target_id=10
1468 modelname="iriverh300"
1469 target="-DIRIVER_H300"
1470 memory=32 # always
1471 coldfirecc
1472 tool="$rootdir/tools/scramble -add=h300"
1473 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1474 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1475 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1476 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1477 output="rockbox.iriver"
1478 appextra="recorder:gui:radio"
1479 plugins="yes"
1480 swcodec="yes"
1481 # toolset is the tools within the tools directory that we build for
1482 # this particular target.
1483 toolset=$iriverbitmaptools
1484 t_cpu="coldfire"
1485 t_manufacturer="iriver"
1486 t_model="h300"
1489 12|iriverh100)
1490 target_id=11
1491 modelname="iriverh100"
1492 target="-DIRIVER_H100"
1493 memory=16 # always
1494 coldfirecc
1495 tool="$rootdir/tools/scramble -add=h100"
1496 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1497 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1498 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1499 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1500 output="rockbox.iriver"
1501 bootoutput="bootloader.iriver"
1502 appextra="recorder:gui:radio"
1503 flash="$pwd/rombox.iriver"
1504 plugins="yes"
1505 swcodec="yes"
1506 # toolset is the tools within the tools directory that we build for
1507 # this particular target.
1508 toolset=$iriverbitmaptools
1509 t_cpu="coldfire"
1510 t_manufacturer="iriver"
1511 t_model="h100"
1514 13|iriverifp7xx)
1515 target_id=19
1516 modelname="iriverifp7xx"
1517 target="-DIRIVER_IFP7XX"
1518 memory=1
1519 arm7tdmicc short
1520 tool="cp"
1521 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1522 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1523 output="rockbox.wma"
1524 appextra="recorder:gui:radio"
1525 plugins="yes"
1526 swcodec="yes"
1527 # toolset is the tools within the tools directory that we build for
1528 # this particular target.
1529 toolset=$genericbitmaptools
1530 t_cpu="arm"
1531 t_manufacturer="pnx0101"
1532 t_model="iriver-ifp7xx"
1535 14|iriverh10)
1536 target_id=22
1537 modelname="iriverh10"
1538 target="-DIRIVER_H10"
1539 memory=32 # always
1540 arm7tdmicc
1541 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1542 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1543 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1544 output="rockbox.mi4"
1545 appextra="recorder:gui:radio"
1546 plugins="yes"
1547 swcodec="yes"
1548 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1549 bootoutput="H10_20GC.mi4"
1550 # toolset is the tools within the tools directory that we build for
1551 # this particular target.
1552 toolset=$scramblebitmaptools
1553 # architecture, manufacturer and model for the target-tree build
1554 t_cpu="arm"
1555 t_manufacturer="iriver"
1556 t_model="h10"
1559 15|iriverh10_5gb)
1560 target_id=24
1561 modelname="iriverh10_5gb"
1562 target="-DIRIVER_H10_5GB"
1563 memory=32 # always
1564 arm7tdmicc
1565 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1566 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1567 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1568 output="rockbox.mi4"
1569 appextra="recorder:gui:radio"
1570 plugins="yes"
1571 swcodec="yes"
1572 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1573 bootoutput="H10.mi4"
1574 # toolset is the tools within the tools directory that we build for
1575 # this particular target.
1576 toolset=$scramblebitmaptools
1577 # architecture, manufacturer and model for the target-tree build
1578 t_cpu="arm"
1579 t_manufacturer="iriver"
1580 t_model="h10"
1583 20|ipodcolor)
1584 target_id=13
1585 modelname="ipodcolor"
1586 target="-DIPOD_COLOR"
1587 memory=32 # always
1588 arm7tdmicc
1589 tool="$rootdir/tools/scramble -add=ipco"
1590 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1591 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1592 output="rockbox.ipod"
1593 appextra="recorder:gui:radio"
1594 plugins="yes"
1595 swcodec="yes"
1596 bootoutput="bootloader-$modelname.ipod"
1597 # toolset is the tools within the tools directory that we build for
1598 # this particular target.
1599 toolset=$ipodbitmaptools
1600 # architecture, manufacturer and model for the target-tree build
1601 t_cpu="arm"
1602 t_manufacturer="ipod"
1603 t_model="color"
1606 21|ipodnano1g)
1607 target_id=14
1608 modelname="ipodnano1g"
1609 target="-DIPOD_NANO"
1610 memory=32 # always
1611 arm7tdmicc
1612 tool="$rootdir/tools/scramble -add=nano"
1613 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1614 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1615 output="rockbox.ipod"
1616 appextra="recorder:gui:radio"
1617 plugins="yes"
1618 swcodec="yes"
1619 bootoutput="bootloader-$modelname.ipod"
1620 # toolset is the tools within the tools directory that we build for
1621 # this particular target.
1622 toolset=$ipodbitmaptools
1623 # architecture, manufacturer and model for the target-tree build
1624 t_cpu="arm"
1625 t_manufacturer="ipod"
1626 t_model="nano"
1629 22|ipodvideo)
1630 target_id=15
1631 modelname="ipodvideo"
1632 target="-DIPOD_VIDEO"
1633 memory=64 # always. This is reduced at runtime if needed
1634 arm7tdmicc
1635 tool="$rootdir/tools/scramble -add=ipvd"
1636 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1637 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1638 output="rockbox.ipod"
1639 appextra="recorder:gui:radio"
1640 plugins="yes"
1641 swcodec="yes"
1642 bootoutput="bootloader-$modelname.ipod"
1643 # toolset is the tools within the tools directory that we build for
1644 # this particular target.
1645 toolset=$ipodbitmaptools
1646 # architecture, manufacturer and model for the target-tree build
1647 t_cpu="arm"
1648 t_manufacturer="ipod"
1649 t_model="video"
1652 23|ipod3g)
1653 target_id=16
1654 modelname="ipod3g"
1655 target="-DIPOD_3G"
1656 memory=32 # always
1657 arm7tdmicc
1658 tool="$rootdir/tools/scramble -add=ip3g"
1659 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1660 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1661 output="rockbox.ipod"
1662 appextra="recorder:gui:radio"
1663 plugins="yes"
1664 swcodec="yes"
1665 bootoutput="bootloader-$modelname.ipod"
1666 # toolset is the tools within the tools directory that we build for
1667 # this particular target.
1668 toolset=$ipodbitmaptools
1669 # architecture, manufacturer and model for the target-tree build
1670 t_cpu="arm"
1671 t_manufacturer="ipod"
1672 t_model="3g"
1675 24|ipod4g)
1676 target_id=17
1677 modelname="ipod4g"
1678 target="-DIPOD_4G"
1679 memory=32 # always
1680 arm7tdmicc
1681 tool="$rootdir/tools/scramble -add=ip4g"
1682 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1683 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1684 output="rockbox.ipod"
1685 appextra="recorder:gui:radio"
1686 plugins="yes"
1687 swcodec="yes"
1688 bootoutput="bootloader-$modelname.ipod"
1689 # toolset is the tools within the tools directory that we build for
1690 # this particular target.
1691 toolset=$ipodbitmaptools
1692 # architecture, manufacturer and model for the target-tree build
1693 t_cpu="arm"
1694 t_manufacturer="ipod"
1695 t_model="4g"
1698 25|ipodmini1g)
1699 target_id=18
1700 modelname="ipodmini1g"
1701 target="-DIPOD_MINI"
1702 memory=32 # always
1703 arm7tdmicc
1704 tool="$rootdir/tools/scramble -add=mini"
1705 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1706 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1707 output="rockbox.ipod"
1708 appextra="recorder:gui:radio"
1709 plugins="yes"
1710 swcodec="yes"
1711 bootoutput="bootloader-$modelname.ipod"
1712 # toolset is the tools within the tools directory that we build for
1713 # this particular target.
1714 toolset=$ipodbitmaptools
1715 # architecture, manufacturer and model for the target-tree build
1716 t_cpu="arm"
1717 t_manufacturer="ipod"
1718 t_model="mini"
1721 26|ipodmini2g)
1722 target_id=21
1723 modelname="ipodmini2g"
1724 target="-DIPOD_MINI2G"
1725 memory=32 # always
1726 arm7tdmicc
1727 tool="$rootdir/tools/scramble -add=mn2g"
1728 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1729 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1730 output="rockbox.ipod"
1731 appextra="recorder:gui:radio"
1732 plugins="yes"
1733 swcodec="yes"
1734 bootoutput="bootloader-$modelname.ipod"
1735 # toolset is the tools within the tools directory that we build for
1736 # this particular target.
1737 toolset=$ipodbitmaptools
1738 # architecture, manufacturer and model for the target-tree build
1739 t_cpu="arm"
1740 t_manufacturer="ipod"
1741 t_model="mini2g"
1744 27|ipod1g2g)
1745 target_id=29
1746 modelname="ipod1g2g"
1747 target="-DIPOD_1G2G"
1748 memory=32 # always
1749 arm7tdmicc
1750 tool="$rootdir/tools/scramble -add=1g2g"
1751 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1752 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1753 output="rockbox.ipod"
1754 appextra="recorder:gui:radio"
1755 plugins="yes"
1756 swcodec="yes"
1757 bootoutput="bootloader-$modelname.ipod"
1758 # toolset is the tools within the tools directory that we build for
1759 # this particular target.
1760 toolset=$ipodbitmaptools
1761 # architecture, manufacturer and model for the target-tree build
1762 t_cpu="arm"
1763 t_manufacturer="ipod"
1764 t_model="1g2g"
1767 28|ipodnano2g)
1768 target_id=62
1769 modelname="ipodnano2g"
1770 target="-DIPOD_NANO2G"
1771 memory=32 # always
1772 arm940tcc
1773 tool="$rootdir/tools/scramble -add=nn2g"
1774 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1775 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1776 output="rockbox.ipod"
1777 appextra="recorder:gui:radio"
1778 plugins="yes"
1779 swcodec="yes"
1780 bootoutput="bootloader-$modelname.ipod"
1781 # toolset is the tools within the tools directory that we build for
1782 # this particular target.
1783 toolset=$ipodbitmaptools
1784 # architecture, manufacturer and model for the target-tree build
1785 t_cpu="arm"
1786 t_manufacturer="s5l8700"
1787 t_model="ipodnano2g"
1790 29|ipod6g)
1791 target_id=71
1792 modelname="ipod6g"
1793 target="-DIPOD_6G"
1794 memory=64 # always
1795 arm926ejscc
1796 tool="$rootdir/tools/scramble -add=ip6g"
1797 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1798 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1799 output="rockbox.ipod"
1800 appextra="recorder:gui:radio"
1801 plugins="yes"
1802 swcodec="yes"
1803 bootoutput="bootloader-$modelname.ipod"
1804 # toolset is the tools within the tools directory that we build for
1805 # this particular target.
1806 toolset=$ipodbitmaptools
1807 # architecture, manufacturer and model for the target-tree build
1808 t_cpu="arm"
1809 t_manufacturer="s5l8702"
1810 t_model="ipod6g"
1813 30|iaudiox5)
1814 target_id=12
1815 modelname="iaudiox5"
1816 target="-DIAUDIO_X5"
1817 memory=16 # always
1818 coldfirecc
1819 tool="$rootdir/tools/scramble -add=iax5"
1820 boottool="$rootdir/tools/scramble -iaudiox5"
1821 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1822 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1823 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1824 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1825 output="rockbox.iaudio"
1826 bootoutput="x5_fw.bin"
1827 appextra="recorder:gui:radio"
1828 plugins="yes"
1829 swcodec="yes"
1830 # toolset is the tools within the tools directory that we build for
1831 # this particular target.
1832 toolset="$iaudiobitmaptools"
1833 # architecture, manufacturer and model for the target-tree build
1834 t_cpu="coldfire"
1835 t_manufacturer="iaudio"
1836 t_model="x5"
1839 31|iaudiom5)
1840 target_id=28
1841 modelname="iaudiom5"
1842 target="-DIAUDIO_M5"
1843 memory=16 # always
1844 coldfirecc
1845 tool="$rootdir/tools/scramble -add=iam5"
1846 boottool="$rootdir/tools/scramble -iaudiom5"
1847 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1848 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1849 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1850 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1851 output="rockbox.iaudio"
1852 bootoutput="m5_fw.bin"
1853 appextra="recorder:gui:radio"
1854 plugins="yes"
1855 swcodec="yes"
1856 # toolset is the tools within the tools directory that we build for
1857 # this particular target.
1858 toolset="$iaudiobitmaptools"
1859 # architecture, manufacturer and model for the target-tree build
1860 t_cpu="coldfire"
1861 t_manufacturer="iaudio"
1862 t_model="m5"
1865 32|iaudio7)
1866 target_id=32
1867 modelname="iaudio7"
1868 target="-DIAUDIO_7"
1869 memory=16 # always
1870 arm946cc
1871 tool="$rootdir/tools/scramble -add=i7"
1872 boottool="$rootdir/tools/scramble -tcc=crc"
1873 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1874 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1875 output="rockbox.iaudio"
1876 appextra="recorder:gui:radio"
1877 plugins="yes"
1878 swcodec="yes"
1879 bootoutput="I7_FW.BIN"
1880 # toolset is the tools within the tools directory that we build for
1881 # this particular target.
1882 toolset="$tccbitmaptools"
1883 # architecture, manufacturer and model for the target-tree build
1884 t_cpu="arm"
1885 t_manufacturer="tcc77x"
1886 t_model="iaudio7"
1889 33|cowond2)
1890 target_id=34
1891 modelname="cowond2"
1892 target="-DCOWON_D2"
1893 memory=32
1894 arm926ejscc
1895 tool="$rootdir/tools/scramble -add=d2"
1896 boottool="cp "
1897 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1898 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1899 output="rockbox.d2"
1900 bootoutput="bootloader-cowond2.bin"
1901 appextra="recorder:gui:radio"
1902 plugins="yes"
1903 swcodec="yes"
1904 toolset="$tccbitmaptools"
1905 # architecture, manufacturer and model for the target-tree build
1906 t_cpu="arm"
1907 t_manufacturer="tcc780x"
1908 t_model="cowond2"
1911 34|iaudiom3)
1912 target_id=37
1913 modelname="iaudiom3"
1914 target="-DIAUDIO_M3"
1915 memory=16 # always
1916 coldfirecc
1917 tool="$rootdir/tools/scramble -add=iam3"
1918 boottool="$rootdir/tools/scramble -iaudiom3"
1919 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1920 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1921 output="rockbox.iaudio"
1922 bootoutput="cowon_m3.bin"
1923 appextra="recorder:gui:radio"
1924 plugins="yes"
1925 swcodec="yes"
1926 # toolset is the tools within the tools directory that we build for
1927 # this particular target.
1928 toolset="$iaudiobitmaptools"
1929 # architecture, manufacturer and model for the target-tree build
1930 t_cpu="coldfire"
1931 t_manufacturer="iaudio"
1932 t_model="m3"
1935 40|gigabeatfx)
1936 target_id=20
1937 modelname="gigabeatfx"
1938 target="-DGIGABEAT_F"
1939 memory=32 # always
1940 arm9tdmicc
1941 tool="$rootdir/tools/scramble -add=giga"
1942 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1943 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1944 output="rockbox.gigabeat"
1945 appextra="recorder:gui:radio"
1946 plugins="yes"
1947 swcodec="yes"
1948 toolset=$gigabeatbitmaptools
1949 boottool="$rootdir/tools/scramble -gigabeat"
1950 bootoutput="FWIMG01.DAT"
1951 # architecture, manufacturer and model for the target-tree build
1952 t_cpu="arm"
1953 t_manufacturer="s3c2440"
1954 t_model="gigabeat-fx"
1957 41|gigabeats)
1958 target_id=26
1959 modelname="gigabeats"
1960 target="-DGIGABEAT_S"
1961 memory=64
1962 arm1136jfscc
1963 tool="$rootdir/tools/scramble -add=gigs"
1964 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1965 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1966 output="rockbox.gigabeat"
1967 appextra="recorder:gui:radio"
1968 plugins="yes"
1969 swcodec="yes"
1970 toolset="$gigabeatbitmaptools"
1971 boottool="$rootdir/tools/scramble -gigabeats"
1972 bootoutput="nk.bin"
1973 # architecture, manufacturer and model for the target-tree build
1974 t_cpu="arm"
1975 t_manufacturer="imx31"
1976 t_model="gigabeat-s"
1979 70|mrobe500)
1980 target_id=36
1981 modelname="mrobe500"
1982 target="-DMROBE_500"
1983 memory=64 # always
1984 arm926ejscc
1985 tool="$rootdir/tools/scramble -add=m500"
1986 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1987 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1988 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1989 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1990 output="rockbox.mrobe500"
1991 appextra="recorder:gui:radio"
1992 plugins="yes"
1993 swcodec="yes"
1994 toolset=$gigabeatbitmaptools
1995 boottool="cp "
1996 bootoutput="rockbox.mrboot"
1997 # architecture, manufacturer and model for the target-tree build
1998 t_cpu="arm"
1999 t_manufacturer="tms320dm320"
2000 t_model="mrobe-500"
2003 71|mrobe100)
2004 target_id=33
2005 modelname="mrobe100"
2006 target="-DMROBE_100"
2007 memory=32 # always
2008 arm7tdmicc
2009 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2010 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2011 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2012 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2013 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2014 output="rockbox.mi4"
2015 appextra="recorder:gui:radio"
2016 plugins="yes"
2017 swcodec="yes"
2018 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2019 bootoutput="pp5020.mi4"
2020 # toolset is the tools within the tools directory that we build for
2021 # this particular target.
2022 toolset=$scramblebitmaptools
2023 # architecture, manufacturer and model for the target-tree build
2024 t_cpu="arm"
2025 t_manufacturer="olympus"
2026 t_model="mrobe-100"
2029 80|logikdax)
2030 target_id=31
2031 modelname="logikdax"
2032 target="-DLOGIK_DAX"
2033 memory=2 # always
2034 arm946cc
2035 tool="$rootdir/tools/scramble -add=ldax"
2036 boottool="$rootdir/tools/scramble -tcc=crc"
2037 bootoutput="player.rom"
2038 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2039 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2040 output="rockbox.logik"
2041 appextra="recorder:gui:radio"
2042 plugins=""
2043 swcodec="yes"
2044 # toolset is the tools within the tools directory that we build for
2045 # this particular target.
2046 toolset=$tccbitmaptools
2047 # architecture, manufacturer and model for the target-tree build
2048 t_cpu="arm"
2049 t_manufacturer="tcc77x"
2050 t_model="logikdax"
2053 90|zenvisionm30gb)
2054 target_id=35
2055 modelname="zenvisionm30gb"
2056 target="-DCREATIVE_ZVM"
2057 memory=64
2058 arm926ejscc
2059 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2060 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2061 tool="$rootdir/tools/scramble -creative=zvm"
2062 USE_ELF="yes"
2063 output="rockbox.zvm"
2064 appextra="recorder:gui:radio"
2065 plugins="yes"
2066 swcodec="yes"
2067 toolset=$ipodbitmaptools
2068 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
2069 bootoutput="rockbox.zvmboot"
2070 # architecture, manufacturer and model for the target-tree build
2071 t_cpu="arm"
2072 t_manufacturer="tms320dm320"
2073 t_model="creative-zvm"
2076 91|zenvisionm60gb)
2077 target_id=40
2078 modelname="zenvisionm60gb"
2079 target="-DCREATIVE_ZVM60GB"
2080 memory=64
2081 arm926ejscc
2082 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2083 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2084 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2085 USE_ELF="yes"
2086 output="rockbox.zvm60"
2087 appextra="recorder:gui:radio"
2088 plugins="yes"
2089 swcodec="yes"
2090 toolset=$ipodbitmaptools
2091 boottool="$rootdir/tools/scramble -creative=zvm60"
2092 bootoutput="rockbox.zvm60boot"
2093 # architecture, manufacturer and model for the target-tree build
2094 t_cpu="arm"
2095 t_manufacturer="tms320dm320"
2096 t_model="creative-zvm"
2099 92|zenvision)
2100 target_id=39
2101 modelname="zenvision"
2102 target="-DCREATIVE_ZV"
2103 memory=64
2104 arm926ejscc
2105 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2106 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2107 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2108 USE_ELF="yes"
2109 output="rockbox.zv"
2110 appextra="recorder:gui:radio"
2111 plugins=""
2112 swcodec="yes"
2113 toolset=$ipodbitmaptools
2114 boottool="$rootdir/tools/scramble -creative=zenvision"
2115 bootoutput="rockbox.zvboot"
2116 # architecture, manufacturer and model for the target-tree build
2117 t_cpu="arm"
2118 t_manufacturer="tms320dm320"
2119 t_model="creative-zvm"
2122 50|sansae200)
2123 target_id=23
2124 modelname="sansae200"
2125 target="-DSANSA_E200"
2126 memory=32 # supposedly
2127 arm7tdmicc
2128 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2129 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2130 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2131 output="rockbox.mi4"
2132 appextra="recorder:gui:radio"
2133 plugins="yes"
2134 swcodec="yes"
2135 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2136 bootoutput="PP5022.mi4"
2137 # toolset is the tools within the tools directory that we build for
2138 # this particular target.
2139 toolset=$scramblebitmaptools
2140 # architecture, manufacturer and model for the target-tree build
2141 t_cpu="arm"
2142 t_manufacturer="sandisk"
2143 t_model="sansa-e200"
2146 51|sansae200r)
2147 # the e200R model is pretty much identical to the e200, it only has a
2148 # different option to the scramble tool when building a bootloader and
2149 # makes the bootloader output file name in all lower case.
2150 target_id=27
2151 modelname="sansae200r"
2152 target="-DSANSA_E200"
2153 memory=32 # supposedly
2154 arm7tdmicc
2155 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2156 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2157 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2158 output="rockbox.mi4"
2159 appextra="recorder:gui:radio"
2160 plugins="yes"
2161 swcodec="yes"
2162 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2163 bootoutput="pp5022.mi4"
2164 # toolset is the tools within the tools directory that we build for
2165 # this particular target.
2166 toolset=$scramblebitmaptools
2167 # architecture, manufacturer and model for the target-tree build
2168 t_cpu="arm"
2169 t_manufacturer="sandisk"
2170 t_model="sansa-e200"
2173 52|sansac200)
2174 target_id=30
2175 modelname="sansac200"
2176 target="-DSANSA_C200"
2177 memory=32 # supposedly
2178 arm7tdmicc
2179 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2180 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2181 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2182 output="rockbox.mi4"
2183 appextra="recorder:gui:radio"
2184 plugins="yes"
2185 swcodec="yes"
2186 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2187 bootoutput="firmware.mi4"
2188 # toolset is the tools within the tools directory that we build for
2189 # this particular target.
2190 toolset=$scramblebitmaptools
2191 # architecture, manufacturer and model for the target-tree build
2192 t_cpu="arm"
2193 t_manufacturer="sandisk"
2194 t_model="sansa-c200"
2197 53|sansam200)
2198 target_id=48
2199 modelname="sansam200"
2200 target="-DSANSA_M200"
2201 memory=1 # always
2202 arm946cc
2203 tool="$rootdir/tools/scramble -add=m200"
2204 boottool="$rootdir/tools/scramble -tcc=crc"
2205 bootoutput="player.rom"
2206 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2207 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2208 output="rockbox.m200"
2209 appextra="recorder:gui:radio"
2210 plugins=""
2211 swcodec="yes"
2212 # toolset is the tools within the tools directory that we build for
2213 # this particular target.
2214 toolset=$tccbitmaptools
2215 # architecture, manufacturer and model for the target-tree build
2216 t_cpu="arm"
2217 t_manufacturer="tcc77x"
2218 t_model="m200"
2221 54|sansac100)
2222 target_id=42
2223 modelname="sansac100"
2224 target="-DSANSA_C100"
2225 memory=2
2226 arm946cc
2227 tool="$rootdir/tools/scramble -add=c100"
2228 boottool="$rootdir/tools/scramble -tcc=crc"
2229 bootoutput="player.rom"
2230 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2231 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2232 output="rockbox.c100"
2233 appextra="recorder:gui:radio"
2234 plugins=""
2235 swcodec="yes"
2236 # toolset is the tools within the tools directory that we build for
2237 # this particular target.
2238 toolset=$tccbitmaptools
2239 # architecture, manufacturer and model for the target-tree build
2240 t_cpu="arm"
2241 t_manufacturer="tcc77x"
2242 t_model="c100"
2245 55|sansaclip)
2246 target_id=50
2247 modelname="sansaclip"
2248 target="-DSANSA_CLIP"
2249 memory=2
2250 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2251 bmp2rb_native="$bmp2rb_mono"
2252 tool="$rootdir/tools/scramble -add=clip"
2253 output="rockbox.sansa"
2254 bootoutput="bootloader-clip.sansa"
2255 appextra="recorder:gui:radio"
2256 plugins="yes"
2257 swcodec="yes"
2258 toolset=$scramblebitmaptools
2259 t_cpu="arm"
2260 t_manufacturer="as3525"
2261 t_model="sansa-clip"
2262 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2263 arm9tdmicc
2264 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2268 56|sansae200v2)
2269 target_id=51
2270 modelname="sansae200v2"
2271 target="-DSANSA_E200V2"
2272 memory=8
2273 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2274 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2275 tool="$rootdir/tools/scramble -add=e2v2"
2276 output="rockbox.sansa"
2277 bootoutput="bootloader-e200v2.sansa"
2278 appextra="recorder:gui:radio"
2279 plugins="yes"
2280 swcodec="yes"
2281 toolset=$scramblebitmaptools
2282 t_cpu="arm"
2283 t_manufacturer="as3525"
2284 t_model="sansa-e200v2"
2285 arm9tdmicc
2289 57|sansam200v4)
2290 target_id=52
2291 modelname="sansam200v4"
2292 target="-DSANSA_M200V4"
2293 memory=2
2294 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2295 bmp2rb_native="$bmp2rb_mono"
2296 tool="$rootdir/tools/scramble -add=m2v4"
2297 output="rockbox.sansa"
2298 bootoutput="bootloader-m200v4.sansa"
2299 appextra="recorder:gui:radio"
2300 plugins="yes"
2301 swcodec="yes"
2302 toolset=$scramblebitmaptools
2303 t_cpu="arm"
2304 t_manufacturer="as3525"
2305 t_model="sansa-m200v4"
2306 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2307 arm9tdmicc
2308 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2312 58|sansafuze)
2313 target_id=53
2314 modelname="sansafuze"
2315 target="-DSANSA_FUZE"
2316 memory=8
2317 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2318 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2319 tool="$rootdir/tools/scramble -add=fuze"
2320 output="rockbox.sansa"
2321 bootoutput="bootloader-fuze.sansa"
2322 appextra="recorder:gui:radio"
2323 plugins="yes"
2324 swcodec="yes"
2325 toolset=$scramblebitmaptools
2326 t_cpu="arm"
2327 t_manufacturer="as3525"
2328 t_model="sansa-fuze"
2329 arm9tdmicc
2333 59|sansac200v2)
2334 target_id=55
2335 modelname="sansac200v2"
2336 target="-DSANSA_C200V2"
2337 memory=2 # as per OF diagnosis mode
2338 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2339 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2340 tool="$rootdir/tools/scramble -add=c2v2"
2341 output="rockbox.sansa"
2342 bootoutput="bootloader-c200v2.sansa"
2343 appextra="recorder:gui:radio"
2344 plugins="yes"
2345 swcodec="yes"
2346 # toolset is the tools within the tools directory that we build for
2347 # this particular target.
2348 toolset=$scramblebitmaptools
2349 # architecture, manufacturer and model for the target-tree build
2350 t_cpu="arm"
2351 t_manufacturer="as3525"
2352 t_model="sansa-c200v2"
2353 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2354 arm9tdmicc
2355 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2358 60|sansaclipv2)
2359 target_id=60
2360 modelname="sansaclipv2"
2361 target="-DSANSA_CLIPV2"
2362 memory=8
2363 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2364 bmp2rb_native="$bmp2rb_mono"
2365 tool="$rootdir/tools/scramble -add=clv2"
2366 output="rockbox.sansa"
2367 bootoutput="bootloader-clipv2.sansa"
2368 appextra="recorder:gui:radio"
2369 plugins="yes"
2370 swcodec="yes"
2371 toolset=$scramblebitmaptools
2372 t_cpu="arm"
2373 t_manufacturer="as3525"
2374 t_model="sansa-clipv2"
2375 arm926ejscc
2378 61|sansaview)
2379 echo "Sansa View is not yet supported!"
2380 exit 1
2381 target_id=63
2382 modelname="sansaview"
2383 target="-DSANSA_VIEW"
2384 memory=32
2385 arm1176jzscc
2386 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2387 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2388 output="rockbox.mi4"
2389 appextra="gui"
2390 plugins=""
2391 swcodec="yes"
2392 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2393 bootoutput="firmware.mi4"
2394 # toolset is the tools within the tools directory that we build for
2395 # this particular target.
2396 toolset=$scramblebitmaptools
2397 t_cpu="arm"
2398 t_manufacturer="sandisk"
2399 t_model="sansa-view"
2402 62|sansaclipplus)
2403 target_id=66
2404 modelname="sansaclipplus"
2405 target="-DSANSA_CLIPPLUS"
2406 memory=8
2407 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2408 bmp2rb_native="$bmp2rb_mono"
2409 tool="$rootdir/tools/scramble -add=cli+"
2410 output="rockbox.sansa"
2411 bootoutput="bootloader-clipplus.sansa"
2412 appextra="recorder:gui:radio"
2413 plugins="yes"
2414 swcodec="yes"
2415 toolset=$scramblebitmaptools
2416 t_cpu="arm"
2417 t_manufacturer="as3525"
2418 t_model="sansa-clipplus"
2419 arm926ejscc
2422 63|sansafuzev2)
2423 target_id=68
2424 modelname="sansafuzev2"
2425 target="-DSANSA_FUZEV2"
2426 memory=8 # not sure
2427 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2428 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2429 tool="$rootdir/tools/scramble -add=fuz2"
2430 output="rockbox.sansa"
2431 bootoutput="bootloader-fuzev2.sansa"
2432 appextra="recorder:gui:radio"
2433 plugins="yes"
2434 swcodec="yes"
2435 toolset=$scramblebitmaptools
2436 t_cpu="arm"
2437 t_manufacturer="as3525"
2438 t_model="sansa-fuzev2"
2439 arm926ejscc
2442 150|tatungtpj1022)
2443 target_id=25
2444 modelname="tatungtpj1022"
2445 target="-DTATUNG_TPJ1022"
2446 memory=32 # always
2447 arm7tdmicc
2448 tool="$rootdir/tools/scramble -add tpj2"
2449 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2450 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2451 output="rockbox.elio"
2452 appextra="recorder:gui:radio"
2453 plugins="yes"
2454 swcodec="yes"
2455 boottool="$rootdir/tools/scramble -mi4v2"
2456 bootoutput="pp5020.mi4"
2457 # toolset is the tools within the tools directory that we build for
2458 # this particular target.
2459 toolset=$scramblebitmaptools
2460 # architecture, manufacturer and model for the target-tree build
2461 t_cpu="arm"
2462 t_manufacturer="tatung"
2463 t_model="tpj1022"
2466 100|gogearsa9200)
2467 target_id=41
2468 modelname="gogearsa9200"
2469 target="-DPHILIPS_SA9200"
2470 memory=32 # supposedly
2471 arm7tdmicc
2472 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2473 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2474 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2475 output="rockbox.mi4"
2476 appextra="recorder:gui:radio"
2477 plugins="yes"
2478 swcodec="yes"
2479 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2480 bootoutput="FWImage.ebn"
2481 # toolset is the tools within the tools directory that we build for
2482 # this particular target.
2483 toolset=$scramblebitmaptools
2484 # architecture, manufacturer and model for the target-tree build
2485 t_cpu="arm"
2486 t_manufacturer="philips"
2487 t_model="sa9200"
2490 101|gogearhdd1630)
2491 target_id=43
2492 modelname="gogearhdd1630"
2493 target="-DPHILIPS_HDD1630"
2494 memory=32 # supposedly
2495 arm7tdmicc
2496 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2497 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2498 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2499 output="rockbox.mi4"
2500 appextra="recorder:gui:radio"
2501 plugins="yes"
2502 swcodec="yes"
2503 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2504 bootoutput="FWImage.ebn"
2505 # toolset is the tools within the tools directory that we build for
2506 # this particular target.
2507 toolset=$scramblebitmaptools
2508 # architecture, manufacturer and model for the target-tree build
2509 t_cpu="arm"
2510 t_manufacturer="philips"
2511 t_model="hdd1630"
2514 102|gogearhdd6330)
2515 target_id=65
2516 modelname="gogearhdd6330"
2517 target="-DPHILIPS_HDD6330"
2518 memory=64 # always
2519 arm7tdmicc
2520 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2521 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2522 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2523 output="rockbox.mi4"
2524 appextra="recorder:gui:radio"
2525 plugins="yes"
2526 swcodec="yes"
2527 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2528 bootoutput="FWImage.ebn"
2529 # toolset is the tools within the tools directory that we build for
2530 # this particular target.
2531 toolset=$scramblebitmaptools
2532 # architecture, manufacturer and model for the target-tree build
2533 t_cpu="arm"
2534 t_manufacturer="philips"
2535 t_model="hdd6330"
2538 110|meizum6sl)
2539 target_id=49
2540 modelname="meizum6sl"
2541 target="-DMEIZU_M6SL"
2542 memory=16 # always
2543 arm940tbecc
2544 tool="cp"
2545 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2546 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2547 output="rockbox.meizu"
2548 appextra="recorder:gui:radio"
2549 plugins="no" #FIXME
2550 swcodec="yes"
2551 toolset=$genericbitmaptools
2552 boottool="cp"
2553 bootoutput="rockboot.ebn"
2554 # architecture, manufacturer and model for the target-tree build
2555 t_cpu="arm"
2556 t_manufacturer="s5l8700"
2557 t_model="meizu-m6sl"
2560 111|meizum6sp)
2561 target_id=46
2562 modelname="meizum6sp"
2563 target="-DMEIZU_M6SP"
2564 memory=16 # always
2565 arm940tbecc
2566 tool="cp"
2567 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2568 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2569 output="rockbox.meizu"
2570 appextra="recorder:gui:radio"
2571 plugins="no" #FIXME
2572 swcodec="yes"
2573 toolset=$genericbitmaptools
2574 boottool="cp"
2575 bootoutput="rockboot.ebn"
2576 # architecture, manufacturer and model for the target-tree build
2577 t_cpu="arm"
2578 t_manufacturer="s5l8700"
2579 t_model="meizu-m6sp"
2582 112|meizum3)
2583 target_id=47
2584 modelname="meizum3"
2585 target="-DMEIZU_M3"
2586 memory=16 # always
2587 arm940tbecc
2588 tool="cp"
2589 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2590 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2591 output="rockbox.meizu"
2592 appextra="recorder:gui:radio"
2593 plugins="no" #FIXME
2594 swcodec="yes"
2595 toolset=$genericbitmaptools
2596 boottool="cp"
2597 bootoutput="rockboot.ebn"
2598 # architecture, manufacturer and model for the target-tree build
2599 t_cpu="arm"
2600 t_manufacturer="s5l8700"
2601 t_model="meizu-m3"
2604 120|ondavx747)
2605 target_id=45
2606 modelname="ondavx747"
2607 target="-DONDA_VX747"
2608 memory=16
2609 mipselcc
2610 tool="$rootdir/tools/scramble -add=x747"
2611 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2612 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2613 output="rockbox.vx747"
2614 appextra="recorder:gui:radio"
2615 plugins="yes"
2616 swcodec="yes"
2617 toolset=$genericbitmaptools
2618 boottool="$rootdir/tools/scramble -ccpmp"
2619 bootoutput="ccpmp.bin"
2620 # architecture, manufacturer and model for the target-tree build
2621 t_cpu="mips"
2622 t_manufacturer="ingenic_jz47xx"
2623 t_model="onda_vx747"
2626 121|ondavx767)
2627 target_id=64
2628 modelname="ondavx767"
2629 target="-DONDA_VX767"
2630 memory=16 #FIXME
2631 mipselcc
2632 tool="cp"
2633 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2634 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2635 output="rockbox.vx767"
2636 appextra="recorder:gui:radio"
2637 plugins="" #FIXME
2638 swcodec="yes"
2639 toolset=$genericbitmaptools
2640 boottool="$rootdir/tools/scramble -ccpmp"
2641 bootoutput="ccpmp.bin"
2642 # architecture, manufacturer and model for the target-tree build
2643 t_cpu="mips"
2644 t_manufacturer="ingenic_jz47xx"
2645 t_model="onda_vx767"
2648 122|ondavx747p)
2649 target_id=54
2650 modelname="ondavx747p"
2651 target="-DONDA_VX747P"
2652 memory=16
2653 mipselcc
2654 tool="$rootdir/tools/scramble -add=747p"
2655 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2656 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2657 output="rockbox.vx747p"
2658 appextra="recorder:gui:radio"
2659 plugins="yes"
2660 swcodec="yes"
2661 toolset=$genericbitmaptools
2662 boottool="$rootdir/tools/scramble -ccpmp"
2663 bootoutput="ccpmp.bin"
2664 # architecture, manufacturer and model for the target-tree build
2665 t_cpu="mips"
2666 t_manufacturer="ingenic_jz47xx"
2667 t_model="onda_vx747"
2670 123|ondavx777)
2671 target_id=61
2672 modelname="ondavx777"
2673 target="-DONDA_VX777"
2674 memory=16
2675 mipselcc
2676 tool="$rootdir/tools/scramble -add=x777"
2677 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2678 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2679 output="rockbox.vx777"
2680 appextra="recorder:gui:radio"
2681 plugins="yes"
2682 swcodec="yes"
2683 toolset=$genericbitmaptools
2684 boottool="$rootdir/tools/scramble -ccpmp"
2685 bootoutput="ccpmp.bin"
2686 # architecture, manufacturer and model for the target-tree build
2687 t_cpu="mips"
2688 t_manufacturer="ingenic_jz47xx"
2689 t_model="onda_vx747"
2692 130|lyreproto1)
2693 target_id=56
2694 modelname="lyreproto1"
2695 target="-DLYRE_PROTO1"
2696 memory=64
2697 arm926ejscc
2698 tool="cp"
2699 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2700 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2701 output="rockbox.lyre"
2702 appextra="recorder:gui:radio"
2703 plugins=""
2704 swcodec="yes"
2705 toolset=$scramblebitmaptools
2706 boottool="cp"
2707 bootoutput="bootloader-proto1.lyre"
2708 # architecture, manufacturer and model for the target-tree build
2709 t_cpu="arm"
2710 t_manufacturer="at91sam"
2711 t_model="lyre_proto1"
2714 131|mini2440)
2715 target_id=99
2716 modelname="mini2440"
2717 target="-DMINI2440"
2718 memory=64
2719 arm9tdmicc
2720 tool="$rootdir/tools/scramble -add=m244"
2721 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2722 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2723 output="rockbox.mini2440"
2724 appextra="recorder:gui:radio"
2725 plugins=""
2726 swcodec="yes"
2727 toolset=$scramblebitmaptools
2728 boottool="cp"
2729 bootoutput="bootloader-mini2440.lyre"
2730 # architecture, manufacturer and model for the target-tree build
2731 t_cpu="arm"
2732 t_manufacturer="s3c2440"
2733 t_model="mini2440"
2736 140|samsungyh820)
2737 target_id=57
2738 modelname="samsungyh820"
2739 target="-DSAMSUNG_YH820"
2740 memory=32 # always
2741 arm7tdmicc
2742 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2743 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2744 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2745 output="rockbox.mi4"
2746 appextra="recorder:gui:radio"
2747 plugins="yes"
2748 swcodec="yes"
2749 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2750 bootoutput="FW_YH820.mi4"
2751 # toolset is the tools within the tools directory that we build for
2752 # this particular target.
2753 toolset=$scramblebitmaptools
2754 # architecture, manufacturer and model for the target-tree build
2755 t_cpu="arm"
2756 t_manufacturer="samsung"
2757 t_model="yh820"
2760 141|samsungyh920)
2761 target_id=58
2762 modelname="samsungyh920"
2763 target="-DSAMSUNG_YH920"
2764 memory=32 # always
2765 arm7tdmicc
2766 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2767 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2768 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2769 output="rockbox.mi4"
2770 appextra="recorder:gui:radio"
2771 plugins="yes"
2772 swcodec="yes"
2773 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2774 bootoutput="PP5020.mi4"
2775 # toolset is the tools within the tools directory that we build for
2776 # this particular target.
2777 toolset=$scramblebitmaptools
2778 # architecture, manufacturer and model for the target-tree build
2779 t_cpu="arm"
2780 t_manufacturer="samsung"
2781 t_model="yh920"
2784 142|samsungyh925)
2785 target_id=59
2786 modelname="samsungyh925"
2787 target="-DSAMSUNG_YH925"
2788 memory=32 # always
2789 arm7tdmicc
2790 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2791 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2792 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2793 output="rockbox.mi4"
2794 appextra="recorder:gui:radio"
2795 plugins="yes"
2796 swcodec="yes"
2797 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2798 bootoutput="FW_YH925.mi4"
2799 # toolset is the tools within the tools directory that we build for
2800 # this particular target.
2801 toolset=$scramblebitmaptools
2802 # architecture, manufacturer and model for the target-tree build
2803 t_cpu="arm"
2804 t_manufacturer="samsung"
2805 t_model="yh925"
2808 143|samsungyps3)
2809 target_id=72
2810 modelname="samsungyps3"
2811 target="-DSAMSUNG_YPS3"
2812 memory=16 # always
2813 arm940tbecc
2814 tool="cp"
2815 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2816 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2817 output="rockbox.yps3"
2818 appextra="recorder:gui:radio"
2819 plugins="no" #FIXME
2820 swcodec="yes"
2821 toolset=$genericbitmaptools
2822 boottool="cp"
2823 bootoutput="rockboot.ebn"
2824 # architecture, manufacturer and model for the target-tree build
2825 t_cpu="arm"
2826 t_manufacturer="s5l8700"
2827 t_model="yps3"
2830 160|vibe500)
2831 target_id=67
2832 modelname="vibe500"
2833 target="-DPBELL_VIBE500"
2834 memory=32 # always
2835 arm7tdmicc
2836 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2837 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2838 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2839 output="rockbox.mi4"
2840 appextra="recorder:gui:radio"
2841 plugins="yes"
2842 swcodec="yes"
2843 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2844 bootoutput="jukebox.mi4"
2845 # toolset is the tools within the tools directory that we build for
2846 # this particular target.
2847 toolset=$scramblebitmaptools
2848 # architecture, manufacturer and model for the target-tree build
2849 t_cpu="arm"
2850 t_manufacturer="pbell"
2851 t_model="vibe500"
2854 170|mpiohd200)
2855 target_id=69
2856 modelname="mpiohd200"
2857 target="-DMPIO_HD200"
2858 memory=16 # always
2859 coldfirecc
2860 tool="$rootdir/tools/scramble -add=hd20"
2861 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2862 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2863 output="rockbox.mpio"
2864 bootoutput="bootloader.mpio"
2865 appextra="recorder:gui:radio"
2866 plugins="yes"
2867 swcodec="yes"
2868 # toolset is the tools within the tools directory that we build for
2869 # this particular target.
2870 toolset="$genericbitmaptools"
2871 # architecture, manufacturer and model for the target-tree build
2872 t_cpu="coldfire"
2873 t_manufacturer="mpio"
2874 t_model="hd200"
2877 171|mpiohd300)
2878 target_id=70
2879 modelname="mpiohd300"
2880 target="-DMPIO_HD300"
2881 memory=16 # always
2882 coldfirecc
2883 tool="$rootdir/tools/scramble -add=hd30"
2884 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2885 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2886 output="rockbox.mpio"
2887 bootoutput="bootloader.mpio"
2888 appextra="recorder:gui:radio"
2889 plugins="yes"
2890 swcodec="yes"
2891 # toolset is the tools within the tools directory that we build for
2892 # this particular target.
2893 toolset="$genericbitmaptools"
2894 # architecture, manufacturer and model for the target-tree build
2895 t_cpu="coldfire"
2896 t_manufacturer="mpio"
2897 t_model="hd300"
2900 200|sdlapp)
2901 target_id=73
2902 modelname="application"
2903 app_modelname="sdlapp"
2904 target="-DAPPLICATION"
2905 app_set_paths
2906 app_set_lcd_size
2907 memory=8
2908 uname=`uname`
2909 simcc "sdl-app"
2910 tool="cp "
2911 boottool="cp "
2912 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2913 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2914 output="rockbox"
2915 bootoutput="rockbox"
2916 appextra="recorder:gui:radio"
2917 plugins=""
2918 swcodec="yes"
2919 # architecture, manufacturer and model for the target-tree build
2920 t_cpu="hosted"
2921 t_manufacturer="sdl"
2922 t_model="app"
2925 201|android)
2926 target_id=74
2927 modelname="application"
2928 app_modelname="android"
2929 target="-DAPPLICATION"
2930 app_type="android"
2931 app_set_lcd_size
2932 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
2933 bindir="/data/data/org.rockbox/lib"
2934 libdir="/data/data/org.rockbox/app_rockbox"
2935 memory=8
2936 uname=`uname`
2937 androidcc
2938 tool="cp "
2939 boottool="cp "
2940 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2941 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2942 output="librockbox.so"
2943 bootoutput="librockbox.so"
2944 appextra="recorder:gui:radio"
2945 plugins=""
2946 swcodec="yes"
2947 # architecture, manufacturer and model for the target-tree build
2948 t_cpu="hosted"
2949 t_manufacturer="android"
2950 t_model="app"
2953 202|nokian8xx)
2954 target_id=75
2955 modelname="application"
2956 app_modelname="nokian8xx"
2957 app_type="sdl-app"
2958 target="-DAPPLICATION"
2959 app_set_lcd_size 800 480
2960 sharedir="/opt/rockbox/share/rockbox"
2961 bindir="/opt/rockbox/bin"
2962 libdir="/opt/rockbox/lib"
2963 memory=8
2964 uname=`uname`
2965 maemocc 4
2966 tool="cp "
2967 boottool="cp "
2968 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2969 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2970 output="rockbox"
2971 bootoutput="rockbox"
2972 appextra="recorder:gui:radio"
2973 plugins=""
2974 swcodec="yes"
2975 # architecture, manufacturer and model for the target-tree build
2976 t_cpu="hosted"
2977 t_manufacturer="maemo"
2978 t_model="app"
2981 203|nokian900)
2982 target_id=76
2983 modelname="application"
2984 app_modelname="nokian900"
2985 app_type="sdl-app"
2986 target="-DAPPLICATION"
2987 app_set_lcd_size 800 480
2988 sharedir="/opt/rockbox/share/rockbox"
2989 bindir="/opt/rockbox/bin"
2990 libdir="/opt/rockbox/lib"
2991 memory=8
2992 uname=`uname`
2993 maemocc 5
2994 tool="cp "
2995 boottool="cp "
2996 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2997 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2998 output="rockbox"
2999 bootoutput="rockbox"
3000 appextra="recorder:gui:radio"
3001 plugins=""
3002 swcodec="yes"
3003 # architecture, manufacturer and model for the target-tree build
3004 t_cpu="hosted"
3005 t_manufacturer="maemo"
3006 t_model="app"
3010 echo "Please select a supported target platform!"
3011 exit 7
3014 esac
3016 echo "Platform set to $modelname"
3019 #remove start
3020 ############################################################################
3021 # Amount of memory, for those that can differ. They have $memory unset at
3022 # this point.
3025 if [ -z "$memory" ]; then
3026 case $target_id in
3028 if [ "$ARG_RAM" ]; then
3029 size=$ARG_RAM
3030 else
3031 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3032 size=`input`;
3034 case $size in
3035 60|64)
3036 memory="64"
3039 memory="32"
3041 esac
3044 if [ "$ARG_RAM" ]; then
3045 size=$ARG_RAM
3046 else
3047 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3048 size=`input`;
3050 case $size in
3052 memory="8"
3055 memory="2"
3057 esac
3059 esac
3060 echo "Memory size selected: $memory MB"
3061 [ "$ARG_TYPE" ] || echo ""
3063 #remove end
3065 ##################################################################
3066 # Figure out build "type"
3069 # the ifp7x0 is the only platform that supports building a gdb stub like
3070 # this
3071 case $modelname in
3072 iriverifp7xx)
3073 gdbstub="(G)DB stub, "
3075 sansae200r|sansae200)
3076 gdbstub="(I)nstaller, "
3078 sansac200)
3079 gdbstub="(E)raser, "
3083 esac
3084 if [ "$ARG_TYPE" ]; then
3085 btype=$ARG_TYPE
3086 else
3087 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
3088 btype=`input`;
3091 case $btype in
3092 [Ii])
3093 appsdir='\$(ROOTDIR)/bootloader'
3094 apps="bootloader"
3095 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3096 bootloader="1"
3097 echo "e200R-installer build selected"
3099 [Ee])
3100 appsdir='\$(ROOTDIR)/bootloader'
3101 apps="bootloader"
3102 echo "C2(4)0 or C2(5)0"
3103 variant=`input`
3104 case $variant in
3106 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
3107 echo "c240 eraser build selected"
3110 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
3111 echo "c240 eraser build selected"
3113 esac
3114 bootloader="1"
3115 echo "c200 eraser build selected"
3117 [Bb])
3118 if test $t_manufacturer = "archos"; then
3119 # Archos SH-based players do this somewhat differently for
3120 # some reason
3121 appsdir='\$(ROOTDIR)/flash/bootbox'
3122 apps="bootbox"
3123 else
3124 appsdir='\$(ROOTDIR)/bootloader'
3125 apps="bootloader"
3126 flash=""
3127 if test -n "$boottool"; then
3128 tool="$boottool"
3130 if test -n "$bootoutput"; then
3131 output=$bootoutput
3134 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3135 bootloader="1"
3136 echo "Bootloader build selected"
3138 [Ss])
3139 if [ "$modelname" = "sansae200r" ]; then
3140 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3141 exit 8
3143 debug="-DDEBUG"
3144 simulator="yes"
3145 extradefines="$extradefines -DSIMULATOR"
3146 archosrom=""
3147 flash=""
3148 echo "Simulator build selected"
3150 [Aa]*)
3151 echo "Advanced build selected"
3152 whichadvanced $btype
3154 [Gg])
3155 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3156 appsdir='\$(ROOTDIR)/gdb'
3157 apps="stub"
3158 case $modelname in
3159 iriverifp7xx)
3160 output="stub.wma"
3164 esac
3165 echo "GDB stub build selected"
3167 [Mm])
3168 toolset='';
3169 apps="manual"
3170 echo "Manual build selected"
3172 [Cc])
3173 uname=`uname`
3174 simcc "checkwps"
3175 toolset='';
3176 t_cpu='';
3177 GCCOPTS='';
3178 extradefines="$extradefines -DDEBUG"
3179 appsdir='\$(ROOTDIR)/tools/checkwps';
3180 output='checkwps.'${modelname};
3181 archosrom='';
3182 echo "CheckWPS build selected"
3184 [Dd])
3185 uname=`uname`
3186 simcc "database"
3187 toolset='';
3188 t_cpu='';
3189 GCCOPTS='';
3190 appsdir='\$(ROOTDIR)/tools/database';
3191 archosrom='';
3193 case $uname in
3194 CYGWIN*|MINGW*)
3195 output="database_${modelname}.exe"
3198 output='database.'${modelname};
3200 esac
3202 echo "Database tool build selected"
3205 if [ "$modelname" = "sansae200r" ]; then
3206 echo "Do not use the e200R target for regular builds. Use e200 instead."
3207 exit 8
3209 debug=""
3210 btype="N" # set it explicitly since RET only gets here as well
3211 echo "Normal build selected"
3214 esac
3215 # to be able running "make manual" from non-manual configuration
3216 case $modelname in
3217 archosrecorderv2)
3218 manualdev="archosfmrecorder"
3220 iriverh1??)
3221 manualdev="iriverh100"
3223 ipodmini2g)
3224 manualdev="ipodmini1g"
3227 manualdev=$modelname
3229 esac
3231 if [ -z "$debug" ]; then
3232 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3235 echo "Using source code root directory: $rootdir"
3237 # this was once possible to change at build-time, but no more:
3238 language="english"
3240 uname=`uname`
3242 if [ "yes" = "$simulator" ]; then
3243 # setup compiler and things for simulator
3244 simcc "sdl-sim"
3246 if [ -d "simdisk" ]; then
3247 echo "Subdirectory 'simdisk' already present"
3248 else
3249 mkdir simdisk
3250 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3254 # Now, figure out version number of the (gcc) compiler we are about to use
3255 gccver=`$CC -dumpversion`;
3257 # figure out the binutil version too and display it, mostly for the build
3258 # system etc to be able to see it easier
3259 if [ $uname = "Darwin" ]; then
3260 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3261 else
3262 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3265 if [ -z "$gccver" ]; then
3266 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3267 echo "[WARNING] this may cause your build to fail since we cannot do the"
3268 echo "[WARNING] checks we want now."
3269 else
3271 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3272 # DEPEND on it
3274 num1=`echo $gccver | cut -d . -f1`
3275 num2=`echo $gccver | cut -d . -f2`
3276 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3278 # This makes:
3279 # 3.3.X => 303
3280 # 3.4.X => 304
3281 # 2.95.3 => 295
3283 echo "Using $CC $gccver ($gccnum)"
3285 if test "$gccnum" -ge "400"; then
3286 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3287 # so we ignore that warnings for now
3288 # -Wno-pointer-sign
3289 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3292 if test "$gccnum" -ge "402"; then
3293 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3294 # and later would throw it for several valid cases
3295 GCCOPTS="$GCCOPTS -Wno-override-init"
3298 case $prefix in
3299 ""|"$CROSS_COMPILE")
3300 # simulator
3302 i586-mingw32msvc-)
3303 # cross-compile for win32
3306 # Verify that the cross-compiler is of a recommended version!
3307 if test "$gccver" != "$gccchoice"; then
3308 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3309 echo "WARNING: version $gccchoice!"
3310 echo "WARNING: This may cause your build to fail since it may be a version"
3311 echo "WARNING: that isn't functional or known to not be the best choice."
3312 echo "WARNING: If you suffer from build problems, you know that this is"
3313 echo "WARNING: a likely source for them..."
3316 esac
3321 echo "Using $LD $ldver"
3323 # check the compiler for SH platforms
3324 if test "$CC" = "sh-elf-gcc"; then
3325 if test "$gccnum" -lt "400"; then
3326 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3327 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3328 else
3329 # figure out patch status
3330 gccpatch=`$CC --version`;
3332 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3333 echo "gcc $gccver is rockbox patched"
3334 # then convert -O to -Os to get smaller binaries!
3335 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3336 else
3337 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3338 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3343 if test "$CC" = "m68k-elf-gcc"; then
3344 # convert -O to -Os to get smaller binaries!
3345 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3348 if [ "$ARG_CCACHE" = "1" ]; then
3349 echo "Enable ccache for building"
3350 ccache="ccache"
3351 elif [ "$ARG_CCACHE" != "0" ]; then
3352 ccache=`findtool ccache`
3353 if test -n "$ccache"; then
3354 echo "Found and uses ccache ($ccache)"
3358 # figure out the full path to the various commands if possible
3359 HOSTCC=`findtool gcc --lit`
3360 HOSTAR=`findtool ar --lit`
3361 CC=`findtool ${CC} --lit`
3362 LD=`findtool ${AR} --lit`
3363 AR=`findtool ${AR} --lit`
3364 AS=`findtool ${AS} --lit`
3365 OC=`findtool ${OC} --lit`
3366 WINDRES=`findtool ${WINDRES} --lit`
3367 DLLTOOL=`findtool ${DLLTOOL} --lit`
3368 DLLWRAP=`findtool ${DLLWRAP} --lit`
3369 RANLIB=`findtool ${RANLIB} --lit`
3371 if test -n "$ccache"; then
3372 CC="$ccache $CC"
3375 if test "$ARG_ARM_THUMB" = "1"; then
3376 extradefines="$extradefines -DUSE_THUMB"
3377 CC="$toolsdir/thumb-cc.py $CC"
3380 if test "X$endian" = "Xbig"; then
3381 defendian="ROCKBOX_BIG_ENDIAN"
3382 else
3383 defendian="ROCKBOX_LITTLE_ENDIAN"
3386 if [ "$ARG_RBDIR" != "" ]; then
3387 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3388 rbdir="/"$ARG_RBDIR
3389 else
3390 rbdir=$ARG_RBDIR
3392 echo "Using alternate rockbox dir: ${rbdir}"
3395 sed > autoconf.h \
3396 -e "s<@ENDIAN@<${defendian}<g" \
3397 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3398 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3399 -e "s<@config_rtc@<$config_rtc<g" \
3400 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3401 -e "s<@thread_support@<$thread_support<g" \
3402 -e "s<@RBDIR@<${rbdir}<g" \
3403 -e "s<@sharepath@<${sharedir}<g" \
3404 -e "s<@binpath@<${bindir}<g" \
3405 -e "s<@libpath@<${libdir}<g" \
3406 -e "s<@have_backlight@<$have_backlight<g" \
3407 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3408 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3409 -e "s<@lcd_width@<$app_lcd_width<g" \
3410 -e "s<@lcd_height@<$app_lcd_height<g" \
3411 <<EOF
3412 /* This header was made by configure */
3413 #ifndef __BUILD_AUTOCONF_H
3414 #define __BUILD_AUTOCONF_H
3416 /* Define endianess for the target or simulator platform */
3417 #define @ENDIAN@ 1
3419 /* Define this if you build rockbox to support the logf logging and display */
3420 #undef ROCKBOX_HAS_LOGF
3422 /* Define this to record a chart with timings for the stages of boot */
3423 #undef DO_BOOTCHART
3425 /* optional define for a backlight modded Ondio */
3426 @have_backlight@
3428 /* optional define for FM radio mod for iAudio M5 */
3429 @have_fmradio_in@
3431 /* optional define for ATA poweroff on Player */
3432 @have_ata_poweroff@
3434 /* optional defines for RTC mod for h1x0 */
3435 @config_rtc@
3436 @have_rtc_alarm@
3438 /* the threading backend we use */
3439 #define @thread_support@
3441 /* lcd dimensions for application builds from configure */
3442 @lcd_width@
3443 @lcd_height@
3445 /* root of Rockbox */
3446 #define ROCKBOX_DIR "@RBDIR@"
3447 #define ROCKBOX_SHARE_PATH "@sharepath@"
3448 #define ROCKBOX_BINARY_PATH "@binpath@"
3449 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3451 #endif /* __BUILD_AUTOCONF_H */
3454 if test -n "$t_cpu"; then
3455 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3457 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3458 # Maemo needs the SDL port, too
3459 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3460 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3461 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3462 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3463 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3465 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3466 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3467 GCCOPTS="$GCCOPTS"
3470 if test "$simulator" = "yes"; then
3471 # add simul make stuff on the #SIMUL# line
3472 simmagic1="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3473 simmagic2="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3474 else
3475 # delete the lines that match
3476 simmagic1='/@SIMUL1@/D'
3477 simmagic2='/@SIMUL2@/D'
3480 if test "$swcodec" = "yes"; then
3481 voicetoolset="rbspeexenc voicefont wavtrim"
3482 else
3483 voicetoolset="voicefont wavtrim"
3486 if test "$apps" = "apps"; then
3487 # only when we build "real" apps we build the .lng files
3488 buildlangs="langs"
3491 #### Fix the cmdline ###
3492 if [ "$ARG_CCACHE" = "1" ]; then
3493 cmdline="--ccache "
3494 elif [ "$ARG_CCACHE" = "0" ]; then
3495 cmdline="--no-ccache "
3497 if [ "$ARG_ARM_EABI" = "1" ]; then
3498 cmdline="$cmdline--eabi "
3500 if [ -n "$ARG_PREFIX" ]; then
3501 cmdline="$cmdline--prefix=\$(PREFIX) "
3503 if [ "$modelname" = "application" ]; then
3504 cmdline="$cmdline--target=$app_modelname --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3505 else
3506 cmdline="$cmdline--target=\$(MODELNAME) "
3509 cmdline="$cmdline--ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3511 ### end of cmdline
3513 sed > Makefile \
3514 -e "s<@ROOTDIR@<${rootdir}<g" \
3515 -e "s<@DEBUG@<${debug}<g" \
3516 -e "s<@MEMORY@<${memory}<g" \
3517 -e "s<@TARGET_ID@<${target_id}<g" \
3518 -e "s<@TARGET@<${target}<g" \
3519 -e "s<@CPU@<${t_cpu}<g" \
3520 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3521 -e "s<@MODELNAME@<${modelname}<g" \
3522 -e "s<@LANGUAGE@<${language}<g" \
3523 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3524 -e "s<@PWD@<${pwd}<g" \
3525 -e "s<@HOSTCC@<${HOSTCC}<g" \
3526 -e "s<@HOSTAR@<${HOSTAR}<g" \
3527 -e "s<@CC@<${CC}<g" \
3528 -e "s<@LD@<${LD}<g" \
3529 -e "s<@AR@<${AR}<g" \
3530 -e "s<@AS@<${AS}<g" \
3531 -e "s<@OC@<${OC}<g" \
3532 -e "s<@WINDRES@<${WINDRES}<g" \
3533 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3534 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3535 -e "s<@RANLIB@<${RANLIB}<g" \
3536 -e "s<@TOOL@<${tool}<g" \
3537 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3538 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3539 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3540 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3541 -e "s<@OUTPUT@<${output}<g" \
3542 -e "s<@APPEXTRA@<${appextra}<g" \
3543 -e "s<@ARCHOSROM@<${archosrom}<g" \
3544 -e "s<@FLASHFILE@<${flash}<g" \
3545 -e "s<@PLUGINS@<${plugins}<g" \
3546 -e "s<@CODECS@<${swcodec}<g" \
3547 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3548 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3549 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3550 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3551 -e "s<@LDOPTS@<${LDOPTS}<g" \
3552 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3553 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3554 -e "s<@EXTRADEF@<${extradefines}<g" \
3555 -e "s<@APPSDIR@<${appsdir}<g" \
3556 -e "s<@FIRMDIR@<${firmdir}<g" \
3557 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3558 -e "s<@APPS@<${apps}<g" \
3559 -e "s<@APP_TYPE@<${app_type}<g" \
3560 -e "s<@GCCVER@<${gccver}<g" \
3561 -e "s<@GCCNUM@<${gccnum}<g" \
3562 -e "s<@UNAME@<${uname}<g" \
3563 -e "s<@ENDIAN@<${defendian}<g" \
3564 -e "s<@TOOLSET@<${toolset}<g" \
3565 -e "${simmagic1}" \
3566 -e "${simmagic2}" \
3567 -e "s<@MANUALDEV@<${manualdev}<g" \
3568 -e "s<@ENCODER@<${ENC_CMD}<g" \
3569 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3570 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3571 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3572 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3573 -e "s<@LANGS@<${buildlangs}<g" \
3574 -e "s<@USE_ELF@<${USE_ELF}<g" \
3575 -e "s<@RBDIR@<${rbdir}<g" \
3576 -e "s<@sharepath@<${sharedir}<g" \
3577 -e "s<@binpath@<${bindir}<g" \
3578 -e "s<@libpath@<${libdir}<g" \
3579 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3580 -e "s<@CMDLINE@<$cmdline<g" \
3581 -e "s<@SDLCONFIG@<$sdl<g" \
3582 <<EOF
3583 ## Automatically generated. http://www.rockbox.org/
3585 export ROOTDIR=@ROOTDIR@
3586 export FIRMDIR=@FIRMDIR@
3587 export APPSDIR=@APPSDIR@
3588 export TOOLSDIR=@TOOLSDIR@
3589 export DOCSDIR=\$(ROOTDIR)/docs
3590 export MANUALDIR=\${ROOTDIR}/manual
3591 export DEBUG=@DEBUG@
3592 export MODELNAME=@MODELNAME@
3593 export ARCHOSROM=@ARCHOSROM@
3594 export FLASHFILE=@FLASHFILE@
3595 export TARGET_ID=@TARGET_ID@
3596 export TARGET=@TARGET@
3597 export CPU=@CPU@
3598 export MANUFACTURER=@MANUFACTURER@
3599 export OBJDIR=@PWD@
3600 export BUILDDIR=@PWD@
3601 export LANGUAGE=@LANGUAGE@
3602 export VOICELANGUAGE=@VOICELANGUAGE@
3603 export MEMORYSIZE=@MEMORY@
3604 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3605 export MKFIRMWARE=@TOOL@
3606 export BMP2RB_MONO=@BMP2RB_MONO@
3607 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3608 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3609 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3610 export BINARY=@OUTPUT@
3611 export APPEXTRA=@APPEXTRA@
3612 export ENABLEDPLUGINS=@PLUGINS@
3613 export SOFTWARECODECS=@CODECS@
3614 export EXTRA_DEFINES=@EXTRADEF@
3615 export HOSTCC=@HOSTCC@
3616 export HOSTAR=@HOSTAR@
3617 export CC=@CC@
3618 export LD=@LD@
3619 export AR=@AR@
3620 export AS=@AS@
3621 export OC=@OC@
3622 export WINDRES=@WINDRES@
3623 export DLLTOOL=@DLLTOOL@
3624 export DLLWRAP=@DLLWRAP@
3625 export RANLIB=@RANLIB@
3626 export PREFIX=@PREFIX@
3627 export PROFILE_OPTS=@PROFILE_OPTS@
3628 export APP_TYPE=@APP_TYPE@
3629 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3630 export GCCOPTS=@GCCOPTS@
3631 export TARGET_INC=@TARGET_INC@
3632 export LOADADDRESS=@LOADADDRESS@
3633 export SHARED_FLAG=@SHARED_FLAG@
3634 export LDOPTS=@LDOPTS@
3635 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3636 export GCCVER=@GCCVER@
3637 export GCCNUM=@GCCNUM@
3638 export UNAME=@UNAME@
3639 export MANUALDEV=@MANUALDEV@
3640 export TTS_OPTS=@TTS_OPTS@
3641 export TTS_ENGINE=@TTS_ENGINE@
3642 export ENC_OPTS=@ENC_OPTS@
3643 export ENCODER=@ENCODER@
3644 export USE_ELF=@USE_ELF@
3645 export RBDIR=@RBDIR@
3646 export ROCKBOX_SHARE_PATH=@sharepath@
3647 export ROCKBOX_BINARY_PATH=@binpath@
3648 export ROCKBOX_LIBRARY_PATH=@libpath@
3649 export SDLCONFIG=@SDLCONFIG@
3651 CONFIGURE_OPTIONS=@CMDLINE@
3653 include \$(TOOLSDIR)/root.make
3657 echo "Created Makefile"