Merge branch 'master' into gsoc-app-target
[kugel-rb.git] / tools / configure
blob0fd74d7ef022410ddabe250fa9f4442df333eb79
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="ipod4g 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== == Application ==
966 170) HD200 200) SDL 320x240
970 buildfor=`input`;
973 # Set of tools built for all target platforms:
974 toolset="rdf2binary convbdf codepages"
976 # Toolsets for some target families:
977 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
978 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
979 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
980 ipodbitmaptools="$toolset scramble bmp2rb"
981 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
982 tccbitmaptools="$toolset scramble bmp2rb"
983 # generic is used by IFP, Meizu and Onda
984 genericbitmaptools="$toolset bmp2rb"
985 # scramble is used by all other targets
986 scramblebitmaptools="$genericbitmaptools scramble"
989 # ---- For each target ----
991 # *Variables*
992 # target_id: a unique number identifying this target, IS NOT the menu number.
993 # Just use the currently highest number+1 when you add a new
994 # target.
995 # modelname: short model name used all over to identify this target
996 # memory: number of megabytes of RAM this target has. If the amount can
997 # be selected by the size prompt, let memory be unset here
998 # target: -Ddefine passed to the build commands to make the correct
999 # config-*.h file get included etc
1000 # tool: the tool that takes a plain binary and converts that into a
1001 # working "firmware" file for your target
1002 # output: the final output file name
1003 # boottool: the tool that takes a plain binary and generates a bootloader
1004 # file for your target (or blank to use $tool)
1005 # bootoutput:the final output file name for the bootloader (or blank to use
1006 # $output)
1007 # appextra: passed to the APPEXTRA variable in the Makefiles.
1008 # TODO: add proper explanation
1009 # archosrom: used only for Archos targets that build a special flashable .ucl
1010 # image.
1011 # flash: name of output for flashing, for targets where there's a special
1012 # file output for this.
1013 # plugins: set to 'yes' to build the plugins. Early development builds can
1014 # set this to no in the early stages to have an easier life for a
1015 # while
1016 # swcodec: set 'yes' on swcodec targets
1017 # toolset: lists what particular tools in the tools/ directory that this
1018 # target needs to have built prior to building Rockbox
1020 # *Functions*
1021 # *cc: sets up gcc and compiler options for your target builds. Note
1022 # that if you select a simulator build, the compiler selection is
1023 # overridden later in the script.
1025 case $buildfor in
1027 0|archosplayer)
1028 target_id=1
1029 modelname="archosplayer"
1030 target="-DARCHOS_PLAYER"
1031 shcc
1032 tool="$rootdir/tools/scramble"
1033 output="archos.mod"
1034 appextra="player:gui"
1035 archosrom="$pwd/rombox.ucl"
1036 flash="$pwd/rockbox.ucl"
1037 plugins="yes"
1038 swcodec=""
1040 # toolset is the tools within the tools directory that we build for
1041 # this particular target.
1042 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1044 # Note: the convbdf is present in the toolset just because: 1) the
1045 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1046 # build the player simulator
1048 t_cpu="sh"
1049 t_manufacturer="archos"
1050 t_model="player"
1053 1|archosrecorder)
1054 target_id=2
1055 modelname="archosrecorder"
1056 target="-DARCHOS_RECORDER"
1057 shcc
1058 tool="$rootdir/tools/scramble"
1059 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1060 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1061 output="ajbrec.ajz"
1062 appextra="recorder:gui:radio"
1063 #archosrom="$pwd/rombox.ucl"
1064 flash="$pwd/rockbox.ucl"
1065 plugins="yes"
1066 swcodec=""
1067 # toolset is the tools within the tools directory that we build for
1068 # this particular target.
1069 toolset=$archosbitmaptools
1070 t_cpu="sh"
1071 t_manufacturer="archos"
1072 t_model="recorder"
1075 2|archosfmrecorder)
1076 target_id=3
1077 modelname="archosfmrecorder"
1078 target="-DARCHOS_FMRECORDER"
1079 shcc
1080 tool="$rootdir/tools/scramble -fm"
1081 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1082 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1083 output="ajbrec.ajz"
1084 appextra="recorder:gui:radio"
1085 #archosrom="$pwd/rombox.ucl"
1086 flash="$pwd/rockbox.ucl"
1087 plugins="yes"
1088 swcodec=""
1089 # toolset is the tools within the tools directory that we build for
1090 # this particular target.
1091 toolset=$archosbitmaptools
1092 t_cpu="sh"
1093 t_manufacturer="archos"
1094 t_model="fm_v2"
1097 3|archosrecorderv2)
1098 target_id=4
1099 modelname="archosrecorderv2"
1100 target="-DARCHOS_RECORDERV2"
1101 shcc
1102 tool="$rootdir/tools/scramble -v2"
1103 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1104 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1105 output="ajbrec.ajz"
1106 appextra="recorder:gui:radio"
1107 #archosrom="$pwd/rombox.ucl"
1108 flash="$pwd/rockbox.ucl"
1109 plugins="yes"
1110 swcodec=""
1111 # toolset is the tools within the tools directory that we build for
1112 # this particular target.
1113 toolset=$archosbitmaptools
1114 t_cpu="sh"
1115 t_manufacturer="archos"
1116 t_model="fm_v2"
1119 4|archosondiosp)
1120 target_id=7
1121 modelname="archosondiosp"
1122 target="-DARCHOS_ONDIOSP"
1123 shcc
1124 tool="$rootdir/tools/scramble -osp"
1125 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1126 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1127 output="ajbrec.ajz"
1128 appextra="recorder:gui:radio"
1129 #archosrom="$pwd/rombox.ucl"
1130 flash="$pwd/rockbox.ucl"
1131 plugins="yes"
1132 swcodec=""
1133 # toolset is the tools within the tools directory that we build for
1134 # this particular target.
1135 toolset=$archosbitmaptools
1136 t_cpu="sh"
1137 t_manufacturer="archos"
1138 t_model="ondio"
1141 5|archosondiofm)
1142 target_id=8
1143 modelname="archosondiofm"
1144 target="-DARCHOS_ONDIOFM"
1145 shcc
1146 tool="$rootdir/tools/scramble -ofm"
1147 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1148 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1149 output="ajbrec.ajz"
1150 appextra="recorder:gui:radio"
1151 #archosrom="$pwd/rombox.ucl"
1152 flash="$pwd/rockbox.ucl"
1153 plugins="yes"
1154 swcodec=""
1155 toolset=$archosbitmaptools
1156 t_cpu="sh"
1157 t_manufacturer="archos"
1158 t_model="ondio"
1161 6|archosav300)
1162 target_id=38
1163 modelname="archosav300"
1164 target="-DARCHOS_AV300"
1165 memory=16 # always
1166 arm7tdmicc
1167 tool="$rootdir/tools/scramble -mm=C"
1168 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1169 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1170 output="cjbm.ajz"
1171 appextra="recorder:gui:radio"
1172 plugins="yes"
1173 swcodec=""
1174 # toolset is the tools within the tools directory that we build for
1175 # this particular target.
1176 toolset="$toolset scramble descramble bmp2rb"
1177 # architecture, manufacturer and model for the target-tree build
1178 t_cpu="arm"
1179 t_manufacturer="archos"
1180 t_model="av300"
1183 10|iriverh120)
1184 target_id=9
1185 modelname="iriverh120"
1186 target="-DIRIVER_H120"
1187 memory=32 # always
1188 coldfirecc
1189 tool="$rootdir/tools/scramble -add=h120"
1190 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1191 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1192 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1193 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1194 output="rockbox.iriver"
1195 bootoutput="bootloader.iriver"
1196 appextra="recorder:gui:radio"
1197 flash="$pwd/rombox.iriver"
1198 plugins="yes"
1199 swcodec="yes"
1200 # toolset is the tools within the tools directory that we build for
1201 # this particular target.
1202 toolset=$iriverbitmaptools
1203 t_cpu="coldfire"
1204 t_manufacturer="iriver"
1205 t_model="h100"
1208 11|iriverh300)
1209 target_id=10
1210 modelname="iriverh300"
1211 target="-DIRIVER_H300"
1212 memory=32 # always
1213 coldfirecc
1214 tool="$rootdir/tools/scramble -add=h300"
1215 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1216 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1217 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1218 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1219 output="rockbox.iriver"
1220 appextra="recorder:gui:radio"
1221 plugins="yes"
1222 swcodec="yes"
1223 # toolset is the tools within the tools directory that we build for
1224 # this particular target.
1225 toolset=$iriverbitmaptools
1226 t_cpu="coldfire"
1227 t_manufacturer="iriver"
1228 t_model="h300"
1231 12|iriverh100)
1232 target_id=11
1233 modelname="iriverh100"
1234 target="-DIRIVER_H100"
1235 memory=16 # always
1236 coldfirecc
1237 tool="$rootdir/tools/scramble -add=h100"
1238 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1239 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1240 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1241 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1242 output="rockbox.iriver"
1243 bootoutput="bootloader.iriver"
1244 appextra="recorder:gui:radio"
1245 flash="$pwd/rombox.iriver"
1246 plugins="yes"
1247 swcodec="yes"
1248 # toolset is the tools within the tools directory that we build for
1249 # this particular target.
1250 toolset=$iriverbitmaptools
1251 t_cpu="coldfire"
1252 t_manufacturer="iriver"
1253 t_model="h100"
1256 13|iriverifp7xx)
1257 target_id=19
1258 modelname="iriverifp7xx"
1259 target="-DIRIVER_IFP7XX"
1260 memory=1
1261 arm7tdmicc short
1262 tool="cp"
1263 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1264 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1265 output="rockbox.wma"
1266 appextra="recorder:gui:radio"
1267 plugins="yes"
1268 swcodec="yes"
1269 # toolset is the tools within the tools directory that we build for
1270 # this particular target.
1271 toolset=$genericbitmaptools
1272 t_cpu="arm"
1273 t_manufacturer="pnx0101"
1274 t_model="iriver-ifp7xx"
1277 14|iriverh10)
1278 target_id=22
1279 modelname="iriverh10"
1280 target="-DIRIVER_H10"
1281 memory=32 # always
1282 arm7tdmicc
1283 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1284 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1285 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1286 output="rockbox.mi4"
1287 appextra="recorder:gui:radio"
1288 plugins="yes"
1289 swcodec="yes"
1290 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1291 bootoutput="H10_20GC.mi4"
1292 # toolset is the tools within the tools directory that we build for
1293 # this particular target.
1294 toolset=$scramblebitmaptools
1295 # architecture, manufacturer and model for the target-tree build
1296 t_cpu="arm"
1297 t_manufacturer="iriver"
1298 t_model="h10"
1301 15|iriverh10_5gb)
1302 target_id=24
1303 modelname="iriverh10_5gb"
1304 target="-DIRIVER_H10_5GB"
1305 memory=32 # always
1306 arm7tdmicc
1307 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1308 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1309 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1310 output="rockbox.mi4"
1311 appextra="recorder:gui:radio"
1312 plugins="yes"
1313 swcodec="yes"
1314 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1315 bootoutput="H10.mi4"
1316 # toolset is the tools within the tools directory that we build for
1317 # this particular target.
1318 toolset=$scramblebitmaptools
1319 # architecture, manufacturer and model for the target-tree build
1320 t_cpu="arm"
1321 t_manufacturer="iriver"
1322 t_model="h10"
1325 20|ipodcolor)
1326 target_id=13
1327 modelname="ipodcolor"
1328 target="-DIPOD_COLOR"
1329 memory=32 # always
1330 arm7tdmicc
1331 tool="$rootdir/tools/scramble -add=ipco"
1332 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1333 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1334 output="rockbox.ipod"
1335 appextra="recorder:gui:radio"
1336 plugins="yes"
1337 swcodec="yes"
1338 bootoutput="bootloader-$modelname.ipod"
1339 # toolset is the tools within the tools directory that we build for
1340 # this particular target.
1341 toolset=$ipodbitmaptools
1342 # architecture, manufacturer and model for the target-tree build
1343 t_cpu="arm"
1344 t_manufacturer="ipod"
1345 t_model="color"
1348 21|ipodnano1g)
1349 target_id=14
1350 modelname="ipodnano1g"
1351 target="-DIPOD_NANO"
1352 memory=32 # always
1353 arm7tdmicc
1354 tool="$rootdir/tools/scramble -add=nano"
1355 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1356 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1357 output="rockbox.ipod"
1358 appextra="recorder:gui:radio"
1359 plugins="yes"
1360 swcodec="yes"
1361 bootoutput="bootloader-$modelname.ipod"
1362 # toolset is the tools within the tools directory that we build for
1363 # this particular target.
1364 toolset=$ipodbitmaptools
1365 # architecture, manufacturer and model for the target-tree build
1366 t_cpu="arm"
1367 t_manufacturer="ipod"
1368 t_model="nano"
1371 22|ipodvideo)
1372 target_id=15
1373 modelname="ipodvideo"
1374 target="-DIPOD_VIDEO"
1375 arm7tdmicc
1376 tool="$rootdir/tools/scramble -add=ipvd"
1377 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1378 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1379 output="rockbox.ipod"
1380 appextra="recorder:gui:radio"
1381 plugins="yes"
1382 swcodec="yes"
1383 bootoutput="bootloader-$modelname.ipod"
1384 # toolset is the tools within the tools directory that we build for
1385 # this particular target.
1386 toolset=$ipodbitmaptools
1387 # architecture, manufacturer and model for the target-tree build
1388 t_cpu="arm"
1389 t_manufacturer="ipod"
1390 t_model="video"
1393 23|ipod3g)
1394 target_id=16
1395 modelname="ipod3g"
1396 target="-DIPOD_3G"
1397 memory=32 # always
1398 arm7tdmicc
1399 tool="$rootdir/tools/scramble -add=ip3g"
1400 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1401 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1402 output="rockbox.ipod"
1403 appextra="recorder:gui:radio"
1404 plugins="yes"
1405 swcodec="yes"
1406 bootoutput="bootloader-$modelname.ipod"
1407 # toolset is the tools within the tools directory that we build for
1408 # this particular target.
1409 toolset=$ipodbitmaptools
1410 # architecture, manufacturer and model for the target-tree build
1411 t_cpu="arm"
1412 t_manufacturer="ipod"
1413 t_model="3g"
1416 24|ipod4g)
1417 target_id=17
1418 modelname="ipod4g"
1419 target="-DIPOD_4G"
1420 memory=32 # always
1421 arm7tdmicc
1422 tool="$rootdir/tools/scramble -add=ip4g"
1423 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1424 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1425 output="rockbox.ipod"
1426 appextra="recorder:gui:radio"
1427 plugins="yes"
1428 swcodec="yes"
1429 bootoutput="bootloader-$modelname.ipod"
1430 # toolset is the tools within the tools directory that we build for
1431 # this particular target.
1432 toolset=$ipodbitmaptools
1433 # architecture, manufacturer and model for the target-tree build
1434 t_cpu="arm"
1435 t_manufacturer="ipod"
1436 t_model="4g"
1439 25|ipodmini1g)
1440 target_id=18
1441 modelname="ipodmini1g"
1442 target="-DIPOD_MINI"
1443 memory=32 # always
1444 arm7tdmicc
1445 tool="$rootdir/tools/scramble -add=mini"
1446 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1447 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1448 output="rockbox.ipod"
1449 appextra="recorder:gui:radio"
1450 plugins="yes"
1451 swcodec="yes"
1452 bootoutput="bootloader-$modelname.ipod"
1453 # toolset is the tools within the tools directory that we build for
1454 # this particular target.
1455 toolset=$ipodbitmaptools
1456 # architecture, manufacturer and model for the target-tree build
1457 t_cpu="arm"
1458 t_manufacturer="ipod"
1459 t_model="mini"
1462 26|ipodmini2g)
1463 target_id=21
1464 modelname="ipodmini2g"
1465 target="-DIPOD_MINI2G"
1466 memory=32 # always
1467 arm7tdmicc
1468 tool="$rootdir/tools/scramble -add=mn2g"
1469 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1470 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1471 output="rockbox.ipod"
1472 appextra="recorder:gui:radio"
1473 plugins="yes"
1474 swcodec="yes"
1475 bootoutput="bootloader-$modelname.ipod"
1476 # toolset is the tools within the tools directory that we build for
1477 # this particular target.
1478 toolset=$ipodbitmaptools
1479 # architecture, manufacturer and model for the target-tree build
1480 t_cpu="arm"
1481 t_manufacturer="ipod"
1482 t_model="mini2g"
1485 27|ipod1g2g)
1486 target_id=29
1487 modelname="ipod1g2g"
1488 target="-DIPOD_1G2G"
1489 memory=32 # always
1490 arm7tdmicc
1491 tool="$rootdir/tools/scramble -add=1g2g"
1492 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1493 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1494 output="rockbox.ipod"
1495 appextra="recorder:gui:radio"
1496 plugins="yes"
1497 swcodec="yes"
1498 bootoutput="bootloader-$modelname.ipod"
1499 # toolset is the tools within the tools directory that we build for
1500 # this particular target.
1501 toolset=$ipodbitmaptools
1502 # architecture, manufacturer and model for the target-tree build
1503 t_cpu="arm"
1504 t_manufacturer="ipod"
1505 t_model="1g2g"
1508 28|ipodnano2g)
1509 target_id=62
1510 modelname="ipodnano2g"
1511 target="-DIPOD_NANO2G"
1512 memory=32 # always
1513 arm940tcc
1514 tool="$rootdir/tools/scramble -add=nn2g"
1515 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1516 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1517 output="rockbox.ipod"
1518 appextra="recorder:gui:radio"
1519 plugins="yes"
1520 swcodec="yes"
1521 bootoutput="bootloader-$modelname.ipod"
1522 # toolset is the tools within the tools directory that we build for
1523 # this particular target.
1524 toolset=$ipodbitmaptools
1525 # architecture, manufacturer and model for the target-tree build
1526 t_cpu="arm"
1527 t_manufacturer="s5l8700"
1528 t_model="ipodnano2g"
1531 30|iaudiox5)
1532 target_id=12
1533 modelname="iaudiox5"
1534 target="-DIAUDIO_X5"
1535 memory=16 # always
1536 coldfirecc
1537 tool="$rootdir/tools/scramble -add=iax5"
1538 boottool="$rootdir/tools/scramble -iaudiox5"
1539 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1540 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1541 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1542 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1543 output="rockbox.iaudio"
1544 bootoutput="x5_fw.bin"
1545 appextra="recorder:gui:radio"
1546 plugins="yes"
1547 swcodec="yes"
1548 # toolset is the tools within the tools directory that we build for
1549 # this particular target.
1550 toolset="$iaudiobitmaptools"
1551 # architecture, manufacturer and model for the target-tree build
1552 t_cpu="coldfire"
1553 t_manufacturer="iaudio"
1554 t_model="x5"
1557 31|iaudiom5)
1558 target_id=28
1559 modelname="iaudiom5"
1560 target="-DIAUDIO_M5"
1561 memory=16 # always
1562 coldfirecc
1563 tool="$rootdir/tools/scramble -add=iam5"
1564 boottool="$rootdir/tools/scramble -iaudiom5"
1565 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1566 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1567 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1568 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1569 output="rockbox.iaudio"
1570 bootoutput="m5_fw.bin"
1571 appextra="recorder:gui:radio"
1572 plugins="yes"
1573 swcodec="yes"
1574 # toolset is the tools within the tools directory that we build for
1575 # this particular target.
1576 toolset="$iaudiobitmaptools"
1577 # architecture, manufacturer and model for the target-tree build
1578 t_cpu="coldfire"
1579 t_manufacturer="iaudio"
1580 t_model="m5"
1583 32|iaudio7)
1584 target_id=32
1585 modelname="iaudio7"
1586 target="-DIAUDIO_7"
1587 memory=16 # always
1588 arm946cc
1589 tool="$rootdir/tools/scramble -add=i7"
1590 boottool="$rootdir/tools/scramble -tcc=crc"
1591 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1592 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1593 output="rockbox.iaudio"
1594 appextra="recorder:gui:radio"
1595 plugins="yes"
1596 swcodec="yes"
1597 bootoutput="I7_FW.BIN"
1598 # toolset is the tools within the tools directory that we build for
1599 # this particular target.
1600 toolset="$tccbitmaptools"
1601 # architecture, manufacturer and model for the target-tree build
1602 t_cpu="arm"
1603 t_manufacturer="tcc77x"
1604 t_model="iaudio7"
1607 33|cowond2)
1608 target_id=34
1609 modelname="cowond2"
1610 target="-DCOWON_D2"
1611 memory=32
1612 arm926ejscc
1613 tool="$rootdir/tools/scramble -add=d2"
1614 boottool="cp "
1615 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1616 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1617 output="rockbox.d2"
1618 bootoutput="bootloader-cowond2.bin"
1619 appextra="recorder:gui:radio"
1620 plugins="yes"
1621 swcodec="yes"
1622 toolset="$tccbitmaptools"
1623 # architecture, manufacturer and model for the target-tree build
1624 t_cpu="arm"
1625 t_manufacturer="tcc780x"
1626 t_model="cowond2"
1629 34|iaudiom3)
1630 target_id=37
1631 modelname="iaudiom3"
1632 target="-DIAUDIO_M3"
1633 memory=16 # always
1634 coldfirecc
1635 tool="$rootdir/tools/scramble -add=iam3"
1636 boottool="$rootdir/tools/scramble -iaudiom3"
1637 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1638 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1639 output="rockbox.iaudio"
1640 bootoutput="cowon_m3.bin"
1641 appextra="recorder:gui:radio"
1642 plugins="yes"
1643 swcodec="yes"
1644 # toolset is the tools within the tools directory that we build for
1645 # this particular target.
1646 toolset="$iaudiobitmaptools"
1647 # architecture, manufacturer and model for the target-tree build
1648 t_cpu="coldfire"
1649 t_manufacturer="iaudio"
1650 t_model="m3"
1653 40|gigabeatfx)
1654 target_id=20
1655 modelname="gigabeatfx"
1656 target="-DGIGABEAT_F"
1657 memory=32 # always
1658 arm9tdmicc
1659 tool="$rootdir/tools/scramble -add=giga"
1660 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1661 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1662 output="rockbox.gigabeat"
1663 appextra="recorder:gui:radio"
1664 plugins="yes"
1665 swcodec="yes"
1666 toolset=$gigabeatbitmaptools
1667 boottool="$rootdir/tools/scramble -gigabeat"
1668 bootoutput="FWIMG01.DAT"
1669 # architecture, manufacturer and model for the target-tree build
1670 t_cpu="arm"
1671 t_manufacturer="s3c2440"
1672 t_model="gigabeat-fx"
1675 41|gigabeats)
1676 target_id=26
1677 modelname="gigabeats"
1678 target="-DGIGABEAT_S"
1679 memory=64
1680 arm1136jfscc
1681 tool="$rootdir/tools/scramble -add=gigs"
1682 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1683 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1684 output="rockbox.gigabeat"
1685 appextra="recorder:gui:radio"
1686 plugins="yes"
1687 swcodec="yes"
1688 toolset="$gigabeatbitmaptools"
1689 boottool="$rootdir/tools/scramble -gigabeats"
1690 bootoutput="nk.bin"
1691 # architecture, manufacturer and model for the target-tree build
1692 t_cpu="arm"
1693 t_manufacturer="imx31"
1694 t_model="gigabeat-s"
1697 70|mrobe500)
1698 target_id=36
1699 modelname="mrobe500"
1700 target="-DMROBE_500"
1701 memory=64 # always
1702 arm926ejscc
1703 tool="$rootdir/tools/scramble -add=m500"
1704 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1705 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1706 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1707 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1708 output="rockbox.mrobe500"
1709 appextra="recorder:gui:radio"
1710 plugins="yes"
1711 swcodec="yes"
1712 toolset=$gigabeatbitmaptools
1713 boottool="cp "
1714 bootoutput="rockbox.mrboot"
1715 # architecture, manufacturer and model for the target-tree build
1716 t_cpu="arm"
1717 t_manufacturer="tms320dm320"
1718 t_model="mrobe-500"
1721 71|mrobe100)
1722 target_id=33
1723 modelname="mrobe100"
1724 target="-DMROBE_100"
1725 memory=32 # always
1726 arm7tdmicc
1727 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1728 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1729 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1730 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1731 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1732 output="rockbox.mi4"
1733 appextra="recorder:gui:radio"
1734 plugins="yes"
1735 swcodec="yes"
1736 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1737 bootoutput="pp5020.mi4"
1738 # toolset is the tools within the tools directory that we build for
1739 # this particular target.
1740 toolset=$scramblebitmaptools
1741 # architecture, manufacturer and model for the target-tree build
1742 t_cpu="arm"
1743 t_manufacturer="olympus"
1744 t_model="mrobe-100"
1747 80|logikdax)
1748 target_id=31
1749 modelname="logikdax"
1750 target="-DLOGIK_DAX"
1751 memory=2 # always
1752 arm946cc
1753 tool="$rootdir/tools/scramble -add=ldax"
1754 boottool="$rootdir/tools/scramble -tcc=crc"
1755 bootoutput="player.rom"
1756 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1757 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1758 output="rockbox.logik"
1759 appextra="recorder:gui:radio"
1760 plugins=""
1761 swcodec="yes"
1762 # toolset is the tools within the tools directory that we build for
1763 # this particular target.
1764 toolset=$tccbitmaptools
1765 # architecture, manufacturer and model for the target-tree build
1766 t_cpu="arm"
1767 t_manufacturer="tcc77x"
1768 t_model="logikdax"
1771 90|zenvisionm30gb)
1772 target_id=35
1773 modelname="zenvisionm30gb"
1774 target="-DCREATIVE_ZVM"
1775 memory=64
1776 arm926ejscc
1777 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1778 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1779 tool="$rootdir/tools/scramble -creative=zvm"
1780 USE_ELF="yes"
1781 output="rockbox.zvm"
1782 appextra="recorder:gui:radio"
1783 plugins="yes"
1784 swcodec="yes"
1785 toolset=$ipodbitmaptools
1786 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1787 bootoutput="rockbox.zvmboot"
1788 # architecture, manufacturer and model for the target-tree build
1789 t_cpu="arm"
1790 t_manufacturer="tms320dm320"
1791 t_model="creative-zvm"
1794 91|zenvisionm60gb)
1795 target_id=40
1796 modelname="zenvisionm60gb"
1797 target="-DCREATIVE_ZVM60GB"
1798 memory=64
1799 arm926ejscc
1800 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1801 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1802 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1803 USE_ELF="yes"
1804 output="rockbox.zvm60"
1805 appextra="recorder:gui:radio"
1806 plugins="yes"
1807 swcodec="yes"
1808 toolset=$ipodbitmaptools
1809 boottool="$rootdir/tools/scramble -creative=zvm60"
1810 bootoutput="rockbox.zvm60boot"
1811 # architecture, manufacturer and model for the target-tree build
1812 t_cpu="arm"
1813 t_manufacturer="tms320dm320"
1814 t_model="creative-zvm"
1817 92|zenvision)
1818 target_id=39
1819 modelname="zenvision"
1820 target="-DCREATIVE_ZV"
1821 memory=64
1822 arm926ejscc
1823 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1824 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1825 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1826 USE_ELF="yes"
1827 output="rockbox.zv"
1828 appextra="recorder:gui:radio"
1829 plugins=""
1830 swcodec="yes"
1831 toolset=$ipodbitmaptools
1832 boottool="$rootdir/tools/scramble -creative=zenvision"
1833 bootoutput="rockbox.zvboot"
1834 # architecture, manufacturer and model for the target-tree build
1835 t_cpu="arm"
1836 t_manufacturer="tms320dm320"
1837 t_model="creative-zvm"
1840 50|sansae200)
1841 target_id=23
1842 modelname="sansae200"
1843 target="-DSANSA_E200"
1844 memory=32 # supposedly
1845 arm7tdmicc
1846 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1847 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1848 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1849 output="rockbox.mi4"
1850 appextra="recorder:gui:radio"
1851 plugins="yes"
1852 swcodec="yes"
1853 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1854 bootoutput="PP5022.mi4"
1855 # toolset is the tools within the tools directory that we build for
1856 # this particular target.
1857 toolset=$scramblebitmaptools
1858 # architecture, manufacturer and model for the target-tree build
1859 t_cpu="arm"
1860 t_manufacturer="sandisk"
1861 t_model="sansa-e200"
1864 51|sansae200r)
1865 # the e200R model is pretty much identical to the e200, it only has a
1866 # different option to the scramble tool when building a bootloader and
1867 # makes the bootloader output file name in all lower case.
1868 target_id=27
1869 modelname="sansae200r"
1870 target="-DSANSA_E200"
1871 memory=32 # supposedly
1872 arm7tdmicc
1873 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1874 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1875 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1876 output="rockbox.mi4"
1877 appextra="recorder:gui:radio"
1878 plugins="yes"
1879 swcodec="yes"
1880 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1881 bootoutput="pp5022.mi4"
1882 # toolset is the tools within the tools directory that we build for
1883 # this particular target.
1884 toolset=$scramblebitmaptools
1885 # architecture, manufacturer and model for the target-tree build
1886 t_cpu="arm"
1887 t_manufacturer="sandisk"
1888 t_model="sansa-e200"
1891 52|sansac200)
1892 target_id=30
1893 modelname="sansac200"
1894 target="-DSANSA_C200"
1895 memory=32 # supposedly
1896 arm7tdmicc
1897 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -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=c200 -type=RBBL"
1905 bootoutput="firmware.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-c200"
1915 53|sansam200)
1916 target_id=48
1917 modelname="sansam200"
1918 target="-DSANSA_M200"
1919 memory=1 # always
1920 arm946cc
1921 tool="$rootdir/tools/scramble -add=m200"
1922 boottool="$rootdir/tools/scramble -tcc=crc"
1923 bootoutput="player.rom"
1924 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1925 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1926 output="rockbox.m200"
1927 appextra="recorder:gui:radio"
1928 plugins=""
1929 swcodec="yes"
1930 # toolset is the tools within the tools directory that we build for
1931 # this particular target.
1932 toolset=$tccbitmaptools
1933 # architecture, manufacturer and model for the target-tree build
1934 t_cpu="arm"
1935 t_manufacturer="tcc77x"
1936 t_model="m200"
1939 54|sansac100)
1940 target_id=42
1941 modelname="sansac100"
1942 target="-DSANSA_C100"
1943 memory=2
1944 arm946cc
1945 tool="$rootdir/tools/scramble -add=c100"
1946 boottool="$rootdir/tools/scramble -tcc=crc"
1947 bootoutput="player.rom"
1948 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1949 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1950 output="rockbox.c100"
1951 appextra="recorder:gui:radio"
1952 plugins=""
1953 swcodec="yes"
1954 # toolset is the tools within the tools directory that we build for
1955 # this particular target.
1956 toolset=$tccbitmaptools
1957 # architecture, manufacturer and model for the target-tree build
1958 t_cpu="arm"
1959 t_manufacturer="tcc77x"
1960 t_model="c100"
1963 55|sansaclip)
1964 target_id=50
1965 modelname="sansaclip"
1966 target="-DSANSA_CLIP"
1967 memory=2
1968 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1969 bmp2rb_native="$bmp2rb_mono"
1970 tool="$rootdir/tools/scramble -add=clip"
1971 output="rockbox.sansa"
1972 bootoutput="bootloader-clip.sansa"
1973 appextra="recorder:gui:radio"
1974 plugins="yes"
1975 swcodec="yes"
1976 toolset=$scramblebitmaptools
1977 t_cpu="arm"
1978 t_manufacturer="as3525"
1979 t_model="sansa-clip"
1980 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
1981 arm9tdmicc
1982 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1986 56|sansae200v2)
1987 target_id=51
1988 modelname="sansae200v2"
1989 target="-DSANSA_E200V2"
1990 memory=8
1991 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1992 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1993 tool="$rootdir/tools/scramble -add=e2v2"
1994 output="rockbox.sansa"
1995 bootoutput="bootloader-e200v2.sansa"
1996 appextra="recorder:gui:radio"
1997 plugins="yes"
1998 swcodec="yes"
1999 toolset=$scramblebitmaptools
2000 t_cpu="arm"
2001 t_manufacturer="as3525"
2002 t_model="sansa-e200v2"
2003 arm9tdmicc
2007 57|sansam200v4)
2008 target_id=52
2009 modelname="sansam200v4"
2010 target="-DSANSA_M200V4"
2011 memory=2
2012 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2013 bmp2rb_native="$bmp2rb_mono"
2014 tool="$rootdir/tools/scramble -add=m2v4"
2015 output="rockbox.sansa"
2016 bootoutput="bootloader-m200v4.sansa"
2017 appextra="recorder:gui:radio"
2018 plugins="yes"
2019 swcodec="yes"
2020 toolset=$scramblebitmaptools
2021 t_cpu="arm"
2022 t_manufacturer="as3525"
2023 t_model="sansa-m200v4"
2024 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2025 arm9tdmicc
2026 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2030 58|sansafuze)
2031 target_id=53
2032 modelname="sansafuze"
2033 target="-DSANSA_FUZE"
2034 memory=8
2035 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2036 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2037 tool="$rootdir/tools/scramble -add=fuze"
2038 output="rockbox.sansa"
2039 bootoutput="bootloader-fuze.sansa"
2040 appextra="recorder:gui:radio"
2041 plugins="yes"
2042 swcodec="yes"
2043 toolset=$scramblebitmaptools
2044 t_cpu="arm"
2045 t_manufacturer="as3525"
2046 t_model="sansa-fuze"
2047 arm9tdmicc
2051 59|sansac200v2)
2052 target_id=55
2053 modelname="sansac200v2"
2054 target="-DSANSA_C200V2"
2055 memory=2 # as per OF diagnosis mode
2056 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2057 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2058 tool="$rootdir/tools/scramble -add=c2v2"
2059 output="rockbox.sansa"
2060 bootoutput="bootloader-c200v2.sansa"
2061 appextra="recorder:gui:radio"
2062 plugins="yes"
2063 swcodec="yes"
2064 # toolset is the tools within the tools directory that we build for
2065 # this particular target.
2066 toolset=$scramblebitmaptools
2067 # architecture, manufacturer and model for the target-tree build
2068 t_cpu="arm"
2069 t_manufacturer="as3525"
2070 t_model="sansa-c200v2"
2071 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2072 arm9tdmicc
2073 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2076 60|sansaclipv2)
2077 target_id=60
2078 modelname="sansaclipv2"
2079 target="-DSANSA_CLIPV2"
2080 memory=8
2081 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2082 bmp2rb_native="$bmp2rb_mono"
2083 tool="$rootdir/tools/scramble -add=clv2"
2084 output="rockbox.sansa"
2085 bootoutput="bootloader-clipv2.sansa"
2086 appextra="recorder:gui:radio"
2087 plugins="yes"
2088 swcodec="yes"
2089 toolset=$scramblebitmaptools
2090 t_cpu="arm"
2091 t_manufacturer="as3525"
2092 t_model="sansa-clipv2"
2093 arm926ejscc
2096 61|sansaview)
2097 echo "Sansa View is not yet supported!"
2098 exit 1
2099 target_id=63
2100 modelname="sansaview"
2101 target="-DSANSA_VIEW"
2102 memory=32
2103 arm1176jzscc
2104 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2105 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2106 output="rockbox.mi4"
2107 appextra="gui"
2108 plugins=""
2109 swcodec="yes"
2110 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2111 bootoutput="firmware.mi4"
2112 # toolset is the tools within the tools directory that we build for
2113 # this particular target.
2114 toolset=$scramblebitmaptools
2115 t_cpu="arm"
2116 t_manufacturer="sandisk"
2117 t_model="sansa-view"
2120 62|sansaclipplus)
2121 target_id=66
2122 modelname="sansaclipplus"
2123 target="-DSANSA_CLIPPLUS"
2124 memory=8
2125 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2126 bmp2rb_native="$bmp2rb_mono"
2127 tool="$rootdir/tools/scramble -add=cli+"
2128 output="rockbox.sansa"
2129 bootoutput="bootloader-clipplus.sansa"
2130 appextra="recorder:gui:radio"
2131 plugins="yes"
2132 swcodec="yes"
2133 toolset=$scramblebitmaptools
2134 t_cpu="arm"
2135 t_manufacturer="as3525"
2136 t_model="sansa-clipplus"
2137 arm926ejscc
2140 63|sansafuzev2)
2141 target_id=68
2142 modelname="sansafuzev2"
2143 target="-DSANSA_FUZEV2"
2144 memory=8 # not sure
2145 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2146 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2147 tool="$rootdir/tools/scramble -add=fuz2"
2148 output="rockbox.sansa"
2149 bootoutput="bootloader-fuzev2.sansa"
2150 appextra="recorder:gui:radio"
2151 plugins="yes"
2152 swcodec="yes"
2153 toolset=$scramblebitmaptools
2154 t_cpu="arm"
2155 t_manufacturer="as3525"
2156 t_model="sansa-fuzev2"
2157 arm926ejscc
2160 150|tatungtpj1022)
2161 target_id=25
2162 modelname="tatungtpj1022"
2163 target="-DTATUNG_TPJ1022"
2164 memory=32 # always
2165 arm7tdmicc
2166 tool="$rootdir/tools/scramble -add tpj2"
2167 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2168 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2169 output="rockbox.elio"
2170 appextra="recorder:gui:radio"
2171 plugins="yes"
2172 swcodec="yes"
2173 boottool="$rootdir/tools/scramble -mi4v2"
2174 bootoutput="pp5020.mi4"
2175 # toolset is the tools within the tools directory that we build for
2176 # this particular target.
2177 toolset=$scramblebitmaptools
2178 # architecture, manufacturer and model for the target-tree build
2179 t_cpu="arm"
2180 t_manufacturer="tatung"
2181 t_model="tpj1022"
2184 100|gogearsa9200)
2185 target_id=41
2186 modelname="gogearsa9200"
2187 target="-DPHILIPS_SA9200"
2188 memory=32 # supposedly
2189 arm7tdmicc
2190 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2191 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2192 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2193 output="rockbox.mi4"
2194 appextra="recorder:gui:radio"
2195 plugins=""
2196 swcodec="yes"
2197 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2198 bootoutput="FWImage.ebn"
2199 # toolset is the tools within the tools directory that we build for
2200 # this particular target.
2201 toolset=$scramblebitmaptools
2202 # architecture, manufacturer and model for the target-tree build
2203 t_cpu="arm"
2204 t_manufacturer="philips"
2205 t_model="sa9200"
2208 101|gogearhdd1630)
2209 target_id=43
2210 modelname="gogearhdd1630"
2211 target="-DPHILIPS_HDD1630"
2212 memory=32 # supposedly
2213 arm7tdmicc
2214 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2215 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2216 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2217 output="rockbox.mi4"
2218 appextra="recorder:gui:radio"
2219 plugins="yes"
2220 swcodec="yes"
2221 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2222 bootoutput="FWImage.ebn"
2223 # toolset is the tools within the tools directory that we build for
2224 # this particular target.
2225 toolset=$scramblebitmaptools
2226 # architecture, manufacturer and model for the target-tree build
2227 t_cpu="arm"
2228 t_manufacturer="philips"
2229 t_model="hdd1630"
2232 102|gogearhdd6330)
2233 target_id=65
2234 modelname="gogearhdd6330"
2235 target="-DPHILIPS_HDD6330"
2236 memory=32 # supposedly
2237 arm7tdmicc
2238 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2239 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2240 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2241 output="rockbox.mi4"
2242 appextra="recorder:gui:radio"
2243 plugins=""
2244 swcodec="yes"
2245 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2246 bootoutput="FWImage.ebn"
2247 # toolset is the tools within the tools directory that we build for
2248 # this particular target.
2249 toolset=$scramblebitmaptools
2250 # architecture, manufacturer and model for the target-tree build
2251 t_cpu="arm"
2252 t_manufacturer="philips"
2253 t_model="hdd6330"
2256 110|meizum6sl)
2257 target_id=49
2258 modelname="meizum6sl"
2259 target="-DMEIZU_M6SL"
2260 memory=16 # always
2261 arm940tbecc
2262 tool="cp"
2263 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2264 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2265 output="rockbox.meizu"
2266 appextra="recorder:gui:radio"
2267 plugins="no" #FIXME
2268 swcodec="yes"
2269 toolset=$genericbitmaptools
2270 boottool="cp"
2271 bootoutput="rockboot.ebn"
2272 # architecture, manufacturer and model for the target-tree build
2273 t_cpu="arm"
2274 t_manufacturer="s5l8700"
2275 t_model="meizu-m6sl"
2278 111|meizum6sp)
2279 target_id=46
2280 modelname="meizum6sp"
2281 target="-DMEIZU_M6SP"
2282 memory=16 # always
2283 arm940tbecc
2284 tool="cp"
2285 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2286 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2287 output="rockbox.meizu"
2288 appextra="recorder:gui:radio"
2289 plugins="no" #FIXME
2290 swcodec="yes"
2291 toolset=$genericbitmaptools
2292 boottool="cp"
2293 bootoutput="rockboot.ebn"
2294 # architecture, manufacturer and model for the target-tree build
2295 t_cpu="arm"
2296 t_manufacturer="s5l8700"
2297 t_model="meizu-m6sp"
2300 112|meizum3)
2301 target_id=47
2302 modelname="meizum3"
2303 target="-DMEIZU_M3"
2304 memory=16 # always
2305 arm940tbecc
2306 tool="cp"
2307 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2308 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2309 output="rockbox.meizu"
2310 appextra="recorder:gui:radio"
2311 plugins="no" #FIXME
2312 swcodec="yes"
2313 toolset=$genericbitmaptools
2314 boottool="cp"
2315 bootoutput="rockboot.ebn"
2316 # architecture, manufacturer and model for the target-tree build
2317 t_cpu="arm"
2318 t_manufacturer="s5l8700"
2319 t_model="meizu-m3"
2322 120|ondavx747)
2323 target_id=45
2324 modelname="ondavx747"
2325 target="-DONDA_VX747"
2326 memory=16
2327 mipselcc
2328 tool="$rootdir/tools/scramble -add=x747"
2329 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2330 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2331 output="rockbox.vx747"
2332 appextra="recorder:gui:radio"
2333 plugins="yes"
2334 swcodec="yes"
2335 toolset=$genericbitmaptools
2336 boottool="$rootdir/tools/scramble -ccpmp"
2337 bootoutput="ccpmp.bin"
2338 # architecture, manufacturer and model for the target-tree build
2339 t_cpu="mips"
2340 t_manufacturer="ingenic_jz47xx"
2341 t_model="onda_vx747"
2344 121|ondavx767)
2345 target_id=64
2346 modelname="ondavx767"
2347 target="-DONDA_VX767"
2348 memory=16 #FIXME
2349 mipselcc
2350 tool="cp"
2351 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2352 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2353 output="rockbox.vx767"
2354 appextra="recorder:gui:radio"
2355 plugins="" #FIXME
2356 swcodec="yes"
2357 toolset=$genericbitmaptools
2358 boottool="$rootdir/tools/scramble -ccpmp"
2359 bootoutput="ccpmp.bin"
2360 # architecture, manufacturer and model for the target-tree build
2361 t_cpu="mips"
2362 t_manufacturer="ingenic_jz47xx"
2363 t_model="onda_vx767"
2366 122|ondavx747p)
2367 target_id=54
2368 modelname="ondavx747p"
2369 target="-DONDA_VX747P"
2370 memory=16
2371 mipselcc
2372 tool="$rootdir/tools/scramble -add=747p"
2373 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2374 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2375 output="rockbox.vx747p"
2376 appextra="recorder:gui:radio"
2377 plugins="yes"
2378 swcodec="yes"
2379 toolset=$genericbitmaptools
2380 boottool="$rootdir/tools/scramble -ccpmp"
2381 bootoutput="ccpmp.bin"
2382 # architecture, manufacturer and model for the target-tree build
2383 t_cpu="mips"
2384 t_manufacturer="ingenic_jz47xx"
2385 t_model="onda_vx747"
2388 123|ondavx777)
2389 target_id=61
2390 modelname="ondavx777"
2391 target="-DONDA_VX777"
2392 memory=16
2393 mipselcc
2394 tool="$rootdir/tools/scramble -add=x777"
2395 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2396 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2397 output="rockbox.vx777"
2398 appextra="recorder:gui:radio"
2399 plugins="yes"
2400 swcodec="yes"
2401 toolset=$genericbitmaptools
2402 boottool="$rootdir/tools/scramble -ccpmp"
2403 bootoutput="ccpmp.bin"
2404 # architecture, manufacturer and model for the target-tree build
2405 t_cpu="mips"
2406 t_manufacturer="ingenic_jz47xx"
2407 t_model="onda_vx747"
2410 130|lyreproto1)
2411 target_id=56
2412 modelname="lyreproto1"
2413 target="-DLYRE_PROTO1"
2414 memory=64
2415 arm926ejscc
2416 tool="cp"
2417 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2418 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2419 output="rockbox.lyre"
2420 appextra="recorder:gui:radio"
2421 plugins=""
2422 swcodec="yes"
2423 toolset=$scramblebitmaptools
2424 boottool="cp"
2425 bootoutput="bootloader-proto1.lyre"
2426 # architecture, manufacturer and model for the target-tree build
2427 t_cpu="arm"
2428 t_manufacturer="at91sam"
2429 t_model="lyre_proto1"
2432 131|mini2440)
2433 target_id=99
2434 modelname="mini2440"
2435 target="-DMINI2440"
2436 memory=64
2437 arm9tdmicc
2438 tool="$rootdir/tools/scramble -add=m244"
2439 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2440 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2441 output="rockbox.mini2440"
2442 appextra="recorder:gui:radio"
2443 plugins=""
2444 swcodec="yes"
2445 toolset=$scramblebitmaptools
2446 boottool="cp"
2447 bootoutput="bootloader-mini2440.lyre"
2448 # architecture, manufacturer and model for the target-tree build
2449 t_cpu="arm"
2450 t_manufacturer="s3c2440"
2451 t_model="mini2440"
2454 140|samsungyh820)
2455 target_id=57
2456 modelname="samsungyh820"
2457 target="-DSAMSUNG_YH820"
2458 memory=32 # always
2459 arm7tdmicc
2460 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2461 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2462 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2463 output="rockbox.mi4"
2464 appextra="recorder:gui:radio"
2465 plugins="yes"
2466 swcodec="yes"
2467 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2468 bootoutput="FW_YH820.mi4"
2469 # toolset is the tools within the tools directory that we build for
2470 # this particular target.
2471 toolset=$scramblebitmaptools
2472 # architecture, manufacturer and model for the target-tree build
2473 t_cpu="arm"
2474 t_manufacturer="samsung"
2475 t_model="yh820"
2478 141|samsungyh920)
2479 target_id=58
2480 modelname="samsungyh920"
2481 target="-DSAMSUNG_YH920"
2482 memory=32 # always
2483 arm7tdmicc
2484 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2485 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2486 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2487 output="rockbox.mi4"
2488 appextra="recorder:gui:radio"
2489 plugins="yes"
2490 swcodec="yes"
2491 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2492 bootoutput="PP5020.mi4"
2493 # toolset is the tools within the tools directory that we build for
2494 # this particular target.
2495 toolset=$scramblebitmaptools
2496 # architecture, manufacturer and model for the target-tree build
2497 t_cpu="arm"
2498 t_manufacturer="samsung"
2499 t_model="yh920"
2502 142|samsungyh925)
2503 target_id=59
2504 modelname="samsungyh925"
2505 target="-DSAMSUNG_YH925"
2506 memory=32 # always
2507 arm7tdmicc
2508 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2509 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2510 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2511 output="rockbox.mi4"
2512 appextra="recorder:gui:radio"
2513 plugins="yes"
2514 swcodec="yes"
2515 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2516 bootoutput="FW_YH925.mi4"
2517 # toolset is the tools within the tools directory that we build for
2518 # this particular target.
2519 toolset=$scramblebitmaptools
2520 # architecture, manufacturer and model for the target-tree build
2521 t_cpu="arm"
2522 t_manufacturer="samsung"
2523 t_model="yh925"
2526 143|samsungyps3)
2527 target_id=60
2528 modelname="samsungyps3"
2529 target="-DSAMSUNG_YPS3"
2530 memory=16 # always
2531 arm940tbecc
2532 tool="cp"
2533 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2534 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2535 output="rockbox.yps3"
2536 appextra="recorder:gui:radio"
2537 plugins="no" #FIXME
2538 swcodec="yes"
2539 toolset=$genericbitmaptools
2540 boottool="cp"
2541 bootoutput="rockboot.ebn"
2542 # architecture, manufacturer and model for the target-tree build
2543 t_cpu="arm"
2544 t_manufacturer="s5l8700"
2545 t_model="yps3"
2548 160|vibe500)
2549 target_id=67
2550 modelname="vibe500"
2551 target="-DPBELL_VIBE500"
2552 memory=32 # always
2553 arm7tdmicc
2554 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2555 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2556 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2557 output="rockbox.mi4"
2558 appextra="recorder:gui:radio"
2559 plugins="yes"
2560 swcodec="yes"
2561 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2562 bootoutput="jukebox.mi4"
2563 # toolset is the tools within the tools directory that we build for
2564 # this particular target.
2565 toolset=$scramblebitmaptools
2566 # architecture, manufacturer and model for the target-tree build
2567 t_cpu="arm"
2568 t_manufacturer="pbell"
2569 t_model="vibe500"
2572 170|hd200)
2573 target_id=69
2574 modelname="mpiohd200"
2575 target="-DMPIO_HD200"
2576 memory=16 # always
2577 coldfirecc
2578 tool="$rootdir/tools/scramble -add=hd20"
2579 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2580 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2581 output="rockbox.mpio"
2582 bootoutput="bootloader.mpio"
2583 appextra="recorder:gui:radio"
2584 plugins="yes"
2585 swcodec="yes"
2586 # toolset is the tools within the tools directory that we build for
2587 # this particular target.
2588 toolset="$genericbitmaptools"
2589 # architecture, manufacturer and model for the target-tree build
2590 t_cpu="coldfire"
2591 t_manufacturer="mpio"
2592 t_model="hd200"
2595 200|app*)
2596 target_id=100
2597 modelname="application"
2598 target="-DAPPLICATION"
2599 memory=32
2600 uname=`uname`
2601 simcc "sdl"
2602 tool="cp "
2603 boottool="cp "
2604 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2605 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2606 output="rockbox"
2607 bootoutput="bootloader-cowond2.bin"
2608 appextra="recorder:gui:radio"
2609 plugins=""
2610 swcodec="yes"
2611 # architecture, manufacturer and model for the target-tree build
2612 t_cpu="hosted"
2613 t_manufacturer="sdl"
2614 t_model="app"
2618 echo "Please select a supported target platform!"
2619 exit 7
2622 esac
2624 echo "Platform set to $modelname"
2627 #remove start
2628 ############################################################################
2629 # Amount of memory, for those that can differ. They have $memory unset at
2630 # this point.
2633 if [ -z "$memory" ]; then
2634 case $target_id in
2636 if [ "$ARG_RAM" ]; then
2637 size=$ARG_RAM
2638 else
2639 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2640 size=`input`;
2642 case $size in
2643 60|64)
2644 memory="64"
2647 memory="32"
2649 esac
2652 if [ "$ARG_RAM" ]; then
2653 size=$ARG_RAM
2654 else
2655 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2656 size=`input`;
2658 case $size in
2660 memory="8"
2663 memory="2"
2665 esac
2667 esac
2668 echo "Memory size selected: $memory MB"
2669 [ "$ARG_TYPE" ] || echo ""
2671 #remove end
2673 ##################################################################
2674 # Figure out build "type"
2677 # the ifp7x0 is the only platform that supports building a gdb stub like
2678 # this
2679 case $modelname in
2680 iriverifp7xx)
2681 gdbstub="(G)DB stub, "
2683 sansae200r|sansae200)
2684 gdbstub="(I)nstaller, "
2686 sansac200)
2687 gdbstub="(E)raser, "
2691 esac
2692 if [ "$ARG_TYPE" ]; then
2693 btype=$ARG_TYPE
2694 else
2695 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2696 btype=`input`;
2699 case $btype in
2700 [Ii])
2701 appsdir='\$(ROOTDIR)/bootloader'
2702 apps="bootloader"
2703 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2704 bootloader="1"
2705 echo "e200R-installer build selected"
2707 [Ee])
2708 appsdir='\$(ROOTDIR)/bootloader'
2709 apps="bootloader"
2710 echo "C2(4)0 or C2(5)0"
2711 variant=`input`
2712 case $variant in
2714 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2715 echo "c240 eraser build selected"
2718 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2719 echo "c240 eraser build selected"
2721 esac
2722 bootloader="1"
2723 echo "c200 eraser build selected"
2725 [Bb])
2726 if test $t_manufacturer = "archos"; then
2727 # Archos SH-based players do this somewhat differently for
2728 # some reason
2729 appsdir='\$(ROOTDIR)/flash/bootbox'
2730 apps="bootbox"
2731 else
2732 appsdir='\$(ROOTDIR)/bootloader'
2733 apps="bootloader"
2734 flash=""
2735 if test -n "$boottool"; then
2736 tool="$boottool"
2738 if test -n "$bootoutput"; then
2739 output=$bootoutput
2742 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2743 bootloader="1"
2744 echo "Bootloader build selected"
2746 [Ss])
2747 if [ "$modelname" = "sansae200r" ]; then
2748 echo "Do not use the e200R target for simulator builds. Use e200 instead."
2749 exit 8
2751 debug="-DDEBUG"
2752 simulator="yes"
2753 extradefines="-DSIMULATOR"
2754 archosrom=""
2755 flash=""
2756 echo "Simulator build selected"
2758 [Aa]*)
2759 echo "Advanced build selected"
2760 whichadvanced $btype
2762 [Gg])
2763 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2764 appsdir='\$(ROOTDIR)/gdb'
2765 apps="stub"
2766 case $modelname in
2767 iriverifp7xx)
2768 output="stub.wma"
2772 esac
2773 echo "GDB stub build selected"
2775 [Mm])
2776 toolset='';
2777 apps="manual"
2778 echo "Manual build selected"
2780 [Cc])
2781 uname=`uname`
2782 simcc "checkwps"
2783 toolset='';
2784 t_cpu='';
2785 GCCOPTS='';
2786 extradefines="-DDEBUG"
2787 appsdir='\$(ROOTDIR)/tools/checkwps';
2788 output='checkwps.'${modelname};
2789 archosrom='';
2790 echo "CheckWPS build selected"
2792 [Dd])
2793 uname=`uname`
2794 simcc "database"
2795 toolset='';
2796 t_cpu='';
2797 GCCOPTS='';
2798 appsdir='\$(ROOTDIR)/tools/database';
2799 archosrom='';
2801 case $uname in
2802 CYGWIN*|MINGW*)
2803 output="database_${modelname}.exe"
2806 output='database.'${modelname};
2808 esac
2810 echo "Database tool build selected"
2813 if [ "$modelname" = "sansae200r" ]; then
2814 echo "Do not use the e200R target for regular builds. Use e200 instead."
2815 exit 8
2817 debug=""
2818 btype="N" # set it explicitly since RET only gets here as well
2819 echo "Normal build selected"
2822 esac
2823 # to be able running "make manual" from non-manual configuration
2824 case $modelname in
2825 archosrecorderv2)
2826 manualdev="archosfmrecorder"
2828 iriverh1??)
2829 manualdev="iriverh100"
2831 ipodmini2g)
2832 manualdev="ipodmini1g"
2835 manualdev=$modelname
2837 esac
2839 if [ -z "$debug" ]; then
2840 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2843 echo "Using source code root directory: $rootdir"
2845 # this was once possible to change at build-time, but no more:
2846 language="english"
2848 uname=`uname`
2850 if [ "yes" = "$simulator" ]; then
2851 # setup compiler and things for simulator
2852 simcc "sdl"
2854 if [ -d "simdisk" ]; then
2855 echo "Subdirectory 'simdisk' already present"
2856 else
2857 mkdir simdisk
2858 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2862 # Now, figure out version number of the (gcc) compiler we are about to use
2863 gccver=`$CC -dumpversion`;
2865 # figure out the binutil version too and display it, mostly for the build
2866 # system etc to be able to see it easier
2867 if [ $uname = "Darwin" ]; then
2868 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2869 else
2870 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2873 if [ -z "$gccver" ]; then
2874 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
2875 echo "[WARNING] this may cause your build to fail since we cannot do the"
2876 echo "[WARNING] checks we want now."
2877 else
2879 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2880 # DEPEND on it
2882 num1=`echo $gccver | cut -d . -f1`
2883 num2=`echo $gccver | cut -d . -f2`
2884 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2886 # This makes:
2887 # 3.3.X => 303
2888 # 3.4.X => 304
2889 # 2.95.3 => 295
2891 echo "Using $CC $gccver ($gccnum)"
2893 if test "$gccnum" -ge "400"; then
2894 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2895 # so we ignore that warnings for now
2896 # -Wno-pointer-sign
2897 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2900 if test "$gccnum" -ge "402"; then
2901 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2902 # and later would throw it for several valid cases
2903 GCCOPTS="$GCCOPTS -Wno-override-init"
2906 case $prefix in
2907 ""|"$CROSS_COMPILE")
2908 # simulator
2910 i586-mingw32msvc-)
2911 # cross-compile for win32
2914 # Verify that the cross-compiler is of a recommended version!
2915 if test "$gccver" != "$gccchoice"; then
2916 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2917 echo "WARNING: version $gccchoice!"
2918 echo "WARNING: This may cause your build to fail since it may be a version"
2919 echo "WARNING: that isn't functional or known to not be the best choice."
2920 echo "WARNING: If you suffer from build problems, you know that this is"
2921 echo "WARNING: a likely source for them..."
2924 esac
2929 echo "Using $LD $ldver"
2931 # check the compiler for SH platforms
2932 if test "$CC" = "sh-elf-gcc"; then
2933 if test "$gccnum" -lt "400"; then
2934 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2935 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2936 else
2937 # figure out patch status
2938 gccpatch=`$CC --version`;
2940 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2941 echo "gcc $gccver is rockbox patched"
2942 # then convert -O to -Os to get smaller binaries!
2943 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2944 else
2945 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2946 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2951 if test "$CC" = "m68k-elf-gcc"; then
2952 # convert -O to -Os to get smaller binaries!
2953 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2956 if [ "$ARG_CCACHE" = "1" ]; then
2957 echo "Enable ccache for building"
2958 ccache="ccache"
2959 elif [ "$ARG_CCACHE" != "0" ]; then
2960 ccache=`findtool ccache`
2961 if test -n "$ccache"; then
2962 echo "Found and uses ccache ($ccache)"
2966 # figure out the full path to the various commands if possible
2967 HOSTCC=`findtool gcc --lit`
2968 HOSTAR=`findtool ar --lit`
2969 CC=`findtool ${CC} --lit`
2970 LD=`findtool ${AR} --lit`
2971 AR=`findtool ${AR} --lit`
2972 AS=`findtool ${AS} --lit`
2973 OC=`findtool ${OC} --lit`
2974 WINDRES=`findtool ${WINDRES} --lit`
2975 DLLTOOL=`findtool ${DLLTOOL} --lit`
2976 DLLWRAP=`findtool ${DLLWRAP} --lit`
2977 RANLIB=`findtool ${RANLIB} --lit`
2979 if test "$ARG_ARM_THUMB" = "1"; then
2980 extradefines="$extradefines -DUSE_THUMB"
2981 CC="$toolsdir/thumb-cc.py $CC"
2984 if test -n "$ccache"; then
2985 CC="$ccache $CC"
2988 if test "X$endian" = "Xbig"; then
2989 defendian="ROCKBOX_BIG_ENDIAN"
2990 else
2991 defendian="ROCKBOX_LITTLE_ENDIAN"
2994 if [ "$ARG_RBDIR" ]; then
2995 rbdir=$ARG_RBDIR
2996 echo "Using alternate rockbox dir: ${rbdir}"
2999 sed > autoconf.h \
3000 -e "s,@ENDIAN@,${defendian},g" \
3001 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
3002 -e "s,^#undef DO_BOOTCHART,$use_bootchart,g" \
3003 -e "s,@config_rtc@,$config_rtc,g" \
3004 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
3005 -e "s,@RBDIR@,${rbdir},g" \
3006 -e "s,@have_backlight@,$have_backlight,g" \
3007 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
3008 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
3009 <<EOF
3010 /* This header was made by configure */
3011 #ifndef __BUILD_AUTOCONF_H
3012 #define __BUILD_AUTOCONF_H
3014 /* Define endianess for the target or simulator platform */
3015 #define @ENDIAN@ 1
3017 /* Define this if you build rockbox to support the logf logging and display */
3018 #undef ROCKBOX_HAS_LOGF
3020 /* Define this to record a chart with timings for the stages of boot */
3021 #undef DO_BOOTCHART
3023 /* optional define for a backlight modded Ondio */
3024 @have_backlight@
3026 /* optional define for FM radio mod for iAudio M5 */
3027 @have_fmradio_in@
3029 /* optional define for ATA poweroff on Player */
3030 @have_ata_poweroff@
3032 /* optional defines for RTC mod for h1x0 */
3033 @config_rtc@
3034 @have_rtc_alarm@
3036 /* root of Rockbox */
3037 #define ROCKBOX_DIR "/@RBDIR@"
3039 #endif /* __BUILD_AUTOCONF_H */
3042 if test -n "$t_cpu"; then
3043 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3044 if [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3045 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/"
3046 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/"
3048 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3049 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3050 GCCOPTS="$GCCOPTS"
3053 if test "$simulator" = "yes"; then
3054 # add simul make stuff on the #SIMUL# line
3055 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
3056 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
3057 else
3058 # delete the lines that match
3059 simmagic1='/@SIMUL1@/D'
3060 simmagic2='/@SIMUL2@/D'
3063 if test "$swcodec" = "yes"; then
3064 voicetoolset="rbspeexenc voicefont wavtrim"
3065 else
3066 voicetoolset="voicefont wavtrim"
3069 if test "$apps" = "apps"; then
3070 # only when we build "real" apps we build the .lng files
3071 buildlangs="langs"
3074 #### Fix the cmdline ###
3075 if [ "$ARG_CCACHE" = "1" ]; then
3076 cmdline="--ccache "
3077 elif [ "$ARG_CCACHE" = "0" ]; then
3078 cmdline="--no-ccache "
3080 if [ "$ARG_ARM_EABI" = "1" ]; then
3081 cmdline="$cmdline--eabi "
3084 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3085 ### end of cmdline
3087 sed > Makefile \
3088 -e "s,@ROOTDIR@,${rootdir},g" \
3089 -e "s,@DEBUG@,${debug},g" \
3090 -e "s,@MEMORY@,${memory},g" \
3091 -e "s,@TARGET_ID@,${target_id},g" \
3092 -e "s,@TARGET@,${target},g" \
3093 -e "s,@CPU@,${t_cpu},g" \
3094 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
3095 -e "s,@MODELNAME@,${modelname},g" \
3096 -e "s,@LANGUAGE@,${language},g" \
3097 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3098 -e "s,@PWD@,${pwd},g" \
3099 -e "s,@HOSTCC@,${HOSTCC},g" \
3100 -e "s,@HOSTAR@,${HOSTAR},g" \
3101 -e "s,@CC@,${CC},g" \
3102 -e "s,@LD@,${LD},g" \
3103 -e "s,@AR@,${AR},g" \
3104 -e "s,@AS@,${AS},g" \
3105 -e "s,@OC@,${OC},g" \
3106 -e "s,@WINDRES@,${WINDRES},g" \
3107 -e "s,@DLLTOOL@,${DLLTOOL},g" \
3108 -e "s,@DLLWRAP@,${DLLWRAP},g" \
3109 -e "s,@RANLIB@,${RANLIB},g" \
3110 -e "s,@TOOL@,${tool},g" \
3111 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
3112 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
3113 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
3114 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
3115 -e "s,@OUTPUT@,${output},g" \
3116 -e "s,@APPEXTRA@,${appextra},g" \
3117 -e "s,@ARCHOSROM@,${archosrom},g" \
3118 -e "s,@FLASHFILE@,${flash},g" \
3119 -e "s,@PLUGINS@,${plugins},g" \
3120 -e "s,@CODECS@,${swcodec},g" \
3121 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
3122 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
3123 -e "s,@GCCOPTS@,${GCCOPTS},g" \
3124 -e "s,@TARGET_INC@,${TARGET_INC},g" \
3125 -e "s!@LDOPTS@!${LDOPTS}!g" \
3126 -e "s,@LOADADDRESS@,${loadaddress},g" \
3127 -e "s,@EXTRADEF@,${extradefines},g" \
3128 -e "s,@APPSDIR@,${appsdir},g" \
3129 -e "s,@FIRMDIR@,${firmdir},g" \
3130 -e "s,@TOOLSDIR@,${toolsdir},g" \
3131 -e "s,@APPS@,${apps},g" \
3132 -e "s,@SIMVER@,${simver},g" \
3133 -e "s,@GCCVER@,${gccver},g" \
3134 -e "s,@GCCNUM@,${gccnum},g" \
3135 -e "s,@UNAME@,${uname},g" \
3136 -e "s,@ENDIAN@,${defendian},g" \
3137 -e "s,@TOOLSET@,${toolset},g" \
3138 -e "${simmagic1}" \
3139 -e "${simmagic2}" \
3140 -e "s,@MANUALDEV@,${manualdev},g" \
3141 -e "s,@ENCODER@,${ENC_CMD},g" \
3142 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
3143 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
3144 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
3145 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
3146 -e "s,@LANGS@,${buildlangs},g" \
3147 -e "s,@USE_ELF@,${USE_ELF},g" \
3148 -e "s,@RBDIR@,${rbdir},g" \
3149 -e "s,@PREFIX@,$PREFIX,g" \
3150 -e "s,@CMDLINE@,$cmdline,g" \
3151 -e "s,@SDLCONFIG@,$sdl,g" \
3152 <<EOF
3153 ## Automatically generated. http://www.rockbox.org/
3155 export ROOTDIR=@ROOTDIR@
3156 export FIRMDIR=@FIRMDIR@
3157 export APPSDIR=@APPSDIR@
3158 export TOOLSDIR=@TOOLSDIR@
3159 export DOCSDIR=\$(ROOTDIR)/docs
3160 export MANUALDIR=\${ROOTDIR}/manual
3161 export DEBUG=@DEBUG@
3162 export MODELNAME=@MODELNAME@
3163 export ARCHOSROM=@ARCHOSROM@
3164 export FLASHFILE=@FLASHFILE@
3165 export TARGET_ID=@TARGET_ID@
3166 export TARGET=@TARGET@
3167 export CPU=@CPU@
3168 export MANUFACTURER=@MANUFACTURER@
3169 export OBJDIR=@PWD@
3170 export BUILDDIR=@PWD@
3171 export LANGUAGE=@LANGUAGE@
3172 export VOICELANGUAGE=@VOICELANGUAGE@
3173 export MEMORYSIZE=@MEMORY@
3174 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3175 export MKFIRMWARE=@TOOL@
3176 export BMP2RB_MONO=@BMP2RB_MONO@
3177 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3178 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3179 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3180 export BINARY=@OUTPUT@
3181 export APPEXTRA=@APPEXTRA@
3182 export ENABLEDPLUGINS=@PLUGINS@
3183 export SOFTWARECODECS=@CODECS@
3184 export EXTRA_DEFINES=@EXTRADEF@
3185 export HOSTCC=@HOSTCC@
3186 export HOSTAR=@HOSTAR@
3187 export CC=@CC@
3188 export LD=@LD@
3189 export AR=@AR@
3190 export AS=@AS@
3191 export OC=@OC@
3192 export WINDRES=@WINDRES@
3193 export DLLTOOL=@DLLTOOL@
3194 export DLLWRAP=@DLLWRAP@
3195 export RANLIB=@RANLIB@
3196 export PREFIX=@PREFIX@
3197 export PROFILE_OPTS=@PROFILE_OPTS@
3198 export SIMVER=@SIMVER@
3199 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3200 export GCCOPTS=@GCCOPTS@
3201 export TARGET_INC=@TARGET_INC@
3202 export LOADADDRESS=@LOADADDRESS@
3203 export SHARED_FLAG=@SHARED_FLAG@
3204 export LDOPTS=@LDOPTS@
3205 export GCCVER=@GCCVER@
3206 export GCCNUM=@GCCNUM@
3207 export UNAME=@UNAME@
3208 export MANUALDEV=@MANUALDEV@
3209 export TTS_OPTS=@TTS_OPTS@
3210 export TTS_ENGINE=@TTS_ENGINE@
3211 export ENC_OPTS=@ENC_OPTS@
3212 export ENCODER=@ENCODER@
3213 export USE_ELF=@USE_ELF@
3214 export RBDIR=@RBDIR@
3215 export SDLCONFIG=@SDLCONFIG@
3217 CONFIGURE_OPTIONS=@CMDLINE@
3219 include \$(TOOLSDIR)/root.make
3223 echo "Created Makefile"