first step at building the main binary
[kugel-rb.git] / tools / configure
blobb62a2718ed69bdc32e1e1c71d8b1f004dfef527f
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"
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 ROCKBOX_BINARY_PATH="/tmp"
26 ROCKBOX_LIBRARY_PATH="/tmp"
28 app_platform=
29 app_lcd_width=
30 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 choice=`input`
56 case $choice in
57 s|S*) app_platform="sdl" ;;
58 *|a|A*) app_platform="android" ;;
59 esac
61 echo "Selected $app_platform platform"
62 echo "Select the LCD resolution seperated with enter: XxY (default: 320x480)"
63 app_lcd_width=`input`
64 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
65 app_lcd_height=`input`
66 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
67 echo "Selected $app_lcd_width x $app_lcd_height resolution"
70 findarmgcc() {
71 if [ "$ARG_ARM_EABI" != "0" ]; then
72 prefixtools arm-elf-eabi-
73 gccchoice="4.4.4"
74 else
75 prefixtools arm-elf-
76 gccchoice="4.0.3"
80 # scan the $PATH for the given command
81 findtool(){
82 file="$1"
84 IFS=":"
85 for path in $PATH
87 # echo "checks for $file in $path" >&2
88 if test -f "$path/$file"; then
89 echo "$path/$file"
90 return
92 done
93 # check whether caller wants literal return value if not found
94 if [ "$2" = "--lit" ]; then
95 echo "$file"
99 # scan the $PATH for sdl-config - check whether for a (cross-)win32
100 # sdl as requested
101 findsdl(){
102 file="sdl-config"
103 winbuild="$1"
105 IFS=":"
106 for path in $PATH
108 #echo "checks for $file in $path" >&2
109 if test -f "$path/$file"; then
110 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
111 if [ "yes" = "${winbuild}" ]; then
112 echo "$path/$file"
113 return
115 else
116 if [ "yes" != "${winbuild}" ]; then
117 echo "$path/$file"
118 return
122 done
125 appcc () {
126 if [ "$1" = "sdl" ]; then
127 simcc $1
128 elif [ "$1" = "android" ]; then
129 app_type=$1
130 androidcc
134 simcc () {
136 # default tool setup for native building
137 prefixtools "$CROSS_COMPILE"
138 ARG_ARM_THUMB=0 # can't use thumb in native builds
140 app_type=$1
141 winbuild=""
142 GCCOPTS='-W -Wall -g -fno-builtin'
143 GCCOPTIMIZE=''
144 LDOPTS='-lm' # button-sdl.c uses sqrt()
146 # default output binary name
147 output="rockboxui"
149 # default share option, override below if needed
150 SHARED_FLAG="-shared"
152 if [ "$win32crosscompile" = "yes" ]; then
153 LDOPTS="$LDOPTS -mconsole"
154 output="rockboxui.exe"
155 winbuild="yes"
156 else
157 case $uname in
158 CYGWIN*)
159 echo "Cygwin host detected"
161 LDOPTS="$LDOPTS -mconsole"
162 output="rockboxui.exe"
163 winbuild="yes"
166 MINGW*)
167 echo "MinGW host detected"
169 LDOPTS="$LDOPTS -mconsole"
170 output="rockboxui.exe"
171 winbuild="yes"
174 Linux)
175 echo "Linux host detected"
176 LDOPTS="$LDOPTS -ldl"
179 FreeBSD)
180 echo "FreeBSD host detected"
181 LDOPTS="$LDOPTS -ldl"
184 Darwin)
185 echo "Darwin host detected"
186 LDOPTS="$LDOPTS -ldl"
188 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
191 SunOS)
192 echo "*Solaris host detected"
194 GCCOPTS="$GCCOPTS -fPIC"
195 LDOPTS="$LDOPTS -ldl"
199 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
200 exit 1
202 esac
205 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
206 sdl=`findsdl $winbuild`
208 if [ -n `echo $app_type | grep "sdl"` ]; then
209 if [ -z "$sdl" ]; then
210 echo "configure didn't find sdl-config, which indicates that you"
211 echo "don't have SDL (properly) installed. Please correct and"
212 echo "re-run configure!"
213 exit 2
214 else
215 # generic sdl-config checker
216 GCCOPTS="$GCCOPTS `$sdl --cflags`"
217 LDOPTS="$LDOPTS `$sdl --libs`"
222 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
224 if test "X$win32crosscompile" != "Xyes"; then
225 case `uname -m` in
226 x86_64|amd64)
227 # fPIC is needed to make shared objects link
228 # setting visibility to hidden is necessary to avoid strange crashes
229 # due to symbol clashing
230 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
231 # x86_64 supports MMX by default
234 i686)
235 echo "Enabling MMX support"
236 GCCOPTS="$GCCOPTS -mmmx"
238 esac
240 id=$$
241 cat >$tmpdir/conftest-$id.c <<EOF
242 #include <stdio.h>
243 int main(int argc, char **argv)
245 int var=0;
246 char *varp = (char *)&var;
247 *varp=1;
249 printf("%d\n", var);
250 return 0;
254 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
256 # when cross compiling, the endianess cannot be detected because the above program doesn't run
257 # on the local machine. assume little endian but print a warning
258 endian=`$tmpdir/conftest-$id 2> /dev/null`
259 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
260 # big endian
261 endian="big"
262 else
263 # little endian
264 endian="little"
267 if [ "$CROSS_COMPILE" != "" ]; then
268 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
271 if [ "$app_type" = "sdl-sim" ]; then
272 echo "Simulator environment deemed $endian endian"
273 elif [ "$app_type" = "sdl-app" ]; then
274 echo "Application environment deemed $endian endian"
275 elif [ "$app_type" = "checkwps" ]; then
276 echo "CheckWPS environment deemed $endian endian"
279 # use wildcard here to make it work even if it was named *.exe like
280 # on cygwin
281 rm -f $tmpdir/conftest-$id*
282 else
283 # We are crosscompiling
284 # add cross-compiler option(s)
285 prefixtools i586-mingw32msvc-
286 LDOPTS="$LDOPTS -mconsole"
287 output="rockboxui.exe"
288 endian="little" # windows is little endian
289 echo "Enabling MMX support"
290 GCCOPTS="$GCCOPTS -mmmx"
295 # functions for setting up cross-compiler names and options
296 # also set endianess and what the exact recommended gcc version is
297 # the gcc version should most likely match what versions we build with
298 # rockboxdev.sh
300 shcc () {
301 prefixtools sh-elf-
302 GCCOPTS="$CCOPTS -m1"
303 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
304 endian="big"
305 gccchoice="4.0.3"
308 calmrisccc () {
309 prefixtools calmrisc16-unknown-elf-
310 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
311 GCCOPTIMIZE="-fomit-frame-pointer"
312 endian="big"
315 coldfirecc () {
316 prefixtools m68k-elf-
317 GCCOPTS="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
318 GCCOPTIMIZE="-fomit-frame-pointer"
319 endian="big"
320 gccchoice="3.4.6"
323 arm7tdmicc () {
324 findarmgcc
325 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
326 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
327 GCCOPTS="$GCCOPTS -mlong-calls"
329 GCCOPTIMIZE="-fomit-frame-pointer"
330 endian="little"
333 arm9tdmicc () {
334 findarmgcc
335 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
336 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
337 GCCOPTS="$GCCOPTS -mlong-calls"
339 GCCOPTIMIZE="-fomit-frame-pointer"
340 endian="little"
343 arm940tbecc () {
344 findarmgcc
345 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
346 if test "$ARG_ARM_EABI" = "0"; then
347 GCCOPTS="$GCCOPTS -mlong-calls"
349 GCCOPTIMIZE="-fomit-frame-pointer"
350 endian="big"
353 arm940tcc () {
354 findarmgcc
355 GCCOPTS="$CCOPTS -mcpu=arm940t"
356 if test "$ARG_ARM_EABI" = "0"; then
357 GCCOPTS="$GCCOPTS -mlong-calls"
359 GCCOPTIMIZE="-fomit-frame-pointer"
360 endian="little"
363 arm946cc () {
364 findarmgcc
365 GCCOPTS="$CCOPTS -mcpu=arm9e"
366 if test "$ARG_ARM_EABI" = "0"; then
367 GCCOPTS="$GCCOPTS -mlong-calls"
369 GCCOPTIMIZE="-fomit-frame-pointer"
370 endian="little"
373 arm926ejscc () {
374 findarmgcc
375 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
376 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
377 GCCOPTS="$GCCOPTS -mlong-calls"
379 GCCOPTIMIZE="-fomit-frame-pointer"
380 endian="little"
383 arm1136jfscc () {
384 findarmgcc
385 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
386 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
387 GCCOPTS="$GCCOPTS -mlong-calls"
389 GCCOPTIMIZE="-fomit-frame-pointer"
390 endian="little"
393 arm1176jzscc () {
394 findarmgcc
395 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
396 if test "$ARG_ARM_EABI" = "0"; then
397 GCCOPTS="$GCCOPTS -mlong-calls"
399 GCCOPTIMIZE="-fomit-frame-pointer"
400 endian="little"
403 mipselcc () {
404 prefixtools mipsel-elf-
405 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls"
406 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
407 GCCOPTIMIZE="-fomit-frame-pointer"
408 endian="little"
409 gccchoice="4.1.2"
412 androidcc () {
413 gccchoice="4.4.0"
414 prefixtools $ANDROID_NDK_PATH/build/prebuilt/linux-x86/arm-eabi-$gccchoice/bin/arm-eabi-
415 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
416 GCCOPTS="$GCCOPTS -std=gnu99 -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer -fno-strict-aliasing"
417 LDOPTS="-lm -ldl -lc -Wl,--no-undefined -Wl,-z,noexecstack -L$ANDROID_NDK_PATH/build/platforms/android-4/arch-arm/usr/lib/ -Wl,-rpath-link=$ANDROID_NKD_PATH/build/platforms/android-4/arch-arm/usr/lib"
418 extradefines="$extradefines -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -DANDROID"
419 endian="little"
422 whichadvanced () {
423 atype=`echo "$1" | cut -c 2-`
424 ##################################################################
425 # Prompt for specific developer options
427 if [ "$atype" ]; then
428 interact=
429 else
430 interact=1
431 echo ""
432 printf "Enter your developer options (press only enter when done)\n\
433 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
434 (T)est plugins, S(m)all C lib:"
435 if [ "$memory" = "2" ]; then
436 printf ", (8)MB MOD"
438 if [ "$modelname" = "archosplayer" ]; then
439 printf ", Use (A)TA poweroff"
441 if [ "$t_model" = "ondio" ]; then
442 printf ", (B)acklight MOD"
444 if [ "$modelname" = "iaudiom5" ]; then
445 printf ", (F)M radio MOD"
447 if [ "$modelname" = "iriverh120" ]; then
448 printf ", (R)TC MOD"
450 echo ""
453 cont=1
454 while [ $cont = "1" ]; do
456 if [ "$interact" ]; then
457 option=`input`
458 else
459 option=`echo "$atype" | cut -c 1`
462 case $option in
463 [Dd])
464 if [ "yes" = "$profile" ]; then
465 echo "Debug is incompatible with profiling"
466 else
467 echo "DEBUG build enabled"
468 use_debug="yes"
471 [Ll])
472 echo "logf() support enabled"
473 logf="yes"
475 [Mm])
476 echo "Using Rockbox' small C library"
477 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
479 [Tt])
480 echo "Including test plugins"
481 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
483 [Cc])
484 echo "bootchart enabled (logf also enabled)"
485 bootchart="yes"
486 logf="yes"
488 [Ss])
489 echo "Simulator build enabled"
490 simulator="yes"
492 [Pp])
493 if [ "yes" = "$use_debug" ]; then
494 echo "Profiling is incompatible with debug"
495 else
496 echo "Profiling support is enabled"
497 profile="yes"
500 [Vv])
501 echo "Voice build selected"
502 voice="yes"
505 if [ "$memory" = "2" ]; then
506 memory="8"
507 echo "Memory size selected: 8MB"
510 [Aa])
511 if [ "$modelname" = "archosplayer" ]; then
512 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
513 echo "ATA power off enabled"
516 [Bb])
517 if [ "$t_model" = "ondio" ]; then
518 have_backlight="#define HAVE_BACKLIGHT"
519 echo "Backlight functions enabled"
522 [Ff])
523 if [ "$modelname" = "iaudiom5" ]; then
524 have_fmradio_in="#define HAVE_FMRADIO_IN"
525 echo "FM radio functions enabled"
528 [Rr])
529 if [ "$modelname" = "iriverh120" ]; then
530 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
531 have_rtc_alarm="#define HAVE_RTC_ALARM"
532 echo "RTC functions enabled (DS1339/DS3231)"
535 [Ww])
536 echo "Enabling Windows 32 cross-compiling"
537 win32crosscompile="yes"
540 if [ "$interact" ]; then
541 cont=0
542 else
543 echo "[ERROR] Option $option unsupported"
546 esac
547 if [ "$interact" ]; then
548 btype="$btype$option"
549 else
550 atype=`echo "$atype" | cut -c 2-`
551 [ "$atype" ] || cont=0
553 done
554 echo "done"
556 if [ "yes" = "$voice" ]; then
557 # Ask about languages to build
558 picklang
559 voicelanguage=`whichlang`
560 echo "Voice language set to $voicelanguage"
562 # Configure encoder and TTS engine for each language
563 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
564 voiceconfig "$thislang"
565 done
567 if [ "yes" = "$use_debug" ]; then
568 debug="-DDEBUG"
569 GCCOPTS="$GCCOPTS -g -DDEBUG"
571 if [ "yes" = "$logf" ]; then
572 use_logf="#define ROCKBOX_HAS_LOGF 1"
574 if [ "yes" = "$bootchart" ]; then
575 use_bootchart="#define DO_BOOTCHART 1"
577 if [ "yes" = "$simulator" ]; then
578 debug="-DDEBUG"
579 extradefines="$extradefines -DSIMULATOR"
580 archosrom=""
581 flash=""
583 if [ "yes" = "$profile" ]; then
584 extradefines="$extradefines -DRB_PROFILE"
585 PROFILE_OPTS="-finstrument-functions"
589 # Configure voice settings
590 voiceconfig () {
591 thislang=$1
592 if [ ! "$ARG_TTS" ]; then
593 echo "Building $thislang voice for $modelname. Select options"
594 echo ""
597 if [ -n "`findtool flite`" ]; then
598 FLITE="F(l)ite "
599 FLITE_OPTS=""
600 DEFAULT_TTS="flite"
601 DEFAULT_TTS_OPTS=$FLITE_OPTS
602 DEFAULT_NOISEFLOOR="500"
603 DEFAULT_CHOICE="L"
605 if [ -n "`findtool espeak`" ]; then
606 ESPEAK="(e)Speak "
607 ESPEAK_OPTS=""
608 DEFAULT_TTS="espeak"
609 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
610 DEFAULT_NOISEFLOOR="500"
611 DEFAULT_CHOICE="e"
613 if [ -n "`findtool festival`" ]; then
614 FESTIVAL="(F)estival "
615 case "$thislang" in
616 "italiano")
617 FESTIVAL_OPTS="--language italian"
619 "espanol")
620 FESTIVAL_OPTS="--language spanish"
622 "finnish")
623 FESTIVAL_OPTS="--language finnish"
625 "czech")
626 FESTIVAL_OPTS="--language czech"
629 FESTIVAL_OPTS=""
631 esac
632 DEFAULT_TTS="festival"
633 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
634 DEFAULT_NOISEFLOOR="500"
635 DEFAULT_CHOICE="F"
637 if [ -n "`findtool swift`" ]; then
638 SWIFT="S(w)ift "
639 SWIFT_OPTS=""
640 DEFAULT_TTS="swift"
641 DEFAULT_TTS_OPTS=$SWIFT_OPTS
642 DEFAULT_NOISEFLOOR="500"
643 DEFAULT_CHOICE="w"
645 # Allow SAPI if Windows is in use
646 if [ -n "`findtool winver`" ]; then
647 SAPI="(S)API "
648 SAPI_OPTS=""
649 DEFAULT_TTS="sapi"
650 DEFAULT_TTS_OPTS=$SAPI_OPTS
651 DEFAULT_NOISEFLOOR="500"
652 DEFAULT_CHOICE="S"
655 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
656 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
657 exit 3
660 if [ "$ARG_TTS" ]; then
661 option=$ARG_TTS
662 else
663 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
664 option=`input`
666 advopts="$advopts --tts=$option"
667 case "$option" in
668 [Ll])
669 TTS_ENGINE="flite"
670 NOISEFLOOR="500" # TODO: check this value
671 TTS_OPTS=$FLITE_OPTS
673 [Ee])
674 TTS_ENGINE="espeak"
675 NOISEFLOOR="500"
676 TTS_OPTS=$ESPEAK_OPTS
678 [Ff])
679 TTS_ENGINE="festival"
680 NOISEFLOOR="500"
681 TTS_OPTS=$FESTIVAL_OPTS
683 [Ss])
684 TTS_ENGINE="sapi"
685 NOISEFLOOR="500"
686 TTS_OPTS=$SAPI_OPTS
688 [Ww])
689 TTS_ENGINE="swift"
690 NOISEFLOOR="500"
691 TTS_OPTS=$SWIFT_OPTS
694 TTS_ENGINE=$DEFAULT_TTS
695 TTS_OPTS=$DEFAULT_TTS_OPTS
696 NOISEFLOOR=$DEFAULT_NOISEFLOOR
697 esac
698 echo "Using $TTS_ENGINE for TTS"
700 # Select which voice to use for Festival
701 if [ "$TTS_ENGINE" = "festival" ]; then
702 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
703 for voice in $voicelist; do
704 TTS_FESTIVAL_VOICE="$voice" # Default choice
705 break
706 done
707 if [ "$ARG_VOICE" ]; then
708 CHOICE=$ARG_VOICE
709 else
711 for voice in $voicelist; do
712 printf "%3d. %s\n" "$i" "$voice"
713 i=`expr $i + 1`
714 done
715 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
716 CHOICE=`input`
719 for voice in $voicelist; do
720 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
721 TTS_FESTIVAL_VOICE="$voice"
723 i=`expr $i + 1`
724 done
725 advopts="$advopts --voice=$CHOICE"
726 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
727 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
730 # Read custom tts options from command line
731 if [ "$ARG_TTSOPTS" ]; then
732 TTS_OPTS="$ARG_TTSOPTS"
733 advopts="$advopts --ttsopts='$TTS_OPTS'"
734 echo "$TTS_ENGINE options set to $TTS_OPTS"
737 if [ "$swcodec" = "yes" ]; then
738 ENCODER="rbspeexenc"
739 ENC_CMD="rbspeexenc"
740 ENC_OPTS="-q 4 -c 10"
741 else
742 if [ -n "`findtool lame`" ]; then
743 ENCODER="lame"
744 ENC_CMD="lame"
745 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
746 else
747 echo "You need LAME in the system path to build voice files for"
748 echo "HWCODEC targets."
749 exit 4
753 echo "Using $ENCODER for encoding voice clips"
755 # Read custom encoder options from command line
756 if [ "$ARG_ENCOPTS" ]; then
757 ENC_OPTS="$ARG_ENCOPTS"
758 advopts="$advopts --encopts='$ENC_OPTS'"
759 echo "$ENCODER options set to $ENC_OPTS"
762 TEMPDIR="${pwd}"
763 if [ -n "`findtool cygpath`" ]; then
764 TEMPDIR=`cygpath . -a -w`
768 picklang() {
769 # figure out which languages that are around
770 for file in $rootdir/apps/lang/*.lang; do
771 clean=`basename $file .lang`
772 langs="$langs $clean"
773 done
775 if [ "$ARG_LANG" ]; then
776 pick=$ARG_LANG
777 else
778 echo "Select a number for the language to use (default is english)"
779 # FIXME The multiple-language feature is currently broken
780 # echo "You may enter a comma-separated list of languages to build"
782 num=1
783 for one in $langs; do
784 echo "$num. $one"
785 num=`expr $num + 1`
786 done
787 pick=`input`
789 advopts="$advopts --language=$pick"
792 whichlang() {
793 output=""
794 # Allow the user to pass a comma-separated list of langauges
795 for thispick in `echo $pick | sed 's/,/ /g'`; do
796 num=1
797 for one in $langs; do
798 # Accept both the language number and name
799 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
800 if [ "$output" = "" ]; then
801 output=$one
802 else
803 output=$output,$one
806 num=`expr $num + 1`
807 done
808 done
809 if [ -z "$output" ]; then
810 # pick a default
811 output="english"
813 echo $output
816 help() {
817 echo "Rockbox configure script."
818 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
819 echo "Do *NOT* run this within the tools directory!"
820 echo ""
821 cat <<EOF
822 Usage: configure [OPTION]...
823 Options:
824 --target=TARGET Sets the target, TARGET can be either the target ID or
825 corresponding string. Run without this option to see all
826 available targets.
828 --ram=RAM Sets the RAM for certain targets. Even though any number
829 is accepted, not every number is correct. The default
830 value will be applied, if you entered a wrong number
831 (which depends on the target). Watch the output. Run
832 without this option if you are not sure which the right
833 number is.
835 --type=TYPE Sets the build type. Shortcuts are also valid.
836 Run without this option to see all available types.
837 Multiple values are allowed and managed in the input
838 order. So --type=b stands for Bootloader build, while
839 --type=ab stands for "Backlight MOD" build.
841 --language=LANG Set the language used for voice generation (used only if
842 TYPE is AV).
844 --tts=ENGINE Set the TTS engine used for voice generation (used only
845 if TYPE is AV).
847 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
848 AV).
850 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
852 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
854 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
855 This is useful for having multiple alternate builds on
856 your device that you can load with ROLO. However as the
857 bootloader looks for .rockbox you won't be able to boot
858 into this build.
860 --ccache Enable ccache use (done by default these days)
861 --no-ccache Disable ccache use
863 --eabi Make configure prefer toolchains that are able to compile
864 for the new ARM standard abi EABI
865 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
866 --thumb Build with -mthumb (for ARM builds)
867 --no-thumb The opposite of --thumb (don't use thumb even for targets
868 where this is the default
869 --prefix Target installation directory
870 --help Shows this message (must not be used with other options)
874 exit
877 ARG_CCACHE=
878 ARG_ENCOPTS=
879 ARG_LANG=
880 ARG_RAM=
881 ARG_RBDIR=
882 ARG_TARGET=
883 ARG_TTS=
884 ARG_TTSOPTS=
885 ARG_TYPE=
886 ARG_VOICE=
887 ARG_ARM_EABI=
888 ARG_ARM_THUMB=
889 err=
890 for arg in "$@"; do
891 case "$arg" in
892 --ccache) ARG_CCACHE=1;;
893 --no-ccache) ARG_CCACHE=0;;
894 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
895 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
896 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
897 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
898 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
899 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
900 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
901 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
902 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
903 --eabi) ARG_ARM_EABI=1;;
904 --no-eabi) ARG_ARM_EABI=0;;
905 --thumb) ARG_ARM_THUMB=1;;
906 --no-thumb) ARG_ARM_THUMB=0;;
907 --prefix=*) PREFIX=`echo "$arg" | cut -d = -f 2`;;
908 --help) help;;
909 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
910 esac
911 done
912 [ "$err" ] && exit 1
914 advopts=
916 if [ "$TMPDIR" != "" ]; then
917 tmpdir=$TMPDIR
918 else
919 tmpdir=/tmp
921 echo Using temporary directory $tmpdir
923 if test -r "configure"; then
924 # this is a check for a configure script in the current directory, it there
925 # is one, try to figure out if it is this one!
927 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
928 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
929 echo "It will only cause you pain and grief. Instead do this:"
930 echo ""
931 echo " cd .."
932 echo " mkdir build-dir"
933 echo " cd build-dir"
934 echo " ../tools/configure"
935 echo ""
936 echo "Much happiness will arise from this. Enjoy"
937 exit 5
941 # get our current directory
942 pwd=`pwd`;
944 if { echo $pwd | grep " "; } then
945 echo "You're running this script in a path that contains space. The build"
946 echo "system is unfortunately not clever enough to deal with this. Please"
947 echo "run the script from a different path, rename the path or fix the build"
948 echo "system!"
949 exit 6
952 if [ -z "$rootdir" ]; then
953 ##################################################################
954 # Figure out where the source code root is!
956 rootdir=`dirname $0`/../
958 #####################################################################
959 # Convert the possibly relative directory name to an absolute version
961 now=`pwd`
962 cd $rootdir
963 rootdir=`pwd`
965 # cd back to the build dir
966 cd $now
969 apps="apps"
970 appsdir='\$(ROOTDIR)/apps'
971 firmdir='\$(ROOTDIR)/firmware'
972 toolsdir='\$(ROOTDIR)/tools'
975 ##################################################################
976 # Figure out target platform
979 if [ "$ARG_TARGET" ]; then
980 buildfor=$ARG_TARGET
981 else
982 echo "Enter target platform:"
983 cat <<EOF
984 ==Archos== ==iriver== ==Apple iPod==
985 0) Player/Studio 10) H120/H140 20) Color/Photo
986 1) Recorder 11) H320/H340 21) Nano 1G
987 2) FM Recorder 12) iHP-100/110/115 22) Video
988 3) Recorder v2 13) iFP-790 23) 3G
989 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
990 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
991 6) AV300 26) Mini 2G
992 ==Toshiba== 27) 1G, 2G
993 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
994 30) X5/X5V/X5L 41) Gigabeat S
995 31) M5/M5L ==SanDisk==
996 32) 7 ==Olympus= 50) Sansa e200
997 33) D2 70) M:Robe 500 51) Sansa e200R
998 34) M3/M3L 71) M:Robe 100 52) Sansa c200
999 53) Sansa m200
1000 ==Creative== ==Philips== 54) Sansa c100
1001 90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip
1002 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2
1003 92) Zen Vision HDD1830 57) Sansa m200v4
1004 102) GoGear HDD6330 58) Sansa Fuze
1005 ==Onda== 59) Sansa c200v2
1006 120) VX747 ==Meizu== 60) Sansa Clipv2
1007 121) VX767 110) M6SL 61) Sansa View
1008 122) VX747+ 111) M6SP 62) Sansa Clip+
1009 123) VX777 112) M3 63) Sansa Fuze v2
1011 ==Logik==
1012 ==Samsung== ==Tatung== 80) DAX 1GB MP3/DAB
1013 140) YH-820 150) Elio TPJ-1022
1014 141) YH-920 ==Lyre project==
1015 142) YH-925 ==Packard Bell== 130) Lyre proto 1
1016 143) YP-S3 160) Vibe 500 131) Mini2440
1018 ==MPIO== == Application ==
1019 170) HD200 200) Application
1023 buildfor=`input`;
1026 # Set of tools built for all target platforms:
1027 toolset="rdf2binary convbdf codepages"
1029 # Toolsets for some target families:
1030 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1031 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1032 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1033 ipodbitmaptools="$toolset scramble bmp2rb"
1034 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1035 tccbitmaptools="$toolset scramble bmp2rb"
1036 # generic is used by IFP, Meizu and Onda
1037 genericbitmaptools="$toolset bmp2rb"
1038 # scramble is used by all other targets
1039 scramblebitmaptools="$genericbitmaptools scramble"
1042 # ---- For each target ----
1044 # *Variables*
1045 # target_id: a unique number identifying this target, IS NOT the menu number.
1046 # Just use the currently highest number+1 when you add a new
1047 # target.
1048 # modelname: short model name used all over to identify this target
1049 # memory: number of megabytes of RAM this target has. If the amount can
1050 # be selected by the size prompt, let memory be unset here
1051 # target: -Ddefine passed to the build commands to make the correct
1052 # config-*.h file get included etc
1053 # tool: the tool that takes a plain binary and converts that into a
1054 # working "firmware" file for your target
1055 # output: the final output file name
1056 # boottool: the tool that takes a plain binary and generates a bootloader
1057 # file for your target (or blank to use $tool)
1058 # bootoutput:the final output file name for the bootloader (or blank to use
1059 # $output)
1060 # appextra: passed to the APPEXTRA variable in the Makefiles.
1061 # TODO: add proper explanation
1062 # archosrom: used only for Archos targets that build a special flashable .ucl
1063 # image.
1064 # flash: name of output for flashing, for targets where there's a special
1065 # file output for this.
1066 # plugins: set to 'yes' to build the plugins. Early development builds can
1067 # set this to no in the early stages to have an easier life for a
1068 # while
1069 # swcodec: set 'yes' on swcodec targets
1070 # toolset: lists what particular tools in the tools/ directory that this
1071 # target needs to have built prior to building Rockbox
1073 # *Functions*
1074 # *cc: sets up gcc and compiler options for your target builds. Note
1075 # that if you select a simulator build, the compiler selection is
1076 # overridden later in the script.
1078 case $buildfor in
1080 0|archosplayer)
1081 target_id=1
1082 modelname="archosplayer"
1083 target="-DARCHOS_PLAYER"
1084 shcc
1085 tool="$rootdir/tools/scramble"
1086 output="archos.mod"
1087 appextra="player:gui"
1088 archosrom="$pwd/rombox.ucl"
1089 flash="$pwd/rockbox.ucl"
1090 plugins="yes"
1091 swcodec=""
1093 # toolset is the tools within the tools directory that we build for
1094 # this particular target.
1095 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1097 # Note: the convbdf is present in the toolset just because: 1) the
1098 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1099 # build the player simulator
1101 t_cpu="sh"
1102 t_manufacturer="archos"
1103 t_model="player"
1106 1|archosrecorder)
1107 target_id=2
1108 modelname="archosrecorder"
1109 target="-DARCHOS_RECORDER"
1110 shcc
1111 tool="$rootdir/tools/scramble"
1112 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1113 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1114 output="ajbrec.ajz"
1115 appextra="recorder:gui:radio"
1116 #archosrom="$pwd/rombox.ucl"
1117 flash="$pwd/rockbox.ucl"
1118 plugins="yes"
1119 swcodec=""
1120 # toolset is the tools within the tools directory that we build for
1121 # this particular target.
1122 toolset=$archosbitmaptools
1123 t_cpu="sh"
1124 t_manufacturer="archos"
1125 t_model="recorder"
1128 2|archosfmrecorder)
1129 target_id=3
1130 modelname="archosfmrecorder"
1131 target="-DARCHOS_FMRECORDER"
1132 shcc
1133 tool="$rootdir/tools/scramble -fm"
1134 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1135 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1136 output="ajbrec.ajz"
1137 appextra="recorder:gui:radio"
1138 #archosrom="$pwd/rombox.ucl"
1139 flash="$pwd/rockbox.ucl"
1140 plugins="yes"
1141 swcodec=""
1142 # toolset is the tools within the tools directory that we build for
1143 # this particular target.
1144 toolset=$archosbitmaptools
1145 t_cpu="sh"
1146 t_manufacturer="archos"
1147 t_model="fm_v2"
1150 3|archosrecorderv2)
1151 target_id=4
1152 modelname="archosrecorderv2"
1153 target="-DARCHOS_RECORDERV2"
1154 shcc
1155 tool="$rootdir/tools/scramble -v2"
1156 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1157 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1158 output="ajbrec.ajz"
1159 appextra="recorder:gui:radio"
1160 #archosrom="$pwd/rombox.ucl"
1161 flash="$pwd/rockbox.ucl"
1162 plugins="yes"
1163 swcodec=""
1164 # toolset is the tools within the tools directory that we build for
1165 # this particular target.
1166 toolset=$archosbitmaptools
1167 t_cpu="sh"
1168 t_manufacturer="archos"
1169 t_model="fm_v2"
1172 4|archosondiosp)
1173 target_id=7
1174 modelname="archosondiosp"
1175 target="-DARCHOS_ONDIOSP"
1176 shcc
1177 tool="$rootdir/tools/scramble -osp"
1178 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1179 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1180 output="ajbrec.ajz"
1181 appextra="recorder:gui:radio"
1182 #archosrom="$pwd/rombox.ucl"
1183 flash="$pwd/rockbox.ucl"
1184 plugins="yes"
1185 swcodec=""
1186 # toolset is the tools within the tools directory that we build for
1187 # this particular target.
1188 toolset=$archosbitmaptools
1189 t_cpu="sh"
1190 t_manufacturer="archos"
1191 t_model="ondio"
1194 5|archosondiofm)
1195 target_id=8
1196 modelname="archosondiofm"
1197 target="-DARCHOS_ONDIOFM"
1198 shcc
1199 tool="$rootdir/tools/scramble -ofm"
1200 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1201 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1202 output="ajbrec.ajz"
1203 appextra="recorder:gui:radio"
1204 #archosrom="$pwd/rombox.ucl"
1205 flash="$pwd/rockbox.ucl"
1206 plugins="yes"
1207 swcodec=""
1208 toolset=$archosbitmaptools
1209 t_cpu="sh"
1210 t_manufacturer="archos"
1211 t_model="ondio"
1214 6|archosav300)
1215 target_id=38
1216 modelname="archosav300"
1217 target="-DARCHOS_AV300"
1218 memory=16 # always
1219 arm7tdmicc
1220 tool="$rootdir/tools/scramble -mm=C"
1221 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1222 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1223 output="cjbm.ajz"
1224 appextra="recorder:gui:radio"
1225 plugins="yes"
1226 swcodec=""
1227 # toolset is the tools within the tools directory that we build for
1228 # this particular target.
1229 toolset="$toolset scramble descramble bmp2rb"
1230 # architecture, manufacturer and model for the target-tree build
1231 t_cpu="arm"
1232 t_manufacturer="archos"
1233 t_model="av300"
1236 10|iriverh120)
1237 target_id=9
1238 modelname="iriverh120"
1239 target="-DIRIVER_H120"
1240 memory=32 # always
1241 coldfirecc
1242 tool="$rootdir/tools/scramble -add=h120"
1243 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1244 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1245 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1246 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1247 output="rockbox.iriver"
1248 bootoutput="bootloader.iriver"
1249 appextra="recorder:gui:radio"
1250 flash="$pwd/rombox.iriver"
1251 plugins="yes"
1252 swcodec="yes"
1253 # toolset is the tools within the tools directory that we build for
1254 # this particular target.
1255 toolset=$iriverbitmaptools
1256 t_cpu="coldfire"
1257 t_manufacturer="iriver"
1258 t_model="h100"
1261 11|iriverh300)
1262 target_id=10
1263 modelname="iriverh300"
1264 target="-DIRIVER_H300"
1265 memory=32 # always
1266 coldfirecc
1267 tool="$rootdir/tools/scramble -add=h300"
1268 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1269 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1270 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1271 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1272 output="rockbox.iriver"
1273 appextra="recorder:gui:radio"
1274 plugins="yes"
1275 swcodec="yes"
1276 # toolset is the tools within the tools directory that we build for
1277 # this particular target.
1278 toolset=$iriverbitmaptools
1279 t_cpu="coldfire"
1280 t_manufacturer="iriver"
1281 t_model="h300"
1284 12|iriverh100)
1285 target_id=11
1286 modelname="iriverh100"
1287 target="-DIRIVER_H100"
1288 memory=16 # always
1289 coldfirecc
1290 tool="$rootdir/tools/scramble -add=h100"
1291 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1292 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1293 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1294 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1295 output="rockbox.iriver"
1296 bootoutput="bootloader.iriver"
1297 appextra="recorder:gui:radio"
1298 flash="$pwd/rombox.iriver"
1299 plugins="yes"
1300 swcodec="yes"
1301 # toolset is the tools within the tools directory that we build for
1302 # this particular target.
1303 toolset=$iriverbitmaptools
1304 t_cpu="coldfire"
1305 t_manufacturer="iriver"
1306 t_model="h100"
1309 13|iriverifp7xx)
1310 target_id=19
1311 modelname="iriverifp7xx"
1312 target="-DIRIVER_IFP7XX"
1313 memory=1
1314 arm7tdmicc short
1315 tool="cp"
1316 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1317 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1318 output="rockbox.wma"
1319 appextra="recorder:gui:radio"
1320 plugins="yes"
1321 swcodec="yes"
1322 # toolset is the tools within the tools directory that we build for
1323 # this particular target.
1324 toolset=$genericbitmaptools
1325 t_cpu="arm"
1326 t_manufacturer="pnx0101"
1327 t_model="iriver-ifp7xx"
1330 14|iriverh10)
1331 target_id=22
1332 modelname="iriverh10"
1333 target="-DIRIVER_H10"
1334 memory=32 # always
1335 arm7tdmicc
1336 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1337 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1338 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1339 output="rockbox.mi4"
1340 appextra="recorder:gui:radio"
1341 plugins="yes"
1342 swcodec="yes"
1343 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1344 bootoutput="H10_20GC.mi4"
1345 # toolset is the tools within the tools directory that we build for
1346 # this particular target.
1347 toolset=$scramblebitmaptools
1348 # architecture, manufacturer and model for the target-tree build
1349 t_cpu="arm"
1350 t_manufacturer="iriver"
1351 t_model="h10"
1354 15|iriverh10_5gb)
1355 target_id=24
1356 modelname="iriverh10_5gb"
1357 target="-DIRIVER_H10_5GB"
1358 memory=32 # always
1359 arm7tdmicc
1360 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1361 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1362 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1363 output="rockbox.mi4"
1364 appextra="recorder:gui:radio"
1365 plugins="yes"
1366 swcodec="yes"
1367 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1368 bootoutput="H10.mi4"
1369 # toolset is the tools within the tools directory that we build for
1370 # this particular target.
1371 toolset=$scramblebitmaptools
1372 # architecture, manufacturer and model for the target-tree build
1373 t_cpu="arm"
1374 t_manufacturer="iriver"
1375 t_model="h10"
1378 20|ipodcolor)
1379 target_id=13
1380 modelname="ipodcolor"
1381 target="-DIPOD_COLOR"
1382 memory=32 # always
1383 arm7tdmicc
1384 tool="$rootdir/tools/scramble -add=ipco"
1385 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1386 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1387 output="rockbox.ipod"
1388 appextra="recorder:gui:radio"
1389 plugins="yes"
1390 swcodec="yes"
1391 bootoutput="bootloader-$modelname.ipod"
1392 # toolset is the tools within the tools directory that we build for
1393 # this particular target.
1394 toolset=$ipodbitmaptools
1395 # architecture, manufacturer and model for the target-tree build
1396 t_cpu="arm"
1397 t_manufacturer="ipod"
1398 t_model="color"
1401 21|ipodnano1g)
1402 target_id=14
1403 modelname="ipodnano1g"
1404 target="-DIPOD_NANO"
1405 memory=32 # always
1406 arm7tdmicc
1407 tool="$rootdir/tools/scramble -add=nano"
1408 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1409 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1410 output="rockbox.ipod"
1411 appextra="recorder:gui:radio"
1412 plugins="yes"
1413 swcodec="yes"
1414 bootoutput="bootloader-$modelname.ipod"
1415 # toolset is the tools within the tools directory that we build for
1416 # this particular target.
1417 toolset=$ipodbitmaptools
1418 # architecture, manufacturer and model for the target-tree build
1419 t_cpu="arm"
1420 t_manufacturer="ipod"
1421 t_model="nano"
1424 22|ipodvideo)
1425 target_id=15
1426 modelname="ipodvideo"
1427 target="-DIPOD_VIDEO"
1428 arm7tdmicc
1429 tool="$rootdir/tools/scramble -add=ipvd"
1430 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1431 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1432 output="rockbox.ipod"
1433 appextra="recorder:gui:radio"
1434 plugins="yes"
1435 swcodec="yes"
1436 bootoutput="bootloader-$modelname.ipod"
1437 # toolset is the tools within the tools directory that we build for
1438 # this particular target.
1439 toolset=$ipodbitmaptools
1440 # architecture, manufacturer and model for the target-tree build
1441 t_cpu="arm"
1442 t_manufacturer="ipod"
1443 t_model="video"
1446 23|ipod3g)
1447 target_id=16
1448 modelname="ipod3g"
1449 target="-DIPOD_3G"
1450 memory=32 # always
1451 arm7tdmicc
1452 tool="$rootdir/tools/scramble -add=ip3g"
1453 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1454 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1455 output="rockbox.ipod"
1456 appextra="recorder:gui:radio"
1457 plugins="yes"
1458 swcodec="yes"
1459 bootoutput="bootloader-$modelname.ipod"
1460 # toolset is the tools within the tools directory that we build for
1461 # this particular target.
1462 toolset=$ipodbitmaptools
1463 # architecture, manufacturer and model for the target-tree build
1464 t_cpu="arm"
1465 t_manufacturer="ipod"
1466 t_model="3g"
1469 24|ipod4g)
1470 target_id=17
1471 modelname="ipod4g"
1472 target="-DIPOD_4G"
1473 memory=32 # always
1474 arm7tdmicc
1475 tool="$rootdir/tools/scramble -add=ip4g"
1476 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1477 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1478 output="rockbox.ipod"
1479 appextra="recorder:gui:radio"
1480 plugins="yes"
1481 swcodec="yes"
1482 bootoutput="bootloader-$modelname.ipod"
1483 # toolset is the tools within the tools directory that we build for
1484 # this particular target.
1485 toolset=$ipodbitmaptools
1486 # architecture, manufacturer and model for the target-tree build
1487 t_cpu="arm"
1488 t_manufacturer="ipod"
1489 t_model="4g"
1492 25|ipodmini1g)
1493 target_id=18
1494 modelname="ipodmini1g"
1495 target="-DIPOD_MINI"
1496 memory=32 # always
1497 arm7tdmicc
1498 tool="$rootdir/tools/scramble -add=mini"
1499 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1500 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1501 output="rockbox.ipod"
1502 appextra="recorder:gui:radio"
1503 plugins="yes"
1504 swcodec="yes"
1505 bootoutput="bootloader-$modelname.ipod"
1506 # toolset is the tools within the tools directory that we build for
1507 # this particular target.
1508 toolset=$ipodbitmaptools
1509 # architecture, manufacturer and model for the target-tree build
1510 t_cpu="arm"
1511 t_manufacturer="ipod"
1512 t_model="mini"
1515 26|ipodmini2g)
1516 target_id=21
1517 modelname="ipodmini2g"
1518 target="-DIPOD_MINI2G"
1519 memory=32 # always
1520 arm7tdmicc
1521 tool="$rootdir/tools/scramble -add=mn2g"
1522 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1523 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1524 output="rockbox.ipod"
1525 appextra="recorder:gui:radio"
1526 plugins="yes"
1527 swcodec="yes"
1528 bootoutput="bootloader-$modelname.ipod"
1529 # toolset is the tools within the tools directory that we build for
1530 # this particular target.
1531 toolset=$ipodbitmaptools
1532 # architecture, manufacturer and model for the target-tree build
1533 t_cpu="arm"
1534 t_manufacturer="ipod"
1535 t_model="mini2g"
1538 27|ipod1g2g)
1539 target_id=29
1540 modelname="ipod1g2g"
1541 target="-DIPOD_1G2G"
1542 memory=32 # always
1543 arm7tdmicc
1544 tool="$rootdir/tools/scramble -add=1g2g"
1545 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1546 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1547 output="rockbox.ipod"
1548 appextra="recorder:gui:radio"
1549 plugins="yes"
1550 swcodec="yes"
1551 bootoutput="bootloader-$modelname.ipod"
1552 # toolset is the tools within the tools directory that we build for
1553 # this particular target.
1554 toolset=$ipodbitmaptools
1555 # architecture, manufacturer and model for the target-tree build
1556 t_cpu="arm"
1557 t_manufacturer="ipod"
1558 t_model="1g2g"
1561 28|ipodnano2g)
1562 target_id=62
1563 modelname="ipodnano2g"
1564 target="-DIPOD_NANO2G"
1565 memory=32 # always
1566 arm940tcc
1567 tool="$rootdir/tools/scramble -add=nn2g"
1568 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1569 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1570 output="rockbox.ipod"
1571 appextra="recorder:gui:radio"
1572 plugins="yes"
1573 swcodec="yes"
1574 bootoutput="bootloader-$modelname.ipod"
1575 # toolset is the tools within the tools directory that we build for
1576 # this particular target.
1577 toolset=$ipodbitmaptools
1578 # architecture, manufacturer and model for the target-tree build
1579 t_cpu="arm"
1580 t_manufacturer="s5l8700"
1581 t_model="ipodnano2g"
1584 30|iaudiox5)
1585 target_id=12
1586 modelname="iaudiox5"
1587 target="-DIAUDIO_X5"
1588 memory=16 # always
1589 coldfirecc
1590 tool="$rootdir/tools/scramble -add=iax5"
1591 boottool="$rootdir/tools/scramble -iaudiox5"
1592 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1593 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1594 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1595 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1596 output="rockbox.iaudio"
1597 bootoutput="x5_fw.bin"
1598 appextra="recorder:gui:radio"
1599 plugins="yes"
1600 swcodec="yes"
1601 # toolset is the tools within the tools directory that we build for
1602 # this particular target.
1603 toolset="$iaudiobitmaptools"
1604 # architecture, manufacturer and model for the target-tree build
1605 t_cpu="coldfire"
1606 t_manufacturer="iaudio"
1607 t_model="x5"
1610 31|iaudiom5)
1611 target_id=28
1612 modelname="iaudiom5"
1613 target="-DIAUDIO_M5"
1614 memory=16 # always
1615 coldfirecc
1616 tool="$rootdir/tools/scramble -add=iam5"
1617 boottool="$rootdir/tools/scramble -iaudiom5"
1618 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1619 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1620 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1621 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1622 output="rockbox.iaudio"
1623 bootoutput="m5_fw.bin"
1624 appextra="recorder:gui:radio"
1625 plugins="yes"
1626 swcodec="yes"
1627 # toolset is the tools within the tools directory that we build for
1628 # this particular target.
1629 toolset="$iaudiobitmaptools"
1630 # architecture, manufacturer and model for the target-tree build
1631 t_cpu="coldfire"
1632 t_manufacturer="iaudio"
1633 t_model="m5"
1636 32|iaudio7)
1637 target_id=32
1638 modelname="iaudio7"
1639 target="-DIAUDIO_7"
1640 memory=16 # always
1641 arm946cc
1642 tool="$rootdir/tools/scramble -add=i7"
1643 boottool="$rootdir/tools/scramble -tcc=crc"
1644 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1645 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1646 output="rockbox.iaudio"
1647 appextra="recorder:gui:radio"
1648 plugins="yes"
1649 swcodec="yes"
1650 bootoutput="I7_FW.BIN"
1651 # toolset is the tools within the tools directory that we build for
1652 # this particular target.
1653 toolset="$tccbitmaptools"
1654 # architecture, manufacturer and model for the target-tree build
1655 t_cpu="arm"
1656 t_manufacturer="tcc77x"
1657 t_model="iaudio7"
1660 33|cowond2)
1661 target_id=34
1662 modelname="cowond2"
1663 target="-DCOWON_D2"
1664 memory=32
1665 arm926ejscc
1666 tool="$rootdir/tools/scramble -add=d2"
1667 boottool="cp "
1668 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1669 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1670 output="rockbox.d2"
1671 bootoutput="bootloader-cowond2.bin"
1672 appextra="recorder:gui:radio"
1673 plugins="yes"
1674 swcodec="yes"
1675 toolset="$tccbitmaptools"
1676 # architecture, manufacturer and model for the target-tree build
1677 t_cpu="arm"
1678 t_manufacturer="tcc780x"
1679 t_model="cowond2"
1682 34|iaudiom3)
1683 target_id=37
1684 modelname="iaudiom3"
1685 target="-DIAUDIO_M3"
1686 memory=16 # always
1687 coldfirecc
1688 tool="$rootdir/tools/scramble -add=iam3"
1689 boottool="$rootdir/tools/scramble -iaudiom3"
1690 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1691 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1692 output="rockbox.iaudio"
1693 bootoutput="cowon_m3.bin"
1694 appextra="recorder:gui:radio"
1695 plugins="yes"
1696 swcodec="yes"
1697 # toolset is the tools within the tools directory that we build for
1698 # this particular target.
1699 toolset="$iaudiobitmaptools"
1700 # architecture, manufacturer and model for the target-tree build
1701 t_cpu="coldfire"
1702 t_manufacturer="iaudio"
1703 t_model="m3"
1706 40|gigabeatfx)
1707 target_id=20
1708 modelname="gigabeatfx"
1709 target="-DGIGABEAT_F"
1710 memory=32 # always
1711 arm9tdmicc
1712 tool="$rootdir/tools/scramble -add=giga"
1713 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1714 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1715 output="rockbox.gigabeat"
1716 appextra="recorder:gui:radio"
1717 plugins="yes"
1718 swcodec="yes"
1719 toolset=$gigabeatbitmaptools
1720 boottool="$rootdir/tools/scramble -gigabeat"
1721 bootoutput="FWIMG01.DAT"
1722 # architecture, manufacturer and model for the target-tree build
1723 t_cpu="arm"
1724 t_manufacturer="s3c2440"
1725 t_model="gigabeat-fx"
1728 41|gigabeats)
1729 target_id=26
1730 modelname="gigabeats"
1731 target="-DGIGABEAT_S"
1732 memory=64
1733 arm1136jfscc
1734 tool="$rootdir/tools/scramble -add=gigs"
1735 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1736 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1737 output="rockbox.gigabeat"
1738 appextra="recorder:gui:radio"
1739 plugins="yes"
1740 swcodec="yes"
1741 toolset="$gigabeatbitmaptools"
1742 boottool="$rootdir/tools/scramble -gigabeats"
1743 bootoutput="nk.bin"
1744 # architecture, manufacturer and model for the target-tree build
1745 t_cpu="arm"
1746 t_manufacturer="imx31"
1747 t_model="gigabeat-s"
1750 70|mrobe500)
1751 target_id=36
1752 modelname="mrobe500"
1753 target="-DMROBE_500"
1754 memory=64 # always
1755 arm926ejscc
1756 tool="$rootdir/tools/scramble -add=m500"
1757 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1758 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1759 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1760 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1761 output="rockbox.mrobe500"
1762 appextra="recorder:gui:radio"
1763 plugins="yes"
1764 swcodec="yes"
1765 toolset=$gigabeatbitmaptools
1766 boottool="cp "
1767 bootoutput="rockbox.mrboot"
1768 # architecture, manufacturer and model for the target-tree build
1769 t_cpu="arm"
1770 t_manufacturer="tms320dm320"
1771 t_model="mrobe-500"
1774 71|mrobe100)
1775 target_id=33
1776 modelname="mrobe100"
1777 target="-DMROBE_100"
1778 memory=32 # always
1779 arm7tdmicc
1780 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1781 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1782 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1783 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1784 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1785 output="rockbox.mi4"
1786 appextra="recorder:gui:radio"
1787 plugins="yes"
1788 swcodec="yes"
1789 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1790 bootoutput="pp5020.mi4"
1791 # toolset is the tools within the tools directory that we build for
1792 # this particular target.
1793 toolset=$scramblebitmaptools
1794 # architecture, manufacturer and model for the target-tree build
1795 t_cpu="arm"
1796 t_manufacturer="olympus"
1797 t_model="mrobe-100"
1800 80|logikdax)
1801 target_id=31
1802 modelname="logikdax"
1803 target="-DLOGIK_DAX"
1804 memory=2 # always
1805 arm946cc
1806 tool="$rootdir/tools/scramble -add=ldax"
1807 boottool="$rootdir/tools/scramble -tcc=crc"
1808 bootoutput="player.rom"
1809 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1810 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1811 output="rockbox.logik"
1812 appextra="recorder:gui:radio"
1813 plugins=""
1814 swcodec="yes"
1815 # toolset is the tools within the tools directory that we build for
1816 # this particular target.
1817 toolset=$tccbitmaptools
1818 # architecture, manufacturer and model for the target-tree build
1819 t_cpu="arm"
1820 t_manufacturer="tcc77x"
1821 t_model="logikdax"
1824 90|zenvisionm30gb)
1825 target_id=35
1826 modelname="zenvisionm30gb"
1827 target="-DCREATIVE_ZVM"
1828 memory=64
1829 arm926ejscc
1830 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1831 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1832 tool="$rootdir/tools/scramble -creative=zvm"
1833 USE_ELF="yes"
1834 output="rockbox.zvm"
1835 appextra="recorder:gui:radio"
1836 plugins="yes"
1837 swcodec="yes"
1838 toolset=$ipodbitmaptools
1839 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1840 bootoutput="rockbox.zvmboot"
1841 # architecture, manufacturer and model for the target-tree build
1842 t_cpu="arm"
1843 t_manufacturer="tms320dm320"
1844 t_model="creative-zvm"
1847 91|zenvisionm60gb)
1848 target_id=40
1849 modelname="zenvisionm60gb"
1850 target="-DCREATIVE_ZVM60GB"
1851 memory=64
1852 arm926ejscc
1853 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1854 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1855 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1856 USE_ELF="yes"
1857 output="rockbox.zvm60"
1858 appextra="recorder:gui:radio"
1859 plugins="yes"
1860 swcodec="yes"
1861 toolset=$ipodbitmaptools
1862 boottool="$rootdir/tools/scramble -creative=zvm60"
1863 bootoutput="rockbox.zvm60boot"
1864 # architecture, manufacturer and model for the target-tree build
1865 t_cpu="arm"
1866 t_manufacturer="tms320dm320"
1867 t_model="creative-zvm"
1870 92|zenvision)
1871 target_id=39
1872 modelname="zenvision"
1873 target="-DCREATIVE_ZV"
1874 memory=64
1875 arm926ejscc
1876 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1877 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1878 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1879 USE_ELF="yes"
1880 output="rockbox.zv"
1881 appextra="recorder:gui:radio"
1882 plugins=""
1883 swcodec="yes"
1884 toolset=$ipodbitmaptools
1885 boottool="$rootdir/tools/scramble -creative=zenvision"
1886 bootoutput="rockbox.zvboot"
1887 # architecture, manufacturer and model for the target-tree build
1888 t_cpu="arm"
1889 t_manufacturer="tms320dm320"
1890 t_model="creative-zvm"
1893 50|sansae200)
1894 target_id=23
1895 modelname="sansae200"
1896 target="-DSANSA_E200"
1897 memory=32 # supposedly
1898 arm7tdmicc
1899 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1900 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1901 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1902 output="rockbox.mi4"
1903 appextra="recorder:gui:radio"
1904 plugins="yes"
1905 swcodec="yes"
1906 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1907 bootoutput="PP5022.mi4"
1908 # toolset is the tools within the tools directory that we build for
1909 # this particular target.
1910 toolset=$scramblebitmaptools
1911 # architecture, manufacturer and model for the target-tree build
1912 t_cpu="arm"
1913 t_manufacturer="sandisk"
1914 t_model="sansa-e200"
1917 51|sansae200r)
1918 # the e200R model is pretty much identical to the e200, it only has a
1919 # different option to the scramble tool when building a bootloader and
1920 # makes the bootloader output file name in all lower case.
1921 target_id=27
1922 modelname="sansae200r"
1923 target="-DSANSA_E200"
1924 memory=32 # supposedly
1925 arm7tdmicc
1926 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1927 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1928 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1929 output="rockbox.mi4"
1930 appextra="recorder:gui:radio"
1931 plugins="yes"
1932 swcodec="yes"
1933 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1934 bootoutput="pp5022.mi4"
1935 # toolset is the tools within the tools directory that we build for
1936 # this particular target.
1937 toolset=$scramblebitmaptools
1938 # architecture, manufacturer and model for the target-tree build
1939 t_cpu="arm"
1940 t_manufacturer="sandisk"
1941 t_model="sansa-e200"
1944 52|sansac200)
1945 target_id=30
1946 modelname="sansac200"
1947 target="-DSANSA_C200"
1948 memory=32 # supposedly
1949 arm7tdmicc
1950 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1951 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1952 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1953 output="rockbox.mi4"
1954 appextra="recorder:gui:radio"
1955 plugins="yes"
1956 swcodec="yes"
1957 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1958 bootoutput="firmware.mi4"
1959 # toolset is the tools within the tools directory that we build for
1960 # this particular target.
1961 toolset=$scramblebitmaptools
1962 # architecture, manufacturer and model for the target-tree build
1963 t_cpu="arm"
1964 t_manufacturer="sandisk"
1965 t_model="sansa-c200"
1968 53|sansam200)
1969 target_id=48
1970 modelname="sansam200"
1971 target="-DSANSA_M200"
1972 memory=1 # always
1973 arm946cc
1974 tool="$rootdir/tools/scramble -add=m200"
1975 boottool="$rootdir/tools/scramble -tcc=crc"
1976 bootoutput="player.rom"
1977 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1978 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1979 output="rockbox.m200"
1980 appextra="recorder:gui:radio"
1981 plugins=""
1982 swcodec="yes"
1983 # toolset is the tools within the tools directory that we build for
1984 # this particular target.
1985 toolset=$tccbitmaptools
1986 # architecture, manufacturer and model for the target-tree build
1987 t_cpu="arm"
1988 t_manufacturer="tcc77x"
1989 t_model="m200"
1992 54|sansac100)
1993 target_id=42
1994 modelname="sansac100"
1995 target="-DSANSA_C100"
1996 memory=2
1997 arm946cc
1998 tool="$rootdir/tools/scramble -add=c100"
1999 boottool="$rootdir/tools/scramble -tcc=crc"
2000 bootoutput="player.rom"
2001 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2002 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2003 output="rockbox.c100"
2004 appextra="recorder:gui:radio"
2005 plugins=""
2006 swcodec="yes"
2007 # toolset is the tools within the tools directory that we build for
2008 # this particular target.
2009 toolset=$tccbitmaptools
2010 # architecture, manufacturer and model for the target-tree build
2011 t_cpu="arm"
2012 t_manufacturer="tcc77x"
2013 t_model="c100"
2016 55|sansaclip)
2017 target_id=50
2018 modelname="sansaclip"
2019 target="-DSANSA_CLIP"
2020 memory=2
2021 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2022 bmp2rb_native="$bmp2rb_mono"
2023 tool="$rootdir/tools/scramble -add=clip"
2024 output="rockbox.sansa"
2025 bootoutput="bootloader-clip.sansa"
2026 appextra="recorder:gui:radio"
2027 plugins="yes"
2028 swcodec="yes"
2029 toolset=$scramblebitmaptools
2030 t_cpu="arm"
2031 t_manufacturer="as3525"
2032 t_model="sansa-clip"
2033 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2034 arm9tdmicc
2035 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2039 56|sansae200v2)
2040 target_id=51
2041 modelname="sansae200v2"
2042 target="-DSANSA_E200V2"
2043 memory=8
2044 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2045 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2046 tool="$rootdir/tools/scramble -add=e2v2"
2047 output="rockbox.sansa"
2048 bootoutput="bootloader-e200v2.sansa"
2049 appextra="recorder:gui:radio"
2050 plugins="yes"
2051 swcodec="yes"
2052 toolset=$scramblebitmaptools
2053 t_cpu="arm"
2054 t_manufacturer="as3525"
2055 t_model="sansa-e200v2"
2056 arm9tdmicc
2060 57|sansam200v4)
2061 target_id=52
2062 modelname="sansam200v4"
2063 target="-DSANSA_M200V4"
2064 memory=2
2065 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2066 bmp2rb_native="$bmp2rb_mono"
2067 tool="$rootdir/tools/scramble -add=m2v4"
2068 output="rockbox.sansa"
2069 bootoutput="bootloader-m200v4.sansa"
2070 appextra="recorder:gui:radio"
2071 plugins="yes"
2072 swcodec="yes"
2073 toolset=$scramblebitmaptools
2074 t_cpu="arm"
2075 t_manufacturer="as3525"
2076 t_model="sansa-m200v4"
2077 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2078 arm9tdmicc
2079 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2083 58|sansafuze)
2084 target_id=53
2085 modelname="sansafuze"
2086 target="-DSANSA_FUZE"
2087 memory=8
2088 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2089 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2090 tool="$rootdir/tools/scramble -add=fuze"
2091 output="rockbox.sansa"
2092 bootoutput="bootloader-fuze.sansa"
2093 appextra="recorder:gui:radio"
2094 plugins="yes"
2095 swcodec="yes"
2096 toolset=$scramblebitmaptools
2097 t_cpu="arm"
2098 t_manufacturer="as3525"
2099 t_model="sansa-fuze"
2100 arm9tdmicc
2104 59|sansac200v2)
2105 target_id=55
2106 modelname="sansac200v2"
2107 target="-DSANSA_C200V2"
2108 memory=2 # as per OF diagnosis mode
2109 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2110 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2111 tool="$rootdir/tools/scramble -add=c2v2"
2112 output="rockbox.sansa"
2113 bootoutput="bootloader-c200v2.sansa"
2114 appextra="recorder:gui:radio"
2115 plugins="yes"
2116 swcodec="yes"
2117 # toolset is the tools within the tools directory that we build for
2118 # this particular target.
2119 toolset=$scramblebitmaptools
2120 # architecture, manufacturer and model for the target-tree build
2121 t_cpu="arm"
2122 t_manufacturer="as3525"
2123 t_model="sansa-c200v2"
2124 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2125 arm9tdmicc
2126 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2129 60|sansaclipv2)
2130 target_id=60
2131 modelname="sansaclipv2"
2132 target="-DSANSA_CLIPV2"
2133 memory=8
2134 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2135 bmp2rb_native="$bmp2rb_mono"
2136 tool="$rootdir/tools/scramble -add=clv2"
2137 output="rockbox.sansa"
2138 bootoutput="bootloader-clipv2.sansa"
2139 appextra="recorder:gui:radio"
2140 plugins="yes"
2141 swcodec="yes"
2142 toolset=$scramblebitmaptools
2143 t_cpu="arm"
2144 t_manufacturer="as3525"
2145 t_model="sansa-clipv2"
2146 arm926ejscc
2149 61|sansaview)
2150 echo "Sansa View is not yet supported!"
2151 exit 1
2152 target_id=63
2153 modelname="sansaview"
2154 target="-DSANSA_VIEW"
2155 memory=32
2156 arm1176jzscc
2157 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2158 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2159 output="rockbox.mi4"
2160 appextra="gui"
2161 plugins=""
2162 swcodec="yes"
2163 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2164 bootoutput="firmware.mi4"
2165 # toolset is the tools within the tools directory that we build for
2166 # this particular target.
2167 toolset=$scramblebitmaptools
2168 t_cpu="arm"
2169 t_manufacturer="sandisk"
2170 t_model="sansa-view"
2173 62|sansaclipplus)
2174 target_id=66
2175 modelname="sansaclipplus"
2176 target="-DSANSA_CLIPPLUS"
2177 memory=8
2178 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2179 bmp2rb_native="$bmp2rb_mono"
2180 tool="$rootdir/tools/scramble -add=cli+"
2181 output="rockbox.sansa"
2182 bootoutput="bootloader-clipplus.sansa"
2183 appextra="recorder:gui:radio"
2184 plugins="yes"
2185 swcodec="yes"
2186 toolset=$scramblebitmaptools
2187 t_cpu="arm"
2188 t_manufacturer="as3525"
2189 t_model="sansa-clipplus"
2190 arm926ejscc
2193 63|sansafuzev2)
2194 target_id=68
2195 modelname="sansafuzev2"
2196 target="-DSANSA_FUZEV2"
2197 memory=8 # not sure
2198 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2199 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2200 tool="$rootdir/tools/scramble -add=fuz2"
2201 output="rockbox.sansa"
2202 bootoutput="bootloader-fuzev2.sansa"
2203 appextra="recorder:gui:radio"
2204 plugins="yes"
2205 swcodec="yes"
2206 toolset=$scramblebitmaptools
2207 t_cpu="arm"
2208 t_manufacturer="as3525"
2209 t_model="sansa-fuzev2"
2210 arm926ejscc
2213 150|tatungtpj1022)
2214 target_id=25
2215 modelname="tatungtpj1022"
2216 target="-DTATUNG_TPJ1022"
2217 memory=32 # always
2218 arm7tdmicc
2219 tool="$rootdir/tools/scramble -add tpj2"
2220 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2221 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2222 output="rockbox.elio"
2223 appextra="recorder:gui:radio"
2224 plugins="yes"
2225 swcodec="yes"
2226 boottool="$rootdir/tools/scramble -mi4v2"
2227 bootoutput="pp5020.mi4"
2228 # toolset is the tools within the tools directory that we build for
2229 # this particular target.
2230 toolset=$scramblebitmaptools
2231 # architecture, manufacturer and model for the target-tree build
2232 t_cpu="arm"
2233 t_manufacturer="tatung"
2234 t_model="tpj1022"
2237 100|gogearsa9200)
2238 target_id=41
2239 modelname="gogearsa9200"
2240 target="-DPHILIPS_SA9200"
2241 memory=32 # supposedly
2242 arm7tdmicc
2243 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2244 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2245 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2246 output="rockbox.mi4"
2247 appextra="recorder:gui:radio"
2248 plugins=""
2249 swcodec="yes"
2250 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2251 bootoutput="FWImage.ebn"
2252 # toolset is the tools within the tools directory that we build for
2253 # this particular target.
2254 toolset=$scramblebitmaptools
2255 # architecture, manufacturer and model for the target-tree build
2256 t_cpu="arm"
2257 t_manufacturer="philips"
2258 t_model="sa9200"
2261 101|gogearhdd1630)
2262 target_id=43
2263 modelname="gogearhdd1630"
2264 target="-DPHILIPS_HDD1630"
2265 memory=32 # supposedly
2266 arm7tdmicc
2267 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2268 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2269 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2270 output="rockbox.mi4"
2271 appextra="recorder:gui:radio"
2272 plugins="yes"
2273 swcodec="yes"
2274 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2275 bootoutput="FWImage.ebn"
2276 # toolset is the tools within the tools directory that we build for
2277 # this particular target.
2278 toolset=$scramblebitmaptools
2279 # architecture, manufacturer and model for the target-tree build
2280 t_cpu="arm"
2281 t_manufacturer="philips"
2282 t_model="hdd1630"
2285 102|gogearhdd6330)
2286 target_id=65
2287 modelname="gogearhdd6330"
2288 target="-DPHILIPS_HDD6330"
2289 memory=64 # always
2290 arm7tdmicc
2291 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2292 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2293 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2294 output="rockbox.mi4"
2295 appextra="recorder:gui:radio"
2296 plugins=""
2297 swcodec="yes"
2298 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2299 bootoutput="FWImage.ebn"
2300 # toolset is the tools within the tools directory that we build for
2301 # this particular target.
2302 toolset=$scramblebitmaptools
2303 # architecture, manufacturer and model for the target-tree build
2304 t_cpu="arm"
2305 t_manufacturer="philips"
2306 t_model="hdd6330"
2309 110|meizum6sl)
2310 target_id=49
2311 modelname="meizum6sl"
2312 target="-DMEIZU_M6SL"
2313 memory=16 # always
2314 arm940tbecc
2315 tool="cp"
2316 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2317 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2318 output="rockbox.meizu"
2319 appextra="recorder:gui:radio"
2320 plugins="no" #FIXME
2321 swcodec="yes"
2322 toolset=$genericbitmaptools
2323 boottool="cp"
2324 bootoutput="rockboot.ebn"
2325 # architecture, manufacturer and model for the target-tree build
2326 t_cpu="arm"
2327 t_manufacturer="s5l8700"
2328 t_model="meizu-m6sl"
2331 111|meizum6sp)
2332 target_id=46
2333 modelname="meizum6sp"
2334 target="-DMEIZU_M6SP"
2335 memory=16 # always
2336 arm940tbecc
2337 tool="cp"
2338 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2339 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2340 output="rockbox.meizu"
2341 appextra="recorder:gui:radio"
2342 plugins="no" #FIXME
2343 swcodec="yes"
2344 toolset=$genericbitmaptools
2345 boottool="cp"
2346 bootoutput="rockboot.ebn"
2347 # architecture, manufacturer and model for the target-tree build
2348 t_cpu="arm"
2349 t_manufacturer="s5l8700"
2350 t_model="meizu-m6sp"
2353 112|meizum3)
2354 target_id=47
2355 modelname="meizum3"
2356 target="-DMEIZU_M3"
2357 memory=16 # always
2358 arm940tbecc
2359 tool="cp"
2360 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2361 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2362 output="rockbox.meizu"
2363 appextra="recorder:gui:radio"
2364 plugins="no" #FIXME
2365 swcodec="yes"
2366 toolset=$genericbitmaptools
2367 boottool="cp"
2368 bootoutput="rockboot.ebn"
2369 # architecture, manufacturer and model for the target-tree build
2370 t_cpu="arm"
2371 t_manufacturer="s5l8700"
2372 t_model="meizu-m3"
2375 120|ondavx747)
2376 target_id=45
2377 modelname="ondavx747"
2378 target="-DONDA_VX747"
2379 memory=16
2380 mipselcc
2381 tool="$rootdir/tools/scramble -add=x747"
2382 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2383 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2384 output="rockbox.vx747"
2385 appextra="recorder:gui:radio"
2386 plugins="yes"
2387 swcodec="yes"
2388 toolset=$genericbitmaptools
2389 boottool="$rootdir/tools/scramble -ccpmp"
2390 bootoutput="ccpmp.bin"
2391 # architecture, manufacturer and model for the target-tree build
2392 t_cpu="mips"
2393 t_manufacturer="ingenic_jz47xx"
2394 t_model="onda_vx747"
2397 121|ondavx767)
2398 target_id=64
2399 modelname="ondavx767"
2400 target="-DONDA_VX767"
2401 memory=16 #FIXME
2402 mipselcc
2403 tool="cp"
2404 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2405 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2406 output="rockbox.vx767"
2407 appextra="recorder:gui:radio"
2408 plugins="" #FIXME
2409 swcodec="yes"
2410 toolset=$genericbitmaptools
2411 boottool="$rootdir/tools/scramble -ccpmp"
2412 bootoutput="ccpmp.bin"
2413 # architecture, manufacturer and model for the target-tree build
2414 t_cpu="mips"
2415 t_manufacturer="ingenic_jz47xx"
2416 t_model="onda_vx767"
2419 122|ondavx747p)
2420 target_id=54
2421 modelname="ondavx747p"
2422 target="-DONDA_VX747P"
2423 memory=16
2424 mipselcc
2425 tool="$rootdir/tools/scramble -add=747p"
2426 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2427 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2428 output="rockbox.vx747p"
2429 appextra="recorder:gui:radio"
2430 plugins="yes"
2431 swcodec="yes"
2432 toolset=$genericbitmaptools
2433 boottool="$rootdir/tools/scramble -ccpmp"
2434 bootoutput="ccpmp.bin"
2435 # architecture, manufacturer and model for the target-tree build
2436 t_cpu="mips"
2437 t_manufacturer="ingenic_jz47xx"
2438 t_model="onda_vx747"
2441 123|ondavx777)
2442 target_id=61
2443 modelname="ondavx777"
2444 target="-DONDA_VX777"
2445 memory=16
2446 mipselcc
2447 tool="$rootdir/tools/scramble -add=x777"
2448 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2449 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2450 output="rockbox.vx777"
2451 appextra="recorder:gui:radio"
2452 plugins="yes"
2453 swcodec="yes"
2454 toolset=$genericbitmaptools
2455 boottool="$rootdir/tools/scramble -ccpmp"
2456 bootoutput="ccpmp.bin"
2457 # architecture, manufacturer and model for the target-tree build
2458 t_cpu="mips"
2459 t_manufacturer="ingenic_jz47xx"
2460 t_model="onda_vx747"
2463 130|lyreproto1)
2464 target_id=56
2465 modelname="lyreproto1"
2466 target="-DLYRE_PROTO1"
2467 memory=64
2468 arm926ejscc
2469 tool="cp"
2470 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2471 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2472 output="rockbox.lyre"
2473 appextra="recorder:gui:radio"
2474 plugins=""
2475 swcodec="yes"
2476 toolset=$scramblebitmaptools
2477 boottool="cp"
2478 bootoutput="bootloader-proto1.lyre"
2479 # architecture, manufacturer and model for the target-tree build
2480 t_cpu="arm"
2481 t_manufacturer="at91sam"
2482 t_model="lyre_proto1"
2485 131|mini2440)
2486 target_id=99
2487 modelname="mini2440"
2488 target="-DMINI2440"
2489 memory=64
2490 arm9tdmicc
2491 tool="$rootdir/tools/scramble -add=m244"
2492 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2493 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2494 output="rockbox.mini2440"
2495 appextra="recorder:gui:radio"
2496 plugins=""
2497 swcodec="yes"
2498 toolset=$scramblebitmaptools
2499 boottool="cp"
2500 bootoutput="bootloader-mini2440.lyre"
2501 # architecture, manufacturer and model for the target-tree build
2502 t_cpu="arm"
2503 t_manufacturer="s3c2440"
2504 t_model="mini2440"
2507 140|samsungyh820)
2508 target_id=57
2509 modelname="samsungyh820"
2510 target="-DSAMSUNG_YH820"
2511 memory=32 # always
2512 arm7tdmicc
2513 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2514 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2515 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2516 output="rockbox.mi4"
2517 appextra="recorder:gui:radio"
2518 plugins="yes"
2519 swcodec="yes"
2520 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2521 bootoutput="FW_YH820.mi4"
2522 # toolset is the tools within the tools directory that we build for
2523 # this particular target.
2524 toolset=$scramblebitmaptools
2525 # architecture, manufacturer and model for the target-tree build
2526 t_cpu="arm"
2527 t_manufacturer="samsung"
2528 t_model="yh820"
2531 141|samsungyh920)
2532 target_id=58
2533 modelname="samsungyh920"
2534 target="-DSAMSUNG_YH920"
2535 memory=32 # always
2536 arm7tdmicc
2537 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2538 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2539 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2540 output="rockbox.mi4"
2541 appextra="recorder:gui:radio"
2542 plugins="yes"
2543 swcodec="yes"
2544 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2545 bootoutput="PP5020.mi4"
2546 # toolset is the tools within the tools directory that we build for
2547 # this particular target.
2548 toolset=$scramblebitmaptools
2549 # architecture, manufacturer and model for the target-tree build
2550 t_cpu="arm"
2551 t_manufacturer="samsung"
2552 t_model="yh920"
2555 142|samsungyh925)
2556 target_id=59
2557 modelname="samsungyh925"
2558 target="-DSAMSUNG_YH925"
2559 memory=32 # always
2560 arm7tdmicc
2561 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2562 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2563 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2564 output="rockbox.mi4"
2565 appextra="recorder:gui:radio"
2566 plugins="yes"
2567 swcodec="yes"
2568 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2569 bootoutput="FW_YH925.mi4"
2570 # toolset is the tools within the tools directory that we build for
2571 # this particular target.
2572 toolset=$scramblebitmaptools
2573 # architecture, manufacturer and model for the target-tree build
2574 t_cpu="arm"
2575 t_manufacturer="samsung"
2576 t_model="yh925"
2579 143|samsungyps3)
2580 target_id=60
2581 modelname="samsungyps3"
2582 target="-DSAMSUNG_YPS3"
2583 memory=16 # always
2584 arm940tbecc
2585 tool="cp"
2586 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2587 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2588 output="rockbox.yps3"
2589 appextra="recorder:gui:radio"
2590 plugins="no" #FIXME
2591 swcodec="yes"
2592 toolset=$genericbitmaptools
2593 boottool="cp"
2594 bootoutput="rockboot.ebn"
2595 # architecture, manufacturer and model for the target-tree build
2596 t_cpu="arm"
2597 t_manufacturer="s5l8700"
2598 t_model="yps3"
2601 160|vibe500)
2602 target_id=67
2603 modelname="vibe500"
2604 target="-DPBELL_VIBE500"
2605 memory=32 # always
2606 arm7tdmicc
2607 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2608 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2609 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2610 output="rockbox.mi4"
2611 appextra="recorder:gui:radio"
2612 plugins="yes"
2613 swcodec="yes"
2614 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2615 bootoutput="jukebox.mi4"
2616 # toolset is the tools within the tools directory that we build for
2617 # this particular target.
2618 toolset=$scramblebitmaptools
2619 # architecture, manufacturer and model for the target-tree build
2620 t_cpu="arm"
2621 t_manufacturer="pbell"
2622 t_model="vibe500"
2625 170|hd200)
2626 target_id=69
2627 modelname="mpiohd200"
2628 target="-DMPIO_HD200"
2629 memory=16 # always
2630 coldfirecc
2631 tool="$rootdir/tools/scramble -add=hd20"
2632 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2633 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2634 output="rockbox.mpio"
2635 bootoutput="bootloader.mpio"
2636 appextra="recorder:gui:radio"
2637 plugins="yes"
2638 swcodec="yes"
2639 # toolset is the tools within the tools directory that we build for
2640 # this particular target.
2641 toolset="$genericbitmaptools"
2642 # architecture, manufacturer and model for the target-tree build
2643 t_cpu="coldfire"
2644 t_manufacturer="mpio"
2645 t_model="hd200"
2648 200|app*)
2649 target_id=100
2650 modelname="application"
2651 target="-DAPPLICATION"
2653 if [ -z "$PREFIX" ]; then
2654 rbdir="/usr/local/share/rockbox"
2655 ROCKBOX_BINARY_PATH="/usr/local/bin"
2656 ROCKBOX_LIBRARY_PATH="/usr/local/lib"
2657 else
2658 rbdir=`realpath $PREFIX/share/rockbox`
2659 ROCKBOX_BINARY_PATH="$PREFIX/bin"
2660 ROCKBOX_LIBRARY_PATH="$PREFIX/lib"
2662 need_full_path="yes"
2664 app_get_platform
2666 memory=8
2667 uname=`uname`
2669 appcc "$app_platform"
2671 tool="cp "
2672 boottool="cp "
2673 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2674 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2675 output="rockbox"
2676 bootoutput="librockbox.so"
2677 appextra="recorder:gui:radio"
2678 plugins=""
2679 swcodec="yes"
2680 # architecture, manufacturer and model for the target-tree build
2681 t_cpu="hosted"
2682 t_manufacturer="$app_platform"
2683 t_model="app"
2687 echo "Please select a supported target platform!"
2688 exit 7
2691 esac
2693 echo "Platform set to $modelname"
2696 #remove start
2697 ############################################################################
2698 # Amount of memory, for those that can differ. They have $memory unset at
2699 # this point.
2702 if [ -z "$memory" ]; then
2703 case $target_id in
2705 if [ "$ARG_RAM" ]; then
2706 size=$ARG_RAM
2707 else
2708 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2709 size=`input`;
2711 case $size in
2712 60|64)
2713 memory="64"
2716 memory="32"
2718 esac
2721 if [ "$ARG_RAM" ]; then
2722 size=$ARG_RAM
2723 else
2724 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2725 size=`input`;
2727 case $size in
2729 memory="8"
2732 memory="2"
2734 esac
2736 esac
2737 echo "Memory size selected: $memory MB"
2738 [ "$ARG_TYPE" ] || echo ""
2740 #remove end
2742 ##################################################################
2743 # Figure out build "type"
2746 # the ifp7x0 is the only platform that supports building a gdb stub like
2747 # this
2748 case $modelname in
2749 iriverifp7xx)
2750 gdbstub="(G)DB stub, "
2752 sansae200r|sansae200)
2753 gdbstub="(I)nstaller, "
2755 sansac200)
2756 gdbstub="(E)raser, "
2760 esac
2761 if [ "$ARG_TYPE" ]; then
2762 btype=$ARG_TYPE
2763 else
2764 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2765 btype=`input`;
2768 case $btype in
2769 [Ii])
2770 appsdir='\$(ROOTDIR)/bootloader'
2771 apps="bootloader"
2772 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2773 bootloader="1"
2774 echo "e200R-installer build selected"
2776 [Ee])
2777 appsdir='\$(ROOTDIR)/bootloader'
2778 apps="bootloader"
2779 echo "C2(4)0 or C2(5)0"
2780 variant=`input`
2781 case $variant in
2783 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2784 echo "c240 eraser build selected"
2787 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2788 echo "c240 eraser build selected"
2790 esac
2791 bootloader="1"
2792 echo "c200 eraser build selected"
2794 [Bb])
2795 if test $t_manufacturer = "archos"; then
2796 # Archos SH-based players do this somewhat differently for
2797 # some reason
2798 appsdir='\$(ROOTDIR)/flash/bootbox'
2799 apps="bootbox"
2800 else
2801 appsdir='\$(ROOTDIR)/bootloader'
2802 apps="bootloader"
2803 flash=""
2804 if test -n "$boottool"; then
2805 tool="$boottool"
2807 if test -n "$bootoutput"; then
2808 output=$bootoutput
2811 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
2812 bootloader="1"
2813 echo "Bootloader build selected"
2815 [Ss])
2816 if [ "$modelname" = "sansae200r" ]; then
2817 echo "Do not use the e200R target for simulator builds. Use e200 instead."
2818 exit 8
2820 debug="-DDEBUG"
2821 simulator="yes"
2822 extradefines="$extradefines -DSIMULATOR"
2823 archosrom=""
2824 flash=""
2825 echo "Simulator build selected"
2827 [Aa]*)
2828 echo "Advanced build selected"
2829 whichadvanced $btype
2831 [Gg])
2832 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
2833 appsdir='\$(ROOTDIR)/gdb'
2834 apps="stub"
2835 case $modelname in
2836 iriverifp7xx)
2837 output="stub.wma"
2841 esac
2842 echo "GDB stub build selected"
2844 [Mm])
2845 toolset='';
2846 apps="manual"
2847 echo "Manual build selected"
2849 [Cc])
2850 uname=`uname`
2851 simcc "checkwps"
2852 toolset='';
2853 t_cpu='';
2854 GCCOPTS='';
2855 extradefines="$extradefines -DDEBUG"
2856 appsdir='\$(ROOTDIR)/tools/checkwps';
2857 output='checkwps.'${modelname};
2858 archosrom='';
2859 echo "CheckWPS build selected"
2861 [Dd])
2862 uname=`uname`
2863 simcc "database"
2864 toolset='';
2865 t_cpu='';
2866 GCCOPTS='';
2867 appsdir='\$(ROOTDIR)/tools/database';
2868 archosrom='';
2870 case $uname in
2871 CYGWIN*|MINGW*)
2872 output="database_${modelname}.exe"
2875 output='database.'${modelname};
2877 esac
2879 echo "Database tool build selected"
2882 if [ "$modelname" = "sansae200r" ]; then
2883 echo "Do not use the e200R target for regular builds. Use e200 instead."
2884 exit 8
2886 debug=""
2887 btype="N" # set it explicitly since RET only gets here as well
2888 echo "Normal build selected"
2891 esac
2892 # to be able running "make manual" from non-manual configuration
2893 case $modelname in
2894 archosrecorderv2)
2895 manualdev="archosfmrecorder"
2897 iriverh1??)
2898 manualdev="iriverh100"
2900 ipodmini2g)
2901 manualdev="ipodmini1g"
2904 manualdev=$modelname
2906 esac
2908 if [ -z "$debug" ]; then
2909 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2912 echo "Using source code root directory: $rootdir"
2914 # this was once possible to change at build-time, but no more:
2915 language="english"
2917 uname=`uname`
2919 if [ "yes" = "$simulator" ]; then
2920 # setup compiler and things for simulator
2921 simcc "sdl-sim"
2923 if [ -d "simdisk" ]; then
2924 echo "Subdirectory 'simdisk' already present"
2925 else
2926 mkdir simdisk
2927 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2931 # Now, figure out version number of the (gcc) compiler we are about to use
2932 gccver=`$CC -dumpversion`;
2934 # figure out the binutil version too and display it, mostly for the build
2935 # system etc to be able to see it easier
2936 if [ $uname = "Darwin" ]; then
2937 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2938 else
2939 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2942 if [ -z "$gccver" ]; then
2943 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
2944 echo "[WARNING] this may cause your build to fail since we cannot do the"
2945 echo "[WARNING] checks we want now."
2946 else
2948 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2949 # DEPEND on it
2951 num1=`echo $gccver | cut -d . -f1`
2952 num2=`echo $gccver | cut -d . -f2`
2953 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2955 # This makes:
2956 # 3.3.X => 303
2957 # 3.4.X => 304
2958 # 2.95.3 => 295
2960 echo "Using $CC $gccver ($gccnum)"
2962 if test "$gccnum" -ge "400"; then
2963 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2964 # so we ignore that warnings for now
2965 # -Wno-pointer-sign
2966 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2969 if test "$gccnum" -ge "402"; then
2970 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2971 # and later would throw it for several valid cases
2972 GCCOPTS="$GCCOPTS -Wno-override-init"
2975 case $prefix in
2976 ""|"$CROSS_COMPILE")
2977 # simulator
2979 i586-mingw32msvc-)
2980 # cross-compile for win32
2983 # Verify that the cross-compiler is of a recommended version!
2984 if test "$gccver" != "$gccchoice"; then
2985 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2986 echo "WARNING: version $gccchoice!"
2987 echo "WARNING: This may cause your build to fail since it may be a version"
2988 echo "WARNING: that isn't functional or known to not be the best choice."
2989 echo "WARNING: If you suffer from build problems, you know that this is"
2990 echo "WARNING: a likely source for them..."
2993 esac
2998 echo "Using $LD $ldver"
3000 # check the compiler for SH platforms
3001 if test "$CC" = "sh-elf-gcc"; then
3002 if test "$gccnum" -lt "400"; then
3003 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3004 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3005 else
3006 # figure out patch status
3007 gccpatch=`$CC --version`;
3009 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3010 echo "gcc $gccver is rockbox patched"
3011 # then convert -O to -Os to get smaller binaries!
3012 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3013 else
3014 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3015 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3020 if test "$CC" = "m68k-elf-gcc"; then
3021 # convert -O to -Os to get smaller binaries!
3022 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3025 if [ "$ARG_CCACHE" = "1" ]; then
3026 echo "Enable ccache for building"
3027 ccache="ccache"
3028 elif [ "$ARG_CCACHE" != "0" ]; then
3029 ccache=`findtool ccache`
3030 if test -n "$ccache"; then
3031 echo "Found and uses ccache ($ccache)"
3035 # figure out the full path to the various commands if possible
3036 HOSTCC=`findtool gcc --lit`
3037 HOSTAR=`findtool ar --lit`
3038 CC=`findtool ${CC} --lit`
3039 LD=`findtool ${AR} --lit`
3040 AR=`findtool ${AR} --lit`
3041 AS=`findtool ${AS} --lit`
3042 OC=`findtool ${OC} --lit`
3043 WINDRES=`findtool ${WINDRES} --lit`
3044 DLLTOOL=`findtool ${DLLTOOL} --lit`
3045 DLLWRAP=`findtool ${DLLWRAP} --lit`
3046 RANLIB=`findtool ${RANLIB} --lit`
3048 if test -n "$ccache"; then
3049 CC="$ccache $CC"
3052 if test "$ARG_ARM_THUMB" = "1"; then
3053 extradefines="$extradefines -DUSE_THUMB"
3054 CC="$toolsdir/thumb-cc.py $CC"
3057 if test "X$endian" = "Xbig"; then
3058 defendian="ROCKBOX_BIG_ENDIAN"
3059 else
3060 defendian="ROCKBOX_LITTLE_ENDIAN"
3063 if [ "$ARG_RBDIR" ]; then
3064 if [ "$need_full_path" = "yes" ]; then
3065 rbdir=`realpath $ARG_RBDIR`
3066 else # prepend '/' if needed
3067 if [ -z `echo $ARG_RBDIR | grep -P '/.*'` ]; then
3068 rbdir="/"$ARG_RBDIR
3069 else
3070 rbdir=$ARG_RBDIR
3073 echo "Using alternate rockbox dir: ${rbdir}"
3076 sed > autoconf.h \
3077 -e "s<@ENDIAN@<${defendian}<g" \
3078 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3079 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3080 -e "s<@config_rtc@<$config_rtc<g" \
3081 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3082 -e "s<@RBDIR@<${rbdir}<g" \
3083 -e "s<@binpath@<`realpath ${ROCKBOX_BINARY_PATH}`<g" \
3084 -e "s<@libpath@<`realpath ${ROCKBOX_LIBRARY_PATH}`<g" \
3085 -e "s<@have_backlight@<$have_backlight<g" \
3086 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3087 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3088 <<EOF
3089 /* This header was made by configure */
3090 #ifndef __BUILD_AUTOCONF_H
3091 #define __BUILD_AUTOCONF_H
3093 /* Define endianess for the target or simulator platform */
3094 #define @ENDIAN@ 1
3096 /* Define this if you build rockbox to support the logf logging and display */
3097 #undef ROCKBOX_HAS_LOGF
3099 /* Define this to record a chart with timings for the stages of boot */
3100 #undef DO_BOOTCHART
3102 /* optional define for a backlight modded Ondio */
3103 @have_backlight@
3105 /* optional define for FM radio mod for iAudio M5 */
3106 @have_fmradio_in@
3108 /* optional define for ATA poweroff on Player */
3109 @have_ata_poweroff@
3111 /* optional defines for RTC mod for h1x0 */
3112 @config_rtc@
3113 @have_rtc_alarm@
3115 /* root of Rockbox */
3116 #define ROCKBOX_DIR "@RBDIR@"
3117 #define ROCKBOX_BINARY_PATH "@binpath@"
3118 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3120 #endif /* __BUILD_AUTOCONF_H */
3123 if test -n "$t_cpu"; then
3124 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3125 if [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3126 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/"
3127 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/"
3129 if [ -n "$app_platform" -a "$app_platform" = "android" ]; then
3130 # android's gcc doesn't add this :/
3131 TARGET_INC="$TARGET_INC -I$ANDROID_NDK_PATH/build/platforms/android-4/arch-arm/usr/include"
3133 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3134 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3135 GCCOPTS="$GCCOPTS"
3138 if test "$simulator" = "yes"; then
3139 # add simul make stuff on the #SIMUL# line
3140 simmagic1="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3141 simmagic2="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3142 else
3143 # delete the lines that match
3144 simmagic1='/@SIMUL1@/D'
3145 simmagic2='/@SIMUL2@/D'
3148 if test "$swcodec" = "yes"; then
3149 voicetoolset="rbspeexenc voicefont wavtrim"
3150 else
3151 voicetoolset="voicefont wavtrim"
3154 if test "$apps" = "apps"; then
3155 # only when we build "real" apps we build the .lng files
3156 buildlangs="langs"
3159 #### Fix the cmdline ###
3160 if [ "$ARG_CCACHE" = "1" ]; then
3161 cmdline="--ccache "
3162 elif [ "$ARG_CCACHE" = "0" ]; then
3163 cmdline="--no-ccache "
3165 if [ "$ARG_ARM_EABI" = "1" ]; then
3166 cmdline="$cmdline--eabi "
3169 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts --prefix=\$(PREFIX)"
3170 ### end of cmdline
3172 sed > Makefile \
3173 -e "s<@ROOTDIR@<${rootdir}<g" \
3174 -e "s<@DEBUG@<${debug}<g" \
3175 -e "s<@MEMORY@<${memory}<g" \
3176 -e "s<@TARGET_ID@<${target_id}<g" \
3177 -e "s<@TARGET@<${target}<g" \
3178 -e "s<@CPU@<${t_cpu}<g" \
3179 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3180 -e "s<@MODELNAME@<${modelname}<g" \
3181 -e "s<@LANGUAGE@<${language}<g" \
3182 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3183 -e "s<@PWD@<${pwd}<g" \
3184 -e "s<@HOSTCC@<${HOSTCC}<g" \
3185 -e "s<@HOSTAR@<${HOSTAR}<g" \
3186 -e "s<@CC@<${CC}<g" \
3187 -e "s<@LD@<${LD}<g" \
3188 -e "s<@AR@<${AR}<g" \
3189 -e "s<@AS@<${AS}<g" \
3190 -e "s<@OC@<${OC}<g" \
3191 -e "s<@WINDRES@<${WINDRES}<g" \
3192 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3193 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3194 -e "s<@RANLIB@<${RANLIB}<g" \
3195 -e "s<@TOOL@<${tool}<g" \
3196 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3197 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3198 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3199 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3200 -e "s<@OUTPUT@<${output}<g" \
3201 -e "s<@APPEXTRA@<${appextra}<g" \
3202 -e "s<@ARCHOSROM@<${archosrom}<g" \
3203 -e "s<@FLASHFILE@<${flash}<g" \
3204 -e "s<@PLUGINS@<${plugins}<g" \
3205 -e "s<@CODECS@<${swcodec}<g" \
3206 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3207 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3208 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3209 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3210 -e "s<@LDOPTS@<${LDOPTS}<g" \
3211 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3212 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3213 -e "s<@EXTRADEF@<${extradefines}<g" \
3214 -e "s<@APPSDIR@<${appsdir}<g" \
3215 -e "s<@FIRMDIR@<${firmdir}<g" \
3216 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3217 -e "s<@APPS@<${apps}<g" \
3218 -e "s<@APP_TYPE@<${app_type}<g" \
3219 -e "s<@GCCVER@<${gccver}<g" \
3220 -e "s<@GCCNUM@<${gccnum}<g" \
3221 -e "s<@UNAME@<${uname}<g" \
3222 -e "s<@ENDIAN@<${defendian}<g" \
3223 -e "s<@TOOLSET@<${toolset}<g" \
3224 -e "${simmagic1}" \
3225 -e "${simmagic2}" \
3226 -e "s<@MANUALDEV@<${manualdev}<g" \
3227 -e "s<@ENCODER@<${ENC_CMD}<g" \
3228 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3229 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3230 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3231 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3232 -e "s<@LANGS@<${buildlangs}<g" \
3233 -e "s<@USE_ELF@<${USE_ELF}<g" \
3234 -e "s<@RBDIR@<${rbdir}<g" \
3235 -e "s<@binpath@<${ROCKBOX_BINARY_PATH}<g" \
3236 -e "s<@libpath@<${ROCKBOX_LIBRARY_PATH}<g" \
3237 -e "s<@PREFIX@<$PREFIX<g" \
3238 -e "s<@CMDLINE@<$cmdline<g" \
3239 -e "s<@SDLCONFIG@<$sdl<g" \
3240 <<EOF
3241 ## Automatically generated. http://www.rockbox.org/
3243 export ROOTDIR=@ROOTDIR@
3244 export FIRMDIR=@FIRMDIR@
3245 export APPSDIR=@APPSDIR@
3246 export TOOLSDIR=@TOOLSDIR@
3247 export DOCSDIR=\$(ROOTDIR)/docs
3248 export MANUALDIR=\${ROOTDIR}/manual
3249 export DEBUG=@DEBUG@
3250 export MODELNAME=@MODELNAME@
3251 export ARCHOSROM=@ARCHOSROM@
3252 export FLASHFILE=@FLASHFILE@
3253 export TARGET_ID=@TARGET_ID@
3254 export TARGET=@TARGET@
3255 export CPU=@CPU@
3256 export MANUFACTURER=@MANUFACTURER@
3257 export OBJDIR=@PWD@
3258 export BUILDDIR=@PWD@
3259 export LANGUAGE=@LANGUAGE@
3260 export VOICELANGUAGE=@VOICELANGUAGE@
3261 export MEMORYSIZE=@MEMORY@
3262 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3263 export MKFIRMWARE=@TOOL@
3264 export BMP2RB_MONO=@BMP2RB_MONO@
3265 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3266 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3267 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3268 export BINARY=@OUTPUT@
3269 export APPEXTRA=@APPEXTRA@
3270 export ENABLEDPLUGINS=@PLUGINS@
3271 export SOFTWARECODECS=@CODECS@
3272 export EXTRA_DEFINES=@EXTRADEF@
3273 export HOSTCC=@HOSTCC@
3274 export HOSTAR=@HOSTAR@
3275 export CC=@CC@
3276 export LD=@LD@
3277 export AR=@AR@
3278 export AS=@AS@
3279 export OC=@OC@
3280 export WINDRES=@WINDRES@
3281 export DLLTOOL=@DLLTOOL@
3282 export DLLWRAP=@DLLWRAP@
3283 export RANLIB=@RANLIB@
3284 export PREFIX=@PREFIX@
3285 export PROFILE_OPTS=@PROFILE_OPTS@
3286 export APP_TYPE=@APP_TYPE@
3287 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3288 export GCCOPTS=@GCCOPTS@
3289 export TARGET_INC=@TARGET_INC@
3290 export LOADADDRESS=@LOADADDRESS@
3291 export SHARED_FLAG=@SHARED_FLAG@
3292 export LDOPTS=@LDOPTS@
3293 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3294 export GCCVER=@GCCVER@
3295 export GCCNUM=@GCCNUM@
3296 export UNAME=@UNAME@
3297 export MANUALDEV=@MANUALDEV@
3298 export TTS_OPTS=@TTS_OPTS@
3299 export TTS_ENGINE=@TTS_ENGINE@
3300 export ENC_OPTS=@ENC_OPTS@
3301 export ENCODER=@ENCODER@
3302 export USE_ELF=@USE_ELF@
3303 export RBDIR=@RBDIR@
3304 export ROCKBOX_BINARY_PATH=@binpath@
3305 export ROCKBOX_LIBRARY_PATH=@libpath@
3306 export SDLCONFIG=@SDLCONFIG@
3308 CONFIGURE_OPTIONS=@CMDLINE@
3310 include \$(TOOLSDIR)/root.make
3314 echo "Created Makefile"