Add wave64(.w64) codec (FS#11022)
[kugel-rb.git] / tools / configure
blob5ed00545561e8bbd6b5dba6c49234a110e1c2d89
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 case `uname -m` in
175 x86_64|amd64)
176 # fPIC is needed to make shared objects link
177 # setting visibility to hidden is necessary to avoid strange crashes
178 # due to symbol clashing
179 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
180 # x86_64 supports MMX by default
183 i686)
184 echo "Enabling MMX support"
185 GCCOPTS="$GCCOPTS -mmmx"
187 esac
189 id=$$
190 cat >$tmpdir/conftest-$id.c <<EOF
191 #include <stdio.h>
192 int main(int argc, char **argv)
194 int var=0;
195 char *varp = (char *)&var;
196 *varp=1;
198 printf("%d\n", var);
199 return 0;
203 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
205 if test `$tmpdir/conftest-$id 2>/dev/null` -gt "1"; then
206 # big endian
207 endian="big"
208 else
209 # little endian
210 endian="little"
213 if [ $1 = "sdl" ]; then
214 echo "Simulator environment deemed $endian endian"
215 elif [ $1 = "checkwps" ]; then
216 echo "CheckWPS environment deemed $endian endian"
219 # use wildcard here to make it work even if it was named *.exe like
220 # on cygwin
221 rm -f $tmpdir/conftest-$id*
222 else
223 # We are crosscompiling
224 # add cross-compiler option(s)
225 prefixtools i586-mingw32msvc-
226 LDOPTS="-mconsole $sdl_libs"
227 output="rockboxui.exe" # use this as output binary name
228 endian="little" # windows is little endian
229 echo "Enabling MMX support"
230 GCCOPTS="$GCCOPTS -mmmx"
235 # functions for setting up cross-compiler names and options
236 # also set endianess and what the exact recommended gcc version is
237 # the gcc version should most likely match what versions we build with
238 # rockboxdev.sh
240 shcc () {
241 prefixtools sh-elf-
242 GCCOPTS="$CCOPTS -m1"
243 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
244 endian="big"
245 gccchoice="4.0.3"
248 calmrisccc () {
249 prefixtools calmrisc16-unknown-elf-
250 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
251 GCCOPTIMIZE="-fomit-frame-pointer"
252 endian="big"
255 coldfirecc () {
256 prefixtools m68k-elf-
257 GCCOPTS="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
258 GCCOPTIMIZE="-fomit-frame-pointer"
259 endian="big"
260 gccchoice="3.4.6"
263 arm7tdmicc () {
264 findarmgcc
265 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
266 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" != "1"; then
267 GCCOPTS="$GCCOPTS -mlong-calls"
269 GCCOPTIMIZE="-fomit-frame-pointer"
270 endian="little"
273 arm9tdmicc () {
274 findarmgcc
275 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
276 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" != "1"; then
277 GCCOPTS="$GCCOPTS -mlong-calls"
279 GCCOPTIMIZE="-fomit-frame-pointer"
280 endian="little"
283 arm940tbecc () {
284 findarmgcc
285 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
286 if test "$ARG_ARM_EABI" != "1"; then
287 GCCOPTS="$GCCOPTS -mlong-calls"
289 GCCOPTIMIZE="-fomit-frame-pointer"
290 endian="big"
293 arm940tcc () {
294 findarmgcc
295 GCCOPTS="$CCOPTS -mcpu=arm940t"
296 if test "$ARG_ARM_EABI" != "1"; then
297 GCCOPTS="$GCCOPTS -mlong-calls"
299 GCCOPTIMIZE="-fomit-frame-pointer"
300 endian="little"
303 arm946cc () {
304 findarmgcc
305 GCCOPTS="$CCOPTS -mcpu=arm9e"
306 if test "$ARG_ARM_EABI" != "1"; then
307 GCCOPTS="$GCCOPTS -mlong-calls"
309 GCCOPTIMIZE="-fomit-frame-pointer"
310 endian="little"
313 arm926ejscc () {
314 findarmgcc
315 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
316 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" != "1"; then
317 GCCOPTS="$GCCOPTS -mlong-calls"
319 GCCOPTIMIZE="-fomit-frame-pointer"
320 endian="little"
323 arm1136jfscc () {
324 findarmgcc
325 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
326 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" != "1"; then
327 GCCOPTS="$GCCOPTS -mlong-calls"
329 GCCOPTIMIZE="-fomit-frame-pointer"
330 endian="little"
333 arm1176jzscc () {
334 findarmgcc
335 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
336 if test "$ARG_ARM_EABI" != "1"; then
337 GCCOPTS="$GCCOPTS -mlong-calls"
339 GCCOPTIMIZE="-fomit-frame-pointer"
340 endian="little"
343 mipselcc () {
344 prefixtools mipsel-elf-
345 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls"
346 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
347 GCCOPTIMIZE="-fomit-frame-pointer"
348 endian="little"
349 gccchoice="4.1.2"
352 whichadvanced () {
353 atype=`echo "$1" | cut -c 2-`
354 ##################################################################
355 # Prompt for specific developer options
357 if [ "$atype" ]; then
358 interact=
359 else
360 interact=1
361 echo ""
362 echo "Enter your developer options (press enter when done)"
363 printf "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile"
364 if [ "$memory" = "2" ]; then
365 printf ", (8)MB MOD"
367 if [ "$modelname" = "archosplayer" ]; then
368 printf ", Use (A)TA poweroff"
370 if [ "$t_model" = "ondio" ]; then
371 printf ", (B)acklight MOD"
373 if [ "$modelname" = "iaudiom5" ]; then
374 printf ", (F)M radio MOD"
376 if [ "$modelname" = "iriverh120" ]; then
377 printf ", (R)TC MOD"
379 echo ""
382 cont=1
383 while [ $cont = "1" ]; do
385 if [ "$interact" ]; then
386 option=`input`
387 else
388 option=`echo "$atype" | cut -c 1`
391 case $option in
392 [Dd])
393 if [ "yes" = "$profile" ]; then
394 echo "Debug is incompatible with profiling"
395 else
396 echo "DEBUG build enabled"
397 use_debug="yes"
400 [Ll])
401 echo "logf() support enabled"
402 logf="yes"
404 [Ss])
405 echo "Simulator build enabled"
406 simulator="yes"
408 [Pp])
409 if [ "yes" = "$use_debug" ]; then
410 echo "Profiling is incompatible with debug"
411 else
412 echo "Profiling support is enabled"
413 profile="yes"
416 [Vv])
417 echo "Voice build selected"
418 voice="yes"
421 if [ "$memory" = "2" ]; then
422 memory="8"
423 echo "Memory size selected: 8MB"
426 [Aa])
427 if [ "$modelname" = "archosplayer" ]; then
428 have_ata_poweroff="#define HAVE_ATA_POWEROFF"
429 echo "ATA poweroff enabled"
432 [Bb])
433 if [ "$t_model" = "ondio" ]; then
434 have_backlight="#define HAVE_BACKLIGHT"
435 echo "Backlight functions enabled"
438 [Ff])
439 if [ "$modelname" = "iaudiom5" ]; then
440 have_fmradio_in="#define HAVE_FMRADIO_IN"
441 echo "FM radio functions enabled"
444 [Rr])
445 if [ "$modelname" = "iriverh120" ]; then
446 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
447 have_rtc_alarm="#define HAVE_RTC_ALARM"
448 echo "RTC functions enabled (DS1339/DS3231)"
451 [Ww])
452 echo "Enabling Windows 32 cross-compiling"
453 crosscompile="yes"
456 if [ "$interact" ]; then
457 cont=0
458 else
459 echo "[ERROR] Option $option unsupported"
462 esac
463 if [ "$interact" ]; then
464 btype="$btype$option"
465 else
466 atype=`echo "$atype" | cut -c 2-`
467 [ "$atype" ] || cont=0
469 done
470 echo "done"
472 if [ "yes" = "$voice" ]; then
473 # Ask about languages to build
474 picklang
475 voicelanguage=`whichlang`
476 echo "Voice language set to $voicelanguage"
478 # Configure encoder and TTS engine for each language
479 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
480 voiceconfig "$thislang"
481 done
483 if [ "yes" = "$use_debug" ]; then
484 debug="-DDEBUG"
485 GCCOPTS="$GCCOPTS -g -DDEBUG"
487 if [ "yes" = "$logf" ]; then
488 use_logf="#define ROCKBOX_HAS_LOGF 1"
490 if [ "yes" = "$simulator" ]; then
491 debug="-DDEBUG"
492 extradefines="$extradefines -DSIMULATOR"
493 archosrom=""
494 flash=""
496 if [ "yes" = "$profile" ]; then
497 extradefines="$extradefines -DRB_PROFILE"
498 PROFILE_OPTS="-finstrument-functions"
502 # Configure voice settings
503 voiceconfig () {
504 thislang=$1
505 if [ ! "$ARG_TTS" ]; then
506 echo "Building $thislang voice for $modelname. Select options"
507 echo ""
510 if [ -n "`findtool flite`" ]; then
511 FLITE="F(l)ite "
512 FLITE_OPTS=""
513 DEFAULT_TTS="flite"
514 DEFAULT_TTS_OPTS=$FLITE_OPTS
515 DEFAULT_NOISEFLOOR="500"
516 DEFAULT_CHOICE="L"
518 if [ -n "`findtool espeak`" ]; then
519 ESPEAK="(e)Speak "
520 ESPEAK_OPTS=""
521 DEFAULT_TTS="espeak"
522 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
523 DEFAULT_NOISEFLOOR="500"
524 DEFAULT_CHOICE="e"
526 if [ -n "`findtool festival`" ]; then
527 FESTIVAL="(F)estival "
528 case "$thislang" in
529 "italiano")
530 FESTIVAL_OPTS="--language italian"
532 "espanol")
533 FESTIVAL_OPTS="--language spanish"
535 "finnish")
536 FESTIVAL_OPTS="--language finnish"
538 "czech")
539 FESTIVAL_OPTS="--language czech"
542 FESTIVAL_OPTS=""
544 esac
545 DEFAULT_TTS="festival"
546 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
547 DEFAULT_NOISEFLOOR="500"
548 DEFAULT_CHOICE="F"
550 if [ -n "`findtool swift`" ]; then
551 SWIFT="S(w)ift "
552 SWIFT_OPTS=""
553 DEFAULT_TTS="swift"
554 DEFAULT_TTS_OPTS=$SWIFT_OPTS
555 DEFAULT_NOISEFLOOR="500"
556 DEFAULT_CHOICE="w"
558 # Allow SAPI if Windows is in use
559 if [ -n "`findtool winver`" ]; then
560 SAPI="(S)API "
561 SAPI_OPTS=""
562 DEFAULT_TTS="sapi"
563 DEFAULT_TTS_OPTS=$SAPI_OPTS
564 DEFAULT_NOISEFLOOR="500"
565 DEFAULT_CHOICE="S"
568 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
569 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
570 exit 3
573 if [ "$ARG_TTS" ]; then
574 option=$ARG_TTS
575 else
576 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
577 option=`input`
579 advopts="$advopts --tts=$option"
580 case "$option" in
581 [Ll])
582 TTS_ENGINE="flite"
583 NOISEFLOOR="500" # TODO: check this value
584 TTS_OPTS=$FLITE_OPTS
586 [Ee])
587 TTS_ENGINE="espeak"
588 NOISEFLOOR="500"
589 TTS_OPTS=$ESPEAK_OPTS
591 [Ff])
592 TTS_ENGINE="festival"
593 NOISEFLOOR="500"
594 TTS_OPTS=$FESTIVAL_OPTS
596 [Ss])
597 TTS_ENGINE="sapi"
598 NOISEFLOOR="500"
599 TTS_OPTS=$SAPI_OPTS
601 [Ww])
602 TTS_ENGINE="swift"
603 NOISEFLOOR="500"
604 TTS_OPTS=$SWIFT_OPTS
607 TTS_ENGINE=$DEFAULT_TTS
608 TTS_OPTS=$DEFAULT_TTS_OPTS
609 NOISEFLOOR=$DEFAULT_NOISEFLOOR
610 esac
611 echo "Using $TTS_ENGINE for TTS"
613 # Select which voice to use for Festival
614 if [ "$TTS_ENGINE" = "festival" ]; then
615 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
616 for voice in $voicelist; do
617 TTS_FESTIVAL_VOICE="$voice" # Default choice
618 break
619 done
620 if [ "$ARG_VOICE" ]; then
621 CHOICE=$ARG_VOICE
622 else
624 for voice in $voicelist; do
625 printf "%3d. %s\n" "$i" "$voice"
626 i=`expr $i + 1`
627 done
628 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
629 CHOICE=`input`
632 for voice in $voicelist; do
633 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
634 TTS_FESTIVAL_VOICE="$voice"
636 i=`expr $i + 1`
637 done
638 advopts="$advopts --voice=$CHOICE"
639 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
640 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
643 # Read custom tts options from command line
644 if [ "$ARG_TTSOPTS" ]; then
645 TTS_OPTS="$ARG_TTSOPTS"
646 advopts="$advopts --ttsopts='$TTS_OPTS'"
647 echo "$TTS_ENGINE options set to $TTS_OPTS"
650 if [ "$swcodec" = "yes" ]; then
651 ENCODER="rbspeexenc"
652 ENC_CMD="rbspeexenc"
653 ENC_OPTS="-q 4 -c 10"
654 else
655 if [ -n "`findtool lame`" ]; then
656 ENCODER="lame"
657 ENC_CMD="lame"
658 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
659 else
660 echo "You need LAME in the system path to build voice files for"
661 echo "HWCODEC targets."
662 exit 4
666 echo "Using $ENCODER for encoding voice clips"
668 # Read custom encoder options from command line
669 if [ "$ARG_ENCOPTS" ]; then
670 ENC_OPTS="$ARG_ENCOPTS"
671 advopts="$advopts --encopts='$ENC_OPTS'"
672 echo "$ENCODER options set to $ENC_OPTS"
675 TEMPDIR="${pwd}"
676 if [ -n "`findtool cygpath`" ]; then
677 TEMPDIR=`cygpath . -a -w`
681 picklang() {
682 # figure out which languages that are around
683 for file in $rootdir/apps/lang/*.lang; do
684 clean=`basename $file .lang`
685 langs="$langs $clean"
686 done
688 if [ "$ARG_LANG" ]; then
689 pick=$ARG_LANG
690 else
691 echo "Select a number for the language to use (default is english)"
692 # FIXME The multiple-language feature is currently broken
693 # echo "You may enter a comma-separated list of languages to build"
695 num=1
696 for one in $langs; do
697 echo "$num. $one"
698 num=`expr $num + 1`
699 done
700 pick=`input`
702 advopts="$advopts --language=$pick"
705 whichlang() {
706 output=""
707 # Allow the user to pass a comma-separated list of langauges
708 for thispick in `echo $pick | sed 's/,/ /g'`; do
709 num=1
710 for one in $langs; do
711 # Accept both the language number and name
712 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
713 if [ "$output" = "" ]; then
714 output=$one
715 else
716 output=$output,$one
719 num=`expr $num + 1`
720 done
721 done
722 if [ -z "$output" ]; then
723 # pick a default
724 output="english"
726 echo $output
729 help() {
730 echo "Rockbox configure script."
731 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
732 echo "Do *NOT* run this within the tools directory!"
733 echo ""
734 cat <<EOF
735 Usage: configure [OPTION]...
736 Options:
737 --target=TARGET Sets the target, TARGET can be either the target ID or
738 corresponding string. Run without this option to see all
739 available targets.
741 --ram=RAM Sets the RAM for certain targets. Even though any number
742 is accepted, not every number is correct. The default
743 value will be applied, if you entered a wrong number
744 (which depends on the target). Watch the output. Run
745 without this option if you are not sure which the right
746 number is.
748 --type=TYPE Sets the build type. Shortcuts are also valid.
749 Run without this option to see all available types.
750 Multiple values are allowed and managed in the input
751 order. So --type=b stands for Bootloader build, while
752 --type=ab stands for "Backlight MOD" build.
754 --language=LANG Set the language used for voice generation (used only if
755 TYPE is AV).
757 --tts=ENGINE Set the TTS engine used for voice generation (used only
758 if TYPE is AV).
760 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
761 AV).
763 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
765 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
767 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
768 This is useful for having multiple alternate builds on
769 your device that you can load with ROLO. However as the
770 bootloader looks for .rockbox you won't be able to boot
771 into this build.
773 --ccache Enable ccache use (done by default these days)
774 --no-ccache Disable ccache use
776 --eabi Make configure prefer toolchains that are able to compile
777 for the new ARM standard abi EABI
778 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
779 --help Shows this message (must not be used with other options)
783 exit
786 ARG_CCACHE=
787 ARG_ENCOPTS=
788 ARG_LANG=
789 ARG_RAM=
790 ARG_RBDIR=
791 ARG_TARGET=
792 ARG_TTS=
793 ARG_TTSOPTS=
794 ARG_TYPE=
795 ARG_VOICE=
796 ARG_ARM_EABI=
797 err=
798 for arg in "$@"; do
799 case "$arg" in
800 --ccache) ARG_CCACHE=1;;
801 --no-ccache) ARG_CCACHE=0;;
802 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
803 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
804 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
805 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
806 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
807 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
808 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
809 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
810 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
811 --eabi) ARG_ARM_EABI=1;;
812 --no-eabi) ARG_ARM_EABI=0;;
813 --help) help;;
814 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
815 esac
816 done
817 [ "$err" ] && exit 1
819 advopts=
821 if [ "$TMPDIR" != "" ]; then
822 tmpdir=$TMPDIR
823 else
824 tmpdir=/tmp
826 echo Using temporary directory $tmpdir
828 if test -r "configure"; then
829 # this is a check for a configure script in the current directory, it there
830 # is one, try to figure out if it is this one!
832 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
833 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
834 echo "It will only cause you pain and grief. Instead do this:"
835 echo ""
836 echo " cd .."
837 echo " mkdir build-dir"
838 echo " cd build-dir"
839 echo " ../tools/configure"
840 echo ""
841 echo "Much happiness will arise from this. Enjoy"
842 exit 5
846 # get our current directory
847 pwd=`pwd`;
849 if { echo $pwd | grep " "; } then
850 echo "You're running this script in a path that contains space. The build"
851 echo "system is unfortunately not clever enough to deal with this. Please"
852 echo "run the script from a different path, rename the path or fix the build"
853 echo "system!"
854 exit 6
857 if [ -z "$rootdir" ]; then
858 ##################################################################
859 # Figure out where the source code root is!
861 rootdir=`dirname $0`/../
863 #####################################################################
864 # Convert the possibly relative directory name to an absolute version
866 now=`pwd`
867 cd $rootdir
868 rootdir=`pwd`
870 # cd back to the build dir
871 cd $now
874 apps="apps"
875 appsdir='\$(ROOTDIR)/apps'
876 firmdir='\$(ROOTDIR)/firmware'
877 toolsdir='\$(ROOTDIR)/tools'
880 ##################################################################
881 # Figure out target platform
884 if [ "$ARG_TARGET" ]; then
885 buildfor=$ARG_TARGET
886 else
887 echo "Enter target platform:"
888 cat <<EOF
889 ==Archos== ==iriver== ==Apple iPod==
890 0) Player/Studio 10) H120/H140 20) Color/Photo
891 1) Recorder 11) H320/H340 21) Nano 1G
892 2) FM Recorder 12) iHP-100/110/115 22) Video
893 3) Recorder v2 13) iFP-790 23) 3G
894 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
895 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
896 6) AV300 26) Mini 2G
897 ==Toshiba== 27) 1G, 2G
898 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
899 30) X5/X5V/X5L 41) Gigabeat S
900 31) M5/M5L ==SanDisk==
901 32) 7 ==Olympus= 50) Sansa e200
902 33) D2 70) M:Robe 500 51) Sansa e200R
903 34) M3/M3L 71) M:Robe 100 52) Sansa c200
904 53) Sansa m200
905 ==Creative== ==Philips== 54) Sansa c100
906 90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip
907 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2
908 92) Zen Vision HDD1830 57) Sansa m200v4
909 102) GoGear HDD6330 58) Sansa Fuze
910 ==Onda== 59) Sansa c200v2
911 120) VX747 ==Meizu== 60) Sansa Clipv2
912 121) VX767 110) M6SL 61) Sansa View
913 122) VX747+ 111) M6SP 62) Sansa Clip+
914 123) VX777 112) M3 63) Sansa Fuze v2
916 ==Logik==
917 ==Samsung== ==Tatung== 80) DAX 1GB MP3/DAB
918 140) YH-820 150) Elio TPJ-1022
919 141) YH-920 ==Lyre project==1
920 142) YH-925 ==Packard Bell== 130) Lyre proto 1
921 143) YP-S3 160) Vibe 500 131) Mini2440
924 buildfor=`input`;
927 # Set of tools built for all target platforms:
928 toolset="rdf2binary convbdf codepages"
930 # Toolsets for some target families:
931 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
932 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
933 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
934 ipodbitmaptools="$toolset scramble bmp2rb"
935 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
936 tccbitmaptools="$toolset scramble bmp2rb"
937 # generic is used by IFP, Meizu and Onda
938 genericbitmaptools="$toolset bmp2rb"
939 # scramble is used by all other targets
940 scramblebitmaptools="$genericbitmaptools scramble"
943 # ---- For each target ----
945 # *Variables*
946 # target_id: a unique number identifying this target, IS NOT the menu number.
947 # Just use the currently highest number+1 when you add a new
948 # target.
949 # modelname: short model name used all over to identify this target
950 # memory: number of megabytes of RAM this target has. If the amount can
951 # be selected by the size prompt, let memory be unset here
952 # target: -Ddefine passed to the build commands to make the correct
953 # config-*.h file get included etc
954 # tool: the tool that takes a plain binary and converts that into a
955 # working "firmware" file for your target
956 # output: the final output file name
957 # boottool: the tool that takes a plain binary and generates a bootloader
958 # file for your target (or blank to use $tool)
959 # bootoutput:the final output file name for the bootloader (or blank to use
960 # $output)
961 # appextra: passed to the APPEXTRA variable in the Makefiles.
962 # TODO: add proper explanation
963 # archosrom: used only for Archos targets that build a special flashable .ucl
964 # image.
965 # flash: name of output for flashing, for targets where there's a special
966 # file output for this.
967 # plugins: set to 'yes' to build the plugins. Early development builds can
968 # set this to no in the early stages to have an easier life for a
969 # while
970 # swcodec: set 'yes' on swcodec targets
971 # toolset: lists what particular tools in the tools/ directory that this
972 # target needs to have built prior to building Rockbox
974 # *Functions*
975 # *cc: sets up gcc and compiler options for your target builds. Note
976 # that if you select a simulator build, the compiler selection is
977 # overridden later in the script.
979 case $buildfor in
981 0|archosplayer)
982 target_id=1
983 modelname="archosplayer"
984 target="-DARCHOS_PLAYER"
985 shcc
986 tool="$rootdir/tools/scramble"
987 output="archos.mod"
988 appextra="player:gui"
989 archosrom="$pwd/rombox.ucl"
990 flash="$pwd/rockbox.ucl"
991 plugins="yes"
992 swcodec=""
994 # toolset is the tools within the tools directory that we build for
995 # this particular target.
996 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
998 # Note: the convbdf is present in the toolset just because: 1) the
999 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1000 # build the player simulator
1002 t_cpu="sh"
1003 t_manufacturer="archos"
1004 t_model="player"
1007 1|archosrecorder)
1008 target_id=2
1009 modelname="archosrecorder"
1010 target="-DARCHOS_RECORDER"
1011 shcc
1012 tool="$rootdir/tools/scramble"
1013 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1014 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1015 output="ajbrec.ajz"
1016 appextra="recorder:gui"
1017 #archosrom="$pwd/rombox.ucl"
1018 flash="$pwd/rockbox.ucl"
1019 plugins="yes"
1020 swcodec=""
1021 # toolset is the tools within the tools directory that we build for
1022 # this particular target.
1023 toolset=$archosbitmaptools
1024 t_cpu="sh"
1025 t_manufacturer="archos"
1026 t_model="recorder"
1029 2|archosfmrecorder)
1030 target_id=3
1031 modelname="archosfmrecorder"
1032 target="-DARCHOS_FMRECORDER"
1033 shcc
1034 tool="$rootdir/tools/scramble -fm"
1035 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1036 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1037 output="ajbrec.ajz"
1038 appextra="recorder:gui"
1039 #archosrom="$pwd/rombox.ucl"
1040 flash="$pwd/rockbox.ucl"
1041 plugins="yes"
1042 swcodec=""
1043 # toolset is the tools within the tools directory that we build for
1044 # this particular target.
1045 toolset=$archosbitmaptools
1046 t_cpu="sh"
1047 t_manufacturer="archos"
1048 t_model="fm_v2"
1051 3|archosrecorderv2)
1052 target_id=4
1053 modelname="archosrecorderv2"
1054 target="-DARCHOS_RECORDERV2"
1055 shcc
1056 tool="$rootdir/tools/scramble -v2"
1057 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1058 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1059 output="ajbrec.ajz"
1060 appextra="recorder:gui"
1061 #archosrom="$pwd/rombox.ucl"
1062 flash="$pwd/rockbox.ucl"
1063 plugins="yes"
1064 swcodec=""
1065 # toolset is the tools within the tools directory that we build for
1066 # this particular target.
1067 toolset=$archosbitmaptools
1068 t_cpu="sh"
1069 t_manufacturer="archos"
1070 t_model="fm_v2"
1073 4|archosondiosp)
1074 target_id=7
1075 modelname="archosondiosp"
1076 target="-DARCHOS_ONDIOSP"
1077 shcc
1078 tool="$rootdir/tools/scramble -osp"
1079 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1080 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1081 output="ajbrec.ajz"
1082 appextra="recorder:gui"
1083 #archosrom="$pwd/rombox.ucl"
1084 flash="$pwd/rockbox.ucl"
1085 plugins="yes"
1086 swcodec=""
1087 # toolset is the tools within the tools directory that we build for
1088 # this particular target.
1089 toolset=$archosbitmaptools
1090 t_cpu="sh"
1091 t_manufacturer="archos"
1092 t_model="ondio"
1095 5|archosondiofm)
1096 target_id=8
1097 modelname="archosondiofm"
1098 target="-DARCHOS_ONDIOFM"
1099 shcc
1100 tool="$rootdir/tools/scramble -ofm"
1101 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1102 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1103 output="ajbrec.ajz"
1104 appextra="recorder:gui"
1105 #archosrom="$pwd/rombox.ucl"
1106 flash="$pwd/rockbox.ucl"
1107 plugins="yes"
1108 swcodec=""
1109 toolset=$archosbitmaptools
1110 t_cpu="sh"
1111 t_manufacturer="archos"
1112 t_model="ondio"
1115 6|archosav300)
1116 target_id=38
1117 modelname="archosav300"
1118 target="-DARCHOS_AV300"
1119 memory=16 # always
1120 arm7tdmicc
1121 tool="$rootdir/tools/scramble -mm=C"
1122 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1123 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1124 output="cjbm.ajz"
1125 appextra="recorder:gui"
1126 plugins="yes"
1127 swcodec=""
1128 # toolset is the tools within the tools directory that we build for
1129 # this particular target.
1130 toolset="$toolset scramble descramble bmp2rb"
1131 # architecture, manufacturer and model for the target-tree build
1132 t_cpu="arm"
1133 t_manufacturer="archos"
1134 t_model="av300"
1137 10|iriverh120)
1138 target_id=9
1139 modelname="iriverh120"
1140 target="-DIRIVER_H120"
1141 memory=32 # always
1142 coldfirecc
1143 tool="$rootdir/tools/scramble -add=h120"
1144 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1145 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1146 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1147 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1148 output="rockbox.iriver"
1149 bootoutput="bootloader.iriver"
1150 appextra="recorder:gui"
1151 flash="$pwd/rombox.iriver"
1152 plugins="yes"
1153 swcodec="yes"
1154 # toolset is the tools within the tools directory that we build for
1155 # this particular target.
1156 toolset=$iriverbitmaptools
1157 t_cpu="coldfire"
1158 t_manufacturer="iriver"
1159 t_model="h100"
1162 11|iriverh300)
1163 target_id=10
1164 modelname="iriverh300"
1165 target="-DIRIVER_H300"
1166 memory=32 # always
1167 coldfirecc
1168 tool="$rootdir/tools/scramble -add=h300"
1169 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1170 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1171 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1172 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1173 output="rockbox.iriver"
1174 appextra="recorder:gui"
1175 plugins="yes"
1176 swcodec="yes"
1177 # toolset is the tools within the tools directory that we build for
1178 # this particular target.
1179 toolset=$iriverbitmaptools
1180 t_cpu="coldfire"
1181 t_manufacturer="iriver"
1182 t_model="h300"
1185 12|iriverh100)
1186 target_id=11
1187 modelname="iriverh100"
1188 target="-DIRIVER_H100"
1189 memory=16 # always
1190 coldfirecc
1191 tool="$rootdir/tools/scramble -add=h100"
1192 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1193 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1194 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1195 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1196 output="rockbox.iriver"
1197 bootoutput="bootloader.iriver"
1198 appextra="recorder:gui"
1199 flash="$pwd/rombox.iriver"
1200 plugins="yes"
1201 swcodec="yes"
1202 # toolset is the tools within the tools directory that we build for
1203 # this particular target.
1204 toolset=$iriverbitmaptools
1205 t_cpu="coldfire"
1206 t_manufacturer="iriver"
1207 t_model="h100"
1210 13|iriverifp7xx)
1211 target_id=19
1212 modelname="iriverifp7xx"
1213 target="-DIRIVER_IFP7XX"
1214 memory=1
1215 arm7tdmicc short
1216 tool="cp"
1217 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1218 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1219 output="rockbox.wma"
1220 appextra="recorder:gui"
1221 plugins="yes"
1222 swcodec="yes"
1223 # toolset is the tools within the tools directory that we build for
1224 # this particular target.
1225 toolset=$genericbitmaptools
1226 t_cpu="arm"
1227 t_manufacturer="pnx0101"
1228 t_model="iriver-ifp7xx"
1231 14|iriverh10)
1232 target_id=22
1233 modelname="iriverh10"
1234 target="-DIRIVER_H10"
1235 memory=32 # always
1236 arm7tdmicc
1237 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -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 -mi4v3 -model=h10 -type=RBBL"
1245 bootoutput="H10_20GC.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 15|iriverh10_5gb)
1256 target_id=24
1257 modelname="iriverh10_5gb"
1258 target="-DIRIVER_H10_5GB"
1259 memory=32 # always
1260 arm7tdmicc
1261 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1262 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1263 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1264 output="rockbox.mi4"
1265 appextra="recorder:gui"
1266 plugins="yes"
1267 swcodec="yes"
1268 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1269 bootoutput="H10.mi4"
1270 # toolset is the tools within the tools directory that we build for
1271 # this particular target.
1272 toolset=$scramblebitmaptools
1273 # architecture, manufacturer and model for the target-tree build
1274 t_cpu="arm"
1275 t_manufacturer="iriver"
1276 t_model="h10"
1279 20|ipodcolor)
1280 target_id=13
1281 modelname="ipodcolor"
1282 target="-DIPOD_COLOR"
1283 memory=32 # always
1284 arm7tdmicc
1285 tool="$rootdir/tools/scramble -add=ipco"
1286 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1287 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1288 output="rockbox.ipod"
1289 appextra="recorder:gui"
1290 plugins="yes"
1291 swcodec="yes"
1292 bootoutput="bootloader-$modelname.ipod"
1293 # toolset is the tools within the tools directory that we build for
1294 # this particular target.
1295 toolset=$ipodbitmaptools
1296 # architecture, manufacturer and model for the target-tree build
1297 t_cpu="arm"
1298 t_manufacturer="ipod"
1299 t_model="color"
1302 21|ipodnano1g)
1303 target_id=14
1304 modelname="ipodnano1g"
1305 target="-DIPOD_NANO"
1306 memory=32 # always
1307 arm7tdmicc
1308 tool="$rootdir/tools/scramble -add=nano"
1309 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1310 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1311 output="rockbox.ipod"
1312 appextra="recorder:gui"
1313 plugins="yes"
1314 swcodec="yes"
1315 bootoutput="bootloader-$modelname.ipod"
1316 # toolset is the tools within the tools directory that we build for
1317 # this particular target.
1318 toolset=$ipodbitmaptools
1319 # architecture, manufacturer and model for the target-tree build
1320 t_cpu="arm"
1321 t_manufacturer="ipod"
1322 t_model="nano"
1325 22|ipodvideo)
1326 target_id=15
1327 modelname="ipodvideo"
1328 target="-DIPOD_VIDEO"
1329 arm7tdmicc
1330 tool="$rootdir/tools/scramble -add=ipvd"
1331 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1332 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1333 output="rockbox.ipod"
1334 appextra="recorder:gui"
1335 plugins="yes"
1336 swcodec="yes"
1337 bootoutput="bootloader-$modelname.ipod"
1338 # toolset is the tools within the tools directory that we build for
1339 # this particular target.
1340 toolset=$ipodbitmaptools
1341 # architecture, manufacturer and model for the target-tree build
1342 t_cpu="arm"
1343 t_manufacturer="ipod"
1344 t_model="video"
1347 23|ipod3g)
1348 target_id=16
1349 modelname="ipod3g"
1350 target="-DIPOD_3G"
1351 memory=32 # always
1352 arm7tdmicc
1353 tool="$rootdir/tools/scramble -add=ip3g"
1354 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1355 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1356 output="rockbox.ipod"
1357 appextra="recorder:gui"
1358 plugins="yes"
1359 swcodec="yes"
1360 bootoutput="bootloader-$modelname.ipod"
1361 # toolset is the tools within the tools directory that we build for
1362 # this particular target.
1363 toolset=$ipodbitmaptools
1364 # architecture, manufacturer and model for the target-tree build
1365 t_cpu="arm"
1366 t_manufacturer="ipod"
1367 t_model="3g"
1370 24|ipod4g)
1371 target_id=17
1372 modelname="ipod4g"
1373 target="-DIPOD_4G"
1374 memory=32 # always
1375 arm7tdmicc
1376 tool="$rootdir/tools/scramble -add=ip4g"
1377 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1378 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1379 output="rockbox.ipod"
1380 appextra="recorder:gui"
1381 plugins="yes"
1382 swcodec="yes"
1383 bootoutput="bootloader-$modelname.ipod"
1384 # toolset is the tools within the tools directory that we build for
1385 # this particular target.
1386 toolset=$ipodbitmaptools
1387 # architecture, manufacturer and model for the target-tree build
1388 t_cpu="arm"
1389 t_manufacturer="ipod"
1390 t_model="4g"
1393 25|ipodmini1g)
1394 target_id=18
1395 modelname="ipodmini1g"
1396 target="-DIPOD_MINI"
1397 memory=32 # always
1398 arm7tdmicc
1399 tool="$rootdir/tools/scramble -add=mini"
1400 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1401 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1402 output="rockbox.ipod"
1403 appextra="recorder:gui"
1404 plugins="yes"
1405 swcodec="yes"
1406 bootoutput="bootloader-$modelname.ipod"
1407 # toolset is the tools within the tools directory that we build for
1408 # this particular target.
1409 toolset=$ipodbitmaptools
1410 # architecture, manufacturer and model for the target-tree build
1411 t_cpu="arm"
1412 t_manufacturer="ipod"
1413 t_model="mini"
1416 26|ipodmini2g)
1417 target_id=21
1418 modelname="ipodmini2g"
1419 target="-DIPOD_MINI2G"
1420 memory=32 # always
1421 arm7tdmicc
1422 tool="$rootdir/tools/scramble -add=mn2g"
1423 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1424 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1425 output="rockbox.ipod"
1426 appextra="recorder:gui"
1427 plugins="yes"
1428 swcodec="yes"
1429 bootoutput="bootloader-$modelname.ipod"
1430 # toolset is the tools within the tools directory that we build for
1431 # this particular target.
1432 toolset=$ipodbitmaptools
1433 # architecture, manufacturer and model for the target-tree build
1434 t_cpu="arm"
1435 t_manufacturer="ipod"
1436 t_model="mini2g"
1439 27|ipod1g2g)
1440 target_id=29
1441 modelname="ipod1g2g"
1442 target="-DIPOD_1G2G"
1443 memory=32 # always
1444 arm7tdmicc
1445 tool="$rootdir/tools/scramble -add=1g2g"
1446 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1447 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1448 output="rockbox.ipod"
1449 appextra="recorder:gui"
1450 plugins="yes"
1451 swcodec="yes"
1452 bootoutput="bootloader-$modelname.ipod"
1453 # toolset is the tools within the tools directory that we build for
1454 # this particular target.
1455 toolset=$ipodbitmaptools
1456 # architecture, manufacturer and model for the target-tree build
1457 t_cpu="arm"
1458 t_manufacturer="ipod"
1459 t_model="1g2g"
1462 28|ipodnano2g)
1463 target_id=62
1464 modelname="ipodnano2g"
1465 target="-DIPOD_NANO2G"
1466 memory=32 # always
1467 arm940tcc
1468 tool="$rootdir/tools/scramble -add=nn2g"
1469 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1470 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1471 output="rockbox.ipod"
1472 appextra="recorder:gui"
1473 plugins="yes"
1474 swcodec="yes"
1475 bootoutput="bootloader-$modelname.ipod"
1476 # toolset is the tools within the tools directory that we build for
1477 # this particular target.
1478 toolset=$ipodbitmaptools
1479 # architecture, manufacturer and model for the target-tree build
1480 t_cpu="arm"
1481 t_manufacturer="s5l8700"
1482 t_model="ipodnano2g"
1485 30|iaudiox5)
1486 target_id=12
1487 modelname="iaudiox5"
1488 target="-DIAUDIO_X5"
1489 memory=16 # always
1490 coldfirecc
1491 tool="$rootdir/tools/scramble -add=iax5"
1492 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1493 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
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="x5"
1509 31|iaudiom5)
1510 target_id=28
1511 modelname="iaudiom5"
1512 target="-DIAUDIO_M5"
1513 memory=16 # always
1514 coldfirecc
1515 tool="$rootdir/tools/scramble -add=iam5"
1516 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1517 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1518 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1519 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1520 output="rockbox.iaudio"
1521 appextra="recorder:gui"
1522 plugins="yes"
1523 swcodec="yes"
1524 # toolset is the tools within the tools directory that we build for
1525 # this particular target.
1526 toolset="$iaudiobitmaptools"
1527 # architecture, manufacturer and model for the target-tree build
1528 t_cpu="coldfire"
1529 t_manufacturer="iaudio"
1530 t_model="m5"
1533 32|iaudio7)
1534 target_id=32
1535 modelname="iaudio7"
1536 target="-DIAUDIO_7"
1537 memory=16 # always
1538 arm946cc
1539 tool="$rootdir/tools/scramble -add=i7"
1540 boottool="$rootdir/tools/scramble -tcc=crc"
1541 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1542 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1543 output="rockbox.iaudio"
1544 appextra="recorder:gui"
1545 plugins="yes"
1546 swcodec="yes"
1547 bootoutput="I7_FW.BIN"
1548 # toolset is the tools within the tools directory that we build for
1549 # this particular target.
1550 toolset="$tccbitmaptools"
1551 # architecture, manufacturer and model for the target-tree build
1552 t_cpu="arm"
1553 t_manufacturer="tcc77x"
1554 t_model="iaudio7"
1557 33|cowond2)
1558 target_id=34
1559 modelname="cowond2"
1560 target="-DCOWON_D2"
1561 memory=32
1562 arm926ejscc
1563 tool="$rootdir/tools/scramble -add=d2"
1564 boottool="cp "
1565 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1566 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1567 output="rockbox.d2"
1568 bootoutput="bootloader-cowond2.bin"
1569 appextra="recorder:gui"
1570 plugins="yes"
1571 swcodec="yes"
1572 toolset="$tccbitmaptools"
1573 # architecture, manufacturer and model for the target-tree build
1574 t_cpu="arm"
1575 t_manufacturer="tcc780x"
1576 t_model="cowond2"
1579 34|iaudiom3)
1580 target_id=37
1581 modelname="iaudiom3"
1582 target="-DIAUDIO_M3"
1583 memory=16 # always
1584 coldfirecc
1585 tool="$rootdir/tools/scramble -add=iam3"
1586 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1587 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1588 output="rockbox.iaudio"
1589 appextra="recorder:gui"
1590 plugins="yes"
1591 swcodec="yes"
1592 # toolset is the tools within the tools directory that we build for
1593 # this particular target.
1594 toolset="$iaudiobitmaptools"
1595 # architecture, manufacturer and model for the target-tree build
1596 t_cpu="coldfire"
1597 t_manufacturer="iaudio"
1598 t_model="m3"
1601 40|gigabeatfx)
1602 target_id=20
1603 modelname="gigabeatfx"
1604 target="-DGIGABEAT_F"
1605 memory=32 # always
1606 arm9tdmicc
1607 tool="$rootdir/tools/scramble -add=giga"
1608 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1609 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1610 output="rockbox.gigabeat"
1611 appextra="recorder:gui"
1612 plugins="yes"
1613 swcodec="yes"
1614 toolset=$gigabeatbitmaptools
1615 boottool="$rootdir/tools/scramble -gigabeat"
1616 bootoutput="FWIMG01.DAT"
1617 # architecture, manufacturer and model for the target-tree build
1618 t_cpu="arm"
1619 t_manufacturer="s3c2440"
1620 t_model="gigabeat-fx"
1623 41|gigabeats)
1624 target_id=26
1625 modelname="gigabeats"
1626 target="-DGIGABEAT_S"
1627 memory=64
1628 arm1136jfscc
1629 tool="$rootdir/tools/scramble -add=gigs"
1630 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1631 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1632 output="rockbox.gigabeat"
1633 appextra="recorder:gui"
1634 plugins="yes"
1635 swcodec="yes"
1636 toolset="$gigabeatbitmaptools"
1637 boottool="$rootdir/tools/scramble -gigabeats"
1638 bootoutput="nk.bin"
1639 # architecture, manufacturer and model for the target-tree build
1640 t_cpu="arm"
1641 t_manufacturer="imx31"
1642 t_model="gigabeat-s"
1645 70|mrobe500)
1646 target_id=36
1647 modelname="mrobe500"
1648 target="-DMROBE_500"
1649 memory=64 # always
1650 arm926ejscc
1651 tool="$rootdir/tools/scramble -add=m500"
1652 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1653 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1654 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1655 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1656 output="rockbox.mrobe500"
1657 appextra="recorder:gui"
1658 plugins="yes"
1659 swcodec="yes"
1660 toolset=$gigabeatbitmaptools
1661 boottool="cp "
1662 bootoutput="rockbox.mrboot"
1663 # architecture, manufacturer and model for the target-tree build
1664 t_cpu="arm"
1665 t_manufacturer="tms320dm320"
1666 t_model="mrobe-500"
1669 71|mrobe100)
1670 target_id=33
1671 modelname="mrobe100"
1672 target="-DMROBE_100"
1673 memory=32 # always
1674 arm7tdmicc
1675 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1676 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1677 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1678 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1679 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1680 output="rockbox.mi4"
1681 appextra="recorder:gui"
1682 plugins="yes"
1683 swcodec="yes"
1684 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1685 bootoutput="pp5020.mi4"
1686 # toolset is the tools within the tools directory that we build for
1687 # this particular target.
1688 toolset=$scramblebitmaptools
1689 # architecture, manufacturer and model for the target-tree build
1690 t_cpu="arm"
1691 t_manufacturer="olympus"
1692 t_model="mrobe-100"
1695 80|logikdax)
1696 target_id=31
1697 modelname="logikdax"
1698 target="-DLOGIK_DAX"
1699 memory=2 # always
1700 arm946cc
1701 tool="$rootdir/tools/scramble -add=ldax"
1702 boottool="$rootdir/tools/scramble -tcc=crc"
1703 bootoutput="player.rom"
1704 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1705 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1706 output="rockbox.logik"
1707 appextra="recorder:gui"
1708 plugins=""
1709 swcodec="yes"
1710 # toolset is the tools within the tools directory that we build for
1711 # this particular target.
1712 toolset=$tccbitmaptools
1713 # architecture, manufacturer and model for the target-tree build
1714 t_cpu="arm"
1715 t_manufacturer="tcc77x"
1716 t_model="logikdax"
1719 90|zenvisionm30gb)
1720 target_id=35
1721 modelname="zenvisionm30gb"
1722 target="-DCREATIVE_ZVM"
1723 memory=64
1724 arm926ejscc
1725 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1726 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1727 tool="$rootdir/tools/scramble -creative=zvm"
1728 USE_ELF="yes"
1729 output="rockbox.zvm"
1730 appextra="recorder:gui"
1731 plugins="yes"
1732 swcodec="yes"
1733 toolset=$ipodbitmaptools
1734 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1735 bootoutput="rockbox.zvmboot"
1736 # architecture, manufacturer and model for the target-tree build
1737 t_cpu="arm"
1738 t_manufacturer="tms320dm320"
1739 t_model="creative-zvm"
1742 91|zenvisionm60gb)
1743 target_id=40
1744 modelname="zenvisionm60gb"
1745 target="-DCREATIVE_ZVM60GB"
1746 memory=64
1747 arm926ejscc
1748 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1749 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1750 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1751 USE_ELF="yes"
1752 output="rockbox.zvm60"
1753 appextra="recorder:gui"
1754 plugins="yes"
1755 swcodec="yes"
1756 toolset=$ipodbitmaptools
1757 boottool="$rootdir/tools/scramble -creative=zvm60"
1758 bootoutput="rockbox.zvm60boot"
1759 # architecture, manufacturer and model for the target-tree build
1760 t_cpu="arm"
1761 t_manufacturer="tms320dm320"
1762 t_model="creative-zvm"
1765 92|zenvision)
1766 target_id=39
1767 modelname="zenvision"
1768 target="-DCREATIVE_ZV"
1769 memory=64
1770 arm926ejscc
1771 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1772 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1773 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1774 USE_ELF="yes"
1775 output="rockbox.zv"
1776 appextra="recorder:gui"
1777 plugins=""
1778 swcodec="yes"
1779 toolset=$ipodbitmaptools
1780 boottool="$rootdir/tools/scramble -creative=zenvision"
1781 bootoutput="rockbox.zvboot"
1782 # architecture, manufacturer and model for the target-tree build
1783 t_cpu="arm"
1784 t_manufacturer="tms320dm320"
1785 t_model="creative-zvm"
1788 50|sansae200)
1789 target_id=23
1790 modelname="sansae200"
1791 target="-DSANSA_E200"
1792 memory=32 # supposedly
1793 arm7tdmicc
1794 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1795 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1796 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1797 output="rockbox.mi4"
1798 appextra="recorder:gui"
1799 plugins="yes"
1800 swcodec="yes"
1801 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1802 bootoutput="PP5022.mi4"
1803 # toolset is the tools within the tools directory that we build for
1804 # this particular target.
1805 toolset=$scramblebitmaptools
1806 # architecture, manufacturer and model for the target-tree build
1807 t_cpu="arm"
1808 t_manufacturer="sandisk"
1809 t_model="sansa-e200"
1812 51|sansae200r)
1813 # the e200R model is pretty much identical to the e200, it only has a
1814 # different option to the scramble tool when building a bootloader and
1815 # makes the bootloader output file name in all lower case.
1816 target_id=27
1817 modelname="sansae200r"
1818 target="-DSANSA_E200"
1819 memory=32 # supposedly
1820 arm7tdmicc
1821 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -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 -mi4r -model=e20r -type=RBBL"
1829 bootoutput="pp5022.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-e200"
1839 52|sansac200)
1840 target_id=30
1841 modelname="sansac200"
1842 target="-DSANSA_C200"
1843 memory=32 # supposedly
1844 arm7tdmicc
1845 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1846 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1847 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1848 output="rockbox.mi4"
1849 appextra="recorder:gui"
1850 plugins="yes"
1851 swcodec="yes"
1852 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1853 bootoutput="firmware.mi4"
1854 # toolset is the tools within the tools directory that we build for
1855 # this particular target.
1856 toolset=$scramblebitmaptools
1857 # architecture, manufacturer and model for the target-tree build
1858 t_cpu="arm"
1859 t_manufacturer="sandisk"
1860 t_model="sansa-c200"
1863 53|sansam200)
1864 target_id=48
1865 modelname="sansam200"
1866 target="-DSANSA_M200"
1867 memory=1 # always
1868 arm946cc
1869 tool="$rootdir/tools/scramble -add=m200"
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 0"
1874 output="rockbox.m200"
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="m200"
1887 54|sansac100)
1888 target_id=42
1889 modelname="sansac100"
1890 target="-DSANSA_C100"
1891 memory=2
1892 arm946cc
1893 tool="$rootdir/tools/scramble -add=c100"
1894 boottool="$rootdir/tools/scramble -tcc=crc"
1895 bootoutput="player.rom"
1896 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1897 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1898 output="rockbox.c100"
1899 appextra="recorder:gui"
1900 plugins=""
1901 swcodec="yes"
1902 # toolset is the tools within the tools directory that we build for
1903 # this particular target.
1904 toolset=$tccbitmaptools
1905 # architecture, manufacturer and model for the target-tree build
1906 t_cpu="arm"
1907 t_manufacturer="tcc77x"
1908 t_model="c100"
1911 55|sansaclip)
1912 target_id=50
1913 modelname="sansaclip"
1914 target="-DSANSA_CLIP"
1915 memory=2
1916 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1917 bmp2rb_native="$bmp2rb_mono"
1918 tool="$rootdir/tools/scramble -add=clip"
1919 output="rockbox.sansa"
1920 bootoutput="bootloader-clip.sansa"
1921 appextra="recorder:gui"
1922 plugins="yes"
1923 swcodec="yes"
1924 toolset=$scramblebitmaptools
1925 t_cpu="arm"
1926 t_manufacturer="as3525"
1927 t_model="sansa-clip"
1928 arm9tdmicc
1932 56|sansae200v2)
1933 target_id=51
1934 modelname="sansae200v2"
1935 target="-DSANSA_E200V2"
1936 memory=8
1937 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1938 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1939 tool="$rootdir/tools/scramble -add=e2v2"
1940 output="rockbox.sansa"
1941 bootoutput="bootloader-e200v2.sansa"
1942 appextra="recorder:gui"
1943 plugins="yes"
1944 swcodec="yes"
1945 toolset=$scramblebitmaptools
1946 t_cpu="arm"
1947 t_manufacturer="as3525"
1948 t_model="sansa-e200v2"
1949 arm9tdmicc
1953 57|sansam200v4)
1954 target_id=52
1955 modelname="sansam200v4"
1956 target="-DSANSA_M200V4"
1957 memory=2
1958 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1959 bmp2rb_native="$bmp2rb_mono"
1960 tool="$rootdir/tools/scramble -add=m2v4"
1961 output="rockbox.sansa"
1962 bootoutput="bootloader-m200v4.sansa"
1963 appextra="recorder:gui"
1964 plugins="yes"
1965 swcodec="yes"
1966 toolset=$scramblebitmaptools
1967 t_cpu="arm"
1968 t_manufacturer="as3525"
1969 t_model="sansa-m200v4"
1970 arm9tdmicc
1974 58|sansafuze)
1975 target_id=53
1976 modelname="sansafuze"
1977 target="-DSANSA_FUZE"
1978 memory=8
1979 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1980 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1981 tool="$rootdir/tools/scramble -add=fuze"
1982 output="rockbox.sansa"
1983 bootoutput="bootloader-fuze.sansa"
1984 appextra="recorder:gui"
1985 plugins="yes"
1986 swcodec="yes"
1987 toolset=$scramblebitmaptools
1988 t_cpu="arm"
1989 t_manufacturer="as3525"
1990 t_model="sansa-fuze"
1991 arm9tdmicc
1995 59|sansac200v2)
1996 target_id=55
1997 modelname="sansac200v2"
1998 target="-DSANSA_C200V2"
1999 memory=2 # as per OF diagnosis mode
2000 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2001 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2002 tool="$rootdir/tools/scramble -add=c2v2"
2003 output="rockbox.sansa"
2004 bootoutput="bootloader-c200v2.sansa"
2005 appextra="recorder:gui"
2006 plugins="yes"
2007 swcodec="yes"
2008 # toolset is the tools within the tools directory that we build for
2009 # this particular target.
2010 toolset=$scramblebitmaptools
2011 # architecture, manufacturer and model for the target-tree build
2012 t_cpu="arm"
2013 t_manufacturer="as3525"
2014 t_model="sansa-c200v2"
2015 arm9tdmicc
2018 60|sansaclipv2)
2019 target_id=60
2020 modelname="sansaclipv2"
2021 target="-DSANSA_CLIPV2"
2022 memory=8
2023 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2024 bmp2rb_native="$bmp2rb_mono"
2025 tool="$rootdir/tools/scramble -add=clv2"
2026 output="rockbox.sansa"
2027 bootoutput="bootloader-clipv2.sansa"
2028 appextra="recorder:gui"
2029 plugins="yes"
2030 swcodec="yes"
2031 toolset=$scramblebitmaptools
2032 t_cpu="arm"
2033 t_manufacturer="as3525"
2034 t_model="sansa-clipv2"
2035 arm926ejscc
2038 61|sansaview)
2039 echo "Sansa View is not yet supported!"
2040 exit 1
2041 target_id=63
2042 modelname="sansaview"
2043 target="-DSANSA_VIEW"
2044 memory=32
2045 arm1176jzscc
2046 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2047 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2048 output="rockbox.mi4"
2049 appextra="gui"
2050 plugins=""
2051 swcodec="yes"
2052 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2053 bootoutput="firmware.mi4"
2054 # toolset is the tools within the tools directory that we build for
2055 # this particular target.
2056 toolset=$scramblebitmaptools
2057 t_cpu="arm"
2058 t_manufacturer="sandisk"
2059 t_model="sansa-view"
2062 62|sansaclipplus)
2063 target_id=66
2064 modelname="sansaclipplus"
2065 target="-DSANSA_CLIPPLUS"
2066 memory=8
2067 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2068 bmp2rb_native="$bmp2rb_mono"
2069 tool="$rootdir/tools/scramble -add=cli+"
2070 output="rockbox.sansa"
2071 bootoutput="bootloader-clipplus.sansa"
2072 appextra="recorder:gui"
2073 plugins="yes"
2074 swcodec="yes"
2075 toolset=$scramblebitmaptools
2076 t_cpu="arm"
2077 t_manufacturer="as3525"
2078 t_model="sansa-clipplus"
2079 arm926ejscc
2082 63|sansafuzev2)
2083 target_id=68
2084 modelname="sansafuzev2"
2085 target="-DSANSA_FUZEV2"
2086 memory=8 # not sure
2087 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2088 bmp2rb_native="$bmp2rb_mono"
2089 tool="$rootdir/tools/scramble -add=fuz2"
2090 output="rockbox.sansa"
2091 bootoutput="bootloader-fuzev2.sansa"
2092 appextra="recorder:gui"
2093 plugins=#"yes"
2094 swcodec="yes"
2095 toolset=$scramblebitmaptools
2096 t_cpu="arm"
2097 t_manufacturer="as3525"
2098 t_model="sansa-fuzev2"
2099 arm926ejscc
2102 150|tatungtpj1022)
2103 target_id=25
2104 modelname="tatungtpj1022"
2105 target="-DTATUNG_TPJ1022"
2106 memory=32 # always
2107 arm7tdmicc
2108 tool="$rootdir/tools/scramble -add tpj2"
2109 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2110 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2111 output="rockbox.elio"
2112 appextra="recorder:gui"
2113 plugins="yes"
2114 swcodec="yes"
2115 boottool="$rootdir/tools/scramble -mi4v2"
2116 bootoutput="pp5020.mi4"
2117 # toolset is the tools within the tools directory that we build for
2118 # this particular target.
2119 toolset=$scramblebitmaptools
2120 # architecture, manufacturer and model for the target-tree build
2121 t_cpu="arm"
2122 t_manufacturer="tatung"
2123 t_model="tpj1022"
2126 100|gogearsa9200)
2127 target_id=41
2128 modelname="gogearsa9200"
2129 target="-DPHILIPS_SA9200"
2130 memory=32 # supposedly
2131 arm7tdmicc
2132 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2133 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2134 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2135 output="rockbox.mi4"
2136 appextra="recorder:gui"
2137 plugins=""
2138 swcodec="yes"
2139 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2140 bootoutput="FWImage.ebn"
2141 # toolset is the tools within the tools directory that we build for
2142 # this particular target.
2143 toolset=$scramblebitmaptools
2144 # architecture, manufacturer and model for the target-tree build
2145 t_cpu="arm"
2146 t_manufacturer="philips"
2147 t_model="sa9200"
2150 101|gogearhdd1630)
2151 target_id=43
2152 modelname="gogearhdd1630"
2153 target="-DPHILIPS_HDD1630"
2154 memory=32 # supposedly
2155 arm7tdmicc
2156 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2157 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2158 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2159 output="rockbox.mi4"
2160 appextra="recorder:gui"
2161 plugins="yes"
2162 swcodec="yes"
2163 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2164 bootoutput="FWImage.ebn"
2165 # toolset is the tools within the tools directory that we build for
2166 # this particular target.
2167 toolset=$scramblebitmaptools
2168 # architecture, manufacturer and model for the target-tree build
2169 t_cpu="arm"
2170 t_manufacturer="philips"
2171 t_model="hdd1630"
2174 102|gogearhdd6330)
2175 target_id=65
2176 modelname="gogearhdd6330"
2177 target="-DPHILIPS_HDD6330"
2178 memory=32 # supposedly
2179 arm7tdmicc
2180 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2181 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2182 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2183 output="rockbox.mi4"
2184 appextra="recorder:gui"
2185 plugins=""
2186 swcodec="yes"
2187 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2188 bootoutput="FWImage.ebn"
2189 # toolset is the tools within the tools directory that we build for
2190 # this particular target.
2191 toolset=$scramblebitmaptools
2192 # architecture, manufacturer and model for the target-tree build
2193 t_cpu="arm"
2194 t_manufacturer="philips"
2195 t_model="hdd6330"
2198 110|meizum6sl)
2199 target_id=49
2200 modelname="meizum6sl"
2201 target="-DMEIZU_M6SL"
2202 memory=16 # always
2203 arm940tbecc
2204 tool="cp"
2205 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2206 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2207 output="rockbox.meizu"
2208 appextra="recorder:gui"
2209 plugins="no" #FIXME
2210 swcodec="yes"
2211 toolset=$genericbitmaptools
2212 boottool="cp"
2213 bootoutput="rockboot.ebn"
2214 # architecture, manufacturer and model for the target-tree build
2215 t_cpu="arm"
2216 t_manufacturer="s5l8700"
2217 t_model="meizu-m6sl"
2220 111|meizum6sp)
2221 target_id=46
2222 modelname="meizum6sp"
2223 target="-DMEIZU_M6SP"
2224 memory=16 # always
2225 arm940tbecc
2226 tool="cp"
2227 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2228 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2229 output="rockbox.meizu"
2230 appextra="recorder:gui"
2231 plugins="no" #FIXME
2232 swcodec="yes"
2233 toolset=$genericbitmaptools
2234 boottool="cp"
2235 bootoutput="rockboot.ebn"
2236 # architecture, manufacturer and model for the target-tree build
2237 t_cpu="arm"
2238 t_manufacturer="s5l8700"
2239 t_model="meizu-m6sp"
2242 112|meizum3)
2243 target_id=47
2244 modelname="meizum3"
2245 target="-DMEIZU_M3"
2246 memory=16 # always
2247 arm940tbecc
2248 tool="cp"
2249 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2250 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2251 output="rockbox.meizu"
2252 appextra="recorder:gui"
2253 plugins="no" #FIXME
2254 swcodec="yes"
2255 toolset=$genericbitmaptools
2256 boottool="cp"
2257 bootoutput="rockboot.ebn"
2258 # architecture, manufacturer and model for the target-tree build
2259 t_cpu="arm"
2260 t_manufacturer="s5l8700"
2261 t_model="meizu-m3"
2264 120|ondavx747)
2265 target_id=45
2266 modelname="ondavx747"
2267 target="-DONDA_VX747"
2268 memory=16
2269 mipselcc
2270 tool="$rootdir/tools/scramble -add=x747"
2271 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2272 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2273 output="rockbox.vx747"
2274 appextra="recorder:gui"
2275 plugins="yes"
2276 swcodec="yes"
2277 toolset=$genericbitmaptools
2278 boottool="$rootdir/tools/scramble -ccpmp"
2279 bootoutput="ccpmp.bin"
2280 # architecture, manufacturer and model for the target-tree build
2281 t_cpu="mips"
2282 t_manufacturer="ingenic_jz47xx"
2283 t_model="onda_vx747"
2286 121|ondavx767)
2287 target_id=64
2288 modelname="ondavx767"
2289 target="-DONDA_VX767"
2290 memory=16 #FIXME
2291 mipselcc
2292 tool="cp"
2293 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2294 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2295 output="rockbox.vx767"
2296 appextra="recorder:gui"
2297 plugins="" #FIXME
2298 swcodec="yes"
2299 toolset=$genericbitmaptools
2300 boottool="$rootdir/tools/scramble -ccpmp"
2301 bootoutput="ccpmp.bin"
2302 # architecture, manufacturer and model for the target-tree build
2303 t_cpu="mips"
2304 t_manufacturer="ingenic_jz47xx"
2305 t_model="onda_vx767"
2308 122|ondavx747p)
2309 target_id=54
2310 modelname="ondavx747p"
2311 target="-DONDA_VX747P"
2312 memory=16
2313 mipselcc
2314 tool="$rootdir/tools/scramble -add=747p"
2315 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2316 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2317 output="rockbox.vx747p"
2318 appextra="recorder:gui"
2319 plugins="yes"
2320 swcodec="yes"
2321 toolset=$genericbitmaptools
2322 boottool="$rootdir/tools/scramble -ccpmp"
2323 bootoutput="ccpmp.bin"
2324 # architecture, manufacturer and model for the target-tree build
2325 t_cpu="mips"
2326 t_manufacturer="ingenic_jz47xx"
2327 t_model="onda_vx747"
2330 123|ondavx777)
2331 target_id=61
2332 modelname="ondavx777"
2333 target="-DONDA_VX777"
2334 memory=16
2335 mipselcc
2336 tool="$rootdir/tools/scramble -add=x777"
2337 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2338 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2339 output="rockbox.vx777"
2340 appextra="recorder:gui"
2341 plugins="yes"
2342 swcodec="yes"
2343 toolset=$genericbitmaptools
2344 boottool="$rootdir/tools/scramble -ccpmp"
2345 bootoutput="ccpmp.bin"
2346 # architecture, manufacturer and model for the target-tree build
2347 t_cpu="mips"
2348 t_manufacturer="ingenic_jz47xx"
2349 t_model="onda_vx747"
2352 130|lyreproto1)
2353 target_id=56
2354 modelname="lyreproto1"
2355 target="-DLYRE_PROTO1"
2356 memory=64
2357 arm926ejscc
2358 tool="cp"
2359 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2360 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2361 output="rockbox.lyre"
2362 appextra="recorder:gui"
2363 plugins=""
2364 swcodec="yes"
2365 toolset=$scramblebitmaptools
2366 boottool="cp"
2367 bootoutput="bootloader-proto1.lyre"
2368 # architecture, manufacturer and model for the target-tree build
2369 t_cpu="arm"
2370 t_manufacturer="at91sam"
2371 t_model="lyre_proto1"
2374 131|mini2440)
2375 target_id=99
2376 modelname="mini2440"
2377 target="-DMINI2440"
2378 memory=64
2379 arm9tdmicc
2380 tool="$rootdir/tools/scramble -add=m244"
2381 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2382 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2383 output="rockbox.mini2440"
2384 appextra="recorder:gui"
2385 plugins=""
2386 swcodec="yes"
2387 toolset=$scramblebitmaptools
2388 boottool="cp"
2389 bootoutput="bootloader-mini2440.lyre"
2390 # architecture, manufacturer and model for the target-tree build
2391 t_cpu="arm"
2392 t_manufacturer="s3c2440"
2393 t_model="mini2440"
2396 140|samsungyh820)
2397 target_id=57
2398 modelname="samsungyh820"
2399 target="-DSAMSUNG_YH820"
2400 memory=32 # always
2401 arm7tdmicc
2402 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2403 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2404 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2405 output="rockbox.mi4"
2406 appextra="recorder:gui"
2407 plugins="yes"
2408 swcodec="yes"
2409 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2410 bootoutput="FW_YH820.mi4"
2411 # toolset is the tools within the tools directory that we build for
2412 # this particular target.
2413 toolset=$scramblebitmaptools
2414 # architecture, manufacturer and model for the target-tree build
2415 t_cpu="arm"
2416 t_manufacturer="samsung"
2417 t_model="yh820"
2420 141|samsungyh920)
2421 target_id=58
2422 modelname="samsungyh920"
2423 target="-DSAMSUNG_YH920"
2424 memory=32 # always
2425 arm7tdmicc
2426 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2427 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2428 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2429 output="rockbox.mi4"
2430 appextra="recorder:gui"
2431 plugins="yes"
2432 swcodec="yes"
2433 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2434 bootoutput="PP5020.mi4"
2435 # toolset is the tools within the tools directory that we build for
2436 # this particular target.
2437 toolset=$scramblebitmaptools
2438 # architecture, manufacturer and model for the target-tree build
2439 t_cpu="arm"
2440 t_manufacturer="samsung"
2441 t_model="yh920"
2444 142|samsungyh925)
2445 target_id=59
2446 modelname="samsungyh925"
2447 target="-DSAMSUNG_YH925"
2448 memory=32 # always
2449 arm7tdmicc
2450 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2451 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2452 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2453 output="rockbox.mi4"
2454 appextra="recorder:gui"
2455 plugins="yes"
2456 swcodec="yes"
2457 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2458 bootoutput="FW_YH925.mi4"
2459 # toolset is the tools within the tools directory that we build for
2460 # this particular target.
2461 toolset=$scramblebitmaptools
2462 # architecture, manufacturer and model for the target-tree build
2463 t_cpu="arm"
2464 t_manufacturer="samsung"
2465 t_model="yh925"
2468 143|samsungyps3)
2469 target_id=60
2470 modelname="samsungyps3"
2471 target="-DSAMSUNG_YPS3"
2472 memory=16 # always
2473 arm940tbecc
2474 tool="cp"
2475 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2476 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2477 output="rockbox.yps3"
2478 appextra="recorder:gui"
2479 plugins="no" #FIXME
2480 swcodec="yes"
2481 toolset=$genericbitmaptools
2482 boottool="cp"
2483 bootoutput="rockboot.ebn"
2484 # architecture, manufacturer and model for the target-tree build
2485 t_cpu="arm"
2486 t_manufacturer="s5l8700"
2487 t_model="yps3"
2490 160|vibe500)
2491 target_id=67
2492 modelname="vibe500"
2493 target="-DPBELL_VIBE500"
2494 memory=32 # always
2495 arm7tdmicc
2496 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2497 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2498 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2499 output="jukebox.mi4"
2500 appextra="recorder:gui"
2501 plugins="yes"
2502 swcodec="yes"
2503 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2504 bootoutput="rockbox.mi4"
2505 # toolset is the tools within the tools directory that we build for
2506 # this particular target.
2507 toolset=$scramblebitmaptools
2508 # architecture, manufacturer and model for the target-tree build
2509 t_cpu="arm"
2510 t_manufacturer="pbell"
2511 t_model="vibe500"
2515 echo "Please select a supported target platform!"
2516 exit 7
2519 esac
2521 echo "Platform set to $modelname"
2524 #remove start
2525 ############################################################################
2526 # Amount of memory, for those that can differ. They have $memory unset at
2527 # this point.
2530 if [ -z "$memory" ]; then
2531 case $target_id in
2533 if [ "$ARG_RAM" ]; then
2534 size=$ARG_RAM
2535 else
2536 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2537 size=`input`;
2539 case $size in
2540 60|64)
2541 memory="64"
2544 memory="32"
2546 esac
2549 if [ "$ARG_RAM" ]; then
2550 size=$ARG_RAM
2551 else
2552 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2553 size=`input`;
2555 case $size in
2557 memory="8"
2560 memory="2"
2562 esac
2564 esac
2565 echo "Memory size selected: $memory MB"
2566 [ "$ARG_TYPE" ] || echo ""
2568 #remove end
2570 ##################################################################
2571 # Figure out build "type"
2574 # the ifp7x0 is the only platform that supports building a gdb stub like
2575 # this
2576 case $modelname in
2577 iriverifp7xx)
2578 gdbstub="(G)DB stub, "
2580 sansae200r|sansae200)
2581 gdbstub="(I)nstaller, "
2583 sansac200)
2584 gdbstub="(E)raser, "
2588 esac
2589 if [ "$ARG_TYPE" ]; then
2590 btype=$ARG_TYPE
2591 else
2592 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2593 btype=`input`;
2596 case $btype in
2597 [Ii])
2598 appsdir='\$(ROOTDIR)/bootloader'
2599 apps="bootloader"
2600 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2601 bootloader="1"
2602 echo "e200R-installer build selected"
2604 [Ee])
2605 appsdir='\$(ROOTDIR)/bootloader'
2606 apps="bootloader"
2607 echo "C2(4)0 or C2(5)0"
2608 variant=`input`
2609 case $variant in
2611 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2612 echo "c240 eraser build selected"
2615 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2616 echo "c240 eraser build selected"
2618 esac
2619 bootloader="1"
2620 echo "c200 eraser build selected"
2622 [Bb])
2623 if test $t_manufacturer = "archos"; then
2624 # Archos SH-based players do this somewhat differently for
2625 # some reason
2626 appsdir='\$(ROOTDIR)/flash/bootbox'
2627 apps="bootbox"
2628 else
2629 appsdir='\$(ROOTDIR)/bootloader'
2630 apps="bootloader"
2631 flash=""
2632 if test -n "$boottool"; then
2633 tool="$boottool"
2635 if test -n "$bootoutput"; then
2636 output=$bootoutput
2639 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2640 bootloader="1"
2641 echo "Bootloader build selected"
2643 [Ss])
2644 if [ "$modelname" = "sansae200r" ]; then
2645 echo "Do not use the e200R target for simulator builds. Use e200 instead."
2646 exit 8
2648 debug="-DDEBUG"
2649 simulator="yes"
2650 extradefines="-DSIMULATOR"
2651 archosrom=""
2652 flash=""
2653 echo "Simulator build selected"
2655 [Aa]*)
2656 echo "Advanced build selected"
2657 whichadvanced $btype
2659 [Gg])
2660 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2661 appsdir='\$(ROOTDIR)/gdb'
2662 apps="stub"
2663 case $modelname in
2664 iriverifp7xx)
2665 output="stub.wma"
2669 esac
2670 echo "GDB stub build selected"
2672 [Mm])
2673 toolset='';
2674 apps="manual"
2675 echo "Manual build selected"
2677 [Cc])
2678 uname=`uname`
2679 simcc "checkwps"
2680 toolset='';
2681 t_cpu='';
2682 GCCOPTS='';
2683 extradefines="-DDEBUG"
2684 appsdir='\$(ROOTDIR)/tools/checkwps';
2685 output='checkwps.'${modelname};
2686 archosrom='';
2687 echo "CheckWPS build selected"
2689 [Dd])
2690 uname=`uname`
2691 simcc "database"
2692 toolset='';
2693 t_cpu='';
2694 GCCOPTS='';
2695 appsdir='\$(ROOTDIR)/tools/database';
2696 archosrom='';
2698 case $uname in
2699 CYGWIN*|MINGW*)
2700 output="database_${modelname}.exe"
2703 output='database.'${modelname};
2705 esac
2707 echo "Database tool build selected"
2710 if [ "$modelname" = "sansae200r" ]; then
2711 echo "Do not use the e200R target for regular builds. Use e200 instead."
2712 exit 8
2714 debug=""
2715 btype="N" # set it explicitly since RET only gets here as well
2716 echo "Normal build selected"
2719 esac
2720 # to be able running "make manual" from non-manual configuration
2721 case $modelname in
2722 archosrecorderv2)
2723 manualdev="archosfmrecorder"
2725 iriverh1??)
2726 manualdev="iriverh100"
2728 ipodmini2g)
2729 manualdev="ipodmini1g"
2732 manualdev=$modelname
2734 esac
2736 if [ -z "$debug" ]; then
2737 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2740 echo "Using source code root directory: $rootdir"
2742 # this was once possible to change at build-time, but no more:
2743 language="english"
2745 uname=`uname`
2747 if [ "yes" = "$simulator" ]; then
2748 # setup compiler and things for simulator
2749 simcc "sdl"
2751 if [ -d "simdisk" ]; then
2752 echo "Subdirectory 'simdisk' already present"
2753 else
2754 mkdir simdisk
2755 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2759 # Now, figure out version number of the (gcc) compiler we are about to use
2760 gccver=`$CC -dumpversion`;
2762 # figure out the binutil version too and display it, mostly for the build
2763 # system etc to be able to see it easier
2764 if [ $uname = "Darwin" ]; then
2765 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2766 else
2767 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2770 if [ -z "$gccver" ]; then
2771 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
2772 echo "[WARNING] this may cause your build to fail since we cannot do the"
2773 echo "[WARNING] checks we want now."
2774 else
2776 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2777 # DEPEND on it
2779 num1=`echo $gccver | cut -d . -f1`
2780 num2=`echo $gccver | cut -d . -f2`
2781 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2783 # This makes:
2784 # 3.3.X => 303
2785 # 3.4.X => 304
2786 # 2.95.3 => 295
2788 echo "Using $CC $gccver ($gccnum)"
2790 if test "$gccnum" -ge "400"; then
2791 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2792 # so we ignore that warnings for now
2793 # -Wno-pointer-sign
2794 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2797 if test "$gccnum" -ge "401"; then
2798 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2799 # will break strict-aliasing rules"
2801 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
2804 if test "$gccnum" -ge "402"; then
2805 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2806 # and later would throw it for several valid cases
2807 GCCOPTS="$GCCOPTS -Wno-override-init"
2810 case $prefix in
2812 # simulator
2814 i586-mingw32msvc-)
2815 # cross-compile for win32
2818 # Verify that the cross-compiler is of a recommended version!
2819 if test "$gccver" != "$gccchoice"; then
2820 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2821 echo "WARNING: version $gccchoice!"
2822 echo "WARNING: This may cause your build to fail since it may be a version"
2823 echo "WARNING: that isn't functional or known to not be the best choice."
2824 echo "WARNING: If you suffer from build problems, you know that this is"
2825 echo "WARNING: a likely source for them..."
2828 esac
2833 echo "Using $LD $ldver"
2835 # check the compiler for SH platforms
2836 if test "$CC" = "sh-elf-gcc"; then
2837 if test "$gccnum" -lt "400"; then
2838 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2839 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2840 else
2841 # figure out patch status
2842 gccpatch=`$CC --version`;
2844 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2845 echo "gcc $gccver is rockbox patched"
2846 # then convert -O to -Os to get smaller binaries!
2847 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2848 else
2849 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2850 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2855 if test "$CC" = "m68k-elf-gcc"; then
2856 # convert -O to -Os to get smaller binaries!
2857 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2860 if [ "$ARG_CCACHE" = "1" ]; then
2861 echo "Enable ccache for building"
2862 ccache="ccache"
2863 elif [ "$ARG_CCACHE" != "0" ]; then
2864 ccache=`findtool ccache`
2865 if test -n "$ccache"; then
2866 echo "Found and uses ccache ($ccache)"
2870 # figure out the full path to the various commands if possible
2871 HOSTCC=`findtool gcc --lit`
2872 HOSTAR=`findtool ar --lit`
2873 CC=`findtool ${CC} --lit`
2874 LD=`findtool ${AR} --lit`
2875 AR=`findtool ${AR} --lit`
2876 AS=`findtool ${AS} --lit`
2877 OC=`findtool ${OC} --lit`
2878 WINDRES=`findtool ${WINDRES} --lit`
2879 DLLTOOL=`findtool ${DLLTOOL} --lit`
2880 DLLWRAP=`findtool ${DLLWRAP} --lit`
2881 RANLIB=`findtool ${RANLIB} --lit`
2883 if test -n "$ccache"; then
2884 CC="$ccache $CC"
2887 if test "X$endian" = "Xbig"; then
2888 defendian="ROCKBOX_BIG_ENDIAN"
2889 else
2890 defendian="ROCKBOX_LITTLE_ENDIAN"
2893 if [ "$ARG_RBDIR" ]; then
2894 rbdir=$ARG_RBDIR
2895 echo "Using alternate rockbox dir: ${rbdir}"
2898 sed > autoconf.h \
2899 -e "s,@ENDIAN@,${defendian},g" \
2900 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2901 -e "s,@config_rtc@,$config_rtc,g" \
2902 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2903 -e "s,@RBDIR@,${rbdir},g" \
2904 -e "s,@have_backlight@,$have_backlight,g" \
2905 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
2906 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
2907 <<EOF
2908 /* This header was made by configure */
2909 #ifndef __BUILD_AUTOCONF_H
2910 #define __BUILD_AUTOCONF_H
2912 /* Define endianess for the target or simulator platform */
2913 #define @ENDIAN@ 1
2915 /* Define this if you build rockbox to support the logf logging and display */
2916 #undef ROCKBOX_HAS_LOGF
2918 /* optional define for a backlight modded Ondio */
2919 @have_backlight@
2921 /* optional define for FM radio mod for iAudio M5 */
2922 @have_fmradio_in@
2924 /* optional define for ATA poweroff on Player */
2925 @have_ata_poweroff@
2927 /* optional defines for RTC mod for h1x0 */
2928 @config_rtc@
2929 @have_rtc_alarm@
2931 /* root of Rockbox */
2932 #define ROCKBOX_DIR "/@RBDIR@"
2934 #endif /* __BUILD_AUTOCONF_H */
2937 if test -n "$t_cpu"; then
2938 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2939 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2940 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2941 GCCOPTS="$GCCOPTS"
2944 if test "$simulator" = "yes"; then
2945 # add simul make stuff on the #SIMUL# line
2946 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2947 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2948 else
2949 # delete the lines that match
2950 simmagic1='/@SIMUL1@/D'
2951 simmagic2='/@SIMUL2@/D'
2954 if test "$swcodec" = "yes"; then
2955 voicetoolset="rbspeexenc voicefont wavtrim"
2956 else
2957 voicetoolset="voicefont wavtrim"
2960 if test "$apps" = "apps"; then
2961 # only when we build "real" apps we build the .lng files
2962 buildlangs="langs"
2965 #### Fix the cmdline ###
2966 if test -n "$ccache"; then
2967 cmdline="--ccache "
2969 if [ "$ARG_ARM_EABI" = "1" ]; then
2970 cmdline="$cmdline--eabi "
2973 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
2974 ### end of cmdline
2976 sed > Makefile \
2977 -e "s,@ROOTDIR@,${rootdir},g" \
2978 -e "s,@DEBUG@,${debug},g" \
2979 -e "s,@MEMORY@,${memory},g" \
2980 -e "s,@TARGET_ID@,${target_id},g" \
2981 -e "s,@TARGET@,${target},g" \
2982 -e "s,@CPU@,${t_cpu},g" \
2983 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2984 -e "s,@MODELNAME@,${modelname},g" \
2985 -e "s,@LANGUAGE@,${language},g" \
2986 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2987 -e "s,@PWD@,${pwd},g" \
2988 -e "s,@HOSTCC@,${HOSTCC},g" \
2989 -e "s,@HOSTAR@,${HOSTAR},g" \
2990 -e "s,@CC@,${CC},g" \
2991 -e "s,@LD@,${LD},g" \
2992 -e "s,@AR@,${AR},g" \
2993 -e "s,@AS@,${AS},g" \
2994 -e "s,@OC@,${OC},g" \
2995 -e "s,@WINDRES@,${WINDRES},g" \
2996 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2997 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2998 -e "s,@RANLIB@,${RANLIB},g" \
2999 -e "s,@TOOL@,${tool},g" \
3000 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
3001 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
3002 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
3003 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
3004 -e "s,@OUTPUT@,${output},g" \
3005 -e "s,@APPEXTRA@,${appextra},g" \
3006 -e "s,@ARCHOSROM@,${archosrom},g" \
3007 -e "s,@FLASHFILE@,${flash},g" \
3008 -e "s,@PLUGINS@,${plugins},g" \
3009 -e "s,@CODECS@,${swcodec},g" \
3010 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
3011 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
3012 -e "s,@GCCOPTS@,${GCCOPTS},g" \
3013 -e "s,@TARGET_INC@,${TARGET_INC},g" \
3014 -e "s!@LDOPTS@!${LDOPTS}!g" \
3015 -e "s,@LOADADDRESS@,${loadaddress},g" \
3016 -e "s,@EXTRADEF@,${extradefines},g" \
3017 -e "s,@APPSDIR@,${appsdir},g" \
3018 -e "s,@FIRMDIR@,${firmdir},g" \
3019 -e "s,@TOOLSDIR@,${toolsdir},g" \
3020 -e "s,@APPS@,${apps},g" \
3021 -e "s,@SIMVER@,${simver},g" \
3022 -e "s,@GCCVER@,${gccver},g" \
3023 -e "s,@GCCNUM@,${gccnum},g" \
3024 -e "s,@UNAME@,${uname},g" \
3025 -e "s,@ENDIAN@,${defendian},g" \
3026 -e "s,@TOOLSET@,${toolset},g" \
3027 -e "${simmagic1}" \
3028 -e "${simmagic2}" \
3029 -e "s,@MANUALDEV@,${manualdev},g" \
3030 -e "s,@ENCODER@,${ENC_CMD},g" \
3031 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
3032 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
3033 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
3034 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
3035 -e "s,@LANGS@,${buildlangs},g" \
3036 -e "s,@USE_ELF@,${USE_ELF},g" \
3037 -e "s,@RBDIR@,${rbdir},g" \
3038 -e "s,@PREFIX@,$PREFIX,g" \
3039 -e "s,@CMDLINE@,$cmdline,g" \
3040 -e "s,@SDLCONFIG@,$sdl,g" \
3041 <<EOF
3042 ## Automatically generated. http://www.rockbox.org/
3044 export ROOTDIR=@ROOTDIR@
3045 export FIRMDIR=@FIRMDIR@
3046 export APPSDIR=@APPSDIR@
3047 export TOOLSDIR=@TOOLSDIR@
3048 export DOCSDIR=\$(ROOTDIR)/docs
3049 export MANUALDIR=\${ROOTDIR}/manual
3050 export DEBUG=@DEBUG@
3051 export MODELNAME=@MODELNAME@
3052 export ARCHOSROM=@ARCHOSROM@
3053 export FLASHFILE=@FLASHFILE@
3054 export TARGET_ID=@TARGET_ID@
3055 export TARGET=@TARGET@
3056 export CPU=@CPU@
3057 export MANUFACTURER=@MANUFACTURER@
3058 export OBJDIR=@PWD@
3059 export BUILDDIR=@PWD@
3060 export LANGUAGE=@LANGUAGE@
3061 export VOICELANGUAGE=@VOICELANGUAGE@
3062 export MEMORYSIZE=@MEMORY@
3063 export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
3064 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3065 export MKFIRMWARE=@TOOL@
3066 export BMP2RB_MONO=@BMP2RB_MONO@
3067 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3068 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3069 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3070 export BINARY=@OUTPUT@
3071 export APPEXTRA=@APPEXTRA@
3072 export ENABLEDPLUGINS=@PLUGINS@
3073 export SOFTWARECODECS=@CODECS@
3074 export EXTRA_DEFINES=@EXTRADEF@
3075 export HOSTCC=@HOSTCC@
3076 export HOSTAR=@HOSTAR@
3077 export CC=@CC@
3078 export LD=@LD@
3079 export AR=@AR@
3080 export AS=@AS@
3081 export OC=@OC@
3082 export WINDRES=@WINDRES@
3083 export DLLTOOL=@DLLTOOL@
3084 export DLLWRAP=@DLLWRAP@
3085 export RANLIB=@RANLIB@
3086 export PREFIX=@PREFIX@
3087 export PROFILE_OPTS=@PROFILE_OPTS@
3088 export SIMVER=@SIMVER@
3089 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3090 export GCCOPTS=@GCCOPTS@
3091 export TARGET_INC=@TARGET_INC@
3092 export LOADADDRESS=@LOADADDRESS@
3093 export SHARED_FLAG=@SHARED_FLAG@
3094 export LDOPTS=@LDOPTS@
3095 export GCCVER=@GCCVER@
3096 export GCCNUM=@GCCNUM@
3097 export UNAME=@UNAME@
3098 export MANUALDEV=@MANUALDEV@
3099 export TTS_OPTS=@TTS_OPTS@
3100 export TTS_ENGINE=@TTS_ENGINE@
3101 export ENC_OPTS=@ENC_OPTS@
3102 export ENCODER=@ENCODER@
3103 export USE_ELF=@USE_ELF@
3104 export RBDIR=@RBDIR@
3105 export SDLCONFIG=@SDLCONFIG@
3107 CONFIGURE_OPTIONS=@CMDLINE@
3109 include \$(TOOLSDIR)/root.make
3113 echo "Created Makefile"