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