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