Manual: Fix part 2 of FS#11874 - setting_inc and setting_dec missing from actions...
[kugel-rb.git] / tools / configure
blobdb10d1bf64e009b36cdbbe3c868577036a166cd9
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 gccchoice="4.4.3"
482 gcctarget="arm-linux-androideabi-"
483 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/linux-x86
484 PATH=$PATH:$gccprefix/bin prefixtools $gcctarget
485 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
486 GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
487 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
488 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
489 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
490 LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog"
491 extradefines="$extradefines -DANDROID"
492 endian="little"
493 SHARED_FLAG="-shared"
496 whichadvanced () {
497 atype=`echo "$1" | cut -c 2-`
498 ##################################################################
499 # Prompt for specific developer options
501 if [ "$atype" ]; then
502 interact=
503 else
504 interact=1
505 echo ""
506 printf "Enter your developer options (press only enter when done)\n\
507 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
508 (T)est plugins, S(m)all C lib:"
509 if [ "$memory" = "2" ]; then
510 printf ", (8)MB MOD"
512 if [ "$modelname" = "archosplayer" ]; then
513 printf ", Use (A)TA poweroff"
515 if [ "$t_model" = "ondio" ]; then
516 printf ", (B)acklight MOD"
518 if [ "$modelname" = "iaudiom5" ]; then
519 printf ", (F)M radio MOD"
521 if [ "$modelname" = "iriverh120" ]; then
522 printf ", (R)TC MOD"
524 echo ""
527 cont=1
528 while [ $cont = "1" ]; do
530 if [ "$interact" ]; then
531 option=`input`
532 else
533 option=`echo "$atype" | cut -c 1`
536 case $option in
537 [Dd])
538 if [ "yes" = "$profile" ]; then
539 echo "Debug is incompatible with profiling"
540 else
541 echo "DEBUG build enabled"
542 use_debug="yes"
545 [Ll])
546 echo "logf() support enabled"
547 logf="yes"
549 [Mm])
550 echo "Using Rockbox' small C library"
551 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
553 [Tt])
554 echo "Including test plugins"
555 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
557 [Cc])
558 echo "bootchart enabled (logf also enabled)"
559 bootchart="yes"
560 logf="yes"
562 [Ss])
563 echo "Simulator build enabled"
564 simulator="yes"
566 [Pp])
567 if [ "yes" = "$use_debug" ]; then
568 echo "Profiling is incompatible with debug"
569 else
570 echo "Profiling support is enabled"
571 profile="yes"
574 [Vv])
575 echo "Voice build selected"
576 voice="yes"
579 if [ "$memory" = "2" ]; then
580 memory="8"
581 echo "Memory size selected: 8MB"
584 [Aa])
585 if [ "$modelname" = "archosplayer" ]; then
586 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
587 echo "ATA power off enabled"
590 [Bb])
591 if [ "$t_model" = "ondio" ]; then
592 have_backlight="#define HAVE_BACKLIGHT"
593 echo "Backlight functions enabled"
596 [Ff])
597 if [ "$modelname" = "iaudiom5" ]; then
598 have_fmradio_in="#define HAVE_FMRADIO_IN"
599 echo "FM radio functions enabled"
602 [Rr])
603 if [ "$modelname" = "iriverh120" ]; then
604 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
605 have_rtc_alarm="#define HAVE_RTC_ALARM"
606 echo "RTC functions enabled (DS1339/DS3231)"
609 [Ww])
610 echo "Enabling Windows 32 cross-compiling"
611 win32crosscompile="yes"
613 "") # Match enter press when finished with advanced options
614 cont=0
617 echo "[ERROR] Option $option unsupported"
619 esac
620 if [ "$interact" ]; then
621 btype="$btype$option"
622 else
623 atype=`echo "$atype" | cut -c 2-`
624 [ "$atype" ] || cont=0
626 done
627 echo "done"
629 if [ "yes" = "$voice" ]; then
630 # Ask about languages to build
631 picklang
632 voicelanguage=`whichlang`
633 echo "Voice language set to $voicelanguage"
635 # Configure encoder and TTS engine for each language
636 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
637 voiceconfig "$thislang"
638 done
640 if [ "yes" = "$use_debug" ]; then
641 debug="-DDEBUG"
642 GCCOPTS="$GCCOPTS -g -DDEBUG"
644 if [ "yes" = "$logf" ]; then
645 use_logf="#define ROCKBOX_HAS_LOGF 1"
647 if [ "yes" = "$bootchart" ]; then
648 use_bootchart="#define DO_BOOTCHART 1"
650 if [ "yes" = "$simulator" ]; then
651 debug="-DDEBUG"
652 extradefines="$extradefines -DSIMULATOR"
653 archosrom=""
654 flash=""
656 if [ "yes" = "$profile" ]; then
657 extradefines="$extradefines -DRB_PROFILE"
658 PROFILE_OPTS="-finstrument-functions"
662 # Configure voice settings
663 voiceconfig () {
664 thislang=$1
665 if [ ! "$ARG_TTS" ]; then
666 echo "Building $thislang voice for $modelname. Select options"
667 echo ""
670 if [ -n "`findtool flite`" ]; then
671 FLITE="F(l)ite "
672 FLITE_OPTS=""
673 DEFAULT_TTS="flite"
674 DEFAULT_TTS_OPTS=$FLITE_OPTS
675 DEFAULT_NOISEFLOOR="500"
676 DEFAULT_CHOICE="L"
678 if [ -n "`findtool espeak`" ]; then
679 ESPEAK="(e)Speak "
680 ESPEAK_OPTS=""
681 DEFAULT_TTS="espeak"
682 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
683 DEFAULT_NOISEFLOOR="500"
684 DEFAULT_CHOICE="e"
686 if [ -n "`findtool festival`" ]; then
687 FESTIVAL="(F)estival "
688 case "$thislang" in
689 "italiano")
690 FESTIVAL_OPTS="--language italian"
692 "espanol")
693 FESTIVAL_OPTS="--language spanish"
695 "finnish")
696 FESTIVAL_OPTS="--language finnish"
698 "czech")
699 FESTIVAL_OPTS="--language czech"
702 FESTIVAL_OPTS=""
704 esac
705 DEFAULT_TTS="festival"
706 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
707 DEFAULT_NOISEFLOOR="500"
708 DEFAULT_CHOICE="F"
710 if [ -n "`findtool swift`" ]; then
711 SWIFT="S(w)ift "
712 SWIFT_OPTS=""
713 DEFAULT_TTS="swift"
714 DEFAULT_TTS_OPTS=$SWIFT_OPTS
715 DEFAULT_NOISEFLOOR="500"
716 DEFAULT_CHOICE="w"
718 # Allow SAPI if Windows is in use
719 if [ -n "`findtool winver`" ]; then
720 SAPI="(S)API "
721 SAPI_OPTS=""
722 DEFAULT_TTS="sapi"
723 DEFAULT_TTS_OPTS=$SAPI_OPTS
724 DEFAULT_NOISEFLOOR="500"
725 DEFAULT_CHOICE="S"
728 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
729 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
730 exit 3
733 if [ "$ARG_TTS" ]; then
734 option=$ARG_TTS
735 else
736 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
737 option=`input`
739 advopts="$advopts --tts=$option"
740 case "$option" in
741 [Ll])
742 TTS_ENGINE="flite"
743 NOISEFLOOR="500" # TODO: check this value
744 TTS_OPTS=$FLITE_OPTS
746 [Ee])
747 TTS_ENGINE="espeak"
748 NOISEFLOOR="500"
749 TTS_OPTS=$ESPEAK_OPTS
751 [Ff])
752 TTS_ENGINE="festival"
753 NOISEFLOOR="500"
754 TTS_OPTS=$FESTIVAL_OPTS
756 [Ss])
757 TTS_ENGINE="sapi"
758 NOISEFLOOR="500"
759 TTS_OPTS=$SAPI_OPTS
761 [Ww])
762 TTS_ENGINE="swift"
763 NOISEFLOOR="500"
764 TTS_OPTS=$SWIFT_OPTS
767 TTS_ENGINE=$DEFAULT_TTS
768 TTS_OPTS=$DEFAULT_TTS_OPTS
769 NOISEFLOOR=$DEFAULT_NOISEFLOOR
770 esac
771 echo "Using $TTS_ENGINE for TTS"
773 # Select which voice to use for Festival
774 if [ "$TTS_ENGINE" = "festival" ]; then
775 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
776 for voice in $voicelist; do
777 TTS_FESTIVAL_VOICE="$voice" # Default choice
778 break
779 done
780 if [ "$ARG_VOICE" ]; then
781 CHOICE=$ARG_VOICE
782 else
784 for voice in $voicelist; do
785 printf "%3d. %s\n" "$i" "$voice"
786 i=`expr $i + 1`
787 done
788 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
789 CHOICE=`input`
792 for voice in $voicelist; do
793 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
794 TTS_FESTIVAL_VOICE="$voice"
796 i=`expr $i + 1`
797 done
798 advopts="$advopts --voice=$CHOICE"
799 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
800 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
803 # Read custom tts options from command line
804 if [ "$ARG_TTSOPTS" ]; then
805 TTS_OPTS="$ARG_TTSOPTS"
806 advopts="$advopts --ttsopts='$TTS_OPTS'"
807 echo "$TTS_ENGINE options set to $TTS_OPTS"
810 if [ "$swcodec" = "yes" ]; then
811 ENCODER="rbspeexenc"
812 ENC_CMD="rbspeexenc"
813 ENC_OPTS="-q 4 -c 10"
814 else
815 if [ -n "`findtool lame`" ]; then
816 ENCODER="lame"
817 ENC_CMD="lame"
818 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
819 else
820 echo "You need LAME in the system path to build voice files for"
821 echo "HWCODEC targets."
822 exit 4
826 echo "Using $ENCODER for encoding voice clips"
828 # Read custom encoder options from command line
829 if [ "$ARG_ENCOPTS" ]; then
830 ENC_OPTS="$ARG_ENCOPTS"
831 advopts="$advopts --encopts='$ENC_OPTS'"
832 echo "$ENCODER options set to $ENC_OPTS"
835 TEMPDIR="${pwd}"
836 if [ -n "`findtool cygpath`" ]; then
837 TEMPDIR=`cygpath . -a -w`
841 picklang() {
842 # figure out which languages that are around
843 for file in $rootdir/apps/lang/*.lang; do
844 clean=`basename $file .lang`
845 langs="$langs $clean"
846 done
848 if [ "$ARG_LANG" ]; then
849 pick=$ARG_LANG
850 else
851 echo "Select a number for the language to use (default is english)"
852 # FIXME The multiple-language feature is currently broken
853 # echo "You may enter a comma-separated list of languages to build"
855 num=1
856 for one in $langs; do
857 echo "$num. $one"
858 num=`expr $num + 1`
859 done
860 pick=`input`
862 advopts="$advopts --language=$pick"
865 whichlang() {
866 output=""
867 # Allow the user to pass a comma-separated list of langauges
868 for thispick in `echo $pick | sed 's/,/ /g'`; do
869 num=1
870 for one in $langs; do
871 # Accept both the language number and name
872 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
873 if [ "$output" = "" ]; then
874 output=$one
875 else
876 output=$output,$one
879 num=`expr $num + 1`
880 done
881 done
882 if [ -z "$output" ]; then
883 # pick a default
884 output="english"
886 echo $output
889 help() {
890 echo "Rockbox configure script."
891 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
892 echo "Do *NOT* run this within the tools directory!"
893 echo ""
894 cat <<EOF
895 Usage: configure [OPTION]...
896 Options:
897 --target=TARGET Sets the target, TARGET can be either the target ID or
898 corresponding string. Run without this option to see all
899 available targets.
901 --ram=RAM Sets the RAM for certain targets. Even though any number
902 is accepted, not every number is correct. The default
903 value will be applied, if you entered a wrong number
904 (which depends on the target). Watch the output. Run
905 without this option if you are not sure which the right
906 number is.
908 --type=TYPE Sets the build type. Shortcuts are also valid.
909 Run without this option to see all available types.
910 Multiple values are allowed and managed in the input
911 order. So --type=b stands for Bootloader build, while
912 --type=ab stands for "Backlight MOD" build.
914 --language=LANG Set the language used for voice generation (used only if
915 TYPE is AV).
917 --tts=ENGINE Set the TTS engine used for voice generation (used only
918 if TYPE is AV).
920 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
921 AV).
923 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
925 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
927 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
928 This is useful for having multiple alternate builds on
929 your device that you can load with ROLO. However as the
930 bootloader looks for .rockbox you won't be able to boot
931 into this build.
933 --ccache Enable ccache use (done by default these days)
934 --no-ccache Disable ccache use
936 --eabi Make configure prefer toolchains that are able to compile
937 for the new ARM standard abi EABI
938 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
939 --thumb Build with -mthumb (for ARM builds)
940 --no-thumb The opposite of --thumb (don't use thumb even for targets
941 where this is the default
942 --prefix Target installation directory
943 --help Shows this message (must not be used with other options)
947 exit
950 ARG_CCACHE=
951 ARG_ENCOPTS=
952 ARG_LANG=
953 ARG_RAM=
954 ARG_RBDIR=
955 ARG_TARGET=
956 ARG_TTS=
957 ARG_TTSOPTS=
958 ARG_TYPE=
959 ARG_VOICE=
960 ARG_ARM_EABI=
961 ARG_ARM_THUMB=
962 ARG_PREFIX="$PREFIX"
963 err=
964 for arg in "$@"; do
965 case "$arg" in
966 --ccache) ARG_CCACHE=1;;
967 --no-ccache) ARG_CCACHE=0;;
968 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
969 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
970 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
971 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
972 --platform=*) ARG_PLATFORM=`echo "$arg" | cut -d = -f 2`;;
973 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
974 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
975 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
976 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
977 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
978 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
979 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
980 --eabi) ARG_ARM_EABI=1;;
981 --no-eabi) ARG_ARM_EABI=0;;
982 --thumb) ARG_ARM_THUMB=1;;
983 --no-thumb) ARG_ARM_THUMB=0;;
984 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
985 --help) help;;
986 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
987 esac
988 done
989 [ "$err" ] && exit 1
991 advopts=
993 if [ "$TMPDIR" != "" ]; then
994 tmpdir=$TMPDIR
995 else
996 tmpdir=/tmp
998 echo Using temporary directory $tmpdir
1000 if test -r "configure"; then
1001 # this is a check for a configure script in the current directory, it there
1002 # is one, try to figure out if it is this one!
1004 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1005 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1006 echo "It will only cause you pain and grief. Instead do this:"
1007 echo ""
1008 echo " cd .."
1009 echo " mkdir build-dir"
1010 echo " cd build-dir"
1011 echo " ../tools/configure"
1012 echo ""
1013 echo "Much happiness will arise from this. Enjoy"
1014 exit 5
1018 # get our current directory
1019 pwd=`pwd`;
1021 if { echo $pwd | grep " "; } then
1022 echo "You're running this script in a path that contains space. The build"
1023 echo "system is unfortunately not clever enough to deal with this. Please"
1024 echo "run the script from a different path, rename the path or fix the build"
1025 echo "system!"
1026 exit 6
1029 if [ -z "$rootdir" ]; then
1030 ##################################################################
1031 # Figure out where the source code root is!
1033 rootdir=`dirname $0`/../
1035 #####################################################################
1036 # Convert the possibly relative directory name to an absolute version
1038 now=`pwd`
1039 cd $rootdir
1040 rootdir=`pwd`
1042 # cd back to the build dir
1043 cd $now
1046 apps="apps"
1047 appsdir='\$(ROOTDIR)/apps'
1048 firmdir='\$(ROOTDIR)/firmware'
1049 toolsdir='\$(ROOTDIR)/tools'
1052 ##################################################################
1053 # Figure out target platform
1056 if [ "$ARG_TARGET" ]; then
1057 buildfor=$ARG_TARGET
1058 else
1059 echo "Enter target platform:"
1060 cat <<EOF
1061 ==Archos== ==iriver== ==Apple iPod==
1062 0) Player/Studio 10) H120/H140 20) Color/Photo
1063 1) Recorder 11) H320/H340 21) Nano 1G
1064 2) FM Recorder 12) iHP-100/110/115 22) Video
1065 3) Recorder v2 13) iFP-790 23) 3G
1066 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1067 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1068 6) AV300 26) Mini 2G
1069 ==Toshiba== 27) 1G, 2G
1070 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1071 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1072 31) M5/M5L
1073 32) 7 ==Olympus= ==SanDisk==
1074 33) D2 70) M:Robe 500 50) Sansa e200
1075 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1076 52) Sansa c200
1077 ==Creative== ==Philips== 53) Sansa m200
1078 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1079 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1080 92) Zen Vision HDD1830 56) Sansa e200v2
1081 102) GoGear HDD6330 57) Sansa m200v4
1082 ==Onda== 58) Sansa Fuze
1083 120) VX747 ==Meizu== 59) Sansa c200v2
1084 121) VX767 110) M6SL 60) Sansa Clipv2
1085 122) VX747+ 111) M6SP 61) Sansa View
1086 123) VX777 112) M3 62) Sansa Clip+
1087 63) Sansa Fuze v2
1088 ==Samsung== ==Tatung==
1089 140) YH-820 150) Elio TPJ-1022 ==Logik==
1090 141) YH-920 80) DAX 1GB MP3/DAB
1091 142) YH-925 ==Packard Bell==
1092 143) YP-S3 160) Vibe 500 ==Lyre project==
1093 130) Lyre proto 1
1094 ==MPIO== == Application == 131) Mini2440
1095 170) HD200 200) Application
1096 171) HD300
1100 buildfor=`input`;
1103 # Set of tools built for all target platforms:
1104 toolset="rdf2binary convbdf codepages"
1106 # Toolsets for some target families:
1107 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1108 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1109 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1110 ipodbitmaptools="$toolset scramble bmp2rb"
1111 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1112 tccbitmaptools="$toolset scramble bmp2rb"
1113 # generic is used by IFP, Meizu and Onda
1114 genericbitmaptools="$toolset bmp2rb"
1115 # scramble is used by all other targets
1116 scramblebitmaptools="$genericbitmaptools scramble"
1119 # ---- For each target ----
1121 # *Variables*
1122 # target_id: a unique number identifying this target, IS NOT the menu number.
1123 # Just use the currently highest number+1 when you add a new
1124 # target.
1125 # modelname: short model name used all over to identify this target
1126 # memory: number of megabytes of RAM this target has. If the amount can
1127 # be selected by the size prompt, let memory be unset here
1128 # target: -Ddefine passed to the build commands to make the correct
1129 # config-*.h file get included etc
1130 # tool: the tool that takes a plain binary and converts that into a
1131 # working "firmware" file for your target
1132 # output: the final output file name
1133 # boottool: the tool that takes a plain binary and generates a bootloader
1134 # file for your target (or blank to use $tool)
1135 # bootoutput:the final output file name for the bootloader (or blank to use
1136 # $output)
1137 # appextra: passed to the APPEXTRA variable in the Makefiles.
1138 # TODO: add proper explanation
1139 # archosrom: used only for Archos targets that build a special flashable .ucl
1140 # image.
1141 # flash: name of output for flashing, for targets where there's a special
1142 # file output for this.
1143 # plugins: set to 'yes' to build the plugins. Early development builds can
1144 # set this to no in the early stages to have an easier life for a
1145 # while
1146 # swcodec: set 'yes' on swcodec targets
1147 # toolset: lists what particular tools in the tools/ directory that this
1148 # target needs to have built prior to building Rockbox
1150 # *Functions*
1151 # *cc: sets up gcc and compiler options for your target builds. Note
1152 # that if you select a simulator build, the compiler selection is
1153 # overridden later in the script.
1155 case $buildfor in
1157 0|archosplayer)
1158 target_id=1
1159 modelname="archosplayer"
1160 target="-DARCHOS_PLAYER"
1161 shcc
1162 tool="$rootdir/tools/scramble"
1163 output="archos.mod"
1164 appextra="player:gui"
1165 archosrom="$pwd/rombox.ucl"
1166 flash="$pwd/rockbox.ucl"
1167 plugins="yes"
1168 swcodec=""
1170 # toolset is the tools within the tools directory that we build for
1171 # this particular target.
1172 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1174 # Note: the convbdf is present in the toolset just because: 1) the
1175 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1176 # build the player simulator
1178 t_cpu="sh"
1179 t_manufacturer="archos"
1180 t_model="player"
1183 1|archosrecorder)
1184 target_id=2
1185 modelname="archosrecorder"
1186 target="-DARCHOS_RECORDER"
1187 shcc
1188 tool="$rootdir/tools/scramble"
1189 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1190 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1191 output="ajbrec.ajz"
1192 appextra="recorder:gui:radio"
1193 #archosrom="$pwd/rombox.ucl"
1194 flash="$pwd/rockbox.ucl"
1195 plugins="yes"
1196 swcodec=""
1197 # toolset is the tools within the tools directory that we build for
1198 # this particular target.
1199 toolset=$archosbitmaptools
1200 t_cpu="sh"
1201 t_manufacturer="archos"
1202 t_model="recorder"
1205 2|archosfmrecorder)
1206 target_id=3
1207 modelname="archosfmrecorder"
1208 target="-DARCHOS_FMRECORDER"
1209 shcc
1210 tool="$rootdir/tools/scramble -fm"
1211 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1212 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1213 output="ajbrec.ajz"
1214 appextra="recorder:gui:radio"
1215 #archosrom="$pwd/rombox.ucl"
1216 flash="$pwd/rockbox.ucl"
1217 plugins="yes"
1218 swcodec=""
1219 # toolset is the tools within the tools directory that we build for
1220 # this particular target.
1221 toolset=$archosbitmaptools
1222 t_cpu="sh"
1223 t_manufacturer="archos"
1224 t_model="fm_v2"
1227 3|archosrecorderv2)
1228 target_id=4
1229 modelname="archosrecorderv2"
1230 target="-DARCHOS_RECORDERV2"
1231 shcc
1232 tool="$rootdir/tools/scramble -v2"
1233 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1234 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1235 output="ajbrec.ajz"
1236 appextra="recorder:gui:radio"
1237 #archosrom="$pwd/rombox.ucl"
1238 flash="$pwd/rockbox.ucl"
1239 plugins="yes"
1240 swcodec=""
1241 # toolset is the tools within the tools directory that we build for
1242 # this particular target.
1243 toolset=$archosbitmaptools
1244 t_cpu="sh"
1245 t_manufacturer="archos"
1246 t_model="fm_v2"
1249 4|archosondiosp)
1250 target_id=7
1251 modelname="archosondiosp"
1252 target="-DARCHOS_ONDIOSP"
1253 shcc
1254 tool="$rootdir/tools/scramble -osp"
1255 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1256 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1257 output="ajbrec.ajz"
1258 appextra="recorder:gui:radio"
1259 #archosrom="$pwd/rombox.ucl"
1260 flash="$pwd/rockbox.ucl"
1261 plugins="yes"
1262 swcodec=""
1263 # toolset is the tools within the tools directory that we build for
1264 # this particular target.
1265 toolset=$archosbitmaptools
1266 t_cpu="sh"
1267 t_manufacturer="archos"
1268 t_model="ondio"
1271 5|archosondiofm)
1272 target_id=8
1273 modelname="archosondiofm"
1274 target="-DARCHOS_ONDIOFM"
1275 shcc
1276 tool="$rootdir/tools/scramble -ofm"
1277 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1278 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1279 output="ajbrec.ajz"
1280 appextra="recorder:gui:radio"
1281 #archosrom="$pwd/rombox.ucl"
1282 flash="$pwd/rockbox.ucl"
1283 plugins="yes"
1284 swcodec=""
1285 toolset=$archosbitmaptools
1286 t_cpu="sh"
1287 t_manufacturer="archos"
1288 t_model="ondio"
1291 6|archosav300)
1292 target_id=38
1293 modelname="archosav300"
1294 target="-DARCHOS_AV300"
1295 memory=16 # always
1296 arm7tdmicc
1297 tool="$rootdir/tools/scramble -mm=C"
1298 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1299 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1300 output="cjbm.ajz"
1301 appextra="recorder:gui:radio"
1302 plugins="yes"
1303 swcodec=""
1304 # toolset is the tools within the tools directory that we build for
1305 # this particular target.
1306 toolset="$toolset scramble descramble bmp2rb"
1307 # architecture, manufacturer and model for the target-tree build
1308 t_cpu="arm"
1309 t_manufacturer="archos"
1310 t_model="av300"
1313 10|iriverh120)
1314 target_id=9
1315 modelname="iriverh120"
1316 target="-DIRIVER_H120"
1317 memory=32 # always
1318 coldfirecc
1319 tool="$rootdir/tools/scramble -add=h120"
1320 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1321 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1322 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1323 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1324 output="rockbox.iriver"
1325 bootoutput="bootloader.iriver"
1326 appextra="recorder:gui:radio"
1327 flash="$pwd/rombox.iriver"
1328 plugins="yes"
1329 swcodec="yes"
1330 # toolset is the tools within the tools directory that we build for
1331 # this particular target.
1332 toolset=$iriverbitmaptools
1333 t_cpu="coldfire"
1334 t_manufacturer="iriver"
1335 t_model="h100"
1338 11|iriverh300)
1339 target_id=10
1340 modelname="iriverh300"
1341 target="-DIRIVER_H300"
1342 memory=32 # always
1343 coldfirecc
1344 tool="$rootdir/tools/scramble -add=h300"
1345 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1346 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1347 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1348 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1349 output="rockbox.iriver"
1350 appextra="recorder:gui:radio"
1351 plugins="yes"
1352 swcodec="yes"
1353 # toolset is the tools within the tools directory that we build for
1354 # this particular target.
1355 toolset=$iriverbitmaptools
1356 t_cpu="coldfire"
1357 t_manufacturer="iriver"
1358 t_model="h300"
1361 12|iriverh100)
1362 target_id=11
1363 modelname="iriverh100"
1364 target="-DIRIVER_H100"
1365 memory=16 # always
1366 coldfirecc
1367 tool="$rootdir/tools/scramble -add=h100"
1368 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1369 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1370 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1371 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1372 output="rockbox.iriver"
1373 bootoutput="bootloader.iriver"
1374 appextra="recorder:gui:radio"
1375 flash="$pwd/rombox.iriver"
1376 plugins="yes"
1377 swcodec="yes"
1378 # toolset is the tools within the tools directory that we build for
1379 # this particular target.
1380 toolset=$iriverbitmaptools
1381 t_cpu="coldfire"
1382 t_manufacturer="iriver"
1383 t_model="h100"
1386 13|iriverifp7xx)
1387 target_id=19
1388 modelname="iriverifp7xx"
1389 target="-DIRIVER_IFP7XX"
1390 memory=1
1391 arm7tdmicc short
1392 tool="cp"
1393 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1394 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1395 output="rockbox.wma"
1396 appextra="recorder:gui:radio"
1397 plugins="yes"
1398 swcodec="yes"
1399 # toolset is the tools within the tools directory that we build for
1400 # this particular target.
1401 toolset=$genericbitmaptools
1402 t_cpu="arm"
1403 t_manufacturer="pnx0101"
1404 t_model="iriver-ifp7xx"
1407 14|iriverh10)
1408 target_id=22
1409 modelname="iriverh10"
1410 target="-DIRIVER_H10"
1411 memory=32 # always
1412 arm7tdmicc
1413 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1414 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1415 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1416 output="rockbox.mi4"
1417 appextra="recorder:gui:radio"
1418 plugins="yes"
1419 swcodec="yes"
1420 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1421 bootoutput="H10_20GC.mi4"
1422 # toolset is the tools within the tools directory that we build for
1423 # this particular target.
1424 toolset=$scramblebitmaptools
1425 # architecture, manufacturer and model for the target-tree build
1426 t_cpu="arm"
1427 t_manufacturer="iriver"
1428 t_model="h10"
1431 15|iriverh10_5gb)
1432 target_id=24
1433 modelname="iriverh10_5gb"
1434 target="-DIRIVER_H10_5GB"
1435 memory=32 # always
1436 arm7tdmicc
1437 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1438 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1439 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1440 output="rockbox.mi4"
1441 appextra="recorder:gui:radio"
1442 plugins="yes"
1443 swcodec="yes"
1444 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1445 bootoutput="H10.mi4"
1446 # toolset is the tools within the tools directory that we build for
1447 # this particular target.
1448 toolset=$scramblebitmaptools
1449 # architecture, manufacturer and model for the target-tree build
1450 t_cpu="arm"
1451 t_manufacturer="iriver"
1452 t_model="h10"
1455 20|ipodcolor)
1456 target_id=13
1457 modelname="ipodcolor"
1458 target="-DIPOD_COLOR"
1459 memory=32 # always
1460 arm7tdmicc
1461 tool="$rootdir/tools/scramble -add=ipco"
1462 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1463 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1464 output="rockbox.ipod"
1465 appextra="recorder:gui:radio"
1466 plugins="yes"
1467 swcodec="yes"
1468 bootoutput="bootloader-$modelname.ipod"
1469 # toolset is the tools within the tools directory that we build for
1470 # this particular target.
1471 toolset=$ipodbitmaptools
1472 # architecture, manufacturer and model for the target-tree build
1473 t_cpu="arm"
1474 t_manufacturer="ipod"
1475 t_model="color"
1478 21|ipodnano1g)
1479 target_id=14
1480 modelname="ipodnano1g"
1481 target="-DIPOD_NANO"
1482 memory=32 # always
1483 arm7tdmicc
1484 tool="$rootdir/tools/scramble -add=nano"
1485 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1486 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1487 output="rockbox.ipod"
1488 appextra="recorder:gui:radio"
1489 plugins="yes"
1490 swcodec="yes"
1491 bootoutput="bootloader-$modelname.ipod"
1492 # toolset is the tools within the tools directory that we build for
1493 # this particular target.
1494 toolset=$ipodbitmaptools
1495 # architecture, manufacturer and model for the target-tree build
1496 t_cpu="arm"
1497 t_manufacturer="ipod"
1498 t_model="nano"
1501 22|ipodvideo)
1502 target_id=15
1503 modelname="ipodvideo"
1504 target="-DIPOD_VIDEO"
1505 memory=64 # always. This is reduced at runtime if needed
1506 arm7tdmicc
1507 tool="$rootdir/tools/scramble -add=ipvd"
1508 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1509 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1510 output="rockbox.ipod"
1511 appextra="recorder:gui:radio"
1512 plugins="yes"
1513 swcodec="yes"
1514 bootoutput="bootloader-$modelname.ipod"
1515 # toolset is the tools within the tools directory that we build for
1516 # this particular target.
1517 toolset=$ipodbitmaptools
1518 # architecture, manufacturer and model for the target-tree build
1519 t_cpu="arm"
1520 t_manufacturer="ipod"
1521 t_model="video"
1524 23|ipod3g)
1525 target_id=16
1526 modelname="ipod3g"
1527 target="-DIPOD_3G"
1528 memory=32 # always
1529 arm7tdmicc
1530 tool="$rootdir/tools/scramble -add=ip3g"
1531 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1532 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1533 output="rockbox.ipod"
1534 appextra="recorder:gui:radio"
1535 plugins="yes"
1536 swcodec="yes"
1537 bootoutput="bootloader-$modelname.ipod"
1538 # toolset is the tools within the tools directory that we build for
1539 # this particular target.
1540 toolset=$ipodbitmaptools
1541 # architecture, manufacturer and model for the target-tree build
1542 t_cpu="arm"
1543 t_manufacturer="ipod"
1544 t_model="3g"
1547 24|ipod4g)
1548 target_id=17
1549 modelname="ipod4g"
1550 target="-DIPOD_4G"
1551 memory=32 # always
1552 arm7tdmicc
1553 tool="$rootdir/tools/scramble -add=ip4g"
1554 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1555 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1556 output="rockbox.ipod"
1557 appextra="recorder:gui:radio"
1558 plugins="yes"
1559 swcodec="yes"
1560 bootoutput="bootloader-$modelname.ipod"
1561 # toolset is the tools within the tools directory that we build for
1562 # this particular target.
1563 toolset=$ipodbitmaptools
1564 # architecture, manufacturer and model for the target-tree build
1565 t_cpu="arm"
1566 t_manufacturer="ipod"
1567 t_model="4g"
1570 25|ipodmini1g)
1571 target_id=18
1572 modelname="ipodmini1g"
1573 target="-DIPOD_MINI"
1574 memory=32 # always
1575 arm7tdmicc
1576 tool="$rootdir/tools/scramble -add=mini"
1577 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1578 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1579 output="rockbox.ipod"
1580 appextra="recorder:gui:radio"
1581 plugins="yes"
1582 swcodec="yes"
1583 bootoutput="bootloader-$modelname.ipod"
1584 # toolset is the tools within the tools directory that we build for
1585 # this particular target.
1586 toolset=$ipodbitmaptools
1587 # architecture, manufacturer and model for the target-tree build
1588 t_cpu="arm"
1589 t_manufacturer="ipod"
1590 t_model="mini"
1593 26|ipodmini2g)
1594 target_id=21
1595 modelname="ipodmini2g"
1596 target="-DIPOD_MINI2G"
1597 memory=32 # always
1598 arm7tdmicc
1599 tool="$rootdir/tools/scramble -add=mn2g"
1600 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1601 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1602 output="rockbox.ipod"
1603 appextra="recorder:gui:radio"
1604 plugins="yes"
1605 swcodec="yes"
1606 bootoutput="bootloader-$modelname.ipod"
1607 # toolset is the tools within the tools directory that we build for
1608 # this particular target.
1609 toolset=$ipodbitmaptools
1610 # architecture, manufacturer and model for the target-tree build
1611 t_cpu="arm"
1612 t_manufacturer="ipod"
1613 t_model="mini2g"
1616 27|ipod1g2g)
1617 target_id=29
1618 modelname="ipod1g2g"
1619 target="-DIPOD_1G2G"
1620 memory=32 # always
1621 arm7tdmicc
1622 tool="$rootdir/tools/scramble -add=1g2g"
1623 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1624 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1625 output="rockbox.ipod"
1626 appextra="recorder:gui:radio"
1627 plugins="yes"
1628 swcodec="yes"
1629 bootoutput="bootloader-$modelname.ipod"
1630 # toolset is the tools within the tools directory that we build for
1631 # this particular target.
1632 toolset=$ipodbitmaptools
1633 # architecture, manufacturer and model for the target-tree build
1634 t_cpu="arm"
1635 t_manufacturer="ipod"
1636 t_model="1g2g"
1639 28|ipodnano2g)
1640 target_id=62
1641 modelname="ipodnano2g"
1642 target="-DIPOD_NANO2G"
1643 memory=32 # always
1644 arm940tcc
1645 tool="$rootdir/tools/scramble -add=nn2g"
1646 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1647 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1648 output="rockbox.ipod"
1649 appextra="recorder:gui:radio"
1650 plugins="yes"
1651 swcodec="yes"
1652 bootoutput="bootloader-$modelname.ipod"
1653 # toolset is the tools within the tools directory that we build for
1654 # this particular target.
1655 toolset=$ipodbitmaptools
1656 # architecture, manufacturer and model for the target-tree build
1657 t_cpu="arm"
1658 t_manufacturer="s5l8700"
1659 t_model="ipodnano2g"
1662 29|ipod6g)
1663 target_id=71
1664 modelname="ipod6g"
1665 target="-DIPOD_6G"
1666 memory=64 # always
1667 arm926ejscc
1668 tool="$rootdir/tools/scramble -add=ip6g"
1669 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1670 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1671 output="rockbox.ipod"
1672 appextra="recorder:gui:radio"
1673 plugins="yes"
1674 swcodec="yes"
1675 bootoutput="bootloader-$modelname.ipod"
1676 # toolset is the tools within the tools directory that we build for
1677 # this particular target.
1678 toolset=$ipodbitmaptools
1679 # architecture, manufacturer and model for the target-tree build
1680 t_cpu="arm"
1681 t_manufacturer="s5l8702"
1682 t_model="ipod6g"
1685 30|iaudiox5)
1686 target_id=12
1687 modelname="iaudiox5"
1688 target="-DIAUDIO_X5"
1689 memory=16 # always
1690 coldfirecc
1691 tool="$rootdir/tools/scramble -add=iax5"
1692 boottool="$rootdir/tools/scramble -iaudiox5"
1693 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1694 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1695 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1696 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1697 output="rockbox.iaudio"
1698 bootoutput="x5_fw.bin"
1699 appextra="recorder:gui:radio"
1700 plugins="yes"
1701 swcodec="yes"
1702 # toolset is the tools within the tools directory that we build for
1703 # this particular target.
1704 toolset="$iaudiobitmaptools"
1705 # architecture, manufacturer and model for the target-tree build
1706 t_cpu="coldfire"
1707 t_manufacturer="iaudio"
1708 t_model="x5"
1711 31|iaudiom5)
1712 target_id=28
1713 modelname="iaudiom5"
1714 target="-DIAUDIO_M5"
1715 memory=16 # always
1716 coldfirecc
1717 tool="$rootdir/tools/scramble -add=iam5"
1718 boottool="$rootdir/tools/scramble -iaudiom5"
1719 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1720 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1721 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1722 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1723 output="rockbox.iaudio"
1724 bootoutput="m5_fw.bin"
1725 appextra="recorder:gui:radio"
1726 plugins="yes"
1727 swcodec="yes"
1728 # toolset is the tools within the tools directory that we build for
1729 # this particular target.
1730 toolset="$iaudiobitmaptools"
1731 # architecture, manufacturer and model for the target-tree build
1732 t_cpu="coldfire"
1733 t_manufacturer="iaudio"
1734 t_model="m5"
1737 32|iaudio7)
1738 target_id=32
1739 modelname="iaudio7"
1740 target="-DIAUDIO_7"
1741 memory=16 # always
1742 arm946cc
1743 tool="$rootdir/tools/scramble -add=i7"
1744 boottool="$rootdir/tools/scramble -tcc=crc"
1745 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1746 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1747 output="rockbox.iaudio"
1748 appextra="recorder:gui:radio"
1749 plugins="yes"
1750 swcodec="yes"
1751 bootoutput="I7_FW.BIN"
1752 # toolset is the tools within the tools directory that we build for
1753 # this particular target.
1754 toolset="$tccbitmaptools"
1755 # architecture, manufacturer and model for the target-tree build
1756 t_cpu="arm"
1757 t_manufacturer="tcc77x"
1758 t_model="iaudio7"
1761 33|cowond2)
1762 target_id=34
1763 modelname="cowond2"
1764 target="-DCOWON_D2"
1765 memory=32
1766 arm926ejscc
1767 tool="$rootdir/tools/scramble -add=d2"
1768 boottool="cp "
1769 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1770 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1771 output="rockbox.d2"
1772 bootoutput="bootloader-cowond2.bin"
1773 appextra="recorder:gui:radio"
1774 plugins="yes"
1775 swcodec="yes"
1776 toolset="$tccbitmaptools"
1777 # architecture, manufacturer and model for the target-tree build
1778 t_cpu="arm"
1779 t_manufacturer="tcc780x"
1780 t_model="cowond2"
1783 34|iaudiom3)
1784 target_id=37
1785 modelname="iaudiom3"
1786 target="-DIAUDIO_M3"
1787 memory=16 # always
1788 coldfirecc
1789 tool="$rootdir/tools/scramble -add=iam3"
1790 boottool="$rootdir/tools/scramble -iaudiom3"
1791 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1792 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1793 output="rockbox.iaudio"
1794 bootoutput="cowon_m3.bin"
1795 appextra="recorder:gui:radio"
1796 plugins="yes"
1797 swcodec="yes"
1798 # toolset is the tools within the tools directory that we build for
1799 # this particular target.
1800 toolset="$iaudiobitmaptools"
1801 # architecture, manufacturer and model for the target-tree build
1802 t_cpu="coldfire"
1803 t_manufacturer="iaudio"
1804 t_model="m3"
1807 40|gigabeatfx)
1808 target_id=20
1809 modelname="gigabeatfx"
1810 target="-DGIGABEAT_F"
1811 memory=32 # always
1812 arm9tdmicc
1813 tool="$rootdir/tools/scramble -add=giga"
1814 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1815 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1816 output="rockbox.gigabeat"
1817 appextra="recorder:gui:radio"
1818 plugins="yes"
1819 swcodec="yes"
1820 toolset=$gigabeatbitmaptools
1821 boottool="$rootdir/tools/scramble -gigabeat"
1822 bootoutput="FWIMG01.DAT"
1823 # architecture, manufacturer and model for the target-tree build
1824 t_cpu="arm"
1825 t_manufacturer="s3c2440"
1826 t_model="gigabeat-fx"
1829 41|gigabeats)
1830 target_id=26
1831 modelname="gigabeats"
1832 target="-DGIGABEAT_S"
1833 memory=64
1834 arm1136jfscc
1835 tool="$rootdir/tools/scramble -add=gigs"
1836 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1837 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1838 output="rockbox.gigabeat"
1839 appextra="recorder:gui:radio"
1840 plugins="yes"
1841 swcodec="yes"
1842 toolset="$gigabeatbitmaptools"
1843 boottool="$rootdir/tools/scramble -gigabeats"
1844 bootoutput="nk.bin"
1845 # architecture, manufacturer and model for the target-tree build
1846 t_cpu="arm"
1847 t_manufacturer="imx31"
1848 t_model="gigabeat-s"
1851 70|mrobe500)
1852 target_id=36
1853 modelname="mrobe500"
1854 target="-DMROBE_500"
1855 memory=64 # always
1856 arm926ejscc
1857 tool="$rootdir/tools/scramble -add=m500"
1858 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1859 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1860 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1861 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1862 output="rockbox.mrobe500"
1863 appextra="recorder:gui:radio"
1864 plugins="yes"
1865 swcodec="yes"
1866 toolset=$gigabeatbitmaptools
1867 boottool="cp "
1868 bootoutput="rockbox.mrboot"
1869 # architecture, manufacturer and model for the target-tree build
1870 t_cpu="arm"
1871 t_manufacturer="tms320dm320"
1872 t_model="mrobe-500"
1875 71|mrobe100)
1876 target_id=33
1877 modelname="mrobe100"
1878 target="-DMROBE_100"
1879 memory=32 # always
1880 arm7tdmicc
1881 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1882 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1883 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1884 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1885 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1886 output="rockbox.mi4"
1887 appextra="recorder:gui:radio"
1888 plugins="yes"
1889 swcodec="yes"
1890 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1891 bootoutput="pp5020.mi4"
1892 # toolset is the tools within the tools directory that we build for
1893 # this particular target.
1894 toolset=$scramblebitmaptools
1895 # architecture, manufacturer and model for the target-tree build
1896 t_cpu="arm"
1897 t_manufacturer="olympus"
1898 t_model="mrobe-100"
1901 80|logikdax)
1902 target_id=31
1903 modelname="logikdax"
1904 target="-DLOGIK_DAX"
1905 memory=2 # always
1906 arm946cc
1907 tool="$rootdir/tools/scramble -add=ldax"
1908 boottool="$rootdir/tools/scramble -tcc=crc"
1909 bootoutput="player.rom"
1910 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1911 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1912 output="rockbox.logik"
1913 appextra="recorder:gui:radio"
1914 plugins=""
1915 swcodec="yes"
1916 # toolset is the tools within the tools directory that we build for
1917 # this particular target.
1918 toolset=$tccbitmaptools
1919 # architecture, manufacturer and model for the target-tree build
1920 t_cpu="arm"
1921 t_manufacturer="tcc77x"
1922 t_model="logikdax"
1925 90|zenvisionm30gb)
1926 target_id=35
1927 modelname="zenvisionm30gb"
1928 target="-DCREATIVE_ZVM"
1929 memory=64
1930 arm926ejscc
1931 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1932 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1933 tool="$rootdir/tools/scramble -creative=zvm"
1934 USE_ELF="yes"
1935 output="rockbox.zvm"
1936 appextra="recorder:gui:radio"
1937 plugins="yes"
1938 swcodec="yes"
1939 toolset=$ipodbitmaptools
1940 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1941 bootoutput="rockbox.zvmboot"
1942 # architecture, manufacturer and model for the target-tree build
1943 t_cpu="arm"
1944 t_manufacturer="tms320dm320"
1945 t_model="creative-zvm"
1948 91|zenvisionm60gb)
1949 target_id=40
1950 modelname="zenvisionm60gb"
1951 target="-DCREATIVE_ZVM60GB"
1952 memory=64
1953 arm926ejscc
1954 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1955 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1956 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1957 USE_ELF="yes"
1958 output="rockbox.zvm60"
1959 appextra="recorder:gui:radio"
1960 plugins="yes"
1961 swcodec="yes"
1962 toolset=$ipodbitmaptools
1963 boottool="$rootdir/tools/scramble -creative=zvm60"
1964 bootoutput="rockbox.zvm60boot"
1965 # architecture, manufacturer and model for the target-tree build
1966 t_cpu="arm"
1967 t_manufacturer="tms320dm320"
1968 t_model="creative-zvm"
1971 92|zenvision)
1972 target_id=39
1973 modelname="zenvision"
1974 target="-DCREATIVE_ZV"
1975 memory=64
1976 arm926ejscc
1977 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1978 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1979 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1980 USE_ELF="yes"
1981 output="rockbox.zv"
1982 appextra="recorder:gui:radio"
1983 plugins=""
1984 swcodec="yes"
1985 toolset=$ipodbitmaptools
1986 boottool="$rootdir/tools/scramble -creative=zenvision"
1987 bootoutput="rockbox.zvboot"
1988 # architecture, manufacturer and model for the target-tree build
1989 t_cpu="arm"
1990 t_manufacturer="tms320dm320"
1991 t_model="creative-zvm"
1994 50|sansae200)
1995 target_id=23
1996 modelname="sansae200"
1997 target="-DSANSA_E200"
1998 memory=32 # supposedly
1999 arm7tdmicc
2000 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2001 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2002 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2003 output="rockbox.mi4"
2004 appextra="recorder:gui:radio"
2005 plugins="yes"
2006 swcodec="yes"
2007 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2008 bootoutput="PP5022.mi4"
2009 # toolset is the tools within the tools directory that we build for
2010 # this particular target.
2011 toolset=$scramblebitmaptools
2012 # architecture, manufacturer and model for the target-tree build
2013 t_cpu="arm"
2014 t_manufacturer="sandisk"
2015 t_model="sansa-e200"
2018 51|sansae200r)
2019 # the e200R model is pretty much identical to the e200, it only has a
2020 # different option to the scramble tool when building a bootloader and
2021 # makes the bootloader output file name in all lower case.
2022 target_id=27
2023 modelname="sansae200r"
2024 target="-DSANSA_E200"
2025 memory=32 # supposedly
2026 arm7tdmicc
2027 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2028 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2029 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2030 output="rockbox.mi4"
2031 appextra="recorder:gui:radio"
2032 plugins="yes"
2033 swcodec="yes"
2034 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2035 bootoutput="pp5022.mi4"
2036 # toolset is the tools within the tools directory that we build for
2037 # this particular target.
2038 toolset=$scramblebitmaptools
2039 # architecture, manufacturer and model for the target-tree build
2040 t_cpu="arm"
2041 t_manufacturer="sandisk"
2042 t_model="sansa-e200"
2045 52|sansac200)
2046 target_id=30
2047 modelname="sansac200"
2048 target="-DSANSA_C200"
2049 memory=32 # supposedly
2050 arm7tdmicc
2051 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2052 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2053 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2054 output="rockbox.mi4"
2055 appextra="recorder:gui:radio"
2056 plugins="yes"
2057 swcodec="yes"
2058 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2059 bootoutput="firmware.mi4"
2060 # toolset is the tools within the tools directory that we build for
2061 # this particular target.
2062 toolset=$scramblebitmaptools
2063 # architecture, manufacturer and model for the target-tree build
2064 t_cpu="arm"
2065 t_manufacturer="sandisk"
2066 t_model="sansa-c200"
2069 53|sansam200)
2070 target_id=48
2071 modelname="sansam200"
2072 target="-DSANSA_M200"
2073 memory=1 # always
2074 arm946cc
2075 tool="$rootdir/tools/scramble -add=m200"
2076 boottool="$rootdir/tools/scramble -tcc=crc"
2077 bootoutput="player.rom"
2078 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2079 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2080 output="rockbox.m200"
2081 appextra="recorder:gui:radio"
2082 plugins=""
2083 swcodec="yes"
2084 # toolset is the tools within the tools directory that we build for
2085 # this particular target.
2086 toolset=$tccbitmaptools
2087 # architecture, manufacturer and model for the target-tree build
2088 t_cpu="arm"
2089 t_manufacturer="tcc77x"
2090 t_model="m200"
2093 54|sansac100)
2094 target_id=42
2095 modelname="sansac100"
2096 target="-DSANSA_C100"
2097 memory=2
2098 arm946cc
2099 tool="$rootdir/tools/scramble -add=c100"
2100 boottool="$rootdir/tools/scramble -tcc=crc"
2101 bootoutput="player.rom"
2102 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2103 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2104 output="rockbox.c100"
2105 appextra="recorder:gui:radio"
2106 plugins=""
2107 swcodec="yes"
2108 # toolset is the tools within the tools directory that we build for
2109 # this particular target.
2110 toolset=$tccbitmaptools
2111 # architecture, manufacturer and model for the target-tree build
2112 t_cpu="arm"
2113 t_manufacturer="tcc77x"
2114 t_model="c100"
2117 55|sansaclip)
2118 target_id=50
2119 modelname="sansaclip"
2120 target="-DSANSA_CLIP"
2121 memory=2
2122 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2123 bmp2rb_native="$bmp2rb_mono"
2124 tool="$rootdir/tools/scramble -add=clip"
2125 output="rockbox.sansa"
2126 bootoutput="bootloader-clip.sansa"
2127 appextra="recorder:gui:radio"
2128 plugins="yes"
2129 swcodec="yes"
2130 toolset=$scramblebitmaptools
2131 t_cpu="arm"
2132 t_manufacturer="as3525"
2133 t_model="sansa-clip"
2134 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2135 arm9tdmicc
2136 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2140 56|sansae200v2)
2141 target_id=51
2142 modelname="sansae200v2"
2143 target="-DSANSA_E200V2"
2144 memory=8
2145 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2146 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2147 tool="$rootdir/tools/scramble -add=e2v2"
2148 output="rockbox.sansa"
2149 bootoutput="bootloader-e200v2.sansa"
2150 appextra="recorder:gui:radio"
2151 plugins="yes"
2152 swcodec="yes"
2153 toolset=$scramblebitmaptools
2154 t_cpu="arm"
2155 t_manufacturer="as3525"
2156 t_model="sansa-e200v2"
2157 arm9tdmicc
2161 57|sansam200v4)
2162 target_id=52
2163 modelname="sansam200v4"
2164 target="-DSANSA_M200V4"
2165 memory=2
2166 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2167 bmp2rb_native="$bmp2rb_mono"
2168 tool="$rootdir/tools/scramble -add=m2v4"
2169 output="rockbox.sansa"
2170 bootoutput="bootloader-m200v4.sansa"
2171 appextra="recorder:gui:radio"
2172 plugins="yes"
2173 swcodec="yes"
2174 toolset=$scramblebitmaptools
2175 t_cpu="arm"
2176 t_manufacturer="as3525"
2177 t_model="sansa-m200v4"
2178 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2179 arm9tdmicc
2180 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2184 58|sansafuze)
2185 target_id=53
2186 modelname="sansafuze"
2187 target="-DSANSA_FUZE"
2188 memory=8
2189 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2190 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2191 tool="$rootdir/tools/scramble -add=fuze"
2192 output="rockbox.sansa"
2193 bootoutput="bootloader-fuze.sansa"
2194 appextra="recorder:gui:radio"
2195 plugins="yes"
2196 swcodec="yes"
2197 toolset=$scramblebitmaptools
2198 t_cpu="arm"
2199 t_manufacturer="as3525"
2200 t_model="sansa-fuze"
2201 arm9tdmicc
2205 59|sansac200v2)
2206 target_id=55
2207 modelname="sansac200v2"
2208 target="-DSANSA_C200V2"
2209 memory=2 # as per OF diagnosis mode
2210 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2211 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2212 tool="$rootdir/tools/scramble -add=c2v2"
2213 output="rockbox.sansa"
2214 bootoutput="bootloader-c200v2.sansa"
2215 appextra="recorder:gui:radio"
2216 plugins="yes"
2217 swcodec="yes"
2218 # toolset is the tools within the tools directory that we build for
2219 # this particular target.
2220 toolset=$scramblebitmaptools
2221 # architecture, manufacturer and model for the target-tree build
2222 t_cpu="arm"
2223 t_manufacturer="as3525"
2224 t_model="sansa-c200v2"
2225 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2226 arm9tdmicc
2227 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2230 60|sansaclipv2)
2231 target_id=60
2232 modelname="sansaclipv2"
2233 target="-DSANSA_CLIPV2"
2234 memory=8
2235 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2236 bmp2rb_native="$bmp2rb_mono"
2237 tool="$rootdir/tools/scramble -add=clv2"
2238 output="rockbox.sansa"
2239 bootoutput="bootloader-clipv2.sansa"
2240 appextra="recorder:gui:radio"
2241 plugins="yes"
2242 swcodec="yes"
2243 toolset=$scramblebitmaptools
2244 t_cpu="arm"
2245 t_manufacturer="as3525"
2246 t_model="sansa-clipv2"
2247 arm926ejscc
2250 61|sansaview)
2251 echo "Sansa View is not yet supported!"
2252 exit 1
2253 target_id=63
2254 modelname="sansaview"
2255 target="-DSANSA_VIEW"
2256 memory=32
2257 arm1176jzscc
2258 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2259 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2260 output="rockbox.mi4"
2261 appextra="gui"
2262 plugins=""
2263 swcodec="yes"
2264 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2265 bootoutput="firmware.mi4"
2266 # toolset is the tools within the tools directory that we build for
2267 # this particular target.
2268 toolset=$scramblebitmaptools
2269 t_cpu="arm"
2270 t_manufacturer="sandisk"
2271 t_model="sansa-view"
2274 62|sansaclipplus)
2275 target_id=66
2276 modelname="sansaclipplus"
2277 target="-DSANSA_CLIPPLUS"
2278 memory=8
2279 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2280 bmp2rb_native="$bmp2rb_mono"
2281 tool="$rootdir/tools/scramble -add=cli+"
2282 output="rockbox.sansa"
2283 bootoutput="bootloader-clipplus.sansa"
2284 appextra="recorder:gui:radio"
2285 plugins="yes"
2286 swcodec="yes"
2287 toolset=$scramblebitmaptools
2288 t_cpu="arm"
2289 t_manufacturer="as3525"
2290 t_model="sansa-clipplus"
2291 arm926ejscc
2294 63|sansafuzev2)
2295 target_id=68
2296 modelname="sansafuzev2"
2297 target="-DSANSA_FUZEV2"
2298 memory=8 # not sure
2299 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2300 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2301 tool="$rootdir/tools/scramble -add=fuz2"
2302 output="rockbox.sansa"
2303 bootoutput="bootloader-fuzev2.sansa"
2304 appextra="recorder:gui:radio"
2305 plugins="yes"
2306 swcodec="yes"
2307 toolset=$scramblebitmaptools
2308 t_cpu="arm"
2309 t_manufacturer="as3525"
2310 t_model="sansa-fuzev2"
2311 arm926ejscc
2314 150|tatungtpj1022)
2315 target_id=25
2316 modelname="tatungtpj1022"
2317 target="-DTATUNG_TPJ1022"
2318 memory=32 # always
2319 arm7tdmicc
2320 tool="$rootdir/tools/scramble -add tpj2"
2321 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2322 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2323 output="rockbox.elio"
2324 appextra="recorder:gui:radio"
2325 plugins="yes"
2326 swcodec="yes"
2327 boottool="$rootdir/tools/scramble -mi4v2"
2328 bootoutput="pp5020.mi4"
2329 # toolset is the tools within the tools directory that we build for
2330 # this particular target.
2331 toolset=$scramblebitmaptools
2332 # architecture, manufacturer and model for the target-tree build
2333 t_cpu="arm"
2334 t_manufacturer="tatung"
2335 t_model="tpj1022"
2338 100|gogearsa9200)
2339 target_id=41
2340 modelname="gogearsa9200"
2341 target="-DPHILIPS_SA9200"
2342 memory=32 # supposedly
2343 arm7tdmicc
2344 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2345 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2346 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2347 output="rockbox.mi4"
2348 appextra="recorder:gui:radio"
2349 plugins="yes"
2350 swcodec="yes"
2351 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2352 bootoutput="FWImage.ebn"
2353 # toolset is the tools within the tools directory that we build for
2354 # this particular target.
2355 toolset=$scramblebitmaptools
2356 # architecture, manufacturer and model for the target-tree build
2357 t_cpu="arm"
2358 t_manufacturer="philips"
2359 t_model="sa9200"
2362 101|gogearhdd1630)
2363 target_id=43
2364 modelname="gogearhdd1630"
2365 target="-DPHILIPS_HDD1630"
2366 memory=32 # supposedly
2367 arm7tdmicc
2368 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2369 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2370 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2371 output="rockbox.mi4"
2372 appextra="recorder:gui:radio"
2373 plugins="yes"
2374 swcodec="yes"
2375 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2376 bootoutput="FWImage.ebn"
2377 # toolset is the tools within the tools directory that we build for
2378 # this particular target.
2379 toolset=$scramblebitmaptools
2380 # architecture, manufacturer and model for the target-tree build
2381 t_cpu="arm"
2382 t_manufacturer="philips"
2383 t_model="hdd1630"
2386 102|gogearhdd6330)
2387 target_id=65
2388 modelname="gogearhdd6330"
2389 target="-DPHILIPS_HDD6330"
2390 memory=64 # always
2391 arm7tdmicc
2392 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2393 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2394 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2395 output="rockbox.mi4"
2396 appextra="recorder:gui:radio"
2397 plugins="yes"
2398 swcodec="yes"
2399 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2400 bootoutput="FWImage.ebn"
2401 # toolset is the tools within the tools directory that we build for
2402 # this particular target.
2403 toolset=$scramblebitmaptools
2404 # architecture, manufacturer and model for the target-tree build
2405 t_cpu="arm"
2406 t_manufacturer="philips"
2407 t_model="hdd6330"
2410 110|meizum6sl)
2411 target_id=49
2412 modelname="meizum6sl"
2413 target="-DMEIZU_M6SL"
2414 memory=16 # always
2415 arm940tbecc
2416 tool="cp"
2417 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2418 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2419 output="rockbox.meizu"
2420 appextra="recorder:gui:radio"
2421 plugins="no" #FIXME
2422 swcodec="yes"
2423 toolset=$genericbitmaptools
2424 boottool="cp"
2425 bootoutput="rockboot.ebn"
2426 # architecture, manufacturer and model for the target-tree build
2427 t_cpu="arm"
2428 t_manufacturer="s5l8700"
2429 t_model="meizu-m6sl"
2432 111|meizum6sp)
2433 target_id=46
2434 modelname="meizum6sp"
2435 target="-DMEIZU_M6SP"
2436 memory=16 # always
2437 arm940tbecc
2438 tool="cp"
2439 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2440 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2441 output="rockbox.meizu"
2442 appextra="recorder:gui:radio"
2443 plugins="no" #FIXME
2444 swcodec="yes"
2445 toolset=$genericbitmaptools
2446 boottool="cp"
2447 bootoutput="rockboot.ebn"
2448 # architecture, manufacturer and model for the target-tree build
2449 t_cpu="arm"
2450 t_manufacturer="s5l8700"
2451 t_model="meizu-m6sp"
2454 112|meizum3)
2455 target_id=47
2456 modelname="meizum3"
2457 target="-DMEIZU_M3"
2458 memory=16 # always
2459 arm940tbecc
2460 tool="cp"
2461 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2462 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2463 output="rockbox.meizu"
2464 appextra="recorder:gui:radio"
2465 plugins="no" #FIXME
2466 swcodec="yes"
2467 toolset=$genericbitmaptools
2468 boottool="cp"
2469 bootoutput="rockboot.ebn"
2470 # architecture, manufacturer and model for the target-tree build
2471 t_cpu="arm"
2472 t_manufacturer="s5l8700"
2473 t_model="meizu-m3"
2476 120|ondavx747)
2477 target_id=45
2478 modelname="ondavx747"
2479 target="-DONDA_VX747"
2480 memory=16
2481 mipselcc
2482 tool="$rootdir/tools/scramble -add=x747"
2483 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2484 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2485 output="rockbox.vx747"
2486 appextra="recorder:gui:radio"
2487 plugins="yes"
2488 swcodec="yes"
2489 toolset=$genericbitmaptools
2490 boottool="$rootdir/tools/scramble -ccpmp"
2491 bootoutput="ccpmp.bin"
2492 # architecture, manufacturer and model for the target-tree build
2493 t_cpu="mips"
2494 t_manufacturer="ingenic_jz47xx"
2495 t_model="onda_vx747"
2498 121|ondavx767)
2499 target_id=64
2500 modelname="ondavx767"
2501 target="-DONDA_VX767"
2502 memory=16 #FIXME
2503 mipselcc
2504 tool="cp"
2505 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2506 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2507 output="rockbox.vx767"
2508 appextra="recorder:gui:radio"
2509 plugins="" #FIXME
2510 swcodec="yes"
2511 toolset=$genericbitmaptools
2512 boottool="$rootdir/tools/scramble -ccpmp"
2513 bootoutput="ccpmp.bin"
2514 # architecture, manufacturer and model for the target-tree build
2515 t_cpu="mips"
2516 t_manufacturer="ingenic_jz47xx"
2517 t_model="onda_vx767"
2520 122|ondavx747p)
2521 target_id=54
2522 modelname="ondavx747p"
2523 target="-DONDA_VX747P"
2524 memory=16
2525 mipselcc
2526 tool="$rootdir/tools/scramble -add=747p"
2527 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2528 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2529 output="rockbox.vx747p"
2530 appextra="recorder:gui:radio"
2531 plugins="yes"
2532 swcodec="yes"
2533 toolset=$genericbitmaptools
2534 boottool="$rootdir/tools/scramble -ccpmp"
2535 bootoutput="ccpmp.bin"
2536 # architecture, manufacturer and model for the target-tree build
2537 t_cpu="mips"
2538 t_manufacturer="ingenic_jz47xx"
2539 t_model="onda_vx747"
2542 123|ondavx777)
2543 target_id=61
2544 modelname="ondavx777"
2545 target="-DONDA_VX777"
2546 memory=16
2547 mipselcc
2548 tool="$rootdir/tools/scramble -add=x777"
2549 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2550 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2551 output="rockbox.vx777"
2552 appextra="recorder:gui:radio"
2553 plugins="yes"
2554 swcodec="yes"
2555 toolset=$genericbitmaptools
2556 boottool="$rootdir/tools/scramble -ccpmp"
2557 bootoutput="ccpmp.bin"
2558 # architecture, manufacturer and model for the target-tree build
2559 t_cpu="mips"
2560 t_manufacturer="ingenic_jz47xx"
2561 t_model="onda_vx747"
2564 130|lyreproto1)
2565 target_id=56
2566 modelname="lyreproto1"
2567 target="-DLYRE_PROTO1"
2568 memory=64
2569 arm926ejscc
2570 tool="cp"
2571 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2572 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2573 output="rockbox.lyre"
2574 appextra="recorder:gui:radio"
2575 plugins=""
2576 swcodec="yes"
2577 toolset=$scramblebitmaptools
2578 boottool="cp"
2579 bootoutput="bootloader-proto1.lyre"
2580 # architecture, manufacturer and model for the target-tree build
2581 t_cpu="arm"
2582 t_manufacturer="at91sam"
2583 t_model="lyre_proto1"
2586 131|mini2440)
2587 target_id=99
2588 modelname="mini2440"
2589 target="-DMINI2440"
2590 memory=64
2591 arm9tdmicc
2592 tool="$rootdir/tools/scramble -add=m244"
2593 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2594 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2595 output="rockbox.mini2440"
2596 appextra="recorder:gui:radio"
2597 plugins=""
2598 swcodec="yes"
2599 toolset=$scramblebitmaptools
2600 boottool="cp"
2601 bootoutput="bootloader-mini2440.lyre"
2602 # architecture, manufacturer and model for the target-tree build
2603 t_cpu="arm"
2604 t_manufacturer="s3c2440"
2605 t_model="mini2440"
2608 140|samsungyh820)
2609 target_id=57
2610 modelname="samsungyh820"
2611 target="-DSAMSUNG_YH820"
2612 memory=32 # always
2613 arm7tdmicc
2614 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2615 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2616 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2617 output="rockbox.mi4"
2618 appextra="recorder:gui:radio"
2619 plugins="yes"
2620 swcodec="yes"
2621 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2622 bootoutput="FW_YH820.mi4"
2623 # toolset is the tools within the tools directory that we build for
2624 # this particular target.
2625 toolset=$scramblebitmaptools
2626 # architecture, manufacturer and model for the target-tree build
2627 t_cpu="arm"
2628 t_manufacturer="samsung"
2629 t_model="yh820"
2632 141|samsungyh920)
2633 target_id=58
2634 modelname="samsungyh920"
2635 target="-DSAMSUNG_YH920"
2636 memory=32 # always
2637 arm7tdmicc
2638 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2639 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2640 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2641 output="rockbox.mi4"
2642 appextra="recorder:gui:radio"
2643 plugins="yes"
2644 swcodec="yes"
2645 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2646 bootoutput="PP5020.mi4"
2647 # toolset is the tools within the tools directory that we build for
2648 # this particular target.
2649 toolset=$scramblebitmaptools
2650 # architecture, manufacturer and model for the target-tree build
2651 t_cpu="arm"
2652 t_manufacturer="samsung"
2653 t_model="yh920"
2656 142|samsungyh925)
2657 target_id=59
2658 modelname="samsungyh925"
2659 target="-DSAMSUNG_YH925"
2660 memory=32 # always
2661 arm7tdmicc
2662 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2663 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2664 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2665 output="rockbox.mi4"
2666 appextra="recorder:gui:radio"
2667 plugins="yes"
2668 swcodec="yes"
2669 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2670 bootoutput="FW_YH925.mi4"
2671 # toolset is the tools within the tools directory that we build for
2672 # this particular target.
2673 toolset=$scramblebitmaptools
2674 # architecture, manufacturer and model for the target-tree build
2675 t_cpu="arm"
2676 t_manufacturer="samsung"
2677 t_model="yh925"
2680 143|samsungyps3)
2681 target_id=60
2682 modelname="samsungyps3"
2683 target="-DSAMSUNG_YPS3"
2684 memory=16 # always
2685 arm940tbecc
2686 tool="cp"
2687 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2688 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2689 output="rockbox.yps3"
2690 appextra="recorder:gui:radio"
2691 plugins="no" #FIXME
2692 swcodec="yes"
2693 toolset=$genericbitmaptools
2694 boottool="cp"
2695 bootoutput="rockboot.ebn"
2696 # architecture, manufacturer and model for the target-tree build
2697 t_cpu="arm"
2698 t_manufacturer="s5l8700"
2699 t_model="yps3"
2702 160|vibe500)
2703 target_id=67
2704 modelname="vibe500"
2705 target="-DPBELL_VIBE500"
2706 memory=32 # always
2707 arm7tdmicc
2708 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2709 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2710 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2711 output="rockbox.mi4"
2712 appextra="recorder:gui:radio"
2713 plugins="yes"
2714 swcodec="yes"
2715 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2716 bootoutput="jukebox.mi4"
2717 # toolset is the tools within the tools directory that we build for
2718 # this particular target.
2719 toolset=$scramblebitmaptools
2720 # architecture, manufacturer and model for the target-tree build
2721 t_cpu="arm"
2722 t_manufacturer="pbell"
2723 t_model="vibe500"
2726 170|mpiohd200)
2727 target_id=69
2728 modelname="mpiohd200"
2729 target="-DMPIO_HD200"
2730 memory=16 # always
2731 coldfirecc
2732 tool="$rootdir/tools/scramble -add=hd20"
2733 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2734 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2735 output="rockbox.mpio"
2736 bootoutput="bootloader.mpio"
2737 appextra="recorder:gui:radio"
2738 plugins="yes"
2739 swcodec="yes"
2740 # toolset is the tools within the tools directory that we build for
2741 # this particular target.
2742 toolset="$genericbitmaptools"
2743 # architecture, manufacturer and model for the target-tree build
2744 t_cpu="coldfire"
2745 t_manufacturer="mpio"
2746 t_model="hd200"
2749 171|mpiohd300)
2750 target_id=70
2751 modelname="mpiohd300"
2752 target="-DMPIO_HD300"
2753 memory=16 # always
2754 coldfirecc
2755 tool="$rootdir/tools/scramble -add=hd30"
2756 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2757 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2758 output="rockbox.mpio"
2759 bootoutput="bootloader.mpio"
2760 appextra="recorder:gui:radio"
2761 plugins="yes"
2762 swcodec="yes"
2763 # toolset is the tools within the tools directory that we build for
2764 # this particular target.
2765 toolset="$genericbitmaptools"
2766 # architecture, manufacturer and model for the target-tree build
2767 t_cpu="coldfire"
2768 t_manufacturer="mpio"
2769 t_model="hd300"
2772 200|app*)
2773 target_id=100
2774 modelname="application"
2775 target="-DAPPLICATION"
2777 need_full_path="yes"
2778 app_get_platform
2780 memory=8
2781 uname=`uname`
2783 appcc "$app_platform"
2784 tool="cp "
2785 boottool="cp "
2786 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2787 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2788 appextra="recorder:gui:radio"
2789 plugins=""
2790 swcodec="yes"
2791 # architecture, manufacturer and model for the target-tree build
2792 t_cpu="hosted"
2793 t_manufacturer="$app_platform"
2794 t_model="app"
2798 echo "Please select a supported target platform!"
2799 exit 7
2802 esac
2804 echo "Platform set to $modelname"
2807 #remove start
2808 ############################################################################
2809 # Amount of memory, for those that can differ. They have $memory unset at
2810 # this point.
2813 if [ -z "$memory" ]; then
2814 case $target_id in
2816 if [ "$ARG_RAM" ]; then
2817 size=$ARG_RAM
2818 else
2819 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2820 size=`input`;
2822 case $size in
2823 60|64)
2824 memory="64"
2827 memory="32"
2829 esac
2832 if [ "$ARG_RAM" ]; then
2833 size=$ARG_RAM
2834 else
2835 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2836 size=`input`;
2838 case $size in
2840 memory="8"
2843 memory="2"
2845 esac
2847 esac
2848 echo "Memory size selected: $memory MB"
2849 [ "$ARG_TYPE" ] || echo ""
2851 #remove end
2853 ##################################################################
2854 # Figure out build "type"
2857 # the ifp7x0 is the only platform that supports building a gdb stub like
2858 # this
2859 case $modelname in
2860 iriverifp7xx)
2861 gdbstub="(G)DB stub, "
2863 sansae200r|sansae200)
2864 gdbstub="(I)nstaller, "
2866 sansac200)
2867 gdbstub="(E)raser, "
2871 esac
2872 if [ "$ARG_TYPE" ]; then
2873 btype=$ARG_TYPE
2874 else
2875 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2876 btype=`input`;
2879 case $btype in
2880 [Ii])
2881 appsdir='\$(ROOTDIR)/bootloader'
2882 apps="bootloader"
2883 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2884 bootloader="1"
2885 echo "e200R-installer build selected"
2887 [Ee])
2888 appsdir='\$(ROOTDIR)/bootloader'
2889 apps="bootloader"
2890 echo "C2(4)0 or C2(5)0"
2891 variant=`input`
2892 case $variant in
2894 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2895 echo "c240 eraser build selected"
2898 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2899 echo "c240 eraser build selected"
2901 esac
2902 bootloader="1"
2903 echo "c200 eraser build selected"
2905 [Bb])
2906 if test $t_manufacturer = "archos"; then
2907 # Archos SH-based players do this somewhat differently for
2908 # some reason
2909 appsdir='\$(ROOTDIR)/flash/bootbox'
2910 apps="bootbox"
2911 else
2912 appsdir='\$(ROOTDIR)/bootloader'
2913 apps="bootloader"
2914 flash=""
2915 if test -n "$boottool"; then
2916 tool="$boottool"
2918 if test -n "$bootoutput"; then
2919 output=$bootoutput
2922 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
2923 bootloader="1"
2924 echo "Bootloader build selected"
2926 [Ss])
2927 if [ "$modelname" = "sansae200r" ]; then
2928 echo "Do not use the e200R target for simulator builds. Use e200 instead."
2929 exit 8
2931 debug="-DDEBUG"
2932 simulator="yes"
2933 extradefines="$extradefines -DSIMULATOR"
2934 archosrom=""
2935 flash=""
2936 echo "Simulator build selected"
2938 [Aa]*)
2939 echo "Advanced build selected"
2940 whichadvanced $btype
2942 [Gg])
2943 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
2944 appsdir='\$(ROOTDIR)/gdb'
2945 apps="stub"
2946 case $modelname in
2947 iriverifp7xx)
2948 output="stub.wma"
2952 esac
2953 echo "GDB stub build selected"
2955 [Mm])
2956 toolset='';
2957 apps="manual"
2958 echo "Manual build selected"
2960 [Cc])
2961 uname=`uname`
2962 simcc "checkwps"
2963 toolset='';
2964 t_cpu='';
2965 GCCOPTS='';
2966 extradefines="$extradefines -DDEBUG"
2967 appsdir='\$(ROOTDIR)/tools/checkwps';
2968 output='checkwps.'${modelname};
2969 archosrom='';
2970 echo "CheckWPS build selected"
2972 [Dd])
2973 uname=`uname`
2974 simcc "database"
2975 toolset='';
2976 t_cpu='';
2977 GCCOPTS='';
2978 appsdir='\$(ROOTDIR)/tools/database';
2979 archosrom='';
2981 case $uname in
2982 CYGWIN*|MINGW*)
2983 output="database_${modelname}.exe"
2986 output='database.'${modelname};
2988 esac
2990 echo "Database tool build selected"
2993 if [ "$modelname" = "sansae200r" ]; then
2994 echo "Do not use the e200R target for regular builds. Use e200 instead."
2995 exit 8
2997 debug=""
2998 btype="N" # set it explicitly since RET only gets here as well
2999 echo "Normal build selected"
3002 esac
3003 # to be able running "make manual" from non-manual configuration
3004 case $modelname in
3005 archosrecorderv2)
3006 manualdev="archosfmrecorder"
3008 iriverh1??)
3009 manualdev="iriverh100"
3011 ipodmini2g)
3012 manualdev="ipodmini1g"
3015 manualdev=$modelname
3017 esac
3019 if [ -z "$debug" ]; then
3020 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3023 echo "Using source code root directory: $rootdir"
3025 # this was once possible to change at build-time, but no more:
3026 language="english"
3028 uname=`uname`
3030 if [ "yes" = "$simulator" ]; then
3031 # setup compiler and things for simulator
3032 simcc "sdl-sim"
3034 if [ -d "simdisk" ]; then
3035 echo "Subdirectory 'simdisk' already present"
3036 else
3037 mkdir simdisk
3038 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3042 # Now, figure out version number of the (gcc) compiler we are about to use
3043 gccver=`$CC -dumpversion`;
3045 # figure out the binutil version too and display it, mostly for the build
3046 # system etc to be able to see it easier
3047 if [ $uname = "Darwin" ]; then
3048 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3049 else
3050 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3053 if [ -z "$gccver" ]; then
3054 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3055 echo "[WARNING] this may cause your build to fail since we cannot do the"
3056 echo "[WARNING] checks we want now."
3057 else
3059 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3060 # DEPEND on it
3062 num1=`echo $gccver | cut -d . -f1`
3063 num2=`echo $gccver | cut -d . -f2`
3064 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3066 # This makes:
3067 # 3.3.X => 303
3068 # 3.4.X => 304
3069 # 2.95.3 => 295
3071 echo "Using $CC $gccver ($gccnum)"
3073 if test "$gccnum" -ge "400"; then
3074 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3075 # so we ignore that warnings for now
3076 # -Wno-pointer-sign
3077 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3080 if test "$gccnum" -ge "402"; then
3081 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3082 # and later would throw it for several valid cases
3083 GCCOPTS="$GCCOPTS -Wno-override-init"
3086 case $prefix in
3087 ""|"$CROSS_COMPILE")
3088 # simulator
3090 i586-mingw32msvc-)
3091 # cross-compile for win32
3094 # Verify that the cross-compiler is of a recommended version!
3095 if test "$gccver" != "$gccchoice"; then
3096 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3097 echo "WARNING: version $gccchoice!"
3098 echo "WARNING: This may cause your build to fail since it may be a version"
3099 echo "WARNING: that isn't functional or known to not be the best choice."
3100 echo "WARNING: If you suffer from build problems, you know that this is"
3101 echo "WARNING: a likely source for them..."
3104 esac
3109 echo "Using $LD $ldver"
3111 # check the compiler for SH platforms
3112 if test "$CC" = "sh-elf-gcc"; then
3113 if test "$gccnum" -lt "400"; then
3114 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3115 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3116 else
3117 # figure out patch status
3118 gccpatch=`$CC --version`;
3120 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3121 echo "gcc $gccver is rockbox patched"
3122 # then convert -O to -Os to get smaller binaries!
3123 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3124 else
3125 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3126 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3131 if test "$CC" = "m68k-elf-gcc"; then
3132 # convert -O to -Os to get smaller binaries!
3133 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3136 if [ "$ARG_CCACHE" = "1" ]; then
3137 echo "Enable ccache for building"
3138 ccache="ccache"
3139 elif [ "$ARG_CCACHE" != "0" ]; then
3140 ccache=`findtool ccache`
3141 if test -n "$ccache"; then
3142 echo "Found and uses ccache ($ccache)"
3146 # figure out the full path to the various commands if possible
3147 HOSTCC=`findtool gcc --lit`
3148 HOSTAR=`findtool ar --lit`
3149 CC=`findtool ${CC} --lit`
3150 LD=`findtool ${AR} --lit`
3151 AR=`findtool ${AR} --lit`
3152 AS=`findtool ${AS} --lit`
3153 OC=`findtool ${OC} --lit`
3154 WINDRES=`findtool ${WINDRES} --lit`
3155 DLLTOOL=`findtool ${DLLTOOL} --lit`
3156 DLLWRAP=`findtool ${DLLWRAP} --lit`
3157 RANLIB=`findtool ${RANLIB} --lit`
3159 if test -n "$ccache"; then
3160 CC="$ccache $CC"
3163 if test "$ARG_ARM_THUMB" = "1"; then
3164 extradefines="$extradefines -DUSE_THUMB"
3165 CC="$toolsdir/thumb-cc.py $CC"
3168 if test "X$endian" = "Xbig"; then
3169 defendian="ROCKBOX_BIG_ENDIAN"
3170 else
3171 defendian="ROCKBOX_LITTLE_ENDIAN"
3174 if [ "$ARG_RBDIR" != "" ]; then
3175 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3176 rbdir="/"$ARG_RBDIR
3177 else
3178 rbdir=$ARG_RBDIR
3180 echo "Using alternate rockbox dir: ${rbdir}"
3183 sed > autoconf.h \
3184 -e "s<@ENDIAN@<${defendian}<g" \
3185 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3186 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3187 -e "s<@config_rtc@<$config_rtc<g" \
3188 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3189 -e "s<@RBDIR@<${rbdir}<g" \
3190 -e "s<@sharepath@<${sharedir}<g" \
3191 -e "s<@binpath@<${bindir}<g" \
3192 -e "s<@libpath@<${libdir}<g" \
3193 -e "s<@have_backlight@<$have_backlight<g" \
3194 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3195 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3196 -e "s<@lcd_width@<$app_lcd_width<g" \
3197 -e "s<@lcd_height@<$app_lcd_height<g" \
3198 <<EOF
3199 /* This header was made by configure */
3200 #ifndef __BUILD_AUTOCONF_H
3201 #define __BUILD_AUTOCONF_H
3203 /* Define endianess for the target or simulator platform */
3204 #define @ENDIAN@ 1
3206 /* Define this if you build rockbox to support the logf logging and display */
3207 #undef ROCKBOX_HAS_LOGF
3209 /* Define this to record a chart with timings for the stages of boot */
3210 #undef DO_BOOTCHART
3212 /* optional define for a backlight modded Ondio */
3213 @have_backlight@
3215 /* optional define for FM radio mod for iAudio M5 */
3216 @have_fmradio_in@
3218 /* optional define for ATA poweroff on Player */
3219 @have_ata_poweroff@
3221 /* optional defines for RTC mod for h1x0 */
3222 @config_rtc@
3223 @have_rtc_alarm@
3225 /* lcd dimensions for application builds from configure */
3226 @lcd_width@
3227 @lcd_height@
3229 /* root of Rockbox */
3230 #define ROCKBOX_DIR "@RBDIR@"
3231 #define ROCKBOX_SHARE_PATH "@sharepath@"
3232 #define ROCKBOX_BINARY_PATH "@binpath@"
3233 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3235 #endif /* __BUILD_AUTOCONF_H */
3238 if test -n "$t_cpu"; then
3239 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3240 if [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3241 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/"
3242 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/"
3244 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3245 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3246 GCCOPTS="$GCCOPTS"
3249 if test "$simulator" = "yes"; then
3250 # add simul make stuff on the #SIMUL# line
3251 simmagic1="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3252 simmagic2="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3253 else
3254 # delete the lines that match
3255 simmagic1='/@SIMUL1@/D'
3256 simmagic2='/@SIMUL2@/D'
3259 if test "$swcodec" = "yes"; then
3260 voicetoolset="rbspeexenc voicefont wavtrim"
3261 else
3262 voicetoolset="voicefont wavtrim"
3265 if test "$apps" = "apps"; then
3266 # only when we build "real" apps we build the .lng files
3267 buildlangs="langs"
3270 #### Fix the cmdline ###
3271 if [ "$ARG_CCACHE" = "1" ]; then
3272 cmdline="--ccache "
3273 elif [ "$ARG_CCACHE" = "0" ]; then
3274 cmdline="--no-ccache "
3276 if [ "$ARG_ARM_EABI" = "1" ]; then
3277 cmdline="$cmdline--eabi "
3279 if [ "$app_platform" = "sdl" ]; then
3280 cmdline="$cmdline--platform=S "
3281 elif [ "$app_platform" = "android" ]; then
3282 cmdline="$cmdline--platform=A "
3284 if [ "$modelname" = "application" ]; then
3285 cmdline="$cmdline--lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3287 if [ -n "$ARG_PREFIX" ]; then
3288 cmdline="$cmdline--prefix=\$(PREFIX) "
3291 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3293 ### end of cmdline
3295 sed > Makefile \
3296 -e "s<@ROOTDIR@<${rootdir}<g" \
3297 -e "s<@DEBUG@<${debug}<g" \
3298 -e "s<@MEMORY@<${memory}<g" \
3299 -e "s<@TARGET_ID@<${target_id}<g" \
3300 -e "s<@TARGET@<${target}<g" \
3301 -e "s<@CPU@<${t_cpu}<g" \
3302 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3303 -e "s<@MODELNAME@<${modelname}<g" \
3304 -e "s<@LANGUAGE@<${language}<g" \
3305 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3306 -e "s<@PWD@<${pwd}<g" \
3307 -e "s<@HOSTCC@<${HOSTCC}<g" \
3308 -e "s<@HOSTAR@<${HOSTAR}<g" \
3309 -e "s<@CC@<${CC}<g" \
3310 -e "s<@LD@<${LD}<g" \
3311 -e "s<@AR@<${AR}<g" \
3312 -e "s<@AS@<${AS}<g" \
3313 -e "s<@OC@<${OC}<g" \
3314 -e "s<@WINDRES@<${WINDRES}<g" \
3315 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3316 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3317 -e "s<@RANLIB@<${RANLIB}<g" \
3318 -e "s<@TOOL@<${tool}<g" \
3319 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3320 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3321 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3322 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3323 -e "s<@OUTPUT@<${output}<g" \
3324 -e "s<@APPEXTRA@<${appextra}<g" \
3325 -e "s<@ARCHOSROM@<${archosrom}<g" \
3326 -e "s<@FLASHFILE@<${flash}<g" \
3327 -e "s<@PLUGINS@<${plugins}<g" \
3328 -e "s<@CODECS@<${swcodec}<g" \
3329 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3330 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3331 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3332 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3333 -e "s<@LDOPTS@<${LDOPTS}<g" \
3334 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3335 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3336 -e "s<@EXTRADEF@<${extradefines}<g" \
3337 -e "s<@APPSDIR@<${appsdir}<g" \
3338 -e "s<@FIRMDIR@<${firmdir}<g" \
3339 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3340 -e "s<@APPS@<${apps}<g" \
3341 -e "s<@APP_TYPE@<${app_type}<g" \
3342 -e "s<@GCCVER@<${gccver}<g" \
3343 -e "s<@GCCNUM@<${gccnum}<g" \
3344 -e "s<@UNAME@<${uname}<g" \
3345 -e "s<@ENDIAN@<${defendian}<g" \
3346 -e "s<@TOOLSET@<${toolset}<g" \
3347 -e "${simmagic1}" \
3348 -e "${simmagic2}" \
3349 -e "s<@MANUALDEV@<${manualdev}<g" \
3350 -e "s<@ENCODER@<${ENC_CMD}<g" \
3351 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3352 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3353 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3354 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3355 -e "s<@LANGS@<${buildlangs}<g" \
3356 -e "s<@USE_ELF@<${USE_ELF}<g" \
3357 -e "s<@RBDIR@<${rbdir}<g" \
3358 -e "s<@sharepath@<${sharedir}<g" \
3359 -e "s<@binpath@<${bindir}<g" \
3360 -e "s<@libpath@<${libdir}<g" \
3361 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3362 -e "s<@CMDLINE@<$cmdline<g" \
3363 -e "s<@SDLCONFIG@<$sdl<g" \
3364 <<EOF
3365 ## Automatically generated. http://www.rockbox.org/
3367 export ROOTDIR=@ROOTDIR@
3368 export FIRMDIR=@FIRMDIR@
3369 export APPSDIR=@APPSDIR@
3370 export TOOLSDIR=@TOOLSDIR@
3371 export DOCSDIR=\$(ROOTDIR)/docs
3372 export MANUALDIR=\${ROOTDIR}/manual
3373 export DEBUG=@DEBUG@
3374 export MODELNAME=@MODELNAME@
3375 export ARCHOSROM=@ARCHOSROM@
3376 export FLASHFILE=@FLASHFILE@
3377 export TARGET_ID=@TARGET_ID@
3378 export TARGET=@TARGET@
3379 export CPU=@CPU@
3380 export MANUFACTURER=@MANUFACTURER@
3381 export OBJDIR=@PWD@
3382 export BUILDDIR=@PWD@
3383 export LANGUAGE=@LANGUAGE@
3384 export VOICELANGUAGE=@VOICELANGUAGE@
3385 export MEMORYSIZE=@MEMORY@
3386 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3387 export MKFIRMWARE=@TOOL@
3388 export BMP2RB_MONO=@BMP2RB_MONO@
3389 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3390 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3391 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3392 export BINARY=@OUTPUT@
3393 export APPEXTRA=@APPEXTRA@
3394 export ENABLEDPLUGINS=@PLUGINS@
3395 export SOFTWARECODECS=@CODECS@
3396 export EXTRA_DEFINES=@EXTRADEF@
3397 export HOSTCC=@HOSTCC@
3398 export HOSTAR=@HOSTAR@
3399 export CC=@CC@
3400 export LD=@LD@
3401 export AR=@AR@
3402 export AS=@AS@
3403 export OC=@OC@
3404 export WINDRES=@WINDRES@
3405 export DLLTOOL=@DLLTOOL@
3406 export DLLWRAP=@DLLWRAP@
3407 export RANLIB=@RANLIB@
3408 export PREFIX=@PREFIX@
3409 export PROFILE_OPTS=@PROFILE_OPTS@
3410 export APP_TYPE=@APP_TYPE@
3411 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3412 export GCCOPTS=@GCCOPTS@
3413 export TARGET_INC=@TARGET_INC@
3414 export LOADADDRESS=@LOADADDRESS@
3415 export SHARED_FLAG=@SHARED_FLAG@
3416 export LDOPTS=@LDOPTS@
3417 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3418 export GCCVER=@GCCVER@
3419 export GCCNUM=@GCCNUM@
3420 export UNAME=@UNAME@
3421 export MANUALDEV=@MANUALDEV@
3422 export TTS_OPTS=@TTS_OPTS@
3423 export TTS_ENGINE=@TTS_ENGINE@
3424 export ENC_OPTS=@ENC_OPTS@
3425 export ENCODER=@ENCODER@
3426 export USE_ELF=@USE_ELF@
3427 export RBDIR=@RBDIR@
3428 export ROCKBOX_SHARE_PATH=@sharepath@
3429 export ROCKBOX_BINARY_PATH=@binpath@
3430 export ROCKBOX_LIBRARY_PATH=@libpath@
3431 export SDLCONFIG=@SDLCONFIG@
3433 CONFIGURE_OPTIONS=@CMDLINE@
3435 include \$(TOOLSDIR)/root.make
3439 echo "Created Makefile"