Recognize AAC-HE SBR with upsampling and correct duration, bitrate, seek and resume...
[maemo-rb.git] / tools / configure
blobaa37ef7d71496680310b626e9037481b0c576b51
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 -std=gnu99"
14 # global LD options for all platforms
15 GLOBAL_LDOPTS=""
17 extradefines=""
18 use_logf="#undef ROCKBOX_HAS_LOGF"
19 use_bootchart="#undef DO_BOOTCHART"
21 scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
23 rbdir="/.rockbox"
24 need_full_path=
25 bindir=
26 libdir=
27 sharedir=
29 app_platform=
30 app_lcd_width=
31 app_lcd_height=
33 # Begin Function Definitions
35 input() {
36 read response
37 echo $response
40 prefixtools () {
41 prefix="$1"
42 CC=${prefix}gcc
43 WINDRES=${prefix}windres
44 DLLTOOL=${prefix}dlltool
45 DLLWRAP=${prefix}dllwrap
46 RANLIB=${prefix}ranlib
47 LD=${prefix}ld
48 AR=${prefix}ar
49 AS=${prefix}as
50 OC=${prefix}objcopy
53 app_get_platform() {
54 echo "Select your platform: (S)DL, (A)ndroid (default: Android)"
55 if [ -z "$ARG_PLATFORM" ]; then
56 choice=`input`
57 else
58 choice="$ARG_PLATFORM"
61 case $choice in
62 s|S*) app_platform="sdl" ;;
63 *|a|A*) app_platform="android" ;;
64 esac
66 echo "Selected $app_platform platform"
67 echo "Enter the LCD width (default: 320)"
68 if [ -z "$ARG_LCDWIDTH" ]; then
69 app_lcd_width=`input`
70 else
71 app_lcd_width="$ARG_LCDWIDTH"
73 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
74 echo "Enter the LCD height (default: 480)"
75 if [ -z "$ARG_LCDHEIGHT" ]; then
76 app_lcd_height=`input`
77 else
78 app_lcd_height="$ARG_LCDHEIGHT"
80 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
81 echo "Selected $app_lcd_width x $app_lcd_height resolution"
82 ARG_LCDWIDTH=$app_lcd_width
83 ARG_LCDHEIGHT=$app_lcd_height
85 app_lcd_width="#define LCD_WIDTH $app_lcd_width"
86 app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
87 # setup files and paths depending on the platform
88 if [ "$app_platform" = "sdl" ]; then
89 if [ -z "$ARG_PREFIX" ]; then
90 sharedir="/usr/local/share/rockbox"
91 bindir="/usr/local/bin"
92 libdir="/usr/local/lib"
93 else
94 if [ -d "$ARG_PREFIX" ]; then
95 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
96 ARG_PREFIX=`realpath $ARG_PREFIX`
97 if [ "0" != "$?" ]; then
98 echo "ERROR: Could not get prefix path (is realpath installed?)."
99 exit
102 sharedir="$ARG_PREFIX/share/rockbox"
103 bindir="$ARG_PREFIX/bin"
104 libdir="$ARG_PREFIX/lib"
105 else
106 echo "ERROR: PREFIX does not exist"
107 exit
110 output="rockbox"
111 bootoutput="rockbox"
112 elif [ "$app_platform" = "android" ]; then
113 if [ -n "$PREFIX" ]; then
114 echo "WARNING: PREFIX not supported on Android. You can however use --rbdir"
116 if [ -z "$ANDROID_SDK_PATH" ]; then
117 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
118 echo "environment variable point to the root directory of the Android SDK."
119 exit
121 if [ -z "$ANDROID_NDK_PATH" ]; then
122 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
123 echo "environment variable point to the root directory of the Android NDK."
124 exit
126 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
127 bindir="/data/data/org.rockbox/lib"
128 libdir="/data/data/org.rockbox/app_rockbox"
129 output="librockbox.so"
130 bootoutput="librockbox.so"
134 findarmgcc() {
135 if [ "$ARG_ARM_EABI" != "0" ]; then
136 prefixtools arm-elf-eabi-
137 gccchoice="4.4.4"
138 else
139 prefixtools arm-elf-
140 gccchoice="4.0.3"
144 # scan the $PATH for the given command
145 findtool(){
146 file="$1"
148 IFS=":"
149 for path in $PATH
151 # echo "checks for $file in $path" >&2
152 if test -f "$path/$file"; then
153 echo "$path/$file"
154 return
156 done
157 # check whether caller wants literal return value if not found
158 if [ "$2" = "--lit" ]; then
159 echo "$file"
163 # scan the $PATH for sdl-config - check whether for a (cross-)win32
164 # sdl as requested
165 findsdl(){
166 file="sdl-config"
167 winbuild="$1"
169 IFS=":"
170 for path in $PATH
172 #echo "checks for $file in $path" >&2
173 if test -f "$path/$file"; then
174 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
175 if [ "yes" = "${winbuild}" ]; then
176 echo "$path/$file"
177 return
179 else
180 if [ "yes" != "${winbuild}" ]; then
181 echo "$path/$file"
182 return
186 done
189 appcc () {
190 if [ "$1" = "sdl" ]; then
191 simcc "sdl-app"
192 elif [ "$1" = "android" ]; then
193 app_type=$1
194 androidcc
198 simcc () {
200 # default tool setup for native building
201 prefixtools "$CROSS_COMPILE"
202 ARG_ARM_THUMB=0 # can't use thumb in native builds
204 app_type=$1
205 winbuild=""
206 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef// -e s/-O//`
207 GCCOPTS="$GCCOPTS -fno-builtin -g"
208 GCCOPTIMIZE=''
209 LDOPTS='-lm' # button-sdl.c uses sqrt()
211 # default output binary name, don't override app_get_platform()
212 if [ "$app_type" != "sdl-app" ]; then
213 output="rockboxui"
216 # default share option, override below if needed
217 SHARED_FLAG="-shared"
219 if [ "$win32crosscompile" = "yes" ]; then
220 LDOPTS="$LDOPTS -mconsole"
221 output="$output.exe"
222 winbuild="yes"
223 else
224 case $uname in
225 CYGWIN*)
226 echo "Cygwin host detected"
228 LDOPTS="$LDOPTS -mconsole"
229 output="$output.exe"
230 winbuild="yes"
233 MINGW*)
234 echo "MinGW host detected"
236 LDOPTS="$LDOPTS -mconsole"
237 output="$output.exe"
238 winbuild="yes"
241 Linux)
242 echo "Linux host detected"
243 LDOPTS="$LDOPTS -ldl"
246 FreeBSD)
247 echo "FreeBSD host detected"
248 LDOPTS="$LDOPTS -ldl"
251 Darwin)
252 echo "Darwin host detected"
253 LDOPTS="$LDOPTS -ldl"
255 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
258 SunOS)
259 echo "*Solaris host detected"
261 GCCOPTS="$GCCOPTS -fPIC"
262 LDOPTS="$LDOPTS -ldl"
266 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
267 exit 1
269 esac
272 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
273 sdl=`findsdl $winbuild`
275 if [ -n `echo $app_type | grep "sdl"` ]; then
276 if [ -z "$sdl" ]; then
277 echo "configure didn't find sdl-config, which indicates that you"
278 echo "don't have SDL (properly) installed. Please correct and"
279 echo "re-run configure!"
280 exit 2
281 else
282 # generic sdl-config checker
283 GCCOPTS="$GCCOPTS `$sdl --cflags`"
284 LDOPTS="$LDOPTS `$sdl --libs`"
289 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
291 if test "X$win32crosscompile" != "Xyes"; then
292 case `uname -m` in
293 x86_64|amd64)
294 # fPIC is needed to make shared objects link
295 # setting visibility to hidden is necessary to avoid strange crashes
296 # due to symbol clashing
297 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
298 # x86_64 supports MMX by default
301 i686)
302 echo "Enabling MMX support"
303 GCCOPTS="$GCCOPTS -mmmx"
305 esac
307 id=$$
308 cat >$tmpdir/conftest-$id.c <<EOF
309 #include <stdio.h>
310 int main(int argc, char **argv)
312 int var=0;
313 char *varp = (char *)&var;
314 *varp=1;
316 printf("%d\n", var);
317 return 0;
321 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
323 # when cross compiling, the endianess cannot be detected because the above program doesn't run
324 # on the local machine. assume little endian but print a warning
325 endian=`$tmpdir/conftest-$id 2> /dev/null`
326 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
327 # big endian
328 endian="big"
329 else
330 # little endian
331 endian="little"
334 if [ "$CROSS_COMPILE" != "" ]; then
335 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
338 if [ "$app_type" = "sdl-sim" ]; then
339 echo "Simulator environment deemed $endian endian"
340 elif [ "$app_type" = "sdl-app" ]; then
341 echo "Application environment deemed $endian endian"
342 elif [ "$app_type" = "checkwps" ]; then
343 echo "CheckWPS environment deemed $endian endian"
346 # use wildcard here to make it work even if it was named *.exe like
347 # on cygwin
348 rm -f $tmpdir/conftest-$id*
349 else
350 # We are crosscompiling
351 # add cross-compiler option(s)
352 prefixtools i586-mingw32msvc-
353 LDOPTS="$LDOPTS -mconsole"
354 output="rockboxui.exe"
355 endian="little" # windows is little endian
356 echo "Enabling MMX support"
357 GCCOPTS="$GCCOPTS -mmmx"
362 # functions for setting up cross-compiler names and options
363 # also set endianess and what the exact recommended gcc version is
364 # the gcc version should most likely match what versions we build with
365 # rockboxdev.sh
367 shcc () {
368 prefixtools sh-elf-
369 GCCOPTS="$CCOPTS -m1"
370 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
371 endian="big"
372 gccchoice="4.0.3"
375 calmrisccc () {
376 prefixtools calmrisc16-unknown-elf-
377 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
378 GCCOPTIMIZE="-fomit-frame-pointer"
379 endian="big"
382 coldfirecc () {
383 prefixtools m68k-elf-
384 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
385 GCCOPTIMIZE="-fomit-frame-pointer"
386 endian="big"
387 gccchoice="4.5.2"
390 arm7tdmicc () {
391 findarmgcc
392 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
393 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
394 GCCOPTS="$GCCOPTS -mlong-calls"
396 GCCOPTIMIZE="-fomit-frame-pointer"
397 endian="little"
400 arm9tdmicc () {
401 findarmgcc
402 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
403 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
404 GCCOPTS="$GCCOPTS -mlong-calls"
406 GCCOPTIMIZE="-fomit-frame-pointer"
407 endian="little"
410 arm940tbecc () {
411 findarmgcc
412 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
413 if test "$ARG_ARM_EABI" = "0"; then
414 GCCOPTS="$GCCOPTS -mlong-calls"
416 GCCOPTIMIZE="-fomit-frame-pointer"
417 endian="big"
420 arm940tcc () {
421 findarmgcc
422 GCCOPTS="$CCOPTS -mcpu=arm940t"
423 if test "$ARG_ARM_EABI" = "0"; then
424 GCCOPTS="$GCCOPTS -mlong-calls"
426 GCCOPTIMIZE="-fomit-frame-pointer"
427 endian="little"
430 arm946cc () {
431 findarmgcc
432 GCCOPTS="$CCOPTS -mcpu=arm9e"
433 if test "$ARG_ARM_EABI" = "0"; then
434 GCCOPTS="$GCCOPTS -mlong-calls"
436 GCCOPTIMIZE="-fomit-frame-pointer"
437 endian="little"
440 arm926ejscc () {
441 findarmgcc
442 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
443 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
444 GCCOPTS="$GCCOPTS -mlong-calls"
446 GCCOPTIMIZE="-fomit-frame-pointer"
447 endian="little"
450 arm1136jfscc () {
451 findarmgcc
452 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
453 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
454 GCCOPTS="$GCCOPTS -mlong-calls"
456 GCCOPTIMIZE="-fomit-frame-pointer"
457 endian="little"
460 arm1176jzscc () {
461 findarmgcc
462 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
463 if test "$ARG_ARM_EABI" = "0"; then
464 GCCOPTS="$GCCOPTS -mlong-calls"
466 GCCOPTIMIZE="-fomit-frame-pointer"
467 endian="little"
470 mipselcc () {
471 prefixtools mipsel-elf-
472 # mips is predefined, but we want it for paths. use __mips instead
473 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
474 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
475 GCCOPTIMIZE="-fomit-frame-pointer"
476 endian="little"
477 gccchoice="4.1.2"
480 androidcc () {
481 buildhost=`uname | tr [:upper:] [:lower:]`
482 gccchoice="4.4.3"
483 gcctarget="arm-linux-androideabi-"
484 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
485 PATH=$PATH:$gccprefix/bin
486 prefixtools $gcctarget
487 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
488 GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
489 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
490 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
491 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
492 LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog"
493 extradefines="$extradefines -DANDROID"
494 endian="little"
495 SHARED_FLAG="-shared"
498 whichadvanced () {
499 atype=`echo "$1" | cut -c 2-`
500 ##################################################################
501 # Prompt for specific developer options
503 if [ "$atype" ]; then
504 interact=
505 else
506 interact=1
507 echo ""
508 printf "Enter your developer options (press only enter when done)\n\
509 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
510 (T)est plugins, S(m)all C lib:"
511 if [ "$memory" = "2" ]; then
512 printf ", (8)MB MOD"
514 if [ "$modelname" = "archosplayer" ]; then
515 printf ", Use (A)TA poweroff"
517 if [ "$t_model" = "ondio" ]; then
518 printf ", (B)acklight MOD"
520 if [ "$modelname" = "iaudiom5" ]; then
521 printf ", (F)M radio MOD"
523 if [ "$modelname" = "iriverh120" ]; then
524 printf ", (R)TC MOD"
526 echo ""
529 cont=1
530 while [ $cont = "1" ]; do
532 if [ "$interact" ]; then
533 option=`input`
534 else
535 option=`echo "$atype" | cut -c 1`
538 case $option in
539 [Dd])
540 if [ "yes" = "$profile" ]; then
541 echo "Debug is incompatible with profiling"
542 else
543 echo "DEBUG build enabled"
544 use_debug="yes"
547 [Ll])
548 echo "logf() support enabled"
549 logf="yes"
551 [Mm])
552 echo "Using Rockbox' small C library"
553 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
555 [Tt])
556 echo "Including test plugins"
557 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
559 [Cc])
560 echo "bootchart enabled (logf also enabled)"
561 bootchart="yes"
562 logf="yes"
564 [Ss])
565 echo "Simulator build enabled"
566 simulator="yes"
568 [Pp])
569 if [ "yes" = "$use_debug" ]; then
570 echo "Profiling is incompatible with debug"
571 else
572 echo "Profiling support is enabled"
573 profile="yes"
576 [Vv])
577 echo "Voice build selected"
578 voice="yes"
581 if [ "$memory" = "2" ]; then
582 memory="8"
583 echo "Memory size selected: 8MB"
586 [Aa])
587 if [ "$modelname" = "archosplayer" ]; then
588 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
589 echo "ATA power off enabled"
592 [Bb])
593 if [ "$t_model" = "ondio" ]; then
594 have_backlight="#define HAVE_BACKLIGHT"
595 echo "Backlight functions enabled"
598 [Ff])
599 if [ "$modelname" = "iaudiom5" ]; then
600 have_fmradio_in="#define HAVE_FMRADIO_IN"
601 echo "FM radio functions enabled"
604 [Rr])
605 if [ "$modelname" = "iriverh120" ]; then
606 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
607 have_rtc_alarm="#define HAVE_RTC_ALARM"
608 echo "RTC functions enabled (DS1339/DS3231)"
611 [Ww])
612 echo "Enabling Windows 32 cross-compiling"
613 win32crosscompile="yes"
615 "") # Match enter press when finished with advanced options
616 cont=0
619 echo "[ERROR] Option $option unsupported"
621 esac
622 if [ "$interact" ]; then
623 btype="$btype$option"
624 else
625 atype=`echo "$atype" | cut -c 2-`
626 [ "$atype" ] || cont=0
628 done
629 echo "done"
631 if [ "yes" = "$voice" ]; then
632 # Ask about languages to build
633 picklang
634 voicelanguage=`whichlang`
635 echo "Voice language set to $voicelanguage"
637 # Configure encoder and TTS engine for each language
638 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
639 voiceconfig "$thislang"
640 done
642 if [ "yes" = "$use_debug" ]; then
643 debug="-DDEBUG"
644 GCCOPTS="$GCCOPTS -g -DDEBUG"
646 if [ "yes" = "$logf" ]; then
647 use_logf="#define ROCKBOX_HAS_LOGF 1"
649 if [ "yes" = "$bootchart" ]; then
650 use_bootchart="#define DO_BOOTCHART 1"
652 if [ "yes" = "$simulator" ]; then
653 debug="-DDEBUG"
654 extradefines="$extradefines -DSIMULATOR"
655 archosrom=""
656 flash=""
658 if [ "yes" = "$profile" ]; then
659 extradefines="$extradefines -DRB_PROFILE"
660 PROFILE_OPTS="-finstrument-functions"
664 # Configure voice settings
665 voiceconfig () {
666 thislang=$1
667 if [ ! "$ARG_TTS" ]; then
668 echo "Building $thislang voice for $modelname. Select options"
669 echo ""
672 if [ -n "`findtool flite`" ]; then
673 FLITE="F(l)ite "
674 FLITE_OPTS=""
675 DEFAULT_TTS="flite"
676 DEFAULT_TTS_OPTS=$FLITE_OPTS
677 DEFAULT_NOISEFLOOR="500"
678 DEFAULT_CHOICE="L"
680 if [ -n "`findtool espeak`" ]; then
681 ESPEAK="(e)Speak "
682 ESPEAK_OPTS=""
683 DEFAULT_TTS="espeak"
684 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
685 DEFAULT_NOISEFLOOR="500"
686 DEFAULT_CHOICE="e"
688 if [ -n "`findtool festival`" ]; then
689 FESTIVAL="(F)estival "
690 case "$thislang" in
691 "italiano")
692 FESTIVAL_OPTS="--language italian"
694 "espanol")
695 FESTIVAL_OPTS="--language spanish"
697 "finnish")
698 FESTIVAL_OPTS="--language finnish"
700 "czech")
701 FESTIVAL_OPTS="--language czech"
704 FESTIVAL_OPTS=""
706 esac
707 DEFAULT_TTS="festival"
708 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
709 DEFAULT_NOISEFLOOR="500"
710 DEFAULT_CHOICE="F"
712 if [ -n "`findtool swift`" ]; then
713 SWIFT="S(w)ift "
714 SWIFT_OPTS=""
715 DEFAULT_TTS="swift"
716 DEFAULT_TTS_OPTS=$SWIFT_OPTS
717 DEFAULT_NOISEFLOOR="500"
718 DEFAULT_CHOICE="w"
720 # Allow SAPI if Windows is in use
721 if [ -n "`findtool winver`" ]; then
722 SAPI="(S)API "
723 SAPI_OPTS=""
724 DEFAULT_TTS="sapi"
725 DEFAULT_TTS_OPTS=$SAPI_OPTS
726 DEFAULT_NOISEFLOOR="500"
727 DEFAULT_CHOICE="S"
730 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
731 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
732 exit 3
735 if [ "$ARG_TTS" ]; then
736 option=$ARG_TTS
737 else
738 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
739 option=`input`
741 advopts="$advopts --tts=$option"
742 case "$option" in
743 [Ll])
744 TTS_ENGINE="flite"
745 NOISEFLOOR="500" # TODO: check this value
746 TTS_OPTS=$FLITE_OPTS
748 [Ee])
749 TTS_ENGINE="espeak"
750 NOISEFLOOR="500"
751 TTS_OPTS=$ESPEAK_OPTS
753 [Ff])
754 TTS_ENGINE="festival"
755 NOISEFLOOR="500"
756 TTS_OPTS=$FESTIVAL_OPTS
758 [Ss])
759 TTS_ENGINE="sapi"
760 NOISEFLOOR="500"
761 TTS_OPTS=$SAPI_OPTS
763 [Ww])
764 TTS_ENGINE="swift"
765 NOISEFLOOR="500"
766 TTS_OPTS=$SWIFT_OPTS
769 TTS_ENGINE=$DEFAULT_TTS
770 TTS_OPTS=$DEFAULT_TTS_OPTS
771 NOISEFLOOR=$DEFAULT_NOISEFLOOR
772 esac
773 echo "Using $TTS_ENGINE for TTS"
775 # Select which voice to use for Festival
776 if [ "$TTS_ENGINE" = "festival" ]; then
777 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
778 for voice in $voicelist; do
779 TTS_FESTIVAL_VOICE="$voice" # Default choice
780 break
781 done
782 if [ "$ARG_VOICE" ]; then
783 CHOICE=$ARG_VOICE
784 else
786 for voice in $voicelist; do
787 printf "%3d. %s\n" "$i" "$voice"
788 i=`expr $i + 1`
789 done
790 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
791 CHOICE=`input`
794 for voice in $voicelist; do
795 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
796 TTS_FESTIVAL_VOICE="$voice"
798 i=`expr $i + 1`
799 done
800 advopts="$advopts --voice=$CHOICE"
801 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
802 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
805 # Read custom tts options from command line
806 if [ "$ARG_TTSOPTS" ]; then
807 TTS_OPTS="$ARG_TTSOPTS"
808 advopts="$advopts --ttsopts='$TTS_OPTS'"
809 echo "$TTS_ENGINE options set to $TTS_OPTS"
812 if [ "$swcodec" = "yes" ]; then
813 ENCODER="rbspeexenc"
814 ENC_CMD="rbspeexenc"
815 ENC_OPTS="-q 4 -c 10"
816 else
817 if [ -n "`findtool lame`" ]; then
818 ENCODER="lame"
819 ENC_CMD="lame"
820 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
821 else
822 echo "You need LAME in the system path to build voice files for"
823 echo "HWCODEC targets."
824 exit 4
828 echo "Using $ENCODER for encoding voice clips"
830 # Read custom encoder options from command line
831 if [ "$ARG_ENCOPTS" ]; then
832 ENC_OPTS="$ARG_ENCOPTS"
833 advopts="$advopts --encopts='$ENC_OPTS'"
834 echo "$ENCODER options set to $ENC_OPTS"
837 TEMPDIR="${pwd}"
838 if [ -n "`findtool cygpath`" ]; then
839 TEMPDIR=`cygpath . -a -w`
843 picklang() {
844 # figure out which languages that are around
845 for file in $rootdir/apps/lang/*.lang; do
846 clean=`basename $file .lang`
847 langs="$langs $clean"
848 done
850 if [ "$ARG_LANG" ]; then
851 pick=$ARG_LANG
852 else
853 echo "Select a number for the language to use (default is english)"
854 # FIXME The multiple-language feature is currently broken
855 # echo "You may enter a comma-separated list of languages to build"
857 num=1
858 for one in $langs; do
859 echo "$num. $one"
860 num=`expr $num + 1`
861 done
862 pick=`input`
864 advopts="$advopts --language=$pick"
867 whichlang() {
868 output=""
869 # Allow the user to pass a comma-separated list of langauges
870 for thispick in `echo $pick | sed 's/,/ /g'`; do
871 num=1
872 for one in $langs; do
873 # Accept both the language number and name
874 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
875 if [ "$output" = "" ]; then
876 output=$one
877 else
878 output=$output,$one
881 num=`expr $num + 1`
882 done
883 done
884 if [ -z "$output" ]; then
885 # pick a default
886 output="english"
888 echo $output
891 help() {
892 echo "Rockbox configure script."
893 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
894 echo "Do *NOT* run this within the tools directory!"
895 echo ""
896 cat <<EOF
897 Usage: configure [OPTION]...
898 Options:
899 --target=TARGET Sets the target, TARGET can be either the target ID or
900 corresponding string. Run without this option to see all
901 available targets.
903 --ram=RAM Sets the RAM for certain targets. Even though any number
904 is accepted, not every number is correct. The default
905 value will be applied, if you entered a wrong number
906 (which depends on the target). Watch the output. Run
907 without this option if you are not sure which the right
908 number is.
910 --type=TYPE Sets the build type. Shortcuts are also valid.
911 Run without this option to see all available types.
912 Multiple values are allowed and managed in the input
913 order. So --type=b stands for Bootloader build, while
914 --type=ab stands for "Backlight MOD" build.
916 --language=LANG Set the language used for voice generation (used only if
917 TYPE is AV).
919 --tts=ENGINE Set the TTS engine used for voice generation (used only
920 if TYPE is AV).
922 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
923 AV).
925 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
927 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
929 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
930 This is useful for having multiple alternate builds on
931 your device that you can load with ROLO. However as the
932 bootloader looks for .rockbox you won't be able to boot
933 into this build.
935 --ccache Enable ccache use (done by default these days)
936 --no-ccache Disable ccache use
938 --eabi Make configure prefer toolchains that are able to compile
939 for the new ARM standard abi EABI
940 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
941 --thumb Build with -mthumb (for ARM builds)
942 --no-thumb The opposite of --thumb (don't use thumb even for targets
943 where this is the default
944 --prefix Target installation directory
945 --help Shows this message (must not be used with other options)
949 exit
952 ARG_CCACHE=
953 ARG_ENCOPTS=
954 ARG_LANG=
955 ARG_RAM=
956 ARG_RBDIR=
957 ARG_TARGET=
958 ARG_TTS=
959 ARG_TTSOPTS=
960 ARG_TYPE=
961 ARG_VOICE=
962 ARG_ARM_EABI=
963 ARG_ARM_THUMB=
964 ARG_PREFIX="$PREFIX"
965 err=
966 for arg in "$@"; do
967 case "$arg" in
968 --ccache) ARG_CCACHE=1;;
969 --no-ccache) ARG_CCACHE=0;;
970 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
971 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
972 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
973 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
974 --platform=*) ARG_PLATFORM=`echo "$arg" | cut -d = -f 2`;;
975 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
976 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
977 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
978 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
979 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
980 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
981 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
982 --eabi) ARG_ARM_EABI=1;;
983 --no-eabi) ARG_ARM_EABI=0;;
984 --thumb) ARG_ARM_THUMB=1;;
985 --no-thumb) ARG_ARM_THUMB=0;;
986 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
987 --help) help;;
988 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
989 esac
990 done
991 [ "$err" ] && exit 1
993 advopts=
995 if [ "$TMPDIR" != "" ]; then
996 tmpdir=$TMPDIR
997 else
998 tmpdir=/tmp
1000 echo Using temporary directory $tmpdir
1002 if test -r "configure"; then
1003 # this is a check for a configure script in the current directory, it there
1004 # is one, try to figure out if it is this one!
1006 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1007 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1008 echo "It will only cause you pain and grief. Instead do this:"
1009 echo ""
1010 echo " cd .."
1011 echo " mkdir build-dir"
1012 echo " cd build-dir"
1013 echo " ../tools/configure"
1014 echo ""
1015 echo "Much happiness will arise from this. Enjoy"
1016 exit 5
1020 # get our current directory
1021 pwd=`pwd`;
1023 if { echo $pwd | grep " "; } then
1024 echo "You're running this script in a path that contains space. The build"
1025 echo "system is unfortunately not clever enough to deal with this. Please"
1026 echo "run the script from a different path, rename the path or fix the build"
1027 echo "system!"
1028 exit 6
1031 if [ -z "$rootdir" ]; then
1032 ##################################################################
1033 # Figure out where the source code root is!
1035 rootdir=`dirname $0`/../
1037 #####################################################################
1038 # Convert the possibly relative directory name to an absolute version
1040 now=`pwd`
1041 cd $rootdir
1042 rootdir=`pwd`
1044 # cd back to the build dir
1045 cd $now
1048 apps="apps"
1049 appsdir='\$(ROOTDIR)/apps'
1050 firmdir='\$(ROOTDIR)/firmware'
1051 toolsdir='\$(ROOTDIR)/tools'
1054 ##################################################################
1055 # Figure out target platform
1058 if [ "$ARG_TARGET" ]; then
1059 buildfor=$ARG_TARGET
1060 else
1061 echo "Enter target platform:"
1062 cat <<EOF
1063 ==Archos== ==iriver== ==Apple iPod==
1064 0) Player/Studio 10) H120/H140 20) Color/Photo
1065 1) Recorder 11) H320/H340 21) Nano 1G
1066 2) FM Recorder 12) iHP-100/110/115 22) Video
1067 3) Recorder v2 13) iFP-790 23) 3G
1068 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1069 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1070 6) AV300 26) Mini 2G
1071 ==Toshiba== 27) 1G, 2G
1072 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1073 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1074 31) M5/M5L
1075 32) 7 ==Olympus= ==SanDisk==
1076 33) D2 70) M:Robe 500 50) Sansa e200
1077 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1078 52) Sansa c200
1079 ==Creative== ==Philips== 53) Sansa m200
1080 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1081 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1082 92) Zen Vision HDD1830 56) Sansa e200v2
1083 102) GoGear HDD6330 57) Sansa m200v4
1084 ==Onda== 58) Sansa Fuze
1085 120) VX747 ==Meizu== 59) Sansa c200v2
1086 121) VX767 110) M6SL 60) Sansa Clipv2
1087 122) VX747+ 111) M6SP 61) Sansa View
1088 123) VX777 112) M3 62) Sansa Clip+
1089 63) Sansa Fuze v2
1090 ==Samsung== ==Tatung==
1091 140) YH-820 150) Elio TPJ-1022 ==Logik==
1092 141) YH-920 80) DAX 1GB MP3/DAB
1093 142) YH-925 ==Packard Bell==
1094 143) YP-S3 160) Vibe 500 ==Lyre project==
1095 130) Lyre proto 1
1096 ==MPIO== == Application == 131) Mini2440
1097 170) HD200 200) Application
1098 171) HD300
1102 buildfor=`input`;
1105 # Set of tools built for all target platforms:
1106 toolset="rdf2binary convbdf codepages"
1108 # Toolsets for some target families:
1109 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1110 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1111 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1112 ipodbitmaptools="$toolset scramble bmp2rb"
1113 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1114 tccbitmaptools="$toolset scramble bmp2rb"
1115 # generic is used by IFP, Meizu and Onda
1116 genericbitmaptools="$toolset bmp2rb"
1117 # scramble is used by all other targets
1118 scramblebitmaptools="$genericbitmaptools scramble"
1121 # ---- For each target ----
1123 # *Variables*
1124 # target_id: a unique number identifying this target, IS NOT the menu number.
1125 # Just use the currently highest number+1 when you add a new
1126 # target.
1127 # modelname: short model name used all over to identify this target
1128 # memory: number of megabytes of RAM this target has. If the amount can
1129 # be selected by the size prompt, let memory be unset here
1130 # target: -Ddefine passed to the build commands to make the correct
1131 # config-*.h file get included etc
1132 # tool: the tool that takes a plain binary and converts that into a
1133 # working "firmware" file for your target
1134 # output: the final output file name
1135 # boottool: the tool that takes a plain binary and generates a bootloader
1136 # file for your target (or blank to use $tool)
1137 # bootoutput:the final output file name for the bootloader (or blank to use
1138 # $output)
1139 # appextra: passed to the APPEXTRA variable in the Makefiles.
1140 # TODO: add proper explanation
1141 # archosrom: used only for Archos targets that build a special flashable .ucl
1142 # image.
1143 # flash: name of output for flashing, for targets where there's a special
1144 # file output for this.
1145 # plugins: set to 'yes' to build the plugins. Early development builds can
1146 # set this to no in the early stages to have an easier life for a
1147 # while
1148 # swcodec: set 'yes' on swcodec targets
1149 # toolset: lists what particular tools in the tools/ directory that this
1150 # target needs to have built prior to building Rockbox
1152 # *Functions*
1153 # *cc: sets up gcc and compiler options for your target builds. Note
1154 # that if you select a simulator build, the compiler selection is
1155 # overridden later in the script.
1157 case $buildfor in
1159 0|archosplayer)
1160 target_id=1
1161 modelname="archosplayer"
1162 target="-DARCHOS_PLAYER"
1163 shcc
1164 tool="$rootdir/tools/scramble"
1165 output="archos.mod"
1166 appextra="player:gui"
1167 archosrom="$pwd/rombox.ucl"
1168 flash="$pwd/rockbox.ucl"
1169 plugins="yes"
1170 swcodec=""
1172 # toolset is the tools within the tools directory that we build for
1173 # this particular target.
1174 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1176 # Note: the convbdf is present in the toolset just because: 1) the
1177 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1178 # build the player simulator
1180 t_cpu="sh"
1181 t_manufacturer="archos"
1182 t_model="player"
1185 1|archosrecorder)
1186 target_id=2
1187 modelname="archosrecorder"
1188 target="-DARCHOS_RECORDER"
1189 shcc
1190 tool="$rootdir/tools/scramble"
1191 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1192 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1193 output="ajbrec.ajz"
1194 appextra="recorder:gui:radio"
1195 #archosrom="$pwd/rombox.ucl"
1196 flash="$pwd/rockbox.ucl"
1197 plugins="yes"
1198 swcodec=""
1199 # toolset is the tools within the tools directory that we build for
1200 # this particular target.
1201 toolset=$archosbitmaptools
1202 t_cpu="sh"
1203 t_manufacturer="archos"
1204 t_model="recorder"
1207 2|archosfmrecorder)
1208 target_id=3
1209 modelname="archosfmrecorder"
1210 target="-DARCHOS_FMRECORDER"
1211 shcc
1212 tool="$rootdir/tools/scramble -fm"
1213 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1214 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1215 output="ajbrec.ajz"
1216 appextra="recorder:gui:radio"
1217 #archosrom="$pwd/rombox.ucl"
1218 flash="$pwd/rockbox.ucl"
1219 plugins="yes"
1220 swcodec=""
1221 # toolset is the tools within the tools directory that we build for
1222 # this particular target.
1223 toolset=$archosbitmaptools
1224 t_cpu="sh"
1225 t_manufacturer="archos"
1226 t_model="fm_v2"
1229 3|archosrecorderv2)
1230 target_id=4
1231 modelname="archosrecorderv2"
1232 target="-DARCHOS_RECORDERV2"
1233 shcc
1234 tool="$rootdir/tools/scramble -v2"
1235 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1236 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1237 output="ajbrec.ajz"
1238 appextra="recorder:gui:radio"
1239 #archosrom="$pwd/rombox.ucl"
1240 flash="$pwd/rockbox.ucl"
1241 plugins="yes"
1242 swcodec=""
1243 # toolset is the tools within the tools directory that we build for
1244 # this particular target.
1245 toolset=$archosbitmaptools
1246 t_cpu="sh"
1247 t_manufacturer="archos"
1248 t_model="fm_v2"
1251 4|archosondiosp)
1252 target_id=7
1253 modelname="archosondiosp"
1254 target="-DARCHOS_ONDIOSP"
1255 shcc
1256 tool="$rootdir/tools/scramble -osp"
1257 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1258 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1259 output="ajbrec.ajz"
1260 appextra="recorder:gui:radio"
1261 #archosrom="$pwd/rombox.ucl"
1262 flash="$pwd/rockbox.ucl"
1263 plugins="yes"
1264 swcodec=""
1265 # toolset is the tools within the tools directory that we build for
1266 # this particular target.
1267 toolset=$archosbitmaptools
1268 t_cpu="sh"
1269 t_manufacturer="archos"
1270 t_model="ondio"
1273 5|archosondiofm)
1274 target_id=8
1275 modelname="archosondiofm"
1276 target="-DARCHOS_ONDIOFM"
1277 shcc
1278 tool="$rootdir/tools/scramble -ofm"
1279 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1280 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1281 output="ajbrec.ajz"
1282 appextra="recorder:gui:radio"
1283 #archosrom="$pwd/rombox.ucl"
1284 flash="$pwd/rockbox.ucl"
1285 plugins="yes"
1286 swcodec=""
1287 toolset=$archosbitmaptools
1288 t_cpu="sh"
1289 t_manufacturer="archos"
1290 t_model="ondio"
1293 6|archosav300)
1294 target_id=38
1295 modelname="archosav300"
1296 target="-DARCHOS_AV300"
1297 memory=16 # always
1298 arm7tdmicc
1299 tool="$rootdir/tools/scramble -mm=C"
1300 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1301 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1302 output="cjbm.ajz"
1303 appextra="recorder:gui:radio"
1304 plugins="yes"
1305 swcodec=""
1306 # toolset is the tools within the tools directory that we build for
1307 # this particular target.
1308 toolset="$toolset scramble descramble bmp2rb"
1309 # architecture, manufacturer and model for the target-tree build
1310 t_cpu="arm"
1311 t_manufacturer="archos"
1312 t_model="av300"
1315 10|iriverh120)
1316 target_id=9
1317 modelname="iriverh120"
1318 target="-DIRIVER_H120"
1319 memory=32 # always
1320 coldfirecc
1321 tool="$rootdir/tools/scramble -add=h120"
1322 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1323 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1324 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1325 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1326 output="rockbox.iriver"
1327 bootoutput="bootloader.iriver"
1328 appextra="recorder:gui:radio"
1329 flash="$pwd/rombox.iriver"
1330 plugins="yes"
1331 swcodec="yes"
1332 # toolset is the tools within the tools directory that we build for
1333 # this particular target.
1334 toolset=$iriverbitmaptools
1335 t_cpu="coldfire"
1336 t_manufacturer="iriver"
1337 t_model="h100"
1340 11|iriverh300)
1341 target_id=10
1342 modelname="iriverh300"
1343 target="-DIRIVER_H300"
1344 memory=32 # always
1345 coldfirecc
1346 tool="$rootdir/tools/scramble -add=h300"
1347 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1348 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1349 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1350 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1351 output="rockbox.iriver"
1352 appextra="recorder:gui:radio"
1353 plugins="yes"
1354 swcodec="yes"
1355 # toolset is the tools within the tools directory that we build for
1356 # this particular target.
1357 toolset=$iriverbitmaptools
1358 t_cpu="coldfire"
1359 t_manufacturer="iriver"
1360 t_model="h300"
1363 12|iriverh100)
1364 target_id=11
1365 modelname="iriverh100"
1366 target="-DIRIVER_H100"
1367 memory=16 # always
1368 coldfirecc
1369 tool="$rootdir/tools/scramble -add=h100"
1370 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1371 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1372 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1373 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1374 output="rockbox.iriver"
1375 bootoutput="bootloader.iriver"
1376 appextra="recorder:gui:radio"
1377 flash="$pwd/rombox.iriver"
1378 plugins="yes"
1379 swcodec="yes"
1380 # toolset is the tools within the tools directory that we build for
1381 # this particular target.
1382 toolset=$iriverbitmaptools
1383 t_cpu="coldfire"
1384 t_manufacturer="iriver"
1385 t_model="h100"
1388 13|iriverifp7xx)
1389 target_id=19
1390 modelname="iriverifp7xx"
1391 target="-DIRIVER_IFP7XX"
1392 memory=1
1393 arm7tdmicc short
1394 tool="cp"
1395 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1396 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1397 output="rockbox.wma"
1398 appextra="recorder:gui:radio"
1399 plugins="yes"
1400 swcodec="yes"
1401 # toolset is the tools within the tools directory that we build for
1402 # this particular target.
1403 toolset=$genericbitmaptools
1404 t_cpu="arm"
1405 t_manufacturer="pnx0101"
1406 t_model="iriver-ifp7xx"
1409 14|iriverh10)
1410 target_id=22
1411 modelname="iriverh10"
1412 target="-DIRIVER_H10"
1413 memory=32 # always
1414 arm7tdmicc
1415 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1416 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1417 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1418 output="rockbox.mi4"
1419 appextra="recorder:gui:radio"
1420 plugins="yes"
1421 swcodec="yes"
1422 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1423 bootoutput="H10_20GC.mi4"
1424 # toolset is the tools within the tools directory that we build for
1425 # this particular target.
1426 toolset=$scramblebitmaptools
1427 # architecture, manufacturer and model for the target-tree build
1428 t_cpu="arm"
1429 t_manufacturer="iriver"
1430 t_model="h10"
1433 15|iriverh10_5gb)
1434 target_id=24
1435 modelname="iriverh10_5gb"
1436 target="-DIRIVER_H10_5GB"
1437 memory=32 # always
1438 arm7tdmicc
1439 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1440 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1441 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1442 output="rockbox.mi4"
1443 appextra="recorder:gui:radio"
1444 plugins="yes"
1445 swcodec="yes"
1446 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1447 bootoutput="H10.mi4"
1448 # toolset is the tools within the tools directory that we build for
1449 # this particular target.
1450 toolset=$scramblebitmaptools
1451 # architecture, manufacturer and model for the target-tree build
1452 t_cpu="arm"
1453 t_manufacturer="iriver"
1454 t_model="h10"
1457 20|ipodcolor)
1458 target_id=13
1459 modelname="ipodcolor"
1460 target="-DIPOD_COLOR"
1461 memory=32 # always
1462 arm7tdmicc
1463 tool="$rootdir/tools/scramble -add=ipco"
1464 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1465 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1466 output="rockbox.ipod"
1467 appextra="recorder:gui:radio"
1468 plugins="yes"
1469 swcodec="yes"
1470 bootoutput="bootloader-$modelname.ipod"
1471 # toolset is the tools within the tools directory that we build for
1472 # this particular target.
1473 toolset=$ipodbitmaptools
1474 # architecture, manufacturer and model for the target-tree build
1475 t_cpu="arm"
1476 t_manufacturer="ipod"
1477 t_model="color"
1480 21|ipodnano1g)
1481 target_id=14
1482 modelname="ipodnano1g"
1483 target="-DIPOD_NANO"
1484 memory=32 # always
1485 arm7tdmicc
1486 tool="$rootdir/tools/scramble -add=nano"
1487 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1488 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1489 output="rockbox.ipod"
1490 appextra="recorder:gui:radio"
1491 plugins="yes"
1492 swcodec="yes"
1493 bootoutput="bootloader-$modelname.ipod"
1494 # toolset is the tools within the tools directory that we build for
1495 # this particular target.
1496 toolset=$ipodbitmaptools
1497 # architecture, manufacturer and model for the target-tree build
1498 t_cpu="arm"
1499 t_manufacturer="ipod"
1500 t_model="nano"
1503 22|ipodvideo)
1504 target_id=15
1505 modelname="ipodvideo"
1506 target="-DIPOD_VIDEO"
1507 memory=64 # always. This is reduced at runtime if needed
1508 arm7tdmicc
1509 tool="$rootdir/tools/scramble -add=ipvd"
1510 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1511 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1512 output="rockbox.ipod"
1513 appextra="recorder:gui:radio"
1514 plugins="yes"
1515 swcodec="yes"
1516 bootoutput="bootloader-$modelname.ipod"
1517 # toolset is the tools within the tools directory that we build for
1518 # this particular target.
1519 toolset=$ipodbitmaptools
1520 # architecture, manufacturer and model for the target-tree build
1521 t_cpu="arm"
1522 t_manufacturer="ipod"
1523 t_model="video"
1526 23|ipod3g)
1527 target_id=16
1528 modelname="ipod3g"
1529 target="-DIPOD_3G"
1530 memory=32 # always
1531 arm7tdmicc
1532 tool="$rootdir/tools/scramble -add=ip3g"
1533 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1534 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1535 output="rockbox.ipod"
1536 appextra="recorder:gui:radio"
1537 plugins="yes"
1538 swcodec="yes"
1539 bootoutput="bootloader-$modelname.ipod"
1540 # toolset is the tools within the tools directory that we build for
1541 # this particular target.
1542 toolset=$ipodbitmaptools
1543 # architecture, manufacturer and model for the target-tree build
1544 t_cpu="arm"
1545 t_manufacturer="ipod"
1546 t_model="3g"
1549 24|ipod4g)
1550 target_id=17
1551 modelname="ipod4g"
1552 target="-DIPOD_4G"
1553 memory=32 # always
1554 arm7tdmicc
1555 tool="$rootdir/tools/scramble -add=ip4g"
1556 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1557 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1558 output="rockbox.ipod"
1559 appextra="recorder:gui:radio"
1560 plugins="yes"
1561 swcodec="yes"
1562 bootoutput="bootloader-$modelname.ipod"
1563 # toolset is the tools within the tools directory that we build for
1564 # this particular target.
1565 toolset=$ipodbitmaptools
1566 # architecture, manufacturer and model for the target-tree build
1567 t_cpu="arm"
1568 t_manufacturer="ipod"
1569 t_model="4g"
1572 25|ipodmini1g)
1573 target_id=18
1574 modelname="ipodmini1g"
1575 target="-DIPOD_MINI"
1576 memory=32 # always
1577 arm7tdmicc
1578 tool="$rootdir/tools/scramble -add=mini"
1579 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1580 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1581 output="rockbox.ipod"
1582 appextra="recorder:gui:radio"
1583 plugins="yes"
1584 swcodec="yes"
1585 bootoutput="bootloader-$modelname.ipod"
1586 # toolset is the tools within the tools directory that we build for
1587 # this particular target.
1588 toolset=$ipodbitmaptools
1589 # architecture, manufacturer and model for the target-tree build
1590 t_cpu="arm"
1591 t_manufacturer="ipod"
1592 t_model="mini"
1595 26|ipodmini2g)
1596 target_id=21
1597 modelname="ipodmini2g"
1598 target="-DIPOD_MINI2G"
1599 memory=32 # always
1600 arm7tdmicc
1601 tool="$rootdir/tools/scramble -add=mn2g"
1602 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1603 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1604 output="rockbox.ipod"
1605 appextra="recorder:gui:radio"
1606 plugins="yes"
1607 swcodec="yes"
1608 bootoutput="bootloader-$modelname.ipod"
1609 # toolset is the tools within the tools directory that we build for
1610 # this particular target.
1611 toolset=$ipodbitmaptools
1612 # architecture, manufacturer and model for the target-tree build
1613 t_cpu="arm"
1614 t_manufacturer="ipod"
1615 t_model="mini2g"
1618 27|ipod1g2g)
1619 target_id=29
1620 modelname="ipod1g2g"
1621 target="-DIPOD_1G2G"
1622 memory=32 # always
1623 arm7tdmicc
1624 tool="$rootdir/tools/scramble -add=1g2g"
1625 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1626 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1627 output="rockbox.ipod"
1628 appextra="recorder:gui:radio"
1629 plugins="yes"
1630 swcodec="yes"
1631 bootoutput="bootloader-$modelname.ipod"
1632 # toolset is the tools within the tools directory that we build for
1633 # this particular target.
1634 toolset=$ipodbitmaptools
1635 # architecture, manufacturer and model for the target-tree build
1636 t_cpu="arm"
1637 t_manufacturer="ipod"
1638 t_model="1g2g"
1641 28|ipodnano2g)
1642 target_id=62
1643 modelname="ipodnano2g"
1644 target="-DIPOD_NANO2G"
1645 memory=32 # always
1646 arm940tcc
1647 tool="$rootdir/tools/scramble -add=nn2g"
1648 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1649 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1650 output="rockbox.ipod"
1651 appextra="recorder:gui:radio"
1652 plugins="yes"
1653 swcodec="yes"
1654 bootoutput="bootloader-$modelname.ipod"
1655 # toolset is the tools within the tools directory that we build for
1656 # this particular target.
1657 toolset=$ipodbitmaptools
1658 # architecture, manufacturer and model for the target-tree build
1659 t_cpu="arm"
1660 t_manufacturer="s5l8700"
1661 t_model="ipodnano2g"
1664 29|ipod6g)
1665 target_id=71
1666 modelname="ipod6g"
1667 target="-DIPOD_6G"
1668 memory=64 # always
1669 arm926ejscc
1670 tool="$rootdir/tools/scramble -add=ip6g"
1671 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1672 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1673 output="rockbox.ipod"
1674 appextra="recorder:gui:radio"
1675 plugins="yes"
1676 swcodec="yes"
1677 bootoutput="bootloader-$modelname.ipod"
1678 # toolset is the tools within the tools directory that we build for
1679 # this particular target.
1680 toolset=$ipodbitmaptools
1681 # architecture, manufacturer and model for the target-tree build
1682 t_cpu="arm"
1683 t_manufacturer="s5l8702"
1684 t_model="ipod6g"
1687 30|iaudiox5)
1688 target_id=12
1689 modelname="iaudiox5"
1690 target="-DIAUDIO_X5"
1691 memory=16 # always
1692 coldfirecc
1693 tool="$rootdir/tools/scramble -add=iax5"
1694 boottool="$rootdir/tools/scramble -iaudiox5"
1695 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1696 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1697 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1698 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1699 output="rockbox.iaudio"
1700 bootoutput="x5_fw.bin"
1701 appextra="recorder:gui:radio"
1702 plugins="yes"
1703 swcodec="yes"
1704 # toolset is the tools within the tools directory that we build for
1705 # this particular target.
1706 toolset="$iaudiobitmaptools"
1707 # architecture, manufacturer and model for the target-tree build
1708 t_cpu="coldfire"
1709 t_manufacturer="iaudio"
1710 t_model="x5"
1713 31|iaudiom5)
1714 target_id=28
1715 modelname="iaudiom5"
1716 target="-DIAUDIO_M5"
1717 memory=16 # always
1718 coldfirecc
1719 tool="$rootdir/tools/scramble -add=iam5"
1720 boottool="$rootdir/tools/scramble -iaudiom5"
1721 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1722 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1723 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1724 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1725 output="rockbox.iaudio"
1726 bootoutput="m5_fw.bin"
1727 appextra="recorder:gui:radio"
1728 plugins="yes"
1729 swcodec="yes"
1730 # toolset is the tools within the tools directory that we build for
1731 # this particular target.
1732 toolset="$iaudiobitmaptools"
1733 # architecture, manufacturer and model for the target-tree build
1734 t_cpu="coldfire"
1735 t_manufacturer="iaudio"
1736 t_model="m5"
1739 32|iaudio7)
1740 target_id=32
1741 modelname="iaudio7"
1742 target="-DIAUDIO_7"
1743 memory=16 # always
1744 arm946cc
1745 tool="$rootdir/tools/scramble -add=i7"
1746 boottool="$rootdir/tools/scramble -tcc=crc"
1747 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1748 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1749 output="rockbox.iaudio"
1750 appextra="recorder:gui:radio"
1751 plugins="yes"
1752 swcodec="yes"
1753 bootoutput="I7_FW.BIN"
1754 # toolset is the tools within the tools directory that we build for
1755 # this particular target.
1756 toolset="$tccbitmaptools"
1757 # architecture, manufacturer and model for the target-tree build
1758 t_cpu="arm"
1759 t_manufacturer="tcc77x"
1760 t_model="iaudio7"
1763 33|cowond2)
1764 target_id=34
1765 modelname="cowond2"
1766 target="-DCOWON_D2"
1767 memory=32
1768 arm926ejscc
1769 tool="$rootdir/tools/scramble -add=d2"
1770 boottool="cp "
1771 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1772 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1773 output="rockbox.d2"
1774 bootoutput="bootloader-cowond2.bin"
1775 appextra="recorder:gui:radio"
1776 plugins="yes"
1777 swcodec="yes"
1778 toolset="$tccbitmaptools"
1779 # architecture, manufacturer and model for the target-tree build
1780 t_cpu="arm"
1781 t_manufacturer="tcc780x"
1782 t_model="cowond2"
1785 34|iaudiom3)
1786 target_id=37
1787 modelname="iaudiom3"
1788 target="-DIAUDIO_M3"
1789 memory=16 # always
1790 coldfirecc
1791 tool="$rootdir/tools/scramble -add=iam3"
1792 boottool="$rootdir/tools/scramble -iaudiom3"
1793 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1794 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1795 output="rockbox.iaudio"
1796 bootoutput="cowon_m3.bin"
1797 appextra="recorder:gui:radio"
1798 plugins="yes"
1799 swcodec="yes"
1800 # toolset is the tools within the tools directory that we build for
1801 # this particular target.
1802 toolset="$iaudiobitmaptools"
1803 # architecture, manufacturer and model for the target-tree build
1804 t_cpu="coldfire"
1805 t_manufacturer="iaudio"
1806 t_model="m3"
1809 40|gigabeatfx)
1810 target_id=20
1811 modelname="gigabeatfx"
1812 target="-DGIGABEAT_F"
1813 memory=32 # always
1814 arm9tdmicc
1815 tool="$rootdir/tools/scramble -add=giga"
1816 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1817 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1818 output="rockbox.gigabeat"
1819 appextra="recorder:gui:radio"
1820 plugins="yes"
1821 swcodec="yes"
1822 toolset=$gigabeatbitmaptools
1823 boottool="$rootdir/tools/scramble -gigabeat"
1824 bootoutput="FWIMG01.DAT"
1825 # architecture, manufacturer and model for the target-tree build
1826 t_cpu="arm"
1827 t_manufacturer="s3c2440"
1828 t_model="gigabeat-fx"
1831 41|gigabeats)
1832 target_id=26
1833 modelname="gigabeats"
1834 target="-DGIGABEAT_S"
1835 memory=64
1836 arm1136jfscc
1837 tool="$rootdir/tools/scramble -add=gigs"
1838 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1839 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1840 output="rockbox.gigabeat"
1841 appextra="recorder:gui:radio"
1842 plugins="yes"
1843 swcodec="yes"
1844 toolset="$gigabeatbitmaptools"
1845 boottool="$rootdir/tools/scramble -gigabeats"
1846 bootoutput="nk.bin"
1847 # architecture, manufacturer and model for the target-tree build
1848 t_cpu="arm"
1849 t_manufacturer="imx31"
1850 t_model="gigabeat-s"
1853 70|mrobe500)
1854 target_id=36
1855 modelname="mrobe500"
1856 target="-DMROBE_500"
1857 memory=64 # always
1858 arm926ejscc
1859 tool="$rootdir/tools/scramble -add=m500"
1860 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1861 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1862 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1863 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1864 output="rockbox.mrobe500"
1865 appextra="recorder:gui:radio"
1866 plugins="yes"
1867 swcodec="yes"
1868 toolset=$gigabeatbitmaptools
1869 boottool="cp "
1870 bootoutput="rockbox.mrboot"
1871 # architecture, manufacturer and model for the target-tree build
1872 t_cpu="arm"
1873 t_manufacturer="tms320dm320"
1874 t_model="mrobe-500"
1877 71|mrobe100)
1878 target_id=33
1879 modelname="mrobe100"
1880 target="-DMROBE_100"
1881 memory=32 # always
1882 arm7tdmicc
1883 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1884 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1885 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1886 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1887 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1888 output="rockbox.mi4"
1889 appextra="recorder:gui:radio"
1890 plugins="yes"
1891 swcodec="yes"
1892 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1893 bootoutput="pp5020.mi4"
1894 # toolset is the tools within the tools directory that we build for
1895 # this particular target.
1896 toolset=$scramblebitmaptools
1897 # architecture, manufacturer and model for the target-tree build
1898 t_cpu="arm"
1899 t_manufacturer="olympus"
1900 t_model="mrobe-100"
1903 80|logikdax)
1904 target_id=31
1905 modelname="logikdax"
1906 target="-DLOGIK_DAX"
1907 memory=2 # always
1908 arm946cc
1909 tool="$rootdir/tools/scramble -add=ldax"
1910 boottool="$rootdir/tools/scramble -tcc=crc"
1911 bootoutput="player.rom"
1912 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1913 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1914 output="rockbox.logik"
1915 appextra="recorder:gui:radio"
1916 plugins=""
1917 swcodec="yes"
1918 # toolset is the tools within the tools directory that we build for
1919 # this particular target.
1920 toolset=$tccbitmaptools
1921 # architecture, manufacturer and model for the target-tree build
1922 t_cpu="arm"
1923 t_manufacturer="tcc77x"
1924 t_model="logikdax"
1927 90|zenvisionm30gb)
1928 target_id=35
1929 modelname="zenvisionm30gb"
1930 target="-DCREATIVE_ZVM"
1931 memory=64
1932 arm926ejscc
1933 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1934 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1935 tool="$rootdir/tools/scramble -creative=zvm"
1936 USE_ELF="yes"
1937 output="rockbox.zvm"
1938 appextra="recorder:gui:radio"
1939 plugins="yes"
1940 swcodec="yes"
1941 toolset=$ipodbitmaptools
1942 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1943 bootoutput="rockbox.zvmboot"
1944 # architecture, manufacturer and model for the target-tree build
1945 t_cpu="arm"
1946 t_manufacturer="tms320dm320"
1947 t_model="creative-zvm"
1950 91|zenvisionm60gb)
1951 target_id=40
1952 modelname="zenvisionm60gb"
1953 target="-DCREATIVE_ZVM60GB"
1954 memory=64
1955 arm926ejscc
1956 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1957 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1958 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1959 USE_ELF="yes"
1960 output="rockbox.zvm60"
1961 appextra="recorder:gui:radio"
1962 plugins="yes"
1963 swcodec="yes"
1964 toolset=$ipodbitmaptools
1965 boottool="$rootdir/tools/scramble -creative=zvm60"
1966 bootoutput="rockbox.zvm60boot"
1967 # architecture, manufacturer and model for the target-tree build
1968 t_cpu="arm"
1969 t_manufacturer="tms320dm320"
1970 t_model="creative-zvm"
1973 92|zenvision)
1974 target_id=39
1975 modelname="zenvision"
1976 target="-DCREATIVE_ZV"
1977 memory=64
1978 arm926ejscc
1979 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1980 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1981 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1982 USE_ELF="yes"
1983 output="rockbox.zv"
1984 appextra="recorder:gui:radio"
1985 plugins=""
1986 swcodec="yes"
1987 toolset=$ipodbitmaptools
1988 boottool="$rootdir/tools/scramble -creative=zenvision"
1989 bootoutput="rockbox.zvboot"
1990 # architecture, manufacturer and model for the target-tree build
1991 t_cpu="arm"
1992 t_manufacturer="tms320dm320"
1993 t_model="creative-zvm"
1996 50|sansae200)
1997 target_id=23
1998 modelname="sansae200"
1999 target="-DSANSA_E200"
2000 memory=32 # supposedly
2001 arm7tdmicc
2002 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2003 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2004 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2005 output="rockbox.mi4"
2006 appextra="recorder:gui:radio"
2007 plugins="yes"
2008 swcodec="yes"
2009 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2010 bootoutput="PP5022.mi4"
2011 # toolset is the tools within the tools directory that we build for
2012 # this particular target.
2013 toolset=$scramblebitmaptools
2014 # architecture, manufacturer and model for the target-tree build
2015 t_cpu="arm"
2016 t_manufacturer="sandisk"
2017 t_model="sansa-e200"
2020 51|sansae200r)
2021 # the e200R model is pretty much identical to the e200, it only has a
2022 # different option to the scramble tool when building a bootloader and
2023 # makes the bootloader output file name in all lower case.
2024 target_id=27
2025 modelname="sansae200r"
2026 target="-DSANSA_E200"
2027 memory=32 # supposedly
2028 arm7tdmicc
2029 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2030 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2031 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2032 output="rockbox.mi4"
2033 appextra="recorder:gui:radio"
2034 plugins="yes"
2035 swcodec="yes"
2036 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2037 bootoutput="pp5022.mi4"
2038 # toolset is the tools within the tools directory that we build for
2039 # this particular target.
2040 toolset=$scramblebitmaptools
2041 # architecture, manufacturer and model for the target-tree build
2042 t_cpu="arm"
2043 t_manufacturer="sandisk"
2044 t_model="sansa-e200"
2047 52|sansac200)
2048 target_id=30
2049 modelname="sansac200"
2050 target="-DSANSA_C200"
2051 memory=32 # supposedly
2052 arm7tdmicc
2053 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2054 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2055 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2056 output="rockbox.mi4"
2057 appextra="recorder:gui:radio"
2058 plugins="yes"
2059 swcodec="yes"
2060 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2061 bootoutput="firmware.mi4"
2062 # toolset is the tools within the tools directory that we build for
2063 # this particular target.
2064 toolset=$scramblebitmaptools
2065 # architecture, manufacturer and model for the target-tree build
2066 t_cpu="arm"
2067 t_manufacturer="sandisk"
2068 t_model="sansa-c200"
2071 53|sansam200)
2072 target_id=48
2073 modelname="sansam200"
2074 target="-DSANSA_M200"
2075 memory=1 # always
2076 arm946cc
2077 tool="$rootdir/tools/scramble -add=m200"
2078 boottool="$rootdir/tools/scramble -tcc=crc"
2079 bootoutput="player.rom"
2080 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2081 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2082 output="rockbox.m200"
2083 appextra="recorder:gui:radio"
2084 plugins=""
2085 swcodec="yes"
2086 # toolset is the tools within the tools directory that we build for
2087 # this particular target.
2088 toolset=$tccbitmaptools
2089 # architecture, manufacturer and model for the target-tree build
2090 t_cpu="arm"
2091 t_manufacturer="tcc77x"
2092 t_model="m200"
2095 54|sansac100)
2096 target_id=42
2097 modelname="sansac100"
2098 target="-DSANSA_C100"
2099 memory=2
2100 arm946cc
2101 tool="$rootdir/tools/scramble -add=c100"
2102 boottool="$rootdir/tools/scramble -tcc=crc"
2103 bootoutput="player.rom"
2104 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2105 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2106 output="rockbox.c100"
2107 appextra="recorder:gui:radio"
2108 plugins=""
2109 swcodec="yes"
2110 # toolset is the tools within the tools directory that we build for
2111 # this particular target.
2112 toolset=$tccbitmaptools
2113 # architecture, manufacturer and model for the target-tree build
2114 t_cpu="arm"
2115 t_manufacturer="tcc77x"
2116 t_model="c100"
2119 55|sansaclip)
2120 target_id=50
2121 modelname="sansaclip"
2122 target="-DSANSA_CLIP"
2123 memory=2
2124 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2125 bmp2rb_native="$bmp2rb_mono"
2126 tool="$rootdir/tools/scramble -add=clip"
2127 output="rockbox.sansa"
2128 bootoutput="bootloader-clip.sansa"
2129 appextra="recorder:gui:radio"
2130 plugins="yes"
2131 swcodec="yes"
2132 toolset=$scramblebitmaptools
2133 t_cpu="arm"
2134 t_manufacturer="as3525"
2135 t_model="sansa-clip"
2136 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2137 arm9tdmicc
2138 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2142 56|sansae200v2)
2143 target_id=51
2144 modelname="sansae200v2"
2145 target="-DSANSA_E200V2"
2146 memory=8
2147 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2148 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2149 tool="$rootdir/tools/scramble -add=e2v2"
2150 output="rockbox.sansa"
2151 bootoutput="bootloader-e200v2.sansa"
2152 appextra="recorder:gui:radio"
2153 plugins="yes"
2154 swcodec="yes"
2155 toolset=$scramblebitmaptools
2156 t_cpu="arm"
2157 t_manufacturer="as3525"
2158 t_model="sansa-e200v2"
2159 arm9tdmicc
2163 57|sansam200v4)
2164 target_id=52
2165 modelname="sansam200v4"
2166 target="-DSANSA_M200V4"
2167 memory=2
2168 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2169 bmp2rb_native="$bmp2rb_mono"
2170 tool="$rootdir/tools/scramble -add=m2v4"
2171 output="rockbox.sansa"
2172 bootoutput="bootloader-m200v4.sansa"
2173 appextra="recorder:gui:radio"
2174 plugins="yes"
2175 swcodec="yes"
2176 toolset=$scramblebitmaptools
2177 t_cpu="arm"
2178 t_manufacturer="as3525"
2179 t_model="sansa-m200v4"
2180 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2181 arm9tdmicc
2182 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2186 58|sansafuze)
2187 target_id=53
2188 modelname="sansafuze"
2189 target="-DSANSA_FUZE"
2190 memory=8
2191 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2192 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2193 tool="$rootdir/tools/scramble -add=fuze"
2194 output="rockbox.sansa"
2195 bootoutput="bootloader-fuze.sansa"
2196 appextra="recorder:gui:radio"
2197 plugins="yes"
2198 swcodec="yes"
2199 toolset=$scramblebitmaptools
2200 t_cpu="arm"
2201 t_manufacturer="as3525"
2202 t_model="sansa-fuze"
2203 arm9tdmicc
2207 59|sansac200v2)
2208 target_id=55
2209 modelname="sansac200v2"
2210 target="-DSANSA_C200V2"
2211 memory=2 # as per OF diagnosis mode
2212 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2213 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2214 tool="$rootdir/tools/scramble -add=c2v2"
2215 output="rockbox.sansa"
2216 bootoutput="bootloader-c200v2.sansa"
2217 appextra="recorder:gui:radio"
2218 plugins="yes"
2219 swcodec="yes"
2220 # toolset is the tools within the tools directory that we build for
2221 # this particular target.
2222 toolset=$scramblebitmaptools
2223 # architecture, manufacturer and model for the target-tree build
2224 t_cpu="arm"
2225 t_manufacturer="as3525"
2226 t_model="sansa-c200v2"
2227 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2228 arm9tdmicc
2229 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2232 60|sansaclipv2)
2233 target_id=60
2234 modelname="sansaclipv2"
2235 target="-DSANSA_CLIPV2"
2236 memory=8
2237 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2238 bmp2rb_native="$bmp2rb_mono"
2239 tool="$rootdir/tools/scramble -add=clv2"
2240 output="rockbox.sansa"
2241 bootoutput="bootloader-clipv2.sansa"
2242 appextra="recorder:gui:radio"
2243 plugins="yes"
2244 swcodec="yes"
2245 toolset=$scramblebitmaptools
2246 t_cpu="arm"
2247 t_manufacturer="as3525"
2248 t_model="sansa-clipv2"
2249 arm926ejscc
2252 61|sansaview)
2253 echo "Sansa View is not yet supported!"
2254 exit 1
2255 target_id=63
2256 modelname="sansaview"
2257 target="-DSANSA_VIEW"
2258 memory=32
2259 arm1176jzscc
2260 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2261 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2262 output="rockbox.mi4"
2263 appextra="gui"
2264 plugins=""
2265 swcodec="yes"
2266 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2267 bootoutput="firmware.mi4"
2268 # toolset is the tools within the tools directory that we build for
2269 # this particular target.
2270 toolset=$scramblebitmaptools
2271 t_cpu="arm"
2272 t_manufacturer="sandisk"
2273 t_model="sansa-view"
2276 62|sansaclipplus)
2277 target_id=66
2278 modelname="sansaclipplus"
2279 target="-DSANSA_CLIPPLUS"
2280 memory=8
2281 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2282 bmp2rb_native="$bmp2rb_mono"
2283 tool="$rootdir/tools/scramble -add=cli+"
2284 output="rockbox.sansa"
2285 bootoutput="bootloader-clipplus.sansa"
2286 appextra="recorder:gui:radio"
2287 plugins="yes"
2288 swcodec="yes"
2289 toolset=$scramblebitmaptools
2290 t_cpu="arm"
2291 t_manufacturer="as3525"
2292 t_model="sansa-clipplus"
2293 arm926ejscc
2296 63|sansafuzev2)
2297 target_id=68
2298 modelname="sansafuzev2"
2299 target="-DSANSA_FUZEV2"
2300 memory=8 # not sure
2301 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2302 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2303 tool="$rootdir/tools/scramble -add=fuz2"
2304 output="rockbox.sansa"
2305 bootoutput="bootloader-fuzev2.sansa"
2306 appextra="recorder:gui:radio"
2307 plugins="yes"
2308 swcodec="yes"
2309 toolset=$scramblebitmaptools
2310 t_cpu="arm"
2311 t_manufacturer="as3525"
2312 t_model="sansa-fuzev2"
2313 arm926ejscc
2316 150|tatungtpj1022)
2317 target_id=25
2318 modelname="tatungtpj1022"
2319 target="-DTATUNG_TPJ1022"
2320 memory=32 # always
2321 arm7tdmicc
2322 tool="$rootdir/tools/scramble -add tpj2"
2323 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2324 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2325 output="rockbox.elio"
2326 appextra="recorder:gui:radio"
2327 plugins="yes"
2328 swcodec="yes"
2329 boottool="$rootdir/tools/scramble -mi4v2"
2330 bootoutput="pp5020.mi4"
2331 # toolset is the tools within the tools directory that we build for
2332 # this particular target.
2333 toolset=$scramblebitmaptools
2334 # architecture, manufacturer and model for the target-tree build
2335 t_cpu="arm"
2336 t_manufacturer="tatung"
2337 t_model="tpj1022"
2340 100|gogearsa9200)
2341 target_id=41
2342 modelname="gogearsa9200"
2343 target="-DPHILIPS_SA9200"
2344 memory=32 # supposedly
2345 arm7tdmicc
2346 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2347 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2348 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2349 output="rockbox.mi4"
2350 appextra="recorder:gui:radio"
2351 plugins="yes"
2352 swcodec="yes"
2353 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2354 bootoutput="FWImage.ebn"
2355 # toolset is the tools within the tools directory that we build for
2356 # this particular target.
2357 toolset=$scramblebitmaptools
2358 # architecture, manufacturer and model for the target-tree build
2359 t_cpu="arm"
2360 t_manufacturer="philips"
2361 t_model="sa9200"
2364 101|gogearhdd1630)
2365 target_id=43
2366 modelname="gogearhdd1630"
2367 target="-DPHILIPS_HDD1630"
2368 memory=32 # supposedly
2369 arm7tdmicc
2370 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2371 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2372 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2373 output="rockbox.mi4"
2374 appextra="recorder:gui:radio"
2375 plugins="yes"
2376 swcodec="yes"
2377 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2378 bootoutput="FWImage.ebn"
2379 # toolset is the tools within the tools directory that we build for
2380 # this particular target.
2381 toolset=$scramblebitmaptools
2382 # architecture, manufacturer and model for the target-tree build
2383 t_cpu="arm"
2384 t_manufacturer="philips"
2385 t_model="hdd1630"
2388 102|gogearhdd6330)
2389 target_id=65
2390 modelname="gogearhdd6330"
2391 target="-DPHILIPS_HDD6330"
2392 memory=64 # always
2393 arm7tdmicc
2394 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2395 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2396 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2397 output="rockbox.mi4"
2398 appextra="recorder:gui:radio"
2399 plugins="yes"
2400 swcodec="yes"
2401 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2402 bootoutput="FWImage.ebn"
2403 # toolset is the tools within the tools directory that we build for
2404 # this particular target.
2405 toolset=$scramblebitmaptools
2406 # architecture, manufacturer and model for the target-tree build
2407 t_cpu="arm"
2408 t_manufacturer="philips"
2409 t_model="hdd6330"
2412 110|meizum6sl)
2413 target_id=49
2414 modelname="meizum6sl"
2415 target="-DMEIZU_M6SL"
2416 memory=16 # always
2417 arm940tbecc
2418 tool="cp"
2419 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2420 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2421 output="rockbox.meizu"
2422 appextra="recorder:gui:radio"
2423 plugins="no" #FIXME
2424 swcodec="yes"
2425 toolset=$genericbitmaptools
2426 boottool="cp"
2427 bootoutput="rockboot.ebn"
2428 # architecture, manufacturer and model for the target-tree build
2429 t_cpu="arm"
2430 t_manufacturer="s5l8700"
2431 t_model="meizu-m6sl"
2434 111|meizum6sp)
2435 target_id=46
2436 modelname="meizum6sp"
2437 target="-DMEIZU_M6SP"
2438 memory=16 # always
2439 arm940tbecc
2440 tool="cp"
2441 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2442 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2443 output="rockbox.meizu"
2444 appextra="recorder:gui:radio"
2445 plugins="no" #FIXME
2446 swcodec="yes"
2447 toolset=$genericbitmaptools
2448 boottool="cp"
2449 bootoutput="rockboot.ebn"
2450 # architecture, manufacturer and model for the target-tree build
2451 t_cpu="arm"
2452 t_manufacturer="s5l8700"
2453 t_model="meizu-m6sp"
2456 112|meizum3)
2457 target_id=47
2458 modelname="meizum3"
2459 target="-DMEIZU_M3"
2460 memory=16 # always
2461 arm940tbecc
2462 tool="cp"
2463 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2464 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2465 output="rockbox.meizu"
2466 appextra="recorder:gui:radio"
2467 plugins="no" #FIXME
2468 swcodec="yes"
2469 toolset=$genericbitmaptools
2470 boottool="cp"
2471 bootoutput="rockboot.ebn"
2472 # architecture, manufacturer and model for the target-tree build
2473 t_cpu="arm"
2474 t_manufacturer="s5l8700"
2475 t_model="meizu-m3"
2478 120|ondavx747)
2479 target_id=45
2480 modelname="ondavx747"
2481 target="-DONDA_VX747"
2482 memory=16
2483 mipselcc
2484 tool="$rootdir/tools/scramble -add=x747"
2485 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2486 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2487 output="rockbox.vx747"
2488 appextra="recorder:gui:radio"
2489 plugins="yes"
2490 swcodec="yes"
2491 toolset=$genericbitmaptools
2492 boottool="$rootdir/tools/scramble -ccpmp"
2493 bootoutput="ccpmp.bin"
2494 # architecture, manufacturer and model for the target-tree build
2495 t_cpu="mips"
2496 t_manufacturer="ingenic_jz47xx"
2497 t_model="onda_vx747"
2500 121|ondavx767)
2501 target_id=64
2502 modelname="ondavx767"
2503 target="-DONDA_VX767"
2504 memory=16 #FIXME
2505 mipselcc
2506 tool="cp"
2507 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2508 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2509 output="rockbox.vx767"
2510 appextra="recorder:gui:radio"
2511 plugins="" #FIXME
2512 swcodec="yes"
2513 toolset=$genericbitmaptools
2514 boottool="$rootdir/tools/scramble -ccpmp"
2515 bootoutput="ccpmp.bin"
2516 # architecture, manufacturer and model for the target-tree build
2517 t_cpu="mips"
2518 t_manufacturer="ingenic_jz47xx"
2519 t_model="onda_vx767"
2522 122|ondavx747p)
2523 target_id=54
2524 modelname="ondavx747p"
2525 target="-DONDA_VX747P"
2526 memory=16
2527 mipselcc
2528 tool="$rootdir/tools/scramble -add=747p"
2529 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2530 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2531 output="rockbox.vx747p"
2532 appextra="recorder:gui:radio"
2533 plugins="yes"
2534 swcodec="yes"
2535 toolset=$genericbitmaptools
2536 boottool="$rootdir/tools/scramble -ccpmp"
2537 bootoutput="ccpmp.bin"
2538 # architecture, manufacturer and model for the target-tree build
2539 t_cpu="mips"
2540 t_manufacturer="ingenic_jz47xx"
2541 t_model="onda_vx747"
2544 123|ondavx777)
2545 target_id=61
2546 modelname="ondavx777"
2547 target="-DONDA_VX777"
2548 memory=16
2549 mipselcc
2550 tool="$rootdir/tools/scramble -add=x777"
2551 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2552 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2553 output="rockbox.vx777"
2554 appextra="recorder:gui:radio"
2555 plugins="yes"
2556 swcodec="yes"
2557 toolset=$genericbitmaptools
2558 boottool="$rootdir/tools/scramble -ccpmp"
2559 bootoutput="ccpmp.bin"
2560 # architecture, manufacturer and model for the target-tree build
2561 t_cpu="mips"
2562 t_manufacturer="ingenic_jz47xx"
2563 t_model="onda_vx747"
2566 130|lyreproto1)
2567 target_id=56
2568 modelname="lyreproto1"
2569 target="-DLYRE_PROTO1"
2570 memory=64
2571 arm926ejscc
2572 tool="cp"
2573 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2574 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2575 output="rockbox.lyre"
2576 appextra="recorder:gui:radio"
2577 plugins=""
2578 swcodec="yes"
2579 toolset=$scramblebitmaptools
2580 boottool="cp"
2581 bootoutput="bootloader-proto1.lyre"
2582 # architecture, manufacturer and model for the target-tree build
2583 t_cpu="arm"
2584 t_manufacturer="at91sam"
2585 t_model="lyre_proto1"
2588 131|mini2440)
2589 target_id=99
2590 modelname="mini2440"
2591 target="-DMINI2440"
2592 memory=64
2593 arm9tdmicc
2594 tool="$rootdir/tools/scramble -add=m244"
2595 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2596 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2597 output="rockbox.mini2440"
2598 appextra="recorder:gui:radio"
2599 plugins=""
2600 swcodec="yes"
2601 toolset=$scramblebitmaptools
2602 boottool="cp"
2603 bootoutput="bootloader-mini2440.lyre"
2604 # architecture, manufacturer and model for the target-tree build
2605 t_cpu="arm"
2606 t_manufacturer="s3c2440"
2607 t_model="mini2440"
2610 140|samsungyh820)
2611 target_id=57
2612 modelname="samsungyh820"
2613 target="-DSAMSUNG_YH820"
2614 memory=32 # always
2615 arm7tdmicc
2616 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2617 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2618 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2619 output="rockbox.mi4"
2620 appextra="recorder:gui:radio"
2621 plugins="yes"
2622 swcodec="yes"
2623 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2624 bootoutput="FW_YH820.mi4"
2625 # toolset is the tools within the tools directory that we build for
2626 # this particular target.
2627 toolset=$scramblebitmaptools
2628 # architecture, manufacturer and model for the target-tree build
2629 t_cpu="arm"
2630 t_manufacturer="samsung"
2631 t_model="yh820"
2634 141|samsungyh920)
2635 target_id=58
2636 modelname="samsungyh920"
2637 target="-DSAMSUNG_YH920"
2638 memory=32 # always
2639 arm7tdmicc
2640 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2641 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2642 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2643 output="rockbox.mi4"
2644 appextra="recorder:gui:radio"
2645 plugins="yes"
2646 swcodec="yes"
2647 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2648 bootoutput="PP5020.mi4"
2649 # toolset is the tools within the tools directory that we build for
2650 # this particular target.
2651 toolset=$scramblebitmaptools
2652 # architecture, manufacturer and model for the target-tree build
2653 t_cpu="arm"
2654 t_manufacturer="samsung"
2655 t_model="yh920"
2658 142|samsungyh925)
2659 target_id=59
2660 modelname="samsungyh925"
2661 target="-DSAMSUNG_YH925"
2662 memory=32 # always
2663 arm7tdmicc
2664 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2665 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2666 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2667 output="rockbox.mi4"
2668 appextra="recorder:gui:radio"
2669 plugins="yes"
2670 swcodec="yes"
2671 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2672 bootoutput="FW_YH925.mi4"
2673 # toolset is the tools within the tools directory that we build for
2674 # this particular target.
2675 toolset=$scramblebitmaptools
2676 # architecture, manufacturer and model for the target-tree build
2677 t_cpu="arm"
2678 t_manufacturer="samsung"
2679 t_model="yh925"
2682 143|samsungyps3)
2683 target_id=60
2684 modelname="samsungyps3"
2685 target="-DSAMSUNG_YPS3"
2686 memory=16 # always
2687 arm940tbecc
2688 tool="cp"
2689 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2690 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2691 output="rockbox.yps3"
2692 appextra="recorder:gui:radio"
2693 plugins="no" #FIXME
2694 swcodec="yes"
2695 toolset=$genericbitmaptools
2696 boottool="cp"
2697 bootoutput="rockboot.ebn"
2698 # architecture, manufacturer and model for the target-tree build
2699 t_cpu="arm"
2700 t_manufacturer="s5l8700"
2701 t_model="yps3"
2704 160|vibe500)
2705 target_id=67
2706 modelname="vibe500"
2707 target="-DPBELL_VIBE500"
2708 memory=32 # always
2709 arm7tdmicc
2710 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2711 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2712 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2713 output="rockbox.mi4"
2714 appextra="recorder:gui:radio"
2715 plugins="yes"
2716 swcodec="yes"
2717 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2718 bootoutput="jukebox.mi4"
2719 # toolset is the tools within the tools directory that we build for
2720 # this particular target.
2721 toolset=$scramblebitmaptools
2722 # architecture, manufacturer and model for the target-tree build
2723 t_cpu="arm"
2724 t_manufacturer="pbell"
2725 t_model="vibe500"
2728 170|mpiohd200)
2729 target_id=69
2730 modelname="mpiohd200"
2731 target="-DMPIO_HD200"
2732 memory=16 # always
2733 coldfirecc
2734 tool="$rootdir/tools/scramble -add=hd20"
2735 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2736 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2737 output="rockbox.mpio"
2738 bootoutput="bootloader.mpio"
2739 appextra="recorder:gui:radio"
2740 plugins="yes"
2741 swcodec="yes"
2742 # toolset is the tools within the tools directory that we build for
2743 # this particular target.
2744 toolset="$genericbitmaptools"
2745 # architecture, manufacturer and model for the target-tree build
2746 t_cpu="coldfire"
2747 t_manufacturer="mpio"
2748 t_model="hd200"
2751 171|mpiohd300)
2752 target_id=70
2753 modelname="mpiohd300"
2754 target="-DMPIO_HD300"
2755 memory=16 # always
2756 coldfirecc
2757 tool="$rootdir/tools/scramble -add=hd30"
2758 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2759 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2760 output="rockbox.mpio"
2761 bootoutput="bootloader.mpio"
2762 appextra="recorder:gui:radio"
2763 plugins="yes"
2764 swcodec="yes"
2765 # toolset is the tools within the tools directory that we build for
2766 # this particular target.
2767 toolset="$genericbitmaptools"
2768 # architecture, manufacturer and model for the target-tree build
2769 t_cpu="coldfire"
2770 t_manufacturer="mpio"
2771 t_model="hd300"
2774 200|app*)
2775 target_id=100
2776 modelname="application"
2777 target="-DAPPLICATION"
2779 need_full_path="yes"
2780 app_get_platform
2782 memory=8
2783 uname=`uname`
2785 appcc "$app_platform"
2786 tool="cp "
2787 boottool="cp "
2788 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2789 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2790 appextra="recorder:gui:radio"
2791 plugins=""
2792 swcodec="yes"
2793 # architecture, manufacturer and model for the target-tree build
2794 t_cpu="hosted"
2795 t_manufacturer="$app_platform"
2796 t_model="app"
2800 echo "Please select a supported target platform!"
2801 exit 7
2804 esac
2806 echo "Platform set to $modelname"
2809 #remove start
2810 ############################################################################
2811 # Amount of memory, for those that can differ. They have $memory unset at
2812 # this point.
2815 if [ -z "$memory" ]; then
2816 case $target_id in
2818 if [ "$ARG_RAM" ]; then
2819 size=$ARG_RAM
2820 else
2821 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2822 size=`input`;
2824 case $size in
2825 60|64)
2826 memory="64"
2829 memory="32"
2831 esac
2834 if [ "$ARG_RAM" ]; then
2835 size=$ARG_RAM
2836 else
2837 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2838 size=`input`;
2840 case $size in
2842 memory="8"
2845 memory="2"
2847 esac
2849 esac
2850 echo "Memory size selected: $memory MB"
2851 [ "$ARG_TYPE" ] || echo ""
2853 #remove end
2855 ##################################################################
2856 # Figure out build "type"
2859 # the ifp7x0 is the only platform that supports building a gdb stub like
2860 # this
2861 case $modelname in
2862 iriverifp7xx)
2863 gdbstub="(G)DB stub, "
2865 sansae200r|sansae200)
2866 gdbstub="(I)nstaller, "
2868 sansac200)
2869 gdbstub="(E)raser, "
2873 esac
2874 if [ "$ARG_TYPE" ]; then
2875 btype=$ARG_TYPE
2876 else
2877 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2878 btype=`input`;
2881 case $btype in
2882 [Ii])
2883 appsdir='\$(ROOTDIR)/bootloader'
2884 apps="bootloader"
2885 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2886 bootloader="1"
2887 echo "e200R-installer build selected"
2889 [Ee])
2890 appsdir='\$(ROOTDIR)/bootloader'
2891 apps="bootloader"
2892 echo "C2(4)0 or C2(5)0"
2893 variant=`input`
2894 case $variant in
2896 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2897 echo "c240 eraser build selected"
2900 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2901 echo "c240 eraser build selected"
2903 esac
2904 bootloader="1"
2905 echo "c200 eraser build selected"
2907 [Bb])
2908 if test $t_manufacturer = "archos"; then
2909 # Archos SH-based players do this somewhat differently for
2910 # some reason
2911 appsdir='\$(ROOTDIR)/flash/bootbox'
2912 apps="bootbox"
2913 else
2914 appsdir='\$(ROOTDIR)/bootloader'
2915 apps="bootloader"
2916 flash=""
2917 if test -n "$boottool"; then
2918 tool="$boottool"
2920 if test -n "$bootoutput"; then
2921 output=$bootoutput
2924 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
2925 bootloader="1"
2926 echo "Bootloader build selected"
2928 [Ss])
2929 if [ "$modelname" = "sansae200r" ]; then
2930 echo "Do not use the e200R target for simulator builds. Use e200 instead."
2931 exit 8
2933 debug="-DDEBUG"
2934 simulator="yes"
2935 extradefines="$extradefines -DSIMULATOR"
2936 archosrom=""
2937 flash=""
2938 echo "Simulator build selected"
2940 [Aa]*)
2941 echo "Advanced build selected"
2942 whichadvanced $btype
2944 [Gg])
2945 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
2946 appsdir='\$(ROOTDIR)/gdb'
2947 apps="stub"
2948 case $modelname in
2949 iriverifp7xx)
2950 output="stub.wma"
2954 esac
2955 echo "GDB stub build selected"
2957 [Mm])
2958 toolset='';
2959 apps="manual"
2960 echo "Manual build selected"
2962 [Cc])
2963 uname=`uname`
2964 simcc "checkwps"
2965 toolset='';
2966 t_cpu='';
2967 GCCOPTS='';
2968 extradefines="$extradefines -DDEBUG"
2969 appsdir='\$(ROOTDIR)/tools/checkwps';
2970 output='checkwps.'${modelname};
2971 archosrom='';
2972 echo "CheckWPS build selected"
2974 [Dd])
2975 uname=`uname`
2976 simcc "database"
2977 toolset='';
2978 t_cpu='';
2979 GCCOPTS='';
2980 appsdir='\$(ROOTDIR)/tools/database';
2981 archosrom='';
2983 case $uname in
2984 CYGWIN*|MINGW*)
2985 output="database_${modelname}.exe"
2988 output='database.'${modelname};
2990 esac
2992 echo "Database tool build selected"
2995 if [ "$modelname" = "sansae200r" ]; then
2996 echo "Do not use the e200R target for regular builds. Use e200 instead."
2997 exit 8
2999 debug=""
3000 btype="N" # set it explicitly since RET only gets here as well
3001 echo "Normal build selected"
3004 esac
3005 # to be able running "make manual" from non-manual configuration
3006 case $modelname in
3007 archosrecorderv2)
3008 manualdev="archosfmrecorder"
3010 iriverh1??)
3011 manualdev="iriverh100"
3013 ipodmini2g)
3014 manualdev="ipodmini1g"
3017 manualdev=$modelname
3019 esac
3021 if [ -z "$debug" ]; then
3022 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3025 echo "Using source code root directory: $rootdir"
3027 # this was once possible to change at build-time, but no more:
3028 language="english"
3030 uname=`uname`
3032 if [ "yes" = "$simulator" ]; then
3033 # setup compiler and things for simulator
3034 simcc "sdl-sim"
3036 if [ -d "simdisk" ]; then
3037 echo "Subdirectory 'simdisk' already present"
3038 else
3039 mkdir simdisk
3040 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3044 # Now, figure out version number of the (gcc) compiler we are about to use
3045 gccver=`$CC -dumpversion`;
3047 # figure out the binutil version too and display it, mostly for the build
3048 # system etc to be able to see it easier
3049 if [ $uname = "Darwin" ]; then
3050 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3051 else
3052 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3055 if [ -z "$gccver" ]; then
3056 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3057 echo "[WARNING] this may cause your build to fail since we cannot do the"
3058 echo "[WARNING] checks we want now."
3059 else
3061 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3062 # DEPEND on it
3064 num1=`echo $gccver | cut -d . -f1`
3065 num2=`echo $gccver | cut -d . -f2`
3066 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3068 # This makes:
3069 # 3.3.X => 303
3070 # 3.4.X => 304
3071 # 2.95.3 => 295
3073 echo "Using $CC $gccver ($gccnum)"
3075 if test "$gccnum" -ge "400"; then
3076 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3077 # so we ignore that warnings for now
3078 # -Wno-pointer-sign
3079 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3082 if test "$gccnum" -ge "402"; then
3083 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3084 # and later would throw it for several valid cases
3085 GCCOPTS="$GCCOPTS -Wno-override-init"
3088 case $prefix in
3089 ""|"$CROSS_COMPILE")
3090 # simulator
3092 i586-mingw32msvc-)
3093 # cross-compile for win32
3096 # Verify that the cross-compiler is of a recommended version!
3097 if test "$gccver" != "$gccchoice"; then
3098 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3099 echo "WARNING: version $gccchoice!"
3100 echo "WARNING: This may cause your build to fail since it may be a version"
3101 echo "WARNING: that isn't functional or known to not be the best choice."
3102 echo "WARNING: If you suffer from build problems, you know that this is"
3103 echo "WARNING: a likely source for them..."
3106 esac
3111 echo "Using $LD $ldver"
3113 # check the compiler for SH platforms
3114 if test "$CC" = "sh-elf-gcc"; then
3115 if test "$gccnum" -lt "400"; then
3116 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3117 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3118 else
3119 # figure out patch status
3120 gccpatch=`$CC --version`;
3122 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3123 echo "gcc $gccver is rockbox patched"
3124 # then convert -O to -Os to get smaller binaries!
3125 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3126 else
3127 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3128 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3133 if test "$CC" = "m68k-elf-gcc"; then
3134 # convert -O to -Os to get smaller binaries!
3135 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3138 if [ "$ARG_CCACHE" = "1" ]; then
3139 echo "Enable ccache for building"
3140 ccache="ccache"
3141 elif [ "$ARG_CCACHE" != "0" ]; then
3142 ccache=`findtool ccache`
3143 if test -n "$ccache"; then
3144 echo "Found and uses ccache ($ccache)"
3148 # figure out the full path to the various commands if possible
3149 HOSTCC=`findtool gcc --lit`
3150 HOSTAR=`findtool ar --lit`
3151 CC=`findtool ${CC} --lit`
3152 LD=`findtool ${AR} --lit`
3153 AR=`findtool ${AR} --lit`
3154 AS=`findtool ${AS} --lit`
3155 OC=`findtool ${OC} --lit`
3156 WINDRES=`findtool ${WINDRES} --lit`
3157 DLLTOOL=`findtool ${DLLTOOL} --lit`
3158 DLLWRAP=`findtool ${DLLWRAP} --lit`
3159 RANLIB=`findtool ${RANLIB} --lit`
3161 if test -n "$ccache"; then
3162 CC="$ccache $CC"
3165 if test "$ARG_ARM_THUMB" = "1"; then
3166 extradefines="$extradefines -DUSE_THUMB"
3167 CC="$toolsdir/thumb-cc.py $CC"
3170 if test "X$endian" = "Xbig"; then
3171 defendian="ROCKBOX_BIG_ENDIAN"
3172 else
3173 defendian="ROCKBOX_LITTLE_ENDIAN"
3176 if [ "$ARG_RBDIR" != "" ]; then
3177 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3178 rbdir="/"$ARG_RBDIR
3179 else
3180 rbdir=$ARG_RBDIR
3182 echo "Using alternate rockbox dir: ${rbdir}"
3185 sed > autoconf.h \
3186 -e "s<@ENDIAN@<${defendian}<g" \
3187 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3188 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3189 -e "s<@config_rtc@<$config_rtc<g" \
3190 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3191 -e "s<@RBDIR@<${rbdir}<g" \
3192 -e "s<@sharepath@<${sharedir}<g" \
3193 -e "s<@binpath@<${bindir}<g" \
3194 -e "s<@libpath@<${libdir}<g" \
3195 -e "s<@have_backlight@<$have_backlight<g" \
3196 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3197 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3198 -e "s<@lcd_width@<$app_lcd_width<g" \
3199 -e "s<@lcd_height@<$app_lcd_height<g" \
3200 <<EOF
3201 /* This header was made by configure */
3202 #ifndef __BUILD_AUTOCONF_H
3203 #define __BUILD_AUTOCONF_H
3205 /* Define endianess for the target or simulator platform */
3206 #define @ENDIAN@ 1
3208 /* Define this if you build rockbox to support the logf logging and display */
3209 #undef ROCKBOX_HAS_LOGF
3211 /* Define this to record a chart with timings for the stages of boot */
3212 #undef DO_BOOTCHART
3214 /* optional define for a backlight modded Ondio */
3215 @have_backlight@
3217 /* optional define for FM radio mod for iAudio M5 */
3218 @have_fmradio_in@
3220 /* optional define for ATA poweroff on Player */
3221 @have_ata_poweroff@
3223 /* optional defines for RTC mod for h1x0 */
3224 @config_rtc@
3225 @have_rtc_alarm@
3227 /* lcd dimensions for application builds from configure */
3228 @lcd_width@
3229 @lcd_height@
3231 /* root of Rockbox */
3232 #define ROCKBOX_DIR "@RBDIR@"
3233 #define ROCKBOX_SHARE_PATH "@sharepath@"
3234 #define ROCKBOX_BINARY_PATH "@binpath@"
3235 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3237 #endif /* __BUILD_AUTOCONF_H */
3240 if test -n "$t_cpu"; then
3241 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3242 if [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3243 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/"
3244 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/"
3246 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3247 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3248 GCCOPTS="$GCCOPTS"
3251 if test "$simulator" = "yes"; then
3252 # add simul make stuff on the #SIMUL# line
3253 simmagic1="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3254 simmagic2="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3255 else
3256 # delete the lines that match
3257 simmagic1='/@SIMUL1@/D'
3258 simmagic2='/@SIMUL2@/D'
3261 if test "$swcodec" = "yes"; then
3262 voicetoolset="rbspeexenc voicefont wavtrim"
3263 else
3264 voicetoolset="voicefont wavtrim"
3267 if test "$apps" = "apps"; then
3268 # only when we build "real" apps we build the .lng files
3269 buildlangs="langs"
3272 #### Fix the cmdline ###
3273 if [ "$ARG_CCACHE" = "1" ]; then
3274 cmdline="--ccache "
3275 elif [ "$ARG_CCACHE" = "0" ]; then
3276 cmdline="--no-ccache "
3278 if [ "$ARG_ARM_EABI" = "1" ]; then
3279 cmdline="$cmdline--eabi "
3281 if [ "$app_platform" = "sdl" ]; then
3282 cmdline="$cmdline--platform=S "
3283 elif [ "$app_platform" = "android" ]; then
3284 cmdline="$cmdline--platform=A "
3286 if [ "$modelname" = "application" ]; then
3287 cmdline="$cmdline--lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3289 if [ -n "$ARG_PREFIX" ]; then
3290 cmdline="$cmdline--prefix=\$(PREFIX) "
3293 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3295 ### end of cmdline
3297 sed > Makefile \
3298 -e "s<@ROOTDIR@<${rootdir}<g" \
3299 -e "s<@DEBUG@<${debug}<g" \
3300 -e "s<@MEMORY@<${memory}<g" \
3301 -e "s<@TARGET_ID@<${target_id}<g" \
3302 -e "s<@TARGET@<${target}<g" \
3303 -e "s<@CPU@<${t_cpu}<g" \
3304 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3305 -e "s<@MODELNAME@<${modelname}<g" \
3306 -e "s<@LANGUAGE@<${language}<g" \
3307 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3308 -e "s<@PWD@<${pwd}<g" \
3309 -e "s<@HOSTCC@<${HOSTCC}<g" \
3310 -e "s<@HOSTAR@<${HOSTAR}<g" \
3311 -e "s<@CC@<${CC}<g" \
3312 -e "s<@LD@<${LD}<g" \
3313 -e "s<@AR@<${AR}<g" \
3314 -e "s<@AS@<${AS}<g" \
3315 -e "s<@OC@<${OC}<g" \
3316 -e "s<@WINDRES@<${WINDRES}<g" \
3317 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3318 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3319 -e "s<@RANLIB@<${RANLIB}<g" \
3320 -e "s<@TOOL@<${tool}<g" \
3321 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3322 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3323 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3324 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3325 -e "s<@OUTPUT@<${output}<g" \
3326 -e "s<@APPEXTRA@<${appextra}<g" \
3327 -e "s<@ARCHOSROM@<${archosrom}<g" \
3328 -e "s<@FLASHFILE@<${flash}<g" \
3329 -e "s<@PLUGINS@<${plugins}<g" \
3330 -e "s<@CODECS@<${swcodec}<g" \
3331 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3332 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3333 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3334 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3335 -e "s<@LDOPTS@<${LDOPTS}<g" \
3336 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3337 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3338 -e "s<@EXTRADEF@<${extradefines}<g" \
3339 -e "s<@APPSDIR@<${appsdir}<g" \
3340 -e "s<@FIRMDIR@<${firmdir}<g" \
3341 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3342 -e "s<@APPS@<${apps}<g" \
3343 -e "s<@APP_TYPE@<${app_type}<g" \
3344 -e "s<@GCCVER@<${gccver}<g" \
3345 -e "s<@GCCNUM@<${gccnum}<g" \
3346 -e "s<@UNAME@<${uname}<g" \
3347 -e "s<@ENDIAN@<${defendian}<g" \
3348 -e "s<@TOOLSET@<${toolset}<g" \
3349 -e "${simmagic1}" \
3350 -e "${simmagic2}" \
3351 -e "s<@MANUALDEV@<${manualdev}<g" \
3352 -e "s<@ENCODER@<${ENC_CMD}<g" \
3353 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3354 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3355 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3356 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3357 -e "s<@LANGS@<${buildlangs}<g" \
3358 -e "s<@USE_ELF@<${USE_ELF}<g" \
3359 -e "s<@RBDIR@<${rbdir}<g" \
3360 -e "s<@sharepath@<${sharedir}<g" \
3361 -e "s<@binpath@<${bindir}<g" \
3362 -e "s<@libpath@<${libdir}<g" \
3363 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3364 -e "s<@CMDLINE@<$cmdline<g" \
3365 -e "s<@SDLCONFIG@<$sdl<g" \
3366 <<EOF
3367 ## Automatically generated. http://www.rockbox.org/
3369 export ROOTDIR=@ROOTDIR@
3370 export FIRMDIR=@FIRMDIR@
3371 export APPSDIR=@APPSDIR@
3372 export TOOLSDIR=@TOOLSDIR@
3373 export DOCSDIR=\$(ROOTDIR)/docs
3374 export MANUALDIR=\${ROOTDIR}/manual
3375 export DEBUG=@DEBUG@
3376 export MODELNAME=@MODELNAME@
3377 export ARCHOSROM=@ARCHOSROM@
3378 export FLASHFILE=@FLASHFILE@
3379 export TARGET_ID=@TARGET_ID@
3380 export TARGET=@TARGET@
3381 export CPU=@CPU@
3382 export MANUFACTURER=@MANUFACTURER@
3383 export OBJDIR=@PWD@
3384 export BUILDDIR=@PWD@
3385 export LANGUAGE=@LANGUAGE@
3386 export VOICELANGUAGE=@VOICELANGUAGE@
3387 export MEMORYSIZE=@MEMORY@
3388 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3389 export MKFIRMWARE=@TOOL@
3390 export BMP2RB_MONO=@BMP2RB_MONO@
3391 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3392 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3393 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3394 export BINARY=@OUTPUT@
3395 export APPEXTRA=@APPEXTRA@
3396 export ENABLEDPLUGINS=@PLUGINS@
3397 export SOFTWARECODECS=@CODECS@
3398 export EXTRA_DEFINES=@EXTRADEF@
3399 export HOSTCC=@HOSTCC@
3400 export HOSTAR=@HOSTAR@
3401 export CC=@CC@
3402 export LD=@LD@
3403 export AR=@AR@
3404 export AS=@AS@
3405 export OC=@OC@
3406 export WINDRES=@WINDRES@
3407 export DLLTOOL=@DLLTOOL@
3408 export DLLWRAP=@DLLWRAP@
3409 export RANLIB=@RANLIB@
3410 export PREFIX=@PREFIX@
3411 export PROFILE_OPTS=@PROFILE_OPTS@
3412 export APP_TYPE=@APP_TYPE@
3413 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3414 export GCCOPTS=@GCCOPTS@
3415 export TARGET_INC=@TARGET_INC@
3416 export LOADADDRESS=@LOADADDRESS@
3417 export SHARED_FLAG=@SHARED_FLAG@
3418 export LDOPTS=@LDOPTS@
3419 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3420 export GCCVER=@GCCVER@
3421 export GCCNUM=@GCCNUM@
3422 export UNAME=@UNAME@
3423 export MANUALDEV=@MANUALDEV@
3424 export TTS_OPTS=@TTS_OPTS@
3425 export TTS_ENGINE=@TTS_ENGINE@
3426 export ENC_OPTS=@ENC_OPTS@
3427 export ENCODER=@ENCODER@
3428 export USE_ELF=@USE_ELF@
3429 export RBDIR=@RBDIR@
3430 export ROCKBOX_SHARE_PATH=@sharepath@
3431 export ROCKBOX_BINARY_PATH=@binpath@
3432 export ROCKBOX_LIBRARY_PATH=@libpath@
3433 export SDLCONFIG=@SDLCONFIG@
3435 CONFIGURE_OPTIONS=@CMDLINE@
3437 include \$(TOOLSDIR)/root.make
3441 echo "Created Makefile"