tools/configure does not let you select normal build for sansae200r - add similar...
[kugel-rb.git] / tools / configure
blob3d9c503fd9d2176d5ad85dcfc3d67caa3a84f162
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 findarmgcc() {
42 if [ "$ARG_ARM_EABI" = "1" ]; then
43 prefixtools arm-elf-eabi-
44 gccchoice="4.4.2"
45 else
46 prefixtools arm-elf-
47 gccchoice="4.0.3"
51 # scan the $PATH for the given command
52 findtool(){
53 file="$1"
55 IFS=":"
56 for path in $PATH
58 # echo "checks for $file in $path" >&2
59 if test -f "$path/$file"; then
60 echo "$path/$file"
61 return
63 done
64 # check whether caller wants literal return value if not found
65 if [ "$2" = "--lit" ]; then
66 echo "$file"
70 # scan the $PATH for sdl-config - if crosscompiling, require that it is
71 # a mingw32 sdl-config
72 findsdl(){
73 file="sdl-config"
75 IFS=":"
76 for path in $PATH
78 #echo "checks for $file in $path" >&2
79 if test -f "$path/$file"; then
80 if [ "yes" = "${crosscompile}" ]; then
81 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
82 echo "$path/$file"
83 return
85 else
86 echo "$path/$file"
87 return
90 done
93 simcc () {
95 # default tool setup for native building
96 prefixtools ""
98 simver=sdl
99 GCCOPTS='-W -Wall -g -fno-builtin'
100 GCCOPTIMIZE=''
102 output="rockboxui" # use this as default output binary name
103 sdl=`findsdl`
104 sdl_cflags=""
105 sdl_libs=""
107 if [ $1 = "sdl" ]; then
108 if [ -z "$sdl" ]; then
109 echo "configure didn't find sdl-config, which indicates that you"
110 echo "don't have SDL (properly) installed. Please correct and"
111 echo "re-run configure!"
112 exit 1
113 else
114 # generic sdl-config checker
115 sdl_cflags=`$sdl --cflags`
116 sdl_libs=`$sdl --libs`
120 # default share option, override below if needed
121 SHARED_FLAG="-shared"
123 case $uname in
124 CYGWIN*)
125 echo "Cygwin 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 MINGW*)
135 echo "MinGW host detected"
137 # sdl version
138 GCCOPTS="$GCCOPTS $sdl_cflags"
139 LDOPTS="-mconsole $sdl_libs"
141 output="rockboxui.exe" # use this as output binary name
144 Linux)
145 echo "Linux host detected"
146 GCCOPTS="$GCCOPTS $sdl_cflags"
147 LDOPTS="$sdl_libs"
150 FreeBSD)
151 echo "FreeBSD host detected"
152 # sdl version
153 GCCOPTS="$GCCOPTS $sdl_cflags"
154 LDOPTS="$sdl_libs"
157 Darwin)
158 echo "Darwin host detected"
159 # sdl version
160 GCCOPTS="$GCCOPTS $sdl_cflags"
161 LDOPTS="$sdl_libs"
162 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
166 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
167 exit 2
169 esac
171 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
173 if test "X$crosscompile" != "Xyes"; then
174 if [ "`uname -m`" = "x86_64" ] || [ "`uname -m`" = "amd64" ]; then
175 # fPIC is needed to make shared objects link
176 # setting visibility to hidden is necessary to avoid strange crashes
177 # due to symbol clashing
178 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
181 id=$$
182 cat >$tmpdir/conftest-$id.c <<EOF
183 #include <stdio.h>
184 int main(int argc, char **argv)
186 int var=0;
187 char *varp = (char *)&var;
188 *varp=1;
190 printf("%d\n", var);
191 return 0;
195 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
197 if test `$tmpdir/conftest-$id 2>/dev/null` -gt "1"; then
198 # big endian
199 endian="big"
200 else
201 # little endian
202 endian="little"
205 if [ $1 = "sdl" ]; then
206 echo "Simulator environment deemed $endian endian"
207 elif [ $1 = "checkwps" ]; then
208 echo "CheckWPS environment deemed $endian endian"
211 # use wildcard here to make it work even if it was named *.exe like
212 # on cygwin
213 rm -f $tmpdir/conftest-$id*
214 else
215 # We are crosscompiling
216 # add cross-compiler option(s)
217 prefixtools i586-mingw32msvc-
218 LDOPTS="-mconsole $sdl_libs"
219 output="rockboxui.exe" # use this as output binary name
220 endian="little" # windows is little endian
225 # functions for setting up cross-compiler names and options
226 # also set endianess and what the exact recommended gcc version is
227 # the gcc version should most likely match what versions we build with
228 # rockboxdev.sh
230 shcc () {
231 prefixtools sh-elf-
232 GCCOPTS="$CCOPTS -m1"
233 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
234 endian="big"
235 gccchoice="4.0.3"
238 calmrisccc () {
239 prefixtools calmrisc16-unknown-elf-
240 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
241 GCCOPTIMIZE="-fomit-frame-pointer"
242 endian="big"
245 coldfirecc () {
246 prefixtools m68k-elf-
247 GCCOPTS="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
248 GCCOPTIMIZE="-fomit-frame-pointer"
249 endian="big"
250 gccchoice="3.4.6"
253 arm7tdmicc () {
254 findarmgcc
255 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
256 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" != "1"; then
257 GCCOPTS="$GCCOPTS -mlong-calls"
259 GCCOPTIMIZE="-fomit-frame-pointer"
260 endian="little"
263 arm9tdmicc () {
264 findarmgcc
265 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
266 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" != "1"; then
267 GCCOPTS="$GCCOPTS -mlong-calls"
269 GCCOPTIMIZE="-fomit-frame-pointer"
270 endian="little"
273 arm940tbecc () {
274 findarmgcc
275 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
276 if test "ARG_ARM_EABI" != "1"; then
277 GCCOPTS="$GCCOPTS -mlong-calls"
279 GCCOPTIMIZE="-fomit-frame-pointer"
280 endian="big"
283 arm940tcc () {
284 findarmgcc
285 GCCOPTS="$CCOPTS -mcpu=arm940t"
286 if test "ARG_ARM_EABI" != "1"; then
287 GCCOPTS="$GCCOPTS -mlong-calls"
289 GCCOPTIMIZE="-fomit-frame-pointer"
290 endian="little"
293 arm946cc () {
294 findarmgcc
295 GCCOPTS="$CCOPTS -mcpu=arm9e"
296 if test "ARG_ARM_EABI" != "1"; then
297 GCCOPTS="$GCCOPTS -mlong-calls"
299 GCCOPTIMIZE="-fomit-frame-pointer"
300 endian="little"
303 arm926ejscc () {
304 findarmgcc
305 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
306 if test "ARG_ARM_EABI" != "1"; then
307 GCCOPTS="$GCCOPTS -mlong-calls"
309 GCCOPTIMIZE="-fomit-frame-pointer"
310 endian="little"
313 arm1136jfscc () {
314 findarmgcc
315 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
316 if test "$modelname" != "gigabeats" -a "ARG_ARM_EABI" != "1"; then
317 GCCOPTS="$GCCOPTS -mlong-calls"
319 GCCOPTIMIZE="-fomit-frame-pointer"
320 endian="little"
323 arm1176jzscc () {
324 findarmgcc
325 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
326 if test "ARG_ARM_EABI" != "1"; then
327 GCCOPTS="$GCCOPTS -mlong-calls"
329 GCCOPTIMIZE="-fomit-frame-pointer"
330 endian="little"
333 mipselcc () {
334 prefixtools mipsel-elf-
335 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls"
336 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
337 GCCOPTIMIZE="-fomit-frame-pointer"
338 endian="little"
339 gccchoice="4.1.2"
342 whichadvanced () {
343 atype=`echo "$1" | cut -c 2-`
344 ##################################################################
345 # Prompt for specific developer options
347 if [ "$atype" ]; then
348 interact=
349 else
350 interact=1
351 echo ""
352 echo "Enter your developer options (press enter when done)"
353 printf "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile"
354 if [ "$memory" = "2" ]; then
355 printf ", (8)MB MOD"
357 if [ "$modelname" = "archosplayer" ]; then
358 printf ", Use (A)TA poweroff"
360 if [ "$t_model" = "ondio" ]; then
361 printf ", (B)acklight MOD"
363 if [ "$modelname" = "iaudiom5" ]; then
364 printf ", (F)M radio MOD"
366 if [ "$modelname" = "iriverh120" ]; then
367 printf ", (R)TC MOD"
369 echo ""
372 cont=1
373 while [ $cont = "1" ]; do
375 if [ "$interact" ]; then
376 option=`input`
377 else
378 option=`echo "$atype" | cut -c 1`
381 case $option in
382 [Dd])
383 if [ "yes" = "$profile" ]; then
384 echo "Debug is incompatible with profiling"
385 else
386 echo "DEBUG build enabled"
387 use_debug="yes"
390 [Ll])
391 echo "logf() support enabled"
392 logf="yes"
394 [Ss])
395 echo "Simulator build enabled"
396 simulator="yes"
398 [Pp])
399 if [ "yes" = "$use_debug" ]; then
400 echo "Profiling is incompatible with debug"
401 else
402 echo "Profiling support is enabled"
403 profile="yes"
406 [Vv])
407 echo "Voice build selected"
408 voice="yes"
411 if [ "$memory" = "2" ]; then
412 memory="8"
413 echo "Memory size selected: 8MB"
416 [Aa])
417 if [ "$modelname" = "archosplayer" ]; then
418 have_ata_poweroff="#define HAVE_ATA_POWEROFF"
419 echo "ATA poweroff enabled"
422 [Bb])
423 if [ "$t_model" = "ondio" ]; then
424 have_backlight="#define HAVE_BACKLIGHT"
425 echo "Backlight functions enabled"
428 [Ff])
429 if [ "$modelname" = "iaudiom5" ]; then
430 have_fmradio_in="#define HAVE_FMRADIO_IN"
431 echo "FM radio functions enabled"
434 [Rr])
435 if [ "$modelname" = "iriverh120" ]; then
436 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
437 have_rtc_alarm="#define HAVE_RTC_ALARM"
438 echo "RTC functions enabled (DS1339/DS3231)"
441 [Ww])
442 echo "Enabling Windows 32 cross-compiling"
443 crosscompile="yes"
446 if [ "$interact" ]; then
447 cont=0
448 else
449 echo "[ERROR] Option $option unsupported"
452 esac
453 if [ ! "$interact" ]; then
454 atype=`echo "$atype" | cut -c 2-`
455 [ "$atype" ] || cont=0
457 done
458 echo "done"
460 if [ "yes" = "$voice" ]; then
461 # Ask about languages to build
462 picklang
463 voicelanguage=`whichlang`
464 echo "Voice language set to $voicelanguage"
466 # Configure encoder and TTS engine for each language
467 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
468 voiceconfig "$thislang"
469 done
471 if [ "yes" = "$use_debug" ]; then
472 debug="-DDEBUG"
473 GCCOPTS="$GCCOPTS -g -DDEBUG"
475 if [ "yes" = "$logf" ]; then
476 use_logf="#define ROCKBOX_HAS_LOGF 1"
478 if [ "yes" = "$simulator" ]; then
479 debug="-DDEBUG"
480 extradefines="$extradefines -DSIMULATOR"
481 archosrom=""
482 flash=""
484 if [ "yes" = "$profile" ]; then
485 extradefines="$extradefines -DRB_PROFILE"
486 PROFILE_OPTS="-finstrument-functions"
490 # Configure voice settings
491 voiceconfig () {
492 thislang=$1
493 if [ ! "$ARG_TTS" ]; then
494 echo "Building $thislang voice for $modelname. Select options"
495 echo ""
498 if [ -n "`findtool flite`" ]; then
499 FLITE="F(l)ite "
500 FLITE_OPTS=""
501 DEFAULT_TTS="flite"
502 DEFAULT_TTS_OPTS=$FLITE_OPTS
503 DEFAULT_NOISEFLOOR="500"
504 DEFAULT_CHOICE="L"
506 if [ -n "`findtool espeak`" ]; then
507 ESPEAK="(e)Speak "
508 ESPEAK_OPTS=""
509 DEFAULT_TTS="espeak"
510 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
511 DEFAULT_NOISEFLOOR="500"
512 DEFAULT_CHOICE="e"
514 if [ -n "`findtool festival`" ]; then
515 FESTIVAL="(F)estival "
516 case "$thislang" in
517 "italiano")
518 FESTIVAL_OPTS="--language italian"
520 "espanol")
521 FESTIVAL_OPTS="--language spanish"
523 "finnish")
524 FESTIVAL_OPTS="--language finnish"
526 "czech")
527 FESTIVAL_OPTS="--language czech"
530 FESTIVAL_OPTS=""
532 esac
533 DEFAULT_TTS="festival"
534 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
535 DEFAULT_NOISEFLOOR="500"
536 DEFAULT_CHOICE="F"
538 if [ -n "`findtool swift`" ]; then
539 SWIFT="S(w)ift "
540 SWIFT_OPTS=""
541 DEFAULT_TTS="swift"
542 DEFAULT_TTS_OPTS=$SWIFT_OPTS
543 DEFAULT_NOISEFLOOR="500"
544 DEFAULT_CHOICE="w"
546 # Allow SAPI if Windows is in use
547 if [ -n "`findtool winver`" ]; then
548 SAPI="(S)API "
549 SAPI_OPTS=""
550 DEFAULT_TTS="sapi"
551 DEFAULT_TTS_OPTS=$SAPI_OPTS
552 DEFAULT_NOISEFLOOR="500"
553 DEFAULT_CHOICE="S"
556 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
557 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
558 exit 3
561 if [ "$ARG_TTS" ]; then
562 option=$ARG_TTS
563 else
564 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
565 option=`input`
567 advopts="$advopts --tts=$option"
568 case "$option" in
569 [Ll])
570 TTS_ENGINE="flite"
571 NOISEFLOOR="500" # TODO: check this value
572 TTS_OPTS=$FLITE_OPTS
574 [Ee])
575 TTS_ENGINE="espeak"
576 NOISEFLOOR="500"
577 TTS_OPTS=$ESPEAK_OPTS
579 [Ff])
580 TTS_ENGINE="festival"
581 NOISEFLOOR="500"
582 TTS_OPTS=$FESTIVAL_OPTS
584 [Ss])
585 TTS_ENGINE="sapi"
586 NOISEFLOOR="500"
587 TTS_OPTS=$SAPI_OPTS
589 [Ww])
590 TTS_ENGINE="swift"
591 NOISEFLOOR="500"
592 TTS_OPTS=$SWIFT_OPTS
595 TTS_ENGINE=$DEFAULT_TTS
596 TTS_OPTS=$DEFAULT_TTS_OPTS
597 NOISEFLOOR=$DEFAULT_NOISEFLOOR
598 esac
599 echo "Using $TTS_ENGINE for TTS"
601 # Select which voice to use for Festival
602 if [ "$TTS_ENGINE" = "festival" ]; then
603 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
604 for voice in $voicelist; do
605 TTS_FESTIVAL_VOICE="$voice" # Default choice
606 break
607 done
608 if [ "$ARG_VOICE" ]; then
609 CHOICE=$ARG_VOICE
610 else
612 for voice in $voicelist; do
613 printf "%3d. %s\n" "$i" "$voice"
614 i=`expr $i + 1`
615 done
616 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
617 CHOICE=`input`
620 for voice in $voicelist; do
621 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
622 TTS_FESTIVAL_VOICE="$voice"
624 i=`expr $i + 1`
625 done
626 advopts="$advopts --voice=$CHOICE"
627 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
628 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
631 # Read custom tts options from command line
632 if [ "$ARG_TTSOPTS" ]; then
633 TTS_OPTS="$ARG_TTS_OPTS"
634 advopts="$advopts --ttsopts='$TTS_OPTS'"
635 echo "$TTS_ENGINE options set to $TTS_OPTS"
638 if [ "$swcodec" = "yes" ]; then
639 ENCODER="rbspeexenc"
640 ENC_CMD="rbspeexenc"
641 ENC_OPTS="-q 4 -c 10"
642 else
643 if [ -n "`findtool lame`" ]; then
644 ENCODER="lame"
645 ENC_CMD="lame"
646 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
647 else
648 echo "You need LAME in the system path to build voice files for"
649 echo "HWCODEC targets."
650 exit 4
654 echo "Using $ENCODER for encoding voice clips"
656 # Read custom encoder options from command line
657 if [ "$ARG_ENCOPTS" ]; then
658 ENC_OPTS="$ARG_ENCOPTS"
659 advopts="$advopts --encopts='$ENC_OPTS'"
660 echo "$ENCODER options set to $ENC_OPTS"
663 TEMPDIR="${pwd}"
664 if [ -n "`findtool cygpath`" ]; then
665 TEMPDIR=`cygpath . -a -w`
669 picklang() {
670 # figure out which languages that are around
671 for file in $rootdir/apps/lang/*.lang; do
672 clean=`basename $file .lang`
673 langs="$langs $clean"
674 done
676 if [ "$ARG_LANG" ]; then
677 pick=$ARG_LANG
678 else
679 echo "Select a number for the language to use (default is english)"
680 # FIXME The multiple-language feature is currently broken
681 # echo "You may enter a comma-separated list of languages to build"
683 num=1
684 for one in $langs; do
685 echo "$num. $one"
686 num=`expr $num + 1`
687 done
688 pick=`input`
690 advopts="$advopts --language=$pick"
693 whichlang() {
694 output=""
695 # Allow the user to pass a comma-separated list of langauges
696 for thispick in `echo $pick | sed 's/,/ /g'`; do
697 num=1
698 for one in $langs; do
699 # Accept both the language number and name
700 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
701 if [ "$output" = "" ]; then
702 output=$one
703 else
704 output=$output,$one
707 num=`expr $num + 1`
708 done
709 done
710 if [ -z "$output" ]; then
711 # pick a default
712 output="english"
714 echo $output
717 help() {
718 echo "Rockbox configure script."
719 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
720 echo "Do *NOT* run this within the tools directory!"
721 echo ""
722 cat <<EOF
723 Usage: configure [OPTION]...
724 Options:
725 --target=TARGET Sets the target, TARGET can be either the target ID or
726 corresponding string. Run without this option to see all
727 available targets.
729 --ram=RAM Sets the RAM for certain targets. Even though any number
730 is accepted, not every number is correct. The default
731 value will be applied, if you entered a wrong number
732 (which depends on the target). Watch the output. Run
733 without this option if you are not sure which the right
734 number is.
736 --type=TYPE Sets the build type. Shortcuts are also valid.
737 Run without this option to see all available types.
738 Multiple values are allowed and managed in the input
739 order. So --type=b stands for Bootloader build, while
740 --type=ab stands for "Backlight MOD" build.
742 --language=LANG Set the language used for voice generation (used only if
743 TYPE is AV).
745 --tts=ENGINE Set the TTS engine used for voice generation (used only
746 if TYPE is AV).
748 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
749 AV).
751 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
753 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
755 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
756 This is useful for having multiple alternate builds on
757 your device that you can load with ROLO. However as the
758 bootloader looks for .rockbox you won't be able to boot
759 into this build.
761 --ccache Enable ccache use (done by default these days)
762 --no-ccache Disable ccache use
764 --eabi Make configure prefer toolchains that are able to compile
765 for the new ARM standard abi EABI
766 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
767 --help Shows this message (must not be used with other options)
771 exit
774 ARG_CCACHE=
775 ARG_ENCOPTS=
776 ARG_LANG=
777 ARG_RAM=
778 ARG_RBDIR=
779 ARG_TARGET=
780 ARG_TTS=
781 ARG_TTSOPTS=
782 ARG_TYPE=
783 ARG_VOICE=
784 ARG_ARM_EABI=
785 err=
786 for arg in "$@"; do
787 case "$arg" in
788 --ccache) ARG_CCACHE=1;;
789 --no-ccache) ARG_CCACHE=0;;
790 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
791 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
792 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
793 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
794 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
795 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
796 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
797 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
798 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
799 --eabi) ARG_ARM_EABI=1;;
800 --no-eabi) ARG_ARM_EABI=0;;
801 --help) help;;
802 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
803 esac
804 done
805 [ "$err" ] && exit 1
807 advopts=
809 if [ "$TMPDIR" != "" ]; then
810 tmpdir=$TMPDIR
811 else
812 tmpdir=/tmp
814 echo Using temporary directory $tmpdir
816 if test -r "configure"; then
817 # this is a check for a configure script in the current directory, it there
818 # is one, try to figure out if it is this one!
820 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
821 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
822 echo "It will only cause you pain and grief. Instead do this:"
823 echo ""
824 echo " cd .."
825 echo " mkdir build-dir"
826 echo " cd build-dir"
827 echo " ../tools/configure"
828 echo ""
829 echo "Much happiness will arise from this. Enjoy"
830 exit 5
834 # get our current directory
835 pwd=`pwd`;
837 if { echo $pwd | grep " "; } then
838 echo "You're running this script in a path that contains space. The build"
839 echo "system is unfortunately not clever enough to deal with this. Please"
840 echo "run the script from a different path, rename the path or fix the build"
841 echo "system!"
842 exit 6
845 if [ -z "$rootdir" ]; then
846 ##################################################################
847 # Figure out where the source code root is!
849 rootdir=`dirname $0`/../
851 #####################################################################
852 # Convert the possibly relative directory name to an absolute version
854 now=`pwd`
855 cd $rootdir
856 rootdir=`pwd`
858 # cd back to the build dir
859 cd $now
862 apps="apps"
863 appsdir='\$(ROOTDIR)/apps'
864 firmdir='\$(ROOTDIR)/firmware'
865 toolsdir='\$(ROOTDIR)/tools'
868 ##################################################################
869 # Figure out target platform
872 if [ "$ARG_TARGET" ]; then
873 buildfor=$ARG_TARGET
874 else
875 echo "Enter target platform:"
876 cat <<EOF
877 ==Archos== ==iriver== ==Apple iPod==
878 0) Player/Studio 10) H120/H140 20) Color/Photo
879 1) Recorder 11) H320/H340 21) Nano 1G
880 2) FM Recorder 12) iHP-100/110/115 22) Video
881 3) Recorder v2 13) iFP-790 23) 3G
882 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
883 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
884 6) AV300 26) Mini 2G
885 ==Toshiba== 27) 1G, 2G
886 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
887 30) X5/X5V/X5L 41) Gigabeat S
888 31) M5/M5L ==SanDisk==
889 32) 7 ==Olympus= 50) Sansa e200
890 33) D2 70) M:Robe 500 51) Sansa e200R
891 34) M3/M3L 71) M:Robe 100 52) Sansa c200
892 53) Sansa m200
893 ==Creative== ==Philips== 54) Sansa c100
894 90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip
895 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2
896 92) Zen Vision HDD1830 57) Sansa m200v4
897 58) Sansa Fuze
898 ==Onda== ==Meizu== 59) Sansa c200v2
899 120) VX747 110) M6SL 60) Sansa Clipv2
900 121) VX767 111) M6SP 61) Sansa View
901 122) VX747+ 112) M3
902 123) VX777 ==Logik==
903 80) DAX 1GB MP3/DAB
904 ==Samsung== ==Tatung==
905 140) YH-820 150) Elio TPJ-1022 ==Lyre project==
906 141) YH-920 130) Lyre proto 1
907 142) YH-925 131) Mini2440
908 143) YP-S3
911 buildfor=`input`;
914 # Set of tools built for all target platforms:
915 toolset="rdf2binary convbdf codepages"
917 # Toolsets for some target families:
918 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
919 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
920 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
921 ipodbitmaptools="$toolset scramble bmp2rb"
922 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
923 tccbitmaptools="$toolset scramble bmp2rb"
924 # generic is used by IFP, Meizu and Onda
925 genericbitmaptools="$toolset bmp2rb"
926 # scramble is used by all other targets
927 scramblebitmaptools="$genericbitmaptools scramble"
930 # ---- For each target ----
932 # *Variables*
933 # target_id: a unique number identifying this target, IS NOT the menu number.
934 # Just use the currently highest number+1 when you add a new
935 # target.
936 # modelname: short model name used all over to identify this target
937 # memory: number of megabytes of RAM this target has. If the amount can
938 # be selected by the size prompt, let memory be unset here
939 # target: -Ddefine passed to the build commands to make the correct
940 # config-*.h file get included etc
941 # tool: the tool that takes a plain binary and converts that into a
942 # working "firmware" file for your target
943 # output: the final output file name
944 # boottool: the tool that takes a plain binary and generates a bootloader
945 # file for your target (or blank to use $tool)
946 # bootoutput:the final output file name for the bootloader (or blank to use
947 # $output)
948 # appextra: passed to the APPEXTRA variable in the Makefiles.
949 # TODO: add proper explanation
950 # archosrom: used only for Archos targets that build a special flashable .ucl
951 # image.
952 # flash: name of output for flashing, for targets where there's a special
953 # file output for this.
954 # plugins: set to 'yes' to build the plugins. Early development builds can
955 # set this to no in the early stages to have an easier life for a
956 # while
957 # swcodec: set 'yes' on swcodec targets
958 # toolset: lists what particular tools in the tools/ directory that this
959 # target needs to have built prior to building Rockbox
961 # *Functions*
962 # *cc: sets up gcc and compiler options for your target builds. Note
963 # that if you select a simulator build, the compiler selection is
964 # overridden later in the script.
966 case $buildfor in
968 0|archosplayer)
969 target_id=1
970 modelname="archosplayer"
971 target="-DARCHOS_PLAYER"
972 shcc
973 tool="$rootdir/tools/scramble"
974 output="archos.mod"
975 appextra="player:gui"
976 archosrom="$pwd/rombox.ucl"
977 flash="$pwd/rockbox.ucl"
978 plugins="yes"
979 swcodec=""
981 # toolset is the tools within the tools directory that we build for
982 # this particular target.
983 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
985 # Note: the convbdf is present in the toolset just because: 1) the
986 # firmware/Makefile assumes it is present always, and 2) we will need it when we
987 # build the player simulator
989 t_cpu="sh"
990 t_manufacturer="archos"
991 t_model="player"
994 1|archosrecorder)
995 target_id=2
996 modelname="archosrecorder"
997 target="-DARCHOS_RECORDER"
998 shcc
999 tool="$rootdir/tools/scramble"
1000 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1001 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1002 output="ajbrec.ajz"
1003 appextra="recorder:gui"
1004 #archosrom="$pwd/rombox.ucl"
1005 flash="$pwd/rockbox.ucl"
1006 plugins="yes"
1007 swcodec=""
1008 # toolset is the tools within the tools directory that we build for
1009 # this particular target.
1010 toolset=$archosbitmaptools
1011 t_cpu="sh"
1012 t_manufacturer="archos"
1013 t_model="recorder"
1016 2|archosfmrecorder)
1017 target_id=3
1018 modelname="archosfmrecorder"
1019 target="-DARCHOS_FMRECORDER"
1020 shcc
1021 tool="$rootdir/tools/scramble -fm"
1022 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1023 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1024 output="ajbrec.ajz"
1025 appextra="recorder:gui"
1026 #archosrom="$pwd/rombox.ucl"
1027 flash="$pwd/rockbox.ucl"
1028 plugins="yes"
1029 swcodec=""
1030 # toolset is the tools within the tools directory that we build for
1031 # this particular target.
1032 toolset=$archosbitmaptools
1033 t_cpu="sh"
1034 t_manufacturer="archos"
1035 t_model="fm_v2"
1038 3|archosrecorderv2)
1039 target_id=4
1040 modelname="archosrecorderv2"
1041 target="-DARCHOS_RECORDERV2"
1042 shcc
1043 tool="$rootdir/tools/scramble -v2"
1044 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1045 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1046 output="ajbrec.ajz"
1047 appextra="recorder:gui"
1048 #archosrom="$pwd/rombox.ucl"
1049 flash="$pwd/rockbox.ucl"
1050 plugins="yes"
1051 swcodec=""
1052 # toolset is the tools within the tools directory that we build for
1053 # this particular target.
1054 toolset=$archosbitmaptools
1055 t_cpu="sh"
1056 t_manufacturer="archos"
1057 t_model="fm_v2"
1060 4|archosondiosp)
1061 target_id=7
1062 modelname="archosondiosp"
1063 target="-DARCHOS_ONDIOSP"
1064 shcc
1065 tool="$rootdir/tools/scramble -osp"
1066 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1067 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1068 output="ajbrec.ajz"
1069 appextra="recorder:gui"
1070 archosrom="$pwd/rombox.ucl"
1071 flash="$pwd/rockbox.ucl"
1072 plugins="yes"
1073 swcodec=""
1074 # toolset is the tools within the tools directory that we build for
1075 # this particular target.
1076 toolset=$archosbitmaptools
1077 t_cpu="sh"
1078 t_manufacturer="archos"
1079 t_model="ondio"
1082 5|archosondiofm)
1083 target_id=8
1084 modelname="archosondiofm"
1085 target="-DARCHOS_ONDIOFM"
1086 shcc
1087 tool="$rootdir/tools/scramble -ofm"
1088 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1089 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1090 output="ajbrec.ajz"
1091 appextra="recorder:gui"
1092 #archosrom="$pwd/rombox.ucl"
1093 flash="$pwd/rockbox.ucl"
1094 plugins="yes"
1095 swcodec=""
1096 toolset=$archosbitmaptools
1097 t_cpu="sh"
1098 t_manufacturer="archos"
1099 t_model="ondio"
1102 6|archosav300)
1103 target_id=38
1104 modelname="archosav300"
1105 target="-DARCHOS_AV300"
1106 memory=16 # always
1107 arm7tdmicc
1108 tool="$rootdir/tools/scramble -mm=C"
1109 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1110 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1111 output="cjbm.ajz"
1112 appextra="recorder:gui"
1113 plugins="yes"
1114 swcodec=""
1115 # toolset is the tools within the tools directory that we build for
1116 # this particular target.
1117 toolset="$toolset scramble descramble bmp2rb"
1118 # architecture, manufacturer and model for the target-tree build
1119 t_cpu="arm"
1120 t_manufacturer="archos"
1121 t_model="av300"
1124 10|iriverh120)
1125 target_id=9
1126 modelname="iriverh120"
1127 target="-DIRIVER_H120"
1128 memory=32 # always
1129 coldfirecc
1130 tool="$rootdir/tools/scramble -add=h120"
1131 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1132 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1133 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1134 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1135 output="rockbox.iriver"
1136 bootoutput="bootloader.iriver"
1137 appextra="recorder:gui"
1138 flash="$pwd/rombox.iriver"
1139 plugins="yes"
1140 swcodec="yes"
1141 # toolset is the tools within the tools directory that we build for
1142 # this particular target.
1143 toolset=$iriverbitmaptools
1144 t_cpu="coldfire"
1145 t_manufacturer="iriver"
1146 t_model="h100"
1149 11|iriverh300)
1150 target_id=10
1151 modelname="iriverh300"
1152 target="-DIRIVER_H300"
1153 memory=32 # always
1154 coldfirecc
1155 tool="$rootdir/tools/scramble -add=h300"
1156 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1157 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1158 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1159 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1160 output="rockbox.iriver"
1161 appextra="recorder:gui"
1162 plugins="yes"
1163 swcodec="yes"
1164 # toolset is the tools within the tools directory that we build for
1165 # this particular target.
1166 toolset=$iriverbitmaptools
1167 t_cpu="coldfire"
1168 t_manufacturer="iriver"
1169 t_model="h300"
1172 12|iriverh100)
1173 target_id=11
1174 modelname="iriverh100"
1175 target="-DIRIVER_H100"
1176 memory=16 # always
1177 coldfirecc
1178 tool="$rootdir/tools/scramble -add=h100"
1179 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1180 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1181 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1182 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1183 output="rockbox.iriver"
1184 bootoutput="bootloader.iriver"
1185 appextra="recorder:gui"
1186 flash="$pwd/rombox.iriver"
1187 plugins="yes"
1188 swcodec="yes"
1189 # toolset is the tools within the tools directory that we build for
1190 # this particular target.
1191 toolset=$iriverbitmaptools
1192 t_cpu="coldfire"
1193 t_manufacturer="iriver"
1194 t_model="h100"
1197 13|iriverifp7xx)
1198 target_id=19
1199 modelname="iriverifp7xx"
1200 target="-DIRIVER_IFP7XX"
1201 memory=1
1202 arm7tdmicc short
1203 tool="cp"
1204 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1205 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1206 output="rockbox.wma"
1207 appextra="recorder:gui"
1208 plugins="yes"
1209 swcodec="yes"
1210 # toolset is the tools within the tools directory that we build for
1211 # this particular target.
1212 toolset=$genericbitmaptools
1213 t_cpu="arm"
1214 t_manufacturer="pnx0101"
1215 t_model="iriver-ifp7xx"
1218 14|iriverh10)
1219 target_id=22
1220 modelname="iriverh10"
1221 target="-DIRIVER_H10"
1222 memory=32 # always
1223 arm7tdmicc
1224 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1225 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1226 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1227 output="rockbox.mi4"
1228 appextra="recorder:gui"
1229 plugins="yes"
1230 swcodec="yes"
1231 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1232 bootoutput="H10_20GC.mi4"
1233 # toolset is the tools within the tools directory that we build for
1234 # this particular target.
1235 toolset=$scramblebitmaptools
1236 # architecture, manufacturer and model for the target-tree build
1237 t_cpu="arm"
1238 t_manufacturer="iriver"
1239 t_model="h10"
1242 15|iriverh10_5gb)
1243 target_id=24
1244 modelname="iriverh10_5gb"
1245 target="-DIRIVER_H10_5GB"
1246 memory=32 # always
1247 arm7tdmicc
1248 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1249 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1250 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1251 output="rockbox.mi4"
1252 appextra="recorder:gui"
1253 plugins="yes"
1254 swcodec="yes"
1255 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1256 bootoutput="H10.mi4"
1257 # toolset is the tools within the tools directory that we build for
1258 # this particular target.
1259 toolset=$scramblebitmaptools
1260 # architecture, manufacturer and model for the target-tree build
1261 t_cpu="arm"
1262 t_manufacturer="iriver"
1263 t_model="h10"
1266 20|ipodcolor)
1267 target_id=13
1268 modelname="ipodcolor"
1269 target="-DIPOD_COLOR"
1270 memory=32 # always
1271 arm7tdmicc
1272 tool="$rootdir/tools/scramble -add=ipco"
1273 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1274 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1275 output="rockbox.ipod"
1276 appextra="recorder:gui"
1277 plugins="yes"
1278 swcodec="yes"
1279 bootoutput="bootloader-$modelname.ipod"
1280 # toolset is the tools within the tools directory that we build for
1281 # this particular target.
1282 toolset=$ipodbitmaptools
1283 # architecture, manufacturer and model for the target-tree build
1284 t_cpu="arm"
1285 t_manufacturer="ipod"
1286 t_model="color"
1289 21|ipodnano1g)
1290 target_id=14
1291 modelname="ipodnano1g"
1292 target="-DIPOD_NANO"
1293 memory=32 # always
1294 arm7tdmicc
1295 tool="$rootdir/tools/scramble -add=nano"
1296 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1297 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1298 output="rockbox.ipod"
1299 appextra="recorder:gui"
1300 plugins="yes"
1301 swcodec="yes"
1302 bootoutput="bootloader-$modelname.ipod"
1303 # toolset is the tools within the tools directory that we build for
1304 # this particular target.
1305 toolset=$ipodbitmaptools
1306 # architecture, manufacturer and model for the target-tree build
1307 t_cpu="arm"
1308 t_manufacturer="ipod"
1309 t_model="nano"
1312 22|ipodvideo)
1313 target_id=15
1314 modelname="ipodvideo"
1315 target="-DIPOD_VIDEO"
1316 arm7tdmicc
1317 tool="$rootdir/tools/scramble -add=ipvd"
1318 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1319 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1320 output="rockbox.ipod"
1321 appextra="recorder:gui"
1322 plugins="yes"
1323 swcodec="yes"
1324 bootoutput="bootloader-$modelname.ipod"
1325 # toolset is the tools within the tools directory that we build for
1326 # this particular target.
1327 toolset=$ipodbitmaptools
1328 # architecture, manufacturer and model for the target-tree build
1329 t_cpu="arm"
1330 t_manufacturer="ipod"
1331 t_model="video"
1334 23|ipod3g)
1335 target_id=16
1336 modelname="ipod3g"
1337 target="-DIPOD_3G"
1338 memory=32 # always
1339 arm7tdmicc
1340 tool="$rootdir/tools/scramble -add=ip3g"
1341 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1342 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1343 output="rockbox.ipod"
1344 appextra="recorder:gui"
1345 plugins="yes"
1346 swcodec="yes"
1347 bootoutput="bootloader-$modelname.ipod"
1348 # toolset is the tools within the tools directory that we build for
1349 # this particular target.
1350 toolset=$ipodbitmaptools
1351 # architecture, manufacturer and model for the target-tree build
1352 t_cpu="arm"
1353 t_manufacturer="ipod"
1354 t_model="3g"
1357 24|ipod4g)
1358 target_id=17
1359 modelname="ipod4g"
1360 target="-DIPOD_4G"
1361 memory=32 # always
1362 arm7tdmicc
1363 tool="$rootdir/tools/scramble -add=ip4g"
1364 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1365 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1366 output="rockbox.ipod"
1367 appextra="recorder:gui"
1368 plugins="yes"
1369 swcodec="yes"
1370 bootoutput="bootloader-$modelname.ipod"
1371 # toolset is the tools within the tools directory that we build for
1372 # this particular target.
1373 toolset=$ipodbitmaptools
1374 # architecture, manufacturer and model for the target-tree build
1375 t_cpu="arm"
1376 t_manufacturer="ipod"
1377 t_model="4g"
1380 25|ipodmini1g)
1381 target_id=18
1382 modelname="ipodmini1g"
1383 target="-DIPOD_MINI"
1384 memory=32 # always
1385 arm7tdmicc
1386 tool="$rootdir/tools/scramble -add=mini"
1387 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1388 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1389 output="rockbox.ipod"
1390 appextra="recorder:gui"
1391 plugins="yes"
1392 swcodec="yes"
1393 bootoutput="bootloader-$modelname.ipod"
1394 # toolset is the tools within the tools directory that we build for
1395 # this particular target.
1396 toolset=$ipodbitmaptools
1397 # architecture, manufacturer and model for the target-tree build
1398 t_cpu="arm"
1399 t_manufacturer="ipod"
1400 t_model="mini"
1403 26|ipodmini2g)
1404 target_id=21
1405 modelname="ipodmini2g"
1406 target="-DIPOD_MINI2G"
1407 memory=32 # always
1408 arm7tdmicc
1409 tool="$rootdir/tools/scramble -add=mn2g"
1410 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1411 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1412 output="rockbox.ipod"
1413 appextra="recorder:gui"
1414 plugins="yes"
1415 swcodec="yes"
1416 bootoutput="bootloader-$modelname.ipod"
1417 # toolset is the tools within the tools directory that we build for
1418 # this particular target.
1419 toolset=$ipodbitmaptools
1420 # architecture, manufacturer and model for the target-tree build
1421 t_cpu="arm"
1422 t_manufacturer="ipod"
1423 t_model="mini2g"
1426 27|ipod1g2g)
1427 target_id=29
1428 modelname="ipod1g2g"
1429 target="-DIPOD_1G2G"
1430 memory=32 # always
1431 arm7tdmicc
1432 tool="$rootdir/tools/scramble -add=1g2g"
1433 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1434 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1435 output="rockbox.ipod"
1436 appextra="recorder:gui"
1437 plugins="yes"
1438 swcodec="yes"
1439 bootoutput="bootloader-$modelname.ipod"
1440 # toolset is the tools within the tools directory that we build for
1441 # this particular target.
1442 toolset=$ipodbitmaptools
1443 # architecture, manufacturer and model for the target-tree build
1444 t_cpu="arm"
1445 t_manufacturer="ipod"
1446 t_model="1g2g"
1449 28|ipodnano2g)
1450 target_id=62
1451 modelname="ipodnano2g"
1452 target="-DIPOD_NANO2G"
1453 memory=32 # always
1454 arm940tcc
1455 tool="$rootdir/tools/scramble -add=nn2g"
1456 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1457 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1458 output="rockbox.ipod"
1459 appextra="recorder:gui"
1460 plugins="yes"
1461 swcodec="yes"
1462 bootoutput="bootloader-$modelname.ipod"
1463 # toolset is the tools within the tools directory that we build for
1464 # this particular target.
1465 toolset=$ipodbitmaptools
1466 # architecture, manufacturer and model for the target-tree build
1467 t_cpu="arm"
1468 t_manufacturer="s5l8700"
1469 t_model="ipodnano2g"
1472 30|iaudiox5)
1473 target_id=12
1474 modelname="iaudiox5"
1475 target="-DIAUDIO_X5"
1476 memory=16 # always
1477 coldfirecc
1478 tool="$rootdir/tools/scramble -add=iax5"
1479 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1480 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1481 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1482 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1483 output="rockbox.iaudio"
1484 appextra="recorder:gui"
1485 plugins="yes"
1486 swcodec="yes"
1487 # toolset is the tools within the tools directory that we build for
1488 # this particular target.
1489 toolset="$iaudiobitmaptools"
1490 # architecture, manufacturer and model for the target-tree build
1491 t_cpu="coldfire"
1492 t_manufacturer="iaudio"
1493 t_model="x5"
1496 31|iaudiom5)
1497 target_id=28
1498 modelname="iaudiom5"
1499 target="-DIAUDIO_M5"
1500 memory=16 # always
1501 coldfirecc
1502 tool="$rootdir/tools/scramble -add=iam5"
1503 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1504 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1505 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1506 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1507 output="rockbox.iaudio"
1508 appextra="recorder:gui"
1509 plugins="yes"
1510 swcodec="yes"
1511 # toolset is the tools within the tools directory that we build for
1512 # this particular target.
1513 toolset="$iaudiobitmaptools"
1514 # architecture, manufacturer and model for the target-tree build
1515 t_cpu="coldfire"
1516 t_manufacturer="iaudio"
1517 t_model="m5"
1520 32|iaudio7)
1521 target_id=32
1522 modelname="iaudio7"
1523 target="-DIAUDIO_7"
1524 memory=16 # always
1525 arm946cc
1526 tool="$rootdir/tools/scramble -add=i7"
1527 boottool="$rootdir/tools/scramble -tcc=crc"
1528 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1529 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1530 output="rockbox.iaudio"
1531 appextra="recorder:gui"
1532 plugins="yes"
1533 swcodec="yes"
1534 bootoutput="I7_FW.BIN"
1535 # toolset is the tools within the tools directory that we build for
1536 # this particular target.
1537 toolset="$tccbitmaptools"
1538 # architecture, manufacturer and model for the target-tree build
1539 t_cpu="arm"
1540 t_manufacturer="tcc77x"
1541 t_model="iaudio7"
1544 33|cowond2)
1545 target_id=34
1546 modelname="cowond2"
1547 target="-DCOWON_D2"
1548 memory=32
1549 arm926ejscc
1550 tool="$rootdir/tools/scramble -add=d2"
1551 boottool="cp "
1552 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1553 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1554 output="rockbox.d2"
1555 bootoutput="bootloader-cowond2.bin"
1556 appextra="recorder:gui"
1557 plugins="yes"
1558 swcodec="yes"
1559 toolset="$tccbitmaptools"
1560 # architecture, manufacturer and model for the target-tree build
1561 t_cpu="arm"
1562 t_manufacturer="tcc780x"
1563 t_model="cowond2"
1566 34|iaudiom3)
1567 target_id=37
1568 modelname="iaudiom3"
1569 target="-DIAUDIO_M3"
1570 memory=16 # always
1571 coldfirecc
1572 tool="$rootdir/tools/scramble -add=iam3"
1573 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1574 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1575 output="rockbox.iaudio"
1576 appextra="recorder:gui"
1577 plugins="yes"
1578 swcodec="yes"
1579 # toolset is the tools within the tools directory that we build for
1580 # this particular target.
1581 toolset="$iaudiobitmaptools"
1582 # architecture, manufacturer and model for the target-tree build
1583 t_cpu="coldfire"
1584 t_manufacturer="iaudio"
1585 t_model="m3"
1588 40|gigabeatfx)
1589 target_id=20
1590 modelname="gigabeatfx"
1591 target="-DGIGABEAT_F"
1592 memory=32 # always
1593 arm9tdmicc
1594 tool="$rootdir/tools/scramble -add=giga"
1595 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1596 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1597 output="rockbox.gigabeat"
1598 appextra="recorder:gui"
1599 plugins="yes"
1600 swcodec="yes"
1601 toolset=$gigabeatbitmaptools
1602 boottool="$rootdir/tools/scramble -gigabeat"
1603 bootoutput="FWIMG01.DAT"
1604 # architecture, manufacturer and model for the target-tree build
1605 t_cpu="arm"
1606 t_manufacturer="s3c2440"
1607 t_model="gigabeat-fx"
1610 41|gigabeats)
1611 target_id=26
1612 modelname="gigabeats"
1613 target="-DGIGABEAT_S"
1614 memory=64
1615 arm1136jfscc
1616 tool="$rootdir/tools/scramble -add=gigs"
1617 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1618 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1619 output="rockbox.gigabeat"
1620 appextra="recorder:gui"
1621 plugins="yes"
1622 swcodec="yes"
1623 toolset="$gigabeatbitmaptools"
1624 boottool="$rootdir/tools/scramble -gigabeats"
1625 bootoutput="nk.bin"
1626 # architecture, manufacturer and model for the target-tree build
1627 t_cpu="arm"
1628 t_manufacturer="imx31"
1629 t_model="gigabeat-s"
1632 70|mrobe500)
1633 target_id=36
1634 modelname="mrobe500"
1635 target="-DMROBE_500"
1636 memory=64 # always
1637 arm926ejscc
1638 tool="$rootdir/tools/scramble -add=m500"
1639 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1640 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1641 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1642 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1643 output="rockbox.mrobe500"
1644 appextra="recorder:gui"
1645 plugins="yes"
1646 swcodec="yes"
1647 toolset=$gigabeatbitmaptools
1648 boottool="cp "
1649 bootoutput="rockbox.mrboot"
1650 # architecture, manufacturer and model for the target-tree build
1651 t_cpu="arm"
1652 t_manufacturer="tms320dm320"
1653 t_model="mrobe-500"
1656 71|mrobe100)
1657 target_id=33
1658 modelname="mrobe100"
1659 target="-DMROBE_100"
1660 memory=32 # always
1661 arm7tdmicc
1662 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1663 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1664 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1665 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1666 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1667 output="rockbox.mi4"
1668 appextra="recorder:gui"
1669 plugins="yes"
1670 swcodec="yes"
1671 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1672 bootoutput="pp5020.mi4"
1673 # toolset is the tools within the tools directory that we build for
1674 # this particular target.
1675 toolset=$scramblebitmaptools
1676 # architecture, manufacturer and model for the target-tree build
1677 t_cpu="arm"
1678 t_manufacturer="olympus"
1679 t_model="mrobe-100"
1682 80|logikdax)
1683 target_id=31
1684 modelname="logikdax"
1685 target="-DLOGIK_DAX"
1686 memory=2 # always
1687 arm946cc
1688 tool="$rootdir/tools/scramble -add=ldax"
1689 boottool="$rootdir/tools/scramble -tcc=crc"
1690 bootoutput="player.rom"
1691 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1692 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1693 output="rockbox.logik"
1694 appextra="recorder:gui"
1695 plugins=""
1696 swcodec="yes"
1697 # toolset is the tools within the tools directory that we build for
1698 # this particular target.
1699 toolset=$tccbitmaptools
1700 # architecture, manufacturer and model for the target-tree build
1701 t_cpu="arm"
1702 t_manufacturer="tcc77x"
1703 t_model="logikdax"
1706 90|zenvisionm30gb)
1707 target_id=35
1708 modelname="zenvisionm30gb"
1709 target="-DCREATIVE_ZVM"
1710 memory=64
1711 arm926ejscc
1712 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1713 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1714 tool="$rootdir/tools/scramble -creative=zvm"
1715 USE_ELF="yes"
1716 output="rockbox.zvm"
1717 appextra="recorder:gui"
1718 plugins="yes"
1719 swcodec="yes"
1720 toolset=$ipodbitmaptools
1721 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1722 bootoutput="rockbox.zvmboot"
1723 # architecture, manufacturer and model for the target-tree build
1724 t_cpu="arm"
1725 t_manufacturer="tms320dm320"
1726 t_model="creative-zvm"
1729 91|zenvisionm60gb)
1730 target_id=40
1731 modelname="zenvisionm60gb"
1732 target="-DCREATIVE_ZVM60GB"
1733 memory=64
1734 arm926ejscc
1735 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1736 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1737 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1738 USE_ELF="yes"
1739 output="rockbox.zvm60"
1740 appextra="recorder:gui"
1741 plugins="yes"
1742 swcodec="yes"
1743 toolset=$ipodbitmaptools
1744 boottool="$rootdir/tools/scramble -creative=zvm60"
1745 bootoutput="rockbox.zvm60boot"
1746 # architecture, manufacturer and model for the target-tree build
1747 t_cpu="arm"
1748 t_manufacturer="tms320dm320"
1749 t_model="creative-zvm"
1752 92|zenvision)
1753 target_id=39
1754 modelname="zenvision"
1755 target="-DCREATIVE_ZV"
1756 memory=64
1757 arm926ejscc
1758 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1759 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1760 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1761 USE_ELF="yes"
1762 output="rockbox.zv"
1763 appextra="recorder:gui"
1764 plugins=""
1765 swcodec="yes"
1766 toolset=$ipodbitmaptools
1767 boottool="$rootdir/tools/scramble -creative=zenvision"
1768 bootoutput="rockbox.zvboot"
1769 # architecture, manufacturer and model for the target-tree build
1770 t_cpu="arm"
1771 t_manufacturer="tms320dm320"
1772 t_model="creative-zvm"
1775 50|sansae200)
1776 target_id=23
1777 modelname="sansae200"
1778 target="-DSANSA_E200"
1779 memory=32 # supposedly
1780 arm7tdmicc
1781 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1782 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1783 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1784 output="rockbox.mi4"
1785 appextra="recorder:gui"
1786 plugins="yes"
1787 swcodec="yes"
1788 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1789 bootoutput="PP5022.mi4"
1790 # toolset is the tools within the tools directory that we build for
1791 # this particular target.
1792 toolset=$scramblebitmaptools
1793 # architecture, manufacturer and model for the target-tree build
1794 t_cpu="arm"
1795 t_manufacturer="sandisk"
1796 t_model="sansa-e200"
1799 51|sansae200r)
1800 # the e200R model is pretty much identical to the e200, it only has a
1801 # different option to the scramble tool when building a bootloader and
1802 # makes the bootloader output file name in all lower case.
1803 target_id=27
1804 modelname="sansae200r"
1805 target="-DSANSA_E200"
1806 memory=32 # supposedly
1807 arm7tdmicc
1808 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1809 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1810 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1811 output="rockbox.mi4"
1812 appextra="recorder:gui"
1813 plugins="yes"
1814 swcodec="yes"
1815 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1816 bootoutput="pp5022.mi4"
1817 # toolset is the tools within the tools directory that we build for
1818 # this particular target.
1819 toolset=$scramblebitmaptools
1820 # architecture, manufacturer and model for the target-tree build
1821 t_cpu="arm"
1822 t_manufacturer="sandisk"
1823 t_model="sansa-e200"
1826 52|sansac200)
1827 target_id=30
1828 modelname="sansac200"
1829 target="-DSANSA_C200"
1830 memory=32 # supposedly
1831 arm7tdmicc
1832 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1833 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1834 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1835 output="rockbox.mi4"
1836 appextra="recorder:gui"
1837 plugins="yes"
1838 swcodec="yes"
1839 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1840 bootoutput="firmware.mi4"
1841 # toolset is the tools within the tools directory that we build for
1842 # this particular target.
1843 toolset=$scramblebitmaptools
1844 # architecture, manufacturer and model for the target-tree build
1845 t_cpu="arm"
1846 t_manufacturer="sandisk"
1847 t_model="sansa-c200"
1850 53|sansam200)
1851 target_id=48
1852 modelname="sansam200"
1853 target="-DSANSA_M200"
1854 memory=1 # always
1855 arm946cc
1856 tool="$rootdir/tools/scramble -add=m200"
1857 boottool="$rootdir/tools/scramble -tcc=crc"
1858 bootoutput="player.rom"
1859 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1860 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1861 output="rockbox.m200"
1862 appextra="recorder:gui"
1863 plugins=""
1864 swcodec="yes"
1865 # toolset is the tools within the tools directory that we build for
1866 # this particular target.
1867 toolset=$tccbitmaptools
1868 # architecture, manufacturer and model for the target-tree build
1869 t_cpu="arm"
1870 t_manufacturer="tcc77x"
1871 t_model="m200"
1874 54|sansac100)
1875 target_id=42
1876 modelname="sansac100"
1877 target="-DSANSA_C100"
1878 memory=2
1879 arm946cc
1880 tool="$rootdir/tools/scramble -add=c100"
1881 boottool="$rootdir/tools/scramble -tcc=crc"
1882 bootoutput="player.rom"
1883 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1884 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1885 output="rockbox.c100"
1886 appextra="recorder:gui"
1887 plugins=""
1888 swcodec="yes"
1889 # toolset is the tools within the tools directory that we build for
1890 # this particular target.
1891 toolset=$tccbitmaptools
1892 # architecture, manufacturer and model for the target-tree build
1893 t_cpu="arm"
1894 t_manufacturer="tcc77x"
1895 t_model="c100"
1898 55|sansaclip)
1899 target_id=50
1900 modelname="sansaclip"
1901 target="-DSANSA_CLIP"
1902 memory=2
1903 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1904 bmp2rb_native="$bmp2rb_mono"
1905 tool="$rootdir/tools/scramble -add=clip"
1906 output="rockbox.sansa"
1907 bootoutput="bootloader-clip.sansa"
1908 appextra="recorder:gui"
1909 plugins="yes"
1910 swcodec="yes"
1911 toolset=$scramblebitmaptools
1912 t_cpu="arm"
1913 t_manufacturer="as3525"
1914 t_model="sansa-clip"
1915 arm9tdmicc
1919 56|sansae200v2)
1920 target_id=51
1921 modelname="sansae200v2"
1922 target="-DSANSA_E200V2"
1923 memory=8
1924 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1925 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1926 tool="$rootdir/tools/scramble -add=e2v2"
1927 output="rockbox.sansa"
1928 bootoutput="bootloader-e200v2.sansa"
1929 appextra="recorder:gui"
1930 plugins="yes"
1931 swcodec="yes"
1932 toolset=$scramblebitmaptools
1933 t_cpu="arm"
1934 t_manufacturer="as3525"
1935 t_model="sansa-e200v2"
1936 arm9tdmicc
1940 57|sansam200v4)
1941 target_id=52
1942 modelname="sansam200v4"
1943 target="-DSANSA_M200V4"
1944 memory=2
1945 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1946 bmp2rb_native="$bmp2rb_mono"
1947 tool="$rootdir/tools/scramble -add=m2v4"
1948 output="rockbox.sansa"
1949 bootoutput="bootloader-m200v4.sansa"
1950 appextra="recorder:gui"
1951 plugins="yes"
1952 swcodec="yes"
1953 toolset=$scramblebitmaptools
1954 t_cpu="arm"
1955 t_manufacturer="as3525"
1956 t_model="sansa-m200v4"
1957 arm9tdmicc
1961 58|sansafuze)
1962 target_id=53
1963 modelname="sansafuze"
1964 target="-DSANSA_FUZE"
1965 memory=8
1966 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1967 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1968 tool="$rootdir/tools/scramble -add=fuze"
1969 output="rockbox.sansa"
1970 bootoutput="bootloader-fuze.sansa"
1971 appextra="recorder:gui"
1972 plugins="yes"
1973 swcodec="yes"
1974 toolset=$scramblebitmaptools
1975 t_cpu="arm"
1976 t_manufacturer="as3525"
1977 t_model="sansa-fuze"
1978 arm9tdmicc
1982 59|sansac200v2)
1983 target_id=55
1984 modelname="sansac200v2"
1985 target="-DSANSA_C200V2"
1986 memory=2 # as per OF diagnosis mode
1987 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1988 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1989 tool="$rootdir/tools/scramble -add=c2v2"
1990 output="rockbox.sansa"
1991 bootoutput="bootloader-c200v2.sansa"
1992 appextra="recorder:gui"
1993 plugins="yes"
1994 swcodec="yes"
1995 # toolset is the tools within the tools directory that we build for
1996 # this particular target.
1997 toolset=$scramblebitmaptools
1998 # architecture, manufacturer and model for the target-tree build
1999 t_cpu="arm"
2000 t_manufacturer="as3525"
2001 t_model="sansa-c200v2"
2002 arm9tdmicc
2005 60|sansaclipv2)
2006 echo "Sansa Clipv2 is not yet supported !"
2007 exit 1
2008 target_id=60
2009 modelname="sansaclipv2"
2010 target="-DSANSA_CLIPV2"
2011 memory=8
2012 arm926ejscc
2013 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2014 bmp2rb_native="$bmp2rb_mono"
2015 tool="$rootdir/tools/scramble -add=clv2"
2016 output="rockbox.sansa"
2017 bootoutput="bootloader-clipv2.sansa"
2018 appextra="recorder:gui"
2019 plugins="yes"
2020 swcodec="yes"
2021 toolset=$scramblebitmaptools
2022 t_cpu="arm"
2023 t_manufacturer="as3525"
2024 t_model="sansa-clipv2"
2027 61|sansaview)
2028 echo "Sansa View is not yet supported!"
2029 exit 1
2030 target_id=63
2031 modelname="sansaview"
2032 target="-DSANSA_VIEW"
2033 memory=32
2034 arm1176jzscc
2035 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2036 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2037 output="rockbox.mi4"
2038 appextra="gui"
2039 plugins=""
2040 swcodec="yes"
2041 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2042 bootoutput="firmware.mi4"
2043 # toolset is the tools within the tools directory that we build for
2044 # this particular target.
2045 toolset=$scramblebitmaptools
2046 t_cpu="arm"
2047 t_manufacturer="sandisk"
2048 t_model="sansa-view"
2051 150|tatungtpj1022)
2052 target_id=25
2053 modelname="tatungtpj1022"
2054 target="-DTATUNG_TPJ1022"
2055 memory=32 # always
2056 arm7tdmicc
2057 tool="$rootdir/tools/scramble -add tpj2"
2058 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2059 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2060 output="rockbox.elio"
2061 appextra="recorder:gui"
2062 plugins="yes"
2063 swcodec="yes"
2064 boottool="$rootdir/tools/scramble -mi4v2"
2065 bootoutput="pp5020.mi4"
2066 # toolset is the tools within the tools directory that we build for
2067 # this particular target.
2068 toolset=$scramblebitmaptools
2069 # architecture, manufacturer and model for the target-tree build
2070 t_cpu="arm"
2071 t_manufacturer="tatung"
2072 t_model="tpj1022"
2075 100|gogearsa9200)
2076 target_id=41
2077 modelname="gogearsa9200"
2078 target="-DPHILIPS_SA9200"
2079 memory=32 # supposedly
2080 arm7tdmicc
2081 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2082 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2083 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2084 output="rockbox.mi4"
2085 appextra="recorder:gui"
2086 plugins=""
2087 swcodec="yes"
2088 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2089 bootoutput="FWImage.ebn"
2090 # toolset is the tools within the tools directory that we build for
2091 # this particular target.
2092 toolset=$scramblebitmaptools
2093 # architecture, manufacturer and model for the target-tree build
2094 t_cpu="arm"
2095 t_manufacturer="philips"
2096 t_model="sa9200"
2099 101|gogearhdd1630)
2100 target_id=43
2101 modelname="gogearhdd1630"
2102 target="-DPHILIPS_HDD1630"
2103 memory=32 # supposedly
2104 arm7tdmicc
2105 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2106 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2107 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2108 output="rockbox.mi4"
2109 appextra="recorder:gui"
2110 plugins="yes"
2111 swcodec="yes"
2112 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2113 bootoutput="FWImage.ebn"
2114 # toolset is the tools within the tools directory that we build for
2115 # this particular target.
2116 toolset=$scramblebitmaptools
2117 # architecture, manufacturer and model for the target-tree build
2118 t_cpu="arm"
2119 t_manufacturer="philips"
2120 t_model="hdd1630"
2123 110|meizum6sl)
2124 target_id=49
2125 modelname="meizum6sl"
2126 target="-DMEIZU_M6SL"
2127 memory=16 # always
2128 arm940tbecc
2129 tool="cp"
2130 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2131 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2132 output="rockbox.meizu"
2133 appextra="recorder:gui"
2134 plugins="no" #FIXME
2135 swcodec="yes"
2136 toolset=$genericbitmaptools
2137 boottool="cp"
2138 bootoutput="rockboot.ebn"
2139 # architecture, manufacturer and model for the target-tree build
2140 t_cpu="arm"
2141 t_manufacturer="s5l8700"
2142 t_model="meizu-m6sl"
2145 111|meizum6sp)
2146 target_id=46
2147 modelname="meizum6sp"
2148 target="-DMEIZU_M6SP"
2149 memory=16 # always
2150 arm940tbecc
2151 tool="cp"
2152 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2153 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2154 output="rockbox.meizu"
2155 appextra="recorder:gui"
2156 plugins="no" #FIXME
2157 swcodec="yes"
2158 toolset=$genericbitmaptools
2159 boottool="cp"
2160 bootoutput="rockboot.ebn"
2161 # architecture, manufacturer and model for the target-tree build
2162 t_cpu="arm"
2163 t_manufacturer="s5l8700"
2164 t_model="meizu-m6sp"
2167 112|meizum3)
2168 target_id=47
2169 modelname="meizum3"
2170 target="-DMEIZU_M3"
2171 memory=16 # always
2172 arm940tbecc
2173 tool="cp"
2174 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2175 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2176 output="rockbox.meizu"
2177 appextra="recorder:gui"
2178 plugins="no" #FIXME
2179 swcodec="yes"
2180 toolset=$genericbitmaptools
2181 boottool="cp"
2182 bootoutput="rockboot.ebn"
2183 # architecture, manufacturer and model for the target-tree build
2184 t_cpu="arm"
2185 t_manufacturer="s5l8700"
2186 t_model="meizu-m3"
2189 120|ondavx747)
2190 target_id=45
2191 modelname="ondavx747"
2192 target="-DONDA_VX747"
2193 memory=16
2194 mipselcc
2195 tool="$rootdir/tools/scramble -add=x747"
2196 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2197 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2198 output="rockbox.vx747"
2199 appextra="recorder:gui"
2200 plugins="yes"
2201 swcodec="yes"
2202 toolset=$genericbitmaptools
2203 boottool="$rootdir/tools/scramble -ccpmp"
2204 bootoutput="ccpmp.bin"
2205 # architecture, manufacturer and model for the target-tree build
2206 t_cpu="mips"
2207 t_manufacturer="ingenic_jz47xx"
2208 t_model="onda_vx747"
2211 121|ondavx767)
2212 target_id=64
2213 modelname="ondavx767"
2214 target="-DONDA_VX767"
2215 memory=16 #FIXME
2216 mipselcc
2217 tool="cp"
2218 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2219 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2220 output="rockbox.vx767"
2221 appextra="recorder:gui"
2222 plugins="" #FIXME
2223 swcodec="yes"
2224 toolset=$genericbitmaptools
2225 boottool="$rootdir/tools/scramble -ccpmp"
2226 bootoutput="ccpmp.bin"
2227 # architecture, manufacturer and model for the target-tree build
2228 t_cpu="mips"
2229 t_manufacturer="ingenic_jz47xx"
2230 t_model="onda_vx767"
2233 122|ondavx747p)
2234 target_id=54
2235 modelname="ondavx747p"
2236 target="-DONDA_VX747P"
2237 memory=16
2238 mipselcc
2239 tool="$rootdir/tools/scramble -add=747p"
2240 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2241 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2242 output="rockbox.vx747p"
2243 appextra="recorder:gui"
2244 plugins="yes"
2245 swcodec="yes"
2246 toolset=$genericbitmaptools
2247 boottool="$rootdir/tools/scramble -ccpmp"
2248 bootoutput="ccpmp.bin"
2249 # architecture, manufacturer and model for the target-tree build
2250 t_cpu="mips"
2251 t_manufacturer="ingenic_jz47xx"
2252 t_model="onda_vx747"
2255 123|ondavx777)
2256 target_id=61
2257 modelname="ondavx777"
2258 target="-DONDA_VX777"
2259 memory=16
2260 mipselcc
2261 tool="$rootdir/tools/scramble -add=x777"
2262 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2263 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2264 output="rockbox.vx777"
2265 appextra="recorder:gui"
2266 plugins="yes"
2267 swcodec="yes"
2268 toolset=$genericbitmaptools
2269 boottool="$rootdir/tools/scramble -ccpmp"
2270 bootoutput="ccpmp.bin"
2271 # architecture, manufacturer and model for the target-tree build
2272 t_cpu="mips"
2273 t_manufacturer="ingenic_jz47xx"
2274 t_model="onda_vx747"
2277 130|lyreproto1)
2278 target_id=56
2279 modelname="lyreproto1"
2280 target="-DLYRE_PROTO1"
2281 memory=64
2282 arm926ejscc
2283 tool="cp"
2284 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2285 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2286 output="rockbox.lyre"
2287 appextra="recorder:gui"
2288 plugins=""
2289 swcodec="yes"
2290 toolset=$scramblebitmaptools
2291 boottool="cp"
2292 bootoutput="bootloader-proto1.lyre"
2293 # architecture, manufacturer and model for the target-tree build
2294 t_cpu="arm"
2295 t_manufacturer="at91sam"
2296 t_model="lyre_proto1"
2299 131|mini2440)
2300 target_id=99
2301 modelname="mini2440"
2302 target="-DMINI2440"
2303 memory=64
2304 arm9tdmicc
2305 tool="$rootdir/tools/scramble -add=m244"
2306 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2307 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2308 output="rockbox.mini2440"
2309 appextra="recorder:gui"
2310 plugins=""
2311 swcodec="yes"
2312 toolset=$scramblebitmaptools
2313 boottool="cp"
2314 bootoutput="bootloader-mini2440.lyre"
2315 # architecture, manufacturer and model for the target-tree build
2316 t_cpu="arm"
2317 t_manufacturer="s3c2440"
2318 t_model="mini2440"
2321 140|samsungyh820)
2322 target_id=57
2323 modelname="samsungyh820"
2324 target="-DSAMSUNG_YH820"
2325 memory=32 # always
2326 arm7tdmicc
2327 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2328 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2329 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2330 output="rockbox.mi4"
2331 appextra="recorder:gui"
2332 plugins="yes"
2333 swcodec="yes"
2334 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2335 bootoutput="FW_YH820.mi4"
2336 # toolset is the tools within the tools directory that we build for
2337 # this particular target.
2338 toolset=$scramblebitmaptools
2339 # architecture, manufacturer and model for the target-tree build
2340 t_cpu="arm"
2341 t_manufacturer="samsung"
2342 t_model="yh820"
2345 141|samsungyh920)
2346 target_id=58
2347 modelname="samsungyh920"
2348 target="-DSAMSUNG_YH920"
2349 memory=32 # always
2350 arm7tdmicc
2351 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2352 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2353 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2354 output="rockbox.mi4"
2355 appextra="recorder:gui"
2356 plugins="yes"
2357 swcodec="yes"
2358 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2359 bootoutput="PP5020.mi4"
2360 # toolset is the tools within the tools directory that we build for
2361 # this particular target.
2362 toolset=$scramblebitmaptools
2363 # architecture, manufacturer and model for the target-tree build
2364 t_cpu="arm"
2365 t_manufacturer="samsung"
2366 t_model="yh920"
2369 142|samsungyh925)
2370 target_id=59
2371 modelname="samsungyh925"
2372 target="-DSAMSUNG_YH925"
2373 memory=32 # always
2374 arm7tdmicc
2375 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2376 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2377 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2378 output="rockbox.mi4"
2379 appextra="recorder:gui"
2380 plugins="yes"
2381 swcodec="yes"
2382 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2383 bootoutput="FW_YH925.mi4"
2384 # toolset is the tools within the tools directory that we build for
2385 # this particular target.
2386 toolset=$scramblebitmaptools
2387 # architecture, manufacturer and model for the target-tree build
2388 t_cpu="arm"
2389 t_manufacturer="samsung"
2390 t_model="yh925"
2393 143|samsungyps3)
2394 target_id=60
2395 modelname="samsungyps3"
2396 target="-DSAMSUNG_YPS3"
2397 memory=16 # always
2398 arm940tbecc
2399 tool="cp"
2400 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2401 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2402 output="rockbox.yps3"
2403 appextra="recorder:gui"
2404 plugins="no" #FIXME
2405 swcodec="yes"
2406 toolset=$genericbitmaptools
2407 boottool="cp"
2408 bootoutput="rockboot.ebn"
2409 # architecture, manufacturer and model for the target-tree build
2410 t_cpu="arm"
2411 t_manufacturer="s5l8700"
2412 t_model="yps3"
2417 echo "Please select a supported target platform!"
2418 exit 7
2421 esac
2423 echo "Platform set to $modelname"
2426 #remove start
2427 ############################################################################
2428 # Amount of memory, for those that can differ. They have $memory unset at
2429 # this point.
2432 if [ -z "$memory" ]; then
2433 case $target_id in
2435 if [ "$ARG_RAM" ]; then
2436 size=$ARG_RAM
2437 else
2438 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2439 size=`input`;
2441 case $size in
2442 60|64)
2443 memory="64"
2446 memory="32"
2448 esac
2451 if [ "$ARG_RAM" ]; then
2452 size=$ARG_RAM
2453 else
2454 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2455 size=`input`;
2457 case $size in
2459 memory="8"
2462 memory="2"
2464 esac
2466 esac
2467 echo "Memory size selected: $memory MB"
2468 [ "$ARG_TYPE" ] || echo ""
2470 #remove end
2472 ##################################################################
2473 # Figure out build "type"
2476 # the ifp7x0 is the only platform that supports building a gdb stub like
2477 # this
2478 case $modelname in
2479 iriverifp7xx)
2480 gdbstub="(G)DB stub, "
2482 sansae200r|sansae200)
2483 gdbstub="(I)nstaller, "
2485 sansac200)
2486 gdbstub="(E)raser, "
2490 esac
2491 if [ "$ARG_TYPE" ]; then
2492 btype=$ARG_TYPE
2493 else
2494 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2495 btype=`input`;
2498 case $btype in
2499 [Ii])
2500 appsdir='\$(ROOTDIR)/bootloader'
2501 apps="bootloader"
2502 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2503 bootloader="1"
2504 echo "e200R-installer build selected"
2506 [Ee])
2507 appsdir='\$(ROOTDIR)/bootloader'
2508 apps="bootloader"
2509 echo "C2(4)0 or C2(5)0"
2510 variant=`input`
2511 case $variant in
2513 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2514 echo "c240 eraser build selected"
2517 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2518 echo "c240 eraser build selected"
2520 esac
2521 bootloader="1"
2522 echo "c200 eraser build selected"
2524 [Bb])
2525 if test $t_manufacturer = "archos"; then
2526 # Archos SH-based players do this somewhat differently for
2527 # some reason
2528 appsdir='\$(ROOTDIR)/flash/bootbox'
2529 apps="bootbox"
2530 else
2531 appsdir='\$(ROOTDIR)/bootloader'
2532 apps="bootloader"
2533 flash=""
2534 if test -n "$boottool"; then
2535 tool="$boottool"
2537 if test -n "$bootoutput"; then
2538 output=$bootoutput
2541 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2542 bootloader="1"
2543 echo "Bootloader build selected"
2545 [Ss])
2546 if [ "$modelname" = "sansae200r" ]; then
2547 echo "Do not use the e200R target for simulator builds. Use e200 instead."
2548 exit 8
2550 debug="-DDEBUG"
2551 simulator="yes"
2552 extradefines="-DSIMULATOR"
2553 archosrom=""
2554 flash=""
2555 echo "Simulator build selected"
2557 [Aa]*)
2558 echo "Advanced build selected"
2559 whichadvanced $btype
2561 [Gg])
2562 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2563 appsdir='\$(ROOTDIR)/gdb'
2564 apps="stub"
2565 case $modelname in
2566 iriverifp7xx)
2567 output="stub.wma"
2571 esac
2572 echo "GDB stub build selected"
2574 [Mm])
2575 toolset='';
2576 apps="manual"
2577 echo "Manual build selected"
2579 [Cc])
2580 uname=`uname`
2581 simcc "checkwps"
2582 toolset='';
2583 t_cpu='';
2584 GCCOPTS='';
2585 appsdir='\$(ROOTDIR)/tools/checkwps';
2586 output='checkwps.'${modelname};
2587 archosrom='';
2588 echo "CheckWPS build selected"
2590 [Dd])
2591 uname=`uname`
2592 simcc "database"
2593 toolset='';
2594 t_cpu='';
2595 GCCOPTS='';
2596 appsdir='\$(ROOTDIR)/tools/database';
2597 output='database.'${modelname};
2598 archosrom='';
2599 echo "Database tool build selected"
2602 if [ "$modelname" = "sansae200r" ]; then
2603 echo "Do not use the e200R target for regular builds. Use e200 instead."
2604 exit 8
2606 debug=""
2607 btype="N" # set it explicitly since RET only gets here as well
2608 echo "Normal build selected"
2611 esac
2612 # to be able running "make manual" from non-manual configuration
2613 case $modelname in
2614 archosfmrecorder)
2615 manualdev="archosrecorderv2fm"
2617 archosrecorderv2)
2618 manualdev="archosrecorderv2fm"
2620 iriverh1??)
2621 manualdev="iriverh100"
2623 ipodmini2g)
2624 manualdev="ipodmini1g"
2627 manualdev=$modelname
2629 esac
2631 if [ -z "$debug" ]; then
2632 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2635 echo "Using source code root directory: $rootdir"
2637 # this was once possible to change at build-time, but no more:
2638 language="english"
2640 uname=`uname`
2642 if [ "yes" = "$simulator" ]; then
2643 # setup compiler and things for simulator
2644 simcc "sdl"
2646 if [ -d "simdisk" ]; then
2647 echo "Subdirectory 'simdisk' already present"
2648 else
2649 mkdir simdisk
2650 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2654 # Now, figure out version number of the (gcc) compiler we are about to use
2655 gccver=`$CC -dumpversion`;
2657 # figure out the binutil version too and display it, mostly for the build
2658 # system etc to be able to see it easier
2659 if [ $uname = "Darwin" ]; then
2660 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2661 else
2662 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2665 if [ -z "$gccver" ]; then
2666 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
2667 echo "[WARNING] this may cause your build to fail since we cannot do the"
2668 echo "[WARNING] checks we want now."
2669 else
2671 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2672 # DEPEND on it
2674 num1=`echo $gccver | cut -d . -f1`
2675 num2=`echo $gccver | cut -d . -f2`
2676 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2678 # This makes:
2679 # 3.3.X => 303
2680 # 3.4.X => 304
2681 # 2.95.3 => 295
2683 echo "Using $CC $gccver ($gccnum)"
2685 if test "$gccnum" -ge "400"; then
2686 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2687 # so we ignore that warnings for now
2688 # -Wno-pointer-sign
2689 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2692 if test "$gccnum" -ge "401"; then
2693 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2694 # will break strict-aliasing rules"
2696 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
2699 if test "$gccnum" -ge "402"; then
2700 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2701 # and later would throw it for several valid cases
2702 GCCOPTS="$GCCOPTS -Wno-override-init"
2705 case $prefix in
2707 # simulator
2709 i586-mingw32msvc-)
2710 # cross-compile for win32
2713 # Verify that the cross-compiler is of a recommended version!
2714 if test "$gccver" != "$gccchoice"; then
2715 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2716 echo "WARNING: version $gccchoice!"
2717 echo "WARNING: This may cause your build to fail since it may be a version"
2718 echo "WARNING: that isn't functional or known to not be the best choice."
2719 echo "WARNING: If you suffer from build problems, you know that this is"
2720 echo "WARNING: a likely source for them..."
2723 esac
2728 echo "Using $LD $ldver"
2730 # check the compiler for SH platforms
2731 if test "$CC" = "sh-elf-gcc"; then
2732 if test "$gccnum" -lt "400"; then
2733 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2734 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2735 else
2736 # figure out patch status
2737 gccpatch=`$CC --version`;
2739 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2740 echo "gcc $gccver is rockbox patched"
2741 # then convert -O to -Os to get smaller binaries!
2742 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2743 else
2744 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2745 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2750 if test "$CC" = "m68k-elf-gcc"; then
2751 # convert -O to -Os to get smaller binaries!
2752 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2755 if [ "$ARG_CCACHE" = "1" ]; then
2756 echo "Enable ccache for building"
2757 ccache="ccache"
2758 elif [ "$ARG_CCACHE" != "0" ]; then
2759 ccache=`findtool ccache`
2760 if test -n "$ccache"; then
2761 echo "Found and uses ccache ($ccache)"
2765 # figure out the full path to the various commands if possible
2766 HOSTCC=`findtool gcc --lit`
2767 HOSTAR=`findtool ar --lit`
2768 CC=`findtool ${CC} --lit`
2769 LD=`findtool ${AR} --lit`
2770 AR=`findtool ${AR} --lit`
2771 AS=`findtool ${AS} --lit`
2772 OC=`findtool ${OC} --lit`
2773 WINDRES=`findtool ${WINDRES} --lit`
2774 DLLTOOL=`findtool ${DLLTOOL} --lit`
2775 DLLWRAP=`findtool ${DLLWRAP} --lit`
2776 RANLIB=`findtool ${RANLIB} --lit`
2778 if test -n "$ccache"; then
2779 CC="$ccache $CC"
2782 if test "X$endian" = "Xbig"; then
2783 defendian="ROCKBOX_BIG_ENDIAN"
2784 else
2785 defendian="ROCKBOX_LITTLE_ENDIAN"
2788 if [ "$ARG_RBDIR" ]; then
2789 rbdir=$ARG_RBDIR
2790 echo "Using alternate rockbox dir: ${rbdir}"
2793 sed > autoconf.h \
2794 -e "s,@ENDIAN@,${defendian},g" \
2795 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2796 -e "s,@config_rtc@,$config_rtc,g" \
2797 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2798 -e "s,@RBDIR@,${rbdir},g" \
2799 -e "s,@have_backlight@,$have_backlight,g" \
2800 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
2801 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
2802 <<EOF
2803 /* This header was made by configure */
2804 #ifndef __BUILD_AUTOCONF_H
2805 #define __BUILD_AUTOCONF_H
2807 /* Define endianess for the target or simulator platform */
2808 #define @ENDIAN@ 1
2810 /* Define this if you build rockbox to support the logf logging and display */
2811 #undef ROCKBOX_HAS_LOGF
2813 /* optional define for a backlight modded Ondio */
2814 @have_backlight@
2816 /* optional define for FM radio mod for iAudio M5 */
2817 @have_fmradio_in@
2819 /* optional define for ATA poweroff on Player */
2820 @have_ata_poweroff@
2822 /* optional defines for RTC mod for h1x0 */
2823 @config_rtc@
2824 @have_rtc_alarm@
2826 /* root of Rockbox */
2827 #define ROCKBOX_DIR "/@RBDIR@"
2829 #endif /* __BUILD_AUTOCONF_H */
2832 if test -n "$t_cpu"; then
2833 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2834 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2835 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2836 GCCOPTS="$GCCOPTS"
2839 if test "$simulator" = "yes"; then
2840 # add simul make stuff on the #SIMUL# line
2841 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2842 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2843 else
2844 # delete the lines that match
2845 simmagic1='/@SIMUL1@/D'
2846 simmagic2='/@SIMUL2@/D'
2849 if test "$swcodec" = "yes"; then
2850 voicetoolset="rbspeexenc voicefont wavtrim"
2851 else
2852 voicetoolset="voicefont wavtrim"
2855 if test "$apps" = "apps"; then
2856 # only when we build "real" apps we build the .lng files
2857 buildlangs="langs"
2860 #### Fix the cmdline ###
2861 if test -n "$ccache"; then
2862 cmdline="--ccache "
2865 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
2866 ### end of cmdline
2868 sed > Makefile \
2869 -e "s,@ROOTDIR@,${rootdir},g" \
2870 -e "s,@DEBUG@,${debug},g" \
2871 -e "s,@MEMORY@,${memory},g" \
2872 -e "s,@TARGET_ID@,${target_id},g" \
2873 -e "s,@TARGET@,${target},g" \
2874 -e "s,@CPU@,${t_cpu},g" \
2875 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2876 -e "s,@MODELNAME@,${modelname},g" \
2877 -e "s,@LANGUAGE@,${language},g" \
2878 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2879 -e "s,@PWD@,${pwd},g" \
2880 -e "s,@HOSTCC@,${HOSTCC},g" \
2881 -e "s,@HOSTAR@,${HOSTAR},g" \
2882 -e "s,@CC@,${CC},g" \
2883 -e "s,@LD@,${LD},g" \
2884 -e "s,@AR@,${AR},g" \
2885 -e "s,@AS@,${AS},g" \
2886 -e "s,@OC@,${OC},g" \
2887 -e "s,@WINDRES@,${WINDRES},g" \
2888 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2889 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2890 -e "s,@RANLIB@,${RANLIB},g" \
2891 -e "s,@TOOL@,${tool},g" \
2892 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2893 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2894 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2895 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2896 -e "s,@OUTPUT@,${output},g" \
2897 -e "s,@APPEXTRA@,${appextra},g" \
2898 -e "s,@ARCHOSROM@,${archosrom},g" \
2899 -e "s,@FLASHFILE@,${flash},g" \
2900 -e "s,@PLUGINS@,${plugins},g" \
2901 -e "s,@CODECS@,${swcodec},g" \
2902 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2903 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2904 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2905 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2906 -e "s!@LDOPTS@!${LDOPTS}!g" \
2907 -e "s,@LOADADDRESS@,${loadaddress},g" \
2908 -e "s,@EXTRADEF@,${extradefines},g" \
2909 -e "s,@APPSDIR@,${appsdir},g" \
2910 -e "s,@FIRMDIR@,${firmdir},g" \
2911 -e "s,@TOOLSDIR@,${toolsdir},g" \
2912 -e "s,@APPS@,${apps},g" \
2913 -e "s,@SIMVER@,${simver},g" \
2914 -e "s,@GCCVER@,${gccver},g" \
2915 -e "s,@GCCNUM@,${gccnum},g" \
2916 -e "s,@UNAME@,${uname},g" \
2917 -e "s,@ENDIAN@,${defendian},g" \
2918 -e "s,@TOOLSET@,${toolset},g" \
2919 -e "${simmagic1}" \
2920 -e "${simmagic2}" \
2921 -e "s,@MANUALDEV@,${manualdev},g" \
2922 -e "s,@ENCODER@,${ENC_CMD},g" \
2923 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2924 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2925 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2926 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2927 -e "s,@LANGS@,${buildlangs},g" \
2928 -e "s,@USE_ELF@,${USE_ELF},g" \
2929 -e "s,@RBDIR@,${rbdir},g" \
2930 -e "s,@PREFIX@,$PREFIX,g" \
2931 -e "s,@CMDLINE@,$cmdline,g" \
2932 <<EOF
2933 ## Automatically generated. http://www.rockbox.org/
2935 export ROOTDIR=@ROOTDIR@
2936 export FIRMDIR=@FIRMDIR@
2937 export APPSDIR=@APPSDIR@
2938 export TOOLSDIR=@TOOLSDIR@
2939 export DOCSDIR=\$(ROOTDIR)/docs
2940 export MANUALDIR=\${ROOTDIR}/manual
2941 export DEBUG=@DEBUG@
2942 export MODELNAME=@MODELNAME@
2943 export ARCHOSROM=@ARCHOSROM@
2944 export FLASHFILE=@FLASHFILE@
2945 export TARGET_ID=@TARGET_ID@
2946 export TARGET=@TARGET@
2947 export CPU=@CPU@
2948 export MANUFACTURER=@MANUFACTURER@
2949 export OBJDIR=@PWD@
2950 export BUILDDIR=@PWD@
2951 export LANGUAGE=@LANGUAGE@
2952 export VOICELANGUAGE=@VOICELANGUAGE@
2953 export MEMORYSIZE=@MEMORY@
2954 export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
2955 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2956 export MKFIRMWARE=@TOOL@
2957 export BMP2RB_MONO=@BMP2RB_MONO@
2958 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2959 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2960 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2961 export BINARY=@OUTPUT@
2962 export APPEXTRA=@APPEXTRA@
2963 export ENABLEDPLUGINS=@PLUGINS@
2964 export SOFTWARECODECS=@CODECS@
2965 export EXTRA_DEFINES=@EXTRADEF@
2966 export HOSTCC=@HOSTCC@
2967 export HOSTAR=@HOSTAR@
2968 export CC=@CC@
2969 export LD=@LD@
2970 export AR=@AR@
2971 export AS=@AS@
2972 export OC=@OC@
2973 export WINDRES=@WINDRES@
2974 export DLLTOOL=@DLLTOOL@
2975 export DLLWRAP=@DLLWRAP@
2976 export RANLIB=@RANLIB@
2977 export PREFIX=@PREFIX@
2978 export PROFILE_OPTS=@PROFILE_OPTS@
2979 export SIMVER=@SIMVER@
2980 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2981 export GCCOPTS=@GCCOPTS@
2982 export TARGET_INC=@TARGET_INC@
2983 export LOADADDRESS=@LOADADDRESS@
2984 export SHARED_FLAG=@SHARED_FLAG@
2985 export LDOPTS=@LDOPTS@
2986 export GCCVER=@GCCVER@
2987 export GCCNUM=@GCCNUM@
2988 export UNAME=@UNAME@
2989 export MANUALDEV=@MANUALDEV@
2990 export TTS_OPTS=@TTS_OPTS@
2991 export TTS_ENGINE=@TTS_ENGINE@
2992 export ENC_OPTS=@ENC_OPTS@
2993 export ENCODER=@ENCODER@
2994 export USE_ELF=@USE_ELF@
2995 export RBDIR=@RBDIR@
2997 CONFIGURE_OPTIONS=@CMDLINE@
2999 include \$(TOOLSDIR)/root.make
3003 echo "Created Makefile"