Try to make configure respect the TMPDIR environment variable.
[kugel-rb.git] / tools / configure
blobc6341ff790a8c359c7f1e7ccc8bba311d15b6a2e
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"
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 crosswincc () {
42 # naive approach to selecting a mingw cross-compiler on linux/*nix
43 echo "Enabling win32 crosscompiling"
45 prefixtools i586-mingw32msvc-
47 # add cross-compiler option(s)
48 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
49 LDOPTS="`sdl-config --libs` -mconsole"
51 output="rockboxui.exe" # use this as output binary name
52 crosscompile="yes"
53 endian="little" # windows is little endian
56 # scan the $PATH for the given command
57 findtool(){
58 file="$1"
60 IFS=":"
61 for path in $PATH
63 # echo "checks for $file in $path" >&2
64 if test -f "$path/$file"; then
65 echo "$path/$file"
66 return
68 done
69 # check whether caller wants literal return value if not found
70 if [ "$2" = "--lit" ]; then
71 echo "$file"
75 # parse the argument list, returns the value after the = in case of a
76 # option=value type option, returns 0 in case of --ccache or --no-ccache,
77 # returns 1 if the searched argument type wasn't fount in the argument list
78 # Usage [var = ]`parse_args <argumenttype>`, e.g. `parse_args --target`
80 # var definitons below are needed so that parse_args can see the arguments
81 arg1=$1 arg2=$2 arg3=$3 arg4=$4 arg5=$5 arg6=$6 arg7=$7 arg8=$8 arg9=$9
83 parse_args() {
84 ret="1"
85 for i in $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7 $arg8 $arg9
87 if [ "$1" = "--ccache" ]; then
88 if [ "$i" = "--ccache" ]; then
89 ret="0"
91 elif [ "$1" = "--no-ccache" ]; then
92 if [ "$i" = "--no-ccache" ]; then
93 ret="0"
95 elif [ "$1" = `echo $i|cut -d'=' -f1` ]; then
96 ret=`echo $i|cut -d'=' -f2`
98 done
99 echo "$ret"
102 simcc () {
104 # default tool setup for native building
105 prefixtools ""
107 simver=sdl
108 GCCOPTS='-W -Wall -g -fno-builtin'
110 output="rockboxui" # use this as default output binary name
112 # generic sdl-config checker
113 sdl=`findtool sdl-config`
115 if [ -z "$sdl" ]; then
116 echo "configure didn't find sdl-config, which indicates that you"
117 echo "don't have SDL (properly) installed. Please correct and"
118 echo "re-run configure!"
119 exit 1
122 # default share option, override below if needed
123 SHARED_FLAG="-shared"
125 case $uname in
126 CYGWIN*)
127 echo "Cygwin host detected"
129 # sdl version
130 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
131 LDOPTS="`sdl-config --libs` -mconsole"
133 output="rockboxui.exe" # use this as output binary name
136 MINGW*)
137 echo "MinGW host detected"
139 # sdl version
140 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
141 LDOPTS="`sdl-config --libs` -mconsole"
143 output="rockboxui.exe" # use this as output binary name
146 Linux)
147 echo "Linux host detected"
148 if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then
149 # Enable crosscompiling if sdl-config is from Windows SDL
150 crosswincc
151 else
152 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
153 LDOPTS="`sdl-config --libs`"
157 FreeBSD)
158 echo "FreeBSD host detected"
159 # sdl version
160 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
161 LDOPTS="`sdl-config --libs`"
164 Darwin)
165 echo "Darwin host detected"
166 # sdl version
167 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
168 LDOPTS="`sdl-config --libs`"
169 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
173 echo "Unsupported system: $uname, fix configure and retry"
174 exit 2
176 esac
178 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
180 if test "X$crosscompile" != "Xyes"; then
181 if [ "`uname -m`" = "x86_64" ] || [ "`uname -m`" = "amd64" ]; then
182 # fPIC is needed to make shared objects link
183 # setting visibility to hidden is necessary to avoid strange crashes
184 # due to symbol clashing
185 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
188 id=$$
189 cat >$tmpdir/conftest-$id.c <<EOF
190 #include <stdio.h>
191 int main(int argc, char **argv)
193 int var=0;
194 char *varp = (char *)&var;
195 *varp=1;
197 printf("%d\n", var);
198 return 0;
202 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
204 if test `$tmpdir/conftest-$id 2>/dev/null` -gt "1"; then
205 # big endian
206 endian="big"
207 else
208 # little endian
209 endian="little"
211 echo "Simulator environment deemed $endian endian"
213 # use wildcard here to make it work even if it was named *.exe like
214 # on cygwin
215 rm -f $tmpdir/conftest-$id*
220 # functions for setting up cross-compiler names and options
221 # also set endianess and what the exact recommended gcc version is
222 # the gcc version should most likely match what versions we build with
223 # rockboxdev.sh
225 shcc () {
226 prefixtools sh-elf-
227 GCCOPTS="$CCOPTS -m1"
228 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
229 endian="big"
230 gccchoice="4.0.3"
233 calmrisccc () {
234 prefixtools calmrisc16-unknown-elf-
235 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
236 GCCOPTIMIZE="-fomit-frame-pointer"
237 endian="big"
240 coldfirecc () {
241 prefixtools m68k-elf-
242 GCCOPTS="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
243 GCCOPTIMIZE="-fomit-frame-pointer"
244 endian="big"
245 gccchoice="3.4.6"
248 arm7tdmicc () {
249 prefixtools arm-elf-
250 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
251 if test "X$1" != "Xshort"; then
252 GCCOPTS="$GCCOPTS -mlong-calls"
254 GCCOPTIMIZE="-fomit-frame-pointer"
255 endian="little"
256 gccchoice="4.0.3"
259 arm9tdmicc () {
260 prefixtools arm-elf-
261 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
262 if test "$modelname" != "gigabeatf" -a "$t_manufacturer" != "as3525"; then
263 GCCOPTS="$GCCOPTS -mlong-calls"
265 GCCOPTIMIZE="-fomit-frame-pointer"
266 endian="little"
267 gccchoice="4.0.3"
270 arm940tbecc () {
271 prefixtools arm-elf-
272 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t -mlong-calls"
273 GCCOPTIMIZE="-fomit-frame-pointer"
274 endian="big"
275 gccchoice="4.0.3"
278 arm940tcc () {
279 prefixtools arm-elf-
280 GCCOPTS="$CCOPTS -mcpu=arm940t -mlong-calls"
281 GCCOPTIMIZE="-fomit-frame-pointer"
282 endian="little"
283 gccchoice="4.0.3"
286 arm946cc () {
287 prefixtools arm-elf-
288 GCCOPTS="$CCOPTS -mcpu=arm9e -mlong-calls"
289 GCCOPTIMIZE="-fomit-frame-pointer"
290 endian="little"
291 gccchoice="4.0.3"
294 arm926ejscc () {
295 prefixtools arm-elf-
296 GCCOPTS="$CCOPTS -mcpu=arm926ej-s -mlong-calls"
297 GCCOPTIMIZE="-fomit-frame-pointer"
298 endian="little"
299 gccchoice="4.0.3"
302 arm1136jfscc () {
303 prefixtools arm-elf-
304 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
305 if test "$modelname" != "gigabeats"; then
306 GCCOPTS="$GCCOPTS -mlong-calls"
308 GCCOPTIMIZE="-fomit-frame-pointer"
309 endian="little"
310 gccchoice="4.0.3"
313 arm1176jzscc () {
314 prefixtools arm-elf-
315 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s -mlong-calls"
316 GCCOPTIMIZE="-fomit-frame-pointer"
317 endian="little"
318 gccchoice="4.0.3"
321 mipselcc () {
322 prefixtools mipsel-elf-
323 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls"
324 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
325 GCCOPTIMIZE="-fomit-frame-pointer"
326 endian="little"
327 gccchoice="4.1.2"
330 whichadvanced () {
331 ##################################################################
332 # Prompt for specific developer options
334 echo ""
335 echo "Enter your developer options (press enter when done)"
336 printf "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice"
337 if [ "$memory" = "2" ]; then
338 printf ", (8)MB MOD"
340 if [ "$modelname" = "player" ]; then
341 printf ", Use (A)TA poweroff"
343 if [ "$t_model" = "ondio" ]; then
344 printf ", (B)acklight MOD"
346 if [ "$modelname" = "m5" ]; then
347 printf ", (F)M radio MOD"
349 if [ "$modelname" = "h120" ]; then
350 printf ", (R)TC MOD"
352 echo ""
354 cont=1
356 while [ $cont = "1" ]; do
358 option=`input`;
360 case $option in
361 [Dd])
362 if [ "yes" = "$profile" ]; then
363 echo "Debug is incompatible with profiling"
364 else
365 echo "define DEBUG"
366 use_debug="yes"
369 [Ll])
370 echo "logf() support enabled"
371 logf="yes"
373 [Ss])
374 echo "Simulator build enabled"
375 simulator="yes"
377 [Pp])
378 if [ "yes" = "$use_debug" ]; then
379 echo "Profiling is incompatible with debug"
380 else
381 echo "Profiling support is enabled"
382 profile="yes"
385 [Vv])
386 echo "Voice build selected"
387 voice="yes"
390 if [ "$memory" = "2" ]; then
391 memory="8"
392 echo "Memory size selected: 8MB"
393 else
394 cont=0
397 [Aa])
398 if [ "$modelname" = "player" ]; then
399 have_ata_poweroff="#define HAVE_ATA_POWEROFF"
400 echo "ATA poweroff enabled"
401 else
402 cont=0
405 [Bb])
406 if [ "$t_model" = "ondio" ]; then
407 have_backlight="#define HAVE_BACKLIGHT"
408 echo "Backlight functions enabled"
409 else
410 cont=0
413 [Ff])
414 if [ "$modelname" = "m5" ]; then
415 have_fmradio_in="#define HAVE_FMRADIO_IN"
416 echo "FM radio functions enabled"
417 else
418 cont=0
421 [Rr])
422 if [ "$modelname" = "h120" ]; then
423 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
424 have_rtc_alarm="#define HAVE_RTC_ALARM"
425 echo "RTC functions enabled (DS1339/DS3231)"
426 else
427 cont=0
431 cont=0
433 esac
434 done
435 echo "done"
437 if [ "yes" = "$voice" ]; then
438 # Ask about languages to build
439 echo "Select a number for the language to use (default is english)"
440 # The multiple-language feature is currently broken
441 # echo "You may enter a comma-separated list of languages to build"
443 picklang
444 voicelanguage=`whichlang`
446 if [ -z "$voicelanguage" ]; then
447 # pick a default
448 voicelanguage="english"
450 echo "Voice language set to $voicelanguage"
452 # Configure encoder and TTS engine for each language
453 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
454 voiceconfig "$thislang"
455 done
457 if [ "yes" = "$use_debug" ]; then
458 debug="-DDEBUG"
459 GCCOPTS="$GCCOPTS -g -DDEBUG"
461 if [ "yes" = "$logf" ]; then
462 use_logf="#define ROCKBOX_HAS_LOGF 1"
464 if [ "yes" = "$simulator" ]; then
465 debug="-DDEBUG"
466 extradefines="$extradefines -DSIMULATOR"
467 archosrom=""
468 flash=""
470 if [ "yes" = "$profile" ]; then
471 extradefines="$extradefines -DRB_PROFILE"
472 PROFILE_OPTS="-finstrument-functions"
476 # Configure voice settings
477 voiceconfig () {
478 thislang=$1
479 echo "Building $thislang voice for $modelname. Select options"
480 echo ""
482 if [ -n "`findtool flite`" ]; then
483 FLITE="F(l)ite "
484 FLITE_OPTS=""
485 DEFAULT_TTS="flite"
486 DEFAULT_TTS_OPTS=$FLITE_OPTS
487 DEFAULT_NOISEFLOOR="500"
488 DEFAULT_CHOICE="L"
490 if [ -n "`findtool espeak`" ]; then
491 ESPEAK="(e)Speak "
492 ESPEAK_OPTS=""
493 DEFAULT_TTS="espeak"
494 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
495 DEFAULT_NOISEFLOOR="500"
496 DEFAULT_CHOICE="e"
498 if [ -n "`findtool festival`" ]; then
499 FESTIVAL="(F)estival "
500 case "$thislang" in
501 "italiano")
502 FESTIVAL_OPTS="--language italian"
504 "espanol")
505 FESTIVAL_OPTS="--language spanish"
507 "finnish")
508 FESTIVAL_OPTS="--language finnish"
510 "czech")
511 FESTIVAL_OPTS="--language czech"
514 FESTIVAL_OPTS=""
516 esac
517 DEFAULT_TTS="festival"
518 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
519 DEFAULT_NOISEFLOOR="500"
520 DEFAULT_CHOICE="F"
522 if [ -n "`findtool swift`" ]; then
523 SWIFT="S(w)ift "
524 SWIFT_OPTS=""
525 DEFAULT_TTS="swift"
526 DEFAULT_TTS_OPTS=$SWIFT_OPTS
527 DEFAULT_NOISEFLOOR="500"
528 DEFAULT_CHOICE="w"
530 # Allow SAPI if Windows is in use
531 if [ -n "`findtool winver`" ]; then
532 SAPI="(S)API "
533 SAPI_OPTS=""
534 DEFAULT_TTS="sapi"
535 DEFAULT_TTS_OPTS=$SAPI_OPTS
536 DEFAULT_NOISEFLOOR="500"
537 DEFAULT_CHOICE="S"
540 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
541 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
542 exit 3
545 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
546 option=`input`
547 case "$option" in
548 [Ll])
549 TTS_ENGINE="flite"
550 NOISEFLOOR="500" # TODO: check this value
551 TTS_OPTS=$FLITE_OPTS
553 [Ee])
554 TTS_ENGINE="espeak"
555 NOISEFLOOR="500"
556 TTS_OPTS=$ESPEAK_OPTS
558 [Ff])
559 TTS_ENGINE="festival"
560 NOISEFLOOR="500"
561 TTS_OPTS=$FESTIVAL_OPTS
563 [Ss])
564 TTS_ENGINE="sapi"
565 NOISEFLOOR="500"
566 TTS_OPTS=$SAPI_OPTS
568 [Ww])
569 TTS_ENGINE="swift"
570 NOISEFLOOR="500"
571 TTS_OPTS=$SWIFT_OPTS
574 TTS_ENGINE=$DEFAULT_TTS
575 TTS_OPTS=$DEFAULT_TTS_OPTS
576 NOISEFLOOR=$DEFAULT_NOISEFLOOR
577 esac
578 echo "Using $TTS_ENGINE for TTS"
580 # Select which voice to use for Festival
581 if [ "$TTS_ENGINE" = "festival" ]; then
583 for voice in `echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`; do
584 if [ "$i" = "1" ]; then
585 TTS_FESTIVAL_VOICE="$voice" # Default choice
587 printf "%3d. %s\n" "$i" "$voice"
588 i=`expr $i + 1`
589 done
590 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
591 CHOICE=`input`
593 for voice in `echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`; do
594 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
595 TTS_FESTIVAL_VOICE="$voice"
597 i=`expr $i + 1`
598 done
599 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
600 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
603 # Allow the user to input manual commandline options
604 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
605 USER_TTS_OPTS=`input`
606 if [ -n "$USER_TTS_OPTS" ]; then
607 TTS_OPTS="$USER_TTS_OPTS"
610 echo ""
612 if [ "$swcodec" = "yes" ]; then
613 ENCODER="rbspeexenc"
614 ENC_CMD="rbspeexenc"
615 ENC_OPTS="-q 4 -c 10"
616 else
617 if [ -n "`findtool lame`" ]; then
618 ENCODER="lame"
619 ENC_CMD="lame"
620 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
621 else
622 echo "You need LAME in the system path to build voice files for"
623 echo "HWCODEC targets."
624 exit 4
628 echo "Using $ENCODER for encoding voice clips"
630 # Allow the user to input manual commandline options
631 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
632 USER_ENC_OPTS=`input`
633 if [ -n "$USER_ENC_OPTS" ]; then
634 ENC_OPTS=$USER_ENC_OPTS
637 TEMPDIR="${pwd}"
638 if [ -n "`findtool cygpath`" ]; then
639 TEMPDIR=`cygpath . -a -w`
643 picklang() {
644 # figure out which languages that are around
645 for file in $rootdir/apps/lang/*.lang; do
646 clean=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
647 langs="$langs $clean"
648 done
650 num=1
651 for one in $langs; do
652 echo "$num. $one"
653 num=`expr $num + 1`
654 done
656 read pick
659 whichlang() {
660 output=""
661 # Allow the user to pass a comma-separated list of langauges
662 for thispick in `echo $pick | sed 's/,/ /g'`; do
663 num=1
664 for one in $langs; do
665 # Accept both the language number and name
666 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
667 if [ "$output" = "" ]; then
668 output=$one
669 else
670 output=$output,$one
673 num=`expr $num + 1`
674 done
675 done
676 echo $output
679 opt=$1
682 if [ "$TMPDIR" != "" ]; then
683 tmpdir=$TMPDIR
684 else
685 tmpdir=/tmp
688 echo $tmpdir
689 if test "$opt" = "--help"; then
690 echo "Rockbox configure script."
691 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
692 echo "Do *NOT* run this within the tools directory!"
693 echo ""
694 cat <<EOF
695 Usage: configure [OPTION]...
696 Options:
697 --target=TARGET Sets the target, TARGET can be either the target ID or
698 corresponding string. Run without this option to see all
699 available targets.
701 --ram=RAM Sets the RAM for certain targets. Even though any number
702 is accepted, not every number is correct. The default
703 value will be applied, if you entered a wrong number
704 (which depends on the target). Watch the output. Run
705 without this option if you are not sure which the right
706 number is.
708 --type=TYPE Sets the build type. The shortcut is also valid.
709 Run without this option to see available types.
711 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
712 This is useful for having multiple alternate builds on
713 your device that you can load with ROLO. However as the
714 bootloader looks for .rockbox you won't be able to boot
715 into this build.
717 --ccache Enable ccache use (done by default these days)
718 --no-ccache Disable ccache use
719 --help Shows this message (must not be used with other options)
723 exit
726 if test -r "configure"; then
727 # this is a check for a configure script in the current directory, it there
728 # is one, try to figure out if it is this one!
730 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
731 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
732 echo "It will only cause you pain and grief. Instead do this:"
733 echo ""
734 echo " cd .."
735 echo " mkdir build-dir"
736 echo " cd build-dir"
737 echo " ../tools/configure"
738 echo ""
739 echo "Much happiness will arise from this. Enjoy"
740 exit 5
744 # get our current directory
745 pwd=`pwd`;
747 if { echo $pwd | grep " "; } then
748 echo "You're running this script in a path that contains space. The build"
749 echo "system is unfortunately not clever enough to deal with this. Please"
750 echo "run the script from a different path, rename the path or fix the build"
751 echo "system!"
752 exit 6
755 if [ -z "$rootdir" ]; then
756 ##################################################################
757 # Figure out where the source code root is!
759 rootdir=`dirname $0`/../
761 #####################################################################
762 # Convert the possibly relative directory name to an absolute version
764 now=`pwd`
765 cd $rootdir
766 rootdir=`pwd`
768 # cd back to the build dir
769 cd $now
772 apps="apps"
773 appsdir='\$(ROOTDIR)/apps'
774 firmdir='\$(ROOTDIR)/firmware'
775 toolsdir='\$(ROOTDIR)/tools'
778 ##################################################################
779 # Figure out target platform
782 if [ "1" != `parse_args --target` ]; then
783 buildfor=`parse_args --target`;
784 else
785 echo "Enter target platform:"
786 cat <<EOF
787 ==Archos== ==iriver== ==Apple iPod==
788 0) Player/Studio 10) H120/H140 20) Color/Photo
789 1) Recorder 11) H320/H340 21) Nano
790 2) FM Recorder 12) iHP-100/110/115 22) Video
791 3) Recorder v2 13) iFP-790 23) 3G
792 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
793 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
794 6) AV300 26) Mini 2G
795 ==Toshiba== 27) 1G, 2G
796 ==Cowon/iAudio== 40) Gigabeat F 28) Nano 2G
797 30) X5/X5V/X5L 41) Gigabeat S
798 31) M5/M5L ==SanDisk==
799 32) 7 ==Olympus= 50) Sansa e200
800 33) D2 70) M:Robe 500 51) Sansa e200R
801 34) M3/M3L 71) M:Robe 100 52) Sansa c200
802 53) Sansa m200
803 ==Creative== ==Philips== 54) Sansa c100
804 90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip
805 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2
806 92) Zen Vision HDD1830 57) Sansa m200v4
807 58) Sansa Fuze
808 ==Onda== ==Meizu== 59) Sansa c200v2
809 120) VX747 110) M6SL 60) Sansa Clipv2
810 121) VX767 111) M6SP 61) Sansa View
811 122) VX747+ 112) M3
812 123) VX777 ==Logik==
813 80) DAX 1GB MP3/DAB
814 ==Samsung== ==Tatung==
815 140) YH-820 150) Elio TPJ-1022 ==Lyre project==
816 141) YH-920 130) Lyre proto 1
817 142) YH-925
820 buildfor=`input`;
823 # Set of tools built for all target platforms:
824 toolset="rdf2binary convbdf codepages"
826 # Toolsets for some target families:
827 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
828 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
829 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
830 ipodbitmaptools="$toolset scramble bmp2rb"
831 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
832 tccbitmaptools="$toolset scramble mktccboot bmp2rb"
833 # generic is used by IFP, Meizu and Onda
834 genericbitmaptools="$toolset bmp2rb"
835 # scramble is used by all other targets
836 scramblebitmaptools="$genericbitmaptools scramble"
839 # ---- For each target ----
841 # *Variables*
842 # target_id: a unique number identifying this target, IS NOT the menu number.
843 # Just use the currently highest number+1 when you add a new
844 # target.
845 # modelname: short model name used all over to identify this target
846 # memory: number of megabytes of RAM this target has. If the amount can
847 # be selected by the size prompt, let memory be unset here
848 # target: -Ddefine passed to the build commands to make the correct
849 # config-*.h file get included etc
850 # tool: the tool that takes a plain binary and converts that into a
851 # working "firmware" file for your target
852 # output: the final output file name
853 # boottool: the tool that takes a plain binary and generates a bootloader
854 # file for your target (or blank to use $tool)
855 # bootoutput:the final output file name for the bootloader (or blank to use
856 # $output)
857 # appextra: passed to the APPEXTRA variable in the Makefiles.
858 # TODO: add proper explanation
859 # archosrom: used only for Archos targets that build a special flashable .ucl
860 # image.
861 # flash: name of output for flashing, for targets where there's a special
862 # file output for this.
863 # plugins: set to 'yes' to build the plugins. Early development builds can
864 # set this to no in the early stages to have an easier life for a
865 # while
866 # swcodec: set 'yes' on swcodec targets
867 # toolset: lists what particular tools in the tools/ directory that this
868 # target needs to have built prior to building Rockbox
870 # *Functions*
871 # *cc: sets up gcc and compiler options for your target builds. Note
872 # that if you select a simulator build, the compiler selection is
873 # overridden later in the script.
875 case $buildfor in
877 0|player)
878 target_id=1
879 modelname="player"
880 target="-DARCHOS_PLAYER"
881 shcc
882 tool="$rootdir/tools/scramble"
883 output="archos.mod"
884 appextra="player:gui"
885 archosrom="$pwd/rombox.ucl"
886 flash="$pwd/rockbox.ucl"
887 plugins="yes"
888 swcodec=""
890 # toolset is the tools within the tools directory that we build for
891 # this particular target.
892 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
894 # Note: the convbdf is present in the toolset just because: 1) the
895 # firmware/Makefile assumes it is present always, and 2) we will need it when we
896 # build the player simulator
898 t_cpu="sh"
899 t_manufacturer="archos"
900 t_model="player"
903 1|recorder)
904 target_id=2
905 modelname="recorder"
906 target="-DARCHOS_RECORDER"
907 shcc
908 tool="$rootdir/tools/scramble"
909 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
910 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
911 output="ajbrec.ajz"
912 appextra="recorder:gui"
913 #archosrom="$pwd/rombox.ucl"
914 flash="$pwd/rockbox.ucl"
915 plugins="yes"
916 swcodec=""
917 # toolset is the tools within the tools directory that we build for
918 # this particular target.
919 toolset=$archosbitmaptools
920 t_cpu="sh"
921 t_manufacturer="archos"
922 t_model="recorder"
925 2|fmrecorder)
926 target_id=3
927 modelname="fmrecorder"
928 target="-DARCHOS_FMRECORDER"
929 shcc
930 tool="$rootdir/tools/scramble -fm"
931 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
932 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
933 output="ajbrec.ajz"
934 appextra="recorder:gui"
935 #archosrom="$pwd/rombox.ucl"
936 flash="$pwd/rockbox.ucl"
937 plugins="yes"
938 swcodec=""
939 # toolset is the tools within the tools directory that we build for
940 # this particular target.
941 toolset=$archosbitmaptools
942 t_cpu="sh"
943 t_manufacturer="archos"
944 t_model="fm_v2"
947 3|recorderv2)
948 target_id=4
949 modelname="recorderv2"
950 target="-DARCHOS_RECORDERV2"
951 shcc
952 tool="$rootdir/tools/scramble -v2"
953 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
954 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
955 output="ajbrec.ajz"
956 appextra="recorder:gui"
957 #archosrom="$pwd/rombox.ucl"
958 flash="$pwd/rockbox.ucl"
959 plugins="yes"
960 swcodec=""
961 # toolset is the tools within the tools directory that we build for
962 # this particular target.
963 toolset=$archosbitmaptools
964 t_cpu="sh"
965 t_manufacturer="archos"
966 t_model="fm_v2"
969 4|ondiosp)
970 target_id=7
971 modelname="ondiosp"
972 target="-DARCHOS_ONDIOSP"
973 shcc
974 tool="$rootdir/tools/scramble -osp"
975 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
976 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
977 output="ajbrec.ajz"
978 appextra="recorder:gui"
979 archosrom="$pwd/rombox.ucl"
980 flash="$pwd/rockbox.ucl"
981 plugins="yes"
982 swcodec=""
983 # toolset is the tools within the tools directory that we build for
984 # this particular target.
985 toolset=$archosbitmaptools
986 t_cpu="sh"
987 t_manufacturer="archos"
988 t_model="ondio"
991 5|ondiofm)
992 target_id=8
993 modelname="ondiofm"
994 target="-DARCHOS_ONDIOFM"
995 shcc
996 tool="$rootdir/tools/scramble -ofm"
997 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
998 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
999 output="ajbrec.ajz"
1000 appextra="recorder:gui"
1001 #archosrom="$pwd/rombox.ucl"
1002 flash="$pwd/rockbox.ucl"
1003 plugins="yes"
1004 swcodec=""
1005 toolset=$archosbitmaptools
1006 t_cpu="sh"
1007 t_manufacturer="archos"
1008 t_model="ondio"
1011 6|av300)
1012 target_id=38
1013 modelname="av300"
1014 target="-DARCHOS_AV300"
1015 memory=16 # always
1016 arm7tdmicc
1017 tool="$rootdir/tools/scramble -mm=C"
1018 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1019 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1020 output="cjbm.ajz"
1021 appextra="recorder:gui"
1022 plugins="yes"
1023 swcodec=""
1024 # toolset is the tools within the tools directory that we build for
1025 # this particular target.
1026 toolset="$toolset scramble descramble bmp2rb"
1027 # architecture, manufacturer and model for the target-tree build
1028 t_cpu="arm"
1029 t_manufacturer="archos"
1030 t_model="av300"
1033 10|h120)
1034 target_id=9
1035 modelname="h120"
1036 target="-DIRIVER_H120"
1037 memory=32 # always
1038 coldfirecc
1039 tool="$rootdir/tools/scramble -add=h120"
1040 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1041 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1042 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1043 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1044 output="rockbox.iriver"
1045 appextra="recorder:gui"
1046 flash="$pwd/rombox.iriver"
1047 plugins="yes"
1048 swcodec="yes"
1049 # toolset is the tools within the tools directory that we build for
1050 # this particular target.
1051 toolset=$iriverbitmaptools
1052 t_cpu="coldfire"
1053 t_manufacturer="iriver"
1054 t_model="h100"
1057 11|h300)
1058 target_id=10
1059 modelname="h300"
1060 target="-DIRIVER_H300"
1061 memory=32 # always
1062 coldfirecc
1063 tool="$rootdir/tools/scramble -add=h300"
1064 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1065 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1066 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1067 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1068 output="rockbox.iriver"
1069 appextra="recorder:gui"
1070 plugins="yes"
1071 swcodec="yes"
1072 # toolset is the tools within the tools directory that we build for
1073 # this particular target.
1074 toolset=$iriverbitmaptools
1075 t_cpu="coldfire"
1076 t_manufacturer="iriver"
1077 t_model="h300"
1080 12|h100)
1081 target_id=11
1082 modelname="h100"
1083 target="-DIRIVER_H100"
1084 memory=16 # always
1085 coldfirecc
1086 tool="$rootdir/tools/scramble -add=h100"
1087 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1088 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1089 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1090 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1091 output="rockbox.iriver"
1092 appextra="recorder:gui"
1093 flash="$pwd/rombox.iriver"
1094 plugins="yes"
1095 swcodec="yes"
1096 # toolset is the tools within the tools directory that we build for
1097 # this particular target.
1098 toolset=$iriverbitmaptools
1099 t_cpu="coldfire"
1100 t_manufacturer="iriver"
1101 t_model="h100"
1104 13|ifp7xx)
1105 target_id=19
1106 modelname="ifp7xx"
1107 target="-DIRIVER_IFP7XX"
1108 memory=1
1109 arm7tdmicc short
1110 tool="cp"
1111 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1112 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1113 output="rockbox.wma"
1114 appextra="recorder:gui"
1115 plugins="yes"
1116 swcodec="yes"
1117 # toolset is the tools within the tools directory that we build for
1118 # this particular target.
1119 toolset=$genericbitmaptools
1120 t_cpu="arm"
1121 t_manufacturer="pnx0101"
1122 t_model="iriver-ifp7xx"
1125 14|h10)
1126 target_id=22
1127 modelname="h10"
1128 target="-DIRIVER_H10"
1129 memory=32 # always
1130 arm7tdmicc
1131 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1132 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1133 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1134 output="rockbox.mi4"
1135 appextra="recorder:gui"
1136 plugins="yes"
1137 swcodec="yes"
1138 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1139 bootoutput="H10_20GC.mi4"
1140 # toolset is the tools within the tools directory that we build for
1141 # this particular target.
1142 toolset=$scramblebitmaptools
1143 # architecture, manufacturer and model for the target-tree build
1144 t_cpu="arm"
1145 t_manufacturer="iriver"
1146 t_model="h10"
1149 15|h10_5gb)
1150 target_id=24
1151 modelname="h10_5gb"
1152 target="-DIRIVER_H10_5GB"
1153 memory=32 # always
1154 arm7tdmicc
1155 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1156 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1157 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1158 output="rockbox.mi4"
1159 appextra="recorder:gui"
1160 plugins="yes"
1161 swcodec="yes"
1162 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1163 bootoutput="H10.mi4"
1164 # toolset is the tools within the tools directory that we build for
1165 # this particular target.
1166 toolset=$scramblebitmaptools
1167 # architecture, manufacturer and model for the target-tree build
1168 t_cpu="arm"
1169 t_manufacturer="iriver"
1170 t_model="h10"
1173 20|ipodcolor)
1174 target_id=13
1175 modelname="ipodcolor"
1176 target="-DIPOD_COLOR"
1177 memory=32 # always
1178 arm7tdmicc
1179 tool="$rootdir/tools/scramble -add=ipco"
1180 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1181 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1182 output="rockbox.ipod"
1183 appextra="recorder:gui"
1184 plugins="yes"
1185 swcodec="yes"
1186 bootoutput="bootloader-$modelname.ipod"
1187 # toolset is the tools within the tools directory that we build for
1188 # this particular target.
1189 toolset=$ipodbitmaptools
1190 # architecture, manufacturer and model for the target-tree build
1191 t_cpu="arm"
1192 t_manufacturer="ipod"
1193 t_model="color"
1196 21|ipodnano)
1197 target_id=14
1198 modelname="ipodnano"
1199 target="-DIPOD_NANO"
1200 memory=32 # always
1201 arm7tdmicc
1202 tool="$rootdir/tools/scramble -add=nano"
1203 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1204 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1205 output="rockbox.ipod"
1206 appextra="recorder:gui"
1207 plugins="yes"
1208 swcodec="yes"
1209 bootoutput="bootloader-$modelname.ipod"
1210 # toolset is the tools within the tools directory that we build for
1211 # this particular target.
1212 toolset=$ipodbitmaptools
1213 # architecture, manufacturer and model for the target-tree build
1214 t_cpu="arm"
1215 t_manufacturer="ipod"
1216 t_model="nano"
1219 22|ipodvideo)
1220 target_id=15
1221 modelname="ipodvideo"
1222 target="-DIPOD_VIDEO"
1223 arm7tdmicc
1224 tool="$rootdir/tools/scramble -add=ipvd"
1225 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1226 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1227 output="rockbox.ipod"
1228 appextra="recorder:gui"
1229 plugins="yes"
1230 swcodec="yes"
1231 bootoutput="bootloader-$modelname.ipod"
1232 # toolset is the tools within the tools directory that we build for
1233 # this particular target.
1234 toolset=$ipodbitmaptools
1235 # architecture, manufacturer and model for the target-tree build
1236 t_cpu="arm"
1237 t_manufacturer="ipod"
1238 t_model="video"
1241 23|ipod3g)
1242 target_id=16
1243 modelname="ipod3g"
1244 target="-DIPOD_3G"
1245 memory=32 # always
1246 arm7tdmicc
1247 tool="$rootdir/tools/scramble -add=ip3g"
1248 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1249 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1250 output="rockbox.ipod"
1251 appextra="recorder:gui"
1252 plugins="yes"
1253 swcodec="yes"
1254 bootoutput="bootloader-$modelname.ipod"
1255 # toolset is the tools within the tools directory that we build for
1256 # this particular target.
1257 toolset=$ipodbitmaptools
1258 # architecture, manufacturer and model for the target-tree build
1259 t_cpu="arm"
1260 t_manufacturer="ipod"
1261 t_model="3g"
1264 24|ipod4g)
1265 target_id=17
1266 modelname="ipod4g"
1267 target="-DIPOD_4G"
1268 memory=32 # always
1269 arm7tdmicc
1270 tool="$rootdir/tools/scramble -add=ip4g"
1271 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1272 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1273 output="rockbox.ipod"
1274 appextra="recorder:gui"
1275 plugins="yes"
1276 swcodec="yes"
1277 bootoutput="bootloader-$modelname.ipod"
1278 # toolset is the tools within the tools directory that we build for
1279 # this particular target.
1280 toolset=$ipodbitmaptools
1281 # architecture, manufacturer and model for the target-tree build
1282 t_cpu="arm"
1283 t_manufacturer="ipod"
1284 t_model="4g"
1287 25|ipodmini)
1288 target_id=18
1289 modelname="ipodmini"
1290 target="-DIPOD_MINI"
1291 memory=32 # always
1292 arm7tdmicc
1293 tool="$rootdir/tools/scramble -add=mini"
1294 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1295 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1296 output="rockbox.ipod"
1297 appextra="recorder:gui"
1298 plugins="yes"
1299 swcodec="yes"
1300 bootoutput="bootloader-$modelname.ipod"
1301 # toolset is the tools within the tools directory that we build for
1302 # this particular target.
1303 toolset=$ipodbitmaptools
1304 # architecture, manufacturer and model for the target-tree build
1305 t_cpu="arm"
1306 t_manufacturer="ipod"
1307 t_model="mini"
1310 26|ipodmini2g)
1311 target_id=21
1312 modelname="ipodmini2g"
1313 target="-DIPOD_MINI2G"
1314 memory=32 # always
1315 arm7tdmicc
1316 tool="$rootdir/tools/scramble -add=mn2g"
1317 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1318 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1319 output="rockbox.ipod"
1320 appextra="recorder:gui"
1321 plugins="yes"
1322 swcodec="yes"
1323 bootoutput="bootloader-$modelname.ipod"
1324 # toolset is the tools within the tools directory that we build for
1325 # this particular target.
1326 toolset=$ipodbitmaptools
1327 # architecture, manufacturer and model for the target-tree build
1328 t_cpu="arm"
1329 t_manufacturer="ipod"
1330 t_model="mini2g"
1333 27|ipod1g2g)
1334 target_id=29
1335 modelname="ipod1g2g"
1336 target="-DIPOD_1G2G"
1337 memory=32 # always
1338 arm7tdmicc
1339 tool="$rootdir/tools/scramble -add=1g2g"
1340 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1341 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1342 output="rockbox.ipod"
1343 appextra="recorder:gui"
1344 plugins="yes"
1345 swcodec="yes"
1346 bootoutput="bootloader-$modelname.ipod"
1347 # toolset is the tools within the tools directory that we build for
1348 # this particular target.
1349 toolset=$ipodbitmaptools
1350 # architecture, manufacturer and model for the target-tree build
1351 t_cpu="arm"
1352 t_manufacturer="ipod"
1353 t_model="1g2g"
1356 28|ipodnano2g)
1357 target_id=62
1358 modelname="ipodnano2g"
1359 target="-DIPOD_NANO2G"
1360 memory=32 # always
1361 arm940tcc
1362 tool="$rootdir/tools/scramble -add=nn2g"
1363 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1364 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1365 output="rockbox.ipod"
1366 appextra="recorder:gui"
1367 plugins="yes"
1368 swcodec="yes"
1369 boottool="cp"
1370 bootoutput="bootloader-$modelname.bin"
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="s5l8700"
1377 t_model="ipodnano2g"
1380 30|x5)
1381 target_id=12
1382 modelname="x5"
1383 target="-DIAUDIO_X5"
1384 memory=16 # always
1385 coldfirecc
1386 tool="$rootdir/tools/scramble -add=iax5"
1387 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1388 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1389 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1390 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1391 output="rockbox.iaudio"
1392 appextra="recorder:gui"
1393 plugins="yes"
1394 swcodec="yes"
1395 # toolset is the tools within the tools directory that we build for
1396 # this particular target.
1397 toolset="$iaudiobitmaptools"
1398 # architecture, manufacturer and model for the target-tree build
1399 t_cpu="coldfire"
1400 t_manufacturer="iaudio"
1401 t_model="x5"
1404 31|m5)
1405 target_id=28
1406 modelname="m5"
1407 target="-DIAUDIO_M5"
1408 memory=16 # always
1409 coldfirecc
1410 tool="$rootdir/tools/scramble -add=iam5"
1411 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1412 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1413 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1414 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1415 output="rockbox.iaudio"
1416 appextra="recorder:gui"
1417 plugins="yes"
1418 swcodec="yes"
1419 # toolset is the tools within the tools directory that we build for
1420 # this particular target.
1421 toolset="$iaudiobitmaptools"
1422 # architecture, manufacturer and model for the target-tree build
1423 t_cpu="coldfire"
1424 t_manufacturer="iaudio"
1425 t_model="m5"
1428 32|iaudio7)
1429 target_id=32
1430 modelname="iaudio7"
1431 target="-DIAUDIO_7"
1432 memory=16 # always
1433 arm946cc
1434 tool="$rootdir/tools/scramble -add=i7"
1435 boottool="$rootdir/tools/scramble -tcc=crc"
1436 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1437 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1438 output="rockbox.iaudio"
1439 appextra="recorder:gui"
1440 plugins="yes"
1441 swcodec="yes"
1442 bootoutput="I7_FW.BIN"
1443 # toolset is the tools within the tools directory that we build for
1444 # this particular target.
1445 toolset="$tccbitmaptools"
1446 # architecture, manufacturer and model for the target-tree build
1447 t_cpu="arm"
1448 t_manufacturer="tcc77x"
1449 t_model="iaudio7"
1452 33|cowond2)
1453 target_id=34
1454 modelname="cowond2"
1455 target="-DCOWON_D2"
1456 memory=32
1457 arm926ejscc
1458 tool="$rootdir/tools/scramble -add=d2"
1459 boottool="$rootdir/tools/scramble -tcc=crc"
1460 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1461 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1462 output="rockbox.d2"
1463 appextra="recorder:gui"
1464 plugins="yes"
1465 swcodec="yes"
1466 toolset="$tccbitmaptools"
1467 # architecture, manufacturer and model for the target-tree build
1468 t_cpu="arm"
1469 t_manufacturer="tcc780x"
1470 t_model="cowond2"
1473 34|m3)
1474 target_id=37
1475 modelname="m3"
1476 target="-DIAUDIO_M3"
1477 memory=16 # always
1478 coldfirecc
1479 tool="$rootdir/tools/scramble -add=iam3"
1480 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1481 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1482 output="rockbox.iaudio"
1483 appextra="recorder:gui"
1484 plugins="yes"
1485 swcodec="yes"
1486 # toolset is the tools within the tools directory that we build for
1487 # this particular target.
1488 toolset="$iaudiobitmaptools"
1489 # architecture, manufacturer and model for the target-tree build
1490 t_cpu="coldfire"
1491 t_manufacturer="iaudio"
1492 t_model="m3"
1495 40|gigabeatf)
1496 target_id=20
1497 modelname="gigabeatf"
1498 target="-DGIGABEAT_F"
1499 memory=32 # always
1500 arm9tdmicc
1501 tool="$rootdir/tools/scramble -add=giga"
1502 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1503 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1504 output="rockbox.gigabeat"
1505 appextra="recorder:gui"
1506 plugins="yes"
1507 swcodec="yes"
1508 toolset=$gigabeatbitmaptools
1509 boottool="$rootdir/tools/scramble -gigabeat"
1510 bootoutput="FWIMG01.DAT"
1511 # architecture, manufacturer and model for the target-tree build
1512 t_cpu="arm"
1513 t_manufacturer="s3c2440"
1514 t_model="gigabeat-fx"
1517 41|gigabeats)
1518 target_id=26
1519 modelname="gigabeats"
1520 target="-DGIGABEAT_S"
1521 memory=64
1522 arm1136jfscc
1523 tool="$rootdir/tools/scramble -add=gigs"
1524 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1525 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1526 output="rockbox.gigabeat"
1527 appextra="recorder:gui"
1528 plugins="yes"
1529 swcodec="yes"
1530 toolset="$gigabeatbitmaptools mknkboot"
1531 boottool="$rootdir/tools/scramble -gigabeats"
1532 bootoutput="nk.bin"
1533 # architecture, manufacturer and model for the target-tree build
1534 t_cpu="arm"
1535 t_manufacturer="imx31"
1536 t_model="gigabeat-s"
1539 70|mrobe500)
1540 target_id=36
1541 modelname="mrobe500"
1542 target="-DMROBE_500"
1543 memory=64 # always
1544 arm926ejscc
1545 tool="$rootdir/tools/scramble -add=m500"
1546 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1547 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1548 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1549 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1550 output="rockbox.mrobe500"
1551 appextra="recorder:gui"
1552 plugins="yes"
1553 swcodec="yes"
1554 toolset=$gigabeatbitmaptools
1555 boottool="cp "
1556 bootoutput="rockbox.mrboot"
1557 # architecture, manufacturer and model for the target-tree build
1558 t_cpu="arm"
1559 t_manufacturer="tms320dm320"
1560 t_model="mrobe-500"
1563 71|mrobe100)
1564 target_id=33
1565 modelname="mrobe100"
1566 target="-DMROBE_100"
1567 memory=32 # always
1568 arm7tdmicc
1569 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1570 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1571 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1572 output="rockbox.mi4"
1573 appextra="recorder:gui"
1574 plugins="yes"
1575 swcodec="yes"
1576 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1577 bootoutput="pp5020.mi4"
1578 # toolset is the tools within the tools directory that we build for
1579 # this particular target.
1580 toolset=$scramblebitmaptools
1581 # architecture, manufacturer and model for the target-tree build
1582 t_cpu="arm"
1583 t_manufacturer="olympus"
1584 t_model="mrobe-100"
1587 80|logikdax)
1588 target_id=31
1589 modelname="logikdax"
1590 target="-DLOGIK_DAX"
1591 memory=2 # always
1592 arm946cc
1593 tool="$rootdir/tools/scramble -add=ldax"
1594 boottool="$rootdir/tools/scramble -tcc=crc"
1595 bootoutput="player.rom"
1596 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1597 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1598 output="rockbox.logik"
1599 appextra="recorder:gui"
1600 plugins=""
1601 swcodec="yes"
1602 # toolset is the tools within the tools directory that we build for
1603 # this particular target.
1604 toolset=$tccbitmaptools
1605 # architecture, manufacturer and model for the target-tree build
1606 t_cpu="arm"
1607 t_manufacturer="tcc77x"
1608 t_model="logikdax"
1611 90|creativezvm30gb)
1612 target_id=35
1613 modelname="creativezvm30"
1614 target="-DCREATIVE_ZVM"
1615 memory=64
1616 arm926ejscc
1617 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1618 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1619 tool="$rootdir/tools/scramble -creative=zvm"
1620 USE_ELF="yes"
1621 output="rockbox.zvm"
1622 appextra="recorder:gui"
1623 plugins="yes"
1624 swcodec="yes"
1625 toolset=$ipodbitmaptools
1626 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1627 bootoutput="rockbox.zvmboot"
1628 # architecture, manufacturer and model for the target-tree build
1629 t_cpu="arm"
1630 t_manufacturer="tms320dm320"
1631 t_model="creative-zvm"
1634 91|creativezvm60gb)
1635 target_id=40
1636 modelname="creativezvm60"
1637 target="-DCREATIVE_ZVM60GB"
1638 memory=64
1639 arm926ejscc
1640 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1641 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1642 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1643 USE_ELF="yes"
1644 output="rockbox.zvm60"
1645 appextra="recorder:gui"
1646 plugins="yes"
1647 swcodec="yes"
1648 toolset=$ipodbitmaptools
1649 boottool="$rootdir/tools/scramble -creative=zvm60"
1650 bootoutput="rockbox.zvm60boot"
1651 # architecture, manufacturer and model for the target-tree build
1652 t_cpu="arm"
1653 t_manufacturer="tms320dm320"
1654 t_model="creative-zvm"
1657 92|creativezenvision)
1658 target_id=39
1659 modelname="creativezv"
1660 target="-DCREATIVE_ZV"
1661 memory=64
1662 arm926ejscc
1663 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1664 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1665 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1666 USE_ELF="yes"
1667 output="rockbox.zv"
1668 appextra="recorder:gui"
1669 plugins=""
1670 swcodec="yes"
1671 toolset=$ipodbitmaptools
1672 boottool="$rootdir/tools/scramble -creative=zenvision"
1673 bootoutput="rockbox.zvboot"
1674 # architecture, manufacturer and model for the target-tree build
1675 t_cpu="arm"
1676 t_manufacturer="tms320dm320"
1677 t_model="creative-zvm"
1680 50|e200)
1681 target_id=23
1682 modelname="e200"
1683 target="-DSANSA_E200"
1684 memory=32 # supposedly
1685 arm7tdmicc
1686 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1687 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1688 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1689 output="rockbox.mi4"
1690 appextra="recorder:gui"
1691 plugins="yes"
1692 swcodec="yes"
1693 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1694 bootoutput="PP5022.mi4"
1695 # toolset is the tools within the tools directory that we build for
1696 # this particular target.
1697 toolset=$scramblebitmaptools
1698 # architecture, manufacturer and model for the target-tree build
1699 t_cpu="arm"
1700 t_manufacturer="sandisk"
1701 t_model="sansa-e200"
1704 51|e200r)
1705 # the e200R model is pretty much identical to the e200, it only has a
1706 # different option to the scramble tool when building a bootloader and
1707 # makes the bootloader output file name in all lower case.
1708 target_id=27
1709 modelname="e200r"
1710 target="-DSANSA_E200"
1711 memory=32 # supposedly
1712 arm7tdmicc
1713 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1714 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1715 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1716 output="rockbox.mi4"
1717 appextra="recorder:gui"
1718 plugins="yes"
1719 swcodec="yes"
1720 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1721 bootoutput="pp5022.mi4"
1722 # toolset is the tools within the tools directory that we build for
1723 # this particular target.
1724 toolset=$scramblebitmaptools
1725 # architecture, manufacturer and model for the target-tree build
1726 t_cpu="arm"
1727 t_manufacturer="sandisk"
1728 t_model="sansa-e200"
1731 52|c200)
1732 target_id=30
1733 modelname="c200"
1734 target="-DSANSA_C200"
1735 memory=32 # supposedly
1736 arm7tdmicc
1737 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1738 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1739 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1740 output="rockbox.mi4"
1741 appextra="recorder:gui"
1742 plugins="yes"
1743 swcodec="yes"
1744 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1745 bootoutput="firmware.mi4"
1746 # toolset is the tools within the tools directory that we build for
1747 # this particular target.
1748 toolset=$scramblebitmaptools
1749 # architecture, manufacturer and model for the target-tree build
1750 t_cpu="arm"
1751 t_manufacturer="sandisk"
1752 t_model="sansa-c200"
1755 53|m200)
1756 target_id=48
1757 modelname="m200"
1758 target="-DSANSA_M200"
1759 memory=1 # always
1760 arm946cc
1761 tool="$rootdir/tools/scramble -add=m200"
1762 boottool="$rootdir/tools/scramble -tcc=crc"
1763 bootoutput="player.rom"
1764 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1765 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1766 output="rockbox.m200"
1767 appextra="recorder:gui"
1768 plugins=""
1769 swcodec="yes"
1770 # toolset is the tools within the tools directory that we build for
1771 # this particular target.
1772 toolset=$tccbitmaptools
1773 # architecture, manufacturer and model for the target-tree build
1774 t_cpu="arm"
1775 t_manufacturer="tcc77x"
1776 t_model="m200"
1779 54|c100)
1780 target_id=42
1781 modelname="c100"
1782 target="-DSANSA_C100"
1783 memory=2
1784 arm946cc
1785 tool="$rootdir/tools/scramble -add=c100"
1786 boottool="$rootdir/tools/scramble -tcc=crc"
1787 bootoutput="player.rom"
1788 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1789 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1790 output="rockbox.c100"
1791 appextra="recorder:gui"
1792 plugins=""
1793 swcodec="yes"
1794 # toolset is the tools within the tools directory that we build for
1795 # this particular target.
1796 toolset=$tccbitmaptools
1797 # architecture, manufacturer and model for the target-tree build
1798 t_cpu="arm"
1799 t_manufacturer="tcc77x"
1800 t_model="c100"
1803 55|Clip|clip)
1804 target_id=50
1805 modelname="clip"
1806 target="-DSANSA_CLIP"
1807 memory=2
1808 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1809 bmp2rb_native="$bmp2rb_mono"
1810 tool="$rootdir/tools/scramble -add=clip"
1811 output="rockbox.sansa"
1812 bootoutput="bootloader-clip.sansa"
1813 appextra="recorder:gui"
1814 plugins="yes"
1815 swcodec="yes"
1816 toolset=$scramblebitmaptools
1817 t_cpu="arm"
1818 t_manufacturer="as3525"
1819 t_model="sansa-clip"
1820 arm9tdmicc
1824 56|e200v2)
1825 target_id=51
1826 modelname="e200v2"
1827 target="-DSANSA_E200V2"
1828 memory=8
1829 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1830 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1831 tool="$rootdir/tools/scramble -add=e2v2"
1832 output="rockbox.sansa"
1833 bootoutput="bootloader-e200v2.sansa"
1834 appextra="recorder:gui"
1835 plugins="yes"
1836 swcodec="yes"
1837 toolset=$scramblebitmaptools
1838 t_cpu="arm"
1839 t_manufacturer="as3525"
1840 t_model="sansa-e200v2"
1841 arm9tdmicc
1845 57|m200v4)
1846 target_id=52
1847 modelname="m200v4"
1848 target="-DSANSA_M200V4"
1849 memory=2
1850 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1851 bmp2rb_native="$bmp2rb_mono"
1852 tool="$rootdir/tools/scramble -add=m2v4"
1853 output="rockbox.sansa"
1854 bootoutput="bootloader-m200v4.sansa"
1855 appextra="recorder:gui"
1856 plugins="yes"
1857 swcodec="yes"
1858 toolset=$scramblebitmaptools
1859 t_cpu="arm"
1860 t_manufacturer="as3525"
1861 t_model="sansa-m200v4"
1862 arm9tdmicc
1866 58|fuze)
1867 target_id=53
1868 modelname="fuze"
1869 target="-DSANSA_FUZE"
1870 memory=8
1871 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1872 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1873 tool="$rootdir/tools/scramble -add=fuze"
1874 output="rockbox.sansa"
1875 bootoutput="bootloader-fuze.sansa"
1876 appextra="recorder:gui"
1877 plugins="yes"
1878 swcodec="yes"
1879 toolset=$scramblebitmaptools
1880 t_cpu="arm"
1881 t_manufacturer="as3525"
1882 t_model="sansa-fuze"
1883 arm9tdmicc
1887 59|c200v2)
1888 target_id=55
1889 modelname="c200v2"
1890 target="-DSANSA_C200V2"
1891 memory=2 # as per OF diagnosis mode
1892 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1893 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1894 tool="$rootdir/tools/scramble -add=c2v2"
1895 output="rockbox.sansa"
1896 bootoutput="bootloader-c200v2.sansa"
1897 appextra="recorder:gui"
1898 plugins="yes"
1899 swcodec="yes"
1900 # toolset is the tools within the tools directory that we build for
1901 # this particular target.
1902 toolset=$scramblebitmaptools
1903 # architecture, manufacturer and model for the target-tree build
1904 t_cpu="arm"
1905 t_manufacturer="as3525"
1906 t_model="sansa-c200v2"
1907 arm9tdmicc
1910 60|Clipv2|clipv2)
1911 echo "Sansa Clipv2 is not yet supported !"
1912 exit 1
1913 target_id=60
1914 modelname="clipv2"
1915 target="-DSANSA_CLIPV2"
1916 memory=8
1917 arm926ejscc
1918 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1919 bmp2rb_native="$bmp2rb_mono"
1920 tool="$rootdir/tools/scramble -add=clv2"
1921 output="rockbox.sansa"
1922 bootoutput="bootloader-clipv2.sansa"
1923 appextra="recorder:gui"
1924 plugins="yes"
1925 swcodec="yes"
1926 toolset=$scramblebitmaptools
1927 t_cpu="arm"
1928 t_manufacturer="as3525"
1929 t_model="sansa-clipv2"
1932 61|view)
1933 echo "Sansa View is net yet supported!"
1934 exit 1
1935 target_id=63
1936 modelname="view"
1937 target="-DSANSA_VIEW"
1938 memory=32
1939 arm1176jzscc
1940 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1941 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1942 output="rockbox.mi4"
1943 appextra="gui"
1944 plugins=""
1945 swcodec="yes"
1946 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
1947 bootoutput="firmware.mi4"
1948 # toolset is the tools within the tools directory that we build for
1949 # this particular target.
1950 toolset=$scramblebitmaptools
1951 t_cpu="arm"
1952 t_manufacturer="sandisk"
1953 t_model="sansa-view"
1956 150|tpj1022)
1957 target_id=25
1958 modelname="tpj1022"
1959 target="-DELIO_TPJ1022"
1960 memory=32 # always
1961 arm7tdmicc
1962 tool="$rootdir/tools/scramble -add tpj2"
1963 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1964 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1965 output="rockbox.elio"
1966 appextra="recorder:gui"
1967 plugins="yes"
1968 swcodec="yes"
1969 boottool="$rootdir/tools/scramble -mi4v2"
1970 bootoutput="pp5020.mi4"
1971 # toolset is the tools within the tools directory that we build for
1972 # this particular target.
1973 toolset=$scramblebitmaptools
1974 # architecture, manufacturer and model for the target-tree build
1975 t_cpu="arm"
1976 t_manufacturer="tatung"
1977 t_model="tpj1022"
1980 100|sa9200)
1981 target_id=41
1982 modelname="sa9200"
1983 target="-DPHILIPS_SA9200"
1984 memory=32 # supposedly
1985 arm7tdmicc
1986 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
1987 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1988 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1989 output="rockbox.mi4"
1990 appextra="recorder:gui"
1991 plugins=""
1992 swcodec="yes"
1993 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
1994 bootoutput="FWImage.ebn"
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="philips"
2001 t_model="sa9200"
2004 101|hdd1630)
2005 target_id=43
2006 modelname="hdd1630"
2007 target="-DPHILIPS_HDD1630"
2008 memory=32 # supposedly
2009 arm7tdmicc
2010 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2011 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2012 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2013 output="rockbox.mi4"
2014 appextra="recorder:gui"
2015 plugins="yes"
2016 swcodec="yes"
2017 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2018 bootoutput="FWImage.ebn"
2019 # toolset is the tools within the tools directory that we build for
2020 # this particular target.
2021 toolset=$scramblebitmaptools
2022 # architecture, manufacturer and model for the target-tree build
2023 t_cpu="arm"
2024 t_manufacturer="philips"
2025 t_model="hdd1630"
2028 110|meizum6sl)
2029 target_id=49
2030 modelname="meizum6sl"
2031 target="-DMEIZU_M6SL"
2032 memory=16 # always
2033 arm940tbecc
2034 tool="cp"
2035 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2036 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2037 output="rockbox.meizu"
2038 appextra="recorder:gui"
2039 plugins="no" #FIXME
2040 swcodec="yes"
2041 toolset=$genericbitmaptools
2042 boottool="cp"
2043 bootoutput="rockboot.ebn"
2044 # architecture, manufacturer and model for the target-tree build
2045 t_cpu="arm"
2046 t_manufacturer="s5l8700"
2047 t_model="meizu-m6sl"
2050 111|meizum6sp)
2051 target_id=46
2052 modelname="meizum6sp"
2053 target="-DMEIZU_M6SP"
2054 memory=16 # always
2055 arm940tbecc
2056 tool="cp"
2057 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2058 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2059 output="rockbox.meizu"
2060 appextra="recorder:gui"
2061 plugins="no" #FIXME
2062 swcodec="yes"
2063 toolset=$genericbitmaptools
2064 boottool="cp"
2065 bootoutput="rockboot.ebn"
2066 # architecture, manufacturer and model for the target-tree build
2067 t_cpu="arm"
2068 t_manufacturer="s5l8700"
2069 t_model="meizu-m6sp"
2072 112|meizum3)
2073 target_id=47
2074 modelname="meizum3"
2075 target="-DMEIZU_M3"
2076 memory=16 # always
2077 arm940tbecc
2078 tool="cp"
2079 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2080 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2081 output="rockbox.meizu"
2082 appextra="recorder:gui"
2083 plugins="no" #FIXME
2084 swcodec="yes"
2085 toolset=$genericbitmaptools
2086 boottool="cp"
2087 bootoutput="rockboot.ebn"
2088 # architecture, manufacturer and model for the target-tree build
2089 t_cpu="arm"
2090 t_manufacturer="s5l8700"
2091 t_model="meizu-m3"
2094 120|ondavx747)
2095 target_id=44
2096 modelname="ondavx747"
2097 target="-DONDA_VX747"
2098 memory=16
2099 mipselcc
2100 tool="$rootdir/tools/scramble -add=x747"
2101 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2102 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2103 output="rockbox.vx747"
2104 appextra="recorder:gui"
2105 plugins="yes"
2106 swcodec="yes"
2107 toolset=$genericbitmaptools
2108 boottool="cp"
2109 bootoutput="rockboot.vx747"
2110 # architecture, manufacturer and model for the target-tree build
2111 t_cpu="mips"
2112 t_manufacturer="ingenic_jz47xx"
2113 t_model="onda_vx747"
2116 121|ondavx767)
2117 target_id=45
2118 modelname="ondavx767"
2119 target="-DONDA_VX767"
2120 memory=16 #FIXME
2121 mipselcc
2122 tool="cp"
2123 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2124 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2125 output="rockbox.vx767"
2126 appextra="recorder:gui"
2127 plugins="" #FIXME
2128 swcodec="yes"
2129 toolset=$genericbitmaptools
2130 boottool="cp"
2131 bootoutput="rockboot.vx767"
2132 # architecture, manufacturer and model for the target-tree build
2133 t_cpu="mips"
2134 t_manufacturer="ingenic_jz47xx"
2135 t_model="onda_vx767"
2138 122|ondavx747p)
2139 target_id=54
2140 modelname="ondavx747p"
2141 target="-DONDA_VX747P"
2142 memory=16
2143 mipselcc
2144 tool="$rootdir/tools/scramble -add=747p"
2145 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2146 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2147 output="rockbox.vx747p"
2148 appextra="recorder:gui"
2149 plugins="yes"
2150 swcodec="yes"
2151 toolset=$genericbitmaptools
2152 boottool="cp"
2153 bootoutput="rockboot.vx747p"
2154 # architecture, manufacturer and model for the target-tree build
2155 t_cpu="mips"
2156 t_manufacturer="ingenic_jz47xx"
2157 t_model="onda_vx747"
2160 123|ondavx777)
2161 target_id=61
2162 modelname="ondavx777"
2163 target="-DONDA_VX777"
2164 memory=16
2165 mipselcc
2166 tool="$rootdir/tools/scramble -add=x777"
2167 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2168 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2169 output="rockbox.vx777"
2170 appextra="recorder:gui"
2171 plugins="" #TODO
2172 swcodec="yes"
2173 toolset=$genericbitmaptools
2174 boottool="cp"
2175 bootoutput="rockboot.vx777"
2176 # architecture, manufacturer and model for the target-tree build
2177 t_cpu="mips"
2178 t_manufacturer="ingenic_jz47xx"
2179 t_model="onda_vx747"
2182 130|lyre_proto1)
2183 target_id=56
2184 modelname="lyre_proto1"
2185 target="-DLYRE_PROTO1"
2186 memory=64
2187 arm926ejscc
2188 tool="cp"
2189 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2190 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2191 output="rockbox.lyre"
2192 appextra="recorder:gui"
2193 plugins=""
2194 swcodec="yes"
2195 toolset=$scramblebitmaptools
2196 boottool="cp"
2197 bootoutput="bootloader-proto1.lyre"
2198 # architecture, manufacturer and model for the target-tree build
2199 t_cpu="arm"
2200 t_manufacturer="at91sam"
2201 t_model="lyre_proto1"
2204 140|yh_820)
2205 target_id=57
2206 modelname="yh_820"
2207 target="-DSAMSUNG_YH820"
2208 memory=32 # always
2209 arm7tdmicc
2210 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2211 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2212 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2213 output="rockbox.mi4"
2214 appextra="recorder:gui"
2215 plugins=""
2216 swcodec="yes"
2217 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2218 bootoutput="FW_YH820.mi4"
2219 # toolset is the tools within the tools directory that we build for
2220 # this particular target.
2221 toolset=$scramblebitmaptools
2222 # architecture, manufacturer and model for the target-tree build
2223 t_cpu="arm"
2224 t_manufacturer="samsung"
2225 t_model="yh820"
2228 141|yh_920)
2229 target_id=58
2230 modelname="yh_920"
2231 target="-DSAMSUNG_YH920"
2232 memory=32 # always
2233 arm7tdmicc
2234 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2235 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2236 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2237 output="rockbox.mi4"
2238 appextra="recorder:gui"
2239 plugins=""
2240 swcodec="yes"
2241 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2242 bootoutput="PP5020.mi4"
2243 # toolset is the tools within the tools directory that we build for
2244 # this particular target.
2245 toolset=$scramblebitmaptools
2246 # architecture, manufacturer and model for the target-tree build
2247 t_cpu="arm"
2248 t_manufacturer="samsung"
2249 t_model="yh920"
2252 142|yh_925)
2253 target_id=59
2254 modelname="yh_925"
2255 target="-DSAMSUNG_YH925"
2256 memory=32 # always
2257 arm7tdmicc
2258 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2259 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2260 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2261 output="rockbox.mi4"
2262 appextra="recorder:gui"
2263 plugins=""
2264 swcodec="yes"
2265 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2266 bootoutput="FW_YH925.mi4"
2267 # toolset is the tools within the tools directory that we build for
2268 # this particular target.
2269 toolset=$scramblebitmaptools
2270 # architecture, manufacturer and model for the target-tree build
2271 t_cpu="arm"
2272 t_manufacturer="samsung"
2273 t_model="yh925"
2277 echo "Please select a supported target platform!"
2278 exit 7
2281 esac
2283 echo "Platform set to $modelname"
2286 #remove start
2287 ############################################################################
2288 # Amount of memory, for those that can differ. They have $memory unset at
2289 # this point.
2292 if [ -z "$memory" ]; then
2293 case $target_id in
2295 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2296 if [ "1" != `parse_args --ram` ]; then
2297 size=`parse_args --ram`;
2298 else
2299 size=`input`;
2301 case $size in
2302 60|64)
2303 memory="64"
2306 memory="32"
2308 esac
2311 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2312 if [ "1" != `parse_args --ram` ]; then
2313 size=`parse_args --ram`;
2314 else
2315 size=`input`;
2317 case $size in
2319 memory="8"
2322 memory="2"
2324 esac
2326 esac
2327 echo "Memory size selected: $memory MB"
2328 echo ""
2330 #remove end
2332 ##################################################################
2333 # Figure out build "type"
2336 # the ifp7x0 is the only platform that supports building a gdb stub like
2337 # this
2338 case $modelname in
2339 ifp7xx)
2340 gdbstub="(G)DB stub, "
2342 e200r|e200)
2343 gdbstub="(I)nstaller, "
2345 c200)
2346 gdbstub="(E)raser, "
2350 esac
2351 if [ "1" != `parse_args --type` ]; then
2352 btype=`parse_args --type`;
2353 else
2354 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual: (Defaults to N)"
2355 btype=`input`;
2358 case $btype in
2359 [Ii])
2360 appsdir='\$(ROOTDIR)/bootloader'
2361 apps="bootloader"
2362 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2363 bootloader="1"
2364 echo "e200R-installer build selected"
2366 [Ee])
2367 appsdir='\$(ROOTDIR)/bootloader'
2368 apps="bootloader"
2369 echo "C2(4)0 or C2(5)0"
2370 variant=`input`
2371 case $variant in
2373 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2374 echo "c240 eraser build selected"
2377 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2378 echo "c240 eraser build selected"
2380 esac
2381 bootloader="1"
2382 echo "c200 eraser build selected"
2384 [Bb])
2385 if test $t_manufacturer = "archos"; then
2386 # Archos SH-based players do this somewhat differently for
2387 # some reason
2388 appsdir='\$(ROOTDIR)/flash/bootbox'
2389 apps="bootbox"
2390 else
2391 appsdir='\$(ROOTDIR)/bootloader'
2392 apps="bootloader"
2393 flash=""
2394 if test -n "$boottool"; then
2395 tool="$boottool"
2397 if test -n "$bootoutput"; then
2398 output=$bootoutput
2401 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2402 bootloader="1"
2403 echo "Bootloader build selected"
2405 [Ss])
2406 debug="-DDEBUG"
2407 simulator="yes"
2408 extradefines="-DSIMULATOR"
2409 archosrom=""
2410 flash=""
2411 echo "Simulator build selected"
2413 [Aa])
2414 echo "Advanced build selected"
2415 whichadvanced
2417 [Gg])
2418 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2419 appsdir='\$(ROOTDIR)/gdb'
2420 apps="stub"
2421 case $modelname in
2422 ifp7xx)
2423 output="stub.wma"
2427 esac
2428 echo "GDB stub build selected"
2430 [Mm])
2431 toolset='';
2432 apps="manual"
2433 echo "Manual build selected"
2436 if [ "$modelname" = "e200r" ]; then
2437 echo "Do not use the e200R target for regular builds. Use e200 instead."
2438 exit 8
2440 debug=""
2441 btype="N" # set it explicitly since RET only gets here as well
2442 echo "Normal build selected"
2445 esac
2446 # to be able running "make manual" from non-manual configuration
2447 case $modelname in
2448 fmrecorder)
2449 manualdev="recorderv2fm"
2451 recorderv2)
2452 manualdev="recorderv2fm"
2454 h1??)
2455 manualdev="h100"
2457 ipodmini2g)
2458 manualdev="ipodmini"
2461 manualdev=$modelname
2463 esac
2465 if [ -z "$debug" ]; then
2466 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2469 echo "Using source code root directory: $rootdir"
2471 # this was once possible to change at build-time, but no more:
2472 language="english"
2474 uname=`uname`
2476 if [ "yes" = "$simulator" ]; then
2477 # setup compiler and things for simulator
2478 simcc
2480 if [ -d "simdisk" ]; then
2481 echo "Subdirectory 'simdisk' already present"
2482 else
2483 mkdir simdisk
2484 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2488 # Now, figure out version number of the (gcc) compiler we are about to use
2489 gccver=`$CC -dumpversion`;
2491 # figure out the binutil version too and display it, mostly for the build
2492 # system etc to be able to see it easier
2493 if [ $uname = "Darwin" ]; then
2494 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2495 else
2496 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2499 if [ -z "$gccver" ]; then
2500 echo "WARNING: The compiler you must use ($CC) is not in your path!"
2501 echo "WARNING: this may cause your build to fail since we cannot do the"
2502 echo "WARNING: checks we want now."
2503 else
2505 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2506 # DEPEND on it
2508 num1=`echo $gccver | cut -d . -f1`
2509 num2=`echo $gccver | cut -d . -f2`
2510 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2512 # This makes:
2513 # 3.3.X => 303
2514 # 3.4.X => 304
2515 # 2.95.3 => 295
2517 echo "Using $CC $gccver ($gccnum)"
2519 if test "$gccnum" -ge "400"; then
2520 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2521 # so we ignore that warnings for now
2522 # -Wno-pointer-sign
2523 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2526 if test "$gccnum" -ge "401"; then
2527 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2528 # will break strict-aliasing rules"
2530 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
2533 if test "$gccnum" -ge "402"; then
2534 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2535 # and later would throw it for several valid cases
2536 GCCOPTS="$GCCOPTS -Wno-override-init"
2539 case $prefix in
2541 # simulator
2543 i586-mingw32msvc-)
2544 # cross-compile for win32
2547 # Verify that the cross-compiler is of a recommended version!
2548 if test "$gccver" != "$gccchoice"; then
2549 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2550 echo "WARNING: version $gccchoice!"
2551 echo "WARNING: This may cause your build to fail since it may be a version"
2552 echo "WARNING: that isn't functional or known to not be the best choice."
2553 echo "WARNING: If you suffer from build problems, you know that this is"
2554 echo "WARNING: a likely source for them..."
2557 esac
2562 echo "Using $LD $ldver"
2564 # check the compiler for SH platforms
2565 if test "$CC" = "sh-elf-gcc"; then
2566 if test "$gccnum" -lt "400"; then
2567 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2568 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2569 else
2570 # figure out patch status
2571 gccpatch=`$CC --version`;
2573 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2574 echo "gcc $gccver is rockbox patched"
2575 # then convert -O to -Os to get smaller binaries!
2576 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2577 else
2578 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2579 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2584 if test "$CC" = "m68k-elf-gcc"; then
2585 # convert -O to -Os to get smaller binaries!
2586 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2589 if [ "1" != `parse_args --ccache` ]; then
2590 echo "Enable ccache for building"
2591 ccache="ccache"
2592 else
2593 if [ "1" = `parse_args --no-ccache` ]; then
2594 ccache=`findtool ccache`
2595 if test -n "$ccache"; then
2596 echo "Found and uses ccache ($ccache)"
2601 # figure out the full path to the various commands if possible
2602 HOSTCC=`findtool gcc --lit`
2603 HOSTAR=`findtool ar --lit`
2604 CC=`findtool ${CC} --lit`
2605 LD=`findtool ${AR} --lit`
2606 AR=`findtool ${AR} --lit`
2607 AS=`findtool ${AS} --lit`
2608 OC=`findtool ${OC} --lit`
2609 WINDRES=`findtool ${WINDRES} --lit`
2610 DLLTOOL=`findtool ${DLLTOOL} --lit`
2611 DLLWRAP=`findtool ${DLLWRAP} --lit`
2612 RANLIB=`findtool ${RANLIB} --lit`
2614 if test -n "$ccache"; then
2615 CC="$ccache $CC"
2618 if test "X$endian" = "Xbig"; then
2619 defendian="ROCKBOX_BIG_ENDIAN"
2620 else
2621 defendian="ROCKBOX_LITTLE_ENDIAN"
2624 if [ "1" != `parse_args --rbdir` ]; then
2625 rbdir=`parse_args --rbdir`;
2626 echo "Using alternate rockbox dir: ${rbdir}"
2629 sed > autoconf.h \
2630 -e "s,@ENDIAN@,${defendian},g" \
2631 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2632 -e "s,@config_rtc@,$config_rtc,g" \
2633 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2634 -e "s,@RBDIR@,${rbdir},g" \
2635 -e "s,@have_backlight@,$have_backlight,g" \
2636 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
2637 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
2638 <<EOF
2639 /* This header was made by configure */
2640 #ifndef __BUILD_AUTOCONF_H
2641 #define __BUILD_AUTOCONF_H
2643 /* Define endianess for the target or simulator platform */
2644 #define @ENDIAN@ 1
2646 /* Define this if you build rockbox to support the logf logging and display */
2647 #undef ROCKBOX_HAS_LOGF
2649 /* optional define for a backlight modded Ondio */
2650 @have_backlight@
2652 /* optional define for FM radio mod for iAudio M5 */
2653 @have_fmradio_in@
2655 /* optional define for ATA poweroff on Player */
2656 @have_ata_poweroff@
2658 /* optional defines for RTC mod for h1x0 */
2659 @config_rtc@
2660 @have_rtc_alarm@
2662 /* root of Rockbox */
2663 #define ROCKBOX_DIR "/@RBDIR@"
2665 #endif /* __BUILD_AUTOCONF_H */
2668 if test -n "$t_cpu"; then
2669 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2670 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2671 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2672 GCCOPTS="$GCCOPTS"
2675 if test "$simulator" = "yes"; then
2676 # add simul make stuff on the #SIMUL# line
2677 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2678 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2679 else
2680 # delete the lines that match
2681 simmagic1='/@SIMUL1@/D'
2682 simmagic2='/@SIMUL2@/D'
2685 if test "$swcodec" = "yes"; then
2686 voicetoolset="rbspeexenc voicefont wavtrim"
2687 else
2688 voicetoolset="voicefont wavtrim"
2691 if test "$apps" = "apps"; then
2692 # only when we build "real" apps we build the .lng files
2693 buildlangs="langs"
2696 #### Fix the cmdline ###
2697 if test -n "$ccache"; then
2698 cmdline="--ccache"
2701 cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype"
2704 ### end of cmdline
2706 sed > Makefile \
2707 -e "s,@ROOTDIR@,${rootdir},g" \
2708 -e "s,@DEBUG@,${debug},g" \
2709 -e "s,@MEMORY@,${memory},g" \
2710 -e "s,@TARGET_ID@,${target_id},g" \
2711 -e "s,@TARGET@,${target},g" \
2712 -e "s,@CPU@,${t_cpu},g" \
2713 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2714 -e "s,@MODELNAME@,${modelname},g" \
2715 -e "s,@LANGUAGE@,${language},g" \
2716 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2717 -e "s,@PWD@,${pwd},g" \
2718 -e "s,@HOSTCC@,${HOSTCC},g" \
2719 -e "s,@HOSTAR@,${HOSTAR},g" \
2720 -e "s,@CC@,${CC},g" \
2721 -e "s,@LD@,${LD},g" \
2722 -e "s,@AR@,${AR},g" \
2723 -e "s,@AS@,${AS},g" \
2724 -e "s,@OC@,${OC},g" \
2725 -e "s,@WINDRES@,${WINDRES},g" \
2726 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2727 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2728 -e "s,@RANLIB@,${RANLIB},g" \
2729 -e "s,@TOOL@,${tool},g" \
2730 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2731 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2732 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2733 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2734 -e "s,@OUTPUT@,${output},g" \
2735 -e "s,@APPEXTRA@,${appextra},g" \
2736 -e "s,@ARCHOSROM@,${archosrom},g" \
2737 -e "s,@FLASHFILE@,${flash},g" \
2738 -e "s,@PLUGINS@,${plugins},g" \
2739 -e "s,@CODECS@,${swcodec},g" \
2740 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2741 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2742 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2743 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2744 -e "s!@LDOPTS@!${LDOPTS}!g" \
2745 -e "s,@LOADADDRESS@,${loadaddress},g" \
2746 -e "s,@EXTRADEF@,${extradefines},g" \
2747 -e "s,@APPSDIR@,${appsdir},g" \
2748 -e "s,@FIRMDIR@,${firmdir},g" \
2749 -e "s,@TOOLSDIR@,${toolsdir},g" \
2750 -e "s,@APPS@,${apps},g" \
2751 -e "s,@SIMVER@,${simver},g" \
2752 -e "s,@GCCVER@,${gccver},g" \
2753 -e "s,@GCCNUM@,${gccnum},g" \
2754 -e "s,@UNAME@,${uname},g" \
2755 -e "s,@ENDIAN@,${defendian},g" \
2756 -e "s,@TOOLSET@,${toolset},g" \
2757 -e "${simmagic1}" \
2758 -e "${simmagic2}" \
2759 -e "s,@MANUALDEV@,${manualdev},g" \
2760 -e "s,@ENCODER@,${ENC_CMD},g" \
2761 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2762 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2763 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2764 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2765 -e "s,@LANGS@,${buildlangs},g" \
2766 -e "s,@USE_ELF@,${USE_ELF},g" \
2767 -e "s,@RBDIR@,${rbdir},g" \
2768 -e "s,@PREFIX@,$PREFIX,g" \
2769 -e "s,@CMDLINE@,$cmdline,g" \
2770 <<EOF
2771 ## Automatically generated. http://www.rockbox.org/
2773 export ROOTDIR=@ROOTDIR@
2774 export FIRMDIR=@FIRMDIR@
2775 export APPSDIR=@APPSDIR@
2776 export TOOLSDIR=@TOOLSDIR@
2777 export DOCSDIR=\$(ROOTDIR)/docs
2778 export MANUALDIR=\${ROOTDIR}/manual
2779 export DEBUG=@DEBUG@
2780 export MODELNAME=@MODELNAME@
2781 export ARCHOSROM=@ARCHOSROM@
2782 export FLASHFILE=@FLASHFILE@
2783 export TARGET_ID=@TARGET_ID@
2784 export TARGET=@TARGET@
2785 export CPU=@CPU@
2786 export MANUFACTURER=@MANUFACTURER@
2787 export OBJDIR=@PWD@
2788 export BUILDDIR=@PWD@
2789 export LANGUAGE=@LANGUAGE@
2790 export VOICELANGUAGE=@VOICELANGUAGE@
2791 export MEMORYSIZE=@MEMORY@
2792 export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
2793 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2794 export MKFIRMWARE=@TOOL@
2795 export BMP2RB_MONO=@BMP2RB_MONO@
2796 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2797 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2798 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2799 export BINARY=@OUTPUT@
2800 export APPEXTRA=@APPEXTRA@
2801 export ENABLEDPLUGINS=@PLUGINS@
2802 export SOFTWARECODECS=@CODECS@
2803 export EXTRA_DEFINES=@EXTRADEF@
2804 export HOSTCC=@HOSTCC@
2805 export HOSTAR=@HOSTAR@
2806 export CC=@CC@
2807 export LD=@LD@
2808 export AR=@AR@
2809 export AS=@AS@
2810 export OC=@OC@
2811 export WINDRES=@WINDRES@
2812 export DLLTOOL=@DLLTOOL@
2813 export DLLWRAP=@DLLWRAP@
2814 export RANLIB=@RANLIB@
2815 export PREFIX=@PREFIX@
2816 export PROFILE_OPTS=@PROFILE_OPTS@
2817 export SIMVER=@SIMVER@
2818 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2819 export GCCOPTS=@GCCOPTS@
2820 export TARGET_INC=@TARGET_INC@
2821 export LOADADDRESS=@LOADADDRESS@
2822 export SHARED_FLAG=@SHARED_FLAG@
2823 export LDOPTS=@LDOPTS@
2824 export GCCVER=@GCCVER@
2825 export GCCNUM=@GCCNUM@
2826 export UNAME=@UNAME@
2827 export MANUALDEV=@MANUALDEV@
2828 export TTS_OPTS=@TTS_OPTS@
2829 export TTS_ENGINE=@TTS_ENGINE@
2830 export ENC_OPTS=@ENC_OPTS@
2831 export ENCODER=@ENCODER@
2832 export USE_ELF=@USE_ELF@
2833 export RBDIR=@RBDIR@
2835 CONFIGURE_OPTIONS=@CMDLINE@
2837 include \$(TOOLSDIR)/root.make
2841 echo "Created Makefile"