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