rbutil: store the voice language in the correct setting.
[kugel-rb.git] / tools / configure
blob3e54f818e53bd13270dc153fcf293e2e0138c2a4
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"
14 use_logf="#undef ROCKBOX_HAS_LOGF"
16 scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
18 rbdir=".rockbox"
21 # Begin Function Definitions
23 input() {
24 read response
25 echo $response
28 prefixtools () {
29 prefix="$1"
30 CC=${prefix}gcc
31 WINDRES=${prefix}windres
32 DLLTOOL=${prefix}dlltool
33 DLLWRAP=${prefix}dllwrap
34 RANLIB=${prefix}ranlib
35 LD=${prefix}ld
36 AR=${prefix}ar
37 AS=${prefix}as
38 OC=${prefix}objcopy
41 # scan the $PATH for the given command
42 findtool(){
43 file="$1"
45 IFS=":"
46 for path in $PATH
48 # echo "checks for $file in $path" >&2
49 if test -f "$path/$file"; then
50 echo "$path/$file"
51 return
53 done
54 # check whether caller wants literal return value if not found
55 if [ "$2" = "--lit" ]; then
56 echo "$file"
60 # scan the $PATH for sdl-config - if crosscompiling, require that it is
61 # a mingw32 sdl-config
62 findsdl(){
63 file="sdl-config"
65 IFS=":"
66 for path in $PATH
68 #echo "checks for $file in $path" >&2
69 if test -f "$path/$file"; then
70 if [ "yes" = "${crosscompile}" ]; then
71 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
72 echo "$path/$file"
73 return
75 else
76 echo "$path/$file"
77 return
80 done
83 simcc () {
85 # default tool setup for native building
86 prefixtools ""
88 simver=sdl
89 GCCOPTS='-W -Wall -g -fno-builtin'
90 GCCOPTIMIZE=''
92 output="rockboxui" # use this as default output binary name
93 sdl=`findsdl`
94 sdl_cflags=""
95 sdl_libs=""
97 if [ $1 = "sdl" ]; then
98 if [ -z "$sdl" ]; then
99 echo "configure didn't find sdl-config, which indicates that you"
100 echo "don't have SDL (properly) installed. Please correct and"
101 echo "re-run configure!"
102 exit 1
103 else
104 # generic sdl-config checker
105 sdl_cflags=`$sdl --cflags`
106 sdl_libs=`$sdl --libs`
110 # default share option, override below if needed
111 SHARED_FLAG="-shared"
113 case $uname in
114 CYGWIN*)
115 echo "Cygwin host detected"
117 # sdl version
118 GCCOPTS="$GCCOPTS $sdl_cflags"
119 LDOPTS="-mconsole $sdl_libs"
121 output="rockboxui.exe" # use this as output binary name
124 MINGW*)
125 echo "MinGW host detected"
127 # sdl version
128 GCCOPTS="$GCCOPTS $sdl_cflags"
129 LDOPTS="-mconsole $sdl_libs"
131 output="rockboxui.exe" # use this as output binary name
134 Linux)
135 echo "Linux host detected"
136 GCCOPTS="$GCCOPTS $sdl_cflags"
137 LDOPTS="$sdl_libs"
140 FreeBSD)
141 echo "FreeBSD host detected"
142 # sdl version
143 GCCOPTS="$GCCOPTS $sdl_cflags"
144 LDOPTS="$sdl_libs"
147 Darwin)
148 echo "Darwin host detected"
149 # sdl version
150 GCCOPTS="$GCCOPTS $sdl_cflags"
151 LDOPTS="$sdl_libs"
152 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
156 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
157 exit 2
159 esac
161 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
163 if test "X$crosscompile" != "Xyes"; then
164 if [ "`uname -m`" = "x86_64" ] || [ "`uname -m`" = "amd64" ]; then
165 # fPIC is needed to make shared objects link
166 # setting visibility to hidden is necessary to avoid strange crashes
167 # due to symbol clashing
168 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
171 id=$$
172 cat >$tmpdir/conftest-$id.c <<EOF
173 #include <stdio.h>
174 int main(int argc, char **argv)
176 int var=0;
177 char *varp = (char *)&var;
178 *varp=1;
180 printf("%d\n", var);
181 return 0;
185 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
187 if test `$tmpdir/conftest-$id 2>/dev/null` -gt "1"; then
188 # big endian
189 endian="big"
190 else
191 # little endian
192 endian="little"
195 if [ $1 = "sdl" ]; then
196 echo "Simulator environment deemed $endian endian"
197 elif [ $1 = "checkwps" ]; then
198 echo "CheckWPS environment deemed $endian endian"
201 # use wildcard here to make it work even if it was named *.exe like
202 # on cygwin
203 rm -f $tmpdir/conftest-$id*
204 else
205 # We are crosscompiling
206 # add cross-compiler option(s)
207 prefixtools i586-mingw32msvc-
208 LDOPTS="-mconsole $sdl_libs"
209 output="rockboxui.exe" # use this as output binary name
210 endian="little" # windows is little endian
215 # functions for setting up cross-compiler names and options
216 # also set endianess and what the exact recommended gcc version is
217 # the gcc version should most likely match what versions we build with
218 # rockboxdev.sh
220 shcc () {
221 prefixtools sh-elf-
222 GCCOPTS="$CCOPTS -m1"
223 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
224 endian="big"
225 gccchoice="4.0.3"
228 calmrisccc () {
229 prefixtools calmrisc16-unknown-elf-
230 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
231 GCCOPTIMIZE="-fomit-frame-pointer"
232 endian="big"
235 coldfirecc () {
236 prefixtools m68k-elf-
237 GCCOPTS="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
238 GCCOPTIMIZE="-fomit-frame-pointer"
239 endian="big"
240 gccchoice="3.4.6"
243 arm7tdmicc () {
244 prefixtools arm-elf-
245 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
246 if test "X$1" != "Xshort"; then
247 GCCOPTS="$GCCOPTS -mlong-calls"
249 GCCOPTIMIZE="-fomit-frame-pointer"
250 endian="little"
251 gccchoice="4.0.3"
254 arm9tdmicc () {
255 prefixtools arm-elf-
256 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
257 if test "$modelname" != "gigabeatf" -a "$t_manufacturer" != "as3525"; then
258 GCCOPTS="$GCCOPTS -mlong-calls"
260 GCCOPTIMIZE="-fomit-frame-pointer"
261 endian="little"
262 gccchoice="4.0.3"
265 arm940tbecc () {
266 prefixtools arm-elf-
267 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t -mlong-calls"
268 GCCOPTIMIZE="-fomit-frame-pointer"
269 endian="big"
270 gccchoice="4.0.3"
273 arm940tcc () {
274 prefixtools arm-elf-
275 GCCOPTS="$CCOPTS -mcpu=arm940t -mlong-calls"
276 GCCOPTIMIZE="-fomit-frame-pointer"
277 endian="little"
278 gccchoice="4.0.3"
281 arm946cc () {
282 prefixtools arm-elf-
283 GCCOPTS="$CCOPTS -mcpu=arm9e -mlong-calls"
284 GCCOPTIMIZE="-fomit-frame-pointer"
285 endian="little"
286 gccchoice="4.0.3"
289 arm926ejscc () {
290 prefixtools arm-elf-
291 GCCOPTS="$CCOPTS -mcpu=arm926ej-s -mlong-calls"
292 GCCOPTIMIZE="-fomit-frame-pointer"
293 endian="little"
294 gccchoice="4.0.3"
297 arm1136jfscc () {
298 prefixtools arm-elf-
299 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
300 if test "$modelname" != "gigabeats"; then
301 GCCOPTS="$GCCOPTS -mlong-calls"
303 GCCOPTIMIZE="-fomit-frame-pointer"
304 endian="little"
305 gccchoice="4.0.3"
308 arm1176jzscc () {
309 prefixtools arm-elf-
310 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s -mlong-calls"
311 GCCOPTIMIZE="-fomit-frame-pointer"
312 endian="little"
313 gccchoice="4.0.3"
316 mipselcc () {
317 prefixtools mipsel-elf-
318 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls"
319 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
320 GCCOPTIMIZE="-fomit-frame-pointer"
321 endian="little"
322 gccchoice="4.1.2"
325 whichadvanced () {
326 atype=`echo "$1" | cut -c 2-`
327 ##################################################################
328 # Prompt for specific developer options
330 if [ "$atype" ]; then
331 interact=
332 else
333 interact=1
334 echo ""
335 echo "Enter your developer options (press enter when done)"
336 printf "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile"
337 if [ "$memory" = "2" ]; then
338 printf ", (8)MB MOD"
340 if [ "$modelname" = "player" ]; then
341 printf ", Use (A)TA poweroff"
343 if [ "$t_model" = "ondio" ]; then
344 printf ", (B)acklight MOD"
346 if [ "$modelname" = "m5" ]; then
347 printf ", (F)M radio MOD"
349 if [ "$modelname" = "h120" ]; then
350 printf ", (R)TC MOD"
352 echo ""
355 cont=1
356 while [ $cont = "1" ]; do
358 if [ "$interact" ]; then
359 option=`input`
360 else
361 option=`echo "$atype" | cut -c 1`
364 case $option in
365 [Dd])
366 if [ "yes" = "$profile" ]; then
367 echo "Debug is incompatible with profiling"
368 else
369 echo "DEBUG build enabled"
370 use_debug="yes"
373 [Ll])
374 echo "logf() support enabled"
375 logf="yes"
377 [Ss])
378 echo "Simulator build enabled"
379 simulator="yes"
381 [Pp])
382 if [ "yes" = "$use_debug" ]; then
383 echo "Profiling is incompatible with debug"
384 else
385 echo "Profiling support is enabled"
386 profile="yes"
389 [Vv])
390 echo "Voice build selected"
391 voice="yes"
394 if [ "$memory" = "2" ]; then
395 memory="8"
396 echo "Memory size selected: 8MB"
399 [Aa])
400 if [ "$modelname" = "player" ]; then
401 have_ata_poweroff="#define HAVE_ATA_POWEROFF"
402 echo "ATA poweroff enabled"
405 [Bb])
406 if [ "$t_model" = "ondio" ]; then
407 have_backlight="#define HAVE_BACKLIGHT"
408 echo "Backlight functions enabled"
411 [Ff])
412 if [ "$modelname" = "m5" ]; then
413 have_fmradio_in="#define HAVE_FMRADIO_IN"
414 echo "FM radio functions enabled"
417 [Rr])
418 if [ "$modelname" = "h120" ]; then
419 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
420 have_rtc_alarm="#define HAVE_RTC_ALARM"
421 echo "RTC functions enabled (DS1339/DS3231)"
424 [Ww])
425 echo "Enabling Windows 32 cross-compiling"
426 crosscompile="yes"
429 if [ "$interact" ]; then
430 cont=0
431 else
432 echo "[ERROR] Option $option unsupported"
435 esac
436 if [ ! "$interact" ]; then
437 atype=`echo "$atype" | cut -c 2-`
438 [ "$atype" ] || cont=0
440 done
441 echo "done"
443 if [ "yes" = "$voice" ]; then
444 # Ask about languages to build
445 picklang
446 voicelanguage=`whichlang`
447 echo "Voice language set to $voicelanguage"
449 # Configure encoder and TTS engine for each language
450 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
451 voiceconfig "$thislang"
452 done
454 if [ "yes" = "$use_debug" ]; then
455 debug="-DDEBUG"
456 GCCOPTS="$GCCOPTS -g -DDEBUG"
458 if [ "yes" = "$logf" ]; then
459 use_logf="#define ROCKBOX_HAS_LOGF 1"
461 if [ "yes" = "$simulator" ]; then
462 debug="-DDEBUG"
463 extradefines="$extradefines -DSIMULATOR"
464 archosrom=""
465 flash=""
467 if [ "yes" = "$profile" ]; then
468 extradefines="$extradefines -DRB_PROFILE"
469 PROFILE_OPTS="-finstrument-functions"
473 # Configure voice settings
474 voiceconfig () {
475 thislang=$1
476 if [ ! "$ARG_TTS" ]; then
477 echo "Building $thislang voice for $modelname. Select options"
478 echo ""
481 if [ -n "`findtool flite`" ]; then
482 FLITE="F(l)ite "
483 FLITE_OPTS=""
484 DEFAULT_TTS="flite"
485 DEFAULT_TTS_OPTS=$FLITE_OPTS
486 DEFAULT_NOISEFLOOR="500"
487 DEFAULT_CHOICE="L"
489 if [ -n "`findtool espeak`" ]; then
490 ESPEAK="(e)Speak "
491 ESPEAK_OPTS=""
492 DEFAULT_TTS="espeak"
493 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
494 DEFAULT_NOISEFLOOR="500"
495 DEFAULT_CHOICE="e"
497 if [ -n "`findtool festival`" ]; then
498 FESTIVAL="(F)estival "
499 case "$thislang" in
500 "italiano")
501 FESTIVAL_OPTS="--language italian"
503 "espanol")
504 FESTIVAL_OPTS="--language spanish"
506 "finnish")
507 FESTIVAL_OPTS="--language finnish"
509 "czech")
510 FESTIVAL_OPTS="--language czech"
513 FESTIVAL_OPTS=""
515 esac
516 DEFAULT_TTS="festival"
517 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
518 DEFAULT_NOISEFLOOR="500"
519 DEFAULT_CHOICE="F"
521 if [ -n "`findtool swift`" ]; then
522 SWIFT="S(w)ift "
523 SWIFT_OPTS=""
524 DEFAULT_TTS="swift"
525 DEFAULT_TTS_OPTS=$SWIFT_OPTS
526 DEFAULT_NOISEFLOOR="500"
527 DEFAULT_CHOICE="w"
529 # Allow SAPI if Windows is in use
530 if [ -n "`findtool winver`" ]; then
531 SAPI="(S)API "
532 SAPI_OPTS=""
533 DEFAULT_TTS="sapi"
534 DEFAULT_TTS_OPTS=$SAPI_OPTS
535 DEFAULT_NOISEFLOOR="500"
536 DEFAULT_CHOICE="S"
539 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
540 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
541 exit 3
544 if [ "$ARG_TTS" ]; then
545 option=$ARG_TTS
546 else
547 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
548 option=`input`
550 advopts="$advopts --tts=$option"
551 case "$option" in
552 [Ll])
553 TTS_ENGINE="flite"
554 NOISEFLOOR="500" # TODO: check this value
555 TTS_OPTS=$FLITE_OPTS
557 [Ee])
558 TTS_ENGINE="espeak"
559 NOISEFLOOR="500"
560 TTS_OPTS=$ESPEAK_OPTS
562 [Ff])
563 TTS_ENGINE="festival"
564 NOISEFLOOR="500"
565 TTS_OPTS=$FESTIVAL_OPTS
567 [Ss])
568 TTS_ENGINE="sapi"
569 NOISEFLOOR="500"
570 TTS_OPTS=$SAPI_OPTS
572 [Ww])
573 TTS_ENGINE="swift"
574 NOISEFLOOR="500"
575 TTS_OPTS=$SWIFT_OPTS
578 TTS_ENGINE=$DEFAULT_TTS
579 TTS_OPTS=$DEFAULT_TTS_OPTS
580 NOISEFLOOR=$DEFAULT_NOISEFLOOR
581 esac
582 echo "Using $TTS_ENGINE for TTS"
584 # Select which voice to use for Festival
585 if [ "$TTS_ENGINE" = "festival" ]; then
586 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
587 for voice in $voicelist; do
588 TTS_FESTIVAL_VOICE="$voice" # Default choice
589 break
590 done
591 if [ "$ARG_VOICE" ]; then
592 CHOICE=$ARG_VOICE
593 else
595 for voice in $voicelist; do
596 printf "%3d. %s\n" "$i" "$voice"
597 i=`expr $i + 1`
598 done
599 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
600 CHOICE=`input`
603 for voice in $voicelist; do
604 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
605 TTS_FESTIVAL_VOICE="$voice"
607 i=`expr $i + 1`
608 done
609 advopts="$advopts --voice=$CHOICE"
610 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
611 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
614 # Allow the user to input manual commandline options
615 if [ "$ARG_TTSOPTS" ]; then
616 USER_TTS_OPTS=$ARG_TTSOPTS
617 else
618 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
619 USER_TTS_OPTS=`input`
620 echo ""
622 advopts="$advopts --ttsopts='$USER_TTS_OPTS'"
623 if [ -n "$USER_TTS_OPTS" ]; then
624 TTS_OPTS="$USER_TTS_OPTS"
626 echo "$TTS_ENGINE options set to $TTS_OPTS"
628 if [ "$swcodec" = "yes" ]; then
629 ENCODER="rbspeexenc"
630 ENC_CMD="rbspeexenc"
631 ENC_OPTS="-q 4 -c 10"
632 else
633 if [ -n "`findtool lame`" ]; then
634 ENCODER="lame"
635 ENC_CMD="lame"
636 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
637 else
638 echo "You need LAME in the system path to build voice files for"
639 echo "HWCODEC targets."
640 exit 4
644 echo "Using $ENCODER for encoding voice clips"
646 # Allow the user to input manual commandline options
647 if [ "$ARG_ENCOPTS" ]; then
648 USER_ENC_OPTS=$ARG_ENCOPTS
649 else
650 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
651 USER_ENC_OPTS=`input`
653 advopts="$advopts --encopts='$USER_ENC_OPTS'"
654 if [ -n "$USER_ENC_OPTS" ]; then
655 ENC_OPTS=$USER_ENC_OPTS
657 echo "$ENCODER options set to $ENC_OPTS"
659 TEMPDIR="${pwd}"
660 if [ -n "`findtool cygpath`" ]; then
661 TEMPDIR=`cygpath . -a -w`
665 picklang() {
666 # figure out which languages that are around
667 for file in $rootdir/apps/lang/*.lang; do
668 clean=`basename $file .lang`
669 langs="$langs $clean"
670 done
672 if [ "$ARG_LANG" ]; then
673 pick=$ARG_LANG
674 else
675 echo "Select a number for the language to use (default is english)"
676 # FIXME The multiple-language feature is currently broken
677 # echo "You may enter a comma-separated list of languages to build"
679 num=1
680 for one in $langs; do
681 echo "$num. $one"
682 num=`expr $num + 1`
683 done
684 pick=`input`
686 advopts="$advopts --language=$pick"
689 whichlang() {
690 output=""
691 # Allow the user to pass a comma-separated list of langauges
692 for thispick in `echo $pick | sed 's/,/ /g'`; do
693 num=1
694 for one in $langs; do
695 # Accept both the language number and name
696 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
697 if [ "$output" = "" ]; then
698 output=$one
699 else
700 output=$output,$one
703 num=`expr $num + 1`
704 done
705 done
706 if [ -z "$output" ]; then
707 # pick a default
708 output="english"
710 echo $output
713 help() {
714 echo "Rockbox configure script."
715 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
716 echo "Do *NOT* run this within the tools directory!"
717 echo ""
718 cat <<EOF
719 Usage: configure [OPTION]...
720 Options:
721 --target=TARGET Sets the target, TARGET can be either the target ID or
722 corresponding string. Run without this option to see all
723 available targets.
725 --ram=RAM Sets the RAM for certain targets. Even though any number
726 is accepted, not every number is correct. The default
727 value will be applied, if you entered a wrong number
728 (which depends on the target). Watch the output. Run
729 without this option if you are not sure which the right
730 number is.
732 --type=TYPE Sets the build type. Shortcuts are also valid.
733 Run without this option to see all available types.
734 Multiple values are allowed and managed in the input
735 order. So --type=b stands for Bootloader build, while
736 --type=ab stands for "Backlight MOD" build.
738 --language=LANG Set the language used for voice generation (used only if
739 TYPE is AV).
741 --tts=ENGINE Set the TTS engine used for voice generation (used only
742 if TYPE is AV).
744 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
745 AV).
747 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
749 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
751 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
752 This is useful for having multiple alternate builds on
753 your device that you can load with ROLO. However as the
754 bootloader looks for .rockbox you won't be able to boot
755 into this build.
757 --ccache Enable ccache use (done by default these days)
758 --no-ccache Disable ccache use
759 --help Shows this message (must not be used with other options)
763 exit
766 ARG_CCACHE=
767 ARG_ENCOPTS=
768 ARG_LANG=
769 ARG_RAM=
770 ARG_RBDIR=
771 ARG_TARGET=
772 ARG_TTS=
773 ARG_TTSOPTS=
774 ARG_TYPE=
775 ARG_VOICE=
776 err=
777 for arg in "$@"; do
778 case "$arg" in
779 --ccache) ARG_CCACHE=1;;
780 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
781 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
782 --no-ccache) ARG_CCACHE=0;;
783 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
784 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
785 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
786 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
787 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
788 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
789 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
790 --help) help;;
791 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
792 esac
793 done
794 [ "$err" ] && exit 1
796 advopts=
798 if [ "$TMPDIR" != "" ]; then
799 tmpdir=$TMPDIR
800 else
801 tmpdir=/tmp
803 echo Using temporary directory $tmpdir
805 if test -r "configure"; then
806 # this is a check for a configure script in the current directory, it there
807 # is one, try to figure out if it is this one!
809 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
810 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
811 echo "It will only cause you pain and grief. Instead do this:"
812 echo ""
813 echo " cd .."
814 echo " mkdir build-dir"
815 echo " cd build-dir"
816 echo " ../tools/configure"
817 echo ""
818 echo "Much happiness will arise from this. Enjoy"
819 exit 5
823 # get our current directory
824 pwd=`pwd`;
826 if { echo $pwd | grep " "; } then
827 echo "You're running this script in a path that contains space. The build"
828 echo "system is unfortunately not clever enough to deal with this. Please"
829 echo "run the script from a different path, rename the path or fix the build"
830 echo "system!"
831 exit 6
834 if [ -z "$rootdir" ]; then
835 ##################################################################
836 # Figure out where the source code root is!
838 rootdir=`dirname $0`/../
840 #####################################################################
841 # Convert the possibly relative directory name to an absolute version
843 now=`pwd`
844 cd $rootdir
845 rootdir=`pwd`
847 # cd back to the build dir
848 cd $now
851 apps="apps"
852 appsdir='\$(ROOTDIR)/apps'
853 firmdir='\$(ROOTDIR)/firmware'
854 toolsdir='\$(ROOTDIR)/tools'
857 ##################################################################
858 # Figure out target platform
861 if [ "$ARG_TARGET" ]; then
862 buildfor=$ARG_TARGET
863 else
864 echo "Enter target platform:"
865 cat <<EOF
866 ==Archos== ==iriver== ==Apple iPod==
867 0) Player/Studio 10) H120/H140 20) Color/Photo
868 1) Recorder 11) H320/H340 21) Nano
869 2) FM Recorder 12) iHP-100/110/115 22) Video
870 3) Recorder v2 13) iFP-790 23) 3G
871 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
872 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
873 6) AV300 26) Mini 2G
874 ==Toshiba== 27) 1G, 2G
875 ==Cowon/iAudio== 40) Gigabeat F 28) Nano 2G
876 30) X5/X5V/X5L 41) Gigabeat S
877 31) M5/M5L ==SanDisk==
878 32) 7 ==Olympus= 50) Sansa e200
879 33) D2 70) M:Robe 500 51) Sansa e200R
880 34) M3/M3L 71) M:Robe 100 52) Sansa c200
881 53) Sansa m200
882 ==Creative== ==Philips== 54) Sansa c100
883 90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip
884 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2
885 92) Zen Vision HDD1830 57) Sansa m200v4
886 58) Sansa Fuze
887 ==Onda== ==Meizu== 59) Sansa c200v2
888 120) VX747 110) M6SL 60) Sansa Clipv2
889 121) VX767 111) M6SP 61) Sansa View
890 122) VX747+ 112) M3
891 123) VX777 ==Logik==
892 80) DAX 1GB MP3/DAB
893 ==Samsung== ==Tatung==
894 140) YH-820 150) Elio TPJ-1022 ==Lyre project==
895 141) YH-920 130) Lyre proto 1
896 142) YH-925
897 143) YP-S3
900 buildfor=`input`;
903 # Set of tools built for all target platforms:
904 toolset="rdf2binary convbdf codepages"
906 # Toolsets for some target families:
907 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
908 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
909 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
910 ipodbitmaptools="$toolset scramble bmp2rb"
911 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
912 tccbitmaptools="$toolset scramble mktccboot bmp2rb"
913 # generic is used by IFP, Meizu and Onda
914 genericbitmaptools="$toolset bmp2rb"
915 # scramble is used by all other targets
916 scramblebitmaptools="$genericbitmaptools scramble"
919 # ---- For each target ----
921 # *Variables*
922 # target_id: a unique number identifying this target, IS NOT the menu number.
923 # Just use the currently highest number+1 when you add a new
924 # target.
925 # modelname: short model name used all over to identify this target
926 # memory: number of megabytes of RAM this target has. If the amount can
927 # be selected by the size prompt, let memory be unset here
928 # target: -Ddefine passed to the build commands to make the correct
929 # config-*.h file get included etc
930 # tool: the tool that takes a plain binary and converts that into a
931 # working "firmware" file for your target
932 # output: the final output file name
933 # boottool: the tool that takes a plain binary and generates a bootloader
934 # file for your target (or blank to use $tool)
935 # bootoutput:the final output file name for the bootloader (or blank to use
936 # $output)
937 # appextra: passed to the APPEXTRA variable in the Makefiles.
938 # TODO: add proper explanation
939 # archosrom: used only for Archos targets that build a special flashable .ucl
940 # image.
941 # flash: name of output for flashing, for targets where there's a special
942 # file output for this.
943 # plugins: set to 'yes' to build the plugins. Early development builds can
944 # set this to no in the early stages to have an easier life for a
945 # while
946 # swcodec: set 'yes' on swcodec targets
947 # toolset: lists what particular tools in the tools/ directory that this
948 # target needs to have built prior to building Rockbox
950 # *Functions*
951 # *cc: sets up gcc and compiler options for your target builds. Note
952 # that if you select a simulator build, the compiler selection is
953 # overridden later in the script.
955 case $buildfor in
957 0|player)
958 target_id=1
959 modelname="player"
960 target="-DARCHOS_PLAYER"
961 shcc
962 tool="$rootdir/tools/scramble"
963 output="archos.mod"
964 appextra="player:gui"
965 archosrom="$pwd/rombox.ucl"
966 flash="$pwd/rockbox.ucl"
967 plugins="yes"
968 swcodec=""
970 # toolset is the tools within the tools directory that we build for
971 # this particular target.
972 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
974 # Note: the convbdf is present in the toolset just because: 1) the
975 # firmware/Makefile assumes it is present always, and 2) we will need it when we
976 # build the player simulator
978 t_cpu="sh"
979 t_manufacturer="archos"
980 t_model="player"
983 1|recorder)
984 target_id=2
985 modelname="recorder"
986 target="-DARCHOS_RECORDER"
987 shcc
988 tool="$rootdir/tools/scramble"
989 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
990 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
991 output="ajbrec.ajz"
992 appextra="recorder:gui"
993 #archosrom="$pwd/rombox.ucl"
994 flash="$pwd/rockbox.ucl"
995 plugins="yes"
996 swcodec=""
997 # toolset is the tools within the tools directory that we build for
998 # this particular target.
999 toolset=$archosbitmaptools
1000 t_cpu="sh"
1001 t_manufacturer="archos"
1002 t_model="recorder"
1005 2|fmrecorder)
1006 target_id=3
1007 modelname="fmrecorder"
1008 target="-DARCHOS_FMRECORDER"
1009 shcc
1010 tool="$rootdir/tools/scramble -fm"
1011 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1012 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1013 output="ajbrec.ajz"
1014 appextra="recorder:gui"
1015 #archosrom="$pwd/rombox.ucl"
1016 flash="$pwd/rockbox.ucl"
1017 plugins="yes"
1018 swcodec=""
1019 # toolset is the tools within the tools directory that we build for
1020 # this particular target.
1021 toolset=$archosbitmaptools
1022 t_cpu="sh"
1023 t_manufacturer="archos"
1024 t_model="fm_v2"
1027 3|recorderv2)
1028 target_id=4
1029 modelname="recorderv2"
1030 target="-DARCHOS_RECORDERV2"
1031 shcc
1032 tool="$rootdir/tools/scramble -v2"
1033 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1034 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1035 output="ajbrec.ajz"
1036 appextra="recorder:gui"
1037 #archosrom="$pwd/rombox.ucl"
1038 flash="$pwd/rockbox.ucl"
1039 plugins="yes"
1040 swcodec=""
1041 # toolset is the tools within the tools directory that we build for
1042 # this particular target.
1043 toolset=$archosbitmaptools
1044 t_cpu="sh"
1045 t_manufacturer="archos"
1046 t_model="fm_v2"
1049 4|ondiosp)
1050 target_id=7
1051 modelname="ondiosp"
1052 target="-DARCHOS_ONDIOSP"
1053 shcc
1054 tool="$rootdir/tools/scramble -osp"
1055 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1056 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1057 output="ajbrec.ajz"
1058 appextra="recorder:gui"
1059 archosrom="$pwd/rombox.ucl"
1060 flash="$pwd/rockbox.ucl"
1061 plugins="yes"
1062 swcodec=""
1063 # toolset is the tools within the tools directory that we build for
1064 # this particular target.
1065 toolset=$archosbitmaptools
1066 t_cpu="sh"
1067 t_manufacturer="archos"
1068 t_model="ondio"
1071 5|ondiofm)
1072 target_id=8
1073 modelname="ondiofm"
1074 target="-DARCHOS_ONDIOFM"
1075 shcc
1076 tool="$rootdir/tools/scramble -ofm"
1077 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1078 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1079 output="ajbrec.ajz"
1080 appextra="recorder:gui"
1081 #archosrom="$pwd/rombox.ucl"
1082 flash="$pwd/rockbox.ucl"
1083 plugins="yes"
1084 swcodec=""
1085 toolset=$archosbitmaptools
1086 t_cpu="sh"
1087 t_manufacturer="archos"
1088 t_model="ondio"
1091 6|av300)
1092 target_id=38
1093 modelname="av300"
1094 target="-DARCHOS_AV300"
1095 memory=16 # always
1096 arm7tdmicc
1097 tool="$rootdir/tools/scramble -mm=C"
1098 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1099 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1100 output="cjbm.ajz"
1101 appextra="recorder:gui"
1102 plugins="yes"
1103 swcodec=""
1104 # toolset is the tools within the tools directory that we build for
1105 # this particular target.
1106 toolset="$toolset scramble descramble bmp2rb"
1107 # architecture, manufacturer and model for the target-tree build
1108 t_cpu="arm"
1109 t_manufacturer="archos"
1110 t_model="av300"
1113 10|h120)
1114 target_id=9
1115 modelname="h120"
1116 target="-DIRIVER_H120"
1117 memory=32 # always
1118 coldfirecc
1119 tool="$rootdir/tools/scramble -add=h120"
1120 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1121 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1122 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1123 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1124 output="rockbox.iriver"
1125 appextra="recorder:gui"
1126 flash="$pwd/rombox.iriver"
1127 plugins="yes"
1128 swcodec="yes"
1129 # toolset is the tools within the tools directory that we build for
1130 # this particular target.
1131 toolset=$iriverbitmaptools
1132 t_cpu="coldfire"
1133 t_manufacturer="iriver"
1134 t_model="h100"
1137 11|h300)
1138 target_id=10
1139 modelname="h300"
1140 target="-DIRIVER_H300"
1141 memory=32 # always
1142 coldfirecc
1143 tool="$rootdir/tools/scramble -add=h300"
1144 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1145 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1146 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1147 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1148 output="rockbox.iriver"
1149 appextra="recorder:gui"
1150 plugins="yes"
1151 swcodec="yes"
1152 # toolset is the tools within the tools directory that we build for
1153 # this particular target.
1154 toolset=$iriverbitmaptools
1155 t_cpu="coldfire"
1156 t_manufacturer="iriver"
1157 t_model="h300"
1160 12|h100)
1161 target_id=11
1162 modelname="h100"
1163 target="-DIRIVER_H100"
1164 memory=16 # always
1165 coldfirecc
1166 tool="$rootdir/tools/scramble -add=h100"
1167 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1168 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1169 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1170 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1171 output="rockbox.iriver"
1172 appextra="recorder:gui"
1173 flash="$pwd/rombox.iriver"
1174 plugins="yes"
1175 swcodec="yes"
1176 # toolset is the tools within the tools directory that we build for
1177 # this particular target.
1178 toolset=$iriverbitmaptools
1179 t_cpu="coldfire"
1180 t_manufacturer="iriver"
1181 t_model="h100"
1184 13|ifp7xx)
1185 target_id=19
1186 modelname="ifp7xx"
1187 target="-DIRIVER_IFP7XX"
1188 memory=1
1189 arm7tdmicc short
1190 tool="cp"
1191 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1192 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1193 output="rockbox.wma"
1194 appextra="recorder:gui"
1195 plugins="yes"
1196 swcodec="yes"
1197 # toolset is the tools within the tools directory that we build for
1198 # this particular target.
1199 toolset=$genericbitmaptools
1200 t_cpu="arm"
1201 t_manufacturer="pnx0101"
1202 t_model="iriver-ifp7xx"
1205 14|h10)
1206 target_id=22
1207 modelname="h10"
1208 target="-DIRIVER_H10"
1209 memory=32 # always
1210 arm7tdmicc
1211 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1212 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1213 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1214 output="rockbox.mi4"
1215 appextra="recorder:gui"
1216 plugins="yes"
1217 swcodec="yes"
1218 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1219 bootoutput="H10_20GC.mi4"
1220 # toolset is the tools within the tools directory that we build for
1221 # this particular target.
1222 toolset=$scramblebitmaptools
1223 # architecture, manufacturer and model for the target-tree build
1224 t_cpu="arm"
1225 t_manufacturer="iriver"
1226 t_model="h10"
1229 15|h10_5gb)
1230 target_id=24
1231 modelname="h10_5gb"
1232 target="-DIRIVER_H10_5GB"
1233 memory=32 # always
1234 arm7tdmicc
1235 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1236 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1237 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1238 output="rockbox.mi4"
1239 appextra="recorder:gui"
1240 plugins="yes"
1241 swcodec="yes"
1242 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1243 bootoutput="H10.mi4"
1244 # toolset is the tools within the tools directory that we build for
1245 # this particular target.
1246 toolset=$scramblebitmaptools
1247 # architecture, manufacturer and model for the target-tree build
1248 t_cpu="arm"
1249 t_manufacturer="iriver"
1250 t_model="h10"
1253 20|ipodcolor)
1254 target_id=13
1255 modelname="ipodcolor"
1256 target="-DIPOD_COLOR"
1257 memory=32 # always
1258 arm7tdmicc
1259 tool="$rootdir/tools/scramble -add=ipco"
1260 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1261 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1262 output="rockbox.ipod"
1263 appextra="recorder:gui"
1264 plugins="yes"
1265 swcodec="yes"
1266 bootoutput="bootloader-$modelname.ipod"
1267 # toolset is the tools within the tools directory that we build for
1268 # this particular target.
1269 toolset=$ipodbitmaptools
1270 # architecture, manufacturer and model for the target-tree build
1271 t_cpu="arm"
1272 t_manufacturer="ipod"
1273 t_model="color"
1276 21|ipodnano)
1277 target_id=14
1278 modelname="ipodnano"
1279 target="-DIPOD_NANO"
1280 memory=32 # always
1281 arm7tdmicc
1282 tool="$rootdir/tools/scramble -add=nano"
1283 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1284 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1285 output="rockbox.ipod"
1286 appextra="recorder:gui"
1287 plugins="yes"
1288 swcodec="yes"
1289 bootoutput="bootloader-$modelname.ipod"
1290 # toolset is the tools within the tools directory that we build for
1291 # this particular target.
1292 toolset=$ipodbitmaptools
1293 # architecture, manufacturer and model for the target-tree build
1294 t_cpu="arm"
1295 t_manufacturer="ipod"
1296 t_model="nano"
1299 22|ipodvideo)
1300 target_id=15
1301 modelname="ipodvideo"
1302 target="-DIPOD_VIDEO"
1303 arm7tdmicc
1304 tool="$rootdir/tools/scramble -add=ipvd"
1305 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1306 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1307 output="rockbox.ipod"
1308 appextra="recorder:gui"
1309 plugins="yes"
1310 swcodec="yes"
1311 bootoutput="bootloader-$modelname.ipod"
1312 # toolset is the tools within the tools directory that we build for
1313 # this particular target.
1314 toolset=$ipodbitmaptools
1315 # architecture, manufacturer and model for the target-tree build
1316 t_cpu="arm"
1317 t_manufacturer="ipod"
1318 t_model="video"
1321 23|ipod3g)
1322 target_id=16
1323 modelname="ipod3g"
1324 target="-DIPOD_3G"
1325 memory=32 # always
1326 arm7tdmicc
1327 tool="$rootdir/tools/scramble -add=ip3g"
1328 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1329 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1330 output="rockbox.ipod"
1331 appextra="recorder:gui"
1332 plugins="yes"
1333 swcodec="yes"
1334 bootoutput="bootloader-$modelname.ipod"
1335 # toolset is the tools within the tools directory that we build for
1336 # this particular target.
1337 toolset=$ipodbitmaptools
1338 # architecture, manufacturer and model for the target-tree build
1339 t_cpu="arm"
1340 t_manufacturer="ipod"
1341 t_model="3g"
1344 24|ipod4g)
1345 target_id=17
1346 modelname="ipod4g"
1347 target="-DIPOD_4G"
1348 memory=32 # always
1349 arm7tdmicc
1350 tool="$rootdir/tools/scramble -add=ip4g"
1351 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1352 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1353 output="rockbox.ipod"
1354 appextra="recorder:gui"
1355 plugins="yes"
1356 swcodec="yes"
1357 bootoutput="bootloader-$modelname.ipod"
1358 # toolset is the tools within the tools directory that we build for
1359 # this particular target.
1360 toolset=$ipodbitmaptools
1361 # architecture, manufacturer and model for the target-tree build
1362 t_cpu="arm"
1363 t_manufacturer="ipod"
1364 t_model="4g"
1367 25|ipodmini)
1368 target_id=18
1369 modelname="ipodmini"
1370 target="-DIPOD_MINI"
1371 memory=32 # always
1372 arm7tdmicc
1373 tool="$rootdir/tools/scramble -add=mini"
1374 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1375 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1376 output="rockbox.ipod"
1377 appextra="recorder:gui"
1378 plugins="yes"
1379 swcodec="yes"
1380 bootoutput="bootloader-$modelname.ipod"
1381 # toolset is the tools within the tools directory that we build for
1382 # this particular target.
1383 toolset=$ipodbitmaptools
1384 # architecture, manufacturer and model for the target-tree build
1385 t_cpu="arm"
1386 t_manufacturer="ipod"
1387 t_model="mini"
1390 26|ipodmini2g)
1391 target_id=21
1392 modelname="ipodmini2g"
1393 target="-DIPOD_MINI2G"
1394 memory=32 # always
1395 arm7tdmicc
1396 tool="$rootdir/tools/scramble -add=mn2g"
1397 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1398 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1399 output="rockbox.ipod"
1400 appextra="recorder:gui"
1401 plugins="yes"
1402 swcodec="yes"
1403 bootoutput="bootloader-$modelname.ipod"
1404 # toolset is the tools within the tools directory that we build for
1405 # this particular target.
1406 toolset=$ipodbitmaptools
1407 # architecture, manufacturer and model for the target-tree build
1408 t_cpu="arm"
1409 t_manufacturer="ipod"
1410 t_model="mini2g"
1413 27|ipod1g2g)
1414 target_id=29
1415 modelname="ipod1g2g"
1416 target="-DIPOD_1G2G"
1417 memory=32 # always
1418 arm7tdmicc
1419 tool="$rootdir/tools/scramble -add=1g2g"
1420 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1421 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1422 output="rockbox.ipod"
1423 appextra="recorder:gui"
1424 plugins="yes"
1425 swcodec="yes"
1426 bootoutput="bootloader-$modelname.ipod"
1427 # toolset is the tools within the tools directory that we build for
1428 # this particular target.
1429 toolset=$ipodbitmaptools
1430 # architecture, manufacturer and model for the target-tree build
1431 t_cpu="arm"
1432 t_manufacturer="ipod"
1433 t_model="1g2g"
1436 28|ipodnano2g)
1437 target_id=62
1438 modelname="ipodnano2g"
1439 target="-DIPOD_NANO2G"
1440 memory=32 # always
1441 arm940tcc
1442 tool="$rootdir/tools/scramble -add=nn2g"
1443 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1444 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1445 output="rockbox.ipod"
1446 appextra="recorder:gui"
1447 plugins="yes"
1448 swcodec="yes"
1449 bootoutput="bootloader-$modelname.ipod"
1450 # toolset is the tools within the tools directory that we build for
1451 # this particular target.
1452 toolset=$ipodbitmaptools
1453 # architecture, manufacturer and model for the target-tree build
1454 t_cpu="arm"
1455 t_manufacturer="s5l8700"
1456 t_model="ipodnano2g"
1459 30|x5)
1460 target_id=12
1461 modelname="x5"
1462 target="-DIAUDIO_X5"
1463 memory=16 # always
1464 coldfirecc
1465 tool="$rootdir/tools/scramble -add=iax5"
1466 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1467 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1468 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1469 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1470 output="rockbox.iaudio"
1471 appextra="recorder:gui"
1472 plugins="yes"
1473 swcodec="yes"
1474 # toolset is the tools within the tools directory that we build for
1475 # this particular target.
1476 toolset="$iaudiobitmaptools"
1477 # architecture, manufacturer and model for the target-tree build
1478 t_cpu="coldfire"
1479 t_manufacturer="iaudio"
1480 t_model="x5"
1483 31|m5)
1484 target_id=28
1485 modelname="m5"
1486 target="-DIAUDIO_M5"
1487 memory=16 # always
1488 coldfirecc
1489 tool="$rootdir/tools/scramble -add=iam5"
1490 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1491 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1492 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1493 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1494 output="rockbox.iaudio"
1495 appextra="recorder:gui"
1496 plugins="yes"
1497 swcodec="yes"
1498 # toolset is the tools within the tools directory that we build for
1499 # this particular target.
1500 toolset="$iaudiobitmaptools"
1501 # architecture, manufacturer and model for the target-tree build
1502 t_cpu="coldfire"
1503 t_manufacturer="iaudio"
1504 t_model="m5"
1507 32|iaudio7)
1508 target_id=32
1509 modelname="iaudio7"
1510 target="-DIAUDIO_7"
1511 memory=16 # always
1512 arm946cc
1513 tool="$rootdir/tools/scramble -add=i7"
1514 boottool="$rootdir/tools/scramble -tcc=crc"
1515 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1516 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1517 output="rockbox.iaudio"
1518 appextra="recorder:gui"
1519 plugins="yes"
1520 swcodec="yes"
1521 bootoutput="I7_FW.BIN"
1522 # toolset is the tools within the tools directory that we build for
1523 # this particular target.
1524 toolset="$tccbitmaptools"
1525 # architecture, manufacturer and model for the target-tree build
1526 t_cpu="arm"
1527 t_manufacturer="tcc77x"
1528 t_model="iaudio7"
1531 33|cowond2)
1532 target_id=34
1533 modelname="cowond2"
1534 target="-DCOWON_D2"
1535 memory=32
1536 arm926ejscc
1537 tool="$rootdir/tools/scramble -add=d2"
1538 boottool="$rootdir/tools/scramble -tcc=crc"
1539 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1540 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1541 output="rockbox.d2"
1542 appextra="recorder:gui"
1543 plugins="yes"
1544 swcodec="yes"
1545 toolset="$tccbitmaptools"
1546 # architecture, manufacturer and model for the target-tree build
1547 t_cpu="arm"
1548 t_manufacturer="tcc780x"
1549 t_model="cowond2"
1552 34|m3)
1553 target_id=37
1554 modelname="m3"
1555 target="-DIAUDIO_M3"
1556 memory=16 # always
1557 coldfirecc
1558 tool="$rootdir/tools/scramble -add=iam3"
1559 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1560 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1561 output="rockbox.iaudio"
1562 appextra="recorder:gui"
1563 plugins="yes"
1564 swcodec="yes"
1565 # toolset is the tools within the tools directory that we build for
1566 # this particular target.
1567 toolset="$iaudiobitmaptools"
1568 # architecture, manufacturer and model for the target-tree build
1569 t_cpu="coldfire"
1570 t_manufacturer="iaudio"
1571 t_model="m3"
1574 40|gigabeatf)
1575 target_id=20
1576 modelname="gigabeatf"
1577 target="-DGIGABEAT_F"
1578 memory=32 # always
1579 arm9tdmicc
1580 tool="$rootdir/tools/scramble -add=giga"
1581 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1582 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1583 output="rockbox.gigabeat"
1584 appextra="recorder:gui"
1585 plugins="yes"
1586 swcodec="yes"
1587 toolset=$gigabeatbitmaptools
1588 boottool="$rootdir/tools/scramble -gigabeat"
1589 bootoutput="FWIMG01.DAT"
1590 # architecture, manufacturer and model for the target-tree build
1591 t_cpu="arm"
1592 t_manufacturer="s3c2440"
1593 t_model="gigabeat-fx"
1596 41|gigabeats)
1597 target_id=26
1598 modelname="gigabeats"
1599 target="-DGIGABEAT_S"
1600 memory=64
1601 arm1136jfscc
1602 tool="$rootdir/tools/scramble -add=gigs"
1603 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1604 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1605 output="rockbox.gigabeat"
1606 appextra="recorder:gui"
1607 plugins="yes"
1608 swcodec="yes"
1609 toolset="$gigabeatbitmaptools mknkboot"
1610 boottool="$rootdir/tools/scramble -gigabeats"
1611 bootoutput="nk.bin"
1612 # architecture, manufacturer and model for the target-tree build
1613 t_cpu="arm"
1614 t_manufacturer="imx31"
1615 t_model="gigabeat-s"
1618 70|mrobe500)
1619 target_id=36
1620 modelname="mrobe500"
1621 target="-DMROBE_500"
1622 memory=64 # always
1623 arm926ejscc
1624 tool="$rootdir/tools/scramble -add=m500"
1625 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1626 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1627 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1628 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1629 output="rockbox.mrobe500"
1630 appextra="recorder:gui"
1631 plugins="yes"
1632 swcodec="yes"
1633 toolset=$gigabeatbitmaptools
1634 boottool="cp "
1635 bootoutput="rockbox.mrboot"
1636 # architecture, manufacturer and model for the target-tree build
1637 t_cpu="arm"
1638 t_manufacturer="tms320dm320"
1639 t_model="mrobe-500"
1642 71|mrobe100)
1643 target_id=33
1644 modelname="mrobe100"
1645 target="-DMROBE_100"
1646 memory=32 # always
1647 arm7tdmicc
1648 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1649 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1650 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1651 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1652 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1653 output="rockbox.mi4"
1654 appextra="recorder:gui"
1655 plugins="yes"
1656 swcodec="yes"
1657 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1658 bootoutput="pp5020.mi4"
1659 # toolset is the tools within the tools directory that we build for
1660 # this particular target.
1661 toolset=$scramblebitmaptools
1662 # architecture, manufacturer and model for the target-tree build
1663 t_cpu="arm"
1664 t_manufacturer="olympus"
1665 t_model="mrobe-100"
1668 80|logikdax)
1669 target_id=31
1670 modelname="logikdax"
1671 target="-DLOGIK_DAX"
1672 memory=2 # always
1673 arm946cc
1674 tool="$rootdir/tools/scramble -add=ldax"
1675 boottool="$rootdir/tools/scramble -tcc=crc"
1676 bootoutput="player.rom"
1677 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1678 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1679 output="rockbox.logik"
1680 appextra="recorder:gui"
1681 plugins=""
1682 swcodec="yes"
1683 # toolset is the tools within the tools directory that we build for
1684 # this particular target.
1685 toolset=$tccbitmaptools
1686 # architecture, manufacturer and model for the target-tree build
1687 t_cpu="arm"
1688 t_manufacturer="tcc77x"
1689 t_model="logikdax"
1692 90|creativezvm30gb)
1693 target_id=35
1694 modelname="creativezvm30gb"
1695 target="-DCREATIVE_ZVM"
1696 memory=64
1697 arm926ejscc
1698 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1699 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1700 tool="$rootdir/tools/scramble -creative=zvm"
1701 USE_ELF="yes"
1702 output="rockbox.zvm"
1703 appextra="recorder:gui"
1704 plugins="yes"
1705 swcodec="yes"
1706 toolset=$ipodbitmaptools
1707 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1708 bootoutput="rockbox.zvmboot"
1709 # architecture, manufacturer and model for the target-tree build
1710 t_cpu="arm"
1711 t_manufacturer="tms320dm320"
1712 t_model="creative-zvm"
1715 91|creativezvm60gb)
1716 target_id=40
1717 modelname="creativezvm60gb"
1718 target="-DCREATIVE_ZVM60GB"
1719 memory=64
1720 arm926ejscc
1721 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1722 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1723 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1724 USE_ELF="yes"
1725 output="rockbox.zvm60"
1726 appextra="recorder:gui"
1727 plugins="yes"
1728 swcodec="yes"
1729 toolset=$ipodbitmaptools
1730 boottool="$rootdir/tools/scramble -creative=zvm60"
1731 bootoutput="rockbox.zvm60boot"
1732 # architecture, manufacturer and model for the target-tree build
1733 t_cpu="arm"
1734 t_manufacturer="tms320dm320"
1735 t_model="creative-zvm"
1738 92|creativezenvision)
1739 target_id=39
1740 modelname="creativezenvision"
1741 target="-DCREATIVE_ZV"
1742 memory=64
1743 arm926ejscc
1744 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1745 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1746 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1747 USE_ELF="yes"
1748 output="rockbox.zv"
1749 appextra="recorder:gui"
1750 plugins=""
1751 swcodec="yes"
1752 toolset=$ipodbitmaptools
1753 boottool="$rootdir/tools/scramble -creative=zenvision"
1754 bootoutput="rockbox.zvboot"
1755 # architecture, manufacturer and model for the target-tree build
1756 t_cpu="arm"
1757 t_manufacturer="tms320dm320"
1758 t_model="creative-zvm"
1761 50|e200)
1762 target_id=23
1763 modelname="e200"
1764 target="-DSANSA_E200"
1765 memory=32 # supposedly
1766 arm7tdmicc
1767 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1768 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1769 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1770 output="rockbox.mi4"
1771 appextra="recorder:gui"
1772 plugins="yes"
1773 swcodec="yes"
1774 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1775 bootoutput="PP5022.mi4"
1776 # toolset is the tools within the tools directory that we build for
1777 # this particular target.
1778 toolset=$scramblebitmaptools
1779 # architecture, manufacturer and model for the target-tree build
1780 t_cpu="arm"
1781 t_manufacturer="sandisk"
1782 t_model="sansa-e200"
1785 51|e200r)
1786 # the e200R model is pretty much identical to the e200, it only has a
1787 # different option to the scramble tool when building a bootloader and
1788 # makes the bootloader output file name in all lower case.
1789 target_id=27
1790 modelname="e200r"
1791 target="-DSANSA_E200"
1792 memory=32 # supposedly
1793 arm7tdmicc
1794 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1795 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1796 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1797 output="rockbox.mi4"
1798 appextra="recorder:gui"
1799 plugins="yes"
1800 swcodec="yes"
1801 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1802 bootoutput="pp5022.mi4"
1803 # toolset is the tools within the tools directory that we build for
1804 # this particular target.
1805 toolset=$scramblebitmaptools
1806 # architecture, manufacturer and model for the target-tree build
1807 t_cpu="arm"
1808 t_manufacturer="sandisk"
1809 t_model="sansa-e200"
1812 52|c200)
1813 target_id=30
1814 modelname="c200"
1815 target="-DSANSA_C200"
1816 memory=32 # supposedly
1817 arm7tdmicc
1818 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1819 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1820 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1821 output="rockbox.mi4"
1822 appextra="recorder:gui"
1823 plugins="yes"
1824 swcodec="yes"
1825 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1826 bootoutput="firmware.mi4"
1827 # toolset is the tools within the tools directory that we build for
1828 # this particular target.
1829 toolset=$scramblebitmaptools
1830 # architecture, manufacturer and model for the target-tree build
1831 t_cpu="arm"
1832 t_manufacturer="sandisk"
1833 t_model="sansa-c200"
1836 53|m200)
1837 target_id=48
1838 modelname="m200"
1839 target="-DSANSA_M200"
1840 memory=1 # always
1841 arm946cc
1842 tool="$rootdir/tools/scramble -add=m200"
1843 boottool="$rootdir/tools/scramble -tcc=crc"
1844 bootoutput="player.rom"
1845 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1846 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1847 output="rockbox.m200"
1848 appextra="recorder:gui"
1849 plugins=""
1850 swcodec="yes"
1851 # toolset is the tools within the tools directory that we build for
1852 # this particular target.
1853 toolset=$tccbitmaptools
1854 # architecture, manufacturer and model for the target-tree build
1855 t_cpu="arm"
1856 t_manufacturer="tcc77x"
1857 t_model="m200"
1860 54|c100)
1861 target_id=42
1862 modelname="c100"
1863 target="-DSANSA_C100"
1864 memory=2
1865 arm946cc
1866 tool="$rootdir/tools/scramble -add=c100"
1867 boottool="$rootdir/tools/scramble -tcc=crc"
1868 bootoutput="player.rom"
1869 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1870 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1871 output="rockbox.c100"
1872 appextra="recorder:gui"
1873 plugins=""
1874 swcodec="yes"
1875 # toolset is the tools within the tools directory that we build for
1876 # this particular target.
1877 toolset=$tccbitmaptools
1878 # architecture, manufacturer and model for the target-tree build
1879 t_cpu="arm"
1880 t_manufacturer="tcc77x"
1881 t_model="c100"
1884 55|Clip|clip)
1885 target_id=50
1886 modelname="clip"
1887 target="-DSANSA_CLIP"
1888 memory=2
1889 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1890 bmp2rb_native="$bmp2rb_mono"
1891 tool="$rootdir/tools/scramble -add=clip"
1892 output="rockbox.sansa"
1893 bootoutput="bootloader-clip.sansa"
1894 appextra="recorder:gui"
1895 plugins="yes"
1896 swcodec="yes"
1897 toolset=$scramblebitmaptools
1898 t_cpu="arm"
1899 t_manufacturer="as3525"
1900 t_model="sansa-clip"
1901 arm9tdmicc
1905 56|e200v2)
1906 target_id=51
1907 modelname="e200v2"
1908 target="-DSANSA_E200V2"
1909 memory=8
1910 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1911 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1912 tool="$rootdir/tools/scramble -add=e2v2"
1913 output="rockbox.sansa"
1914 bootoutput="bootloader-e200v2.sansa"
1915 appextra="recorder:gui"
1916 plugins="yes"
1917 swcodec="yes"
1918 toolset=$scramblebitmaptools
1919 t_cpu="arm"
1920 t_manufacturer="as3525"
1921 t_model="sansa-e200v2"
1922 arm9tdmicc
1926 57|m200v4)
1927 target_id=52
1928 modelname="m200v4"
1929 target="-DSANSA_M200V4"
1930 memory=2
1931 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1932 bmp2rb_native="$bmp2rb_mono"
1933 tool="$rootdir/tools/scramble -add=m2v4"
1934 output="rockbox.sansa"
1935 bootoutput="bootloader-m200v4.sansa"
1936 appextra="recorder:gui"
1937 plugins="yes"
1938 swcodec="yes"
1939 toolset=$scramblebitmaptools
1940 t_cpu="arm"
1941 t_manufacturer="as3525"
1942 t_model="sansa-m200v4"
1943 arm9tdmicc
1947 58|fuze)
1948 target_id=53
1949 modelname="fuze"
1950 target="-DSANSA_FUZE"
1951 memory=8
1952 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1953 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1954 tool="$rootdir/tools/scramble -add=fuze"
1955 output="rockbox.sansa"
1956 bootoutput="bootloader-fuze.sansa"
1957 appextra="recorder:gui"
1958 plugins="yes"
1959 swcodec="yes"
1960 toolset=$scramblebitmaptools
1961 t_cpu="arm"
1962 t_manufacturer="as3525"
1963 t_model="sansa-fuze"
1964 arm9tdmicc
1968 59|c200v2)
1969 target_id=55
1970 modelname="c200v2"
1971 target="-DSANSA_C200V2"
1972 memory=2 # as per OF diagnosis mode
1973 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1974 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1975 tool="$rootdir/tools/scramble -add=c2v2"
1976 output="rockbox.sansa"
1977 bootoutput="bootloader-c200v2.sansa"
1978 appextra="recorder:gui"
1979 plugins="yes"
1980 swcodec="yes"
1981 # toolset is the tools within the tools directory that we build for
1982 # this particular target.
1983 toolset=$scramblebitmaptools
1984 # architecture, manufacturer and model for the target-tree build
1985 t_cpu="arm"
1986 t_manufacturer="as3525"
1987 t_model="sansa-c200v2"
1988 arm9tdmicc
1991 60|Clipv2|clipv2)
1992 echo "Sansa Clipv2 is not yet supported !"
1993 exit 1
1994 target_id=60
1995 modelname="clipv2"
1996 target="-DSANSA_CLIPV2"
1997 memory=8
1998 arm926ejscc
1999 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2000 bmp2rb_native="$bmp2rb_mono"
2001 tool="$rootdir/tools/scramble -add=clv2"
2002 output="rockbox.sansa"
2003 bootoutput="bootloader-clipv2.sansa"
2004 appextra="recorder:gui"
2005 plugins="yes"
2006 swcodec="yes"
2007 toolset=$scramblebitmaptools
2008 t_cpu="arm"
2009 t_manufacturer="as3525"
2010 t_model="sansa-clipv2"
2013 61|view)
2014 echo "Sansa View is not yet supported!"
2015 exit 1
2016 target_id=63
2017 modelname="view"
2018 target="-DSANSA_VIEW"
2019 memory=32
2020 arm1176jzscc
2021 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2022 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2023 output="rockbox.mi4"
2024 appextra="gui"
2025 plugins=""
2026 swcodec="yes"
2027 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2028 bootoutput="firmware.mi4"
2029 # toolset is the tools within the tools directory that we build for
2030 # this particular target.
2031 toolset=$scramblebitmaptools
2032 t_cpu="arm"
2033 t_manufacturer="sandisk"
2034 t_model="sansa-view"
2037 150|tpj1022)
2038 target_id=25
2039 modelname="tpj1022"
2040 target="-DELIO_TPJ1022"
2041 memory=32 # always
2042 arm7tdmicc
2043 tool="$rootdir/tools/scramble -add tpj2"
2044 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2045 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2046 output="rockbox.elio"
2047 appextra="recorder:gui"
2048 plugins="yes"
2049 swcodec="yes"
2050 boottool="$rootdir/tools/scramble -mi4v2"
2051 bootoutput="pp5020.mi4"
2052 # toolset is the tools within the tools directory that we build for
2053 # this particular target.
2054 toolset=$scramblebitmaptools
2055 # architecture, manufacturer and model for the target-tree build
2056 t_cpu="arm"
2057 t_manufacturer="tatung"
2058 t_model="tpj1022"
2061 100|sa9200)
2062 target_id=41
2063 modelname="sa9200"
2064 target="-DPHILIPS_SA9200"
2065 memory=32 # supposedly
2066 arm7tdmicc
2067 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2068 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2069 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2070 output="rockbox.mi4"
2071 appextra="recorder:gui"
2072 plugins=""
2073 swcodec="yes"
2074 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2075 bootoutput="FWImage.ebn"
2076 # toolset is the tools within the tools directory that we build for
2077 # this particular target.
2078 toolset=$scramblebitmaptools
2079 # architecture, manufacturer and model for the target-tree build
2080 t_cpu="arm"
2081 t_manufacturer="philips"
2082 t_model="sa9200"
2085 101|hdd1630)
2086 target_id=43
2087 modelname="hdd1630"
2088 target="-DPHILIPS_HDD1630"
2089 memory=32 # supposedly
2090 arm7tdmicc
2091 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2092 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2093 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2094 output="rockbox.mi4"
2095 appextra="recorder:gui"
2096 plugins="yes"
2097 swcodec="yes"
2098 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2099 bootoutput="FWImage.ebn"
2100 # toolset is the tools within the tools directory that we build for
2101 # this particular target.
2102 toolset=$scramblebitmaptools
2103 # architecture, manufacturer and model for the target-tree build
2104 t_cpu="arm"
2105 t_manufacturer="philips"
2106 t_model="hdd1630"
2109 110|meizum6sl)
2110 target_id=49
2111 modelname="meizum6sl"
2112 target="-DMEIZU_M6SL"
2113 memory=16 # always
2114 arm940tbecc
2115 tool="cp"
2116 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2117 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2118 output="rockbox.meizu"
2119 appextra="recorder:gui"
2120 plugins="no" #FIXME
2121 swcodec="yes"
2122 toolset=$genericbitmaptools
2123 boottool="cp"
2124 bootoutput="rockboot.ebn"
2125 # architecture, manufacturer and model for the target-tree build
2126 t_cpu="arm"
2127 t_manufacturer="s5l8700"
2128 t_model="meizu-m6sl"
2131 111|meizum6sp)
2132 target_id=46
2133 modelname="meizum6sp"
2134 target="-DMEIZU_M6SP"
2135 memory=16 # always
2136 arm940tbecc
2137 tool="cp"
2138 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2139 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2140 output="rockbox.meizu"
2141 appextra="recorder:gui"
2142 plugins="no" #FIXME
2143 swcodec="yes"
2144 toolset=$genericbitmaptools
2145 boottool="cp"
2146 bootoutput="rockboot.ebn"
2147 # architecture, manufacturer and model for the target-tree build
2148 t_cpu="arm"
2149 t_manufacturer="s5l8700"
2150 t_model="meizu-m6sp"
2153 112|meizum3)
2154 target_id=47
2155 modelname="meizum3"
2156 target="-DMEIZU_M3"
2157 memory=16 # always
2158 arm940tbecc
2159 tool="cp"
2160 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2161 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2162 output="rockbox.meizu"
2163 appextra="recorder:gui"
2164 plugins="no" #FIXME
2165 swcodec="yes"
2166 toolset=$genericbitmaptools
2167 boottool="cp"
2168 bootoutput="rockboot.ebn"
2169 # architecture, manufacturer and model for the target-tree build
2170 t_cpu="arm"
2171 t_manufacturer="s5l8700"
2172 t_model="meizu-m3"
2175 120|ondavx747)
2176 target_id=45
2177 modelname="ondavx747"
2178 target="-DONDA_VX747"
2179 memory=16
2180 mipselcc
2181 tool="$rootdir/tools/scramble -add=x747"
2182 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2183 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2184 output="rockbox.vx747"
2185 appextra="recorder:gui"
2186 plugins="yes"
2187 swcodec="yes"
2188 toolset=$genericbitmaptools
2189 boottool="$rootdir/tools/scramble -ccpmp"
2190 bootoutput="ccpmp.bin"
2191 # architecture, manufacturer and model for the target-tree build
2192 t_cpu="mips"
2193 t_manufacturer="ingenic_jz47xx"
2194 t_model="onda_vx747"
2197 121|ondavx767)
2198 target_id=64
2199 modelname="ondavx767"
2200 target="-DONDA_VX767"
2201 memory=16 #FIXME
2202 mipselcc
2203 tool="cp"
2204 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2205 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2206 output="rockbox.vx767"
2207 appextra="recorder:gui"
2208 plugins="" #FIXME
2209 swcodec="yes"
2210 toolset=$genericbitmaptools
2211 boottool="$rootdir/tools/scramble -ccpmp"
2212 bootoutput="ccpmp.bin"
2213 # architecture, manufacturer and model for the target-tree build
2214 t_cpu="mips"
2215 t_manufacturer="ingenic_jz47xx"
2216 t_model="onda_vx767"
2219 122|ondavx747p)
2220 target_id=54
2221 modelname="ondavx747p"
2222 target="-DONDA_VX747P"
2223 memory=16
2224 mipselcc
2225 tool="$rootdir/tools/scramble -add=747p"
2226 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2227 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2228 output="rockbox.vx747p"
2229 appextra="recorder:gui"
2230 plugins="yes"
2231 swcodec="yes"
2232 toolset=$genericbitmaptools
2233 boottool="$rootdir/tools/scramble -ccpmp"
2234 bootoutput="ccpmp.bin"
2235 # architecture, manufacturer and model for the target-tree build
2236 t_cpu="mips"
2237 t_manufacturer="ingenic_jz47xx"
2238 t_model="onda_vx747"
2241 123|ondavx777)
2242 target_id=61
2243 modelname="ondavx777"
2244 target="-DONDA_VX777"
2245 memory=16
2246 mipselcc
2247 tool="$rootdir/tools/scramble -add=x777"
2248 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2249 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2250 output="rockbox.vx777"
2251 appextra="recorder:gui"
2252 plugins="yes"
2253 swcodec="yes"
2254 toolset=$genericbitmaptools
2255 boottool="$rootdir/tools/scramble -ccpmp"
2256 bootoutput="ccpmp.bin"
2257 # architecture, manufacturer and model for the target-tree build
2258 t_cpu="mips"
2259 t_manufacturer="ingenic_jz47xx"
2260 t_model="onda_vx747"
2263 130|lyre_proto1)
2264 target_id=56
2265 modelname="lyre_proto1"
2266 target="-DLYRE_PROTO1"
2267 memory=64
2268 arm926ejscc
2269 tool="cp"
2270 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2271 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2272 output="rockbox.lyre"
2273 appextra="recorder:gui"
2274 plugins=""
2275 swcodec="yes"
2276 toolset=$scramblebitmaptools
2277 boottool="cp"
2278 bootoutput="bootloader-proto1.lyre"
2279 # architecture, manufacturer and model for the target-tree build
2280 t_cpu="arm"
2281 t_manufacturer="at91sam"
2282 t_model="lyre_proto1"
2285 140|yh820)
2286 target_id=57
2287 modelname="yh820"
2288 target="-DSAMSUNG_YH820"
2289 memory=32 # always
2290 arm7tdmicc
2291 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2292 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2293 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2294 output="rockbox.mi4"
2295 appextra="recorder:gui"
2296 plugins="yes"
2297 swcodec="yes"
2298 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2299 bootoutput="FW_YH820.mi4"
2300 # toolset is the tools within the tools directory that we build for
2301 # this particular target.
2302 toolset=$scramblebitmaptools
2303 # architecture, manufacturer and model for the target-tree build
2304 t_cpu="arm"
2305 t_manufacturer="samsung"
2306 t_model="yh820"
2309 141|yh920)
2310 target_id=58
2311 modelname="yh920"
2312 target="-DSAMSUNG_YH920"
2313 memory=32 # always
2314 arm7tdmicc
2315 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2316 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2317 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2318 output="rockbox.mi4"
2319 appextra="recorder:gui"
2320 plugins="yes"
2321 swcodec="yes"
2322 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2323 bootoutput="PP5020.mi4"
2324 # toolset is the tools within the tools directory that we build for
2325 # this particular target.
2326 toolset=$scramblebitmaptools
2327 # architecture, manufacturer and model for the target-tree build
2328 t_cpu="arm"
2329 t_manufacturer="samsung"
2330 t_model="yh920"
2333 142|yh925)
2334 target_id=59
2335 modelname="yh925"
2336 target="-DSAMSUNG_YH925"
2337 memory=32 # always
2338 arm7tdmicc
2339 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2340 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2341 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2342 output="rockbox.mi4"
2343 appextra="recorder:gui"
2344 plugins="yes"
2345 swcodec="yes"
2346 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2347 bootoutput="FW_YH925.mi4"
2348 # toolset is the tools within the tools directory that we build for
2349 # this particular target.
2350 toolset=$scramblebitmaptools
2351 # architecture, manufacturer and model for the target-tree build
2352 t_cpu="arm"
2353 t_manufacturer="samsung"
2354 t_model="yh925"
2357 143|yps3)
2358 target_id=60
2359 modelname="yps3"
2360 target="-DSAMSUNG_YPS3"
2361 memory=16 # always
2362 arm940tbecc
2363 tool="cp"
2364 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2365 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2366 output="rockbox.yps3"
2367 appextra="recorder:gui"
2368 plugins="no" #FIXME
2369 swcodec="yes"
2370 toolset=$genericbitmaptools
2371 boottool="cp"
2372 bootoutput="rockboot.ebn"
2373 # architecture, manufacturer and model for the target-tree build
2374 t_cpu="arm"
2375 t_manufacturer="s5l8700"
2376 t_model="yps3"
2381 echo "Please select a supported target platform!"
2382 exit 7
2385 esac
2387 echo "Platform set to $modelname"
2390 #remove start
2391 ############################################################################
2392 # Amount of memory, for those that can differ. They have $memory unset at
2393 # this point.
2396 if [ -z "$memory" ]; then
2397 case $target_id in
2399 if [ "$ARG_RAM" ]; then
2400 size=$ARG_RAM
2401 else
2402 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2403 size=`input`;
2405 case $size in
2406 60|64)
2407 memory="64"
2410 memory="32"
2412 esac
2415 if [ "$ARG_RAM" ]; then
2416 size=$ARG_RAM
2417 else
2418 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2419 size=`input`;
2421 case $size in
2423 memory="8"
2426 memory="2"
2428 esac
2430 esac
2431 echo "Memory size selected: $memory MB"
2432 [ "$ARG_TYPE" ] || echo ""
2434 #remove end
2436 ##################################################################
2437 # Figure out build "type"
2440 # the ifp7x0 is the only platform that supports building a gdb stub like
2441 # this
2442 case $modelname in
2443 ifp7xx)
2444 gdbstub="(G)DB stub, "
2446 e200r|e200)
2447 gdbstub="(I)nstaller, "
2449 c200)
2450 gdbstub="(E)raser, "
2454 esac
2455 if [ "$ARG_TYPE" ]; then
2456 btype=$ARG_TYPE
2457 else
2458 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2459 btype=`input`;
2462 case $btype in
2463 [Ii])
2464 appsdir='\$(ROOTDIR)/bootloader'
2465 apps="bootloader"
2466 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2467 bootloader="1"
2468 echo "e200R-installer build selected"
2470 [Ee])
2471 appsdir='\$(ROOTDIR)/bootloader'
2472 apps="bootloader"
2473 echo "C2(4)0 or C2(5)0"
2474 variant=`input`
2475 case $variant in
2477 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2478 echo "c240 eraser build selected"
2481 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2482 echo "c240 eraser build selected"
2484 esac
2485 bootloader="1"
2486 echo "c200 eraser build selected"
2488 [Bb])
2489 if test $t_manufacturer = "archos"; then
2490 # Archos SH-based players do this somewhat differently for
2491 # some reason
2492 appsdir='\$(ROOTDIR)/flash/bootbox'
2493 apps="bootbox"
2494 else
2495 appsdir='\$(ROOTDIR)/bootloader'
2496 apps="bootloader"
2497 flash=""
2498 if test -n "$boottool"; then
2499 tool="$boottool"
2501 if test -n "$bootoutput"; then
2502 output=$bootoutput
2505 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2506 bootloader="1"
2507 echo "Bootloader build selected"
2509 [Ss])
2510 debug="-DDEBUG"
2511 simulator="yes"
2512 extradefines="-DSIMULATOR"
2513 archosrom=""
2514 flash=""
2515 echo "Simulator build selected"
2517 [Aa]*)
2518 echo "Advanced build selected"
2519 whichadvanced $btype
2521 [Gg])
2522 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2523 appsdir='\$(ROOTDIR)/gdb'
2524 apps="stub"
2525 case $modelname in
2526 ifp7xx)
2527 output="stub.wma"
2531 esac
2532 echo "GDB stub build selected"
2534 [Mm])
2535 toolset='';
2536 apps="manual"
2537 echo "Manual build selected"
2539 [Cc])
2540 uname=`uname`
2541 simcc "checkwps"
2542 toolset='';
2543 t_cpu='';
2544 GCCOPTS='';
2545 appsdir='\$(ROOTDIR)/tools/checkwps';
2546 output='checkwps.'${modelname};
2547 archosrom='';
2548 echo "CheckWPS build selected"
2550 [Dd])
2551 uname=`uname`
2552 simcc "database"
2553 toolset='';
2554 t_cpu='';
2555 GCCOPTS='';
2556 appsdir='\$(ROOTDIR)/tools/database';
2557 output='database.'${modelname};
2558 archosrom='';
2559 echo "Database tool build selected"
2562 if [ "$modelname" = "e200r" ]; then
2563 echo "Do not use the e200R target for regular builds. Use e200 instead."
2564 exit 8
2566 debug=""
2567 btype="N" # set it explicitly since RET only gets here as well
2568 echo "Normal build selected"
2571 esac
2572 # to be able running "make manual" from non-manual configuration
2573 case $modelname in
2574 fmrecorder)
2575 manualdev="recorderv2fm"
2577 recorderv2)
2578 manualdev="recorderv2fm"
2580 h1??)
2581 manualdev="h100"
2583 ipodmini2g)
2584 manualdev="ipodmini"
2587 manualdev=$modelname
2589 esac
2591 if [ -z "$debug" ]; then
2592 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2595 echo "Using source code root directory: $rootdir"
2597 # this was once possible to change at build-time, but no more:
2598 language="english"
2600 uname=`uname`
2602 if [ "yes" = "$simulator" ]; then
2603 # setup compiler and things for simulator
2604 simcc "sdl"
2606 if [ -d "simdisk" ]; then
2607 echo "Subdirectory 'simdisk' already present"
2608 else
2609 mkdir simdisk
2610 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2614 # Now, figure out version number of the (gcc) compiler we are about to use
2615 gccver=`$CC -dumpversion`;
2617 # figure out the binutil version too and display it, mostly for the build
2618 # system etc to be able to see it easier
2619 if [ $uname = "Darwin" ]; then
2620 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2621 else
2622 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2625 if [ -z "$gccver" ]; then
2626 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
2627 echo "[WARNING] this may cause your build to fail since we cannot do the"
2628 echo "[WARNING] checks we want now."
2629 else
2631 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2632 # DEPEND on it
2634 num1=`echo $gccver | cut -d . -f1`
2635 num2=`echo $gccver | cut -d . -f2`
2636 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2638 # This makes:
2639 # 3.3.X => 303
2640 # 3.4.X => 304
2641 # 2.95.3 => 295
2643 echo "Using $CC $gccver ($gccnum)"
2645 if test "$gccnum" -ge "400"; then
2646 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2647 # so we ignore that warnings for now
2648 # -Wno-pointer-sign
2649 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2652 if test "$gccnum" -ge "401"; then
2653 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2654 # will break strict-aliasing rules"
2656 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
2659 if test "$gccnum" -ge "402"; then
2660 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2661 # and later would throw it for several valid cases
2662 GCCOPTS="$GCCOPTS -Wno-override-init"
2665 case $prefix in
2667 # simulator
2669 i586-mingw32msvc-)
2670 # cross-compile for win32
2673 # Verify that the cross-compiler is of a recommended version!
2674 if test "$gccver" != "$gccchoice"; then
2675 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2676 echo "WARNING: version $gccchoice!"
2677 echo "WARNING: This may cause your build to fail since it may be a version"
2678 echo "WARNING: that isn't functional or known to not be the best choice."
2679 echo "WARNING: If you suffer from build problems, you know that this is"
2680 echo "WARNING: a likely source for them..."
2683 esac
2688 echo "Using $LD $ldver"
2690 # check the compiler for SH platforms
2691 if test "$CC" = "sh-elf-gcc"; then
2692 if test "$gccnum" -lt "400"; then
2693 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2694 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2695 else
2696 # figure out patch status
2697 gccpatch=`$CC --version`;
2699 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2700 echo "gcc $gccver is rockbox patched"
2701 # then convert -O to -Os to get smaller binaries!
2702 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2703 else
2704 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2705 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2710 if test "$CC" = "m68k-elf-gcc"; then
2711 # convert -O to -Os to get smaller binaries!
2712 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2715 if [ "$ARG_CCACHE" = "1" ]; then
2716 echo "Enable ccache for building"
2717 ccache="ccache"
2718 elif [ "$ARG_CCACHE" != "0" ]; then
2719 ccache=`findtool ccache`
2720 if test -n "$ccache"; then
2721 echo "Found and uses ccache ($ccache)"
2725 # figure out the full path to the various commands if possible
2726 HOSTCC=`findtool gcc --lit`
2727 HOSTAR=`findtool ar --lit`
2728 CC=`findtool ${CC} --lit`
2729 LD=`findtool ${AR} --lit`
2730 AR=`findtool ${AR} --lit`
2731 AS=`findtool ${AS} --lit`
2732 OC=`findtool ${OC} --lit`
2733 WINDRES=`findtool ${WINDRES} --lit`
2734 DLLTOOL=`findtool ${DLLTOOL} --lit`
2735 DLLWRAP=`findtool ${DLLWRAP} --lit`
2736 RANLIB=`findtool ${RANLIB} --lit`
2738 if test -n "$ccache"; then
2739 CC="$ccache $CC"
2742 if test "X$endian" = "Xbig"; then
2743 defendian="ROCKBOX_BIG_ENDIAN"
2744 else
2745 defendian="ROCKBOX_LITTLE_ENDIAN"
2748 if [ "$ARG_RBDIR" ]; then
2749 rbdir=$ARG_RBDIR
2750 echo "Using alternate rockbox dir: ${rbdir}"
2753 sed > autoconf.h \
2754 -e "s,@ENDIAN@,${defendian},g" \
2755 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2756 -e "s,@config_rtc@,$config_rtc,g" \
2757 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2758 -e "s,@RBDIR@,${rbdir},g" \
2759 -e "s,@have_backlight@,$have_backlight,g" \
2760 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
2761 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
2762 <<EOF
2763 /* This header was made by configure */
2764 #ifndef __BUILD_AUTOCONF_H
2765 #define __BUILD_AUTOCONF_H
2767 /* Define endianess for the target or simulator platform */
2768 #define @ENDIAN@ 1
2770 /* Define this if you build rockbox to support the logf logging and display */
2771 #undef ROCKBOX_HAS_LOGF
2773 /* optional define for a backlight modded Ondio */
2774 @have_backlight@
2776 /* optional define for FM radio mod for iAudio M5 */
2777 @have_fmradio_in@
2779 /* optional define for ATA poweroff on Player */
2780 @have_ata_poweroff@
2782 /* optional defines for RTC mod for h1x0 */
2783 @config_rtc@
2784 @have_rtc_alarm@
2786 /* root of Rockbox */
2787 #define ROCKBOX_DIR "/@RBDIR@"
2789 #endif /* __BUILD_AUTOCONF_H */
2792 if test -n "$t_cpu"; then
2793 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2794 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2795 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2796 GCCOPTS="$GCCOPTS"
2799 if test "$simulator" = "yes"; then
2800 # add simul make stuff on the #SIMUL# line
2801 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2802 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2803 else
2804 # delete the lines that match
2805 simmagic1='/@SIMUL1@/D'
2806 simmagic2='/@SIMUL2@/D'
2809 if test "$swcodec" = "yes"; then
2810 voicetoolset="rbspeexenc voicefont wavtrim"
2811 else
2812 voicetoolset="voicefont wavtrim"
2815 if test "$apps" = "apps"; then
2816 # only when we build "real" apps we build the .lng files
2817 buildlangs="langs"
2820 #### Fix the cmdline ###
2821 if test -n "$ccache"; then
2822 cmdline="--ccache "
2825 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
2826 ### end of cmdline
2828 sed > Makefile \
2829 -e "s,@ROOTDIR@,${rootdir},g" \
2830 -e "s,@DEBUG@,${debug},g" \
2831 -e "s,@MEMORY@,${memory},g" \
2832 -e "s,@TARGET_ID@,${target_id},g" \
2833 -e "s,@TARGET@,${target},g" \
2834 -e "s,@CPU@,${t_cpu},g" \
2835 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2836 -e "s,@MODELNAME@,${modelname},g" \
2837 -e "s,@LANGUAGE@,${language},g" \
2838 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2839 -e "s,@PWD@,${pwd},g" \
2840 -e "s,@HOSTCC@,${HOSTCC},g" \
2841 -e "s,@HOSTAR@,${HOSTAR},g" \
2842 -e "s,@CC@,${CC},g" \
2843 -e "s,@LD@,${LD},g" \
2844 -e "s,@AR@,${AR},g" \
2845 -e "s,@AS@,${AS},g" \
2846 -e "s,@OC@,${OC},g" \
2847 -e "s,@WINDRES@,${WINDRES},g" \
2848 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2849 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2850 -e "s,@RANLIB@,${RANLIB},g" \
2851 -e "s,@TOOL@,${tool},g" \
2852 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2853 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2854 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2855 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2856 -e "s,@OUTPUT@,${output},g" \
2857 -e "s,@APPEXTRA@,${appextra},g" \
2858 -e "s,@ARCHOSROM@,${archosrom},g" \
2859 -e "s,@FLASHFILE@,${flash},g" \
2860 -e "s,@PLUGINS@,${plugins},g" \
2861 -e "s,@CODECS@,${swcodec},g" \
2862 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2863 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2864 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2865 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2866 -e "s!@LDOPTS@!${LDOPTS}!g" \
2867 -e "s,@LOADADDRESS@,${loadaddress},g" \
2868 -e "s,@EXTRADEF@,${extradefines},g" \
2869 -e "s,@APPSDIR@,${appsdir},g" \
2870 -e "s,@FIRMDIR@,${firmdir},g" \
2871 -e "s,@TOOLSDIR@,${toolsdir},g" \
2872 -e "s,@APPS@,${apps},g" \
2873 -e "s,@SIMVER@,${simver},g" \
2874 -e "s,@GCCVER@,${gccver},g" \
2875 -e "s,@GCCNUM@,${gccnum},g" \
2876 -e "s,@UNAME@,${uname},g" \
2877 -e "s,@ENDIAN@,${defendian},g" \
2878 -e "s,@TOOLSET@,${toolset},g" \
2879 -e "${simmagic1}" \
2880 -e "${simmagic2}" \
2881 -e "s,@MANUALDEV@,${manualdev},g" \
2882 -e "s,@ENCODER@,${ENC_CMD},g" \
2883 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2884 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2885 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2886 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2887 -e "s,@LANGS@,${buildlangs},g" \
2888 -e "s,@USE_ELF@,${USE_ELF},g" \
2889 -e "s,@RBDIR@,${rbdir},g" \
2890 -e "s,@PREFIX@,$PREFIX,g" \
2891 -e "s,@CMDLINE@,$cmdline,g" \
2892 <<EOF
2893 ## Automatically generated. http://www.rockbox.org/
2895 export ROOTDIR=@ROOTDIR@
2896 export FIRMDIR=@FIRMDIR@
2897 export APPSDIR=@APPSDIR@
2898 export TOOLSDIR=@TOOLSDIR@
2899 export DOCSDIR=\$(ROOTDIR)/docs
2900 export MANUALDIR=\${ROOTDIR}/manual
2901 export DEBUG=@DEBUG@
2902 export MODELNAME=@MODELNAME@
2903 export ARCHOSROM=@ARCHOSROM@
2904 export FLASHFILE=@FLASHFILE@
2905 export TARGET_ID=@TARGET_ID@
2906 export TARGET=@TARGET@
2907 export CPU=@CPU@
2908 export MANUFACTURER=@MANUFACTURER@
2909 export OBJDIR=@PWD@
2910 export BUILDDIR=@PWD@
2911 export LANGUAGE=@LANGUAGE@
2912 export VOICELANGUAGE=@VOICELANGUAGE@
2913 export MEMORYSIZE=@MEMORY@
2914 export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
2915 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2916 export MKFIRMWARE=@TOOL@
2917 export BMP2RB_MONO=@BMP2RB_MONO@
2918 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2919 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2920 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2921 export BINARY=@OUTPUT@
2922 export APPEXTRA=@APPEXTRA@
2923 export ENABLEDPLUGINS=@PLUGINS@
2924 export SOFTWARECODECS=@CODECS@
2925 export EXTRA_DEFINES=@EXTRADEF@
2926 export HOSTCC=@HOSTCC@
2927 export HOSTAR=@HOSTAR@
2928 export CC=@CC@
2929 export LD=@LD@
2930 export AR=@AR@
2931 export AS=@AS@
2932 export OC=@OC@
2933 export WINDRES=@WINDRES@
2934 export DLLTOOL=@DLLTOOL@
2935 export DLLWRAP=@DLLWRAP@
2936 export RANLIB=@RANLIB@
2937 export PREFIX=@PREFIX@
2938 export PROFILE_OPTS=@PROFILE_OPTS@
2939 export SIMVER=@SIMVER@
2940 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2941 export GCCOPTS=@GCCOPTS@
2942 export TARGET_INC=@TARGET_INC@
2943 export LOADADDRESS=@LOADADDRESS@
2944 export SHARED_FLAG=@SHARED_FLAG@
2945 export LDOPTS=@LDOPTS@
2946 export GCCVER=@GCCVER@
2947 export GCCNUM=@GCCNUM@
2948 export UNAME=@UNAME@
2949 export MANUALDEV=@MANUALDEV@
2950 export TTS_OPTS=@TTS_OPTS@
2951 export TTS_ENGINE=@TTS_ENGINE@
2952 export ENC_OPTS=@ENC_OPTS@
2953 export ENCODER=@ENCODER@
2954 export USE_ELF=@USE_ELF@
2955 export RBDIR=@RBDIR@
2957 CONFIGURE_OPTIONS=@CMDLINE@
2959 include \$(TOOLSDIR)/root.make
2963 echo "Created Makefile"