Add WPS hotkey for the D2, and make the tree hotkey only valid for non-touchscreen...
[kugel-rb.git] / tools / configure
blob3503f8493cd61346d4e498d802562e079635cb54
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 use_logf="#undef ROCKBOX_HAS_LOGF"
15 use_bootchart="#undef DO_BOOTCHART"
17 scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
19 rbdir=".rockbox"
22 # Begin Function Definitions
24 input() {
25 read response
26 echo $response
29 prefixtools () {
30 prefix="$1"
31 CC=${prefix}gcc
32 WINDRES=${prefix}windres
33 DLLTOOL=${prefix}dlltool
34 DLLWRAP=${prefix}dllwrap
35 RANLIB=${prefix}ranlib
36 LD=${prefix}ld
37 AR=${prefix}ar
38 AS=${prefix}as
39 OC=${prefix}objcopy
42 findarmgcc() {
43 models_not_checked_with_eabi="ipodnano1g ipod3g ipod4g ipodmini1g ipod1g2g vibe500 cowond2"
44 if [ "$ARG_ARM_EABI" != 1 ]; then # eabi not explicitely enabled
45 for model in $models_not_checked_with_eabi; do
46 if [ "$modelname" = "$model" ]; then
47 ARG_ARM_EABI="0"
48 echo "**************************************************************"
49 echo "**** Target $modelname is using non EABI compiler !"
50 echo "**** Please test a build with --eabi and enable"
51 echo "**** EABI compiler for this target"
52 echo "**************************************************************"
54 done
57 if [ "$ARG_ARM_EABI" != "0" ]; then
58 prefixtools arm-elf-eabi-
59 gccchoice="4.4.4"
60 else
61 prefixtools arm-elf-
62 gccchoice="4.0.3"
66 # scan the $PATH for the given command
67 findtool(){
68 file="$1"
70 IFS=":"
71 for path in $PATH
73 # echo "checks for $file in $path" >&2
74 if test -f "$path/$file"; then
75 echo "$path/$file"
76 return
78 done
79 # check whether caller wants literal return value if not found
80 if [ "$2" = "--lit" ]; then
81 echo "$file"
85 # scan the $PATH for sdl-config - check whether for a (cross-)win32
86 # sdl as requested
87 findsdl(){
88 file="sdl-config"
89 winbuild="$1"
91 IFS=":"
92 for path in $PATH
94 #echo "checks for $file in $path" >&2
95 if test -f "$path/$file"; then
96 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
97 if [ "yes" = "${winbuild}" ]; then
98 echo "$path/$file"
99 return
101 else
102 if [ "yes" != "${winbuild}" ]; then
103 echo "$path/$file"
104 return
108 done
111 simcc () {
113 # default tool setup for native building
114 prefixtools "$CROSS_COMPILE"
115 ARG_ARM_THUMB=0 # can't use thumb in native builds
117 simver=sdl
118 winbuild="$crosscompile"
119 GCCOPTS='-W -Wall -g -fno-builtin'
120 GCCOPTIMIZE=''
121 LDOPTS=''
123 # default output binary name
124 output="rockboxui"
126 # default share option, override below if needed
127 SHARED_FLAG="-shared"
129 case $uname in
130 CYGWIN*)
131 echo "Cygwin host detected"
133 LDOPTS="-mconsole"
134 output="rockboxui.exe"
135 winbuild="yes"
138 MINGW*)
139 echo "MinGW host detected"
141 LDOPTS="-mconsole"
142 output="rockboxui.exe"
143 winbuild="yes"
146 Linux)
147 echo "Linux host detected"
150 FreeBSD)
151 echo "FreeBSD host detected"
154 Darwin)
155 echo "Darwin host detected"
157 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
160 SunOS)
161 echo "*Solaris host detected"
163 GCCOPTS="$GCCOPTS -fPIC"
164 LDOPTS="-lm"
168 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
169 exit 1
171 esac
173 sdl=`findsdl $winbuild`
175 if [ $1 = "sdl" ]; then
176 if [ -z "$sdl" ]; then
177 echo "configure didn't find sdl-config, which indicates that you"
178 echo "don't have SDL (properly) installed. Please correct and"
179 echo "re-run configure!"
180 exit 2
181 else
182 # generic sdl-config checker
183 GCCOPTS="$GCCOPTS `$sdl --cflags`"
184 LDOPTS="$LDOPTS `$sdl --libs`"
188 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
190 if test "X$crosscompile" != "Xyes"; then
191 case `uname -m` in
192 x86_64|amd64)
193 # fPIC is needed to make shared objects link
194 # setting visibility to hidden is necessary to avoid strange crashes
195 # due to symbol clashing
196 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
197 # x86_64 supports MMX by default
200 i686)
201 echo "Enabling MMX support"
202 GCCOPTS="$GCCOPTS -mmmx"
204 esac
206 id=$$
207 cat >$tmpdir/conftest-$id.c <<EOF
208 #include <stdio.h>
209 int main(int argc, char **argv)
211 int var=0;
212 char *varp = (char *)&var;
213 *varp=1;
215 printf("%d\n", var);
216 return 0;
220 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
222 # when cross compiling, the endianess cannot be detected because the above program doesn't run
223 # on the local machine. assume little endian but print a warning
224 endian=`$tmpdir/conftest-$id 2> /dev/null`
225 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
226 # big endian
227 endian="big"
228 else
229 # little endian
230 endian="little"
233 if [ "$CROSS_COMPILE" != "" ]; then
234 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
237 if [ $1 = "sdl" ]; then
238 echo "Simulator environment deemed $endian endian"
239 elif [ $1 = "checkwps" ]; then
240 echo "CheckWPS environment deemed $endian endian"
243 # use wildcard here to make it work even if it was named *.exe like
244 # on cygwin
245 rm -f $tmpdir/conftest-$id*
246 else
247 # We are crosscompiling
248 # add cross-compiler option(s)
249 prefixtools i586-mingw32msvc-
250 LDOPTS="$LDOPTS -mconsole"
251 output="rockboxui.exe"
252 endian="little" # windows is little endian
253 echo "Enabling MMX support"
254 GCCOPTS="$GCCOPTS -mmmx"
259 # functions for setting up cross-compiler names and options
260 # also set endianess and what the exact recommended gcc version is
261 # the gcc version should most likely match what versions we build with
262 # rockboxdev.sh
264 shcc () {
265 prefixtools sh-elf-
266 GCCOPTS="$CCOPTS -m1"
267 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
268 endian="big"
269 gccchoice="4.0.3"
272 calmrisccc () {
273 prefixtools calmrisc16-unknown-elf-
274 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
275 GCCOPTIMIZE="-fomit-frame-pointer"
276 endian="big"
279 coldfirecc () {
280 prefixtools m68k-elf-
281 GCCOPTS="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
282 GCCOPTIMIZE="-fomit-frame-pointer"
283 endian="big"
284 gccchoice="3.4.6"
287 arm7tdmicc () {
288 findarmgcc
289 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
290 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
291 GCCOPTS="$GCCOPTS -mlong-calls"
293 GCCOPTIMIZE="-fomit-frame-pointer"
294 endian="little"
297 arm9tdmicc () {
298 findarmgcc
299 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
300 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
301 GCCOPTS="$GCCOPTS -mlong-calls"
303 GCCOPTIMIZE="-fomit-frame-pointer"
304 endian="little"
307 arm940tbecc () {
308 findarmgcc
309 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
310 if test "$ARG_ARM_EABI" = "0"; then
311 GCCOPTS="$GCCOPTS -mlong-calls"
313 GCCOPTIMIZE="-fomit-frame-pointer"
314 endian="big"
317 arm940tcc () {
318 findarmgcc
319 GCCOPTS="$CCOPTS -mcpu=arm940t"
320 if test "$ARG_ARM_EABI" = "0"; then
321 GCCOPTS="$GCCOPTS -mlong-calls"
323 GCCOPTIMIZE="-fomit-frame-pointer"
324 endian="little"
327 arm946cc () {
328 findarmgcc
329 GCCOPTS="$CCOPTS -mcpu=arm9e"
330 if test "$ARG_ARM_EABI" = "0"; then
331 GCCOPTS="$GCCOPTS -mlong-calls"
333 GCCOPTIMIZE="-fomit-frame-pointer"
334 endian="little"
337 arm926ejscc () {
338 findarmgcc
339 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
340 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
341 GCCOPTS="$GCCOPTS -mlong-calls"
343 GCCOPTIMIZE="-fomit-frame-pointer"
344 endian="little"
347 arm1136jfscc () {
348 findarmgcc
349 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
350 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
351 GCCOPTS="$GCCOPTS -mlong-calls"
353 GCCOPTIMIZE="-fomit-frame-pointer"
354 endian="little"
357 arm1176jzscc () {
358 findarmgcc
359 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
360 if test "$ARG_ARM_EABI" = "0"; then
361 GCCOPTS="$GCCOPTS -mlong-calls"
363 GCCOPTIMIZE="-fomit-frame-pointer"
364 endian="little"
367 mipselcc () {
368 prefixtools mipsel-elf-
369 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls"
370 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
371 GCCOPTIMIZE="-fomit-frame-pointer"
372 endian="little"
373 gccchoice="4.1.2"
376 whichadvanced () {
377 atype=`echo "$1" | cut -c 2-`
378 ##################################################################
379 # Prompt for specific developer options
381 if [ "$atype" ]; then
382 interact=
383 else
384 interact=1
385 echo ""
386 echo "Enter your developer options (press enter when done)"
387 printf "(D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile, (T)est plugins"
388 if [ "$memory" = "2" ]; then
389 printf ", (8)MB MOD"
391 if [ "$modelname" = "archosplayer" ]; then
392 printf ", Use (A)TA poweroff"
394 if [ "$t_model" = "ondio" ]; then
395 printf ", (B)acklight MOD"
397 if [ "$modelname" = "iaudiom5" ]; then
398 printf ", (F)M radio MOD"
400 if [ "$modelname" = "iriverh120" ]; then
401 printf ", (R)TC MOD"
403 echo ""
406 cont=1
407 while [ $cont = "1" ]; do
409 if [ "$interact" ]; then
410 option=`input`
411 else
412 option=`echo "$atype" | cut -c 1`
415 case $option in
416 [Dd])
417 if [ "yes" = "$profile" ]; then
418 echo "Debug is incompatible with profiling"
419 else
420 echo "DEBUG build enabled"
421 use_debug="yes"
424 [Ll])
425 echo "logf() support enabled"
426 logf="yes"
428 [Tt])
429 echo "Including test plugins"
430 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
432 [Cc])
433 echo "bootchart enabled (logf also enabled)"
434 bootchart="yes"
435 logf="yes"
437 [Ss])
438 echo "Simulator build enabled"
439 simulator="yes"
441 [Pp])
442 if [ "yes" = "$use_debug" ]; then
443 echo "Profiling is incompatible with debug"
444 else
445 echo "Profiling support is enabled"
446 profile="yes"
449 [Vv])
450 echo "Voice build selected"
451 voice="yes"
454 if [ "$memory" = "2" ]; then
455 memory="8"
456 echo "Memory size selected: 8MB"
459 [Aa])
460 if [ "$modelname" = "archosplayer" ]; then
461 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
462 echo "ATA power off enabled"
465 [Bb])
466 if [ "$t_model" = "ondio" ]; then
467 have_backlight="#define HAVE_BACKLIGHT"
468 echo "Backlight functions enabled"
471 [Ff])
472 if [ "$modelname" = "iaudiom5" ]; then
473 have_fmradio_in="#define HAVE_FMRADIO_IN"
474 echo "FM radio functions enabled"
477 [Rr])
478 if [ "$modelname" = "iriverh120" ]; then
479 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
480 have_rtc_alarm="#define HAVE_RTC_ALARM"
481 echo "RTC functions enabled (DS1339/DS3231)"
484 [Ww])
485 echo "Enabling Windows 32 cross-compiling"
486 crosscompile="yes"
489 if [ "$interact" ]; then
490 cont=0
491 else
492 echo "[ERROR] Option $option unsupported"
495 esac
496 if [ "$interact" ]; then
497 btype="$btype$option"
498 else
499 atype=`echo "$atype" | cut -c 2-`
500 [ "$atype" ] || cont=0
502 done
503 echo "done"
505 if [ "yes" = "$voice" ]; then
506 # Ask about languages to build
507 picklang
508 voicelanguage=`whichlang`
509 echo "Voice language set to $voicelanguage"
511 # Configure encoder and TTS engine for each language
512 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
513 voiceconfig "$thislang"
514 done
516 if [ "yes" = "$use_debug" ]; then
517 debug="-DDEBUG"
518 GCCOPTS="$GCCOPTS -g -DDEBUG"
520 if [ "yes" = "$logf" ]; then
521 use_logf="#define ROCKBOX_HAS_LOGF 1"
523 if [ "yes" = "$bootchart" ]; then
524 use_bootchart="#define DO_BOOTCHART 1"
526 if [ "yes" = "$simulator" ]; then
527 debug="-DDEBUG"
528 extradefines="$extradefines -DSIMULATOR"
529 archosrom=""
530 flash=""
532 if [ "yes" = "$profile" ]; then
533 extradefines="$extradefines -DRB_PROFILE"
534 PROFILE_OPTS="-finstrument-functions"
538 # Configure voice settings
539 voiceconfig () {
540 thislang=$1
541 if [ ! "$ARG_TTS" ]; then
542 echo "Building $thislang voice for $modelname. Select options"
543 echo ""
546 if [ -n "`findtool flite`" ]; then
547 FLITE="F(l)ite "
548 FLITE_OPTS=""
549 DEFAULT_TTS="flite"
550 DEFAULT_TTS_OPTS=$FLITE_OPTS
551 DEFAULT_NOISEFLOOR="500"
552 DEFAULT_CHOICE="L"
554 if [ -n "`findtool espeak`" ]; then
555 ESPEAK="(e)Speak "
556 ESPEAK_OPTS=""
557 DEFAULT_TTS="espeak"
558 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
559 DEFAULT_NOISEFLOOR="500"
560 DEFAULT_CHOICE="e"
562 if [ -n "`findtool festival`" ]; then
563 FESTIVAL="(F)estival "
564 case "$thislang" in
565 "italiano")
566 FESTIVAL_OPTS="--language italian"
568 "espanol")
569 FESTIVAL_OPTS="--language spanish"
571 "finnish")
572 FESTIVAL_OPTS="--language finnish"
574 "czech")
575 FESTIVAL_OPTS="--language czech"
578 FESTIVAL_OPTS=""
580 esac
581 DEFAULT_TTS="festival"
582 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
583 DEFAULT_NOISEFLOOR="500"
584 DEFAULT_CHOICE="F"
586 if [ -n "`findtool swift`" ]; then
587 SWIFT="S(w)ift "
588 SWIFT_OPTS=""
589 DEFAULT_TTS="swift"
590 DEFAULT_TTS_OPTS=$SWIFT_OPTS
591 DEFAULT_NOISEFLOOR="500"
592 DEFAULT_CHOICE="w"
594 # Allow SAPI if Windows is in use
595 if [ -n "`findtool winver`" ]; then
596 SAPI="(S)API "
597 SAPI_OPTS=""
598 DEFAULT_TTS="sapi"
599 DEFAULT_TTS_OPTS=$SAPI_OPTS
600 DEFAULT_NOISEFLOOR="500"
601 DEFAULT_CHOICE="S"
604 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
605 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
606 exit 3
609 if [ "$ARG_TTS" ]; then
610 option=$ARG_TTS
611 else
612 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
613 option=`input`
615 advopts="$advopts --tts=$option"
616 case "$option" in
617 [Ll])
618 TTS_ENGINE="flite"
619 NOISEFLOOR="500" # TODO: check this value
620 TTS_OPTS=$FLITE_OPTS
622 [Ee])
623 TTS_ENGINE="espeak"
624 NOISEFLOOR="500"
625 TTS_OPTS=$ESPEAK_OPTS
627 [Ff])
628 TTS_ENGINE="festival"
629 NOISEFLOOR="500"
630 TTS_OPTS=$FESTIVAL_OPTS
632 [Ss])
633 TTS_ENGINE="sapi"
634 NOISEFLOOR="500"
635 TTS_OPTS=$SAPI_OPTS
637 [Ww])
638 TTS_ENGINE="swift"
639 NOISEFLOOR="500"
640 TTS_OPTS=$SWIFT_OPTS
643 TTS_ENGINE=$DEFAULT_TTS
644 TTS_OPTS=$DEFAULT_TTS_OPTS
645 NOISEFLOOR=$DEFAULT_NOISEFLOOR
646 esac
647 echo "Using $TTS_ENGINE for TTS"
649 # Select which voice to use for Festival
650 if [ "$TTS_ENGINE" = "festival" ]; then
651 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
652 for voice in $voicelist; do
653 TTS_FESTIVAL_VOICE="$voice" # Default choice
654 break
655 done
656 if [ "$ARG_VOICE" ]; then
657 CHOICE=$ARG_VOICE
658 else
660 for voice in $voicelist; do
661 printf "%3d. %s\n" "$i" "$voice"
662 i=`expr $i + 1`
663 done
664 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
665 CHOICE=`input`
668 for voice in $voicelist; do
669 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
670 TTS_FESTIVAL_VOICE="$voice"
672 i=`expr $i + 1`
673 done
674 advopts="$advopts --voice=$CHOICE"
675 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
676 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
679 # Read custom tts options from command line
680 if [ "$ARG_TTSOPTS" ]; then
681 TTS_OPTS="$ARG_TTSOPTS"
682 advopts="$advopts --ttsopts='$TTS_OPTS'"
683 echo "$TTS_ENGINE options set to $TTS_OPTS"
686 if [ "$swcodec" = "yes" ]; then
687 ENCODER="rbspeexenc"
688 ENC_CMD="rbspeexenc"
689 ENC_OPTS="-q 4 -c 10"
690 else
691 if [ -n "`findtool lame`" ]; then
692 ENCODER="lame"
693 ENC_CMD="lame"
694 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
695 else
696 echo "You need LAME in the system path to build voice files for"
697 echo "HWCODEC targets."
698 exit 4
702 echo "Using $ENCODER for encoding voice clips"
704 # Read custom encoder options from command line
705 if [ "$ARG_ENCOPTS" ]; then
706 ENC_OPTS="$ARG_ENCOPTS"
707 advopts="$advopts --encopts='$ENC_OPTS'"
708 echo "$ENCODER options set to $ENC_OPTS"
711 TEMPDIR="${pwd}"
712 if [ -n "`findtool cygpath`" ]; then
713 TEMPDIR=`cygpath . -a -w`
717 picklang() {
718 # figure out which languages that are around
719 for file in $rootdir/apps/lang/*.lang; do
720 clean=`basename $file .lang`
721 langs="$langs $clean"
722 done
724 if [ "$ARG_LANG" ]; then
725 pick=$ARG_LANG
726 else
727 echo "Select a number for the language to use (default is english)"
728 # FIXME The multiple-language feature is currently broken
729 # echo "You may enter a comma-separated list of languages to build"
731 num=1
732 for one in $langs; do
733 echo "$num. $one"
734 num=`expr $num + 1`
735 done
736 pick=`input`
738 advopts="$advopts --language=$pick"
741 whichlang() {
742 output=""
743 # Allow the user to pass a comma-separated list of langauges
744 for thispick in `echo $pick | sed 's/,/ /g'`; do
745 num=1
746 for one in $langs; do
747 # Accept both the language number and name
748 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
749 if [ "$output" = "" ]; then
750 output=$one
751 else
752 output=$output,$one
755 num=`expr $num + 1`
756 done
757 done
758 if [ -z "$output" ]; then
759 # pick a default
760 output="english"
762 echo $output
765 help() {
766 echo "Rockbox configure script."
767 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
768 echo "Do *NOT* run this within the tools directory!"
769 echo ""
770 cat <<EOF
771 Usage: configure [OPTION]...
772 Options:
773 --target=TARGET Sets the target, TARGET can be either the target ID or
774 corresponding string. Run without this option to see all
775 available targets.
777 --ram=RAM Sets the RAM for certain targets. Even though any number
778 is accepted, not every number is correct. The default
779 value will be applied, if you entered a wrong number
780 (which depends on the target). Watch the output. Run
781 without this option if you are not sure which the right
782 number is.
784 --type=TYPE Sets the build type. Shortcuts are also valid.
785 Run without this option to see all available types.
786 Multiple values are allowed and managed in the input
787 order. So --type=b stands for Bootloader build, while
788 --type=ab stands for "Backlight MOD" build.
790 --language=LANG Set the language used for voice generation (used only if
791 TYPE is AV).
793 --tts=ENGINE Set the TTS engine used for voice generation (used only
794 if TYPE is AV).
796 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
797 AV).
799 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
801 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
803 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
804 This is useful for having multiple alternate builds on
805 your device that you can load with ROLO. However as the
806 bootloader looks for .rockbox you won't be able to boot
807 into this build.
809 --ccache Enable ccache use (done by default these days)
810 --no-ccache Disable ccache use
812 --eabi Make configure prefer toolchains that are able to compile
813 for the new ARM standard abi EABI
814 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
815 --thumb Build with -mthumb (for ARM builds)
816 --no-thumb The opposite of --thumb (don't use thumb even for targets
817 where this is the default
818 --help Shows this message (must not be used with other options)
822 exit
825 ARG_CCACHE=
826 ARG_ENCOPTS=
827 ARG_LANG=
828 ARG_RAM=
829 ARG_RBDIR=
830 ARG_TARGET=
831 ARG_TTS=
832 ARG_TTSOPTS=
833 ARG_TYPE=
834 ARG_VOICE=
835 ARG_ARM_EABI=
836 ARG_ARM_THUMB=
837 err=
838 for arg in "$@"; do
839 case "$arg" in
840 --ccache) ARG_CCACHE=1;;
841 --no-ccache) ARG_CCACHE=0;;
842 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
843 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
844 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
845 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
846 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
847 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
848 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
849 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
850 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
851 --eabi) ARG_ARM_EABI=1;;
852 --no-eabi) ARG_ARM_EABI=0;;
853 --thumb) ARG_ARM_THUMB=1;;
854 --no-thumb) ARG_ARM_THUMB=0;;
855 --help) help;;
856 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
857 esac
858 done
859 [ "$err" ] && exit 1
861 advopts=
863 if [ "$TMPDIR" != "" ]; then
864 tmpdir=$TMPDIR
865 else
866 tmpdir=/tmp
868 echo Using temporary directory $tmpdir
870 if test -r "configure"; then
871 # this is a check for a configure script in the current directory, it there
872 # is one, try to figure out if it is this one!
874 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
875 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
876 echo "It will only cause you pain and grief. Instead do this:"
877 echo ""
878 echo " cd .."
879 echo " mkdir build-dir"
880 echo " cd build-dir"
881 echo " ../tools/configure"
882 echo ""
883 echo "Much happiness will arise from this. Enjoy"
884 exit 5
888 # get our current directory
889 pwd=`pwd`;
891 if { echo $pwd | grep " "; } then
892 echo "You're running this script in a path that contains space. The build"
893 echo "system is unfortunately not clever enough to deal with this. Please"
894 echo "run the script from a different path, rename the path or fix the build"
895 echo "system!"
896 exit 6
899 if [ -z "$rootdir" ]; then
900 ##################################################################
901 # Figure out where the source code root is!
903 rootdir=`dirname $0`/../
905 #####################################################################
906 # Convert the possibly relative directory name to an absolute version
908 now=`pwd`
909 cd $rootdir
910 rootdir=`pwd`
912 # cd back to the build dir
913 cd $now
916 apps="apps"
917 appsdir='\$(ROOTDIR)/apps'
918 firmdir='\$(ROOTDIR)/firmware'
919 toolsdir='\$(ROOTDIR)/tools'
922 ##################################################################
923 # Figure out target platform
926 if [ "$ARG_TARGET" ]; then
927 buildfor=$ARG_TARGET
928 else
929 echo "Enter target platform:"
930 cat <<EOF
931 ==Archos== ==iriver== ==Apple iPod==
932 0) Player/Studio 10) H120/H140 20) Color/Photo
933 1) Recorder 11) H320/H340 21) Nano 1G
934 2) FM Recorder 12) iHP-100/110/115 22) Video
935 3) Recorder v2 13) iFP-790 23) 3G
936 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
937 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
938 6) AV300 26) Mini 2G
939 ==Toshiba== 27) 1G, 2G
940 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
941 30) X5/X5V/X5L 41) Gigabeat S
942 31) M5/M5L ==SanDisk==
943 32) 7 ==Olympus= 50) Sansa e200
944 33) D2 70) M:Robe 500 51) Sansa e200R
945 34) M3/M3L 71) M:Robe 100 52) Sansa c200
946 53) Sansa m200
947 ==Creative== ==Philips== 54) Sansa c100
948 90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip
949 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2
950 92) Zen Vision HDD1830 57) Sansa m200v4
951 102) GoGear HDD6330 58) Sansa Fuze
952 ==Onda== 59) Sansa c200v2
953 120) VX747 ==Meizu== 60) Sansa Clipv2
954 121) VX767 110) M6SL 61) Sansa View
955 122) VX747+ 111) M6SP 62) Sansa Clip+
956 123) VX777 112) M3 63) Sansa Fuze v2
958 ==Logik==
959 ==Samsung== ==Tatung== 80) DAX 1GB MP3/DAB
960 140) YH-820 150) Elio TPJ-1022
961 141) YH-920 ==Lyre project==
962 142) YH-925 ==Packard Bell== 130) Lyre proto 1
963 143) YP-S3 160) Vibe 500 131) Mini2440
965 ==MPIO==
966 170) HD200
969 buildfor=`input`;
972 # Set of tools built for all target platforms:
973 toolset="rdf2binary convbdf codepages"
975 # Toolsets for some target families:
976 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
977 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
978 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
979 ipodbitmaptools="$toolset scramble bmp2rb"
980 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
981 tccbitmaptools="$toolset scramble bmp2rb"
982 # generic is used by IFP, Meizu and Onda
983 genericbitmaptools="$toolset bmp2rb"
984 # scramble is used by all other targets
985 scramblebitmaptools="$genericbitmaptools scramble"
988 # ---- For each target ----
990 # *Variables*
991 # target_id: a unique number identifying this target, IS NOT the menu number.
992 # Just use the currently highest number+1 when you add a new
993 # target.
994 # modelname: short model name used all over to identify this target
995 # memory: number of megabytes of RAM this target has. If the amount can
996 # be selected by the size prompt, let memory be unset here
997 # target: -Ddefine passed to the build commands to make the correct
998 # config-*.h file get included etc
999 # tool: the tool that takes a plain binary and converts that into a
1000 # working "firmware" file for your target
1001 # output: the final output file name
1002 # boottool: the tool that takes a plain binary and generates a bootloader
1003 # file for your target (or blank to use $tool)
1004 # bootoutput:the final output file name for the bootloader (or blank to use
1005 # $output)
1006 # appextra: passed to the APPEXTRA variable in the Makefiles.
1007 # TODO: add proper explanation
1008 # archosrom: used only for Archos targets that build a special flashable .ucl
1009 # image.
1010 # flash: name of output for flashing, for targets where there's a special
1011 # file output for this.
1012 # plugins: set to 'yes' to build the plugins. Early development builds can
1013 # set this to no in the early stages to have an easier life for a
1014 # while
1015 # swcodec: set 'yes' on swcodec targets
1016 # toolset: lists what particular tools in the tools/ directory that this
1017 # target needs to have built prior to building Rockbox
1019 # *Functions*
1020 # *cc: sets up gcc and compiler options for your target builds. Note
1021 # that if you select a simulator build, the compiler selection is
1022 # overridden later in the script.
1024 case $buildfor in
1026 0|archosplayer)
1027 target_id=1
1028 modelname="archosplayer"
1029 target="-DARCHOS_PLAYER"
1030 shcc
1031 tool="$rootdir/tools/scramble"
1032 output="archos.mod"
1033 appextra="player:gui"
1034 archosrom="$pwd/rombox.ucl"
1035 flash="$pwd/rockbox.ucl"
1036 plugins="yes"
1037 swcodec=""
1039 # toolset is the tools within the tools directory that we build for
1040 # this particular target.
1041 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1043 # Note: the convbdf is present in the toolset just because: 1) the
1044 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1045 # build the player simulator
1047 t_cpu="sh"
1048 t_manufacturer="archos"
1049 t_model="player"
1052 1|archosrecorder)
1053 target_id=2
1054 modelname="archosrecorder"
1055 target="-DARCHOS_RECORDER"
1056 shcc
1057 tool="$rootdir/tools/scramble"
1058 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1059 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1060 output="ajbrec.ajz"
1061 appextra="recorder:gui:radio"
1062 #archosrom="$pwd/rombox.ucl"
1063 flash="$pwd/rockbox.ucl"
1064 plugins="yes"
1065 swcodec=""
1066 # toolset is the tools within the tools directory that we build for
1067 # this particular target.
1068 toolset=$archosbitmaptools
1069 t_cpu="sh"
1070 t_manufacturer="archos"
1071 t_model="recorder"
1074 2|archosfmrecorder)
1075 target_id=3
1076 modelname="archosfmrecorder"
1077 target="-DARCHOS_FMRECORDER"
1078 shcc
1079 tool="$rootdir/tools/scramble -fm"
1080 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1081 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1082 output="ajbrec.ajz"
1083 appextra="recorder:gui:radio"
1084 #archosrom="$pwd/rombox.ucl"
1085 flash="$pwd/rockbox.ucl"
1086 plugins="yes"
1087 swcodec=""
1088 # toolset is the tools within the tools directory that we build for
1089 # this particular target.
1090 toolset=$archosbitmaptools
1091 t_cpu="sh"
1092 t_manufacturer="archos"
1093 t_model="fm_v2"
1096 3|archosrecorderv2)
1097 target_id=4
1098 modelname="archosrecorderv2"
1099 target="-DARCHOS_RECORDERV2"
1100 shcc
1101 tool="$rootdir/tools/scramble -v2"
1102 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1103 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1104 output="ajbrec.ajz"
1105 appextra="recorder:gui:radio"
1106 #archosrom="$pwd/rombox.ucl"
1107 flash="$pwd/rockbox.ucl"
1108 plugins="yes"
1109 swcodec=""
1110 # toolset is the tools within the tools directory that we build for
1111 # this particular target.
1112 toolset=$archosbitmaptools
1113 t_cpu="sh"
1114 t_manufacturer="archos"
1115 t_model="fm_v2"
1118 4|archosondiosp)
1119 target_id=7
1120 modelname="archosondiosp"
1121 target="-DARCHOS_ONDIOSP"
1122 shcc
1123 tool="$rootdir/tools/scramble -osp"
1124 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1125 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1126 output="ajbrec.ajz"
1127 appextra="recorder:gui:radio"
1128 #archosrom="$pwd/rombox.ucl"
1129 flash="$pwd/rockbox.ucl"
1130 plugins="yes"
1131 swcodec=""
1132 # toolset is the tools within the tools directory that we build for
1133 # this particular target.
1134 toolset=$archosbitmaptools
1135 t_cpu="sh"
1136 t_manufacturer="archos"
1137 t_model="ondio"
1140 5|archosondiofm)
1141 target_id=8
1142 modelname="archosondiofm"
1143 target="-DARCHOS_ONDIOFM"
1144 shcc
1145 tool="$rootdir/tools/scramble -ofm"
1146 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1147 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1148 output="ajbrec.ajz"
1149 appextra="recorder:gui:radio"
1150 #archosrom="$pwd/rombox.ucl"
1151 flash="$pwd/rockbox.ucl"
1152 plugins="yes"
1153 swcodec=""
1154 toolset=$archosbitmaptools
1155 t_cpu="sh"
1156 t_manufacturer="archos"
1157 t_model="ondio"
1160 6|archosav300)
1161 target_id=38
1162 modelname="archosav300"
1163 target="-DARCHOS_AV300"
1164 memory=16 # always
1165 arm7tdmicc
1166 tool="$rootdir/tools/scramble -mm=C"
1167 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1168 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1169 output="cjbm.ajz"
1170 appextra="recorder:gui:radio"
1171 plugins="yes"
1172 swcodec=""
1173 # toolset is the tools within the tools directory that we build for
1174 # this particular target.
1175 toolset="$toolset scramble descramble bmp2rb"
1176 # architecture, manufacturer and model for the target-tree build
1177 t_cpu="arm"
1178 t_manufacturer="archos"
1179 t_model="av300"
1182 10|iriverh120)
1183 target_id=9
1184 modelname="iriverh120"
1185 target="-DIRIVER_H120"
1186 memory=32 # always
1187 coldfirecc
1188 tool="$rootdir/tools/scramble -add=h120"
1189 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1190 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1191 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1192 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1193 output="rockbox.iriver"
1194 bootoutput="bootloader.iriver"
1195 appextra="recorder:gui:radio"
1196 flash="$pwd/rombox.iriver"
1197 plugins="yes"
1198 swcodec="yes"
1199 # toolset is the tools within the tools directory that we build for
1200 # this particular target.
1201 toolset=$iriverbitmaptools
1202 t_cpu="coldfire"
1203 t_manufacturer="iriver"
1204 t_model="h100"
1207 11|iriverh300)
1208 target_id=10
1209 modelname="iriverh300"
1210 target="-DIRIVER_H300"
1211 memory=32 # always
1212 coldfirecc
1213 tool="$rootdir/tools/scramble -add=h300"
1214 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1215 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1216 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1217 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1218 output="rockbox.iriver"
1219 appextra="recorder:gui:radio"
1220 plugins="yes"
1221 swcodec="yes"
1222 # toolset is the tools within the tools directory that we build for
1223 # this particular target.
1224 toolset=$iriverbitmaptools
1225 t_cpu="coldfire"
1226 t_manufacturer="iriver"
1227 t_model="h300"
1230 12|iriverh100)
1231 target_id=11
1232 modelname="iriverh100"
1233 target="-DIRIVER_H100"
1234 memory=16 # always
1235 coldfirecc
1236 tool="$rootdir/tools/scramble -add=h100"
1237 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1238 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1239 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1240 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1241 output="rockbox.iriver"
1242 bootoutput="bootloader.iriver"
1243 appextra="recorder:gui:radio"
1244 flash="$pwd/rombox.iriver"
1245 plugins="yes"
1246 swcodec="yes"
1247 # toolset is the tools within the tools directory that we build for
1248 # this particular target.
1249 toolset=$iriverbitmaptools
1250 t_cpu="coldfire"
1251 t_manufacturer="iriver"
1252 t_model="h100"
1255 13|iriverifp7xx)
1256 target_id=19
1257 modelname="iriverifp7xx"
1258 target="-DIRIVER_IFP7XX"
1259 memory=1
1260 arm7tdmicc short
1261 tool="cp"
1262 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1263 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1264 output="rockbox.wma"
1265 appextra="recorder:gui:radio"
1266 plugins="yes"
1267 swcodec="yes"
1268 # toolset is the tools within the tools directory that we build for
1269 # this particular target.
1270 toolset=$genericbitmaptools
1271 t_cpu="arm"
1272 t_manufacturer="pnx0101"
1273 t_model="iriver-ifp7xx"
1276 14|iriverh10)
1277 target_id=22
1278 modelname="iriverh10"
1279 target="-DIRIVER_H10"
1280 memory=32 # always
1281 arm7tdmicc
1282 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1283 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1284 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1285 output="rockbox.mi4"
1286 appextra="recorder:gui:radio"
1287 plugins="yes"
1288 swcodec="yes"
1289 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1290 bootoutput="H10_20GC.mi4"
1291 # toolset is the tools within the tools directory that we build for
1292 # this particular target.
1293 toolset=$scramblebitmaptools
1294 # architecture, manufacturer and model for the target-tree build
1295 t_cpu="arm"
1296 t_manufacturer="iriver"
1297 t_model="h10"
1300 15|iriverh10_5gb)
1301 target_id=24
1302 modelname="iriverh10_5gb"
1303 target="-DIRIVER_H10_5GB"
1304 memory=32 # always
1305 arm7tdmicc
1306 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1307 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1308 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1309 output="rockbox.mi4"
1310 appextra="recorder:gui:radio"
1311 plugins="yes"
1312 swcodec="yes"
1313 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1314 bootoutput="H10.mi4"
1315 # toolset is the tools within the tools directory that we build for
1316 # this particular target.
1317 toolset=$scramblebitmaptools
1318 # architecture, manufacturer and model for the target-tree build
1319 t_cpu="arm"
1320 t_manufacturer="iriver"
1321 t_model="h10"
1324 20|ipodcolor)
1325 target_id=13
1326 modelname="ipodcolor"
1327 target="-DIPOD_COLOR"
1328 memory=32 # always
1329 arm7tdmicc
1330 tool="$rootdir/tools/scramble -add=ipco"
1331 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1332 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1333 output="rockbox.ipod"
1334 appextra="recorder:gui:radio"
1335 plugins="yes"
1336 swcodec="yes"
1337 bootoutput="bootloader-$modelname.ipod"
1338 # toolset is the tools within the tools directory that we build for
1339 # this particular target.
1340 toolset=$ipodbitmaptools
1341 # architecture, manufacturer and model for the target-tree build
1342 t_cpu="arm"
1343 t_manufacturer="ipod"
1344 t_model="color"
1347 21|ipodnano1g)
1348 target_id=14
1349 modelname="ipodnano1g"
1350 target="-DIPOD_NANO"
1351 memory=32 # always
1352 arm7tdmicc
1353 tool="$rootdir/tools/scramble -add=nano"
1354 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1355 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1356 output="rockbox.ipod"
1357 appextra="recorder:gui:radio"
1358 plugins="yes"
1359 swcodec="yes"
1360 bootoutput="bootloader-$modelname.ipod"
1361 # toolset is the tools within the tools directory that we build for
1362 # this particular target.
1363 toolset=$ipodbitmaptools
1364 # architecture, manufacturer and model for the target-tree build
1365 t_cpu="arm"
1366 t_manufacturer="ipod"
1367 t_model="nano"
1370 22|ipodvideo)
1371 target_id=15
1372 modelname="ipodvideo"
1373 target="-DIPOD_VIDEO"
1374 arm7tdmicc
1375 tool="$rootdir/tools/scramble -add=ipvd"
1376 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1377 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1378 output="rockbox.ipod"
1379 appextra="recorder:gui:radio"
1380 plugins="yes"
1381 swcodec="yes"
1382 bootoutput="bootloader-$modelname.ipod"
1383 # toolset is the tools within the tools directory that we build for
1384 # this particular target.
1385 toolset=$ipodbitmaptools
1386 # architecture, manufacturer and model for the target-tree build
1387 t_cpu="arm"
1388 t_manufacturer="ipod"
1389 t_model="video"
1392 23|ipod3g)
1393 target_id=16
1394 modelname="ipod3g"
1395 target="-DIPOD_3G"
1396 memory=32 # always
1397 arm7tdmicc
1398 tool="$rootdir/tools/scramble -add=ip3g"
1399 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1400 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1401 output="rockbox.ipod"
1402 appextra="recorder:gui:radio"
1403 plugins="yes"
1404 swcodec="yes"
1405 bootoutput="bootloader-$modelname.ipod"
1406 # toolset is the tools within the tools directory that we build for
1407 # this particular target.
1408 toolset=$ipodbitmaptools
1409 # architecture, manufacturer and model for the target-tree build
1410 t_cpu="arm"
1411 t_manufacturer="ipod"
1412 t_model="3g"
1415 24|ipod4g)
1416 target_id=17
1417 modelname="ipod4g"
1418 target="-DIPOD_4G"
1419 memory=32 # always
1420 arm7tdmicc
1421 tool="$rootdir/tools/scramble -add=ip4g"
1422 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1423 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1424 output="rockbox.ipod"
1425 appextra="recorder:gui:radio"
1426 plugins="yes"
1427 swcodec="yes"
1428 bootoutput="bootloader-$modelname.ipod"
1429 # toolset is the tools within the tools directory that we build for
1430 # this particular target.
1431 toolset=$ipodbitmaptools
1432 # architecture, manufacturer and model for the target-tree build
1433 t_cpu="arm"
1434 t_manufacturer="ipod"
1435 t_model="4g"
1438 25|ipodmini1g)
1439 target_id=18
1440 modelname="ipodmini1g"
1441 target="-DIPOD_MINI"
1442 memory=32 # always
1443 arm7tdmicc
1444 tool="$rootdir/tools/scramble -add=mini"
1445 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1446 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1447 output="rockbox.ipod"
1448 appextra="recorder:gui:radio"
1449 plugins="yes"
1450 swcodec="yes"
1451 bootoutput="bootloader-$modelname.ipod"
1452 # toolset is the tools within the tools directory that we build for
1453 # this particular target.
1454 toolset=$ipodbitmaptools
1455 # architecture, manufacturer and model for the target-tree build
1456 t_cpu="arm"
1457 t_manufacturer="ipod"
1458 t_model="mini"
1461 26|ipodmini2g)
1462 target_id=21
1463 modelname="ipodmini2g"
1464 target="-DIPOD_MINI2G"
1465 memory=32 # always
1466 arm7tdmicc
1467 tool="$rootdir/tools/scramble -add=mn2g"
1468 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1469 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1470 output="rockbox.ipod"
1471 appextra="recorder:gui:radio"
1472 plugins="yes"
1473 swcodec="yes"
1474 bootoutput="bootloader-$modelname.ipod"
1475 # toolset is the tools within the tools directory that we build for
1476 # this particular target.
1477 toolset=$ipodbitmaptools
1478 # architecture, manufacturer and model for the target-tree build
1479 t_cpu="arm"
1480 t_manufacturer="ipod"
1481 t_model="mini2g"
1484 27|ipod1g2g)
1485 target_id=29
1486 modelname="ipod1g2g"
1487 target="-DIPOD_1G2G"
1488 memory=32 # always
1489 arm7tdmicc
1490 tool="$rootdir/tools/scramble -add=1g2g"
1491 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1492 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1493 output="rockbox.ipod"
1494 appextra="recorder:gui:radio"
1495 plugins="yes"
1496 swcodec="yes"
1497 bootoutput="bootloader-$modelname.ipod"
1498 # toolset is the tools within the tools directory that we build for
1499 # this particular target.
1500 toolset=$ipodbitmaptools
1501 # architecture, manufacturer and model for the target-tree build
1502 t_cpu="arm"
1503 t_manufacturer="ipod"
1504 t_model="1g2g"
1507 28|ipodnano2g)
1508 target_id=62
1509 modelname="ipodnano2g"
1510 target="-DIPOD_NANO2G"
1511 memory=32 # always
1512 arm940tcc
1513 tool="$rootdir/tools/scramble -add=nn2g"
1514 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1515 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1516 output="rockbox.ipod"
1517 appextra="recorder:gui:radio"
1518 plugins="yes"
1519 swcodec="yes"
1520 bootoutput="bootloader-$modelname.ipod"
1521 # toolset is the tools within the tools directory that we build for
1522 # this particular target.
1523 toolset=$ipodbitmaptools
1524 # architecture, manufacturer and model for the target-tree build
1525 t_cpu="arm"
1526 t_manufacturer="s5l8700"
1527 t_model="ipodnano2g"
1530 30|iaudiox5)
1531 target_id=12
1532 modelname="iaudiox5"
1533 target="-DIAUDIO_X5"
1534 memory=16 # always
1535 coldfirecc
1536 tool="$rootdir/tools/scramble -add=iax5"
1537 boottool="$rootdir/tools/scramble -iaudiox5"
1538 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1539 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1540 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1541 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1542 output="rockbox.iaudio"
1543 bootoutput="x5_fw.bin"
1544 appextra="recorder:gui:radio"
1545 plugins="yes"
1546 swcodec="yes"
1547 # toolset is the tools within the tools directory that we build for
1548 # this particular target.
1549 toolset="$iaudiobitmaptools"
1550 # architecture, manufacturer and model for the target-tree build
1551 t_cpu="coldfire"
1552 t_manufacturer="iaudio"
1553 t_model="x5"
1556 31|iaudiom5)
1557 target_id=28
1558 modelname="iaudiom5"
1559 target="-DIAUDIO_M5"
1560 memory=16 # always
1561 coldfirecc
1562 tool="$rootdir/tools/scramble -add=iam5"
1563 boottool="$rootdir/tools/scramble -iaudiom5"
1564 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1565 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1566 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1567 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1568 output="rockbox.iaudio"
1569 bootoutput="m5_fw.bin"
1570 appextra="recorder:gui:radio"
1571 plugins="yes"
1572 swcodec="yes"
1573 # toolset is the tools within the tools directory that we build for
1574 # this particular target.
1575 toolset="$iaudiobitmaptools"
1576 # architecture, manufacturer and model for the target-tree build
1577 t_cpu="coldfire"
1578 t_manufacturer="iaudio"
1579 t_model="m5"
1582 32|iaudio7)
1583 target_id=32
1584 modelname="iaudio7"
1585 target="-DIAUDIO_7"
1586 memory=16 # always
1587 arm946cc
1588 tool="$rootdir/tools/scramble -add=i7"
1589 boottool="$rootdir/tools/scramble -tcc=crc"
1590 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1591 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1592 output="rockbox.iaudio"
1593 appextra="recorder:gui:radio"
1594 plugins="yes"
1595 swcodec="yes"
1596 bootoutput="I7_FW.BIN"
1597 # toolset is the tools within the tools directory that we build for
1598 # this particular target.
1599 toolset="$tccbitmaptools"
1600 # architecture, manufacturer and model for the target-tree build
1601 t_cpu="arm"
1602 t_manufacturer="tcc77x"
1603 t_model="iaudio7"
1606 33|cowond2)
1607 target_id=34
1608 modelname="cowond2"
1609 target="-DCOWON_D2"
1610 memory=32
1611 arm926ejscc
1612 tool="$rootdir/tools/scramble -add=d2"
1613 boottool="cp "
1614 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1615 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1616 output="rockbox.d2"
1617 bootoutput="bootloader-cowond2.bin"
1618 appextra="recorder:gui:radio"
1619 plugins="yes"
1620 swcodec="yes"
1621 toolset="$tccbitmaptools"
1622 # architecture, manufacturer and model for the target-tree build
1623 t_cpu="arm"
1624 t_manufacturer="tcc780x"
1625 t_model="cowond2"
1628 34|iaudiom3)
1629 target_id=37
1630 modelname="iaudiom3"
1631 target="-DIAUDIO_M3"
1632 memory=16 # always
1633 coldfirecc
1634 tool="$rootdir/tools/scramble -add=iam3"
1635 boottool="$rootdir/tools/scramble -iaudiom3"
1636 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1637 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1638 output="rockbox.iaudio"
1639 bootoutput="cowon_m3.bin"
1640 appextra="recorder:gui:radio"
1641 plugins="yes"
1642 swcodec="yes"
1643 # toolset is the tools within the tools directory that we build for
1644 # this particular target.
1645 toolset="$iaudiobitmaptools"
1646 # architecture, manufacturer and model for the target-tree build
1647 t_cpu="coldfire"
1648 t_manufacturer="iaudio"
1649 t_model="m3"
1652 40|gigabeatfx)
1653 target_id=20
1654 modelname="gigabeatfx"
1655 target="-DGIGABEAT_F"
1656 memory=32 # always
1657 arm9tdmicc
1658 tool="$rootdir/tools/scramble -add=giga"
1659 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1660 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1661 output="rockbox.gigabeat"
1662 appextra="recorder:gui:radio"
1663 plugins="yes"
1664 swcodec="yes"
1665 toolset=$gigabeatbitmaptools
1666 boottool="$rootdir/tools/scramble -gigabeat"
1667 bootoutput="FWIMG01.DAT"
1668 # architecture, manufacturer and model for the target-tree build
1669 t_cpu="arm"
1670 t_manufacturer="s3c2440"
1671 t_model="gigabeat-fx"
1674 41|gigabeats)
1675 target_id=26
1676 modelname="gigabeats"
1677 target="-DGIGABEAT_S"
1678 memory=64
1679 arm1136jfscc
1680 tool="$rootdir/tools/scramble -add=gigs"
1681 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1682 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1683 output="rockbox.gigabeat"
1684 appextra="recorder:gui:radio"
1685 plugins="yes"
1686 swcodec="yes"
1687 toolset="$gigabeatbitmaptools"
1688 boottool="$rootdir/tools/scramble -gigabeats"
1689 bootoutput="nk.bin"
1690 # architecture, manufacturer and model for the target-tree build
1691 t_cpu="arm"
1692 t_manufacturer="imx31"
1693 t_model="gigabeat-s"
1696 70|mrobe500)
1697 target_id=36
1698 modelname="mrobe500"
1699 target="-DMROBE_500"
1700 memory=64 # always
1701 arm926ejscc
1702 tool="$rootdir/tools/scramble -add=m500"
1703 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1704 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1705 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1706 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1707 output="rockbox.mrobe500"
1708 appextra="recorder:gui:radio"
1709 plugins="yes"
1710 swcodec="yes"
1711 toolset=$gigabeatbitmaptools
1712 boottool="cp "
1713 bootoutput="rockbox.mrboot"
1714 # architecture, manufacturer and model for the target-tree build
1715 t_cpu="arm"
1716 t_manufacturer="tms320dm320"
1717 t_model="mrobe-500"
1720 71|mrobe100)
1721 target_id=33
1722 modelname="mrobe100"
1723 target="-DMROBE_100"
1724 memory=32 # always
1725 arm7tdmicc
1726 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1727 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1728 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1729 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1730 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1731 output="rockbox.mi4"
1732 appextra="recorder:gui:radio"
1733 plugins="yes"
1734 swcodec="yes"
1735 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1736 bootoutput="pp5020.mi4"
1737 # toolset is the tools within the tools directory that we build for
1738 # this particular target.
1739 toolset=$scramblebitmaptools
1740 # architecture, manufacturer and model for the target-tree build
1741 t_cpu="arm"
1742 t_manufacturer="olympus"
1743 t_model="mrobe-100"
1746 80|logikdax)
1747 target_id=31
1748 modelname="logikdax"
1749 target="-DLOGIK_DAX"
1750 memory=2 # always
1751 arm946cc
1752 tool="$rootdir/tools/scramble -add=ldax"
1753 boottool="$rootdir/tools/scramble -tcc=crc"
1754 bootoutput="player.rom"
1755 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1756 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1757 output="rockbox.logik"
1758 appextra="recorder:gui:radio"
1759 plugins=""
1760 swcodec="yes"
1761 # toolset is the tools within the tools directory that we build for
1762 # this particular target.
1763 toolset=$tccbitmaptools
1764 # architecture, manufacturer and model for the target-tree build
1765 t_cpu="arm"
1766 t_manufacturer="tcc77x"
1767 t_model="logikdax"
1770 90|zenvisionm30gb)
1771 target_id=35
1772 modelname="zenvisionm30gb"
1773 target="-DCREATIVE_ZVM"
1774 memory=64
1775 arm926ejscc
1776 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1777 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1778 tool="$rootdir/tools/scramble -creative=zvm"
1779 USE_ELF="yes"
1780 output="rockbox.zvm"
1781 appextra="recorder:gui:radio"
1782 plugins="yes"
1783 swcodec="yes"
1784 toolset=$ipodbitmaptools
1785 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1786 bootoutput="rockbox.zvmboot"
1787 # architecture, manufacturer and model for the target-tree build
1788 t_cpu="arm"
1789 t_manufacturer="tms320dm320"
1790 t_model="creative-zvm"
1793 91|zenvisionm60gb)
1794 target_id=40
1795 modelname="zenvisionm60gb"
1796 target="-DCREATIVE_ZVM60GB"
1797 memory=64
1798 arm926ejscc
1799 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1800 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1801 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1802 USE_ELF="yes"
1803 output="rockbox.zvm60"
1804 appextra="recorder:gui:radio"
1805 plugins="yes"
1806 swcodec="yes"
1807 toolset=$ipodbitmaptools
1808 boottool="$rootdir/tools/scramble -creative=zvm60"
1809 bootoutput="rockbox.zvm60boot"
1810 # architecture, manufacturer and model for the target-tree build
1811 t_cpu="arm"
1812 t_manufacturer="tms320dm320"
1813 t_model="creative-zvm"
1816 92|zenvision)
1817 target_id=39
1818 modelname="zenvision"
1819 target="-DCREATIVE_ZV"
1820 memory=64
1821 arm926ejscc
1822 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1823 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1824 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1825 USE_ELF="yes"
1826 output="rockbox.zv"
1827 appextra="recorder:gui:radio"
1828 plugins=""
1829 swcodec="yes"
1830 toolset=$ipodbitmaptools
1831 boottool="$rootdir/tools/scramble -creative=zenvision"
1832 bootoutput="rockbox.zvboot"
1833 # architecture, manufacturer and model for the target-tree build
1834 t_cpu="arm"
1835 t_manufacturer="tms320dm320"
1836 t_model="creative-zvm"
1839 50|sansae200)
1840 target_id=23
1841 modelname="sansae200"
1842 target="-DSANSA_E200"
1843 memory=32 # supposedly
1844 arm7tdmicc
1845 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1846 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1847 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1848 output="rockbox.mi4"
1849 appextra="recorder:gui:radio"
1850 plugins="yes"
1851 swcodec="yes"
1852 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1853 bootoutput="PP5022.mi4"
1854 # toolset is the tools within the tools directory that we build for
1855 # this particular target.
1856 toolset=$scramblebitmaptools
1857 # architecture, manufacturer and model for the target-tree build
1858 t_cpu="arm"
1859 t_manufacturer="sandisk"
1860 t_model="sansa-e200"
1863 51|sansae200r)
1864 # the e200R model is pretty much identical to the e200, it only has a
1865 # different option to the scramble tool when building a bootloader and
1866 # makes the bootloader output file name in all lower case.
1867 target_id=27
1868 modelname="sansae200r"
1869 target="-DSANSA_E200"
1870 memory=32 # supposedly
1871 arm7tdmicc
1872 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1873 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1874 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1875 output="rockbox.mi4"
1876 appextra="recorder:gui:radio"
1877 plugins="yes"
1878 swcodec="yes"
1879 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1880 bootoutput="pp5022.mi4"
1881 # toolset is the tools within the tools directory that we build for
1882 # this particular target.
1883 toolset=$scramblebitmaptools
1884 # architecture, manufacturer and model for the target-tree build
1885 t_cpu="arm"
1886 t_manufacturer="sandisk"
1887 t_model="sansa-e200"
1890 52|sansac200)
1891 target_id=30
1892 modelname="sansac200"
1893 target="-DSANSA_C200"
1894 memory=32 # supposedly
1895 arm7tdmicc
1896 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1897 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1898 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1899 output="rockbox.mi4"
1900 appextra="recorder:gui:radio"
1901 plugins="yes"
1902 swcodec="yes"
1903 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1904 bootoutput="firmware.mi4"
1905 # toolset is the tools within the tools directory that we build for
1906 # this particular target.
1907 toolset=$scramblebitmaptools
1908 # architecture, manufacturer and model for the target-tree build
1909 t_cpu="arm"
1910 t_manufacturer="sandisk"
1911 t_model="sansa-c200"
1914 53|sansam200)
1915 target_id=48
1916 modelname="sansam200"
1917 target="-DSANSA_M200"
1918 memory=1 # always
1919 arm946cc
1920 tool="$rootdir/tools/scramble -add=m200"
1921 boottool="$rootdir/tools/scramble -tcc=crc"
1922 bootoutput="player.rom"
1923 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1924 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1925 output="rockbox.m200"
1926 appextra="recorder:gui:radio"
1927 plugins=""
1928 swcodec="yes"
1929 # toolset is the tools within the tools directory that we build for
1930 # this particular target.
1931 toolset=$tccbitmaptools
1932 # architecture, manufacturer and model for the target-tree build
1933 t_cpu="arm"
1934 t_manufacturer="tcc77x"
1935 t_model="m200"
1938 54|sansac100)
1939 target_id=42
1940 modelname="sansac100"
1941 target="-DSANSA_C100"
1942 memory=2
1943 arm946cc
1944 tool="$rootdir/tools/scramble -add=c100"
1945 boottool="$rootdir/tools/scramble -tcc=crc"
1946 bootoutput="player.rom"
1947 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1948 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1949 output="rockbox.c100"
1950 appextra="recorder:gui:radio"
1951 plugins=""
1952 swcodec="yes"
1953 # toolset is the tools within the tools directory that we build for
1954 # this particular target.
1955 toolset=$tccbitmaptools
1956 # architecture, manufacturer and model for the target-tree build
1957 t_cpu="arm"
1958 t_manufacturer="tcc77x"
1959 t_model="c100"
1962 55|sansaclip)
1963 target_id=50
1964 modelname="sansaclip"
1965 target="-DSANSA_CLIP"
1966 memory=2
1967 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1968 bmp2rb_native="$bmp2rb_mono"
1969 tool="$rootdir/tools/scramble -add=clip"
1970 output="rockbox.sansa"
1971 bootoutput="bootloader-clip.sansa"
1972 appextra="recorder:gui:radio"
1973 plugins="yes"
1974 swcodec="yes"
1975 toolset=$scramblebitmaptools
1976 t_cpu="arm"
1977 t_manufacturer="as3525"
1978 t_model="sansa-clip"
1979 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
1980 arm9tdmicc
1981 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1985 56|sansae200v2)
1986 target_id=51
1987 modelname="sansae200v2"
1988 target="-DSANSA_E200V2"
1989 memory=8
1990 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1991 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1992 tool="$rootdir/tools/scramble -add=e2v2"
1993 output="rockbox.sansa"
1994 bootoutput="bootloader-e200v2.sansa"
1995 appextra="recorder:gui:radio"
1996 plugins="yes"
1997 swcodec="yes"
1998 toolset=$scramblebitmaptools
1999 t_cpu="arm"
2000 t_manufacturer="as3525"
2001 t_model="sansa-e200v2"
2002 arm9tdmicc
2006 57|sansam200v4)
2007 target_id=52
2008 modelname="sansam200v4"
2009 target="-DSANSA_M200V4"
2010 memory=2
2011 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2012 bmp2rb_native="$bmp2rb_mono"
2013 tool="$rootdir/tools/scramble -add=m2v4"
2014 output="rockbox.sansa"
2015 bootoutput="bootloader-m200v4.sansa"
2016 appextra="recorder:gui:radio"
2017 plugins="yes"
2018 swcodec="yes"
2019 toolset=$scramblebitmaptools
2020 t_cpu="arm"
2021 t_manufacturer="as3525"
2022 t_model="sansa-m200v4"
2023 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2024 arm9tdmicc
2025 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2029 58|sansafuze)
2030 target_id=53
2031 modelname="sansafuze"
2032 target="-DSANSA_FUZE"
2033 memory=8
2034 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2035 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2036 tool="$rootdir/tools/scramble -add=fuze"
2037 output="rockbox.sansa"
2038 bootoutput="bootloader-fuze.sansa"
2039 appextra="recorder:gui:radio"
2040 plugins="yes"
2041 swcodec="yes"
2042 toolset=$scramblebitmaptools
2043 t_cpu="arm"
2044 t_manufacturer="as3525"
2045 t_model="sansa-fuze"
2046 arm9tdmicc
2050 59|sansac200v2)
2051 target_id=55
2052 modelname="sansac200v2"
2053 target="-DSANSA_C200V2"
2054 memory=2 # as per OF diagnosis mode
2055 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2056 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2057 tool="$rootdir/tools/scramble -add=c2v2"
2058 output="rockbox.sansa"
2059 bootoutput="bootloader-c200v2.sansa"
2060 appextra="recorder:gui:radio"
2061 plugins="yes"
2062 swcodec="yes"
2063 # toolset is the tools within the tools directory that we build for
2064 # this particular target.
2065 toolset=$scramblebitmaptools
2066 # architecture, manufacturer and model for the target-tree build
2067 t_cpu="arm"
2068 t_manufacturer="as3525"
2069 t_model="sansa-c200v2"
2070 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2071 arm9tdmicc
2072 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2075 60|sansaclipv2)
2076 target_id=60
2077 modelname="sansaclipv2"
2078 target="-DSANSA_CLIPV2"
2079 memory=8
2080 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2081 bmp2rb_native="$bmp2rb_mono"
2082 tool="$rootdir/tools/scramble -add=clv2"
2083 output="rockbox.sansa"
2084 bootoutput="bootloader-clipv2.sansa"
2085 appextra="recorder:gui:radio"
2086 plugins="yes"
2087 swcodec="yes"
2088 toolset=$scramblebitmaptools
2089 t_cpu="arm"
2090 t_manufacturer="as3525"
2091 t_model="sansa-clipv2"
2092 arm926ejscc
2095 61|sansaview)
2096 echo "Sansa View is not yet supported!"
2097 exit 1
2098 target_id=63
2099 modelname="sansaview"
2100 target="-DSANSA_VIEW"
2101 memory=32
2102 arm1176jzscc
2103 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2104 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2105 output="rockbox.mi4"
2106 appextra="gui"
2107 plugins=""
2108 swcodec="yes"
2109 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2110 bootoutput="firmware.mi4"
2111 # toolset is the tools within the tools directory that we build for
2112 # this particular target.
2113 toolset=$scramblebitmaptools
2114 t_cpu="arm"
2115 t_manufacturer="sandisk"
2116 t_model="sansa-view"
2119 62|sansaclipplus)
2120 target_id=66
2121 modelname="sansaclipplus"
2122 target="-DSANSA_CLIPPLUS"
2123 memory=8
2124 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2125 bmp2rb_native="$bmp2rb_mono"
2126 tool="$rootdir/tools/scramble -add=cli+"
2127 output="rockbox.sansa"
2128 bootoutput="bootloader-clipplus.sansa"
2129 appextra="recorder:gui:radio"
2130 plugins="yes"
2131 swcodec="yes"
2132 toolset=$scramblebitmaptools
2133 t_cpu="arm"
2134 t_manufacturer="as3525"
2135 t_model="sansa-clipplus"
2136 arm926ejscc
2139 63|sansafuzev2)
2140 target_id=68
2141 modelname="sansafuzev2"
2142 target="-DSANSA_FUZEV2"
2143 memory=8 # not sure
2144 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2145 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2146 tool="$rootdir/tools/scramble -add=fuz2"
2147 output="rockbox.sansa"
2148 bootoutput="bootloader-fuzev2.sansa"
2149 appextra="recorder:gui:radio"
2150 plugins="yes"
2151 swcodec="yes"
2152 toolset=$scramblebitmaptools
2153 t_cpu="arm"
2154 t_manufacturer="as3525"
2155 t_model="sansa-fuzev2"
2156 arm926ejscc
2159 150|tatungtpj1022)
2160 target_id=25
2161 modelname="tatungtpj1022"
2162 target="-DTATUNG_TPJ1022"
2163 memory=32 # always
2164 arm7tdmicc
2165 tool="$rootdir/tools/scramble -add tpj2"
2166 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2167 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2168 output="rockbox.elio"
2169 appextra="recorder:gui:radio"
2170 plugins="yes"
2171 swcodec="yes"
2172 boottool="$rootdir/tools/scramble -mi4v2"
2173 bootoutput="pp5020.mi4"
2174 # toolset is the tools within the tools directory that we build for
2175 # this particular target.
2176 toolset=$scramblebitmaptools
2177 # architecture, manufacturer and model for the target-tree build
2178 t_cpu="arm"
2179 t_manufacturer="tatung"
2180 t_model="tpj1022"
2183 100|gogearsa9200)
2184 target_id=41
2185 modelname="gogearsa9200"
2186 target="-DPHILIPS_SA9200"
2187 memory=32 # supposedly
2188 arm7tdmicc
2189 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2190 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2191 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2192 output="rockbox.mi4"
2193 appextra="recorder:gui:radio"
2194 plugins=""
2195 swcodec="yes"
2196 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2197 bootoutput="FWImage.ebn"
2198 # toolset is the tools within the tools directory that we build for
2199 # this particular target.
2200 toolset=$scramblebitmaptools
2201 # architecture, manufacturer and model for the target-tree build
2202 t_cpu="arm"
2203 t_manufacturer="philips"
2204 t_model="sa9200"
2207 101|gogearhdd1630)
2208 target_id=43
2209 modelname="gogearhdd1630"
2210 target="-DPHILIPS_HDD1630"
2211 memory=32 # supposedly
2212 arm7tdmicc
2213 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2214 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2215 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2216 output="rockbox.mi4"
2217 appextra="recorder:gui:radio"
2218 plugins="yes"
2219 swcodec="yes"
2220 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2221 bootoutput="FWImage.ebn"
2222 # toolset is the tools within the tools directory that we build for
2223 # this particular target.
2224 toolset=$scramblebitmaptools
2225 # architecture, manufacturer and model for the target-tree build
2226 t_cpu="arm"
2227 t_manufacturer="philips"
2228 t_model="hdd1630"
2231 102|gogearhdd6330)
2232 target_id=65
2233 modelname="gogearhdd6330"
2234 target="-DPHILIPS_HDD6330"
2235 memory=32 # supposedly
2236 arm7tdmicc
2237 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2238 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2239 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2240 output="rockbox.mi4"
2241 appextra="recorder:gui:radio"
2242 plugins=""
2243 swcodec="yes"
2244 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2245 bootoutput="FWImage.ebn"
2246 # toolset is the tools within the tools directory that we build for
2247 # this particular target.
2248 toolset=$scramblebitmaptools
2249 # architecture, manufacturer and model for the target-tree build
2250 t_cpu="arm"
2251 t_manufacturer="philips"
2252 t_model="hdd6330"
2255 110|meizum6sl)
2256 target_id=49
2257 modelname="meizum6sl"
2258 target="-DMEIZU_M6SL"
2259 memory=16 # always
2260 arm940tbecc
2261 tool="cp"
2262 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2263 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2264 output="rockbox.meizu"
2265 appextra="recorder:gui:radio"
2266 plugins="no" #FIXME
2267 swcodec="yes"
2268 toolset=$genericbitmaptools
2269 boottool="cp"
2270 bootoutput="rockboot.ebn"
2271 # architecture, manufacturer and model for the target-tree build
2272 t_cpu="arm"
2273 t_manufacturer="s5l8700"
2274 t_model="meizu-m6sl"
2277 111|meizum6sp)
2278 target_id=46
2279 modelname="meizum6sp"
2280 target="-DMEIZU_M6SP"
2281 memory=16 # always
2282 arm940tbecc
2283 tool="cp"
2284 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2285 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2286 output="rockbox.meizu"
2287 appextra="recorder:gui:radio"
2288 plugins="no" #FIXME
2289 swcodec="yes"
2290 toolset=$genericbitmaptools
2291 boottool="cp"
2292 bootoutput="rockboot.ebn"
2293 # architecture, manufacturer and model for the target-tree build
2294 t_cpu="arm"
2295 t_manufacturer="s5l8700"
2296 t_model="meizu-m6sp"
2299 112|meizum3)
2300 target_id=47
2301 modelname="meizum3"
2302 target="-DMEIZU_M3"
2303 memory=16 # always
2304 arm940tbecc
2305 tool="cp"
2306 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2307 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2308 output="rockbox.meizu"
2309 appextra="recorder:gui:radio"
2310 plugins="no" #FIXME
2311 swcodec="yes"
2312 toolset=$genericbitmaptools
2313 boottool="cp"
2314 bootoutput="rockboot.ebn"
2315 # architecture, manufacturer and model for the target-tree build
2316 t_cpu="arm"
2317 t_manufacturer="s5l8700"
2318 t_model="meizu-m3"
2321 120|ondavx747)
2322 target_id=45
2323 modelname="ondavx747"
2324 target="-DONDA_VX747"
2325 memory=16
2326 mipselcc
2327 tool="$rootdir/tools/scramble -add=x747"
2328 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2329 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2330 output="rockbox.vx747"
2331 appextra="recorder:gui:radio"
2332 plugins="yes"
2333 swcodec="yes"
2334 toolset=$genericbitmaptools
2335 boottool="$rootdir/tools/scramble -ccpmp"
2336 bootoutput="ccpmp.bin"
2337 # architecture, manufacturer and model for the target-tree build
2338 t_cpu="mips"
2339 t_manufacturer="ingenic_jz47xx"
2340 t_model="onda_vx747"
2343 121|ondavx767)
2344 target_id=64
2345 modelname="ondavx767"
2346 target="-DONDA_VX767"
2347 memory=16 #FIXME
2348 mipselcc
2349 tool="cp"
2350 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2351 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2352 output="rockbox.vx767"
2353 appextra="recorder:gui:radio"
2354 plugins="" #FIXME
2355 swcodec="yes"
2356 toolset=$genericbitmaptools
2357 boottool="$rootdir/tools/scramble -ccpmp"
2358 bootoutput="ccpmp.bin"
2359 # architecture, manufacturer and model for the target-tree build
2360 t_cpu="mips"
2361 t_manufacturer="ingenic_jz47xx"
2362 t_model="onda_vx767"
2365 122|ondavx747p)
2366 target_id=54
2367 modelname="ondavx747p"
2368 target="-DONDA_VX747P"
2369 memory=16
2370 mipselcc
2371 tool="$rootdir/tools/scramble -add=747p"
2372 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2373 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2374 output="rockbox.vx747p"
2375 appextra="recorder:gui:radio"
2376 plugins="yes"
2377 swcodec="yes"
2378 toolset=$genericbitmaptools
2379 boottool="$rootdir/tools/scramble -ccpmp"
2380 bootoutput="ccpmp.bin"
2381 # architecture, manufacturer and model for the target-tree build
2382 t_cpu="mips"
2383 t_manufacturer="ingenic_jz47xx"
2384 t_model="onda_vx747"
2387 123|ondavx777)
2388 target_id=61
2389 modelname="ondavx777"
2390 target="-DONDA_VX777"
2391 memory=16
2392 mipselcc
2393 tool="$rootdir/tools/scramble -add=x777"
2394 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2395 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2396 output="rockbox.vx777"
2397 appextra="recorder:gui:radio"
2398 plugins="yes"
2399 swcodec="yes"
2400 toolset=$genericbitmaptools
2401 boottool="$rootdir/tools/scramble -ccpmp"
2402 bootoutput="ccpmp.bin"
2403 # architecture, manufacturer and model for the target-tree build
2404 t_cpu="mips"
2405 t_manufacturer="ingenic_jz47xx"
2406 t_model="onda_vx747"
2409 130|lyreproto1)
2410 target_id=56
2411 modelname="lyreproto1"
2412 target="-DLYRE_PROTO1"
2413 memory=64
2414 arm926ejscc
2415 tool="cp"
2416 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2417 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2418 output="rockbox.lyre"
2419 appextra="recorder:gui:radio"
2420 plugins=""
2421 swcodec="yes"
2422 toolset=$scramblebitmaptools
2423 boottool="cp"
2424 bootoutput="bootloader-proto1.lyre"
2425 # architecture, manufacturer and model for the target-tree build
2426 t_cpu="arm"
2427 t_manufacturer="at91sam"
2428 t_model="lyre_proto1"
2431 131|mini2440)
2432 target_id=99
2433 modelname="mini2440"
2434 target="-DMINI2440"
2435 memory=64
2436 arm9tdmicc
2437 tool="$rootdir/tools/scramble -add=m244"
2438 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2439 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2440 output="rockbox.mini2440"
2441 appextra="recorder:gui:radio"
2442 plugins=""
2443 swcodec="yes"
2444 toolset=$scramblebitmaptools
2445 boottool="cp"
2446 bootoutput="bootloader-mini2440.lyre"
2447 # architecture, manufacturer and model for the target-tree build
2448 t_cpu="arm"
2449 t_manufacturer="s3c2440"
2450 t_model="mini2440"
2453 140|samsungyh820)
2454 target_id=57
2455 modelname="samsungyh820"
2456 target="-DSAMSUNG_YH820"
2457 memory=32 # always
2458 arm7tdmicc
2459 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2460 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2461 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2462 output="rockbox.mi4"
2463 appextra="recorder:gui:radio"
2464 plugins="yes"
2465 swcodec="yes"
2466 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2467 bootoutput="FW_YH820.mi4"
2468 # toolset is the tools within the tools directory that we build for
2469 # this particular target.
2470 toolset=$scramblebitmaptools
2471 # architecture, manufacturer and model for the target-tree build
2472 t_cpu="arm"
2473 t_manufacturer="samsung"
2474 t_model="yh820"
2477 141|samsungyh920)
2478 target_id=58
2479 modelname="samsungyh920"
2480 target="-DSAMSUNG_YH920"
2481 memory=32 # always
2482 arm7tdmicc
2483 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2484 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2485 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2486 output="rockbox.mi4"
2487 appextra="recorder:gui:radio"
2488 plugins="yes"
2489 swcodec="yes"
2490 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2491 bootoutput="PP5020.mi4"
2492 # toolset is the tools within the tools directory that we build for
2493 # this particular target.
2494 toolset=$scramblebitmaptools
2495 # architecture, manufacturer and model for the target-tree build
2496 t_cpu="arm"
2497 t_manufacturer="samsung"
2498 t_model="yh920"
2501 142|samsungyh925)
2502 target_id=59
2503 modelname="samsungyh925"
2504 target="-DSAMSUNG_YH925"
2505 memory=32 # always
2506 arm7tdmicc
2507 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2508 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2509 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2510 output="rockbox.mi4"
2511 appextra="recorder:gui:radio"
2512 plugins="yes"
2513 swcodec="yes"
2514 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2515 bootoutput="FW_YH925.mi4"
2516 # toolset is the tools within the tools directory that we build for
2517 # this particular target.
2518 toolset=$scramblebitmaptools
2519 # architecture, manufacturer and model for the target-tree build
2520 t_cpu="arm"
2521 t_manufacturer="samsung"
2522 t_model="yh925"
2525 143|samsungyps3)
2526 target_id=60
2527 modelname="samsungyps3"
2528 target="-DSAMSUNG_YPS3"
2529 memory=16 # always
2530 arm940tbecc
2531 tool="cp"
2532 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2533 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2534 output="rockbox.yps3"
2535 appextra="recorder:gui:radio"
2536 plugins="no" #FIXME
2537 swcodec="yes"
2538 toolset=$genericbitmaptools
2539 boottool="cp"
2540 bootoutput="rockboot.ebn"
2541 # architecture, manufacturer and model for the target-tree build
2542 t_cpu="arm"
2543 t_manufacturer="s5l8700"
2544 t_model="yps3"
2547 160|vibe500)
2548 target_id=67
2549 modelname="vibe500"
2550 target="-DPBELL_VIBE500"
2551 memory=32 # always
2552 arm7tdmicc
2553 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2554 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2555 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2556 output="rockbox.mi4"
2557 appextra="recorder:gui:radio"
2558 plugins="yes"
2559 swcodec="yes"
2560 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2561 bootoutput="jukebox.mi4"
2562 # toolset is the tools within the tools directory that we build for
2563 # this particular target.
2564 toolset=$scramblebitmaptools
2565 # architecture, manufacturer and model for the target-tree build
2566 t_cpu="arm"
2567 t_manufacturer="pbell"
2568 t_model="vibe500"
2571 170|hd200)
2572 target_id=69
2573 modelname="mpiohd200"
2574 target="-DMPIO_HD200"
2575 memory=16 # always
2576 coldfirecc
2577 tool="$rootdir/tools/scramble -add=hd20"
2578 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2579 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2580 output="rockbox.mpio"
2581 bootoutput="bootloader.mpio"
2582 appextra="recorder:gui:radio"
2583 plugins="yes"
2584 swcodec="yes"
2585 # toolset is the tools within the tools directory that we build for
2586 # this particular target.
2587 toolset="$genericbitmaptools"
2588 # architecture, manufacturer and model for the target-tree build
2589 t_cpu="coldfire"
2590 t_manufacturer="mpio"
2591 t_model="hd200"
2595 echo "Please select a supported target platform!"
2596 exit 7
2599 esac
2601 echo "Platform set to $modelname"
2604 #remove start
2605 ############################################################################
2606 # Amount of memory, for those that can differ. They have $memory unset at
2607 # this point.
2610 if [ -z "$memory" ]; then
2611 case $target_id in
2613 if [ "$ARG_RAM" ]; then
2614 size=$ARG_RAM
2615 else
2616 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2617 size=`input`;
2619 case $size in
2620 60|64)
2621 memory="64"
2624 memory="32"
2626 esac
2629 if [ "$ARG_RAM" ]; then
2630 size=$ARG_RAM
2631 else
2632 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2633 size=`input`;
2635 case $size in
2637 memory="8"
2640 memory="2"
2642 esac
2644 esac
2645 echo "Memory size selected: $memory MB"
2646 [ "$ARG_TYPE" ] || echo ""
2648 #remove end
2650 ##################################################################
2651 # Figure out build "type"
2654 # the ifp7x0 is the only platform that supports building a gdb stub like
2655 # this
2656 case $modelname in
2657 iriverifp7xx)
2658 gdbstub="(G)DB stub, "
2660 sansae200r|sansae200)
2661 gdbstub="(I)nstaller, "
2663 sansac200)
2664 gdbstub="(E)raser, "
2668 esac
2669 if [ "$ARG_TYPE" ]; then
2670 btype=$ARG_TYPE
2671 else
2672 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2673 btype=`input`;
2676 case $btype in
2677 [Ii])
2678 appsdir='\$(ROOTDIR)/bootloader'
2679 apps="bootloader"
2680 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2681 bootloader="1"
2682 echo "e200R-installer build selected"
2684 [Ee])
2685 appsdir='\$(ROOTDIR)/bootloader'
2686 apps="bootloader"
2687 echo "C2(4)0 or C2(5)0"
2688 variant=`input`
2689 case $variant in
2691 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2692 echo "c240 eraser build selected"
2695 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2696 echo "c240 eraser build selected"
2698 esac
2699 bootloader="1"
2700 echo "c200 eraser build selected"
2702 [Bb])
2703 if test $t_manufacturer = "archos"; then
2704 # Archos SH-based players do this somewhat differently for
2705 # some reason
2706 appsdir='\$(ROOTDIR)/flash/bootbox'
2707 apps="bootbox"
2708 else
2709 appsdir='\$(ROOTDIR)/bootloader'
2710 apps="bootloader"
2711 flash=""
2712 if test -n "$boottool"; then
2713 tool="$boottool"
2715 if test -n "$bootoutput"; then
2716 output=$bootoutput
2719 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2720 bootloader="1"
2721 echo "Bootloader build selected"
2723 [Ss])
2724 if [ "$modelname" = "sansae200r" ]; then
2725 echo "Do not use the e200R target for simulator builds. Use e200 instead."
2726 exit 8
2728 debug="-DDEBUG"
2729 simulator="yes"
2730 extradefines="-DSIMULATOR"
2731 archosrom=""
2732 flash=""
2733 echo "Simulator build selected"
2735 [Aa]*)
2736 echo "Advanced build selected"
2737 whichadvanced $btype
2739 [Gg])
2740 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2741 appsdir='\$(ROOTDIR)/gdb'
2742 apps="stub"
2743 case $modelname in
2744 iriverifp7xx)
2745 output="stub.wma"
2749 esac
2750 echo "GDB stub build selected"
2752 [Mm])
2753 toolset='';
2754 apps="manual"
2755 echo "Manual build selected"
2757 [Cc])
2758 uname=`uname`
2759 simcc "checkwps"
2760 toolset='';
2761 t_cpu='';
2762 GCCOPTS='';
2763 extradefines="-DDEBUG"
2764 appsdir='\$(ROOTDIR)/tools/checkwps';
2765 output='checkwps.'${modelname};
2766 archosrom='';
2767 echo "CheckWPS build selected"
2769 [Dd])
2770 uname=`uname`
2771 simcc "database"
2772 toolset='';
2773 t_cpu='';
2774 GCCOPTS='';
2775 appsdir='\$(ROOTDIR)/tools/database';
2776 archosrom='';
2778 case $uname in
2779 CYGWIN*|MINGW*)
2780 output="database_${modelname}.exe"
2783 output='database.'${modelname};
2785 esac
2787 echo "Database tool build selected"
2790 if [ "$modelname" = "sansae200r" ]; then
2791 echo "Do not use the e200R target for regular builds. Use e200 instead."
2792 exit 8
2794 debug=""
2795 btype="N" # set it explicitly since RET only gets here as well
2796 echo "Normal build selected"
2799 esac
2800 # to be able running "make manual" from non-manual configuration
2801 case $modelname in
2802 archosrecorderv2)
2803 manualdev="archosfmrecorder"
2805 iriverh1??)
2806 manualdev="iriverh100"
2808 ipodmini2g)
2809 manualdev="ipodmini1g"
2812 manualdev=$modelname
2814 esac
2816 if [ -z "$debug" ]; then
2817 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2820 echo "Using source code root directory: $rootdir"
2822 # this was once possible to change at build-time, but no more:
2823 language="english"
2825 uname=`uname`
2827 if [ "yes" = "$simulator" ]; then
2828 # setup compiler and things for simulator
2829 simcc "sdl"
2831 if [ -d "simdisk" ]; then
2832 echo "Subdirectory 'simdisk' already present"
2833 else
2834 mkdir simdisk
2835 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2839 # Now, figure out version number of the (gcc) compiler we are about to use
2840 gccver=`$CC -dumpversion`;
2842 # figure out the binutil version too and display it, mostly for the build
2843 # system etc to be able to see it easier
2844 if [ $uname = "Darwin" ]; then
2845 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2846 else
2847 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2850 if [ -z "$gccver" ]; then
2851 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
2852 echo "[WARNING] this may cause your build to fail since we cannot do the"
2853 echo "[WARNING] checks we want now."
2854 else
2856 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2857 # DEPEND on it
2859 num1=`echo $gccver | cut -d . -f1`
2860 num2=`echo $gccver | cut -d . -f2`
2861 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2863 # This makes:
2864 # 3.3.X => 303
2865 # 3.4.X => 304
2866 # 2.95.3 => 295
2868 echo "Using $CC $gccver ($gccnum)"
2870 if test "$gccnum" -ge "400"; then
2871 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2872 # so we ignore that warnings for now
2873 # -Wno-pointer-sign
2874 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2877 if test "$gccnum" -ge "402"; then
2878 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2879 # and later would throw it for several valid cases
2880 GCCOPTS="$GCCOPTS -Wno-override-init"
2883 case $prefix in
2884 ""|"$CROSS_COMPILE")
2885 # simulator
2887 i586-mingw32msvc-)
2888 # cross-compile for win32
2891 # Verify that the cross-compiler is of a recommended version!
2892 if test "$gccver" != "$gccchoice"; then
2893 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2894 echo "WARNING: version $gccchoice!"
2895 echo "WARNING: This may cause your build to fail since it may be a version"
2896 echo "WARNING: that isn't functional or known to not be the best choice."
2897 echo "WARNING: If you suffer from build problems, you know that this is"
2898 echo "WARNING: a likely source for them..."
2901 esac
2906 echo "Using $LD $ldver"
2908 # check the compiler for SH platforms
2909 if test "$CC" = "sh-elf-gcc"; then
2910 if test "$gccnum" -lt "400"; then
2911 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2912 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2913 else
2914 # figure out patch status
2915 gccpatch=`$CC --version`;
2917 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2918 echo "gcc $gccver is rockbox patched"
2919 # then convert -O to -Os to get smaller binaries!
2920 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2921 else
2922 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2923 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2928 if test "$CC" = "m68k-elf-gcc"; then
2929 # convert -O to -Os to get smaller binaries!
2930 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2933 if [ "$ARG_CCACHE" = "1" ]; then
2934 echo "Enable ccache for building"
2935 ccache="ccache"
2936 elif [ "$ARG_CCACHE" != "0" ]; then
2937 ccache=`findtool ccache`
2938 if test -n "$ccache"; then
2939 echo "Found and uses ccache ($ccache)"
2943 # figure out the full path to the various commands if possible
2944 HOSTCC=`findtool gcc --lit`
2945 HOSTAR=`findtool ar --lit`
2946 CC=`findtool ${CC} --lit`
2947 LD=`findtool ${AR} --lit`
2948 AR=`findtool ${AR} --lit`
2949 AS=`findtool ${AS} --lit`
2950 OC=`findtool ${OC} --lit`
2951 WINDRES=`findtool ${WINDRES} --lit`
2952 DLLTOOL=`findtool ${DLLTOOL} --lit`
2953 DLLWRAP=`findtool ${DLLWRAP} --lit`
2954 RANLIB=`findtool ${RANLIB} --lit`
2956 if test "$ARG_ARM_THUMB" = "1"; then
2957 extradefines="$extradefines -DUSE_THUMB"
2958 CC="$toolsdir/thumb-cc.py $CC"
2961 if test -n "$ccache"; then
2962 CC="$ccache $CC"
2965 if test "X$endian" = "Xbig"; then
2966 defendian="ROCKBOX_BIG_ENDIAN"
2967 else
2968 defendian="ROCKBOX_LITTLE_ENDIAN"
2971 if [ "$ARG_RBDIR" ]; then
2972 rbdir=$ARG_RBDIR
2973 echo "Using alternate rockbox dir: ${rbdir}"
2976 sed > autoconf.h \
2977 -e "s,@ENDIAN@,${defendian},g" \
2978 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2979 -e "s,^#undef DO_BOOTCHART,$use_bootchart,g" \
2980 -e "s,@config_rtc@,$config_rtc,g" \
2981 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2982 -e "s,@RBDIR@,${rbdir},g" \
2983 -e "s,@have_backlight@,$have_backlight,g" \
2984 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
2985 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
2986 <<EOF
2987 /* This header was made by configure */
2988 #ifndef __BUILD_AUTOCONF_H
2989 #define __BUILD_AUTOCONF_H
2991 /* Define endianess for the target or simulator platform */
2992 #define @ENDIAN@ 1
2994 /* Define this if you build rockbox to support the logf logging and display */
2995 #undef ROCKBOX_HAS_LOGF
2997 /* Define this to record a chart with timings for the stages of boot */
2998 #undef DO_BOOTCHART
3000 /* optional define for a backlight modded Ondio */
3001 @have_backlight@
3003 /* optional define for FM radio mod for iAudio M5 */
3004 @have_fmradio_in@
3006 /* optional define for ATA poweroff on Player */
3007 @have_ata_poweroff@
3009 /* optional defines for RTC mod for h1x0 */
3010 @config_rtc@
3011 @have_rtc_alarm@
3013 /* root of Rockbox */
3014 #define ROCKBOX_DIR "/@RBDIR@"
3016 #endif /* __BUILD_AUTOCONF_H */
3019 if test -n "$t_cpu"; then
3020 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3021 if [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3022 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/"
3023 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/"
3025 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3026 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3027 GCCOPTS="$GCCOPTS"
3030 if test "$simulator" = "yes"; then
3031 # add simul make stuff on the #SIMUL# line
3032 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
3033 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
3034 else
3035 # delete the lines that match
3036 simmagic1='/@SIMUL1@/D'
3037 simmagic2='/@SIMUL2@/D'
3040 if test "$swcodec" = "yes"; then
3041 voicetoolset="rbspeexenc voicefont wavtrim"
3042 else
3043 voicetoolset="voicefont wavtrim"
3046 if test "$apps" = "apps"; then
3047 # only when we build "real" apps we build the .lng files
3048 buildlangs="langs"
3051 #### Fix the cmdline ###
3052 if [ "$ARG_CCACHE" = "1" ]; then
3053 cmdline="--ccache "
3054 elif [ "$ARG_CCACHE" = "0" ]; then
3055 cmdline="--no-ccache "
3057 if [ "$ARG_ARM_EABI" = "1" ]; then
3058 cmdline="$cmdline--eabi "
3061 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3062 ### end of cmdline
3064 sed > Makefile \
3065 -e "s,@ROOTDIR@,${rootdir},g" \
3066 -e "s,@DEBUG@,${debug},g" \
3067 -e "s,@MEMORY@,${memory},g" \
3068 -e "s,@TARGET_ID@,${target_id},g" \
3069 -e "s,@TARGET@,${target},g" \
3070 -e "s,@CPU@,${t_cpu},g" \
3071 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
3072 -e "s,@MODELNAME@,${modelname},g" \
3073 -e "s,@LANGUAGE@,${language},g" \
3074 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3075 -e "s,@PWD@,${pwd},g" \
3076 -e "s,@HOSTCC@,${HOSTCC},g" \
3077 -e "s,@HOSTAR@,${HOSTAR},g" \
3078 -e "s,@CC@,${CC},g" \
3079 -e "s,@LD@,${LD},g" \
3080 -e "s,@AR@,${AR},g" \
3081 -e "s,@AS@,${AS},g" \
3082 -e "s,@OC@,${OC},g" \
3083 -e "s,@WINDRES@,${WINDRES},g" \
3084 -e "s,@DLLTOOL@,${DLLTOOL},g" \
3085 -e "s,@DLLWRAP@,${DLLWRAP},g" \
3086 -e "s,@RANLIB@,${RANLIB},g" \
3087 -e "s,@TOOL@,${tool},g" \
3088 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
3089 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
3090 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
3091 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
3092 -e "s,@OUTPUT@,${output},g" \
3093 -e "s,@APPEXTRA@,${appextra},g" \
3094 -e "s,@ARCHOSROM@,${archosrom},g" \
3095 -e "s,@FLASHFILE@,${flash},g" \
3096 -e "s,@PLUGINS@,${plugins},g" \
3097 -e "s,@CODECS@,${swcodec},g" \
3098 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
3099 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
3100 -e "s,@GCCOPTS@,${GCCOPTS},g" \
3101 -e "s,@TARGET_INC@,${TARGET_INC},g" \
3102 -e "s!@LDOPTS@!${LDOPTS}!g" \
3103 -e "s,@LOADADDRESS@,${loadaddress},g" \
3104 -e "s,@EXTRADEF@,${extradefines},g" \
3105 -e "s,@APPSDIR@,${appsdir},g" \
3106 -e "s,@FIRMDIR@,${firmdir},g" \
3107 -e "s,@TOOLSDIR@,${toolsdir},g" \
3108 -e "s,@APPS@,${apps},g" \
3109 -e "s,@SIMVER@,${simver},g" \
3110 -e "s,@GCCVER@,${gccver},g" \
3111 -e "s,@GCCNUM@,${gccnum},g" \
3112 -e "s,@UNAME@,${uname},g" \
3113 -e "s,@ENDIAN@,${defendian},g" \
3114 -e "s,@TOOLSET@,${toolset},g" \
3115 -e "${simmagic1}" \
3116 -e "${simmagic2}" \
3117 -e "s,@MANUALDEV@,${manualdev},g" \
3118 -e "s,@ENCODER@,${ENC_CMD},g" \
3119 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
3120 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
3121 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
3122 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
3123 -e "s,@LANGS@,${buildlangs},g" \
3124 -e "s,@USE_ELF@,${USE_ELF},g" \
3125 -e "s,@RBDIR@,${rbdir},g" \
3126 -e "s,@PREFIX@,$PREFIX,g" \
3127 -e "s,@CMDLINE@,$cmdline,g" \
3128 -e "s,@SDLCONFIG@,$sdl,g" \
3129 <<EOF
3130 ## Automatically generated. http://www.rockbox.org/
3132 export ROOTDIR=@ROOTDIR@
3133 export FIRMDIR=@FIRMDIR@
3134 export APPSDIR=@APPSDIR@
3135 export TOOLSDIR=@TOOLSDIR@
3136 export DOCSDIR=\$(ROOTDIR)/docs
3137 export MANUALDIR=\${ROOTDIR}/manual
3138 export DEBUG=@DEBUG@
3139 export MODELNAME=@MODELNAME@
3140 export ARCHOSROM=@ARCHOSROM@
3141 export FLASHFILE=@FLASHFILE@
3142 export TARGET_ID=@TARGET_ID@
3143 export TARGET=@TARGET@
3144 export CPU=@CPU@
3145 export MANUFACTURER=@MANUFACTURER@
3146 export OBJDIR=@PWD@
3147 export BUILDDIR=@PWD@
3148 export LANGUAGE=@LANGUAGE@
3149 export VOICELANGUAGE=@VOICELANGUAGE@
3150 export MEMORYSIZE=@MEMORY@
3151 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3152 export MKFIRMWARE=@TOOL@
3153 export BMP2RB_MONO=@BMP2RB_MONO@
3154 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3155 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3156 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3157 export BINARY=@OUTPUT@
3158 export APPEXTRA=@APPEXTRA@
3159 export ENABLEDPLUGINS=@PLUGINS@
3160 export SOFTWARECODECS=@CODECS@
3161 export EXTRA_DEFINES=@EXTRADEF@
3162 export HOSTCC=@HOSTCC@
3163 export HOSTAR=@HOSTAR@
3164 export CC=@CC@
3165 export LD=@LD@
3166 export AR=@AR@
3167 export AS=@AS@
3168 export OC=@OC@
3169 export WINDRES=@WINDRES@
3170 export DLLTOOL=@DLLTOOL@
3171 export DLLWRAP=@DLLWRAP@
3172 export RANLIB=@RANLIB@
3173 export PREFIX=@PREFIX@
3174 export PROFILE_OPTS=@PROFILE_OPTS@
3175 export SIMVER=@SIMVER@
3176 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3177 export GCCOPTS=@GCCOPTS@
3178 export TARGET_INC=@TARGET_INC@
3179 export LOADADDRESS=@LOADADDRESS@
3180 export SHARED_FLAG=@SHARED_FLAG@
3181 export LDOPTS=@LDOPTS@
3182 export GCCVER=@GCCVER@
3183 export GCCNUM=@GCCNUM@
3184 export UNAME=@UNAME@
3185 export MANUALDEV=@MANUALDEV@
3186 export TTS_OPTS=@TTS_OPTS@
3187 export TTS_ENGINE=@TTS_ENGINE@
3188 export ENC_OPTS=@ENC_OPTS@
3189 export ENCODER=@ENCODER@
3190 export USE_ELF=@USE_ELF@
3191 export RBDIR=@RBDIR@
3192 export SDLCONFIG=@SDLCONFIG@
3194 CONFIGURE_OPTIONS=@CMDLINE@
3196 include \$(TOOLSDIR)/root.make
3200 echo "Created Makefile"