Cap the level chooser to NUM_LEVELS (100) to avoid accessing level 101, which contain...
[kugel-rb/myfork.git] / tools / configure
blob36c74105a3e29937ad429448c80c2f22a7333e01
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 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
818 143) YP-S3
821 buildfor=`input`;
824 # Set of tools built for all target platforms:
825 toolset="rdf2binary convbdf codepages"
827 # Toolsets for some target families:
828 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
829 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
830 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
831 ipodbitmaptools="$toolset scramble bmp2rb"
832 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
833 tccbitmaptools="$toolset scramble mktccboot bmp2rb"
834 # generic is used by IFP, Meizu and Onda
835 genericbitmaptools="$toolset bmp2rb"
836 # scramble is used by all other targets
837 scramblebitmaptools="$genericbitmaptools scramble"
840 # ---- For each target ----
842 # *Variables*
843 # target_id: a unique number identifying this target, IS NOT the menu number.
844 # Just use the currently highest number+1 when you add a new
845 # target.
846 # modelname: short model name used all over to identify this target
847 # memory: number of megabytes of RAM this target has. If the amount can
848 # be selected by the size prompt, let memory be unset here
849 # target: -Ddefine passed to the build commands to make the correct
850 # config-*.h file get included etc
851 # tool: the tool that takes a plain binary and converts that into a
852 # working "firmware" file for your target
853 # output: the final output file name
854 # boottool: the tool that takes a plain binary and generates a bootloader
855 # file for your target (or blank to use $tool)
856 # bootoutput:the final output file name for the bootloader (or blank to use
857 # $output)
858 # appextra: passed to the APPEXTRA variable in the Makefiles.
859 # TODO: add proper explanation
860 # archosrom: used only for Archos targets that build a special flashable .ucl
861 # image.
862 # flash: name of output for flashing, for targets where there's a special
863 # file output for this.
864 # plugins: set to 'yes' to build the plugins. Early development builds can
865 # set this to no in the early stages to have an easier life for a
866 # while
867 # swcodec: set 'yes' on swcodec targets
868 # toolset: lists what particular tools in the tools/ directory that this
869 # target needs to have built prior to building Rockbox
871 # *Functions*
872 # *cc: sets up gcc and compiler options for your target builds. Note
873 # that if you select a simulator build, the compiler selection is
874 # overridden later in the script.
876 case $buildfor in
878 0|player)
879 target_id=1
880 modelname="player"
881 target="-DARCHOS_PLAYER"
882 shcc
883 tool="$rootdir/tools/scramble"
884 output="archos.mod"
885 appextra="player:gui"
886 archosrom="$pwd/rombox.ucl"
887 flash="$pwd/rockbox.ucl"
888 plugins="yes"
889 swcodec=""
891 # toolset is the tools within the tools directory that we build for
892 # this particular target.
893 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
895 # Note: the convbdf is present in the toolset just because: 1) the
896 # firmware/Makefile assumes it is present always, and 2) we will need it when we
897 # build the player simulator
899 t_cpu="sh"
900 t_manufacturer="archos"
901 t_model="player"
904 1|recorder)
905 target_id=2
906 modelname="recorder"
907 target="-DARCHOS_RECORDER"
908 shcc
909 tool="$rootdir/tools/scramble"
910 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
911 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
912 output="ajbrec.ajz"
913 appextra="recorder:gui"
914 #archosrom="$pwd/rombox.ucl"
915 flash="$pwd/rockbox.ucl"
916 plugins="yes"
917 swcodec=""
918 # toolset is the tools within the tools directory that we build for
919 # this particular target.
920 toolset=$archosbitmaptools
921 t_cpu="sh"
922 t_manufacturer="archos"
923 t_model="recorder"
926 2|fmrecorder)
927 target_id=3
928 modelname="fmrecorder"
929 target="-DARCHOS_FMRECORDER"
930 shcc
931 tool="$rootdir/tools/scramble -fm"
932 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
933 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
934 output="ajbrec.ajz"
935 appextra="recorder:gui"
936 #archosrom="$pwd/rombox.ucl"
937 flash="$pwd/rockbox.ucl"
938 plugins="yes"
939 swcodec=""
940 # toolset is the tools within the tools directory that we build for
941 # this particular target.
942 toolset=$archosbitmaptools
943 t_cpu="sh"
944 t_manufacturer="archos"
945 t_model="fm_v2"
948 3|recorderv2)
949 target_id=4
950 modelname="recorderv2"
951 target="-DARCHOS_RECORDERV2"
952 shcc
953 tool="$rootdir/tools/scramble -v2"
954 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
955 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
956 output="ajbrec.ajz"
957 appextra="recorder:gui"
958 #archosrom="$pwd/rombox.ucl"
959 flash="$pwd/rockbox.ucl"
960 plugins="yes"
961 swcodec=""
962 # toolset is the tools within the tools directory that we build for
963 # this particular target.
964 toolset=$archosbitmaptools
965 t_cpu="sh"
966 t_manufacturer="archos"
967 t_model="fm_v2"
970 4|ondiosp)
971 target_id=7
972 modelname="ondiosp"
973 target="-DARCHOS_ONDIOSP"
974 shcc
975 tool="$rootdir/tools/scramble -osp"
976 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
977 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
978 output="ajbrec.ajz"
979 appextra="recorder:gui"
980 archosrom="$pwd/rombox.ucl"
981 flash="$pwd/rockbox.ucl"
982 plugins="yes"
983 swcodec=""
984 # toolset is the tools within the tools directory that we build for
985 # this particular target.
986 toolset=$archosbitmaptools
987 t_cpu="sh"
988 t_manufacturer="archos"
989 t_model="ondio"
992 5|ondiofm)
993 target_id=8
994 modelname="ondiofm"
995 target="-DARCHOS_ONDIOFM"
996 shcc
997 tool="$rootdir/tools/scramble -ofm"
998 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
999 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1000 output="ajbrec.ajz"
1001 appextra="recorder:gui"
1002 #archosrom="$pwd/rombox.ucl"
1003 flash="$pwd/rockbox.ucl"
1004 plugins="yes"
1005 swcodec=""
1006 toolset=$archosbitmaptools
1007 t_cpu="sh"
1008 t_manufacturer="archos"
1009 t_model="ondio"
1012 6|av300)
1013 target_id=38
1014 modelname="av300"
1015 target="-DARCHOS_AV300"
1016 memory=16 # always
1017 arm7tdmicc
1018 tool="$rootdir/tools/scramble -mm=C"
1019 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1020 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1021 output="cjbm.ajz"
1022 appextra="recorder:gui"
1023 plugins="yes"
1024 swcodec=""
1025 # toolset is the tools within the tools directory that we build for
1026 # this particular target.
1027 toolset="$toolset scramble descramble bmp2rb"
1028 # architecture, manufacturer and model for the target-tree build
1029 t_cpu="arm"
1030 t_manufacturer="archos"
1031 t_model="av300"
1034 10|h120)
1035 target_id=9
1036 modelname="h120"
1037 target="-DIRIVER_H120"
1038 memory=32 # always
1039 coldfirecc
1040 tool="$rootdir/tools/scramble -add=h120"
1041 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1042 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1043 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1044 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1045 output="rockbox.iriver"
1046 appextra="recorder:gui"
1047 flash="$pwd/rombox.iriver"
1048 plugins="yes"
1049 swcodec="yes"
1050 # toolset is the tools within the tools directory that we build for
1051 # this particular target.
1052 toolset=$iriverbitmaptools
1053 t_cpu="coldfire"
1054 t_manufacturer="iriver"
1055 t_model="h100"
1058 11|h300)
1059 target_id=10
1060 modelname="h300"
1061 target="-DIRIVER_H300"
1062 memory=32 # always
1063 coldfirecc
1064 tool="$rootdir/tools/scramble -add=h300"
1065 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1066 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1067 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1068 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1069 output="rockbox.iriver"
1070 appextra="recorder:gui"
1071 plugins="yes"
1072 swcodec="yes"
1073 # toolset is the tools within the tools directory that we build for
1074 # this particular target.
1075 toolset=$iriverbitmaptools
1076 t_cpu="coldfire"
1077 t_manufacturer="iriver"
1078 t_model="h300"
1081 12|h100)
1082 target_id=11
1083 modelname="h100"
1084 target="-DIRIVER_H100"
1085 memory=16 # always
1086 coldfirecc
1087 tool="$rootdir/tools/scramble -add=h100"
1088 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1089 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1090 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1091 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1092 output="rockbox.iriver"
1093 appextra="recorder:gui"
1094 flash="$pwd/rombox.iriver"
1095 plugins="yes"
1096 swcodec="yes"
1097 # toolset is the tools within the tools directory that we build for
1098 # this particular target.
1099 toolset=$iriverbitmaptools
1100 t_cpu="coldfire"
1101 t_manufacturer="iriver"
1102 t_model="h100"
1105 13|ifp7xx)
1106 target_id=19
1107 modelname="ifp7xx"
1108 target="-DIRIVER_IFP7XX"
1109 memory=1
1110 arm7tdmicc short
1111 tool="cp"
1112 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1113 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1114 output="rockbox.wma"
1115 appextra="recorder:gui"
1116 plugins="yes"
1117 swcodec="yes"
1118 # toolset is the tools within the tools directory that we build for
1119 # this particular target.
1120 toolset=$genericbitmaptools
1121 t_cpu="arm"
1122 t_manufacturer="pnx0101"
1123 t_model="iriver-ifp7xx"
1126 14|h10)
1127 target_id=22
1128 modelname="h10"
1129 target="-DIRIVER_H10"
1130 memory=32 # always
1131 arm7tdmicc
1132 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1133 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1134 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1135 output="rockbox.mi4"
1136 appextra="recorder:gui"
1137 plugins="yes"
1138 swcodec="yes"
1139 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1140 bootoutput="H10_20GC.mi4"
1141 # toolset is the tools within the tools directory that we build for
1142 # this particular target.
1143 toolset=$scramblebitmaptools
1144 # architecture, manufacturer and model for the target-tree build
1145 t_cpu="arm"
1146 t_manufacturer="iriver"
1147 t_model="h10"
1150 15|h10_5gb)
1151 target_id=24
1152 modelname="h10_5gb"
1153 target="-DIRIVER_H10_5GB"
1154 memory=32 # always
1155 arm7tdmicc
1156 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1157 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1158 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1159 output="rockbox.mi4"
1160 appextra="recorder:gui"
1161 plugins="yes"
1162 swcodec="yes"
1163 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1164 bootoutput="H10.mi4"
1165 # toolset is the tools within the tools directory that we build for
1166 # this particular target.
1167 toolset=$scramblebitmaptools
1168 # architecture, manufacturer and model for the target-tree build
1169 t_cpu="arm"
1170 t_manufacturer="iriver"
1171 t_model="h10"
1174 20|ipodcolor)
1175 target_id=13
1176 modelname="ipodcolor"
1177 target="-DIPOD_COLOR"
1178 memory=32 # always
1179 arm7tdmicc
1180 tool="$rootdir/tools/scramble -add=ipco"
1181 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1182 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1183 output="rockbox.ipod"
1184 appextra="recorder:gui"
1185 plugins="yes"
1186 swcodec="yes"
1187 bootoutput="bootloader-$modelname.ipod"
1188 # toolset is the tools within the tools directory that we build for
1189 # this particular target.
1190 toolset=$ipodbitmaptools
1191 # architecture, manufacturer and model for the target-tree build
1192 t_cpu="arm"
1193 t_manufacturer="ipod"
1194 t_model="color"
1197 21|ipodnano)
1198 target_id=14
1199 modelname="ipodnano"
1200 target="-DIPOD_NANO"
1201 memory=32 # always
1202 arm7tdmicc
1203 tool="$rootdir/tools/scramble -add=nano"
1204 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1205 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1206 output="rockbox.ipod"
1207 appextra="recorder:gui"
1208 plugins="yes"
1209 swcodec="yes"
1210 bootoutput="bootloader-$modelname.ipod"
1211 # toolset is the tools within the tools directory that we build for
1212 # this particular target.
1213 toolset=$ipodbitmaptools
1214 # architecture, manufacturer and model for the target-tree build
1215 t_cpu="arm"
1216 t_manufacturer="ipod"
1217 t_model="nano"
1220 22|ipodvideo)
1221 target_id=15
1222 modelname="ipodvideo"
1223 target="-DIPOD_VIDEO"
1224 arm7tdmicc
1225 tool="$rootdir/tools/scramble -add=ipvd"
1226 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1227 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1228 output="rockbox.ipod"
1229 appextra="recorder:gui"
1230 plugins="yes"
1231 swcodec="yes"
1232 bootoutput="bootloader-$modelname.ipod"
1233 # toolset is the tools within the tools directory that we build for
1234 # this particular target.
1235 toolset=$ipodbitmaptools
1236 # architecture, manufacturer and model for the target-tree build
1237 t_cpu="arm"
1238 t_manufacturer="ipod"
1239 t_model="video"
1242 23|ipod3g)
1243 target_id=16
1244 modelname="ipod3g"
1245 target="-DIPOD_3G"
1246 memory=32 # always
1247 arm7tdmicc
1248 tool="$rootdir/tools/scramble -add=ip3g"
1249 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1250 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1251 output="rockbox.ipod"
1252 appextra="recorder:gui"
1253 plugins="yes"
1254 swcodec="yes"
1255 bootoutput="bootloader-$modelname.ipod"
1256 # toolset is the tools within the tools directory that we build for
1257 # this particular target.
1258 toolset=$ipodbitmaptools
1259 # architecture, manufacturer and model for the target-tree build
1260 t_cpu="arm"
1261 t_manufacturer="ipod"
1262 t_model="3g"
1265 24|ipod4g)
1266 target_id=17
1267 modelname="ipod4g"
1268 target="-DIPOD_4G"
1269 memory=32 # always
1270 arm7tdmicc
1271 tool="$rootdir/tools/scramble -add=ip4g"
1272 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1273 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1274 output="rockbox.ipod"
1275 appextra="recorder:gui"
1276 plugins="yes"
1277 swcodec="yes"
1278 bootoutput="bootloader-$modelname.ipod"
1279 # toolset is the tools within the tools directory that we build for
1280 # this particular target.
1281 toolset=$ipodbitmaptools
1282 # architecture, manufacturer and model for the target-tree build
1283 t_cpu="arm"
1284 t_manufacturer="ipod"
1285 t_model="4g"
1288 25|ipodmini)
1289 target_id=18
1290 modelname="ipodmini"
1291 target="-DIPOD_MINI"
1292 memory=32 # always
1293 arm7tdmicc
1294 tool="$rootdir/tools/scramble -add=mini"
1295 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1296 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1297 output="rockbox.ipod"
1298 appextra="recorder:gui"
1299 plugins="yes"
1300 swcodec="yes"
1301 bootoutput="bootloader-$modelname.ipod"
1302 # toolset is the tools within the tools directory that we build for
1303 # this particular target.
1304 toolset=$ipodbitmaptools
1305 # architecture, manufacturer and model for the target-tree build
1306 t_cpu="arm"
1307 t_manufacturer="ipod"
1308 t_model="mini"
1311 26|ipodmini2g)
1312 target_id=21
1313 modelname="ipodmini2g"
1314 target="-DIPOD_MINI2G"
1315 memory=32 # always
1316 arm7tdmicc
1317 tool="$rootdir/tools/scramble -add=mn2g"
1318 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1319 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1320 output="rockbox.ipod"
1321 appextra="recorder:gui"
1322 plugins="yes"
1323 swcodec="yes"
1324 bootoutput="bootloader-$modelname.ipod"
1325 # toolset is the tools within the tools directory that we build for
1326 # this particular target.
1327 toolset=$ipodbitmaptools
1328 # architecture, manufacturer and model for the target-tree build
1329 t_cpu="arm"
1330 t_manufacturer="ipod"
1331 t_model="mini2g"
1334 27|ipod1g2g)
1335 target_id=29
1336 modelname="ipod1g2g"
1337 target="-DIPOD_1G2G"
1338 memory=32 # always
1339 arm7tdmicc
1340 tool="$rootdir/tools/scramble -add=1g2g"
1341 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1342 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1343 output="rockbox.ipod"
1344 appextra="recorder:gui"
1345 plugins="yes"
1346 swcodec="yes"
1347 bootoutput="bootloader-$modelname.ipod"
1348 # toolset is the tools within the tools directory that we build for
1349 # this particular target.
1350 toolset=$ipodbitmaptools
1351 # architecture, manufacturer and model for the target-tree build
1352 t_cpu="arm"
1353 t_manufacturer="ipod"
1354 t_model="1g2g"
1357 28|ipodnano2g)
1358 target_id=62
1359 modelname="ipodnano2g"
1360 target="-DIPOD_NANO2G"
1361 memory=32 # always
1362 arm940tcc
1363 tool="$rootdir/tools/scramble -add=nn2g"
1364 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1365 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1366 output="rockbox.ipod"
1367 appextra="recorder:gui"
1368 plugins="yes"
1369 swcodec="yes"
1370 boottool="cp"
1371 bootoutput="bootloader-$modelname.bin"
1372 # toolset is the tools within the tools directory that we build for
1373 # this particular target.
1374 toolset=$ipodbitmaptools
1375 # architecture, manufacturer and model for the target-tree build
1376 t_cpu="arm"
1377 t_manufacturer="s5l8700"
1378 t_model="ipodnano2g"
1381 30|x5)
1382 target_id=12
1383 modelname="x5"
1384 target="-DIAUDIO_X5"
1385 memory=16 # always
1386 coldfirecc
1387 tool="$rootdir/tools/scramble -add=iax5"
1388 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1389 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1390 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1391 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1392 output="rockbox.iaudio"
1393 appextra="recorder:gui"
1394 plugins="yes"
1395 swcodec="yes"
1396 # toolset is the tools within the tools directory that we build for
1397 # this particular target.
1398 toolset="$iaudiobitmaptools"
1399 # architecture, manufacturer and model for the target-tree build
1400 t_cpu="coldfire"
1401 t_manufacturer="iaudio"
1402 t_model="x5"
1405 31|m5)
1406 target_id=28
1407 modelname="m5"
1408 target="-DIAUDIO_M5"
1409 memory=16 # always
1410 coldfirecc
1411 tool="$rootdir/tools/scramble -add=iam5"
1412 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1413 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1414 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1415 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1416 output="rockbox.iaudio"
1417 appextra="recorder:gui"
1418 plugins="yes"
1419 swcodec="yes"
1420 # toolset is the tools within the tools directory that we build for
1421 # this particular target.
1422 toolset="$iaudiobitmaptools"
1423 # architecture, manufacturer and model for the target-tree build
1424 t_cpu="coldfire"
1425 t_manufacturer="iaudio"
1426 t_model="m5"
1429 32|iaudio7)
1430 target_id=32
1431 modelname="iaudio7"
1432 target="-DIAUDIO_7"
1433 memory=16 # always
1434 arm946cc
1435 tool="$rootdir/tools/scramble -add=i7"
1436 boottool="$rootdir/tools/scramble -tcc=crc"
1437 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1438 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1439 output="rockbox.iaudio"
1440 appextra="recorder:gui"
1441 plugins="yes"
1442 swcodec="yes"
1443 bootoutput="I7_FW.BIN"
1444 # toolset is the tools within the tools directory that we build for
1445 # this particular target.
1446 toolset="$tccbitmaptools"
1447 # architecture, manufacturer and model for the target-tree build
1448 t_cpu="arm"
1449 t_manufacturer="tcc77x"
1450 t_model="iaudio7"
1453 33|cowond2)
1454 target_id=34
1455 modelname="cowond2"
1456 target="-DCOWON_D2"
1457 memory=32
1458 arm926ejscc
1459 tool="$rootdir/tools/scramble -add=d2"
1460 boottool="$rootdir/tools/scramble -tcc=crc"
1461 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1462 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1463 output="rockbox.d2"
1464 appextra="recorder:gui"
1465 plugins="yes"
1466 swcodec="yes"
1467 toolset="$tccbitmaptools"
1468 # architecture, manufacturer and model for the target-tree build
1469 t_cpu="arm"
1470 t_manufacturer="tcc780x"
1471 t_model="cowond2"
1474 34|m3)
1475 target_id=37
1476 modelname="m3"
1477 target="-DIAUDIO_M3"
1478 memory=16 # always
1479 coldfirecc
1480 tool="$rootdir/tools/scramble -add=iam3"
1481 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1482 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1483 output="rockbox.iaudio"
1484 appextra="recorder:gui"
1485 plugins="yes"
1486 swcodec="yes"
1487 # toolset is the tools within the tools directory that we build for
1488 # this particular target.
1489 toolset="$iaudiobitmaptools"
1490 # architecture, manufacturer and model for the target-tree build
1491 t_cpu="coldfire"
1492 t_manufacturer="iaudio"
1493 t_model="m3"
1496 40|gigabeatf)
1497 target_id=20
1498 modelname="gigabeatf"
1499 target="-DGIGABEAT_F"
1500 memory=32 # always
1501 arm9tdmicc
1502 tool="$rootdir/tools/scramble -add=giga"
1503 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1504 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1505 output="rockbox.gigabeat"
1506 appextra="recorder:gui"
1507 plugins="yes"
1508 swcodec="yes"
1509 toolset=$gigabeatbitmaptools
1510 boottool="$rootdir/tools/scramble -gigabeat"
1511 bootoutput="FWIMG01.DAT"
1512 # architecture, manufacturer and model for the target-tree build
1513 t_cpu="arm"
1514 t_manufacturer="s3c2440"
1515 t_model="gigabeat-fx"
1518 41|gigabeats)
1519 target_id=26
1520 modelname="gigabeats"
1521 target="-DGIGABEAT_S"
1522 memory=64
1523 arm1136jfscc
1524 tool="$rootdir/tools/scramble -add=gigs"
1525 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1526 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1527 output="rockbox.gigabeat"
1528 appextra="recorder:gui"
1529 plugins="yes"
1530 swcodec="yes"
1531 toolset="$gigabeatbitmaptools mknkboot"
1532 boottool="$rootdir/tools/scramble -gigabeats"
1533 bootoutput="nk.bin"
1534 # architecture, manufacturer and model for the target-tree build
1535 t_cpu="arm"
1536 t_manufacturer="imx31"
1537 t_model="gigabeat-s"
1540 70|mrobe500)
1541 target_id=36
1542 modelname="mrobe500"
1543 target="-DMROBE_500"
1544 memory=64 # always
1545 arm926ejscc
1546 tool="$rootdir/tools/scramble -add=m500"
1547 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1548 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1549 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1550 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1551 output="rockbox.mrobe500"
1552 appextra="recorder:gui"
1553 plugins="yes"
1554 swcodec="yes"
1555 toolset=$gigabeatbitmaptools
1556 boottool="cp "
1557 bootoutput="rockbox.mrboot"
1558 # architecture, manufacturer and model for the target-tree build
1559 t_cpu="arm"
1560 t_manufacturer="tms320dm320"
1561 t_model="mrobe-500"
1564 71|mrobe100)
1565 target_id=33
1566 modelname="mrobe100"
1567 target="-DMROBE_100"
1568 memory=32 # always
1569 arm7tdmicc
1570 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1571 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1572 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1573 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1574 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1575 output="rockbox.mi4"
1576 appextra="recorder:gui"
1577 plugins="yes"
1578 swcodec="yes"
1579 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1580 bootoutput="pp5020.mi4"
1581 # toolset is the tools within the tools directory that we build for
1582 # this particular target.
1583 toolset=$scramblebitmaptools
1584 # architecture, manufacturer and model for the target-tree build
1585 t_cpu="arm"
1586 t_manufacturer="olympus"
1587 t_model="mrobe-100"
1590 80|logikdax)
1591 target_id=31
1592 modelname="logikdax"
1593 target="-DLOGIK_DAX"
1594 memory=2 # always
1595 arm946cc
1596 tool="$rootdir/tools/scramble -add=ldax"
1597 boottool="$rootdir/tools/scramble -tcc=crc"
1598 bootoutput="player.rom"
1599 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1600 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1601 output="rockbox.logik"
1602 appextra="recorder:gui"
1603 plugins=""
1604 swcodec="yes"
1605 # toolset is the tools within the tools directory that we build for
1606 # this particular target.
1607 toolset=$tccbitmaptools
1608 # architecture, manufacturer and model for the target-tree build
1609 t_cpu="arm"
1610 t_manufacturer="tcc77x"
1611 t_model="logikdax"
1614 90|creativezvm30gb)
1615 target_id=35
1616 modelname="creativezvm30"
1617 target="-DCREATIVE_ZVM"
1618 memory=64
1619 arm926ejscc
1620 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1621 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1622 tool="$rootdir/tools/scramble -creative=zvm"
1623 USE_ELF="yes"
1624 output="rockbox.zvm"
1625 appextra="recorder:gui"
1626 plugins="yes"
1627 swcodec="yes"
1628 toolset=$ipodbitmaptools
1629 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1630 bootoutput="rockbox.zvmboot"
1631 # architecture, manufacturer and model for the target-tree build
1632 t_cpu="arm"
1633 t_manufacturer="tms320dm320"
1634 t_model="creative-zvm"
1637 91|creativezvm60gb)
1638 target_id=40
1639 modelname="creativezvm60"
1640 target="-DCREATIVE_ZVM60GB"
1641 memory=64
1642 arm926ejscc
1643 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1644 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1645 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1646 USE_ELF="yes"
1647 output="rockbox.zvm60"
1648 appextra="recorder:gui"
1649 plugins="yes"
1650 swcodec="yes"
1651 toolset=$ipodbitmaptools
1652 boottool="$rootdir/tools/scramble -creative=zvm60"
1653 bootoutput="rockbox.zvm60boot"
1654 # architecture, manufacturer and model for the target-tree build
1655 t_cpu="arm"
1656 t_manufacturer="tms320dm320"
1657 t_model="creative-zvm"
1660 92|creativezenvision)
1661 target_id=39
1662 modelname="creativezv"
1663 target="-DCREATIVE_ZV"
1664 memory=64
1665 arm926ejscc
1666 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1667 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1668 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1669 USE_ELF="yes"
1670 output="rockbox.zv"
1671 appextra="recorder:gui"
1672 plugins=""
1673 swcodec="yes"
1674 toolset=$ipodbitmaptools
1675 boottool="$rootdir/tools/scramble -creative=zenvision"
1676 bootoutput="rockbox.zvboot"
1677 # architecture, manufacturer and model for the target-tree build
1678 t_cpu="arm"
1679 t_manufacturer="tms320dm320"
1680 t_model="creative-zvm"
1683 50|e200)
1684 target_id=23
1685 modelname="e200"
1686 target="-DSANSA_E200"
1687 memory=32 # supposedly
1688 arm7tdmicc
1689 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1690 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1691 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1692 output="rockbox.mi4"
1693 appextra="recorder:gui"
1694 plugins="yes"
1695 swcodec="yes"
1696 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1697 bootoutput="PP5022.mi4"
1698 # toolset is the tools within the tools directory that we build for
1699 # this particular target.
1700 toolset=$scramblebitmaptools
1701 # architecture, manufacturer and model for the target-tree build
1702 t_cpu="arm"
1703 t_manufacturer="sandisk"
1704 t_model="sansa-e200"
1707 51|e200r)
1708 # the e200R model is pretty much identical to the e200, it only has a
1709 # different option to the scramble tool when building a bootloader and
1710 # makes the bootloader output file name in all lower case.
1711 target_id=27
1712 modelname="e200r"
1713 target="-DSANSA_E200"
1714 memory=32 # supposedly
1715 arm7tdmicc
1716 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1717 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1718 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1719 output="rockbox.mi4"
1720 appextra="recorder:gui"
1721 plugins="yes"
1722 swcodec="yes"
1723 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1724 bootoutput="pp5022.mi4"
1725 # toolset is the tools within the tools directory that we build for
1726 # this particular target.
1727 toolset=$scramblebitmaptools
1728 # architecture, manufacturer and model for the target-tree build
1729 t_cpu="arm"
1730 t_manufacturer="sandisk"
1731 t_model="sansa-e200"
1734 52|c200)
1735 target_id=30
1736 modelname="c200"
1737 target="-DSANSA_C200"
1738 memory=32 # supposedly
1739 arm7tdmicc
1740 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1741 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1742 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1743 output="rockbox.mi4"
1744 appextra="recorder:gui"
1745 plugins="yes"
1746 swcodec="yes"
1747 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1748 bootoutput="firmware.mi4"
1749 # toolset is the tools within the tools directory that we build for
1750 # this particular target.
1751 toolset=$scramblebitmaptools
1752 # architecture, manufacturer and model for the target-tree build
1753 t_cpu="arm"
1754 t_manufacturer="sandisk"
1755 t_model="sansa-c200"
1758 53|m200)
1759 target_id=48
1760 modelname="m200"
1761 target="-DSANSA_M200"
1762 memory=1 # always
1763 arm946cc
1764 tool="$rootdir/tools/scramble -add=m200"
1765 boottool="$rootdir/tools/scramble -tcc=crc"
1766 bootoutput="player.rom"
1767 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1768 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1769 output="rockbox.m200"
1770 appextra="recorder:gui"
1771 plugins=""
1772 swcodec="yes"
1773 # toolset is the tools within the tools directory that we build for
1774 # this particular target.
1775 toolset=$tccbitmaptools
1776 # architecture, manufacturer and model for the target-tree build
1777 t_cpu="arm"
1778 t_manufacturer="tcc77x"
1779 t_model="m200"
1782 54|c100)
1783 target_id=42
1784 modelname="c100"
1785 target="-DSANSA_C100"
1786 memory=2
1787 arm946cc
1788 tool="$rootdir/tools/scramble -add=c100"
1789 boottool="$rootdir/tools/scramble -tcc=crc"
1790 bootoutput="player.rom"
1791 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1792 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1793 output="rockbox.c100"
1794 appextra="recorder:gui"
1795 plugins=""
1796 swcodec="yes"
1797 # toolset is the tools within the tools directory that we build for
1798 # this particular target.
1799 toolset=$tccbitmaptools
1800 # architecture, manufacturer and model for the target-tree build
1801 t_cpu="arm"
1802 t_manufacturer="tcc77x"
1803 t_model="c100"
1806 55|Clip|clip)
1807 target_id=50
1808 modelname="clip"
1809 target="-DSANSA_CLIP"
1810 memory=2
1811 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1812 bmp2rb_native="$bmp2rb_mono"
1813 tool="$rootdir/tools/scramble -add=clip"
1814 output="rockbox.sansa"
1815 bootoutput="bootloader-clip.sansa"
1816 appextra="recorder:gui"
1817 plugins="yes"
1818 swcodec="yes"
1819 toolset=$scramblebitmaptools
1820 t_cpu="arm"
1821 t_manufacturer="as3525"
1822 t_model="sansa-clip"
1823 arm9tdmicc
1827 56|e200v2)
1828 target_id=51
1829 modelname="e200v2"
1830 target="-DSANSA_E200V2"
1831 memory=8
1832 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1833 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1834 tool="$rootdir/tools/scramble -add=e2v2"
1835 output="rockbox.sansa"
1836 bootoutput="bootloader-e200v2.sansa"
1837 appextra="recorder:gui"
1838 plugins="yes"
1839 swcodec="yes"
1840 toolset=$scramblebitmaptools
1841 t_cpu="arm"
1842 t_manufacturer="as3525"
1843 t_model="sansa-e200v2"
1844 arm9tdmicc
1848 57|m200v4)
1849 target_id=52
1850 modelname="m200v4"
1851 target="-DSANSA_M200V4"
1852 memory=2
1853 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1854 bmp2rb_native="$bmp2rb_mono"
1855 tool="$rootdir/tools/scramble -add=m2v4"
1856 output="rockbox.sansa"
1857 bootoutput="bootloader-m200v4.sansa"
1858 appextra="recorder:gui"
1859 plugins="yes"
1860 swcodec="yes"
1861 toolset=$scramblebitmaptools
1862 t_cpu="arm"
1863 t_manufacturer="as3525"
1864 t_model="sansa-m200v4"
1865 arm9tdmicc
1869 58|fuze)
1870 target_id=53
1871 modelname="fuze"
1872 target="-DSANSA_FUZE"
1873 memory=8
1874 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1875 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1876 tool="$rootdir/tools/scramble -add=fuze"
1877 output="rockbox.sansa"
1878 bootoutput="bootloader-fuze.sansa"
1879 appextra="recorder:gui"
1880 plugins="yes"
1881 swcodec="yes"
1882 toolset=$scramblebitmaptools
1883 t_cpu="arm"
1884 t_manufacturer="as3525"
1885 t_model="sansa-fuze"
1886 arm9tdmicc
1890 59|c200v2)
1891 target_id=55
1892 modelname="c200v2"
1893 target="-DSANSA_C200V2"
1894 memory=2 # as per OF diagnosis mode
1895 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1896 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1897 tool="$rootdir/tools/scramble -add=c2v2"
1898 output="rockbox.sansa"
1899 bootoutput="bootloader-c200v2.sansa"
1900 appextra="recorder:gui"
1901 plugins="yes"
1902 swcodec="yes"
1903 # toolset is the tools within the tools directory that we build for
1904 # this particular target.
1905 toolset=$scramblebitmaptools
1906 # architecture, manufacturer and model for the target-tree build
1907 t_cpu="arm"
1908 t_manufacturer="as3525"
1909 t_model="sansa-c200v2"
1910 arm9tdmicc
1913 60|Clipv2|clipv2)
1914 echo "Sansa Clipv2 is not yet supported !"
1915 exit 1
1916 target_id=60
1917 modelname="clipv2"
1918 target="-DSANSA_CLIPV2"
1919 memory=8
1920 arm926ejscc
1921 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1922 bmp2rb_native="$bmp2rb_mono"
1923 tool="$rootdir/tools/scramble -add=clv2"
1924 output="rockbox.sansa"
1925 bootoutput="bootloader-clipv2.sansa"
1926 appextra="recorder:gui"
1927 plugins="yes"
1928 swcodec="yes"
1929 toolset=$scramblebitmaptools
1930 t_cpu="arm"
1931 t_manufacturer="as3525"
1932 t_model="sansa-clipv2"
1935 61|view)
1936 echo "Sansa View is net yet supported!"
1937 exit 1
1938 target_id=63
1939 modelname="view"
1940 target="-DSANSA_VIEW"
1941 memory=32
1942 arm1176jzscc
1943 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1944 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1945 output="rockbox.mi4"
1946 appextra="gui"
1947 plugins=""
1948 swcodec="yes"
1949 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
1950 bootoutput="firmware.mi4"
1951 # toolset is the tools within the tools directory that we build for
1952 # this particular target.
1953 toolset=$scramblebitmaptools
1954 t_cpu="arm"
1955 t_manufacturer="sandisk"
1956 t_model="sansa-view"
1959 150|tpj1022)
1960 target_id=25
1961 modelname="tpj1022"
1962 target="-DELIO_TPJ1022"
1963 memory=32 # always
1964 arm7tdmicc
1965 tool="$rootdir/tools/scramble -add tpj2"
1966 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1967 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1968 output="rockbox.elio"
1969 appextra="recorder:gui"
1970 plugins="yes"
1971 swcodec="yes"
1972 boottool="$rootdir/tools/scramble -mi4v2"
1973 bootoutput="pp5020.mi4"
1974 # toolset is the tools within the tools directory that we build for
1975 # this particular target.
1976 toolset=$scramblebitmaptools
1977 # architecture, manufacturer and model for the target-tree build
1978 t_cpu="arm"
1979 t_manufacturer="tatung"
1980 t_model="tpj1022"
1983 100|sa9200)
1984 target_id=41
1985 modelname="sa9200"
1986 target="-DPHILIPS_SA9200"
1987 memory=32 # supposedly
1988 arm7tdmicc
1989 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
1990 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1991 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1992 output="rockbox.mi4"
1993 appextra="recorder:gui"
1994 plugins=""
1995 swcodec="yes"
1996 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
1997 bootoutput="FWImage.ebn"
1998 # toolset is the tools within the tools directory that we build for
1999 # this particular target.
2000 toolset=$scramblebitmaptools
2001 # architecture, manufacturer and model for the target-tree build
2002 t_cpu="arm"
2003 t_manufacturer="philips"
2004 t_model="sa9200"
2007 101|hdd1630)
2008 target_id=43
2009 modelname="hdd1630"
2010 target="-DPHILIPS_HDD1630"
2011 memory=32 # supposedly
2012 arm7tdmicc
2013 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2014 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2015 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2016 output="rockbox.mi4"
2017 appextra="recorder:gui"
2018 plugins="yes"
2019 swcodec="yes"
2020 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2021 bootoutput="FWImage.ebn"
2022 # toolset is the tools within the tools directory that we build for
2023 # this particular target.
2024 toolset=$scramblebitmaptools
2025 # architecture, manufacturer and model for the target-tree build
2026 t_cpu="arm"
2027 t_manufacturer="philips"
2028 t_model="hdd1630"
2031 110|meizum6sl)
2032 target_id=49
2033 modelname="meizum6sl"
2034 target="-DMEIZU_M6SL"
2035 memory=16 # always
2036 arm940tbecc
2037 tool="cp"
2038 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2039 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2040 output="rockbox.meizu"
2041 appextra="recorder:gui"
2042 plugins="no" #FIXME
2043 swcodec="yes"
2044 toolset=$genericbitmaptools
2045 boottool="cp"
2046 bootoutput="rockboot.ebn"
2047 # architecture, manufacturer and model for the target-tree build
2048 t_cpu="arm"
2049 t_manufacturer="s5l8700"
2050 t_model="meizu-m6sl"
2053 111|meizum6sp)
2054 target_id=46
2055 modelname="meizum6sp"
2056 target="-DMEIZU_M6SP"
2057 memory=16 # always
2058 arm940tbecc
2059 tool="cp"
2060 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2061 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2062 output="rockbox.meizu"
2063 appextra="recorder:gui"
2064 plugins="no" #FIXME
2065 swcodec="yes"
2066 toolset=$genericbitmaptools
2067 boottool="cp"
2068 bootoutput="rockboot.ebn"
2069 # architecture, manufacturer and model for the target-tree build
2070 t_cpu="arm"
2071 t_manufacturer="s5l8700"
2072 t_model="meizu-m6sp"
2075 112|meizum3)
2076 target_id=47
2077 modelname="meizum3"
2078 target="-DMEIZU_M3"
2079 memory=16 # always
2080 arm940tbecc
2081 tool="cp"
2082 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2083 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2084 output="rockbox.meizu"
2085 appextra="recorder:gui"
2086 plugins="no" #FIXME
2087 swcodec="yes"
2088 toolset=$genericbitmaptools
2089 boottool="cp"
2090 bootoutput="rockboot.ebn"
2091 # architecture, manufacturer and model for the target-tree build
2092 t_cpu="arm"
2093 t_manufacturer="s5l8700"
2094 t_model="meizu-m3"
2097 120|ondavx747)
2098 target_id=44
2099 modelname="ondavx747"
2100 target="-DONDA_VX747"
2101 memory=16
2102 mipselcc
2103 tool="$rootdir/tools/scramble -add=x747"
2104 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2105 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2106 output="rockbox.vx747"
2107 appextra="recorder:gui"
2108 plugins="yes"
2109 swcodec="yes"
2110 toolset=$genericbitmaptools
2111 boottool="$rootdir/tools/scramble -ccpmp"
2112 bootoutput="ccpmp.bin"
2113 # architecture, manufacturer and model for the target-tree build
2114 t_cpu="mips"
2115 t_manufacturer="ingenic_jz47xx"
2116 t_model="onda_vx747"
2119 121|ondavx767)
2120 target_id=45
2121 modelname="ondavx767"
2122 target="-DONDA_VX767"
2123 memory=16 #FIXME
2124 mipselcc
2125 tool="cp"
2126 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2127 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2128 output="rockbox.vx767"
2129 appextra="recorder:gui"
2130 plugins="" #FIXME
2131 swcodec="yes"
2132 toolset=$genericbitmaptools
2133 boottool="$rootdir/tools/scramble -ccpmp"
2134 bootoutput="ccpmp.bin"
2135 # architecture, manufacturer and model for the target-tree build
2136 t_cpu="mips"
2137 t_manufacturer="ingenic_jz47xx"
2138 t_model="onda_vx767"
2141 122|ondavx747p)
2142 target_id=54
2143 modelname="ondavx747p"
2144 target="-DONDA_VX747P"
2145 memory=16
2146 mipselcc
2147 tool="$rootdir/tools/scramble -add=747p"
2148 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2149 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2150 output="rockbox.vx747p"
2151 appextra="recorder:gui"
2152 plugins="yes"
2153 swcodec="yes"
2154 toolset=$genericbitmaptools
2155 boottool="$rootdir/tools/scramble -ccpmp"
2156 bootoutput="ccpmp.bin"
2157 # architecture, manufacturer and model for the target-tree build
2158 t_cpu="mips"
2159 t_manufacturer="ingenic_jz47xx"
2160 t_model="onda_vx747"
2163 123|ondavx777)
2164 target_id=61
2165 modelname="ondavx777"
2166 target="-DONDA_VX777"
2167 memory=16
2168 mipselcc
2169 tool="$rootdir/tools/scramble -add=x777"
2170 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2171 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2172 output="rockbox.vx777"
2173 appextra="recorder:gui"
2174 plugins="" #TODO
2175 swcodec="yes"
2176 toolset=$genericbitmaptools
2177 boottool="$rootdir/tools/scramble -ccpmp"
2178 bootoutput="ccpmp.bin"
2179 # architecture, manufacturer and model for the target-tree build
2180 t_cpu="mips"
2181 t_manufacturer="ingenic_jz47xx"
2182 t_model="onda_vx747"
2185 130|lyre_proto1)
2186 target_id=56
2187 modelname="lyre_proto1"
2188 target="-DLYRE_PROTO1"
2189 memory=64
2190 arm926ejscc
2191 tool="cp"
2192 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2193 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2194 output="rockbox.lyre"
2195 appextra="recorder:gui"
2196 plugins=""
2197 swcodec="yes"
2198 toolset=$scramblebitmaptools
2199 boottool="cp"
2200 bootoutput="bootloader-proto1.lyre"
2201 # architecture, manufacturer and model for the target-tree build
2202 t_cpu="arm"
2203 t_manufacturer="at91sam"
2204 t_model="lyre_proto1"
2207 140|yh_820)
2208 target_id=57
2209 modelname="yh_820"
2210 target="-DSAMSUNG_YH820"
2211 memory=32 # always
2212 arm7tdmicc
2213 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2214 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2215 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2216 output="rockbox.mi4"
2217 appextra="recorder:gui"
2218 plugins=""
2219 swcodec="yes"
2220 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2221 bootoutput="FW_YH820.mi4"
2222 # toolset is the tools within the tools directory that we build for
2223 # this particular target.
2224 toolset=$scramblebitmaptools
2225 # architecture, manufacturer and model for the target-tree build
2226 t_cpu="arm"
2227 t_manufacturer="samsung"
2228 t_model="yh820"
2231 141|yh_920)
2232 target_id=58
2233 modelname="yh_920"
2234 target="-DSAMSUNG_YH920"
2235 memory=32 # always
2236 arm7tdmicc
2237 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2238 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2239 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2240 output="rockbox.mi4"
2241 appextra="recorder:gui"
2242 plugins=""
2243 swcodec="yes"
2244 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2245 bootoutput="PP5020.mi4"
2246 # toolset is the tools within the tools directory that we build for
2247 # this particular target.
2248 toolset=$scramblebitmaptools
2249 # architecture, manufacturer and model for the target-tree build
2250 t_cpu="arm"
2251 t_manufacturer="samsung"
2252 t_model="yh920"
2255 142|yh_925)
2256 target_id=59
2257 modelname="yh_925"
2258 target="-DSAMSUNG_YH925"
2259 memory=32 # always
2260 arm7tdmicc
2261 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2262 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2263 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2264 output="rockbox.mi4"
2265 appextra="recorder:gui"
2266 plugins=""
2267 swcodec="yes"
2268 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2269 bootoutput="FW_YH925.mi4"
2270 # toolset is the tools within the tools directory that we build for
2271 # this particular target.
2272 toolset=$scramblebitmaptools
2273 # architecture, manufacturer and model for the target-tree build
2274 t_cpu="arm"
2275 t_manufacturer="samsung"
2276 t_model="yh925"
2279 143|yps3)
2280 target_id=60
2281 modelname="yps3"
2282 target="-DSAMSUNG_YPS3"
2283 memory=16 # always
2284 arm940tbecc
2285 tool="cp"
2286 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2287 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2288 output="rockbox.yps3"
2289 appextra="recorder:gui"
2290 plugins="no" #FIXME
2291 swcodec="yes"
2292 toolset=$genericbitmaptools
2293 boottool="cp"
2294 bootoutput="rockboot.ebn"
2295 # architecture, manufacturer and model for the target-tree build
2296 t_cpu="arm"
2297 t_manufacturer="s5l8700"
2298 t_model="yps3"
2303 echo "Please select a supported target platform!"
2304 exit 7
2307 esac
2309 echo "Platform set to $modelname"
2312 #remove start
2313 ############################################################################
2314 # Amount of memory, for those that can differ. They have $memory unset at
2315 # this point.
2318 if [ -z "$memory" ]; then
2319 case $target_id in
2321 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2322 if [ "1" != `parse_args --ram` ]; then
2323 size=`parse_args --ram`;
2324 else
2325 size=`input`;
2327 case $size in
2328 60|64)
2329 memory="64"
2332 memory="32"
2334 esac
2337 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2338 if [ "1" != `parse_args --ram` ]; then
2339 size=`parse_args --ram`;
2340 else
2341 size=`input`;
2343 case $size in
2345 memory="8"
2348 memory="2"
2350 esac
2352 esac
2353 echo "Memory size selected: $memory MB"
2354 echo ""
2356 #remove end
2358 ##################################################################
2359 # Figure out build "type"
2362 # the ifp7x0 is the only platform that supports building a gdb stub like
2363 # this
2364 case $modelname in
2365 ifp7xx)
2366 gdbstub="(G)DB stub, "
2368 e200r|e200)
2369 gdbstub="(I)nstaller, "
2371 c200)
2372 gdbstub="(E)raser, "
2376 esac
2377 if [ "1" != `parse_args --type` ]; then
2378 btype=`parse_args --type`;
2379 else
2380 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual: (Defaults to N)"
2381 btype=`input`;
2384 case $btype in
2385 [Ii])
2386 appsdir='\$(ROOTDIR)/bootloader'
2387 apps="bootloader"
2388 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2389 bootloader="1"
2390 echo "e200R-installer build selected"
2392 [Ee])
2393 appsdir='\$(ROOTDIR)/bootloader'
2394 apps="bootloader"
2395 echo "C2(4)0 or C2(5)0"
2396 variant=`input`
2397 case $variant in
2399 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2400 echo "c240 eraser build selected"
2403 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2404 echo "c240 eraser build selected"
2406 esac
2407 bootloader="1"
2408 echo "c200 eraser build selected"
2410 [Bb])
2411 if test $t_manufacturer = "archos"; then
2412 # Archos SH-based players do this somewhat differently for
2413 # some reason
2414 appsdir='\$(ROOTDIR)/flash/bootbox'
2415 apps="bootbox"
2416 else
2417 appsdir='\$(ROOTDIR)/bootloader'
2418 apps="bootloader"
2419 flash=""
2420 if test -n "$boottool"; then
2421 tool="$boottool"
2423 if test -n "$bootoutput"; then
2424 output=$bootoutput
2427 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2428 bootloader="1"
2429 echo "Bootloader build selected"
2431 [Ss])
2432 debug="-DDEBUG"
2433 simulator="yes"
2434 extradefines="-DSIMULATOR"
2435 archosrom=""
2436 flash=""
2437 echo "Simulator build selected"
2439 [Aa])
2440 echo "Advanced build selected"
2441 whichadvanced
2443 [Gg])
2444 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2445 appsdir='\$(ROOTDIR)/gdb'
2446 apps="stub"
2447 case $modelname in
2448 ifp7xx)
2449 output="stub.wma"
2453 esac
2454 echo "GDB stub build selected"
2456 [Mm])
2457 toolset='';
2458 apps="manual"
2459 echo "Manual build selected"
2462 if [ "$modelname" = "e200r" ]; then
2463 echo "Do not use the e200R target for regular builds. Use e200 instead."
2464 exit 8
2466 debug=""
2467 btype="N" # set it explicitly since RET only gets here as well
2468 echo "Normal build selected"
2471 esac
2472 # to be able running "make manual" from non-manual configuration
2473 case $modelname in
2474 fmrecorder)
2475 manualdev="recorderv2fm"
2477 recorderv2)
2478 manualdev="recorderv2fm"
2480 h1??)
2481 manualdev="h100"
2483 ipodmini2g)
2484 manualdev="ipodmini"
2487 manualdev=$modelname
2489 esac
2491 if [ -z "$debug" ]; then
2492 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2495 echo "Using source code root directory: $rootdir"
2497 # this was once possible to change at build-time, but no more:
2498 language="english"
2500 uname=`uname`
2502 if [ "yes" = "$simulator" ]; then
2503 # setup compiler and things for simulator
2504 simcc
2506 if [ -d "simdisk" ]; then
2507 echo "Subdirectory 'simdisk' already present"
2508 else
2509 mkdir simdisk
2510 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2514 # Now, figure out version number of the (gcc) compiler we are about to use
2515 gccver=`$CC -dumpversion`;
2517 # figure out the binutil version too and display it, mostly for the build
2518 # system etc to be able to see it easier
2519 if [ $uname = "Darwin" ]; then
2520 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2521 else
2522 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2525 if [ -z "$gccver" ]; then
2526 echo "WARNING: The compiler you must use ($CC) is not in your path!"
2527 echo "WARNING: this may cause your build to fail since we cannot do the"
2528 echo "WARNING: checks we want now."
2529 else
2531 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2532 # DEPEND on it
2534 num1=`echo $gccver | cut -d . -f1`
2535 num2=`echo $gccver | cut -d . -f2`
2536 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2538 # This makes:
2539 # 3.3.X => 303
2540 # 3.4.X => 304
2541 # 2.95.3 => 295
2543 echo "Using $CC $gccver ($gccnum)"
2545 if test "$gccnum" -ge "400"; then
2546 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2547 # so we ignore that warnings for now
2548 # -Wno-pointer-sign
2549 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2552 if test "$gccnum" -ge "401"; then
2553 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2554 # will break strict-aliasing rules"
2556 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
2559 if test "$gccnum" -ge "402"; then
2560 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2561 # and later would throw it for several valid cases
2562 GCCOPTS="$GCCOPTS -Wno-override-init"
2565 case $prefix in
2567 # simulator
2569 i586-mingw32msvc-)
2570 # cross-compile for win32
2573 # Verify that the cross-compiler is of a recommended version!
2574 if test "$gccver" != "$gccchoice"; then
2575 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2576 echo "WARNING: version $gccchoice!"
2577 echo "WARNING: This may cause your build to fail since it may be a version"
2578 echo "WARNING: that isn't functional or known to not be the best choice."
2579 echo "WARNING: If you suffer from build problems, you know that this is"
2580 echo "WARNING: a likely source for them..."
2583 esac
2588 echo "Using $LD $ldver"
2590 # check the compiler for SH platforms
2591 if test "$CC" = "sh-elf-gcc"; then
2592 if test "$gccnum" -lt "400"; then
2593 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2594 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2595 else
2596 # figure out patch status
2597 gccpatch=`$CC --version`;
2599 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2600 echo "gcc $gccver is rockbox patched"
2601 # then convert -O to -Os to get smaller binaries!
2602 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2603 else
2604 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2605 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2610 if test "$CC" = "m68k-elf-gcc"; then
2611 # convert -O to -Os to get smaller binaries!
2612 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2615 if [ "1" != `parse_args --ccache` ]; then
2616 echo "Enable ccache for building"
2617 ccache="ccache"
2618 else
2619 if [ "1" = `parse_args --no-ccache` ]; then
2620 ccache=`findtool ccache`
2621 if test -n "$ccache"; then
2622 echo "Found and uses ccache ($ccache)"
2627 # figure out the full path to the various commands if possible
2628 HOSTCC=`findtool gcc --lit`
2629 HOSTAR=`findtool ar --lit`
2630 CC=`findtool ${CC} --lit`
2631 LD=`findtool ${AR} --lit`
2632 AR=`findtool ${AR} --lit`
2633 AS=`findtool ${AS} --lit`
2634 OC=`findtool ${OC} --lit`
2635 WINDRES=`findtool ${WINDRES} --lit`
2636 DLLTOOL=`findtool ${DLLTOOL} --lit`
2637 DLLWRAP=`findtool ${DLLWRAP} --lit`
2638 RANLIB=`findtool ${RANLIB} --lit`
2640 if test -n "$ccache"; then
2641 CC="$ccache $CC"
2644 if test "X$endian" = "Xbig"; then
2645 defendian="ROCKBOX_BIG_ENDIAN"
2646 else
2647 defendian="ROCKBOX_LITTLE_ENDIAN"
2650 if [ "1" != `parse_args --rbdir` ]; then
2651 rbdir=`parse_args --rbdir`;
2652 echo "Using alternate rockbox dir: ${rbdir}"
2655 sed > autoconf.h \
2656 -e "s,@ENDIAN@,${defendian},g" \
2657 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2658 -e "s,@config_rtc@,$config_rtc,g" \
2659 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2660 -e "s,@RBDIR@,${rbdir},g" \
2661 -e "s,@have_backlight@,$have_backlight,g" \
2662 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
2663 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
2664 <<EOF
2665 /* This header was made by configure */
2666 #ifndef __BUILD_AUTOCONF_H
2667 #define __BUILD_AUTOCONF_H
2669 /* Define endianess for the target or simulator platform */
2670 #define @ENDIAN@ 1
2672 /* Define this if you build rockbox to support the logf logging and display */
2673 #undef ROCKBOX_HAS_LOGF
2675 /* optional define for a backlight modded Ondio */
2676 @have_backlight@
2678 /* optional define for FM radio mod for iAudio M5 */
2679 @have_fmradio_in@
2681 /* optional define for ATA poweroff on Player */
2682 @have_ata_poweroff@
2684 /* optional defines for RTC mod for h1x0 */
2685 @config_rtc@
2686 @have_rtc_alarm@
2688 /* root of Rockbox */
2689 #define ROCKBOX_DIR "/@RBDIR@"
2691 #endif /* __BUILD_AUTOCONF_H */
2694 if test -n "$t_cpu"; then
2695 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2696 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2697 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2698 GCCOPTS="$GCCOPTS"
2701 if test "$simulator" = "yes"; then
2702 # add simul make stuff on the #SIMUL# line
2703 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2704 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2705 else
2706 # delete the lines that match
2707 simmagic1='/@SIMUL1@/D'
2708 simmagic2='/@SIMUL2@/D'
2711 if test "$swcodec" = "yes"; then
2712 voicetoolset="rbspeexenc voicefont wavtrim"
2713 else
2714 voicetoolset="voicefont wavtrim"
2717 if test "$apps" = "apps"; then
2718 # only when we build "real" apps we build the .lng files
2719 buildlangs="langs"
2722 #### Fix the cmdline ###
2723 if test -n "$ccache"; then
2724 cmdline="--ccache"
2727 cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype"
2730 ### end of cmdline
2732 sed > Makefile \
2733 -e "s,@ROOTDIR@,${rootdir},g" \
2734 -e "s,@DEBUG@,${debug},g" \
2735 -e "s,@MEMORY@,${memory},g" \
2736 -e "s,@TARGET_ID@,${target_id},g" \
2737 -e "s,@TARGET@,${target},g" \
2738 -e "s,@CPU@,${t_cpu},g" \
2739 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2740 -e "s,@MODELNAME@,${modelname},g" \
2741 -e "s,@LANGUAGE@,${language},g" \
2742 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2743 -e "s,@PWD@,${pwd},g" \
2744 -e "s,@HOSTCC@,${HOSTCC},g" \
2745 -e "s,@HOSTAR@,${HOSTAR},g" \
2746 -e "s,@CC@,${CC},g" \
2747 -e "s,@LD@,${LD},g" \
2748 -e "s,@AR@,${AR},g" \
2749 -e "s,@AS@,${AS},g" \
2750 -e "s,@OC@,${OC},g" \
2751 -e "s,@WINDRES@,${WINDRES},g" \
2752 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2753 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2754 -e "s,@RANLIB@,${RANLIB},g" \
2755 -e "s,@TOOL@,${tool},g" \
2756 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2757 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2758 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2759 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2760 -e "s,@OUTPUT@,${output},g" \
2761 -e "s,@APPEXTRA@,${appextra},g" \
2762 -e "s,@ARCHOSROM@,${archosrom},g" \
2763 -e "s,@FLASHFILE@,${flash},g" \
2764 -e "s,@PLUGINS@,${plugins},g" \
2765 -e "s,@CODECS@,${swcodec},g" \
2766 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2767 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2768 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2769 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2770 -e "s!@LDOPTS@!${LDOPTS}!g" \
2771 -e "s,@LOADADDRESS@,${loadaddress},g" \
2772 -e "s,@EXTRADEF@,${extradefines},g" \
2773 -e "s,@APPSDIR@,${appsdir},g" \
2774 -e "s,@FIRMDIR@,${firmdir},g" \
2775 -e "s,@TOOLSDIR@,${toolsdir},g" \
2776 -e "s,@APPS@,${apps},g" \
2777 -e "s,@SIMVER@,${simver},g" \
2778 -e "s,@GCCVER@,${gccver},g" \
2779 -e "s,@GCCNUM@,${gccnum},g" \
2780 -e "s,@UNAME@,${uname},g" \
2781 -e "s,@ENDIAN@,${defendian},g" \
2782 -e "s,@TOOLSET@,${toolset},g" \
2783 -e "${simmagic1}" \
2784 -e "${simmagic2}" \
2785 -e "s,@MANUALDEV@,${manualdev},g" \
2786 -e "s,@ENCODER@,${ENC_CMD},g" \
2787 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2788 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2789 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2790 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2791 -e "s,@LANGS@,${buildlangs},g" \
2792 -e "s,@USE_ELF@,${USE_ELF},g" \
2793 -e "s,@RBDIR@,${rbdir},g" \
2794 -e "s,@PREFIX@,$PREFIX,g" \
2795 -e "s,@CMDLINE@,$cmdline,g" \
2796 <<EOF
2797 ## Automatically generated. http://www.rockbox.org/
2799 export ROOTDIR=@ROOTDIR@
2800 export FIRMDIR=@FIRMDIR@
2801 export APPSDIR=@APPSDIR@
2802 export TOOLSDIR=@TOOLSDIR@
2803 export DOCSDIR=\$(ROOTDIR)/docs
2804 export MANUALDIR=\${ROOTDIR}/manual
2805 export DEBUG=@DEBUG@
2806 export MODELNAME=@MODELNAME@
2807 export ARCHOSROM=@ARCHOSROM@
2808 export FLASHFILE=@FLASHFILE@
2809 export TARGET_ID=@TARGET_ID@
2810 export TARGET=@TARGET@
2811 export CPU=@CPU@
2812 export MANUFACTURER=@MANUFACTURER@
2813 export OBJDIR=@PWD@
2814 export BUILDDIR=@PWD@
2815 export LANGUAGE=@LANGUAGE@
2816 export VOICELANGUAGE=@VOICELANGUAGE@
2817 export MEMORYSIZE=@MEMORY@
2818 export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
2819 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2820 export MKFIRMWARE=@TOOL@
2821 export BMP2RB_MONO=@BMP2RB_MONO@
2822 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2823 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2824 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2825 export BINARY=@OUTPUT@
2826 export APPEXTRA=@APPEXTRA@
2827 export ENABLEDPLUGINS=@PLUGINS@
2828 export SOFTWARECODECS=@CODECS@
2829 export EXTRA_DEFINES=@EXTRADEF@
2830 export HOSTCC=@HOSTCC@
2831 export HOSTAR=@HOSTAR@
2832 export CC=@CC@
2833 export LD=@LD@
2834 export AR=@AR@
2835 export AS=@AS@
2836 export OC=@OC@
2837 export WINDRES=@WINDRES@
2838 export DLLTOOL=@DLLTOOL@
2839 export DLLWRAP=@DLLWRAP@
2840 export RANLIB=@RANLIB@
2841 export PREFIX=@PREFIX@
2842 export PROFILE_OPTS=@PROFILE_OPTS@
2843 export SIMVER=@SIMVER@
2844 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2845 export GCCOPTS=@GCCOPTS@
2846 export TARGET_INC=@TARGET_INC@
2847 export LOADADDRESS=@LOADADDRESS@
2848 export SHARED_FLAG=@SHARED_FLAG@
2849 export LDOPTS=@LDOPTS@
2850 export GCCVER=@GCCVER@
2851 export GCCNUM=@GCCNUM@
2852 export UNAME=@UNAME@
2853 export MANUALDEV=@MANUALDEV@
2854 export TTS_OPTS=@TTS_OPTS@
2855 export TTS_ENGINE=@TTS_ENGINE@
2856 export ENC_OPTS=@ENC_OPTS@
2857 export ENCODER=@ENCODER@
2858 export USE_ELF=@USE_ELF@
2859 export RBDIR=@RBDIR@
2861 CONFIGURE_OPTIONS=@CMDLINE@
2863 include \$(TOOLSDIR)/root.make
2867 echo "Created Makefile"