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