Remove a left-over check for metadata info being ready that delayed the initial draw...
[kugel-rb.git] / tools / configure
blobdc217895321f8777cf06a44df6193bfcf7d55724
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 131) Mini2440
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 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 bootoutput="bootloader.iriver"
1126 appextra="recorder:gui"
1127 flash="$pwd/rombox.iriver"
1128 plugins="yes"
1129 swcodec="yes"
1130 # toolset is the tools within the tools directory that we build for
1131 # this particular target.
1132 toolset=$iriverbitmaptools
1133 t_cpu="coldfire"
1134 t_manufacturer="iriver"
1135 t_model="h100"
1138 11|h300)
1139 target_id=10
1140 modelname="h300"
1141 target="-DIRIVER_H300"
1142 memory=32 # always
1143 coldfirecc
1144 tool="$rootdir/tools/scramble -add=h300"
1145 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1146 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1147 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1148 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1149 output="rockbox.iriver"
1150 appextra="recorder:gui"
1151 plugins="yes"
1152 swcodec="yes"
1153 # toolset is the tools within the tools directory that we build for
1154 # this particular target.
1155 toolset=$iriverbitmaptools
1156 t_cpu="coldfire"
1157 t_manufacturer="iriver"
1158 t_model="h300"
1161 12|h100)
1162 target_id=11
1163 modelname="h100"
1164 target="-DIRIVER_H100"
1165 memory=16 # always
1166 coldfirecc
1167 tool="$rootdir/tools/scramble -add=h100"
1168 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1169 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1170 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1171 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1172 output="rockbox.iriver"
1173 bootoutput="bootloader.iriver"
1174 appextra="recorder:gui"
1175 flash="$pwd/rombox.iriver"
1176 plugins="yes"
1177 swcodec="yes"
1178 # toolset is the tools within the tools directory that we build for
1179 # this particular target.
1180 toolset=$iriverbitmaptools
1181 t_cpu="coldfire"
1182 t_manufacturer="iriver"
1183 t_model="h100"
1186 13|ifp7xx)
1187 target_id=19
1188 modelname="ifp7xx"
1189 target="-DIRIVER_IFP7XX"
1190 memory=1
1191 arm7tdmicc short
1192 tool="cp"
1193 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1194 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1195 output="rockbox.wma"
1196 appextra="recorder:gui"
1197 plugins="yes"
1198 swcodec="yes"
1199 # toolset is the tools within the tools directory that we build for
1200 # this particular target.
1201 toolset=$genericbitmaptools
1202 t_cpu="arm"
1203 t_manufacturer="pnx0101"
1204 t_model="iriver-ifp7xx"
1207 14|h10)
1208 target_id=22
1209 modelname="h10"
1210 target="-DIRIVER_H10"
1211 memory=32 # always
1212 arm7tdmicc
1213 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1214 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1215 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1216 output="rockbox.mi4"
1217 appextra="recorder:gui"
1218 plugins="yes"
1219 swcodec="yes"
1220 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1221 bootoutput="H10_20GC.mi4"
1222 # toolset is the tools within the tools directory that we build for
1223 # this particular target.
1224 toolset=$scramblebitmaptools
1225 # architecture, manufacturer and model for the target-tree build
1226 t_cpu="arm"
1227 t_manufacturer="iriver"
1228 t_model="h10"
1231 15|h10_5gb)
1232 target_id=24
1233 modelname="h10_5gb"
1234 target="-DIRIVER_H10_5GB"
1235 memory=32 # always
1236 arm7tdmicc
1237 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1238 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1239 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1240 output="rockbox.mi4"
1241 appextra="recorder:gui"
1242 plugins="yes"
1243 swcodec="yes"
1244 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1245 bootoutput="H10.mi4"
1246 # toolset is the tools within the tools directory that we build for
1247 # this particular target.
1248 toolset=$scramblebitmaptools
1249 # architecture, manufacturer and model for the target-tree build
1250 t_cpu="arm"
1251 t_manufacturer="iriver"
1252 t_model="h10"
1255 20|ipodcolor)
1256 target_id=13
1257 modelname="ipodcolor"
1258 target="-DIPOD_COLOR"
1259 memory=32 # always
1260 arm7tdmicc
1261 tool="$rootdir/tools/scramble -add=ipco"
1262 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1263 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1264 output="rockbox.ipod"
1265 appextra="recorder:gui"
1266 plugins="yes"
1267 swcodec="yes"
1268 bootoutput="bootloader-$modelname.ipod"
1269 # toolset is the tools within the tools directory that we build for
1270 # this particular target.
1271 toolset=$ipodbitmaptools
1272 # architecture, manufacturer and model for the target-tree build
1273 t_cpu="arm"
1274 t_manufacturer="ipod"
1275 t_model="color"
1278 21|ipodnano)
1279 target_id=14
1280 modelname="ipodnano"
1281 target="-DIPOD_NANO"
1282 memory=32 # always
1283 arm7tdmicc
1284 tool="$rootdir/tools/scramble -add=nano"
1285 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1286 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1287 output="rockbox.ipod"
1288 appextra="recorder:gui"
1289 plugins="yes"
1290 swcodec="yes"
1291 bootoutput="bootloader-$modelname.ipod"
1292 # toolset is the tools within the tools directory that we build for
1293 # this particular target.
1294 toolset=$ipodbitmaptools
1295 # architecture, manufacturer and model for the target-tree build
1296 t_cpu="arm"
1297 t_manufacturer="ipod"
1298 t_model="nano"
1301 22|ipodvideo)
1302 target_id=15
1303 modelname="ipodvideo"
1304 target="-DIPOD_VIDEO"
1305 arm7tdmicc
1306 tool="$rootdir/tools/scramble -add=ipvd"
1307 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1308 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1309 output="rockbox.ipod"
1310 appextra="recorder:gui"
1311 plugins="yes"
1312 swcodec="yes"
1313 bootoutput="bootloader-$modelname.ipod"
1314 # toolset is the tools within the tools directory that we build for
1315 # this particular target.
1316 toolset=$ipodbitmaptools
1317 # architecture, manufacturer and model for the target-tree build
1318 t_cpu="arm"
1319 t_manufacturer="ipod"
1320 t_model="video"
1323 23|ipod3g)
1324 target_id=16
1325 modelname="ipod3g"
1326 target="-DIPOD_3G"
1327 memory=32 # always
1328 arm7tdmicc
1329 tool="$rootdir/tools/scramble -add=ip3g"
1330 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1331 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1332 output="rockbox.ipod"
1333 appextra="recorder:gui"
1334 plugins="yes"
1335 swcodec="yes"
1336 bootoutput="bootloader-$modelname.ipod"
1337 # toolset is the tools within the tools directory that we build for
1338 # this particular target.
1339 toolset=$ipodbitmaptools
1340 # architecture, manufacturer and model for the target-tree build
1341 t_cpu="arm"
1342 t_manufacturer="ipod"
1343 t_model="3g"
1346 24|ipod4g)
1347 target_id=17
1348 modelname="ipod4g"
1349 target="-DIPOD_4G"
1350 memory=32 # always
1351 arm7tdmicc
1352 tool="$rootdir/tools/scramble -add=ip4g"
1353 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1354 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1355 output="rockbox.ipod"
1356 appextra="recorder:gui"
1357 plugins="yes"
1358 swcodec="yes"
1359 bootoutput="bootloader-$modelname.ipod"
1360 # toolset is the tools within the tools directory that we build for
1361 # this particular target.
1362 toolset=$ipodbitmaptools
1363 # architecture, manufacturer and model for the target-tree build
1364 t_cpu="arm"
1365 t_manufacturer="ipod"
1366 t_model="4g"
1369 25|ipodmini)
1370 target_id=18
1371 modelname="ipodmini"
1372 target="-DIPOD_MINI"
1373 memory=32 # always
1374 arm7tdmicc
1375 tool="$rootdir/tools/scramble -add=mini"
1376 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1377 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1378 output="rockbox.ipod"
1379 appextra="recorder:gui"
1380 plugins="yes"
1381 swcodec="yes"
1382 bootoutput="bootloader-$modelname.ipod"
1383 # toolset is the tools within the tools directory that we build for
1384 # this particular target.
1385 toolset=$ipodbitmaptools
1386 # architecture, manufacturer and model for the target-tree build
1387 t_cpu="arm"
1388 t_manufacturer="ipod"
1389 t_model="mini"
1392 26|ipodmini2g)
1393 target_id=21
1394 modelname="ipodmini2g"
1395 target="-DIPOD_MINI2G"
1396 memory=32 # always
1397 arm7tdmicc
1398 tool="$rootdir/tools/scramble -add=mn2g"
1399 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1400 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1401 output="rockbox.ipod"
1402 appextra="recorder:gui"
1403 plugins="yes"
1404 swcodec="yes"
1405 bootoutput="bootloader-$modelname.ipod"
1406 # toolset is the tools within the tools directory that we build for
1407 # this particular target.
1408 toolset=$ipodbitmaptools
1409 # architecture, manufacturer and model for the target-tree build
1410 t_cpu="arm"
1411 t_manufacturer="ipod"
1412 t_model="mini2g"
1415 27|ipod1g2g)
1416 target_id=29
1417 modelname="ipod1g2g"
1418 target="-DIPOD_1G2G"
1419 memory=32 # always
1420 arm7tdmicc
1421 tool="$rootdir/tools/scramble -add=1g2g"
1422 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1423 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1424 output="rockbox.ipod"
1425 appextra="recorder:gui"
1426 plugins="yes"
1427 swcodec="yes"
1428 bootoutput="bootloader-$modelname.ipod"
1429 # toolset is the tools within the tools directory that we build for
1430 # this particular target.
1431 toolset=$ipodbitmaptools
1432 # architecture, manufacturer and model for the target-tree build
1433 t_cpu="arm"
1434 t_manufacturer="ipod"
1435 t_model="1g2g"
1438 28|ipodnano2g)
1439 target_id=62
1440 modelname="ipodnano2g"
1441 target="-DIPOD_NANO2G"
1442 memory=32 # always
1443 arm940tcc
1444 tool="$rootdir/tools/scramble -add=nn2g"
1445 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1446 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1447 output="rockbox.ipod"
1448 appextra="recorder:gui"
1449 plugins="yes"
1450 swcodec="yes"
1451 bootoutput="bootloader-$modelname.ipod"
1452 # toolset is the tools within the tools directory that we build for
1453 # this particular target.
1454 toolset=$ipodbitmaptools
1455 # architecture, manufacturer and model for the target-tree build
1456 t_cpu="arm"
1457 t_manufacturer="s5l8700"
1458 t_model="ipodnano2g"
1461 30|x5)
1462 target_id=12
1463 modelname="x5"
1464 target="-DIAUDIO_X5"
1465 memory=16 # always
1466 coldfirecc
1467 tool="$rootdir/tools/scramble -add=iax5"
1468 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1469 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1470 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1471 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1472 output="rockbox.iaudio"
1473 appextra="recorder:gui"
1474 plugins="yes"
1475 swcodec="yes"
1476 # toolset is the tools within the tools directory that we build for
1477 # this particular target.
1478 toolset="$iaudiobitmaptools"
1479 # architecture, manufacturer and model for the target-tree build
1480 t_cpu="coldfire"
1481 t_manufacturer="iaudio"
1482 t_model="x5"
1485 31|m5)
1486 target_id=28
1487 modelname="m5"
1488 target="-DIAUDIO_M5"
1489 memory=16 # always
1490 coldfirecc
1491 tool="$rootdir/tools/scramble -add=iam5"
1492 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1493 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1494 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1495 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1496 output="rockbox.iaudio"
1497 appextra="recorder:gui"
1498 plugins="yes"
1499 swcodec="yes"
1500 # toolset is the tools within the tools directory that we build for
1501 # this particular target.
1502 toolset="$iaudiobitmaptools"
1503 # architecture, manufacturer and model for the target-tree build
1504 t_cpu="coldfire"
1505 t_manufacturer="iaudio"
1506 t_model="m5"
1509 32|iaudio7)
1510 target_id=32
1511 modelname="iaudio7"
1512 target="-DIAUDIO_7"
1513 memory=16 # always
1514 arm946cc
1515 tool="$rootdir/tools/scramble -add=i7"
1516 boottool="$rootdir/tools/scramble -tcc=crc"
1517 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1518 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1519 output="rockbox.iaudio"
1520 appextra="recorder:gui"
1521 plugins="yes"
1522 swcodec="yes"
1523 bootoutput="I7_FW.BIN"
1524 # toolset is the tools within the tools directory that we build for
1525 # this particular target.
1526 toolset="$tccbitmaptools"
1527 # architecture, manufacturer and model for the target-tree build
1528 t_cpu="arm"
1529 t_manufacturer="tcc77x"
1530 t_model="iaudio7"
1533 33|cowond2)
1534 target_id=34
1535 modelname="cowond2"
1536 target="-DCOWON_D2"
1537 memory=32
1538 arm926ejscc
1539 tool="$rootdir/tools/scramble -add=d2"
1540 boottool="cp "
1541 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1542 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1543 output="rockbox.d2"
1544 bootoutput="bootloader-cowond2.bin"
1545 appextra="recorder:gui"
1546 plugins="yes"
1547 swcodec="yes"
1548 toolset="$tccbitmaptools"
1549 # architecture, manufacturer and model for the target-tree build
1550 t_cpu="arm"
1551 t_manufacturer="tcc780x"
1552 t_model="cowond2"
1555 34|m3)
1556 target_id=37
1557 modelname="m3"
1558 target="-DIAUDIO_M3"
1559 memory=16 # always
1560 coldfirecc
1561 tool="$rootdir/tools/scramble -add=iam3"
1562 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1563 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1564 output="rockbox.iaudio"
1565 appextra="recorder:gui"
1566 plugins="yes"
1567 swcodec="yes"
1568 # toolset is the tools within the tools directory that we build for
1569 # this particular target.
1570 toolset="$iaudiobitmaptools"
1571 # architecture, manufacturer and model for the target-tree build
1572 t_cpu="coldfire"
1573 t_manufacturer="iaudio"
1574 t_model="m3"
1577 40|gigabeatf)
1578 target_id=20
1579 modelname="gigabeatf"
1580 target="-DGIGABEAT_F"
1581 memory=32 # always
1582 arm9tdmicc
1583 tool="$rootdir/tools/scramble -add=giga"
1584 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1585 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1586 output="rockbox.gigabeat"
1587 appextra="recorder:gui"
1588 plugins="yes"
1589 swcodec="yes"
1590 toolset=$gigabeatbitmaptools
1591 boottool="$rootdir/tools/scramble -gigabeat"
1592 bootoutput="FWIMG01.DAT"
1593 # architecture, manufacturer and model for the target-tree build
1594 t_cpu="arm"
1595 t_manufacturer="s3c2440"
1596 t_model="gigabeat-fx"
1599 41|gigabeats)
1600 target_id=26
1601 modelname="gigabeats"
1602 target="-DGIGABEAT_S"
1603 memory=64
1604 arm1136jfscc
1605 tool="$rootdir/tools/scramble -add=gigs"
1606 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1607 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1608 output="rockbox.gigabeat"
1609 appextra="recorder:gui"
1610 plugins="yes"
1611 swcodec="yes"
1612 toolset="$gigabeatbitmaptools"
1613 boottool="$rootdir/tools/scramble -gigabeats"
1614 bootoutput="nk.bin"
1615 # architecture, manufacturer and model for the target-tree build
1616 t_cpu="arm"
1617 t_manufacturer="imx31"
1618 t_model="gigabeat-s"
1621 70|mrobe500)
1622 target_id=36
1623 modelname="mrobe500"
1624 target="-DMROBE_500"
1625 memory=64 # always
1626 arm926ejscc
1627 tool="$rootdir/tools/scramble -add=m500"
1628 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1629 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1630 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1631 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1632 output="rockbox.mrobe500"
1633 appextra="recorder:gui"
1634 plugins="yes"
1635 swcodec="yes"
1636 toolset=$gigabeatbitmaptools
1637 boottool="cp "
1638 bootoutput="rockbox.mrboot"
1639 # architecture, manufacturer and model for the target-tree build
1640 t_cpu="arm"
1641 t_manufacturer="tms320dm320"
1642 t_model="mrobe-500"
1645 71|mrobe100)
1646 target_id=33
1647 modelname="mrobe100"
1648 target="-DMROBE_100"
1649 memory=32 # always
1650 arm7tdmicc
1651 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1652 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1653 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1654 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1655 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1656 output="rockbox.mi4"
1657 appextra="recorder:gui"
1658 plugins="yes"
1659 swcodec="yes"
1660 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1661 bootoutput="pp5020.mi4"
1662 # toolset is the tools within the tools directory that we build for
1663 # this particular target.
1664 toolset=$scramblebitmaptools
1665 # architecture, manufacturer and model for the target-tree build
1666 t_cpu="arm"
1667 t_manufacturer="olympus"
1668 t_model="mrobe-100"
1671 80|logikdax)
1672 target_id=31
1673 modelname="logikdax"
1674 target="-DLOGIK_DAX"
1675 memory=2 # always
1676 arm946cc
1677 tool="$rootdir/tools/scramble -add=ldax"
1678 boottool="$rootdir/tools/scramble -tcc=crc"
1679 bootoutput="player.rom"
1680 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1681 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1682 output="rockbox.logik"
1683 appextra="recorder:gui"
1684 plugins=""
1685 swcodec="yes"
1686 # toolset is the tools within the tools directory that we build for
1687 # this particular target.
1688 toolset=$tccbitmaptools
1689 # architecture, manufacturer and model for the target-tree build
1690 t_cpu="arm"
1691 t_manufacturer="tcc77x"
1692 t_model="logikdax"
1695 90|creativezvm30gb)
1696 target_id=35
1697 modelname="creativezvm30gb"
1698 target="-DCREATIVE_ZVM"
1699 memory=64
1700 arm926ejscc
1701 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1702 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1703 tool="$rootdir/tools/scramble -creative=zvm"
1704 USE_ELF="yes"
1705 output="rockbox.zvm"
1706 appextra="recorder:gui"
1707 plugins="yes"
1708 swcodec="yes"
1709 toolset=$ipodbitmaptools
1710 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1711 bootoutput="rockbox.zvmboot"
1712 # architecture, manufacturer and model for the target-tree build
1713 t_cpu="arm"
1714 t_manufacturer="tms320dm320"
1715 t_model="creative-zvm"
1718 91|creativezvm60gb)
1719 target_id=40
1720 modelname="creativezvm60gb"
1721 target="-DCREATIVE_ZVM60GB"
1722 memory=64
1723 arm926ejscc
1724 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1725 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1726 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1727 USE_ELF="yes"
1728 output="rockbox.zvm60"
1729 appextra="recorder:gui"
1730 plugins="yes"
1731 swcodec="yes"
1732 toolset=$ipodbitmaptools
1733 boottool="$rootdir/tools/scramble -creative=zvm60"
1734 bootoutput="rockbox.zvm60boot"
1735 # architecture, manufacturer and model for the target-tree build
1736 t_cpu="arm"
1737 t_manufacturer="tms320dm320"
1738 t_model="creative-zvm"
1741 92|creativezenvision)
1742 target_id=39
1743 modelname="creativezenvision"
1744 target="-DCREATIVE_ZV"
1745 memory=64
1746 arm926ejscc
1747 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1748 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1749 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1750 USE_ELF="yes"
1751 output="rockbox.zv"
1752 appextra="recorder:gui"
1753 plugins=""
1754 swcodec="yes"
1755 toolset=$ipodbitmaptools
1756 boottool="$rootdir/tools/scramble -creative=zenvision"
1757 bootoutput="rockbox.zvboot"
1758 # architecture, manufacturer and model for the target-tree build
1759 t_cpu="arm"
1760 t_manufacturer="tms320dm320"
1761 t_model="creative-zvm"
1764 50|e200)
1765 target_id=23
1766 modelname="e200"
1767 target="-DSANSA_E200"
1768 memory=32 # supposedly
1769 arm7tdmicc
1770 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1771 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1772 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1773 output="rockbox.mi4"
1774 appextra="recorder:gui"
1775 plugins="yes"
1776 swcodec="yes"
1777 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1778 bootoutput="PP5022.mi4"
1779 # toolset is the tools within the tools directory that we build for
1780 # this particular target.
1781 toolset=$scramblebitmaptools
1782 # architecture, manufacturer and model for the target-tree build
1783 t_cpu="arm"
1784 t_manufacturer="sandisk"
1785 t_model="sansa-e200"
1788 51|e200r)
1789 # the e200R model is pretty much identical to the e200, it only has a
1790 # different option to the scramble tool when building a bootloader and
1791 # makes the bootloader output file name in all lower case.
1792 target_id=27
1793 modelname="e200r"
1794 target="-DSANSA_E200"
1795 memory=32 # supposedly
1796 arm7tdmicc
1797 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1798 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1799 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1800 output="rockbox.mi4"
1801 appextra="recorder:gui"
1802 plugins="yes"
1803 swcodec="yes"
1804 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1805 bootoutput="pp5022.mi4"
1806 # toolset is the tools within the tools directory that we build for
1807 # this particular target.
1808 toolset=$scramblebitmaptools
1809 # architecture, manufacturer and model for the target-tree build
1810 t_cpu="arm"
1811 t_manufacturer="sandisk"
1812 t_model="sansa-e200"
1815 52|c200)
1816 target_id=30
1817 modelname="c200"
1818 target="-DSANSA_C200"
1819 memory=32 # supposedly
1820 arm7tdmicc
1821 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1822 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1823 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1824 output="rockbox.mi4"
1825 appextra="recorder:gui"
1826 plugins="yes"
1827 swcodec="yes"
1828 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1829 bootoutput="firmware.mi4"
1830 # toolset is the tools within the tools directory that we build for
1831 # this particular target.
1832 toolset=$scramblebitmaptools
1833 # architecture, manufacturer and model for the target-tree build
1834 t_cpu="arm"
1835 t_manufacturer="sandisk"
1836 t_model="sansa-c200"
1839 53|m200)
1840 target_id=48
1841 modelname="m200"
1842 target="-DSANSA_M200"
1843 memory=1 # always
1844 arm946cc
1845 tool="$rootdir/tools/scramble -add=m200"
1846 boottool="$rootdir/tools/scramble -tcc=crc"
1847 bootoutput="player.rom"
1848 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1849 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1850 output="rockbox.m200"
1851 appextra="recorder:gui"
1852 plugins=""
1853 swcodec="yes"
1854 # toolset is the tools within the tools directory that we build for
1855 # this particular target.
1856 toolset=$tccbitmaptools
1857 # architecture, manufacturer and model for the target-tree build
1858 t_cpu="arm"
1859 t_manufacturer="tcc77x"
1860 t_model="m200"
1863 54|c100)
1864 target_id=42
1865 modelname="c100"
1866 target="-DSANSA_C100"
1867 memory=2
1868 arm946cc
1869 tool="$rootdir/tools/scramble -add=c100"
1870 boottool="$rootdir/tools/scramble -tcc=crc"
1871 bootoutput="player.rom"
1872 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1873 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1874 output="rockbox.c100"
1875 appextra="recorder:gui"
1876 plugins=""
1877 swcodec="yes"
1878 # toolset is the tools within the tools directory that we build for
1879 # this particular target.
1880 toolset=$tccbitmaptools
1881 # architecture, manufacturer and model for the target-tree build
1882 t_cpu="arm"
1883 t_manufacturer="tcc77x"
1884 t_model="c100"
1887 55|Clip|clip)
1888 target_id=50
1889 modelname="clip"
1890 target="-DSANSA_CLIP"
1891 memory=2
1892 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1893 bmp2rb_native="$bmp2rb_mono"
1894 tool="$rootdir/tools/scramble -add=clip"
1895 output="rockbox.sansa"
1896 bootoutput="bootloader-clip.sansa"
1897 appextra="recorder:gui"
1898 plugins="yes"
1899 swcodec="yes"
1900 toolset=$scramblebitmaptools
1901 t_cpu="arm"
1902 t_manufacturer="as3525"
1903 t_model="sansa-clip"
1904 arm9tdmicc
1908 56|e200v2)
1909 target_id=51
1910 modelname="e200v2"
1911 target="-DSANSA_E200V2"
1912 memory=8
1913 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1914 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1915 tool="$rootdir/tools/scramble -add=e2v2"
1916 output="rockbox.sansa"
1917 bootoutput="bootloader-e200v2.sansa"
1918 appextra="recorder:gui"
1919 plugins="yes"
1920 swcodec="yes"
1921 toolset=$scramblebitmaptools
1922 t_cpu="arm"
1923 t_manufacturer="as3525"
1924 t_model="sansa-e200v2"
1925 arm9tdmicc
1929 57|m200v4)
1930 target_id=52
1931 modelname="m200v4"
1932 target="-DSANSA_M200V4"
1933 memory=2
1934 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1935 bmp2rb_native="$bmp2rb_mono"
1936 tool="$rootdir/tools/scramble -add=m2v4"
1937 output="rockbox.sansa"
1938 bootoutput="bootloader-m200v4.sansa"
1939 appextra="recorder:gui"
1940 plugins="yes"
1941 swcodec="yes"
1942 toolset=$scramblebitmaptools
1943 t_cpu="arm"
1944 t_manufacturer="as3525"
1945 t_model="sansa-m200v4"
1946 arm9tdmicc
1950 58|fuze)
1951 target_id=53
1952 modelname="fuze"
1953 target="-DSANSA_FUZE"
1954 memory=8
1955 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1956 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1957 tool="$rootdir/tools/scramble -add=fuze"
1958 output="rockbox.sansa"
1959 bootoutput="bootloader-fuze.sansa"
1960 appextra="recorder:gui"
1961 plugins="yes"
1962 swcodec="yes"
1963 toolset=$scramblebitmaptools
1964 t_cpu="arm"
1965 t_manufacturer="as3525"
1966 t_model="sansa-fuze"
1967 arm9tdmicc
1971 59|c200v2)
1972 target_id=55
1973 modelname="c200v2"
1974 target="-DSANSA_C200V2"
1975 memory=2 # as per OF diagnosis mode
1976 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1977 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1978 tool="$rootdir/tools/scramble -add=c2v2"
1979 output="rockbox.sansa"
1980 bootoutput="bootloader-c200v2.sansa"
1981 appextra="recorder:gui"
1982 plugins="yes"
1983 swcodec="yes"
1984 # toolset is the tools within the tools directory that we build for
1985 # this particular target.
1986 toolset=$scramblebitmaptools
1987 # architecture, manufacturer and model for the target-tree build
1988 t_cpu="arm"
1989 t_manufacturer="as3525"
1990 t_model="sansa-c200v2"
1991 arm9tdmicc
1994 60|Clipv2|clipv2)
1995 echo "Sansa Clipv2 is not yet supported !"
1996 exit 1
1997 target_id=60
1998 modelname="clipv2"
1999 target="-DSANSA_CLIPV2"
2000 memory=8
2001 arm926ejscc
2002 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2003 bmp2rb_native="$bmp2rb_mono"
2004 tool="$rootdir/tools/scramble -add=clv2"
2005 output="rockbox.sansa"
2006 bootoutput="bootloader-clipv2.sansa"
2007 appextra="recorder:gui"
2008 plugins="yes"
2009 swcodec="yes"
2010 toolset=$scramblebitmaptools
2011 t_cpu="arm"
2012 t_manufacturer="as3525"
2013 t_model="sansa-clipv2"
2016 61|view)
2017 echo "Sansa View is not yet supported!"
2018 exit 1
2019 target_id=63
2020 modelname="view"
2021 target="-DSANSA_VIEW"
2022 memory=32
2023 arm1176jzscc
2024 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2025 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2026 output="rockbox.mi4"
2027 appextra="gui"
2028 plugins=""
2029 swcodec="yes"
2030 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2031 bootoutput="firmware.mi4"
2032 # toolset is the tools within the tools directory that we build for
2033 # this particular target.
2034 toolset=$scramblebitmaptools
2035 t_cpu="arm"
2036 t_manufacturer="sandisk"
2037 t_model="sansa-view"
2040 150|tpj1022)
2041 target_id=25
2042 modelname="tpj1022"
2043 target="-DELIO_TPJ1022"
2044 memory=32 # always
2045 arm7tdmicc
2046 tool="$rootdir/tools/scramble -add tpj2"
2047 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2048 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2049 output="rockbox.elio"
2050 appextra="recorder:gui"
2051 plugins="yes"
2052 swcodec="yes"
2053 boottool="$rootdir/tools/scramble -mi4v2"
2054 bootoutput="pp5020.mi4"
2055 # toolset is the tools within the tools directory that we build for
2056 # this particular target.
2057 toolset=$scramblebitmaptools
2058 # architecture, manufacturer and model for the target-tree build
2059 t_cpu="arm"
2060 t_manufacturer="tatung"
2061 t_model="tpj1022"
2064 100|sa9200)
2065 target_id=41
2066 modelname="sa9200"
2067 target="-DPHILIPS_SA9200"
2068 memory=32 # supposedly
2069 arm7tdmicc
2070 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2071 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2072 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2073 output="rockbox.mi4"
2074 appextra="recorder:gui"
2075 plugins=""
2076 swcodec="yes"
2077 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2078 bootoutput="FWImage.ebn"
2079 # toolset is the tools within the tools directory that we build for
2080 # this particular target.
2081 toolset=$scramblebitmaptools
2082 # architecture, manufacturer and model for the target-tree build
2083 t_cpu="arm"
2084 t_manufacturer="philips"
2085 t_model="sa9200"
2088 101|hdd1630)
2089 target_id=43
2090 modelname="hdd1630"
2091 target="-DPHILIPS_HDD1630"
2092 memory=32 # supposedly
2093 arm7tdmicc
2094 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2095 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2096 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2097 output="rockbox.mi4"
2098 appextra="recorder:gui"
2099 plugins="yes"
2100 swcodec="yes"
2101 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2102 bootoutput="FWImage.ebn"
2103 # toolset is the tools within the tools directory that we build for
2104 # this particular target.
2105 toolset=$scramblebitmaptools
2106 # architecture, manufacturer and model for the target-tree build
2107 t_cpu="arm"
2108 t_manufacturer="philips"
2109 t_model="hdd1630"
2112 110|meizum6sl)
2113 target_id=49
2114 modelname="meizum6sl"
2115 target="-DMEIZU_M6SL"
2116 memory=16 # always
2117 arm940tbecc
2118 tool="cp"
2119 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2120 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2121 output="rockbox.meizu"
2122 appextra="recorder:gui"
2123 plugins="no" #FIXME
2124 swcodec="yes"
2125 toolset=$genericbitmaptools
2126 boottool="cp"
2127 bootoutput="rockboot.ebn"
2128 # architecture, manufacturer and model for the target-tree build
2129 t_cpu="arm"
2130 t_manufacturer="s5l8700"
2131 t_model="meizu-m6sl"
2134 111|meizum6sp)
2135 target_id=46
2136 modelname="meizum6sp"
2137 target="-DMEIZU_M6SP"
2138 memory=16 # always
2139 arm940tbecc
2140 tool="cp"
2141 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2142 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2143 output="rockbox.meizu"
2144 appextra="recorder:gui"
2145 plugins="no" #FIXME
2146 swcodec="yes"
2147 toolset=$genericbitmaptools
2148 boottool="cp"
2149 bootoutput="rockboot.ebn"
2150 # architecture, manufacturer and model for the target-tree build
2151 t_cpu="arm"
2152 t_manufacturer="s5l8700"
2153 t_model="meizu-m6sp"
2156 112|meizum3)
2157 target_id=47
2158 modelname="meizum3"
2159 target="-DMEIZU_M3"
2160 memory=16 # always
2161 arm940tbecc
2162 tool="cp"
2163 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2164 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2165 output="rockbox.meizu"
2166 appextra="recorder:gui"
2167 plugins="no" #FIXME
2168 swcodec="yes"
2169 toolset=$genericbitmaptools
2170 boottool="cp"
2171 bootoutput="rockboot.ebn"
2172 # architecture, manufacturer and model for the target-tree build
2173 t_cpu="arm"
2174 t_manufacturer="s5l8700"
2175 t_model="meizu-m3"
2178 120|ondavx747)
2179 target_id=45
2180 modelname="ondavx747"
2181 target="-DONDA_VX747"
2182 memory=16
2183 mipselcc
2184 tool="$rootdir/tools/scramble -add=x747"
2185 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2186 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2187 output="rockbox.vx747"
2188 appextra="recorder:gui"
2189 plugins="yes"
2190 swcodec="yes"
2191 toolset=$genericbitmaptools
2192 boottool="$rootdir/tools/scramble -ccpmp"
2193 bootoutput="ccpmp.bin"
2194 # architecture, manufacturer and model for the target-tree build
2195 t_cpu="mips"
2196 t_manufacturer="ingenic_jz47xx"
2197 t_model="onda_vx747"
2200 121|ondavx767)
2201 target_id=64
2202 modelname="ondavx767"
2203 target="-DONDA_VX767"
2204 memory=16 #FIXME
2205 mipselcc
2206 tool="cp"
2207 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2208 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2209 output="rockbox.vx767"
2210 appextra="recorder:gui"
2211 plugins="" #FIXME
2212 swcodec="yes"
2213 toolset=$genericbitmaptools
2214 boottool="$rootdir/tools/scramble -ccpmp"
2215 bootoutput="ccpmp.bin"
2216 # architecture, manufacturer and model for the target-tree build
2217 t_cpu="mips"
2218 t_manufacturer="ingenic_jz47xx"
2219 t_model="onda_vx767"
2222 122|ondavx747p)
2223 target_id=54
2224 modelname="ondavx747p"
2225 target="-DONDA_VX747P"
2226 memory=16
2227 mipselcc
2228 tool="$rootdir/tools/scramble -add=747p"
2229 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2230 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2231 output="rockbox.vx747p"
2232 appextra="recorder:gui"
2233 plugins="yes"
2234 swcodec="yes"
2235 toolset=$genericbitmaptools
2236 boottool="$rootdir/tools/scramble -ccpmp"
2237 bootoutput="ccpmp.bin"
2238 # architecture, manufacturer and model for the target-tree build
2239 t_cpu="mips"
2240 t_manufacturer="ingenic_jz47xx"
2241 t_model="onda_vx747"
2244 123|ondavx777)
2245 target_id=61
2246 modelname="ondavx777"
2247 target="-DONDA_VX777"
2248 memory=16
2249 mipselcc
2250 tool="$rootdir/tools/scramble -add=x777"
2251 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2252 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2253 output="rockbox.vx777"
2254 appextra="recorder:gui"
2255 plugins="yes"
2256 swcodec="yes"
2257 toolset=$genericbitmaptools
2258 boottool="$rootdir/tools/scramble -ccpmp"
2259 bootoutput="ccpmp.bin"
2260 # architecture, manufacturer and model for the target-tree build
2261 t_cpu="mips"
2262 t_manufacturer="ingenic_jz47xx"
2263 t_model="onda_vx747"
2266 130|lyre_proto1)
2267 target_id=56
2268 modelname="lyre_proto1"
2269 target="-DLYRE_PROTO1"
2270 memory=64
2271 arm926ejscc
2272 tool="cp"
2273 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2274 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2275 output="rockbox.lyre"
2276 appextra="recorder:gui"
2277 plugins=""
2278 swcodec="yes"
2279 toolset=$scramblebitmaptools
2280 boottool="cp"
2281 bootoutput="bootloader-proto1.lyre"
2282 # architecture, manufacturer and model for the target-tree build
2283 t_cpu="arm"
2284 t_manufacturer="at91sam"
2285 t_model="lyre_proto1"
2288 131|mini2440)
2289 target_id=99
2290 modelname="mini2440"
2291 target="-DMINI2440"
2292 memory=64
2293 arm9tdmicc
2294 tool="$rootdir/tools/scramble -add=m244"
2295 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2296 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2297 output="rockbox.mini2440"
2298 appextra="recorder:gui"
2299 plugins=""
2300 swcodec="yes"
2301 toolset=$scramblebitmaptools
2302 boottool="cp"
2303 bootoutput="bootloader-mini2440.lyre"
2304 # architecture, manufacturer and model for the target-tree build
2305 t_cpu="arm"
2306 t_manufacturer="s3c2440"
2307 t_model="mini2440"
2310 140|yh820)
2311 target_id=57
2312 modelname="yh820"
2313 target="-DSAMSUNG_YH820"
2314 memory=32 # always
2315 arm7tdmicc
2316 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2317 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2318 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2319 output="rockbox.mi4"
2320 appextra="recorder:gui"
2321 plugins="yes"
2322 swcodec="yes"
2323 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2324 bootoutput="FW_YH820.mi4"
2325 # toolset is the tools within the tools directory that we build for
2326 # this particular target.
2327 toolset=$scramblebitmaptools
2328 # architecture, manufacturer and model for the target-tree build
2329 t_cpu="arm"
2330 t_manufacturer="samsung"
2331 t_model="yh820"
2334 141|yh920)
2335 target_id=58
2336 modelname="yh920"
2337 target="-DSAMSUNG_YH920"
2338 memory=32 # always
2339 arm7tdmicc
2340 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2341 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2342 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2343 output="rockbox.mi4"
2344 appextra="recorder:gui"
2345 plugins="yes"
2346 swcodec="yes"
2347 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2348 bootoutput="PP5020.mi4"
2349 # toolset is the tools within the tools directory that we build for
2350 # this particular target.
2351 toolset=$scramblebitmaptools
2352 # architecture, manufacturer and model for the target-tree build
2353 t_cpu="arm"
2354 t_manufacturer="samsung"
2355 t_model="yh920"
2358 142|yh925)
2359 target_id=59
2360 modelname="yh925"
2361 target="-DSAMSUNG_YH925"
2362 memory=32 # always
2363 arm7tdmicc
2364 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2365 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2366 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2367 output="rockbox.mi4"
2368 appextra="recorder:gui"
2369 plugins="yes"
2370 swcodec="yes"
2371 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2372 bootoutput="FW_YH925.mi4"
2373 # toolset is the tools within the tools directory that we build for
2374 # this particular target.
2375 toolset=$scramblebitmaptools
2376 # architecture, manufacturer and model for the target-tree build
2377 t_cpu="arm"
2378 t_manufacturer="samsung"
2379 t_model="yh925"
2382 143|yps3)
2383 target_id=60
2384 modelname="yps3"
2385 target="-DSAMSUNG_YPS3"
2386 memory=16 # always
2387 arm940tbecc
2388 tool="cp"
2389 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2390 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2391 output="rockbox.yps3"
2392 appextra="recorder:gui"
2393 plugins="no" #FIXME
2394 swcodec="yes"
2395 toolset=$genericbitmaptools
2396 boottool="cp"
2397 bootoutput="rockboot.ebn"
2398 # architecture, manufacturer and model for the target-tree build
2399 t_cpu="arm"
2400 t_manufacturer="s5l8700"
2401 t_model="yps3"
2406 echo "Please select a supported target platform!"
2407 exit 7
2410 esac
2412 echo "Platform set to $modelname"
2415 #remove start
2416 ############################################################################
2417 # Amount of memory, for those that can differ. They have $memory unset at
2418 # this point.
2421 if [ -z "$memory" ]; then
2422 case $target_id in
2424 if [ "$ARG_RAM" ]; then
2425 size=$ARG_RAM
2426 else
2427 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2428 size=`input`;
2430 case $size in
2431 60|64)
2432 memory="64"
2435 memory="32"
2437 esac
2440 if [ "$ARG_RAM" ]; then
2441 size=$ARG_RAM
2442 else
2443 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2444 size=`input`;
2446 case $size in
2448 memory="8"
2451 memory="2"
2453 esac
2455 esac
2456 echo "Memory size selected: $memory MB"
2457 [ "$ARG_TYPE" ] || echo ""
2459 #remove end
2461 ##################################################################
2462 # Figure out build "type"
2465 # the ifp7x0 is the only platform that supports building a gdb stub like
2466 # this
2467 case $modelname in
2468 ifp7xx)
2469 gdbstub="(G)DB stub, "
2471 e200r|e200)
2472 gdbstub="(I)nstaller, "
2474 c200)
2475 gdbstub="(E)raser, "
2479 esac
2480 if [ "$ARG_TYPE" ]; then
2481 btype=$ARG_TYPE
2482 else
2483 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2484 btype=`input`;
2487 case $btype in
2488 [Ii])
2489 appsdir='\$(ROOTDIR)/bootloader'
2490 apps="bootloader"
2491 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2492 bootloader="1"
2493 echo "e200R-installer build selected"
2495 [Ee])
2496 appsdir='\$(ROOTDIR)/bootloader'
2497 apps="bootloader"
2498 echo "C2(4)0 or C2(5)0"
2499 variant=`input`
2500 case $variant in
2502 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2503 echo "c240 eraser build selected"
2506 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2507 echo "c240 eraser build selected"
2509 esac
2510 bootloader="1"
2511 echo "c200 eraser build selected"
2513 [Bb])
2514 if test $t_manufacturer = "archos"; then
2515 # Archos SH-based players do this somewhat differently for
2516 # some reason
2517 appsdir='\$(ROOTDIR)/flash/bootbox'
2518 apps="bootbox"
2519 else
2520 appsdir='\$(ROOTDIR)/bootloader'
2521 apps="bootloader"
2522 flash=""
2523 if test -n "$boottool"; then
2524 tool="$boottool"
2526 if test -n "$bootoutput"; then
2527 output=$bootoutput
2530 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2531 bootloader="1"
2532 echo "Bootloader build selected"
2534 [Ss])
2535 debug="-DDEBUG"
2536 simulator="yes"
2537 extradefines="-DSIMULATOR"
2538 archosrom=""
2539 flash=""
2540 echo "Simulator build selected"
2542 [Aa]*)
2543 echo "Advanced build selected"
2544 whichadvanced $btype
2546 [Gg])
2547 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2548 appsdir='\$(ROOTDIR)/gdb'
2549 apps="stub"
2550 case $modelname in
2551 ifp7xx)
2552 output="stub.wma"
2556 esac
2557 echo "GDB stub build selected"
2559 [Mm])
2560 toolset='';
2561 apps="manual"
2562 echo "Manual build selected"
2564 [Cc])
2565 uname=`uname`
2566 simcc "checkwps"
2567 toolset='';
2568 t_cpu='';
2569 GCCOPTS='';
2570 appsdir='\$(ROOTDIR)/tools/checkwps';
2571 output='checkwps.'${modelname};
2572 archosrom='';
2573 echo "CheckWPS build selected"
2575 [Dd])
2576 uname=`uname`
2577 simcc "database"
2578 toolset='';
2579 t_cpu='';
2580 GCCOPTS='';
2581 appsdir='\$(ROOTDIR)/tools/database';
2582 output='database.'${modelname};
2583 archosrom='';
2584 echo "Database tool build selected"
2587 if [ "$modelname" = "e200r" ]; then
2588 echo "Do not use the e200R target for regular builds. Use e200 instead."
2589 exit 8
2591 debug=""
2592 btype="N" # set it explicitly since RET only gets here as well
2593 echo "Normal build selected"
2596 esac
2597 # to be able running "make manual" from non-manual configuration
2598 case $modelname in
2599 fmrecorder)
2600 manualdev="recorderv2fm"
2602 recorderv2)
2603 manualdev="recorderv2fm"
2605 h1??)
2606 manualdev="h100"
2608 ipodmini2g)
2609 manualdev="ipodmini"
2612 manualdev=$modelname
2614 esac
2616 if [ -z "$debug" ]; then
2617 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2620 echo "Using source code root directory: $rootdir"
2622 # this was once possible to change at build-time, but no more:
2623 language="english"
2625 uname=`uname`
2627 if [ "yes" = "$simulator" ]; then
2628 # setup compiler and things for simulator
2629 simcc "sdl"
2631 if [ -d "simdisk" ]; then
2632 echo "Subdirectory 'simdisk' already present"
2633 else
2634 mkdir simdisk
2635 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2639 # Now, figure out version number of the (gcc) compiler we are about to use
2640 gccver=`$CC -dumpversion`;
2642 # figure out the binutil version too and display it, mostly for the build
2643 # system etc to be able to see it easier
2644 if [ $uname = "Darwin" ]; then
2645 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2646 else
2647 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2650 if [ -z "$gccver" ]; then
2651 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
2652 echo "[WARNING] this may cause your build to fail since we cannot do the"
2653 echo "[WARNING] checks we want now."
2654 else
2656 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2657 # DEPEND on it
2659 num1=`echo $gccver | cut -d . -f1`
2660 num2=`echo $gccver | cut -d . -f2`
2661 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2663 # This makes:
2664 # 3.3.X => 303
2665 # 3.4.X => 304
2666 # 2.95.3 => 295
2668 echo "Using $CC $gccver ($gccnum)"
2670 if test "$gccnum" -ge "400"; then
2671 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2672 # so we ignore that warnings for now
2673 # -Wno-pointer-sign
2674 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2677 if test "$gccnum" -ge "401"; then
2678 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2679 # will break strict-aliasing rules"
2681 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
2684 if test "$gccnum" -ge "402"; then
2685 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2686 # and later would throw it for several valid cases
2687 GCCOPTS="$GCCOPTS -Wno-override-init"
2690 case $prefix in
2692 # simulator
2694 i586-mingw32msvc-)
2695 # cross-compile for win32
2698 # Verify that the cross-compiler is of a recommended version!
2699 if test "$gccver" != "$gccchoice"; then
2700 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2701 echo "WARNING: version $gccchoice!"
2702 echo "WARNING: This may cause your build to fail since it may be a version"
2703 echo "WARNING: that isn't functional or known to not be the best choice."
2704 echo "WARNING: If you suffer from build problems, you know that this is"
2705 echo "WARNING: a likely source for them..."
2708 esac
2713 echo "Using $LD $ldver"
2715 # check the compiler for SH platforms
2716 if test "$CC" = "sh-elf-gcc"; then
2717 if test "$gccnum" -lt "400"; then
2718 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2719 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2720 else
2721 # figure out patch status
2722 gccpatch=`$CC --version`;
2724 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2725 echo "gcc $gccver is rockbox patched"
2726 # then convert -O to -Os to get smaller binaries!
2727 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2728 else
2729 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2730 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2735 if test "$CC" = "m68k-elf-gcc"; then
2736 # convert -O to -Os to get smaller binaries!
2737 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2740 if [ "$ARG_CCACHE" = "1" ]; then
2741 echo "Enable ccache for building"
2742 ccache="ccache"
2743 elif [ "$ARG_CCACHE" != "0" ]; then
2744 ccache=`findtool ccache`
2745 if test -n "$ccache"; then
2746 echo "Found and uses ccache ($ccache)"
2750 # figure out the full path to the various commands if possible
2751 HOSTCC=`findtool gcc --lit`
2752 HOSTAR=`findtool ar --lit`
2753 CC=`findtool ${CC} --lit`
2754 LD=`findtool ${AR} --lit`
2755 AR=`findtool ${AR} --lit`
2756 AS=`findtool ${AS} --lit`
2757 OC=`findtool ${OC} --lit`
2758 WINDRES=`findtool ${WINDRES} --lit`
2759 DLLTOOL=`findtool ${DLLTOOL} --lit`
2760 DLLWRAP=`findtool ${DLLWRAP} --lit`
2761 RANLIB=`findtool ${RANLIB} --lit`
2763 if test -n "$ccache"; then
2764 CC="$ccache $CC"
2767 if test "X$endian" = "Xbig"; then
2768 defendian="ROCKBOX_BIG_ENDIAN"
2769 else
2770 defendian="ROCKBOX_LITTLE_ENDIAN"
2773 if [ "$ARG_RBDIR" ]; then
2774 rbdir=$ARG_RBDIR
2775 echo "Using alternate rockbox dir: ${rbdir}"
2778 sed > autoconf.h \
2779 -e "s,@ENDIAN@,${defendian},g" \
2780 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2781 -e "s,@config_rtc@,$config_rtc,g" \
2782 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2783 -e "s,@RBDIR@,${rbdir},g" \
2784 -e "s,@have_backlight@,$have_backlight,g" \
2785 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
2786 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
2787 <<EOF
2788 /* This header was made by configure */
2789 #ifndef __BUILD_AUTOCONF_H
2790 #define __BUILD_AUTOCONF_H
2792 /* Define endianess for the target or simulator platform */
2793 #define @ENDIAN@ 1
2795 /* Define this if you build rockbox to support the logf logging and display */
2796 #undef ROCKBOX_HAS_LOGF
2798 /* optional define for a backlight modded Ondio */
2799 @have_backlight@
2801 /* optional define for FM radio mod for iAudio M5 */
2802 @have_fmradio_in@
2804 /* optional define for ATA poweroff on Player */
2805 @have_ata_poweroff@
2807 /* optional defines for RTC mod for h1x0 */
2808 @config_rtc@
2809 @have_rtc_alarm@
2811 /* root of Rockbox */
2812 #define ROCKBOX_DIR "/@RBDIR@"
2814 #endif /* __BUILD_AUTOCONF_H */
2817 if test -n "$t_cpu"; then
2818 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2819 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2820 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2821 GCCOPTS="$GCCOPTS"
2824 if test "$simulator" = "yes"; then
2825 # add simul make stuff on the #SIMUL# line
2826 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2827 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2828 else
2829 # delete the lines that match
2830 simmagic1='/@SIMUL1@/D'
2831 simmagic2='/@SIMUL2@/D'
2834 if test "$swcodec" = "yes"; then
2835 voicetoolset="rbspeexenc voicefont wavtrim"
2836 else
2837 voicetoolset="voicefont wavtrim"
2840 if test "$apps" = "apps"; then
2841 # only when we build "real" apps we build the .lng files
2842 buildlangs="langs"
2845 #### Fix the cmdline ###
2846 if test -n "$ccache"; then
2847 cmdline="--ccache "
2850 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
2851 ### end of cmdline
2853 sed > Makefile \
2854 -e "s,@ROOTDIR@,${rootdir},g" \
2855 -e "s,@DEBUG@,${debug},g" \
2856 -e "s,@MEMORY@,${memory},g" \
2857 -e "s,@TARGET_ID@,${target_id},g" \
2858 -e "s,@TARGET@,${target},g" \
2859 -e "s,@CPU@,${t_cpu},g" \
2860 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2861 -e "s,@MODELNAME@,${modelname},g" \
2862 -e "s,@LANGUAGE@,${language},g" \
2863 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2864 -e "s,@PWD@,${pwd},g" \
2865 -e "s,@HOSTCC@,${HOSTCC},g" \
2866 -e "s,@HOSTAR@,${HOSTAR},g" \
2867 -e "s,@CC@,${CC},g" \
2868 -e "s,@LD@,${LD},g" \
2869 -e "s,@AR@,${AR},g" \
2870 -e "s,@AS@,${AS},g" \
2871 -e "s,@OC@,${OC},g" \
2872 -e "s,@WINDRES@,${WINDRES},g" \
2873 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2874 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2875 -e "s,@RANLIB@,${RANLIB},g" \
2876 -e "s,@TOOL@,${tool},g" \
2877 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2878 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2879 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2880 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2881 -e "s,@OUTPUT@,${output},g" \
2882 -e "s,@APPEXTRA@,${appextra},g" \
2883 -e "s,@ARCHOSROM@,${archosrom},g" \
2884 -e "s,@FLASHFILE@,${flash},g" \
2885 -e "s,@PLUGINS@,${plugins},g" \
2886 -e "s,@CODECS@,${swcodec},g" \
2887 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2888 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2889 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2890 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2891 -e "s!@LDOPTS@!${LDOPTS}!g" \
2892 -e "s,@LOADADDRESS@,${loadaddress},g" \
2893 -e "s,@EXTRADEF@,${extradefines},g" \
2894 -e "s,@APPSDIR@,${appsdir},g" \
2895 -e "s,@FIRMDIR@,${firmdir},g" \
2896 -e "s,@TOOLSDIR@,${toolsdir},g" \
2897 -e "s,@APPS@,${apps},g" \
2898 -e "s,@SIMVER@,${simver},g" \
2899 -e "s,@GCCVER@,${gccver},g" \
2900 -e "s,@GCCNUM@,${gccnum},g" \
2901 -e "s,@UNAME@,${uname},g" \
2902 -e "s,@ENDIAN@,${defendian},g" \
2903 -e "s,@TOOLSET@,${toolset},g" \
2904 -e "${simmagic1}" \
2905 -e "${simmagic2}" \
2906 -e "s,@MANUALDEV@,${manualdev},g" \
2907 -e "s,@ENCODER@,${ENC_CMD},g" \
2908 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2909 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2910 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2911 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2912 -e "s,@LANGS@,${buildlangs},g" \
2913 -e "s,@USE_ELF@,${USE_ELF},g" \
2914 -e "s,@RBDIR@,${rbdir},g" \
2915 -e "s,@PREFIX@,$PREFIX,g" \
2916 -e "s,@CMDLINE@,$cmdline,g" \
2917 <<EOF
2918 ## Automatically generated. http://www.rockbox.org/
2920 export ROOTDIR=@ROOTDIR@
2921 export FIRMDIR=@FIRMDIR@
2922 export APPSDIR=@APPSDIR@
2923 export TOOLSDIR=@TOOLSDIR@
2924 export DOCSDIR=\$(ROOTDIR)/docs
2925 export MANUALDIR=\${ROOTDIR}/manual
2926 export DEBUG=@DEBUG@
2927 export MODELNAME=@MODELNAME@
2928 export ARCHOSROM=@ARCHOSROM@
2929 export FLASHFILE=@FLASHFILE@
2930 export TARGET_ID=@TARGET_ID@
2931 export TARGET=@TARGET@
2932 export CPU=@CPU@
2933 export MANUFACTURER=@MANUFACTURER@
2934 export OBJDIR=@PWD@
2935 export BUILDDIR=@PWD@
2936 export LANGUAGE=@LANGUAGE@
2937 export VOICELANGUAGE=@VOICELANGUAGE@
2938 export MEMORYSIZE=@MEMORY@
2939 export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
2940 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2941 export MKFIRMWARE=@TOOL@
2942 export BMP2RB_MONO=@BMP2RB_MONO@
2943 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2944 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2945 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2946 export BINARY=@OUTPUT@
2947 export APPEXTRA=@APPEXTRA@
2948 export ENABLEDPLUGINS=@PLUGINS@
2949 export SOFTWARECODECS=@CODECS@
2950 export EXTRA_DEFINES=@EXTRADEF@
2951 export HOSTCC=@HOSTCC@
2952 export HOSTAR=@HOSTAR@
2953 export CC=@CC@
2954 export LD=@LD@
2955 export AR=@AR@
2956 export AS=@AS@
2957 export OC=@OC@
2958 export WINDRES=@WINDRES@
2959 export DLLTOOL=@DLLTOOL@
2960 export DLLWRAP=@DLLWRAP@
2961 export RANLIB=@RANLIB@
2962 export PREFIX=@PREFIX@
2963 export PROFILE_OPTS=@PROFILE_OPTS@
2964 export SIMVER=@SIMVER@
2965 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2966 export GCCOPTS=@GCCOPTS@
2967 export TARGET_INC=@TARGET_INC@
2968 export LOADADDRESS=@LOADADDRESS@
2969 export SHARED_FLAG=@SHARED_FLAG@
2970 export LDOPTS=@LDOPTS@
2971 export GCCVER=@GCCVER@
2972 export GCCNUM=@GCCNUM@
2973 export UNAME=@UNAME@
2974 export MANUALDEV=@MANUALDEV@
2975 export TTS_OPTS=@TTS_OPTS@
2976 export TTS_ENGINE=@TTS_ENGINE@
2977 export ENC_OPTS=@ENC_OPTS@
2978 export ENCODER=@ENCODER@
2979 export USE_ELF=@USE_ELF@
2980 export RBDIR=@RBDIR@
2982 CONFIGURE_OPTIONS=@CMDLINE@
2984 include \$(TOOLSDIR)/root.make
2988 echo "Created Makefile"