Add target/hosted/unix/thread-pth.c, which is a working thread implementation
[kugel-rb.git] / tools / configure
blob4d14a019d69e1d047665efe5f2004498b7a05f52
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 if [ "$ARG_ARM_EABI" = "1" ]; then
44 prefixtools arm-elf-eabi-
45 gccchoice="4.4.3"
46 else
47 prefixtools arm-elf-
48 gccchoice="4.0.3"
52 # scan the $PATH for the given command
53 findtool(){
54 file="$1"
56 IFS=":"
57 for path in $PATH
59 # echo "checks for $file in $path" >&2
60 if test -f "$path/$file"; then
61 echo "$path/$file"
62 return
64 done
65 # check whether caller wants literal return value if not found
66 if [ "$2" = "--lit" ]; then
67 echo "$file"
71 # scan the $PATH for sdl-config - check whether for a (cross-)win32
72 # sdl as requested
73 findsdl(){
74 file="sdl-config"
75 winbuild="$1"
77 IFS=":"
78 for path in $PATH
80 #echo "checks for $file in $path" >&2
81 if test -f "$path/$file"; then
82 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
83 if [ "yes" = "${winbuild}" ]; then
84 echo "$path/$file"
85 return
87 else
88 if [ "yes" != "${winbuild}" ]; then
89 echo "$path/$file"
90 return
94 done
97 simcc () {
99 # default tool setup for native building
100 prefixtools ""
102 simver=sdl
103 winbuild="$crosscompile"
104 GCCOPTS='-W -Wall -g -fno-builtin'
105 GCCOPTIMIZE=''
106 LDOPTS=''
108 # default output binary name
109 output="rockboxui"
111 # default share option, override below if needed
112 SHARED_FLAG="-shared"
114 case $uname in
115 CYGWIN*)
116 echo "Cygwin host detected"
118 LDOPTS="-mconsole"
119 output="rockboxui.exe"
120 winbuild="yes"
123 MINGW*)
124 echo "MinGW host detected"
126 LDOPTS="-mconsole"
127 output="rockboxui.exe"
128 winbuild="yes"
131 Linux)
132 echo "Linux host detected"
135 FreeBSD)
136 echo "FreeBSD host detected"
139 Darwin)
140 echo "Darwin host detected"
142 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
145 SunOS)
146 echo "*Solaris host detected"
148 GCCOPTS="$GCCOPTS -fPIC"
149 LDOPTS="-lm"
153 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
154 exit 1
156 esac
158 sdl=`findsdl $winbuild`
160 if [ $1 = "sdl" ]; then
161 if [ -z "$sdl" ]; then
162 echo "configure didn't find sdl-config, which indicates that you"
163 echo "don't have SDL (properly) installed. Please correct and"
164 echo "re-run configure!"
165 exit 2
166 else
167 # generic sdl-config checker
168 GCCOPTS="$GCCOPTS `$sdl --cflags`"
169 LDOPTS="$LDOPTS `$sdl --libs`"
173 if [ "$ARG_GNU_PTH" = "1" ]; then
174 if [ "$crosscompile" = "yes" ]; then
175 echo "[ERROR] GNU Pth cannot be used on windows"
177 if [ -n "`findtool pth-config`" ]; then
178 GCCOPTS="$GCCOPTS `pth-config --cflags`"
179 extradefines="$extradefines -DHAVE_GNU_PTH_THREADS"
180 LDOPTS="$LDOPTS `pth-config --libs`"
181 echo "Found and use GNU Pth Portable Threads library"
182 else
183 echo "Configure did not find pth-config.\nFalling back to SDL library for threads"
187 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
189 if test "X$crosscompile" != "Xyes"; then
190 case `uname -m` in
191 x86_64|amd64)
192 # fPIC is needed to make shared objects link
193 # setting visibility to hidden is necessary to avoid strange crashes
194 # due to symbol clashing
195 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
196 # x86_64 supports MMX by default
199 i686)
200 echo "Enabling MMX support"
201 GCCOPTS="$GCCOPTS -mmmx"
203 esac
205 id=$$
206 cat >$tmpdir/conftest-$id.c <<EOF
207 #include <stdio.h>
208 int main(int argc, char **argv)
210 int var=0;
211 char *varp = (char *)&var;
212 *varp=1;
214 printf("%d\n", var);
215 return 0;
219 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
221 if test `$tmpdir/conftest-$id 2>/dev/null` -gt "1"; then
222 # big endian
223 endian="big"
224 else
225 # little endian
226 endian="little"
229 if [ $1 = "sdl" ]; then
230 echo "Simulator environment deemed $endian endian"
231 elif [ $1 = "checkwps" ]; then
232 echo "CheckWPS environment deemed $endian endian"
235 # use wildcard here to make it work even if it was named *.exe like
236 # on cygwin
237 rm -f $tmpdir/conftest-$id*
238 else
239 # We are crosscompiling
240 # add cross-compiler option(s)
241 prefixtools i586-mingw32msvc-
242 LDOPTS="$LDOPTS -mconsole"
243 output="rockboxui.exe"
244 endian="little" # windows is little endian
245 echo "Enabling MMX support"
246 GCCOPTS="$GCCOPTS -mmmx"
251 # functions for setting up cross-compiler names and options
252 # also set endianess and what the exact recommended gcc version is
253 # the gcc version should most likely match what versions we build with
254 # rockboxdev.sh
256 shcc () {
257 prefixtools sh-elf-
258 GCCOPTS="$CCOPTS -m1"
259 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
260 endian="big"
261 gccchoice="4.0.3"
264 calmrisccc () {
265 prefixtools calmrisc16-unknown-elf-
266 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
267 GCCOPTIMIZE="-fomit-frame-pointer"
268 endian="big"
271 coldfirecc () {
272 prefixtools m68k-elf-
273 GCCOPTS="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
274 GCCOPTIMIZE="-fomit-frame-pointer"
275 endian="big"
276 gccchoice="3.4.6"
279 arm7tdmicc () {
280 findarmgcc
281 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
282 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" != "1"; then
283 GCCOPTS="$GCCOPTS -mlong-calls"
285 GCCOPTIMIZE="-fomit-frame-pointer"
286 endian="little"
289 arm9tdmicc () {
290 findarmgcc
291 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
292 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" != "1"; then
293 GCCOPTS="$GCCOPTS -mlong-calls"
295 GCCOPTIMIZE="-fomit-frame-pointer"
296 endian="little"
299 arm940tbecc () {
300 findarmgcc
301 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
302 if test "$ARG_ARM_EABI" != "1"; then
303 GCCOPTS="$GCCOPTS -mlong-calls"
305 GCCOPTIMIZE="-fomit-frame-pointer"
306 endian="big"
309 arm940tcc () {
310 findarmgcc
311 GCCOPTS="$CCOPTS -mcpu=arm940t"
312 if test "$ARG_ARM_EABI" != "1"; then
313 GCCOPTS="$GCCOPTS -mlong-calls"
315 GCCOPTIMIZE="-fomit-frame-pointer"
316 endian="little"
319 arm946cc () {
320 findarmgcc
321 GCCOPTS="$CCOPTS -mcpu=arm9e"
322 if test "$ARG_ARM_EABI" != "1"; then
323 GCCOPTS="$GCCOPTS -mlong-calls"
325 GCCOPTIMIZE="-fomit-frame-pointer"
326 endian="little"
329 arm926ejscc () {
330 findarmgcc
331 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
332 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" != "1"; then
333 GCCOPTS="$GCCOPTS -mlong-calls"
335 GCCOPTIMIZE="-fomit-frame-pointer"
336 endian="little"
339 arm1136jfscc () {
340 findarmgcc
341 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
342 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" != "1"; then
343 GCCOPTS="$GCCOPTS -mlong-calls"
345 GCCOPTIMIZE="-fomit-frame-pointer"
346 endian="little"
349 arm1176jzscc () {
350 findarmgcc
351 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
352 if test "$ARG_ARM_EABI" != "1"; then
353 GCCOPTS="$GCCOPTS -mlong-calls"
355 GCCOPTIMIZE="-fomit-frame-pointer"
356 endian="little"
359 mipselcc () {
360 prefixtools mipsel-elf-
361 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls"
362 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
363 GCCOPTIMIZE="-fomit-frame-pointer"
364 endian="little"
365 gccchoice="4.1.2"
368 whichadvanced () {
369 atype=`echo "$1" | cut -c 2-`
370 ##################################################################
371 # Prompt for specific developer options
373 if [ "$atype" ]; then
374 interact=
375 else
376 interact=1
377 echo ""
378 echo "Enter your developer options (press enter when done)"
379 printf "(D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile, (T)est plugins"
380 if [ "$memory" = "2" ]; then
381 printf ", (8)MB MOD"
383 if [ "$modelname" = "archosplayer" ]; then
384 printf ", Use (A)TA poweroff"
386 if [ "$t_model" = "ondio" ]; then
387 printf ", (B)acklight MOD"
389 if [ "$modelname" = "iaudiom5" ]; then
390 printf ", (F)M radio MOD"
392 if [ "$modelname" = "iriverh120" ]; then
393 printf ", (R)TC MOD"
395 echo ""
398 cont=1
399 while [ $cont = "1" ]; do
401 if [ "$interact" ]; then
402 option=`input`
403 else
404 option=`echo "$atype" | cut -c 1`
407 case $option in
408 [Dd])
409 if [ "yes" = "$profile" ]; then
410 echo "Debug is incompatible with profiling"
411 else
412 echo "DEBUG build enabled"
413 use_debug="yes"
416 [Ll])
417 echo "logf() support enabled"
418 logf="yes"
420 [Tt])
421 echo "Including test plugins"
422 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
424 [Cc])
425 echo "bootchart enabled (logf also enabled)"
426 bootchart="yes"
427 logf="yes"
429 [Ss])
430 echo "Simulator build enabled"
431 simulator="yes"
433 [Pp])
434 if [ "yes" = "$use_debug" ]; then
435 echo "Profiling is incompatible with debug"
436 else
437 echo "Profiling support is enabled"
438 profile="yes"
441 [Vv])
442 echo "Voice build selected"
443 voice="yes"
446 if [ "$memory" = "2" ]; then
447 memory="8"
448 echo "Memory size selected: 8MB"
451 [Aa])
452 if [ "$modelname" = "archosplayer" ]; then
453 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
454 echo "ATA power off enabled"
457 [Bb])
458 if [ "$t_model" = "ondio" ]; then
459 have_backlight="#define HAVE_BACKLIGHT"
460 echo "Backlight functions enabled"
463 [Ff])
464 if [ "$modelname" = "iaudiom5" ]; then
465 have_fmradio_in="#define HAVE_FMRADIO_IN"
466 echo "FM radio functions enabled"
469 [Rr])
470 if [ "$modelname" = "iriverh120" ]; then
471 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
472 have_rtc_alarm="#define HAVE_RTC_ALARM"
473 echo "RTC functions enabled (DS1339/DS3231)"
476 [Ww])
477 echo "Enabling Windows 32 cross-compiling"
478 crosscompile="yes"
481 if [ "$interact" ]; then
482 cont=0
483 else
484 echo "[ERROR] Option $option unsupported"
487 esac
488 if [ "$interact" ]; then
489 btype="$btype$option"
490 else
491 atype=`echo "$atype" | cut -c 2-`
492 [ "$atype" ] || cont=0
494 done
495 echo "done"
497 if [ "yes" = "$voice" ]; then
498 # Ask about languages to build
499 picklang
500 voicelanguage=`whichlang`
501 echo "Voice language set to $voicelanguage"
503 # Configure encoder and TTS engine for each language
504 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
505 voiceconfig "$thislang"
506 done
508 if [ "yes" = "$use_debug" ]; then
509 debug="-DDEBUG"
510 GCCOPTS="$GCCOPTS -g -DDEBUG"
512 if [ "yes" = "$logf" ]; then
513 use_logf="#define ROCKBOX_HAS_LOGF 1"
515 if [ "yes" = "$bootchart" ]; then
516 use_bootchart="#define DO_BOOTCHART 1"
518 if [ "yes" = "$simulator" ]; then
519 debug="-DDEBUG"
520 extradefines="$extradefines -DSIMULATOR"
521 archosrom=""
522 flash=""
524 if [ "yes" = "$profile" ]; then
525 extradefines="$extradefines -DRB_PROFILE"
526 PROFILE_OPTS="-finstrument-functions"
530 # Configure voice settings
531 voiceconfig () {
532 thislang=$1
533 if [ ! "$ARG_TTS" ]; then
534 echo "Building $thislang voice for $modelname. Select options"
535 echo ""
538 if [ -n "`findtool flite`" ]; then
539 FLITE="F(l)ite "
540 FLITE_OPTS=""
541 DEFAULT_TTS="flite"
542 DEFAULT_TTS_OPTS=$FLITE_OPTS
543 DEFAULT_NOISEFLOOR="500"
544 DEFAULT_CHOICE="L"
546 if [ -n "`findtool espeak`" ]; then
547 ESPEAK="(e)Speak "
548 ESPEAK_OPTS=""
549 DEFAULT_TTS="espeak"
550 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
551 DEFAULT_NOISEFLOOR="500"
552 DEFAULT_CHOICE="e"
554 if [ -n "`findtool festival`" ]; then
555 FESTIVAL="(F)estival "
556 case "$thislang" in
557 "italiano")
558 FESTIVAL_OPTS="--language italian"
560 "espanol")
561 FESTIVAL_OPTS="--language spanish"
563 "finnish")
564 FESTIVAL_OPTS="--language finnish"
566 "czech")
567 FESTIVAL_OPTS="--language czech"
570 FESTIVAL_OPTS=""
572 esac
573 DEFAULT_TTS="festival"
574 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
575 DEFAULT_NOISEFLOOR="500"
576 DEFAULT_CHOICE="F"
578 if [ -n "`findtool swift`" ]; then
579 SWIFT="S(w)ift "
580 SWIFT_OPTS=""
581 DEFAULT_TTS="swift"
582 DEFAULT_TTS_OPTS=$SWIFT_OPTS
583 DEFAULT_NOISEFLOOR="500"
584 DEFAULT_CHOICE="w"
586 # Allow SAPI if Windows is in use
587 if [ -n "`findtool winver`" ]; then
588 SAPI="(S)API "
589 SAPI_OPTS=""
590 DEFAULT_TTS="sapi"
591 DEFAULT_TTS_OPTS=$SAPI_OPTS
592 DEFAULT_NOISEFLOOR="500"
593 DEFAULT_CHOICE="S"
596 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
597 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
598 exit 3
601 if [ "$ARG_TTS" ]; then
602 option=$ARG_TTS
603 else
604 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
605 option=`input`
607 advopts="$advopts --tts=$option"
608 case "$option" in
609 [Ll])
610 TTS_ENGINE="flite"
611 NOISEFLOOR="500" # TODO: check this value
612 TTS_OPTS=$FLITE_OPTS
614 [Ee])
615 TTS_ENGINE="espeak"
616 NOISEFLOOR="500"
617 TTS_OPTS=$ESPEAK_OPTS
619 [Ff])
620 TTS_ENGINE="festival"
621 NOISEFLOOR="500"
622 TTS_OPTS=$FESTIVAL_OPTS
624 [Ss])
625 TTS_ENGINE="sapi"
626 NOISEFLOOR="500"
627 TTS_OPTS=$SAPI_OPTS
629 [Ww])
630 TTS_ENGINE="swift"
631 NOISEFLOOR="500"
632 TTS_OPTS=$SWIFT_OPTS
635 TTS_ENGINE=$DEFAULT_TTS
636 TTS_OPTS=$DEFAULT_TTS_OPTS
637 NOISEFLOOR=$DEFAULT_NOISEFLOOR
638 esac
639 echo "Using $TTS_ENGINE for TTS"
641 # Select which voice to use for Festival
642 if [ "$TTS_ENGINE" = "festival" ]; then
643 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
644 for voice in $voicelist; do
645 TTS_FESTIVAL_VOICE="$voice" # Default choice
646 break
647 done
648 if [ "$ARG_VOICE" ]; then
649 CHOICE=$ARG_VOICE
650 else
652 for voice in $voicelist; do
653 printf "%3d. %s\n" "$i" "$voice"
654 i=`expr $i + 1`
655 done
656 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
657 CHOICE=`input`
660 for voice in $voicelist; do
661 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
662 TTS_FESTIVAL_VOICE="$voice"
664 i=`expr $i + 1`
665 done
666 advopts="$advopts --voice=$CHOICE"
667 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
668 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
671 # Read custom tts options from command line
672 if [ "$ARG_TTSOPTS" ]; then
673 TTS_OPTS="$ARG_TTSOPTS"
674 advopts="$advopts --ttsopts='$TTS_OPTS'"
675 echo "$TTS_ENGINE options set to $TTS_OPTS"
678 if [ "$swcodec" = "yes" ]; then
679 ENCODER="rbspeexenc"
680 ENC_CMD="rbspeexenc"
681 ENC_OPTS="-q 4 -c 10"
682 else
683 if [ -n "`findtool lame`" ]; then
684 ENCODER="lame"
685 ENC_CMD="lame"
686 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
687 else
688 echo "You need LAME in the system path to build voice files for"
689 echo "HWCODEC targets."
690 exit 4
694 echo "Using $ENCODER for encoding voice clips"
696 # Read custom encoder options from command line
697 if [ "$ARG_ENCOPTS" ]; then
698 ENC_OPTS="$ARG_ENCOPTS"
699 advopts="$advopts --encopts='$ENC_OPTS'"
700 echo "$ENCODER options set to $ENC_OPTS"
703 TEMPDIR="${pwd}"
704 if [ -n "`findtool cygpath`" ]; then
705 TEMPDIR=`cygpath . -a -w`
709 picklang() {
710 # figure out which languages that are around
711 for file in $rootdir/apps/lang/*.lang; do
712 clean=`basename $file .lang`
713 langs="$langs $clean"
714 done
716 if [ "$ARG_LANG" ]; then
717 pick=$ARG_LANG
718 else
719 echo "Select a number for the language to use (default is english)"
720 # FIXME The multiple-language feature is currently broken
721 # echo "You may enter a comma-separated list of languages to build"
723 num=1
724 for one in $langs; do
725 echo "$num. $one"
726 num=`expr $num + 1`
727 done
728 pick=`input`
730 advopts="$advopts --language=$pick"
733 whichlang() {
734 output=""
735 # Allow the user to pass a comma-separated list of langauges
736 for thispick in `echo $pick | sed 's/,/ /g'`; do
737 num=1
738 for one in $langs; do
739 # Accept both the language number and name
740 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
741 if [ "$output" = "" ]; then
742 output=$one
743 else
744 output=$output,$one
747 num=`expr $num + 1`
748 done
749 done
750 if [ -z "$output" ]; then
751 # pick a default
752 output="english"
754 echo $output
757 help() {
758 echo "Rockbox configure script."
759 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
760 echo "Do *NOT* run this within the tools directory!"
761 echo ""
762 cat <<EOF
763 Usage: configure [OPTION]...
764 Options:
765 --target=TARGET Sets the target, TARGET can be either the target ID or
766 corresponding string. Run without this option to see all
767 available targets.
769 --ram=RAM Sets the RAM for certain targets. Even though any number
770 is accepted, not every number is correct. The default
771 value will be applied, if you entered a wrong number
772 (which depends on the target). Watch the output. Run
773 without this option if you are not sure which the right
774 number is.
776 --type=TYPE Sets the build type. Shortcuts are also valid.
777 Run without this option to see all available types.
778 Multiple values are allowed and managed in the input
779 order. So --type=b stands for Bootloader build, while
780 --type=ab stands for "Backlight MOD" build.
782 --language=LANG Set the language used for voice generation (used only if
783 TYPE is AV).
785 --tts=ENGINE Set the TTS engine used for voice generation (used only
786 if TYPE is AV).
788 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
789 AV).
791 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
793 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
795 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
796 This is useful for having multiple alternate builds on
797 your device that you can load with ROLO. However as the
798 bootloader looks for .rockbox you won't be able to boot
799 into this build.
801 --ccache Enable ccache use (done by default these days)
802 --no-ccache Disable ccache use
804 --eabi Make configure prefer toolchains that are able to compile
805 for the new ARM standard abi EABI
806 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
807 --with-pth Enable/Disable use of GNU Pth threads for the simulator
808 --without-pth
809 --help Shows this message (must not be used with other options)
813 exit
816 ARG_CCACHE=
817 ARG_ENCOPTS=
818 ARG_LANG=
819 ARG_RAM=
820 ARG_RBDIR=
821 ARG_TARGET=
822 ARG_TTS=
823 ARG_TTSOPTS=
824 ARG_TYPE=
825 ARG_VOICE=
826 ARG_ARM_EABI=
827 ARG_GNU_PTH=
828 err=
829 for arg in "$@"; do
830 case "$arg" in
831 --ccache) ARG_CCACHE=1;;
832 --no-ccache) ARG_CCACHE=0;;
833 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
834 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
835 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
836 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
837 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
838 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
839 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
840 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
841 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
842 --eabi) ARG_ARM_EABI=1;;
843 --no-eabi) ARG_ARM_EABI=0;;
844 --help) help;;
845 --with-pth) ARG_GNU_PTH=1;;
846 --without-pth) ARG_GNU_PTH=0;;
847 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
848 esac
849 done
850 [ "$err" ] && exit 1
852 advopts=
854 if [ "$TMPDIR" != "" ]; then
855 tmpdir=$TMPDIR
856 else
857 tmpdir=/tmp
859 echo Using temporary directory $tmpdir
861 if test -r "configure"; then
862 # this is a check for a configure script in the current directory, it there
863 # is one, try to figure out if it is this one!
865 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
866 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
867 echo "It will only cause you pain and grief. Instead do this:"
868 echo ""
869 echo " cd .."
870 echo " mkdir build-dir"
871 echo " cd build-dir"
872 echo " ../tools/configure"
873 echo ""
874 echo "Much happiness will arise from this. Enjoy"
875 exit 5
879 # get our current directory
880 pwd=`pwd`;
882 if { echo $pwd | grep " "; } then
883 echo "You're running this script in a path that contains space. The build"
884 echo "system is unfortunately not clever enough to deal with this. Please"
885 echo "run the script from a different path, rename the path or fix the build"
886 echo "system!"
887 exit 6
890 if [ -z "$rootdir" ]; then
891 ##################################################################
892 # Figure out where the source code root is!
894 rootdir=`dirname $0`/../
896 #####################################################################
897 # Convert the possibly relative directory name to an absolute version
899 now=`pwd`
900 cd $rootdir
901 rootdir=`pwd`
903 # cd back to the build dir
904 cd $now
907 apps="apps"
908 appsdir='\$(ROOTDIR)/apps'
909 firmdir='\$(ROOTDIR)/firmware'
910 toolsdir='\$(ROOTDIR)/tools'
913 ##################################################################
914 # Figure out target platform
917 if [ "$ARG_TARGET" ]; then
918 buildfor=$ARG_TARGET
919 else
920 echo "Enter target platform:"
921 cat <<EOF
922 ==Archos== ==iriver== ==Apple iPod==
923 0) Player/Studio 10) H120/H140 20) Color/Photo
924 1) Recorder 11) H320/H340 21) Nano 1G
925 2) FM Recorder 12) iHP-100/110/115 22) Video
926 3) Recorder v2 13) iFP-790 23) 3G
927 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
928 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
929 6) AV300 26) Mini 2G
930 ==Toshiba== 27) 1G, 2G
931 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
932 30) X5/X5V/X5L 41) Gigabeat S
933 31) M5/M5L ==SanDisk==
934 32) 7 ==Olympus= 50) Sansa e200
935 33) D2 70) M:Robe 500 51) Sansa e200R
936 34) M3/M3L 71) M:Robe 100 52) Sansa c200
937 53) Sansa m200
938 ==Creative== ==Philips== 54) Sansa c100
939 90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip
940 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2
941 92) Zen Vision HDD1830 57) Sansa m200v4
942 102) GoGear HDD6330 58) Sansa Fuze
943 ==Onda== 59) Sansa c200v2
944 120) VX747 ==Meizu== 60) Sansa Clipv2
945 121) VX767 110) M6SL 61) Sansa View
946 122) VX747+ 111) M6SP 62) Sansa Clip+
947 123) VX777 112) M3 63) Sansa Fuze v2
949 ==Logik==
950 ==Samsung== ==Tatung== 80) DAX 1GB MP3/DAB
951 140) YH-820 150) Elio TPJ-1022
952 141) YH-920 ==Lyre project==
953 142) YH-925 ==Packard Bell== 130) Lyre proto 1
954 143) YP-S3 160) Vibe 500 131) Mini2440
956 ==MPIO==
957 170) HD200
960 buildfor=`input`;
963 # Set of tools built for all target platforms:
964 toolset="rdf2binary convbdf codepages"
966 # Toolsets for some target families:
967 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
968 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
969 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
970 ipodbitmaptools="$toolset scramble bmp2rb"
971 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
972 tccbitmaptools="$toolset scramble bmp2rb"
973 # generic is used by IFP, Meizu and Onda
974 genericbitmaptools="$toolset bmp2rb"
975 # scramble is used by all other targets
976 scramblebitmaptools="$genericbitmaptools scramble"
979 # ---- For each target ----
981 # *Variables*
982 # target_id: a unique number identifying this target, IS NOT the menu number.
983 # Just use the currently highest number+1 when you add a new
984 # target.
985 # modelname: short model name used all over to identify this target
986 # memory: number of megabytes of RAM this target has. If the amount can
987 # be selected by the size prompt, let memory be unset here
988 # target: -Ddefine passed to the build commands to make the correct
989 # config-*.h file get included etc
990 # tool: the tool that takes a plain binary and converts that into a
991 # working "firmware" file for your target
992 # output: the final output file name
993 # boottool: the tool that takes a plain binary and generates a bootloader
994 # file for your target (or blank to use $tool)
995 # bootoutput:the final output file name for the bootloader (or blank to use
996 # $output)
997 # appextra: passed to the APPEXTRA variable in the Makefiles.
998 # TODO: add proper explanation
999 # archosrom: used only for Archos targets that build a special flashable .ucl
1000 # image.
1001 # flash: name of output for flashing, for targets where there's a special
1002 # file output for this.
1003 # plugins: set to 'yes' to build the plugins. Early development builds can
1004 # set this to no in the early stages to have an easier life for a
1005 # while
1006 # swcodec: set 'yes' on swcodec targets
1007 # toolset: lists what particular tools in the tools/ directory that this
1008 # target needs to have built prior to building Rockbox
1010 # *Functions*
1011 # *cc: sets up gcc and compiler options for your target builds. Note
1012 # that if you select a simulator build, the compiler selection is
1013 # overridden later in the script.
1015 case $buildfor in
1017 0|archosplayer)
1018 target_id=1
1019 modelname="archosplayer"
1020 target="-DARCHOS_PLAYER"
1021 shcc
1022 tool="$rootdir/tools/scramble"
1023 output="archos.mod"
1024 appextra="player:gui"
1025 archosrom="$pwd/rombox.ucl"
1026 flash="$pwd/rockbox.ucl"
1027 plugins="yes"
1028 swcodec=""
1030 # toolset is the tools within the tools directory that we build for
1031 # this particular target.
1032 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1034 # Note: the convbdf is present in the toolset just because: 1) the
1035 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1036 # build the player simulator
1038 t_cpu="sh"
1039 t_manufacturer="archos"
1040 t_model="player"
1043 1|archosrecorder)
1044 target_id=2
1045 modelname="archosrecorder"
1046 target="-DARCHOS_RECORDER"
1047 shcc
1048 tool="$rootdir/tools/scramble"
1049 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1050 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1051 output="ajbrec.ajz"
1052 appextra="recorder:gui"
1053 #archosrom="$pwd/rombox.ucl"
1054 flash="$pwd/rockbox.ucl"
1055 plugins="yes"
1056 swcodec=""
1057 # toolset is the tools within the tools directory that we build for
1058 # this particular target.
1059 toolset=$archosbitmaptools
1060 t_cpu="sh"
1061 t_manufacturer="archos"
1062 t_model="recorder"
1065 2|archosfmrecorder)
1066 target_id=3
1067 modelname="archosfmrecorder"
1068 target="-DARCHOS_FMRECORDER"
1069 shcc
1070 tool="$rootdir/tools/scramble -fm"
1071 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1072 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1073 output="ajbrec.ajz"
1074 appextra="recorder:gui"
1075 #archosrom="$pwd/rombox.ucl"
1076 flash="$pwd/rockbox.ucl"
1077 plugins="yes"
1078 swcodec=""
1079 # toolset is the tools within the tools directory that we build for
1080 # this particular target.
1081 toolset=$archosbitmaptools
1082 t_cpu="sh"
1083 t_manufacturer="archos"
1084 t_model="fm_v2"
1087 3|archosrecorderv2)
1088 target_id=4
1089 modelname="archosrecorderv2"
1090 target="-DARCHOS_RECORDERV2"
1091 shcc
1092 tool="$rootdir/tools/scramble -v2"
1093 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1094 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1095 output="ajbrec.ajz"
1096 appextra="recorder:gui"
1097 #archosrom="$pwd/rombox.ucl"
1098 flash="$pwd/rockbox.ucl"
1099 plugins="yes"
1100 swcodec=""
1101 # toolset is the tools within the tools directory that we build for
1102 # this particular target.
1103 toolset=$archosbitmaptools
1104 t_cpu="sh"
1105 t_manufacturer="archos"
1106 t_model="fm_v2"
1109 4|archosondiosp)
1110 target_id=7
1111 modelname="archosondiosp"
1112 target="-DARCHOS_ONDIOSP"
1113 shcc
1114 tool="$rootdir/tools/scramble -osp"
1115 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1116 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1117 output="ajbrec.ajz"
1118 appextra="recorder:gui"
1119 #archosrom="$pwd/rombox.ucl"
1120 flash="$pwd/rockbox.ucl"
1121 plugins="yes"
1122 swcodec=""
1123 # toolset is the tools within the tools directory that we build for
1124 # this particular target.
1125 toolset=$archosbitmaptools
1126 t_cpu="sh"
1127 t_manufacturer="archos"
1128 t_model="ondio"
1131 5|archosondiofm)
1132 target_id=8
1133 modelname="archosondiofm"
1134 target="-DARCHOS_ONDIOFM"
1135 shcc
1136 tool="$rootdir/tools/scramble -ofm"
1137 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1138 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1139 output="ajbrec.ajz"
1140 appextra="recorder:gui"
1141 #archosrom="$pwd/rombox.ucl"
1142 flash="$pwd/rockbox.ucl"
1143 plugins="yes"
1144 swcodec=""
1145 toolset=$archosbitmaptools
1146 t_cpu="sh"
1147 t_manufacturer="archos"
1148 t_model="ondio"
1151 6|archosav300)
1152 target_id=38
1153 modelname="archosav300"
1154 target="-DARCHOS_AV300"
1155 memory=16 # always
1156 arm7tdmicc
1157 tool="$rootdir/tools/scramble -mm=C"
1158 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1159 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1160 output="cjbm.ajz"
1161 appextra="recorder:gui"
1162 plugins="yes"
1163 swcodec=""
1164 # toolset is the tools within the tools directory that we build for
1165 # this particular target.
1166 toolset="$toolset scramble descramble bmp2rb"
1167 # architecture, manufacturer and model for the target-tree build
1168 t_cpu="arm"
1169 t_manufacturer="archos"
1170 t_model="av300"
1173 10|iriverh120)
1174 target_id=9
1175 modelname="iriverh120"
1176 target="-DIRIVER_H120"
1177 memory=32 # always
1178 coldfirecc
1179 tool="$rootdir/tools/scramble -add=h120"
1180 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1181 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1182 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1183 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1184 output="rockbox.iriver"
1185 bootoutput="bootloader.iriver"
1186 appextra="recorder:gui"
1187 flash="$pwd/rombox.iriver"
1188 plugins="yes"
1189 swcodec="yes"
1190 # toolset is the tools within the tools directory that we build for
1191 # this particular target.
1192 toolset=$iriverbitmaptools
1193 t_cpu="coldfire"
1194 t_manufacturer="iriver"
1195 t_model="h100"
1198 11|iriverh300)
1199 target_id=10
1200 modelname="iriverh300"
1201 target="-DIRIVER_H300"
1202 memory=32 # always
1203 coldfirecc
1204 tool="$rootdir/tools/scramble -add=h300"
1205 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1206 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1207 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1208 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1209 output="rockbox.iriver"
1210 appextra="recorder:gui"
1211 plugins="yes"
1212 swcodec="yes"
1213 # toolset is the tools within the tools directory that we build for
1214 # this particular target.
1215 toolset=$iriverbitmaptools
1216 t_cpu="coldfire"
1217 t_manufacturer="iriver"
1218 t_model="h300"
1221 12|iriverh100)
1222 target_id=11
1223 modelname="iriverh100"
1224 target="-DIRIVER_H100"
1225 memory=16 # always
1226 coldfirecc
1227 tool="$rootdir/tools/scramble -add=h100"
1228 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1229 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1230 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1231 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1232 output="rockbox.iriver"
1233 bootoutput="bootloader.iriver"
1234 appextra="recorder:gui"
1235 flash="$pwd/rombox.iriver"
1236 plugins="yes"
1237 swcodec="yes"
1238 # toolset is the tools within the tools directory that we build for
1239 # this particular target.
1240 toolset=$iriverbitmaptools
1241 t_cpu="coldfire"
1242 t_manufacturer="iriver"
1243 t_model="h100"
1246 13|iriverifp7xx)
1247 target_id=19
1248 modelname="iriverifp7xx"
1249 target="-DIRIVER_IFP7XX"
1250 memory=1
1251 arm7tdmicc short
1252 tool="cp"
1253 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1254 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1255 output="rockbox.wma"
1256 appextra="recorder:gui"
1257 plugins="yes"
1258 swcodec="yes"
1259 # toolset is the tools within the tools directory that we build for
1260 # this particular target.
1261 toolset=$genericbitmaptools
1262 t_cpu="arm"
1263 t_manufacturer="pnx0101"
1264 t_model="iriver-ifp7xx"
1267 14|iriverh10)
1268 target_id=22
1269 modelname="iriverh10"
1270 target="-DIRIVER_H10"
1271 memory=32 # always
1272 arm7tdmicc
1273 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1274 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1275 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1276 output="rockbox.mi4"
1277 appextra="recorder:gui"
1278 plugins="yes"
1279 swcodec="yes"
1280 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1281 bootoutput="H10_20GC.mi4"
1282 # toolset is the tools within the tools directory that we build for
1283 # this particular target.
1284 toolset=$scramblebitmaptools
1285 # architecture, manufacturer and model for the target-tree build
1286 t_cpu="arm"
1287 t_manufacturer="iriver"
1288 t_model="h10"
1291 15|iriverh10_5gb)
1292 target_id=24
1293 modelname="iriverh10_5gb"
1294 target="-DIRIVER_H10_5GB"
1295 memory=32 # always
1296 arm7tdmicc
1297 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1298 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1299 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1300 output="rockbox.mi4"
1301 appextra="recorder:gui"
1302 plugins="yes"
1303 swcodec="yes"
1304 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1305 bootoutput="H10.mi4"
1306 # toolset is the tools within the tools directory that we build for
1307 # this particular target.
1308 toolset=$scramblebitmaptools
1309 # architecture, manufacturer and model for the target-tree build
1310 t_cpu="arm"
1311 t_manufacturer="iriver"
1312 t_model="h10"
1315 20|ipodcolor)
1316 target_id=13
1317 modelname="ipodcolor"
1318 target="-DIPOD_COLOR"
1319 memory=32 # always
1320 arm7tdmicc
1321 tool="$rootdir/tools/scramble -add=ipco"
1322 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1323 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1324 output="rockbox.ipod"
1325 appextra="recorder:gui"
1326 plugins="yes"
1327 swcodec="yes"
1328 bootoutput="bootloader-$modelname.ipod"
1329 # toolset is the tools within the tools directory that we build for
1330 # this particular target.
1331 toolset=$ipodbitmaptools
1332 # architecture, manufacturer and model for the target-tree build
1333 t_cpu="arm"
1334 t_manufacturer="ipod"
1335 t_model="color"
1338 21|ipodnano1g)
1339 target_id=14
1340 modelname="ipodnano1g"
1341 target="-DIPOD_NANO"
1342 memory=32 # always
1343 arm7tdmicc
1344 tool="$rootdir/tools/scramble -add=nano"
1345 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1346 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1347 output="rockbox.ipod"
1348 appextra="recorder:gui"
1349 plugins="yes"
1350 swcodec="yes"
1351 bootoutput="bootloader-$modelname.ipod"
1352 # toolset is the tools within the tools directory that we build for
1353 # this particular target.
1354 toolset=$ipodbitmaptools
1355 # architecture, manufacturer and model for the target-tree build
1356 t_cpu="arm"
1357 t_manufacturer="ipod"
1358 t_model="nano"
1361 22|ipodvideo)
1362 target_id=15
1363 modelname="ipodvideo"
1364 target="-DIPOD_VIDEO"
1365 arm7tdmicc
1366 tool="$rootdir/tools/scramble -add=ipvd"
1367 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1368 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1369 output="rockbox.ipod"
1370 appextra="recorder:gui"
1371 plugins="yes"
1372 swcodec="yes"
1373 bootoutput="bootloader-$modelname.ipod"
1374 # toolset is the tools within the tools directory that we build for
1375 # this particular target.
1376 toolset=$ipodbitmaptools
1377 # architecture, manufacturer and model for the target-tree build
1378 t_cpu="arm"
1379 t_manufacturer="ipod"
1380 t_model="video"
1383 23|ipod3g)
1384 target_id=16
1385 modelname="ipod3g"
1386 target="-DIPOD_3G"
1387 memory=32 # always
1388 arm7tdmicc
1389 tool="$rootdir/tools/scramble -add=ip3g"
1390 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1391 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1392 output="rockbox.ipod"
1393 appextra="recorder:gui"
1394 plugins="yes"
1395 swcodec="yes"
1396 bootoutput="bootloader-$modelname.ipod"
1397 # toolset is the tools within the tools directory that we build for
1398 # this particular target.
1399 toolset=$ipodbitmaptools
1400 # architecture, manufacturer and model for the target-tree build
1401 t_cpu="arm"
1402 t_manufacturer="ipod"
1403 t_model="3g"
1406 24|ipod4g)
1407 target_id=17
1408 modelname="ipod4g"
1409 target="-DIPOD_4G"
1410 memory=32 # always
1411 arm7tdmicc
1412 tool="$rootdir/tools/scramble -add=ip4g"
1413 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1414 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1415 output="rockbox.ipod"
1416 appextra="recorder:gui"
1417 plugins="yes"
1418 swcodec="yes"
1419 bootoutput="bootloader-$modelname.ipod"
1420 # toolset is the tools within the tools directory that we build for
1421 # this particular target.
1422 toolset=$ipodbitmaptools
1423 # architecture, manufacturer and model for the target-tree build
1424 t_cpu="arm"
1425 t_manufacturer="ipod"
1426 t_model="4g"
1429 25|ipodmini1g)
1430 target_id=18
1431 modelname="ipodmini1g"
1432 target="-DIPOD_MINI"
1433 memory=32 # always
1434 arm7tdmicc
1435 tool="$rootdir/tools/scramble -add=mini"
1436 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1437 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1438 output="rockbox.ipod"
1439 appextra="recorder:gui"
1440 plugins="yes"
1441 swcodec="yes"
1442 bootoutput="bootloader-$modelname.ipod"
1443 # toolset is the tools within the tools directory that we build for
1444 # this particular target.
1445 toolset=$ipodbitmaptools
1446 # architecture, manufacturer and model for the target-tree build
1447 t_cpu="arm"
1448 t_manufacturer="ipod"
1449 t_model="mini"
1452 26|ipodmini2g)
1453 target_id=21
1454 modelname="ipodmini2g"
1455 target="-DIPOD_MINI2G"
1456 memory=32 # always
1457 arm7tdmicc
1458 tool="$rootdir/tools/scramble -add=mn2g"
1459 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1460 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1461 output="rockbox.ipod"
1462 appextra="recorder:gui"
1463 plugins="yes"
1464 swcodec="yes"
1465 bootoutput="bootloader-$modelname.ipod"
1466 # toolset is the tools within the tools directory that we build for
1467 # this particular target.
1468 toolset=$ipodbitmaptools
1469 # architecture, manufacturer and model for the target-tree build
1470 t_cpu="arm"
1471 t_manufacturer="ipod"
1472 t_model="mini2g"
1475 27|ipod1g2g)
1476 target_id=29
1477 modelname="ipod1g2g"
1478 target="-DIPOD_1G2G"
1479 memory=32 # always
1480 arm7tdmicc
1481 tool="$rootdir/tools/scramble -add=1g2g"
1482 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1483 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1484 output="rockbox.ipod"
1485 appextra="recorder:gui"
1486 plugins="yes"
1487 swcodec="yes"
1488 bootoutput="bootloader-$modelname.ipod"
1489 # toolset is the tools within the tools directory that we build for
1490 # this particular target.
1491 toolset=$ipodbitmaptools
1492 # architecture, manufacturer and model for the target-tree build
1493 t_cpu="arm"
1494 t_manufacturer="ipod"
1495 t_model="1g2g"
1498 28|ipodnano2g)
1499 target_id=62
1500 modelname="ipodnano2g"
1501 target="-DIPOD_NANO2G"
1502 memory=32 # always
1503 arm940tcc
1504 tool="$rootdir/tools/scramble -add=nn2g"
1505 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1506 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1507 output="rockbox.ipod"
1508 appextra="recorder:gui"
1509 plugins="yes"
1510 swcodec="yes"
1511 bootoutput="bootloader-$modelname.ipod"
1512 # toolset is the tools within the tools directory that we build for
1513 # this particular target.
1514 toolset=$ipodbitmaptools
1515 # architecture, manufacturer and model for the target-tree build
1516 t_cpu="arm"
1517 t_manufacturer="s5l8700"
1518 t_model="ipodnano2g"
1521 30|iaudiox5)
1522 target_id=12
1523 modelname="iaudiox5"
1524 target="-DIAUDIO_X5"
1525 memory=16 # always
1526 coldfirecc
1527 tool="$rootdir/tools/scramble -add=iax5"
1528 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1529 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1530 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1531 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1532 output="rockbox.iaudio"
1533 appextra="recorder:gui"
1534 plugins="yes"
1535 swcodec="yes"
1536 # toolset is the tools within the tools directory that we build for
1537 # this particular target.
1538 toolset="$iaudiobitmaptools"
1539 # architecture, manufacturer and model for the target-tree build
1540 t_cpu="coldfire"
1541 t_manufacturer="iaudio"
1542 t_model="x5"
1545 31|iaudiom5)
1546 target_id=28
1547 modelname="iaudiom5"
1548 target="-DIAUDIO_M5"
1549 memory=16 # always
1550 coldfirecc
1551 tool="$rootdir/tools/scramble -add=iam5"
1552 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1553 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1554 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1555 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1556 output="rockbox.iaudio"
1557 appextra="recorder:gui"
1558 plugins="yes"
1559 swcodec="yes"
1560 # toolset is the tools within the tools directory that we build for
1561 # this particular target.
1562 toolset="$iaudiobitmaptools"
1563 # architecture, manufacturer and model for the target-tree build
1564 t_cpu="coldfire"
1565 t_manufacturer="iaudio"
1566 t_model="m5"
1569 32|iaudio7)
1570 target_id=32
1571 modelname="iaudio7"
1572 target="-DIAUDIO_7"
1573 memory=16 # always
1574 arm946cc
1575 tool="$rootdir/tools/scramble -add=i7"
1576 boottool="$rootdir/tools/scramble -tcc=crc"
1577 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1578 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1579 output="rockbox.iaudio"
1580 appextra="recorder:gui"
1581 plugins="yes"
1582 swcodec="yes"
1583 bootoutput="I7_FW.BIN"
1584 # toolset is the tools within the tools directory that we build for
1585 # this particular target.
1586 toolset="$tccbitmaptools"
1587 # architecture, manufacturer and model for the target-tree build
1588 t_cpu="arm"
1589 t_manufacturer="tcc77x"
1590 t_model="iaudio7"
1593 33|cowond2)
1594 target_id=34
1595 modelname="cowond2"
1596 target="-DCOWON_D2"
1597 memory=32
1598 arm926ejscc
1599 tool="$rootdir/tools/scramble -add=d2"
1600 boottool="cp "
1601 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1602 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1603 output="rockbox.d2"
1604 bootoutput="bootloader-cowond2.bin"
1605 appextra="recorder:gui"
1606 plugins="yes"
1607 swcodec="yes"
1608 toolset="$tccbitmaptools"
1609 # architecture, manufacturer and model for the target-tree build
1610 t_cpu="arm"
1611 t_manufacturer="tcc780x"
1612 t_model="cowond2"
1615 34|iaudiom3)
1616 target_id=37
1617 modelname="iaudiom3"
1618 target="-DIAUDIO_M3"
1619 memory=16 # always
1620 coldfirecc
1621 tool="$rootdir/tools/scramble -add=iam3"
1622 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1623 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1624 output="rockbox.iaudio"
1625 appextra="recorder:gui"
1626 plugins="yes"
1627 swcodec="yes"
1628 # toolset is the tools within the tools directory that we build for
1629 # this particular target.
1630 toolset="$iaudiobitmaptools"
1631 # architecture, manufacturer and model for the target-tree build
1632 t_cpu="coldfire"
1633 t_manufacturer="iaudio"
1634 t_model="m3"
1637 40|gigabeatfx)
1638 target_id=20
1639 modelname="gigabeatfx"
1640 target="-DGIGABEAT_F"
1641 memory=32 # always
1642 arm9tdmicc
1643 tool="$rootdir/tools/scramble -add=giga"
1644 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1645 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1646 output="rockbox.gigabeat"
1647 appextra="recorder:gui"
1648 plugins="yes"
1649 swcodec="yes"
1650 toolset=$gigabeatbitmaptools
1651 boottool="$rootdir/tools/scramble -gigabeat"
1652 bootoutput="FWIMG01.DAT"
1653 # architecture, manufacturer and model for the target-tree build
1654 t_cpu="arm"
1655 t_manufacturer="s3c2440"
1656 t_model="gigabeat-fx"
1659 41|gigabeats)
1660 target_id=26
1661 modelname="gigabeats"
1662 target="-DGIGABEAT_S"
1663 memory=64
1664 arm1136jfscc
1665 tool="$rootdir/tools/scramble -add=gigs"
1666 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1667 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1668 output="rockbox.gigabeat"
1669 appextra="recorder:gui"
1670 plugins="yes"
1671 swcodec="yes"
1672 toolset="$gigabeatbitmaptools"
1673 boottool="$rootdir/tools/scramble -gigabeats"
1674 bootoutput="nk.bin"
1675 # architecture, manufacturer and model for the target-tree build
1676 t_cpu="arm"
1677 t_manufacturer="imx31"
1678 t_model="gigabeat-s"
1681 70|mrobe500)
1682 target_id=36
1683 modelname="mrobe500"
1684 target="-DMROBE_500"
1685 memory=64 # always
1686 arm926ejscc
1687 tool="$rootdir/tools/scramble -add=m500"
1688 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1689 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1690 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1691 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1692 output="rockbox.mrobe500"
1693 appextra="recorder:gui"
1694 plugins="yes"
1695 swcodec="yes"
1696 toolset=$gigabeatbitmaptools
1697 boottool="cp "
1698 bootoutput="rockbox.mrboot"
1699 # architecture, manufacturer and model for the target-tree build
1700 t_cpu="arm"
1701 t_manufacturer="tms320dm320"
1702 t_model="mrobe-500"
1705 71|mrobe100)
1706 target_id=33
1707 modelname="mrobe100"
1708 target="-DMROBE_100"
1709 memory=32 # always
1710 arm7tdmicc
1711 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1712 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1713 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1714 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1715 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1716 output="rockbox.mi4"
1717 appextra="recorder:gui"
1718 plugins="yes"
1719 swcodec="yes"
1720 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1721 bootoutput="pp5020.mi4"
1722 # toolset is the tools within the tools directory that we build for
1723 # this particular target.
1724 toolset=$scramblebitmaptools
1725 # architecture, manufacturer and model for the target-tree build
1726 t_cpu="arm"
1727 t_manufacturer="olympus"
1728 t_model="mrobe-100"
1731 80|logikdax)
1732 target_id=31
1733 modelname="logikdax"
1734 target="-DLOGIK_DAX"
1735 memory=2 # always
1736 arm946cc
1737 tool="$rootdir/tools/scramble -add=ldax"
1738 boottool="$rootdir/tools/scramble -tcc=crc"
1739 bootoutput="player.rom"
1740 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1741 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1742 output="rockbox.logik"
1743 appextra="recorder:gui"
1744 plugins=""
1745 swcodec="yes"
1746 # toolset is the tools within the tools directory that we build for
1747 # this particular target.
1748 toolset=$tccbitmaptools
1749 # architecture, manufacturer and model for the target-tree build
1750 t_cpu="arm"
1751 t_manufacturer="tcc77x"
1752 t_model="logikdax"
1755 90|zenvisionm30gb)
1756 target_id=35
1757 modelname="zenvisionm30gb"
1758 target="-DCREATIVE_ZVM"
1759 memory=64
1760 arm926ejscc
1761 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1762 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1763 tool="$rootdir/tools/scramble -creative=zvm"
1764 USE_ELF="yes"
1765 output="rockbox.zvm"
1766 appextra="recorder:gui"
1767 plugins="yes"
1768 swcodec="yes"
1769 toolset=$ipodbitmaptools
1770 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1771 bootoutput="rockbox.zvmboot"
1772 # architecture, manufacturer and model for the target-tree build
1773 t_cpu="arm"
1774 t_manufacturer="tms320dm320"
1775 t_model="creative-zvm"
1778 91|zenvisionm60gb)
1779 target_id=40
1780 modelname="zenvisionm60gb"
1781 target="-DCREATIVE_ZVM60GB"
1782 memory=64
1783 arm926ejscc
1784 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1785 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1786 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1787 USE_ELF="yes"
1788 output="rockbox.zvm60"
1789 appextra="recorder:gui"
1790 plugins="yes"
1791 swcodec="yes"
1792 toolset=$ipodbitmaptools
1793 boottool="$rootdir/tools/scramble -creative=zvm60"
1794 bootoutput="rockbox.zvm60boot"
1795 # architecture, manufacturer and model for the target-tree build
1796 t_cpu="arm"
1797 t_manufacturer="tms320dm320"
1798 t_model="creative-zvm"
1801 92|zenvision)
1802 target_id=39
1803 modelname="zenvision"
1804 target="-DCREATIVE_ZV"
1805 memory=64
1806 arm926ejscc
1807 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1808 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1809 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1810 USE_ELF="yes"
1811 output="rockbox.zv"
1812 appextra="recorder:gui"
1813 plugins=""
1814 swcodec="yes"
1815 toolset=$ipodbitmaptools
1816 boottool="$rootdir/tools/scramble -creative=zenvision"
1817 bootoutput="rockbox.zvboot"
1818 # architecture, manufacturer and model for the target-tree build
1819 t_cpu="arm"
1820 t_manufacturer="tms320dm320"
1821 t_model="creative-zvm"
1824 50|sansae200)
1825 target_id=23
1826 modelname="sansae200"
1827 target="-DSANSA_E200"
1828 memory=32 # supposedly
1829 arm7tdmicc
1830 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1831 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1832 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1833 output="rockbox.mi4"
1834 appextra="recorder:gui"
1835 plugins="yes"
1836 swcodec="yes"
1837 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1838 bootoutput="PP5022.mi4"
1839 # toolset is the tools within the tools directory that we build for
1840 # this particular target.
1841 toolset=$scramblebitmaptools
1842 # architecture, manufacturer and model for the target-tree build
1843 t_cpu="arm"
1844 t_manufacturer="sandisk"
1845 t_model="sansa-e200"
1848 51|sansae200r)
1849 # the e200R model is pretty much identical to the e200, it only has a
1850 # different option to the scramble tool when building a bootloader and
1851 # makes the bootloader output file name in all lower case.
1852 target_id=27
1853 modelname="sansae200r"
1854 target="-DSANSA_E200"
1855 memory=32 # supposedly
1856 arm7tdmicc
1857 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1858 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1859 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1860 output="rockbox.mi4"
1861 appextra="recorder:gui"
1862 plugins="yes"
1863 swcodec="yes"
1864 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1865 bootoutput="pp5022.mi4"
1866 # toolset is the tools within the tools directory that we build for
1867 # this particular target.
1868 toolset=$scramblebitmaptools
1869 # architecture, manufacturer and model for the target-tree build
1870 t_cpu="arm"
1871 t_manufacturer="sandisk"
1872 t_model="sansa-e200"
1875 52|sansac200)
1876 target_id=30
1877 modelname="sansac200"
1878 target="-DSANSA_C200"
1879 memory=32 # supposedly
1880 arm7tdmicc
1881 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1882 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1883 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1884 output="rockbox.mi4"
1885 appextra="recorder:gui"
1886 plugins="yes"
1887 swcodec="yes"
1888 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1889 bootoutput="firmware.mi4"
1890 # toolset is the tools within the tools directory that we build for
1891 # this particular target.
1892 toolset=$scramblebitmaptools
1893 # architecture, manufacturer and model for the target-tree build
1894 t_cpu="arm"
1895 t_manufacturer="sandisk"
1896 t_model="sansa-c200"
1899 53|sansam200)
1900 target_id=48
1901 modelname="sansam200"
1902 target="-DSANSA_M200"
1903 memory=1 # always
1904 arm946cc
1905 tool="$rootdir/tools/scramble -add=m200"
1906 boottool="$rootdir/tools/scramble -tcc=crc"
1907 bootoutput="player.rom"
1908 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1909 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1910 output="rockbox.m200"
1911 appextra="recorder:gui"
1912 plugins=""
1913 swcodec="yes"
1914 # toolset is the tools within the tools directory that we build for
1915 # this particular target.
1916 toolset=$tccbitmaptools
1917 # architecture, manufacturer and model for the target-tree build
1918 t_cpu="arm"
1919 t_manufacturer="tcc77x"
1920 t_model="m200"
1923 54|sansac100)
1924 target_id=42
1925 modelname="sansac100"
1926 target="-DSANSA_C100"
1927 memory=2
1928 arm946cc
1929 tool="$rootdir/tools/scramble -add=c100"
1930 boottool="$rootdir/tools/scramble -tcc=crc"
1931 bootoutput="player.rom"
1932 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1933 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1934 output="rockbox.c100"
1935 appextra="recorder:gui"
1936 plugins=""
1937 swcodec="yes"
1938 # toolset is the tools within the tools directory that we build for
1939 # this particular target.
1940 toolset=$tccbitmaptools
1941 # architecture, manufacturer and model for the target-tree build
1942 t_cpu="arm"
1943 t_manufacturer="tcc77x"
1944 t_model="c100"
1947 55|sansaclip)
1948 target_id=50
1949 modelname="sansaclip"
1950 target="-DSANSA_CLIP"
1951 memory=2
1952 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1953 bmp2rb_native="$bmp2rb_mono"
1954 tool="$rootdir/tools/scramble -add=clip"
1955 output="rockbox.sansa"
1956 bootoutput="bootloader-clip.sansa"
1957 appextra="recorder:gui"
1958 plugins="yes"
1959 swcodec="yes"
1960 toolset=$scramblebitmaptools
1961 t_cpu="arm"
1962 t_manufacturer="as3525"
1963 t_model="sansa-clip"
1964 arm9tdmicc
1968 56|sansae200v2)
1969 target_id=51
1970 modelname="sansae200v2"
1971 target="-DSANSA_E200V2"
1972 memory=8
1973 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1974 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1975 tool="$rootdir/tools/scramble -add=e2v2"
1976 output="rockbox.sansa"
1977 bootoutput="bootloader-e200v2.sansa"
1978 appextra="recorder:gui"
1979 plugins="yes"
1980 swcodec="yes"
1981 toolset=$scramblebitmaptools
1982 t_cpu="arm"
1983 t_manufacturer="as3525"
1984 t_model="sansa-e200v2"
1985 arm9tdmicc
1989 57|sansam200v4)
1990 target_id=52
1991 modelname="sansam200v4"
1992 target="-DSANSA_M200V4"
1993 memory=2
1994 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1995 bmp2rb_native="$bmp2rb_mono"
1996 tool="$rootdir/tools/scramble -add=m2v4"
1997 output="rockbox.sansa"
1998 bootoutput="bootloader-m200v4.sansa"
1999 appextra="recorder:gui"
2000 plugins="yes"
2001 swcodec="yes"
2002 toolset=$scramblebitmaptools
2003 t_cpu="arm"
2004 t_manufacturer="as3525"
2005 t_model="sansa-m200v4"
2006 arm9tdmicc
2010 58|sansafuze)
2011 target_id=53
2012 modelname="sansafuze"
2013 target="-DSANSA_FUZE"
2014 memory=8
2015 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2016 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2017 tool="$rootdir/tools/scramble -add=fuze"
2018 output="rockbox.sansa"
2019 bootoutput="bootloader-fuze.sansa"
2020 appextra="recorder:gui"
2021 plugins="yes"
2022 swcodec="yes"
2023 toolset=$scramblebitmaptools
2024 t_cpu="arm"
2025 t_manufacturer="as3525"
2026 t_model="sansa-fuze"
2027 arm9tdmicc
2031 59|sansac200v2)
2032 target_id=55
2033 modelname="sansac200v2"
2034 target="-DSANSA_C200V2"
2035 memory=2 # as per OF diagnosis mode
2036 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2037 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2038 tool="$rootdir/tools/scramble -add=c2v2"
2039 output="rockbox.sansa"
2040 bootoutput="bootloader-c200v2.sansa"
2041 appextra="recorder:gui"
2042 plugins="yes"
2043 swcodec="yes"
2044 # toolset is the tools within the tools directory that we build for
2045 # this particular target.
2046 toolset=$scramblebitmaptools
2047 # architecture, manufacturer and model for the target-tree build
2048 t_cpu="arm"
2049 t_manufacturer="as3525"
2050 t_model="sansa-c200v2"
2051 arm9tdmicc
2054 60|sansaclipv2)
2055 target_id=60
2056 modelname="sansaclipv2"
2057 target="-DSANSA_CLIPV2"
2058 memory=8
2059 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2060 bmp2rb_native="$bmp2rb_mono"
2061 tool="$rootdir/tools/scramble -add=clv2"
2062 output="rockbox.sansa"
2063 bootoutput="bootloader-clipv2.sansa"
2064 appextra="recorder:gui"
2065 plugins="yes"
2066 swcodec="yes"
2067 toolset=$scramblebitmaptools
2068 t_cpu="arm"
2069 t_manufacturer="as3525"
2070 t_model="sansa-clipv2"
2071 arm926ejscc
2074 61|sansaview)
2075 echo "Sansa View is not yet supported!"
2076 exit 1
2077 target_id=63
2078 modelname="sansaview"
2079 target="-DSANSA_VIEW"
2080 memory=32
2081 arm1176jzscc
2082 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2083 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2084 output="rockbox.mi4"
2085 appextra="gui"
2086 plugins=""
2087 swcodec="yes"
2088 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2089 bootoutput="firmware.mi4"
2090 # toolset is the tools within the tools directory that we build for
2091 # this particular target.
2092 toolset=$scramblebitmaptools
2093 t_cpu="arm"
2094 t_manufacturer="sandisk"
2095 t_model="sansa-view"
2098 62|sansaclipplus)
2099 target_id=66
2100 modelname="sansaclipplus"
2101 target="-DSANSA_CLIPPLUS"
2102 memory=8
2103 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2104 bmp2rb_native="$bmp2rb_mono"
2105 tool="$rootdir/tools/scramble -add=cli+"
2106 output="rockbox.sansa"
2107 bootoutput="bootloader-clipplus.sansa"
2108 appextra="recorder:gui"
2109 plugins="yes"
2110 swcodec="yes"
2111 toolset=$scramblebitmaptools
2112 t_cpu="arm"
2113 t_manufacturer="as3525"
2114 t_model="sansa-clipplus"
2115 arm926ejscc
2118 63|sansafuzev2)
2119 target_id=68
2120 modelname="sansafuzev2"
2121 target="-DSANSA_FUZEV2"
2122 memory=8 # not sure
2123 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2124 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2125 tool="$rootdir/tools/scramble -add=fuz2"
2126 output="rockbox.sansa"
2127 bootoutput="bootloader-fuzev2.sansa"
2128 appextra="recorder:gui"
2129 plugins="yes"
2130 swcodec="yes"
2131 toolset=$scramblebitmaptools
2132 t_cpu="arm"
2133 t_manufacturer="as3525"
2134 t_model="sansa-fuzev2"
2135 arm926ejscc
2138 150|tatungtpj1022)
2139 target_id=25
2140 modelname="tatungtpj1022"
2141 target="-DTATUNG_TPJ1022"
2142 memory=32 # always
2143 arm7tdmicc
2144 tool="$rootdir/tools/scramble -add tpj2"
2145 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2146 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2147 output="rockbox.elio"
2148 appextra="recorder:gui"
2149 plugins="yes"
2150 swcodec="yes"
2151 boottool="$rootdir/tools/scramble -mi4v2"
2152 bootoutput="pp5020.mi4"
2153 # toolset is the tools within the tools directory that we build for
2154 # this particular target.
2155 toolset=$scramblebitmaptools
2156 # architecture, manufacturer and model for the target-tree build
2157 t_cpu="arm"
2158 t_manufacturer="tatung"
2159 t_model="tpj1022"
2162 100|gogearsa9200)
2163 target_id=41
2164 modelname="gogearsa9200"
2165 target="-DPHILIPS_SA9200"
2166 memory=32 # supposedly
2167 arm7tdmicc
2168 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2169 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2170 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2171 output="rockbox.mi4"
2172 appextra="recorder:gui"
2173 plugins=""
2174 swcodec="yes"
2175 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2176 bootoutput="FWImage.ebn"
2177 # toolset is the tools within the tools directory that we build for
2178 # this particular target.
2179 toolset=$scramblebitmaptools
2180 # architecture, manufacturer and model for the target-tree build
2181 t_cpu="arm"
2182 t_manufacturer="philips"
2183 t_model="sa9200"
2186 101|gogearhdd1630)
2187 target_id=43
2188 modelname="gogearhdd1630"
2189 target="-DPHILIPS_HDD1630"
2190 memory=32 # supposedly
2191 arm7tdmicc
2192 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2193 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2194 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2195 output="rockbox.mi4"
2196 appextra="recorder:gui"
2197 plugins="yes"
2198 swcodec="yes"
2199 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2200 bootoutput="FWImage.ebn"
2201 # toolset is the tools within the tools directory that we build for
2202 # this particular target.
2203 toolset=$scramblebitmaptools
2204 # architecture, manufacturer and model for the target-tree build
2205 t_cpu="arm"
2206 t_manufacturer="philips"
2207 t_model="hdd1630"
2210 102|gogearhdd6330)
2211 target_id=65
2212 modelname="gogearhdd6330"
2213 target="-DPHILIPS_HDD6330"
2214 memory=32 # supposedly
2215 arm7tdmicc
2216 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2217 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2218 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2219 output="rockbox.mi4"
2220 appextra="recorder:gui"
2221 plugins=""
2222 swcodec="yes"
2223 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2224 bootoutput="FWImage.ebn"
2225 # toolset is the tools within the tools directory that we build for
2226 # this particular target.
2227 toolset=$scramblebitmaptools
2228 # architecture, manufacturer and model for the target-tree build
2229 t_cpu="arm"
2230 t_manufacturer="philips"
2231 t_model="hdd6330"
2234 110|meizum6sl)
2235 target_id=49
2236 modelname="meizum6sl"
2237 target="-DMEIZU_M6SL"
2238 memory=16 # always
2239 arm940tbecc
2240 tool="cp"
2241 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2242 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2243 output="rockbox.meizu"
2244 appextra="recorder:gui"
2245 plugins="no" #FIXME
2246 swcodec="yes"
2247 toolset=$genericbitmaptools
2248 boottool="cp"
2249 bootoutput="rockboot.ebn"
2250 # architecture, manufacturer and model for the target-tree build
2251 t_cpu="arm"
2252 t_manufacturer="s5l8700"
2253 t_model="meizu-m6sl"
2256 111|meizum6sp)
2257 target_id=46
2258 modelname="meizum6sp"
2259 target="-DMEIZU_M6SP"
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"
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-m6sp"
2278 112|meizum3)
2279 target_id=47
2280 modelname="meizum3"
2281 target="-DMEIZU_M3"
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"
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-m3"
2300 120|ondavx747)
2301 target_id=45
2302 modelname="ondavx747"
2303 target="-DONDA_VX747"
2304 memory=16
2305 mipselcc
2306 tool="$rootdir/tools/scramble -add=x747"
2307 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2308 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2309 output="rockbox.vx747"
2310 appextra="recorder:gui"
2311 plugins="yes"
2312 swcodec="yes"
2313 toolset=$genericbitmaptools
2314 boottool="$rootdir/tools/scramble -ccpmp"
2315 bootoutput="ccpmp.bin"
2316 # architecture, manufacturer and model for the target-tree build
2317 t_cpu="mips"
2318 t_manufacturer="ingenic_jz47xx"
2319 t_model="onda_vx747"
2322 121|ondavx767)
2323 target_id=64
2324 modelname="ondavx767"
2325 target="-DONDA_VX767"
2326 memory=16 #FIXME
2327 mipselcc
2328 tool="cp"
2329 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2330 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2331 output="rockbox.vx767"
2332 appextra="recorder:gui"
2333 plugins="" #FIXME
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_vx767"
2344 122|ondavx747p)
2345 target_id=54
2346 modelname="ondavx747p"
2347 target="-DONDA_VX747P"
2348 memory=16
2349 mipselcc
2350 tool="$rootdir/tools/scramble -add=747p"
2351 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2352 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2353 output="rockbox.vx747p"
2354 appextra="recorder:gui"
2355 plugins="yes"
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_vx747"
2366 123|ondavx777)
2367 target_id=61
2368 modelname="ondavx777"
2369 target="-DONDA_VX777"
2370 memory=16
2371 mipselcc
2372 tool="$rootdir/tools/scramble -add=x777"
2373 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2374 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2375 output="rockbox.vx777"
2376 appextra="recorder:gui"
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 130|lyreproto1)
2389 target_id=56
2390 modelname="lyreproto1"
2391 target="-DLYRE_PROTO1"
2392 memory=64
2393 arm926ejscc
2394 tool="cp"
2395 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2396 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2397 output="rockbox.lyre"
2398 appextra="recorder:gui"
2399 plugins=""
2400 swcodec="yes"
2401 toolset=$scramblebitmaptools
2402 boottool="cp"
2403 bootoutput="bootloader-proto1.lyre"
2404 # architecture, manufacturer and model for the target-tree build
2405 t_cpu="arm"
2406 t_manufacturer="at91sam"
2407 t_model="lyre_proto1"
2410 131|mini2440)
2411 target_id=99
2412 modelname="mini2440"
2413 target="-DMINI2440"
2414 memory=64
2415 arm9tdmicc
2416 tool="$rootdir/tools/scramble -add=m244"
2417 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2418 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2419 output="rockbox.mini2440"
2420 appextra="recorder:gui"
2421 plugins=""
2422 swcodec="yes"
2423 toolset=$scramblebitmaptools
2424 boottool="cp"
2425 bootoutput="bootloader-mini2440.lyre"
2426 # architecture, manufacturer and model for the target-tree build
2427 t_cpu="arm"
2428 t_manufacturer="s3c2440"
2429 t_model="mini2440"
2432 140|samsungyh820)
2433 target_id=57
2434 modelname="samsungyh820"
2435 target="-DSAMSUNG_YH820"
2436 memory=32 # always
2437 arm7tdmicc
2438 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2439 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2440 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2441 output="rockbox.mi4"
2442 appextra="recorder:gui"
2443 plugins="yes"
2444 swcodec="yes"
2445 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2446 bootoutput="FW_YH820.mi4"
2447 # toolset is the tools within the tools directory that we build for
2448 # this particular target.
2449 toolset=$scramblebitmaptools
2450 # architecture, manufacturer and model for the target-tree build
2451 t_cpu="arm"
2452 t_manufacturer="samsung"
2453 t_model="yh820"
2456 141|samsungyh920)
2457 target_id=58
2458 modelname="samsungyh920"
2459 target="-DSAMSUNG_YH920"
2460 memory=32 # always
2461 arm7tdmicc
2462 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2463 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2464 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2465 output="rockbox.mi4"
2466 appextra="recorder:gui"
2467 plugins="yes"
2468 swcodec="yes"
2469 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2470 bootoutput="PP5020.mi4"
2471 # toolset is the tools within the tools directory that we build for
2472 # this particular target.
2473 toolset=$scramblebitmaptools
2474 # architecture, manufacturer and model for the target-tree build
2475 t_cpu="arm"
2476 t_manufacturer="samsung"
2477 t_model="yh920"
2480 142|samsungyh925)
2481 target_id=59
2482 modelname="samsungyh925"
2483 target="-DSAMSUNG_YH925"
2484 memory=32 # always
2485 arm7tdmicc
2486 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2487 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2488 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2489 output="rockbox.mi4"
2490 appextra="recorder:gui"
2491 plugins="yes"
2492 swcodec="yes"
2493 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2494 bootoutput="FW_YH925.mi4"
2495 # toolset is the tools within the tools directory that we build for
2496 # this particular target.
2497 toolset=$scramblebitmaptools
2498 # architecture, manufacturer and model for the target-tree build
2499 t_cpu="arm"
2500 t_manufacturer="samsung"
2501 t_model="yh925"
2504 143|samsungyps3)
2505 target_id=60
2506 modelname="samsungyps3"
2507 target="-DSAMSUNG_YPS3"
2508 memory=16 # always
2509 arm940tbecc
2510 tool="cp"
2511 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2512 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2513 output="rockbox.yps3"
2514 appextra="recorder:gui"
2515 plugins="no" #FIXME
2516 swcodec="yes"
2517 toolset=$genericbitmaptools
2518 boottool="cp"
2519 bootoutput="rockboot.ebn"
2520 # architecture, manufacturer and model for the target-tree build
2521 t_cpu="arm"
2522 t_manufacturer="s5l8700"
2523 t_model="yps3"
2526 160|vibe500)
2527 target_id=67
2528 modelname="vibe500"
2529 target="-DPBELL_VIBE500"
2530 memory=32 # always
2531 arm7tdmicc
2532 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2533 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2534 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2535 output="rockbox.mi4"
2536 appextra="recorder:gui"
2537 plugins="yes"
2538 swcodec="yes"
2539 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2540 bootoutput="jukebox.mi4"
2541 # toolset is the tools within the tools directory that we build for
2542 # this particular target.
2543 toolset=$scramblebitmaptools
2544 # architecture, manufacturer and model for the target-tree build
2545 t_cpu="arm"
2546 t_manufacturer="pbell"
2547 t_model="vibe500"
2550 170|hd200)
2551 target_id=69
2552 modelname="mpiohd200"
2553 target="-DMPIO_HD200"
2554 memory=16 # always
2555 coldfirecc
2556 tool="$rootdir/tools/scramble -add=hd20"
2557 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2558 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2559 output="rockbox.mpio"
2560 bootoutput="bootloader.mpio"
2561 appextra="recorder:gui"
2562 plugins="yes"
2563 swcodec="yes"
2564 # toolset is the tools within the tools directory that we build for
2565 # this particular target.
2566 toolset="$genericbitmaptools"
2567 # architecture, manufacturer and model for the target-tree build
2568 t_cpu="coldfire"
2569 t_manufacturer="mpio"
2570 t_model="hd200"
2574 echo "Please select a supported target platform!"
2575 exit 7
2578 esac
2580 echo "Platform set to $modelname"
2583 #remove start
2584 ############################################################################
2585 # Amount of memory, for those that can differ. They have $memory unset at
2586 # this point.
2589 if [ -z "$memory" ]; then
2590 case $target_id in
2592 if [ "$ARG_RAM" ]; then
2593 size=$ARG_RAM
2594 else
2595 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2596 size=`input`;
2598 case $size in
2599 60|64)
2600 memory="64"
2603 memory="32"
2605 esac
2608 if [ "$ARG_RAM" ]; then
2609 size=$ARG_RAM
2610 else
2611 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2612 size=`input`;
2614 case $size in
2616 memory="8"
2619 memory="2"
2621 esac
2623 esac
2624 echo "Memory size selected: $memory MB"
2625 [ "$ARG_TYPE" ] || echo ""
2627 #remove end
2629 ##################################################################
2630 # Figure out build "type"
2633 # the ifp7x0 is the only platform that supports building a gdb stub like
2634 # this
2635 case $modelname in
2636 iriverifp7xx)
2637 gdbstub="(G)DB stub, "
2639 sansae200r|sansae200)
2640 gdbstub="(I)nstaller, "
2642 sansac200)
2643 gdbstub="(E)raser, "
2647 esac
2648 if [ "$ARG_TYPE" ]; then
2649 btype=$ARG_TYPE
2650 else
2651 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2652 btype=`input`;
2655 case $btype in
2656 [Ii])
2657 appsdir='\$(ROOTDIR)/bootloader'
2658 apps="bootloader"
2659 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2660 bootloader="1"
2661 echo "e200R-installer build selected"
2663 [Ee])
2664 appsdir='\$(ROOTDIR)/bootloader'
2665 apps="bootloader"
2666 echo "C2(4)0 or C2(5)0"
2667 variant=`input`
2668 case $variant in
2670 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2671 echo "c240 eraser build selected"
2674 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2675 echo "c240 eraser build selected"
2677 esac
2678 bootloader="1"
2679 echo "c200 eraser build selected"
2681 [Bb])
2682 if test $t_manufacturer = "archos"; then
2683 # Archos SH-based players do this somewhat differently for
2684 # some reason
2685 appsdir='\$(ROOTDIR)/flash/bootbox'
2686 apps="bootbox"
2687 else
2688 appsdir='\$(ROOTDIR)/bootloader'
2689 apps="bootloader"
2690 flash=""
2691 if test -n "$boottool"; then
2692 tool="$boottool"
2694 if test -n "$bootoutput"; then
2695 output=$bootoutput
2698 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2699 bootloader="1"
2700 echo "Bootloader build selected"
2702 [Ss])
2703 if [ "$modelname" = "sansae200r" ]; then
2704 echo "Do not use the e200R target for simulator builds. Use e200 instead."
2705 exit 8
2707 debug="-DDEBUG"
2708 simulator="yes"
2709 extradefines="-DSIMULATOR"
2710 archosrom=""
2711 flash=""
2712 echo "Simulator build selected"
2714 [Aa]*)
2715 echo "Advanced build selected"
2716 whichadvanced $btype
2718 [Gg])
2719 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2720 appsdir='\$(ROOTDIR)/gdb'
2721 apps="stub"
2722 case $modelname in
2723 iriverifp7xx)
2724 output="stub.wma"
2728 esac
2729 echo "GDB stub build selected"
2731 [Mm])
2732 toolset='';
2733 apps="manual"
2734 echo "Manual build selected"
2736 [Cc])
2737 uname=`uname`
2738 simcc "checkwps"
2739 toolset='';
2740 t_cpu='';
2741 GCCOPTS='';
2742 extradefines="-DDEBUG"
2743 appsdir='\$(ROOTDIR)/tools/checkwps';
2744 output='checkwps.'${modelname};
2745 archosrom='';
2746 echo "CheckWPS build selected"
2748 [Dd])
2749 uname=`uname`
2750 simcc "database"
2751 toolset='';
2752 t_cpu='';
2753 GCCOPTS='';
2754 appsdir='\$(ROOTDIR)/tools/database';
2755 archosrom='';
2757 case $uname in
2758 CYGWIN*|MINGW*)
2759 output="database_${modelname}.exe"
2762 output='database.'${modelname};
2764 esac
2766 echo "Database tool build selected"
2769 if [ "$modelname" = "sansae200r" ]; then
2770 echo "Do not use the e200R target for regular builds. Use e200 instead."
2771 exit 8
2773 debug=""
2774 btype="N" # set it explicitly since RET only gets here as well
2775 echo "Normal build selected"
2778 esac
2779 # to be able running "make manual" from non-manual configuration
2780 case $modelname in
2781 archosrecorderv2)
2782 manualdev="archosfmrecorder"
2784 iriverh1??)
2785 manualdev="iriverh100"
2787 ipodmini2g)
2788 manualdev="ipodmini1g"
2791 manualdev=$modelname
2793 esac
2795 if [ -z "$debug" ]; then
2796 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2799 echo "Using source code root directory: $rootdir"
2801 # this was once possible to change at build-time, but no more:
2802 language="english"
2804 uname=`uname`
2806 if [ "yes" = "$simulator" ]; then
2807 # setup compiler and things for simulator
2808 simcc "sdl"
2810 if [ -d "simdisk" ]; then
2811 echo "Subdirectory 'simdisk' already present"
2812 else
2813 mkdir simdisk
2814 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2818 # Now, figure out version number of the (gcc) compiler we are about to use
2819 gccver=`$CC -dumpversion`;
2821 # figure out the binutil version too and display it, mostly for the build
2822 # system etc to be able to see it easier
2823 if [ $uname = "Darwin" ]; then
2824 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2825 else
2826 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2829 if [ -z "$gccver" ]; then
2830 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
2831 echo "[WARNING] this may cause your build to fail since we cannot do the"
2832 echo "[WARNING] checks we want now."
2833 else
2835 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2836 # DEPEND on it
2838 num1=`echo $gccver | cut -d . -f1`
2839 num2=`echo $gccver | cut -d . -f2`
2840 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2842 # This makes:
2843 # 3.3.X => 303
2844 # 3.4.X => 304
2845 # 2.95.3 => 295
2847 echo "Using $CC $gccver ($gccnum)"
2849 if test "$gccnum" -ge "400"; then
2850 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2851 # so we ignore that warnings for now
2852 # -Wno-pointer-sign
2853 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2856 if test "$gccnum" -ge "402"; then
2857 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2858 # and later would throw it for several valid cases
2859 GCCOPTS="$GCCOPTS -Wno-override-init"
2862 case $prefix in
2864 # simulator
2866 i586-mingw32msvc-)
2867 # cross-compile for win32
2870 # Verify that the cross-compiler is of a recommended version!
2871 if test "$gccver" != "$gccchoice"; then
2872 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2873 echo "WARNING: version $gccchoice!"
2874 echo "WARNING: This may cause your build to fail since it may be a version"
2875 echo "WARNING: that isn't functional or known to not be the best choice."
2876 echo "WARNING: If you suffer from build problems, you know that this is"
2877 echo "WARNING: a likely source for them..."
2880 esac
2885 echo "Using $LD $ldver"
2887 # check the compiler for SH platforms
2888 if test "$CC" = "sh-elf-gcc"; then
2889 if test "$gccnum" -lt "400"; then
2890 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2891 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2892 else
2893 # figure out patch status
2894 gccpatch=`$CC --version`;
2896 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2897 echo "gcc $gccver is rockbox patched"
2898 # then convert -O to -Os to get smaller binaries!
2899 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2900 else
2901 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2902 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2907 if test "$CC" = "m68k-elf-gcc"; then
2908 # convert -O to -Os to get smaller binaries!
2909 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2912 if [ "$ARG_CCACHE" = "1" ]; then
2913 echo "Enable ccache for building"
2914 ccache="ccache"
2915 elif [ "$ARG_CCACHE" != "0" ]; then
2916 ccache=`findtool ccache`
2917 if test -n "$ccache"; then
2918 echo "Found and uses ccache ($ccache)"
2922 # figure out the full path to the various commands if possible
2923 HOSTCC=`findtool gcc --lit`
2924 HOSTAR=`findtool ar --lit`
2925 CC=`findtool ${CC} --lit`
2926 LD=`findtool ${AR} --lit`
2927 AR=`findtool ${AR} --lit`
2928 AS=`findtool ${AS} --lit`
2929 OC=`findtool ${OC} --lit`
2930 WINDRES=`findtool ${WINDRES} --lit`
2931 DLLTOOL=`findtool ${DLLTOOL} --lit`
2932 DLLWRAP=`findtool ${DLLWRAP} --lit`
2933 RANLIB=`findtool ${RANLIB} --lit`
2935 if test -n "$ccache"; then
2936 CC="$ccache $CC"
2939 if test "X$endian" = "Xbig"; then
2940 defendian="ROCKBOX_BIG_ENDIAN"
2941 else
2942 defendian="ROCKBOX_LITTLE_ENDIAN"
2945 if [ "$ARG_RBDIR" ]; then
2946 rbdir=$ARG_RBDIR
2947 echo "Using alternate rockbox dir: ${rbdir}"
2950 sed > autoconf.h \
2951 -e "s,@ENDIAN@,${defendian},g" \
2952 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2953 -e "s,^#undef DO_BOOTCHART,$use_bootchart,g" \
2954 -e "s,@config_rtc@,$config_rtc,g" \
2955 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2956 -e "s,@RBDIR@,${rbdir},g" \
2957 -e "s,@have_backlight@,$have_backlight,g" \
2958 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
2959 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
2960 <<EOF
2961 /* This header was made by configure */
2962 #ifndef __BUILD_AUTOCONF_H
2963 #define __BUILD_AUTOCONF_H
2965 /* Define endianess for the target or simulator platform */
2966 #define @ENDIAN@ 1
2968 /* Define this if you build rockbox to support the logf logging and display */
2969 #undef ROCKBOX_HAS_LOGF
2971 /* Define this to record a chart with timings for the stages of boot */
2972 #undef DO_BOOTCHART
2974 /* optional define for a backlight modded Ondio */
2975 @have_backlight@
2977 /* optional define for FM radio mod for iAudio M5 */
2978 @have_fmradio_in@
2980 /* optional define for ATA poweroff on Player */
2981 @have_ata_poweroff@
2983 /* optional defines for RTC mod for h1x0 */
2984 @config_rtc@
2985 @have_rtc_alarm@
2987 /* root of Rockbox */
2988 #define ROCKBOX_DIR "/@RBDIR@"
2990 #endif /* __BUILD_AUTOCONF_H */
2993 if test -n "$t_cpu"; then
2994 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2995 if [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
2996 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/"
2997 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/"
2999 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3000 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3001 GCCOPTS="$GCCOPTS"
3004 if test "$simulator" = "yes"; then
3005 # add simul make stuff on the #SIMUL# line
3006 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
3007 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
3008 else
3009 # delete the lines that match
3010 simmagic1='/@SIMUL1@/D'
3011 simmagic2='/@SIMUL2@/D'
3014 if test "$swcodec" = "yes"; then
3015 voicetoolset="rbspeexenc voicefont wavtrim"
3016 else
3017 voicetoolset="voicefont wavtrim"
3020 if test "$apps" = "apps"; then
3021 # only when we build "real" apps we build the .lng files
3022 buildlangs="langs"
3025 #### Fix the cmdline ###
3026 if test -n "$ccache"; then
3027 cmdline="--ccache "
3029 if [ "$ARG_ARM_EABI" = "1" ]; then
3030 cmdline="$cmdline--eabi "
3033 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3034 ### end of cmdline
3036 sed > Makefile \
3037 -e "s,@ROOTDIR@,${rootdir},g" \
3038 -e "s,@DEBUG@,${debug},g" \
3039 -e "s,@MEMORY@,${memory},g" \
3040 -e "s,@TARGET_ID@,${target_id},g" \
3041 -e "s,@TARGET@,${target},g" \
3042 -e "s,@CPU@,${t_cpu},g" \
3043 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
3044 -e "s,@MODELNAME@,${modelname},g" \
3045 -e "s,@LANGUAGE@,${language},g" \
3046 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3047 -e "s,@PWD@,${pwd},g" \
3048 -e "s,@HOSTCC@,${HOSTCC},g" \
3049 -e "s,@HOSTAR@,${HOSTAR},g" \
3050 -e "s,@CC@,${CC},g" \
3051 -e "s,@LD@,${LD},g" \
3052 -e "s,@AR@,${AR},g" \
3053 -e "s,@AS@,${AS},g" \
3054 -e "s,@OC@,${OC},g" \
3055 -e "s,@WINDRES@,${WINDRES},g" \
3056 -e "s,@DLLTOOL@,${DLLTOOL},g" \
3057 -e "s,@DLLWRAP@,${DLLWRAP},g" \
3058 -e "s,@RANLIB@,${RANLIB},g" \
3059 -e "s,@TOOL@,${tool},g" \
3060 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
3061 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
3062 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
3063 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
3064 -e "s,@OUTPUT@,${output},g" \
3065 -e "s,@APPEXTRA@,${appextra},g" \
3066 -e "s,@ARCHOSROM@,${archosrom},g" \
3067 -e "s,@FLASHFILE@,${flash},g" \
3068 -e "s,@PLUGINS@,${plugins},g" \
3069 -e "s,@CODECS@,${swcodec},g" \
3070 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
3071 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
3072 -e "s,@GCCOPTS@,${GCCOPTS},g" \
3073 -e "s,@TARGET_INC@,${TARGET_INC},g" \
3074 -e "s!@LDOPTS@!${LDOPTS}!g" \
3075 -e "s,@LOADADDRESS@,${loadaddress},g" \
3076 -e "s,@EXTRADEF@,${extradefines},g" \
3077 -e "s,@APPSDIR@,${appsdir},g" \
3078 -e "s,@FIRMDIR@,${firmdir},g" \
3079 -e "s,@TOOLSDIR@,${toolsdir},g" \
3080 -e "s,@APPS@,${apps},g" \
3081 -e "s,@SIMVER@,${simver},g" \
3082 -e "s,@GCCVER@,${gccver},g" \
3083 -e "s,@GCCNUM@,${gccnum},g" \
3084 -e "s,@UNAME@,${uname},g" \
3085 -e "s,@ENDIAN@,${defendian},g" \
3086 -e "s,@TOOLSET@,${toolset},g" \
3087 -e "${simmagic1}" \
3088 -e "${simmagic2}" \
3089 -e "s,@MANUALDEV@,${manualdev},g" \
3090 -e "s,@ENCODER@,${ENC_CMD},g" \
3091 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
3092 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
3093 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
3094 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
3095 -e "s,@LANGS@,${buildlangs},g" \
3096 -e "s,@USE_ELF@,${USE_ELF},g" \
3097 -e "s,@RBDIR@,${rbdir},g" \
3098 -e "s,@PREFIX@,$PREFIX,g" \
3099 -e "s,@CMDLINE@,$cmdline,g" \
3100 -e "s,@SDLCONFIG@,$sdl,g" \
3101 <<EOF
3102 ## Automatically generated. http://www.rockbox.org/
3104 export ROOTDIR=@ROOTDIR@
3105 export FIRMDIR=@FIRMDIR@
3106 export APPSDIR=@APPSDIR@
3107 export TOOLSDIR=@TOOLSDIR@
3108 export DOCSDIR=\$(ROOTDIR)/docs
3109 export MANUALDIR=\${ROOTDIR}/manual
3110 export DEBUG=@DEBUG@
3111 export MODELNAME=@MODELNAME@
3112 export ARCHOSROM=@ARCHOSROM@
3113 export FLASHFILE=@FLASHFILE@
3114 export TARGET_ID=@TARGET_ID@
3115 export TARGET=@TARGET@
3116 export CPU=@CPU@
3117 export MANUFACTURER=@MANUFACTURER@
3118 export OBJDIR=@PWD@
3119 export BUILDDIR=@PWD@
3120 export LANGUAGE=@LANGUAGE@
3121 export VOICELANGUAGE=@VOICELANGUAGE@
3122 export MEMORYSIZE=@MEMORY@
3123 export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
3124 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3125 export MKFIRMWARE=@TOOL@
3126 export BMP2RB_MONO=@BMP2RB_MONO@
3127 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3128 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3129 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3130 export BINARY=@OUTPUT@
3131 export APPEXTRA=@APPEXTRA@
3132 export ENABLEDPLUGINS=@PLUGINS@
3133 export SOFTWARECODECS=@CODECS@
3134 export EXTRA_DEFINES=@EXTRADEF@
3135 export HOSTCC=@HOSTCC@
3136 export HOSTAR=@HOSTAR@
3137 export CC=@CC@
3138 export LD=@LD@
3139 export AR=@AR@
3140 export AS=@AS@
3141 export OC=@OC@
3142 export WINDRES=@WINDRES@
3143 export DLLTOOL=@DLLTOOL@
3144 export DLLWRAP=@DLLWRAP@
3145 export RANLIB=@RANLIB@
3146 export PREFIX=@PREFIX@
3147 export PROFILE_OPTS=@PROFILE_OPTS@
3148 export SIMVER=@SIMVER@
3149 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3150 export GCCOPTS=@GCCOPTS@
3151 export TARGET_INC=@TARGET_INC@
3152 export LOADADDRESS=@LOADADDRESS@
3153 export SHARED_FLAG=@SHARED_FLAG@
3154 export LDOPTS=@LDOPTS@
3155 export GCCVER=@GCCVER@
3156 export GCCNUM=@GCCNUM@
3157 export UNAME=@UNAME@
3158 export MANUALDEV=@MANUALDEV@
3159 export TTS_OPTS=@TTS_OPTS@
3160 export TTS_ENGINE=@TTS_ENGINE@
3161 export ENC_OPTS=@ENC_OPTS@
3162 export ENCODER=@ENCODER@
3163 export USE_ELF=@USE_ELF@
3164 export RBDIR=@RBDIR@
3165 export SDLCONFIG=@SDLCONFIG@
3167 CONFIGURE_OPTIONS=@CMDLINE@
3169 include \$(TOOLSDIR)/root.make
3173 echo "Created Makefile"