sd-as3525.c: disable wide bus, it corrupts writes
[kugel-rb.git] / tools / configure
blob277436d716c70a1eeb2f0c251aeab1524367d86d
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 printf "Enter your developer options (press only enter when done)\n\
387 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
388 (T)est plugins, S(m)all C lib:"
389 if [ "$memory" = "2" ]; then
390 printf ", (8)MB MOD"
392 if [ "$modelname" = "archosplayer" ]; then
393 printf ", Use (A)TA poweroff"
395 if [ "$t_model" = "ondio" ]; then
396 printf ", (B)acklight MOD"
398 if [ "$modelname" = "iaudiom5" ]; then
399 printf ", (F)M radio MOD"
401 if [ "$modelname" = "iriverh120" ]; then
402 printf ", (R)TC MOD"
404 echo ""
407 cont=1
408 while [ $cont = "1" ]; do
410 if [ "$interact" ]; then
411 option=`input`
412 else
413 option=`echo "$atype" | cut -c 1`
416 case $option in
417 [Dd])
418 if [ "yes" = "$profile" ]; then
419 echo "Debug is incompatible with profiling"
420 else
421 echo "DEBUG build enabled"
422 use_debug="yes"
425 [Ll])
426 echo "logf() support enabled"
427 logf="yes"
429 [Mm])
430 echo "Using Rockbox' small C library"
431 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
433 [Tt])
434 echo "Including test plugins"
435 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
437 [Cc])
438 echo "bootchart enabled (logf also enabled)"
439 bootchart="yes"
440 logf="yes"
442 [Ss])
443 echo "Simulator build enabled"
444 simulator="yes"
446 [Pp])
447 if [ "yes" = "$use_debug" ]; then
448 echo "Profiling is incompatible with debug"
449 else
450 echo "Profiling support is enabled"
451 profile="yes"
454 [Vv])
455 echo "Voice build selected"
456 voice="yes"
459 if [ "$memory" = "2" ]; then
460 memory="8"
461 echo "Memory size selected: 8MB"
464 [Aa])
465 if [ "$modelname" = "archosplayer" ]; then
466 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
467 echo "ATA power off enabled"
470 [Bb])
471 if [ "$t_model" = "ondio" ]; then
472 have_backlight="#define HAVE_BACKLIGHT"
473 echo "Backlight functions enabled"
476 [Ff])
477 if [ "$modelname" = "iaudiom5" ]; then
478 have_fmradio_in="#define HAVE_FMRADIO_IN"
479 echo "FM radio functions enabled"
482 [Rr])
483 if [ "$modelname" = "iriverh120" ]; then
484 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
485 have_rtc_alarm="#define HAVE_RTC_ALARM"
486 echo "RTC functions enabled (DS1339/DS3231)"
489 [Ww])
490 echo "Enabling Windows 32 cross-compiling"
491 crosscompile="yes"
494 if [ "$interact" ]; then
495 cont=0
496 else
497 echo "[ERROR] Option $option unsupported"
500 esac
501 if [ "$interact" ]; then
502 btype="$btype$option"
503 else
504 atype=`echo "$atype" | cut -c 2-`
505 [ "$atype" ] || cont=0
507 done
508 echo "done"
510 if [ "yes" = "$voice" ]; then
511 # Ask about languages to build
512 picklang
513 voicelanguage=`whichlang`
514 echo "Voice language set to $voicelanguage"
516 # Configure encoder and TTS engine for each language
517 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
518 voiceconfig "$thislang"
519 done
521 if [ "yes" = "$use_debug" ]; then
522 debug="-DDEBUG"
523 GCCOPTS="$GCCOPTS -g -DDEBUG"
525 if [ "yes" = "$logf" ]; then
526 use_logf="#define ROCKBOX_HAS_LOGF 1"
528 if [ "yes" = "$bootchart" ]; then
529 use_bootchart="#define DO_BOOTCHART 1"
531 if [ "yes" = "$simulator" ]; then
532 debug="-DDEBUG"
533 extradefines="$extradefines -DSIMULATOR"
534 archosrom=""
535 flash=""
537 if [ "yes" = "$profile" ]; then
538 extradefines="$extradefines -DRB_PROFILE"
539 PROFILE_OPTS="-finstrument-functions"
543 # Configure voice settings
544 voiceconfig () {
545 thislang=$1
546 if [ ! "$ARG_TTS" ]; then
547 echo "Building $thislang voice for $modelname. Select options"
548 echo ""
551 if [ -n "`findtool flite`" ]; then
552 FLITE="F(l)ite "
553 FLITE_OPTS=""
554 DEFAULT_TTS="flite"
555 DEFAULT_TTS_OPTS=$FLITE_OPTS
556 DEFAULT_NOISEFLOOR="500"
557 DEFAULT_CHOICE="L"
559 if [ -n "`findtool espeak`" ]; then
560 ESPEAK="(e)Speak "
561 ESPEAK_OPTS=""
562 DEFAULT_TTS="espeak"
563 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
564 DEFAULT_NOISEFLOOR="500"
565 DEFAULT_CHOICE="e"
567 if [ -n "`findtool festival`" ]; then
568 FESTIVAL="(F)estival "
569 case "$thislang" in
570 "italiano")
571 FESTIVAL_OPTS="--language italian"
573 "espanol")
574 FESTIVAL_OPTS="--language spanish"
576 "finnish")
577 FESTIVAL_OPTS="--language finnish"
579 "czech")
580 FESTIVAL_OPTS="--language czech"
583 FESTIVAL_OPTS=""
585 esac
586 DEFAULT_TTS="festival"
587 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
588 DEFAULT_NOISEFLOOR="500"
589 DEFAULT_CHOICE="F"
591 if [ -n "`findtool swift`" ]; then
592 SWIFT="S(w)ift "
593 SWIFT_OPTS=""
594 DEFAULT_TTS="swift"
595 DEFAULT_TTS_OPTS=$SWIFT_OPTS
596 DEFAULT_NOISEFLOOR="500"
597 DEFAULT_CHOICE="w"
599 # Allow SAPI if Windows is in use
600 if [ -n "`findtool winver`" ]; then
601 SAPI="(S)API "
602 SAPI_OPTS=""
603 DEFAULT_TTS="sapi"
604 DEFAULT_TTS_OPTS=$SAPI_OPTS
605 DEFAULT_NOISEFLOOR="500"
606 DEFAULT_CHOICE="S"
609 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
610 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
611 exit 3
614 if [ "$ARG_TTS" ]; then
615 option=$ARG_TTS
616 else
617 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
618 option=`input`
620 advopts="$advopts --tts=$option"
621 case "$option" in
622 [Ll])
623 TTS_ENGINE="flite"
624 NOISEFLOOR="500" # TODO: check this value
625 TTS_OPTS=$FLITE_OPTS
627 [Ee])
628 TTS_ENGINE="espeak"
629 NOISEFLOOR="500"
630 TTS_OPTS=$ESPEAK_OPTS
632 [Ff])
633 TTS_ENGINE="festival"
634 NOISEFLOOR="500"
635 TTS_OPTS=$FESTIVAL_OPTS
637 [Ss])
638 TTS_ENGINE="sapi"
639 NOISEFLOOR="500"
640 TTS_OPTS=$SAPI_OPTS
642 [Ww])
643 TTS_ENGINE="swift"
644 NOISEFLOOR="500"
645 TTS_OPTS=$SWIFT_OPTS
648 TTS_ENGINE=$DEFAULT_TTS
649 TTS_OPTS=$DEFAULT_TTS_OPTS
650 NOISEFLOOR=$DEFAULT_NOISEFLOOR
651 esac
652 echo "Using $TTS_ENGINE for TTS"
654 # Select which voice to use for Festival
655 if [ "$TTS_ENGINE" = "festival" ]; then
656 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
657 for voice in $voicelist; do
658 TTS_FESTIVAL_VOICE="$voice" # Default choice
659 break
660 done
661 if [ "$ARG_VOICE" ]; then
662 CHOICE=$ARG_VOICE
663 else
665 for voice in $voicelist; do
666 printf "%3d. %s\n" "$i" "$voice"
667 i=`expr $i + 1`
668 done
669 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
670 CHOICE=`input`
673 for voice in $voicelist; do
674 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
675 TTS_FESTIVAL_VOICE="$voice"
677 i=`expr $i + 1`
678 done
679 advopts="$advopts --voice=$CHOICE"
680 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
681 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
684 # Read custom tts options from command line
685 if [ "$ARG_TTSOPTS" ]; then
686 TTS_OPTS="$ARG_TTSOPTS"
687 advopts="$advopts --ttsopts='$TTS_OPTS'"
688 echo "$TTS_ENGINE options set to $TTS_OPTS"
691 if [ "$swcodec" = "yes" ]; then
692 ENCODER="rbspeexenc"
693 ENC_CMD="rbspeexenc"
694 ENC_OPTS="-q 4 -c 10"
695 else
696 if [ -n "`findtool lame`" ]; then
697 ENCODER="lame"
698 ENC_CMD="lame"
699 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
700 else
701 echo "You need LAME in the system path to build voice files for"
702 echo "HWCODEC targets."
703 exit 4
707 echo "Using $ENCODER for encoding voice clips"
709 # Read custom encoder options from command line
710 if [ "$ARG_ENCOPTS" ]; then
711 ENC_OPTS="$ARG_ENCOPTS"
712 advopts="$advopts --encopts='$ENC_OPTS'"
713 echo "$ENCODER options set to $ENC_OPTS"
716 TEMPDIR="${pwd}"
717 if [ -n "`findtool cygpath`" ]; then
718 TEMPDIR=`cygpath . -a -w`
722 picklang() {
723 # figure out which languages that are around
724 for file in $rootdir/apps/lang/*.lang; do
725 clean=`basename $file .lang`
726 langs="$langs $clean"
727 done
729 if [ "$ARG_LANG" ]; then
730 pick=$ARG_LANG
731 else
732 echo "Select a number for the language to use (default is english)"
733 # FIXME The multiple-language feature is currently broken
734 # echo "You may enter a comma-separated list of languages to build"
736 num=1
737 for one in $langs; do
738 echo "$num. $one"
739 num=`expr $num + 1`
740 done
741 pick=`input`
743 advopts="$advopts --language=$pick"
746 whichlang() {
747 output=""
748 # Allow the user to pass a comma-separated list of langauges
749 for thispick in `echo $pick | sed 's/,/ /g'`; do
750 num=1
751 for one in $langs; do
752 # Accept both the language number and name
753 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
754 if [ "$output" = "" ]; then
755 output=$one
756 else
757 output=$output,$one
760 num=`expr $num + 1`
761 done
762 done
763 if [ -z "$output" ]; then
764 # pick a default
765 output="english"
767 echo $output
770 help() {
771 echo "Rockbox configure script."
772 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
773 echo "Do *NOT* run this within the tools directory!"
774 echo ""
775 cat <<EOF
776 Usage: configure [OPTION]...
777 Options:
778 --target=TARGET Sets the target, TARGET can be either the target ID or
779 corresponding string. Run without this option to see all
780 available targets.
782 --ram=RAM Sets the RAM for certain targets. Even though any number
783 is accepted, not every number is correct. The default
784 value will be applied, if you entered a wrong number
785 (which depends on the target). Watch the output. Run
786 without this option if you are not sure which the right
787 number is.
789 --type=TYPE Sets the build type. Shortcuts are also valid.
790 Run without this option to see all available types.
791 Multiple values are allowed and managed in the input
792 order. So --type=b stands for Bootloader build, while
793 --type=ab stands for "Backlight MOD" build.
795 --language=LANG Set the language used for voice generation (used only if
796 TYPE is AV).
798 --tts=ENGINE Set the TTS engine used for voice generation (used only
799 if TYPE is AV).
801 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
802 AV).
804 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
806 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
808 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
809 This is useful for having multiple alternate builds on
810 your device that you can load with ROLO. However as the
811 bootloader looks for .rockbox you won't be able to boot
812 into this build.
814 --ccache Enable ccache use (done by default these days)
815 --no-ccache Disable ccache use
817 --eabi Make configure prefer toolchains that are able to compile
818 for the new ARM standard abi EABI
819 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
820 --thumb Build with -mthumb (for ARM builds)
821 --no-thumb The opposite of --thumb (don't use thumb even for targets
822 where this is the default
823 --help Shows this message (must not be used with other options)
827 exit
830 ARG_CCACHE=
831 ARG_ENCOPTS=
832 ARG_LANG=
833 ARG_RAM=
834 ARG_RBDIR=
835 ARG_TARGET=
836 ARG_TTS=
837 ARG_TTSOPTS=
838 ARG_TYPE=
839 ARG_VOICE=
840 ARG_ARM_EABI=
841 ARG_ARM_THUMB=
842 err=
843 for arg in "$@"; do
844 case "$arg" in
845 --ccache) ARG_CCACHE=1;;
846 --no-ccache) ARG_CCACHE=0;;
847 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
848 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
849 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
850 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
851 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
852 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
853 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
854 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
855 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
856 --eabi) ARG_ARM_EABI=1;;
857 --no-eabi) ARG_ARM_EABI=0;;
858 --thumb) ARG_ARM_THUMB=1;;
859 --no-thumb) ARG_ARM_THUMB=0;;
860 --help) help;;
861 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
862 esac
863 done
864 [ "$err" ] && exit 1
866 advopts=
868 if [ "$TMPDIR" != "" ]; then
869 tmpdir=$TMPDIR
870 else
871 tmpdir=/tmp
873 echo Using temporary directory $tmpdir
875 if test -r "configure"; then
876 # this is a check for a configure script in the current directory, it there
877 # is one, try to figure out if it is this one!
879 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
880 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
881 echo "It will only cause you pain and grief. Instead do this:"
882 echo ""
883 echo " cd .."
884 echo " mkdir build-dir"
885 echo " cd build-dir"
886 echo " ../tools/configure"
887 echo ""
888 echo "Much happiness will arise from this. Enjoy"
889 exit 5
893 # get our current directory
894 pwd=`pwd`;
896 if { echo $pwd | grep " "; } then
897 echo "You're running this script in a path that contains space. The build"
898 echo "system is unfortunately not clever enough to deal with this. Please"
899 echo "run the script from a different path, rename the path or fix the build"
900 echo "system!"
901 exit 6
904 if [ -z "$rootdir" ]; then
905 ##################################################################
906 # Figure out where the source code root is!
908 rootdir=`dirname $0`/../
910 #####################################################################
911 # Convert the possibly relative directory name to an absolute version
913 now=`pwd`
914 cd $rootdir
915 rootdir=`pwd`
917 # cd back to the build dir
918 cd $now
921 apps="apps"
922 appsdir='\$(ROOTDIR)/apps'
923 firmdir='\$(ROOTDIR)/firmware'
924 toolsdir='\$(ROOTDIR)/tools'
927 ##################################################################
928 # Figure out target platform
931 if [ "$ARG_TARGET" ]; then
932 buildfor=$ARG_TARGET
933 else
934 echo "Enter target platform:"
935 cat <<EOF
936 ==Archos== ==iriver== ==Apple iPod==
937 0) Player/Studio 10) H120/H140 20) Color/Photo
938 1) Recorder 11) H320/H340 21) Nano 1G
939 2) FM Recorder 12) iHP-100/110/115 22) Video
940 3) Recorder v2 13) iFP-790 23) 3G
941 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
942 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
943 6) AV300 26) Mini 2G
944 ==Toshiba== 27) 1G, 2G
945 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
946 30) X5/X5V/X5L 41) Gigabeat S
947 31) M5/M5L ==SanDisk==
948 32) 7 ==Olympus= 50) Sansa e200
949 33) D2 70) M:Robe 500 51) Sansa e200R
950 34) M3/M3L 71) M:Robe 100 52) Sansa c200
951 53) Sansa m200
952 ==Creative== ==Philips== 54) Sansa c100
953 90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip
954 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2
955 92) Zen Vision HDD1830 57) Sansa m200v4
956 102) GoGear HDD6330 58) Sansa Fuze
957 ==Onda== 59) Sansa c200v2
958 120) VX747 ==Meizu== 60) Sansa Clipv2
959 121) VX767 110) M6SL 61) Sansa View
960 122) VX747+ 111) M6SP 62) Sansa Clip+
961 123) VX777 112) M3 63) Sansa Fuze v2
963 ==Logik==
964 ==Samsung== ==Tatung== 80) DAX 1GB MP3/DAB
965 140) YH-820 150) Elio TPJ-1022
966 141) YH-920 ==Lyre project==
967 142) YH-925 ==Packard Bell== 130) Lyre proto 1
968 143) YP-S3 160) Vibe 500 131) Mini2440
970 ==MPIO==
971 170) HD200
974 buildfor=`input`;
977 # Set of tools built for all target platforms:
978 toolset="rdf2binary convbdf codepages"
980 # Toolsets for some target families:
981 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
982 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
983 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
984 ipodbitmaptools="$toolset scramble bmp2rb"
985 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
986 tccbitmaptools="$toolset scramble bmp2rb"
987 # generic is used by IFP, Meizu and Onda
988 genericbitmaptools="$toolset bmp2rb"
989 # scramble is used by all other targets
990 scramblebitmaptools="$genericbitmaptools scramble"
993 # ---- For each target ----
995 # *Variables*
996 # target_id: a unique number identifying this target, IS NOT the menu number.
997 # Just use the currently highest number+1 when you add a new
998 # target.
999 # modelname: short model name used all over to identify this target
1000 # memory: number of megabytes of RAM this target has. If the amount can
1001 # be selected by the size prompt, let memory be unset here
1002 # target: -Ddefine passed to the build commands to make the correct
1003 # config-*.h file get included etc
1004 # tool: the tool that takes a plain binary and converts that into a
1005 # working "firmware" file for your target
1006 # output: the final output file name
1007 # boottool: the tool that takes a plain binary and generates a bootloader
1008 # file for your target (or blank to use $tool)
1009 # bootoutput:the final output file name for the bootloader (or blank to use
1010 # $output)
1011 # appextra: passed to the APPEXTRA variable in the Makefiles.
1012 # TODO: add proper explanation
1013 # archosrom: used only for Archos targets that build a special flashable .ucl
1014 # image.
1015 # flash: name of output for flashing, for targets where there's a special
1016 # file output for this.
1017 # plugins: set to 'yes' to build the plugins. Early development builds can
1018 # set this to no in the early stages to have an easier life for a
1019 # while
1020 # swcodec: set 'yes' on swcodec targets
1021 # toolset: lists what particular tools in the tools/ directory that this
1022 # target needs to have built prior to building Rockbox
1024 # *Functions*
1025 # *cc: sets up gcc and compiler options for your target builds. Note
1026 # that if you select a simulator build, the compiler selection is
1027 # overridden later in the script.
1029 case $buildfor in
1031 0|archosplayer)
1032 target_id=1
1033 modelname="archosplayer"
1034 target="-DARCHOS_PLAYER"
1035 shcc
1036 tool="$rootdir/tools/scramble"
1037 output="archos.mod"
1038 appextra="player:gui"
1039 archosrom="$pwd/rombox.ucl"
1040 flash="$pwd/rockbox.ucl"
1041 plugins="yes"
1042 swcodec=""
1044 # toolset is the tools within the tools directory that we build for
1045 # this particular target.
1046 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1048 # Note: the convbdf is present in the toolset just because: 1) the
1049 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1050 # build the player simulator
1052 t_cpu="sh"
1053 t_manufacturer="archos"
1054 t_model="player"
1057 1|archosrecorder)
1058 target_id=2
1059 modelname="archosrecorder"
1060 target="-DARCHOS_RECORDER"
1061 shcc
1062 tool="$rootdir/tools/scramble"
1063 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1064 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1065 output="ajbrec.ajz"
1066 appextra="recorder:gui:radio"
1067 #archosrom="$pwd/rombox.ucl"
1068 flash="$pwd/rockbox.ucl"
1069 plugins="yes"
1070 swcodec=""
1071 # toolset is the tools within the tools directory that we build for
1072 # this particular target.
1073 toolset=$archosbitmaptools
1074 t_cpu="sh"
1075 t_manufacturer="archos"
1076 t_model="recorder"
1079 2|archosfmrecorder)
1080 target_id=3
1081 modelname="archosfmrecorder"
1082 target="-DARCHOS_FMRECORDER"
1083 shcc
1084 tool="$rootdir/tools/scramble -fm"
1085 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1086 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1087 output="ajbrec.ajz"
1088 appextra="recorder:gui:radio"
1089 #archosrom="$pwd/rombox.ucl"
1090 flash="$pwd/rockbox.ucl"
1091 plugins="yes"
1092 swcodec=""
1093 # toolset is the tools within the tools directory that we build for
1094 # this particular target.
1095 toolset=$archosbitmaptools
1096 t_cpu="sh"
1097 t_manufacturer="archos"
1098 t_model="fm_v2"
1101 3|archosrecorderv2)
1102 target_id=4
1103 modelname="archosrecorderv2"
1104 target="-DARCHOS_RECORDERV2"
1105 shcc
1106 tool="$rootdir/tools/scramble -v2"
1107 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1108 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1109 output="ajbrec.ajz"
1110 appextra="recorder:gui:radio"
1111 #archosrom="$pwd/rombox.ucl"
1112 flash="$pwd/rockbox.ucl"
1113 plugins="yes"
1114 swcodec=""
1115 # toolset is the tools within the tools directory that we build for
1116 # this particular target.
1117 toolset=$archosbitmaptools
1118 t_cpu="sh"
1119 t_manufacturer="archos"
1120 t_model="fm_v2"
1123 4|archosondiosp)
1124 target_id=7
1125 modelname="archosondiosp"
1126 target="-DARCHOS_ONDIOSP"
1127 shcc
1128 tool="$rootdir/tools/scramble -osp"
1129 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1130 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1131 output="ajbrec.ajz"
1132 appextra="recorder:gui:radio"
1133 #archosrom="$pwd/rombox.ucl"
1134 flash="$pwd/rockbox.ucl"
1135 plugins="yes"
1136 swcodec=""
1137 # toolset is the tools within the tools directory that we build for
1138 # this particular target.
1139 toolset=$archosbitmaptools
1140 t_cpu="sh"
1141 t_manufacturer="archos"
1142 t_model="ondio"
1145 5|archosondiofm)
1146 target_id=8
1147 modelname="archosondiofm"
1148 target="-DARCHOS_ONDIOFM"
1149 shcc
1150 tool="$rootdir/tools/scramble -ofm"
1151 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1152 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1153 output="ajbrec.ajz"
1154 appextra="recorder:gui:radio"
1155 #archosrom="$pwd/rombox.ucl"
1156 flash="$pwd/rockbox.ucl"
1157 plugins="yes"
1158 swcodec=""
1159 toolset=$archosbitmaptools
1160 t_cpu="sh"
1161 t_manufacturer="archos"
1162 t_model="ondio"
1165 6|archosav300)
1166 target_id=38
1167 modelname="archosav300"
1168 target="-DARCHOS_AV300"
1169 memory=16 # always
1170 arm7tdmicc
1171 tool="$rootdir/tools/scramble -mm=C"
1172 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1173 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1174 output="cjbm.ajz"
1175 appextra="recorder:gui:radio"
1176 plugins="yes"
1177 swcodec=""
1178 # toolset is the tools within the tools directory that we build for
1179 # this particular target.
1180 toolset="$toolset scramble descramble bmp2rb"
1181 # architecture, manufacturer and model for the target-tree build
1182 t_cpu="arm"
1183 t_manufacturer="archos"
1184 t_model="av300"
1187 10|iriverh120)
1188 target_id=9
1189 modelname="iriverh120"
1190 target="-DIRIVER_H120"
1191 memory=32 # always
1192 coldfirecc
1193 tool="$rootdir/tools/scramble -add=h120"
1194 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1195 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1196 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1197 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1198 output="rockbox.iriver"
1199 bootoutput="bootloader.iriver"
1200 appextra="recorder:gui:radio"
1201 flash="$pwd/rombox.iriver"
1202 plugins="yes"
1203 swcodec="yes"
1204 # toolset is the tools within the tools directory that we build for
1205 # this particular target.
1206 toolset=$iriverbitmaptools
1207 t_cpu="coldfire"
1208 t_manufacturer="iriver"
1209 t_model="h100"
1212 11|iriverh300)
1213 target_id=10
1214 modelname="iriverh300"
1215 target="-DIRIVER_H300"
1216 memory=32 # always
1217 coldfirecc
1218 tool="$rootdir/tools/scramble -add=h300"
1219 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1220 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1221 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1222 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1223 output="rockbox.iriver"
1224 appextra="recorder:gui:radio"
1225 plugins="yes"
1226 swcodec="yes"
1227 # toolset is the tools within the tools directory that we build for
1228 # this particular target.
1229 toolset=$iriverbitmaptools
1230 t_cpu="coldfire"
1231 t_manufacturer="iriver"
1232 t_model="h300"
1235 12|iriverh100)
1236 target_id=11
1237 modelname="iriverh100"
1238 target="-DIRIVER_H100"
1239 memory=16 # always
1240 coldfirecc
1241 tool="$rootdir/tools/scramble -add=h100"
1242 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1243 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1244 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1245 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1246 output="rockbox.iriver"
1247 bootoutput="bootloader.iriver"
1248 appextra="recorder:gui:radio"
1249 flash="$pwd/rombox.iriver"
1250 plugins="yes"
1251 swcodec="yes"
1252 # toolset is the tools within the tools directory that we build for
1253 # this particular target.
1254 toolset=$iriverbitmaptools
1255 t_cpu="coldfire"
1256 t_manufacturer="iriver"
1257 t_model="h100"
1260 13|iriverifp7xx)
1261 target_id=19
1262 modelname="iriverifp7xx"
1263 target="-DIRIVER_IFP7XX"
1264 memory=1
1265 arm7tdmicc short
1266 tool="cp"
1267 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1268 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1269 output="rockbox.wma"
1270 appextra="recorder:gui:radio"
1271 plugins="yes"
1272 swcodec="yes"
1273 # toolset is the tools within the tools directory that we build for
1274 # this particular target.
1275 toolset=$genericbitmaptools
1276 t_cpu="arm"
1277 t_manufacturer="pnx0101"
1278 t_model="iriver-ifp7xx"
1281 14|iriverh10)
1282 target_id=22
1283 modelname="iriverh10"
1284 target="-DIRIVER_H10"
1285 memory=32 # always
1286 arm7tdmicc
1287 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1288 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1289 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1290 output="rockbox.mi4"
1291 appextra="recorder:gui:radio"
1292 plugins="yes"
1293 swcodec="yes"
1294 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1295 bootoutput="H10_20GC.mi4"
1296 # toolset is the tools within the tools directory that we build for
1297 # this particular target.
1298 toolset=$scramblebitmaptools
1299 # architecture, manufacturer and model for the target-tree build
1300 t_cpu="arm"
1301 t_manufacturer="iriver"
1302 t_model="h10"
1305 15|iriverh10_5gb)
1306 target_id=24
1307 modelname="iriverh10_5gb"
1308 target="-DIRIVER_H10_5GB"
1309 memory=32 # always
1310 arm7tdmicc
1311 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1312 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1313 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1314 output="rockbox.mi4"
1315 appextra="recorder:gui:radio"
1316 plugins="yes"
1317 swcodec="yes"
1318 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1319 bootoutput="H10.mi4"
1320 # toolset is the tools within the tools directory that we build for
1321 # this particular target.
1322 toolset=$scramblebitmaptools
1323 # architecture, manufacturer and model for the target-tree build
1324 t_cpu="arm"
1325 t_manufacturer="iriver"
1326 t_model="h10"
1329 20|ipodcolor)
1330 target_id=13
1331 modelname="ipodcolor"
1332 target="-DIPOD_COLOR"
1333 memory=32 # always
1334 arm7tdmicc
1335 tool="$rootdir/tools/scramble -add=ipco"
1336 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1337 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1338 output="rockbox.ipod"
1339 appextra="recorder:gui:radio"
1340 plugins="yes"
1341 swcodec="yes"
1342 bootoutput="bootloader-$modelname.ipod"
1343 # toolset is the tools within the tools directory that we build for
1344 # this particular target.
1345 toolset=$ipodbitmaptools
1346 # architecture, manufacturer and model for the target-tree build
1347 t_cpu="arm"
1348 t_manufacturer="ipod"
1349 t_model="color"
1352 21|ipodnano1g)
1353 target_id=14
1354 modelname="ipodnano1g"
1355 target="-DIPOD_NANO"
1356 memory=32 # always
1357 arm7tdmicc
1358 tool="$rootdir/tools/scramble -add=nano"
1359 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1360 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1361 output="rockbox.ipod"
1362 appextra="recorder:gui:radio"
1363 plugins="yes"
1364 swcodec="yes"
1365 bootoutput="bootloader-$modelname.ipod"
1366 # toolset is the tools within the tools directory that we build for
1367 # this particular target.
1368 toolset=$ipodbitmaptools
1369 # architecture, manufacturer and model for the target-tree build
1370 t_cpu="arm"
1371 t_manufacturer="ipod"
1372 t_model="nano"
1375 22|ipodvideo)
1376 target_id=15
1377 modelname="ipodvideo"
1378 target="-DIPOD_VIDEO"
1379 arm7tdmicc
1380 tool="$rootdir/tools/scramble -add=ipvd"
1381 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1382 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1383 output="rockbox.ipod"
1384 appextra="recorder:gui:radio"
1385 plugins="yes"
1386 swcodec="yes"
1387 bootoutput="bootloader-$modelname.ipod"
1388 # toolset is the tools within the tools directory that we build for
1389 # this particular target.
1390 toolset=$ipodbitmaptools
1391 # architecture, manufacturer and model for the target-tree build
1392 t_cpu="arm"
1393 t_manufacturer="ipod"
1394 t_model="video"
1397 23|ipod3g)
1398 target_id=16
1399 modelname="ipod3g"
1400 target="-DIPOD_3G"
1401 memory=32 # always
1402 arm7tdmicc
1403 tool="$rootdir/tools/scramble -add=ip3g"
1404 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1405 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1406 output="rockbox.ipod"
1407 appextra="recorder:gui:radio"
1408 plugins="yes"
1409 swcodec="yes"
1410 bootoutput="bootloader-$modelname.ipod"
1411 # toolset is the tools within the tools directory that we build for
1412 # this particular target.
1413 toolset=$ipodbitmaptools
1414 # architecture, manufacturer and model for the target-tree build
1415 t_cpu="arm"
1416 t_manufacturer="ipod"
1417 t_model="3g"
1420 24|ipod4g)
1421 target_id=17
1422 modelname="ipod4g"
1423 target="-DIPOD_4G"
1424 memory=32 # always
1425 arm7tdmicc
1426 tool="$rootdir/tools/scramble -add=ip4g"
1427 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1428 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1429 output="rockbox.ipod"
1430 appextra="recorder:gui:radio"
1431 plugins="yes"
1432 swcodec="yes"
1433 bootoutput="bootloader-$modelname.ipod"
1434 # toolset is the tools within the tools directory that we build for
1435 # this particular target.
1436 toolset=$ipodbitmaptools
1437 # architecture, manufacturer and model for the target-tree build
1438 t_cpu="arm"
1439 t_manufacturer="ipod"
1440 t_model="4g"
1443 25|ipodmini1g)
1444 target_id=18
1445 modelname="ipodmini1g"
1446 target="-DIPOD_MINI"
1447 memory=32 # always
1448 arm7tdmicc
1449 tool="$rootdir/tools/scramble -add=mini"
1450 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1451 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1452 output="rockbox.ipod"
1453 appextra="recorder:gui:radio"
1454 plugins="yes"
1455 swcodec="yes"
1456 bootoutput="bootloader-$modelname.ipod"
1457 # toolset is the tools within the tools directory that we build for
1458 # this particular target.
1459 toolset=$ipodbitmaptools
1460 # architecture, manufacturer and model for the target-tree build
1461 t_cpu="arm"
1462 t_manufacturer="ipod"
1463 t_model="mini"
1466 26|ipodmini2g)
1467 target_id=21
1468 modelname="ipodmini2g"
1469 target="-DIPOD_MINI2G"
1470 memory=32 # always
1471 arm7tdmicc
1472 tool="$rootdir/tools/scramble -add=mn2g"
1473 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1474 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1475 output="rockbox.ipod"
1476 appextra="recorder:gui:radio"
1477 plugins="yes"
1478 swcodec="yes"
1479 bootoutput="bootloader-$modelname.ipod"
1480 # toolset is the tools within the tools directory that we build for
1481 # this particular target.
1482 toolset=$ipodbitmaptools
1483 # architecture, manufacturer and model for the target-tree build
1484 t_cpu="arm"
1485 t_manufacturer="ipod"
1486 t_model="mini2g"
1489 27|ipod1g2g)
1490 target_id=29
1491 modelname="ipod1g2g"
1492 target="-DIPOD_1G2G"
1493 memory=32 # always
1494 arm7tdmicc
1495 tool="$rootdir/tools/scramble -add=1g2g"
1496 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1497 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1498 output="rockbox.ipod"
1499 appextra="recorder:gui:radio"
1500 plugins="yes"
1501 swcodec="yes"
1502 bootoutput="bootloader-$modelname.ipod"
1503 # toolset is the tools within the tools directory that we build for
1504 # this particular target.
1505 toolset=$ipodbitmaptools
1506 # architecture, manufacturer and model for the target-tree build
1507 t_cpu="arm"
1508 t_manufacturer="ipod"
1509 t_model="1g2g"
1512 28|ipodnano2g)
1513 target_id=62
1514 modelname="ipodnano2g"
1515 target="-DIPOD_NANO2G"
1516 memory=32 # always
1517 arm940tcc
1518 tool="$rootdir/tools/scramble -add=nn2g"
1519 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1520 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1521 output="rockbox.ipod"
1522 appextra="recorder:gui:radio"
1523 plugins="yes"
1524 swcodec="yes"
1525 bootoutput="bootloader-$modelname.ipod"
1526 # toolset is the tools within the tools directory that we build for
1527 # this particular target.
1528 toolset=$ipodbitmaptools
1529 # architecture, manufacturer and model for the target-tree build
1530 t_cpu="arm"
1531 t_manufacturer="s5l8700"
1532 t_model="ipodnano2g"
1535 30|iaudiox5)
1536 target_id=12
1537 modelname="iaudiox5"
1538 target="-DIAUDIO_X5"
1539 memory=16 # always
1540 coldfirecc
1541 tool="$rootdir/tools/scramble -add=iax5"
1542 boottool="$rootdir/tools/scramble -iaudiox5"
1543 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1544 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1545 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1546 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1547 output="rockbox.iaudio"
1548 bootoutput="x5_fw.bin"
1549 appextra="recorder:gui:radio"
1550 plugins="yes"
1551 swcodec="yes"
1552 # toolset is the tools within the tools directory that we build for
1553 # this particular target.
1554 toolset="$iaudiobitmaptools"
1555 # architecture, manufacturer and model for the target-tree build
1556 t_cpu="coldfire"
1557 t_manufacturer="iaudio"
1558 t_model="x5"
1561 31|iaudiom5)
1562 target_id=28
1563 modelname="iaudiom5"
1564 target="-DIAUDIO_M5"
1565 memory=16 # always
1566 coldfirecc
1567 tool="$rootdir/tools/scramble -add=iam5"
1568 boottool="$rootdir/tools/scramble -iaudiom5"
1569 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1570 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1571 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1572 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1573 output="rockbox.iaudio"
1574 bootoutput="m5_fw.bin"
1575 appextra="recorder:gui:radio"
1576 plugins="yes"
1577 swcodec="yes"
1578 # toolset is the tools within the tools directory that we build for
1579 # this particular target.
1580 toolset="$iaudiobitmaptools"
1581 # architecture, manufacturer and model for the target-tree build
1582 t_cpu="coldfire"
1583 t_manufacturer="iaudio"
1584 t_model="m5"
1587 32|iaudio7)
1588 target_id=32
1589 modelname="iaudio7"
1590 target="-DIAUDIO_7"
1591 memory=16 # always
1592 arm946cc
1593 tool="$rootdir/tools/scramble -add=i7"
1594 boottool="$rootdir/tools/scramble -tcc=crc"
1595 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1596 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1597 output="rockbox.iaudio"
1598 appextra="recorder:gui:radio"
1599 plugins="yes"
1600 swcodec="yes"
1601 bootoutput="I7_FW.BIN"
1602 # toolset is the tools within the tools directory that we build for
1603 # this particular target.
1604 toolset="$tccbitmaptools"
1605 # architecture, manufacturer and model for the target-tree build
1606 t_cpu="arm"
1607 t_manufacturer="tcc77x"
1608 t_model="iaudio7"
1611 33|cowond2)
1612 target_id=34
1613 modelname="cowond2"
1614 target="-DCOWON_D2"
1615 memory=32
1616 arm926ejscc
1617 tool="$rootdir/tools/scramble -add=d2"
1618 boottool="cp "
1619 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1620 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1621 output="rockbox.d2"
1622 bootoutput="bootloader-cowond2.bin"
1623 appextra="recorder:gui:radio"
1624 plugins="yes"
1625 swcodec="yes"
1626 toolset="$tccbitmaptools"
1627 # architecture, manufacturer and model for the target-tree build
1628 t_cpu="arm"
1629 t_manufacturer="tcc780x"
1630 t_model="cowond2"
1633 34|iaudiom3)
1634 target_id=37
1635 modelname="iaudiom3"
1636 target="-DIAUDIO_M3"
1637 memory=16 # always
1638 coldfirecc
1639 tool="$rootdir/tools/scramble -add=iam3"
1640 boottool="$rootdir/tools/scramble -iaudiom3"
1641 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1642 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1643 output="rockbox.iaudio"
1644 bootoutput="cowon_m3.bin"
1645 appextra="recorder:gui:radio"
1646 plugins="yes"
1647 swcodec="yes"
1648 # toolset is the tools within the tools directory that we build for
1649 # this particular target.
1650 toolset="$iaudiobitmaptools"
1651 # architecture, manufacturer and model for the target-tree build
1652 t_cpu="coldfire"
1653 t_manufacturer="iaudio"
1654 t_model="m3"
1657 40|gigabeatfx)
1658 target_id=20
1659 modelname="gigabeatfx"
1660 target="-DGIGABEAT_F"
1661 memory=32 # always
1662 arm9tdmicc
1663 tool="$rootdir/tools/scramble -add=giga"
1664 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1665 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1666 output="rockbox.gigabeat"
1667 appextra="recorder:gui:radio"
1668 plugins="yes"
1669 swcodec="yes"
1670 toolset=$gigabeatbitmaptools
1671 boottool="$rootdir/tools/scramble -gigabeat"
1672 bootoutput="FWIMG01.DAT"
1673 # architecture, manufacturer and model for the target-tree build
1674 t_cpu="arm"
1675 t_manufacturer="s3c2440"
1676 t_model="gigabeat-fx"
1679 41|gigabeats)
1680 target_id=26
1681 modelname="gigabeats"
1682 target="-DGIGABEAT_S"
1683 memory=64
1684 arm1136jfscc
1685 tool="$rootdir/tools/scramble -add=gigs"
1686 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1687 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1688 output="rockbox.gigabeat"
1689 appextra="recorder:gui:radio"
1690 plugins="yes"
1691 swcodec="yes"
1692 toolset="$gigabeatbitmaptools"
1693 boottool="$rootdir/tools/scramble -gigabeats"
1694 bootoutput="nk.bin"
1695 # architecture, manufacturer and model for the target-tree build
1696 t_cpu="arm"
1697 t_manufacturer="imx31"
1698 t_model="gigabeat-s"
1701 70|mrobe500)
1702 target_id=36
1703 modelname="mrobe500"
1704 target="-DMROBE_500"
1705 memory=64 # always
1706 arm926ejscc
1707 tool="$rootdir/tools/scramble -add=m500"
1708 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1709 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1710 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1711 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1712 output="rockbox.mrobe500"
1713 appextra="recorder:gui:radio"
1714 plugins="yes"
1715 swcodec="yes"
1716 toolset=$gigabeatbitmaptools
1717 boottool="cp "
1718 bootoutput="rockbox.mrboot"
1719 # architecture, manufacturer and model for the target-tree build
1720 t_cpu="arm"
1721 t_manufacturer="tms320dm320"
1722 t_model="mrobe-500"
1725 71|mrobe100)
1726 target_id=33
1727 modelname="mrobe100"
1728 target="-DMROBE_100"
1729 memory=32 # always
1730 arm7tdmicc
1731 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1732 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1733 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1734 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1735 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1736 output="rockbox.mi4"
1737 appextra="recorder:gui:radio"
1738 plugins="yes"
1739 swcodec="yes"
1740 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1741 bootoutput="pp5020.mi4"
1742 # toolset is the tools within the tools directory that we build for
1743 # this particular target.
1744 toolset=$scramblebitmaptools
1745 # architecture, manufacturer and model for the target-tree build
1746 t_cpu="arm"
1747 t_manufacturer="olympus"
1748 t_model="mrobe-100"
1751 80|logikdax)
1752 target_id=31
1753 modelname="logikdax"
1754 target="-DLOGIK_DAX"
1755 memory=2 # always
1756 arm946cc
1757 tool="$rootdir/tools/scramble -add=ldax"
1758 boottool="$rootdir/tools/scramble -tcc=crc"
1759 bootoutput="player.rom"
1760 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1761 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1762 output="rockbox.logik"
1763 appextra="recorder:gui:radio"
1764 plugins=""
1765 swcodec="yes"
1766 # toolset is the tools within the tools directory that we build for
1767 # this particular target.
1768 toolset=$tccbitmaptools
1769 # architecture, manufacturer and model for the target-tree build
1770 t_cpu="arm"
1771 t_manufacturer="tcc77x"
1772 t_model="logikdax"
1775 90|zenvisionm30gb)
1776 target_id=35
1777 modelname="zenvisionm30gb"
1778 target="-DCREATIVE_ZVM"
1779 memory=64
1780 arm926ejscc
1781 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1782 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1783 tool="$rootdir/tools/scramble -creative=zvm"
1784 USE_ELF="yes"
1785 output="rockbox.zvm"
1786 appextra="recorder:gui:radio"
1787 plugins="yes"
1788 swcodec="yes"
1789 toolset=$ipodbitmaptools
1790 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1791 bootoutput="rockbox.zvmboot"
1792 # architecture, manufacturer and model for the target-tree build
1793 t_cpu="arm"
1794 t_manufacturer="tms320dm320"
1795 t_model="creative-zvm"
1798 91|zenvisionm60gb)
1799 target_id=40
1800 modelname="zenvisionm60gb"
1801 target="-DCREATIVE_ZVM60GB"
1802 memory=64
1803 arm926ejscc
1804 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1805 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1806 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1807 USE_ELF="yes"
1808 output="rockbox.zvm60"
1809 appextra="recorder:gui:radio"
1810 plugins="yes"
1811 swcodec="yes"
1812 toolset=$ipodbitmaptools
1813 boottool="$rootdir/tools/scramble -creative=zvm60"
1814 bootoutput="rockbox.zvm60boot"
1815 # architecture, manufacturer and model for the target-tree build
1816 t_cpu="arm"
1817 t_manufacturer="tms320dm320"
1818 t_model="creative-zvm"
1821 92|zenvision)
1822 target_id=39
1823 modelname="zenvision"
1824 target="-DCREATIVE_ZV"
1825 memory=64
1826 arm926ejscc
1827 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1828 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1829 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1830 USE_ELF="yes"
1831 output="rockbox.zv"
1832 appextra="recorder:gui:radio"
1833 plugins=""
1834 swcodec="yes"
1835 toolset=$ipodbitmaptools
1836 boottool="$rootdir/tools/scramble -creative=zenvision"
1837 bootoutput="rockbox.zvboot"
1838 # architecture, manufacturer and model for the target-tree build
1839 t_cpu="arm"
1840 t_manufacturer="tms320dm320"
1841 t_model="creative-zvm"
1844 50|sansae200)
1845 target_id=23
1846 modelname="sansae200"
1847 target="-DSANSA_E200"
1848 memory=32 # supposedly
1849 arm7tdmicc
1850 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1851 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1852 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1853 output="rockbox.mi4"
1854 appextra="recorder:gui:radio"
1855 plugins="yes"
1856 swcodec="yes"
1857 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1858 bootoutput="PP5022.mi4"
1859 # toolset is the tools within the tools directory that we build for
1860 # this particular target.
1861 toolset=$scramblebitmaptools
1862 # architecture, manufacturer and model for the target-tree build
1863 t_cpu="arm"
1864 t_manufacturer="sandisk"
1865 t_model="sansa-e200"
1868 51|sansae200r)
1869 # the e200R model is pretty much identical to the e200, it only has a
1870 # different option to the scramble tool when building a bootloader and
1871 # makes the bootloader output file name in all lower case.
1872 target_id=27
1873 modelname="sansae200r"
1874 target="-DSANSA_E200"
1875 memory=32 # supposedly
1876 arm7tdmicc
1877 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1878 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1879 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1880 output="rockbox.mi4"
1881 appextra="recorder:gui:radio"
1882 plugins="yes"
1883 swcodec="yes"
1884 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1885 bootoutput="pp5022.mi4"
1886 # toolset is the tools within the tools directory that we build for
1887 # this particular target.
1888 toolset=$scramblebitmaptools
1889 # architecture, manufacturer and model for the target-tree build
1890 t_cpu="arm"
1891 t_manufacturer="sandisk"
1892 t_model="sansa-e200"
1895 52|sansac200)
1896 target_id=30
1897 modelname="sansac200"
1898 target="-DSANSA_C200"
1899 memory=32 # supposedly
1900 arm7tdmicc
1901 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1902 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1903 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1904 output="rockbox.mi4"
1905 appextra="recorder:gui:radio"
1906 plugins="yes"
1907 swcodec="yes"
1908 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1909 bootoutput="firmware.mi4"
1910 # toolset is the tools within the tools directory that we build for
1911 # this particular target.
1912 toolset=$scramblebitmaptools
1913 # architecture, manufacturer and model for the target-tree build
1914 t_cpu="arm"
1915 t_manufacturer="sandisk"
1916 t_model="sansa-c200"
1919 53|sansam200)
1920 target_id=48
1921 modelname="sansam200"
1922 target="-DSANSA_M200"
1923 memory=1 # always
1924 arm946cc
1925 tool="$rootdir/tools/scramble -add=m200"
1926 boottool="$rootdir/tools/scramble -tcc=crc"
1927 bootoutput="player.rom"
1928 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1929 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1930 output="rockbox.m200"
1931 appextra="recorder:gui:radio"
1932 plugins=""
1933 swcodec="yes"
1934 # toolset is the tools within the tools directory that we build for
1935 # this particular target.
1936 toolset=$tccbitmaptools
1937 # architecture, manufacturer and model for the target-tree build
1938 t_cpu="arm"
1939 t_manufacturer="tcc77x"
1940 t_model="m200"
1943 54|sansac100)
1944 target_id=42
1945 modelname="sansac100"
1946 target="-DSANSA_C100"
1947 memory=2
1948 arm946cc
1949 tool="$rootdir/tools/scramble -add=c100"
1950 boottool="$rootdir/tools/scramble -tcc=crc"
1951 bootoutput="player.rom"
1952 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1953 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1954 output="rockbox.c100"
1955 appextra="recorder:gui:radio"
1956 plugins=""
1957 swcodec="yes"
1958 # toolset is the tools within the tools directory that we build for
1959 # this particular target.
1960 toolset=$tccbitmaptools
1961 # architecture, manufacturer and model for the target-tree build
1962 t_cpu="arm"
1963 t_manufacturer="tcc77x"
1964 t_model="c100"
1967 55|sansaclip)
1968 target_id=50
1969 modelname="sansaclip"
1970 target="-DSANSA_CLIP"
1971 memory=2
1972 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1973 bmp2rb_native="$bmp2rb_mono"
1974 tool="$rootdir/tools/scramble -add=clip"
1975 output="rockbox.sansa"
1976 bootoutput="bootloader-clip.sansa"
1977 appextra="recorder:gui:radio"
1978 plugins="yes"
1979 swcodec="yes"
1980 toolset=$scramblebitmaptools
1981 t_cpu="arm"
1982 t_manufacturer="as3525"
1983 t_model="sansa-clip"
1984 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
1985 arm9tdmicc
1986 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1990 56|sansae200v2)
1991 target_id=51
1992 modelname="sansae200v2"
1993 target="-DSANSA_E200V2"
1994 memory=8
1995 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1996 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1997 tool="$rootdir/tools/scramble -add=e2v2"
1998 output="rockbox.sansa"
1999 bootoutput="bootloader-e200v2.sansa"
2000 appextra="recorder:gui:radio"
2001 plugins="yes"
2002 swcodec="yes"
2003 toolset=$scramblebitmaptools
2004 t_cpu="arm"
2005 t_manufacturer="as3525"
2006 t_model="sansa-e200v2"
2007 arm9tdmicc
2011 57|sansam200v4)
2012 target_id=52
2013 modelname="sansam200v4"
2014 target="-DSANSA_M200V4"
2015 memory=2
2016 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2017 bmp2rb_native="$bmp2rb_mono"
2018 tool="$rootdir/tools/scramble -add=m2v4"
2019 output="rockbox.sansa"
2020 bootoutput="bootloader-m200v4.sansa"
2021 appextra="recorder:gui:radio"
2022 plugins="yes"
2023 swcodec="yes"
2024 toolset=$scramblebitmaptools
2025 t_cpu="arm"
2026 t_manufacturer="as3525"
2027 t_model="sansa-m200v4"
2028 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2029 arm9tdmicc
2030 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2034 58|sansafuze)
2035 target_id=53
2036 modelname="sansafuze"
2037 target="-DSANSA_FUZE"
2038 memory=8
2039 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2040 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2041 tool="$rootdir/tools/scramble -add=fuze"
2042 output="rockbox.sansa"
2043 bootoutput="bootloader-fuze.sansa"
2044 appextra="recorder:gui:radio"
2045 plugins="yes"
2046 swcodec="yes"
2047 toolset=$scramblebitmaptools
2048 t_cpu="arm"
2049 t_manufacturer="as3525"
2050 t_model="sansa-fuze"
2051 arm9tdmicc
2055 59|sansac200v2)
2056 target_id=55
2057 modelname="sansac200v2"
2058 target="-DSANSA_C200V2"
2059 memory=2 # as per OF diagnosis mode
2060 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2061 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2062 tool="$rootdir/tools/scramble -add=c2v2"
2063 output="rockbox.sansa"
2064 bootoutput="bootloader-c200v2.sansa"
2065 appextra="recorder:gui:radio"
2066 plugins="yes"
2067 swcodec="yes"
2068 # toolset is the tools within the tools directory that we build for
2069 # this particular target.
2070 toolset=$scramblebitmaptools
2071 # architecture, manufacturer and model for the target-tree build
2072 t_cpu="arm"
2073 t_manufacturer="as3525"
2074 t_model="sansa-c200v2"
2075 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2076 arm9tdmicc
2077 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2080 60|sansaclipv2)
2081 target_id=60
2082 modelname="sansaclipv2"
2083 target="-DSANSA_CLIPV2"
2084 memory=8
2085 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2086 bmp2rb_native="$bmp2rb_mono"
2087 tool="$rootdir/tools/scramble -add=clv2"
2088 output="rockbox.sansa"
2089 bootoutput="bootloader-clipv2.sansa"
2090 appextra="recorder:gui:radio"
2091 plugins="yes"
2092 swcodec="yes"
2093 toolset=$scramblebitmaptools
2094 t_cpu="arm"
2095 t_manufacturer="as3525"
2096 t_model="sansa-clipv2"
2097 arm926ejscc
2100 61|sansaview)
2101 echo "Sansa View is not yet supported!"
2102 exit 1
2103 target_id=63
2104 modelname="sansaview"
2105 target="-DSANSA_VIEW"
2106 memory=32
2107 arm1176jzscc
2108 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2109 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2110 output="rockbox.mi4"
2111 appextra="gui"
2112 plugins=""
2113 swcodec="yes"
2114 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2115 bootoutput="firmware.mi4"
2116 # toolset is the tools within the tools directory that we build for
2117 # this particular target.
2118 toolset=$scramblebitmaptools
2119 t_cpu="arm"
2120 t_manufacturer="sandisk"
2121 t_model="sansa-view"
2124 62|sansaclipplus)
2125 target_id=66
2126 modelname="sansaclipplus"
2127 target="-DSANSA_CLIPPLUS"
2128 memory=8
2129 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2130 bmp2rb_native="$bmp2rb_mono"
2131 tool="$rootdir/tools/scramble -add=cli+"
2132 output="rockbox.sansa"
2133 bootoutput="bootloader-clipplus.sansa"
2134 appextra="recorder:gui:radio"
2135 plugins="yes"
2136 swcodec="yes"
2137 toolset=$scramblebitmaptools
2138 t_cpu="arm"
2139 t_manufacturer="as3525"
2140 t_model="sansa-clipplus"
2141 arm926ejscc
2144 63|sansafuzev2)
2145 target_id=68
2146 modelname="sansafuzev2"
2147 target="-DSANSA_FUZEV2"
2148 memory=8 # not sure
2149 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2150 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2151 tool="$rootdir/tools/scramble -add=fuz2"
2152 output="rockbox.sansa"
2153 bootoutput="bootloader-fuzev2.sansa"
2154 appextra="recorder:gui:radio"
2155 plugins="yes"
2156 swcodec="yes"
2157 toolset=$scramblebitmaptools
2158 t_cpu="arm"
2159 t_manufacturer="as3525"
2160 t_model="sansa-fuzev2"
2161 arm926ejscc
2164 150|tatungtpj1022)
2165 target_id=25
2166 modelname="tatungtpj1022"
2167 target="-DTATUNG_TPJ1022"
2168 memory=32 # always
2169 arm7tdmicc
2170 tool="$rootdir/tools/scramble -add tpj2"
2171 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2172 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2173 output="rockbox.elio"
2174 appextra="recorder:gui:radio"
2175 plugins="yes"
2176 swcodec="yes"
2177 boottool="$rootdir/tools/scramble -mi4v2"
2178 bootoutput="pp5020.mi4"
2179 # toolset is the tools within the tools directory that we build for
2180 # this particular target.
2181 toolset=$scramblebitmaptools
2182 # architecture, manufacturer and model for the target-tree build
2183 t_cpu="arm"
2184 t_manufacturer="tatung"
2185 t_model="tpj1022"
2188 100|gogearsa9200)
2189 target_id=41
2190 modelname="gogearsa9200"
2191 target="-DPHILIPS_SA9200"
2192 memory=32 # supposedly
2193 arm7tdmicc
2194 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2195 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2196 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2197 output="rockbox.mi4"
2198 appextra="recorder:gui:radio"
2199 plugins=""
2200 swcodec="yes"
2201 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2202 bootoutput="FWImage.ebn"
2203 # toolset is the tools within the tools directory that we build for
2204 # this particular target.
2205 toolset=$scramblebitmaptools
2206 # architecture, manufacturer and model for the target-tree build
2207 t_cpu="arm"
2208 t_manufacturer="philips"
2209 t_model="sa9200"
2212 101|gogearhdd1630)
2213 target_id=43
2214 modelname="gogearhdd1630"
2215 target="-DPHILIPS_HDD1630"
2216 memory=32 # supposedly
2217 arm7tdmicc
2218 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2219 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2220 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2221 output="rockbox.mi4"
2222 appextra="recorder:gui:radio"
2223 plugins="yes"
2224 swcodec="yes"
2225 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2226 bootoutput="FWImage.ebn"
2227 # toolset is the tools within the tools directory that we build for
2228 # this particular target.
2229 toolset=$scramblebitmaptools
2230 # architecture, manufacturer and model for the target-tree build
2231 t_cpu="arm"
2232 t_manufacturer="philips"
2233 t_model="hdd1630"
2236 102|gogearhdd6330)
2237 target_id=65
2238 modelname="gogearhdd6330"
2239 target="-DPHILIPS_HDD6330"
2240 memory=32 # supposedly
2241 arm7tdmicc
2242 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2243 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2244 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2245 output="rockbox.mi4"
2246 appextra="recorder:gui:radio"
2247 plugins=""
2248 swcodec="yes"
2249 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2250 bootoutput="FWImage.ebn"
2251 # toolset is the tools within the tools directory that we build for
2252 # this particular target.
2253 toolset=$scramblebitmaptools
2254 # architecture, manufacturer and model for the target-tree build
2255 t_cpu="arm"
2256 t_manufacturer="philips"
2257 t_model="hdd6330"
2260 110|meizum6sl)
2261 target_id=49
2262 modelname="meizum6sl"
2263 target="-DMEIZU_M6SL"
2264 memory=16 # always
2265 arm940tbecc
2266 tool="cp"
2267 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2268 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2269 output="rockbox.meizu"
2270 appextra="recorder:gui:radio"
2271 plugins="no" #FIXME
2272 swcodec="yes"
2273 toolset=$genericbitmaptools
2274 boottool="cp"
2275 bootoutput="rockboot.ebn"
2276 # architecture, manufacturer and model for the target-tree build
2277 t_cpu="arm"
2278 t_manufacturer="s5l8700"
2279 t_model="meizu-m6sl"
2282 111|meizum6sp)
2283 target_id=46
2284 modelname="meizum6sp"
2285 target="-DMEIZU_M6SP"
2286 memory=16 # always
2287 arm940tbecc
2288 tool="cp"
2289 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2290 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2291 output="rockbox.meizu"
2292 appextra="recorder:gui:radio"
2293 plugins="no" #FIXME
2294 swcodec="yes"
2295 toolset=$genericbitmaptools
2296 boottool="cp"
2297 bootoutput="rockboot.ebn"
2298 # architecture, manufacturer and model for the target-tree build
2299 t_cpu="arm"
2300 t_manufacturer="s5l8700"
2301 t_model="meizu-m6sp"
2304 112|meizum3)
2305 target_id=47
2306 modelname="meizum3"
2307 target="-DMEIZU_M3"
2308 memory=16 # always
2309 arm940tbecc
2310 tool="cp"
2311 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2312 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2313 output="rockbox.meizu"
2314 appextra="recorder:gui:radio"
2315 plugins="no" #FIXME
2316 swcodec="yes"
2317 toolset=$genericbitmaptools
2318 boottool="cp"
2319 bootoutput="rockboot.ebn"
2320 # architecture, manufacturer and model for the target-tree build
2321 t_cpu="arm"
2322 t_manufacturer="s5l8700"
2323 t_model="meizu-m3"
2326 120|ondavx747)
2327 target_id=45
2328 modelname="ondavx747"
2329 target="-DONDA_VX747"
2330 memory=16
2331 mipselcc
2332 tool="$rootdir/tools/scramble -add=x747"
2333 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2334 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2335 output="rockbox.vx747"
2336 appextra="recorder:gui:radio"
2337 plugins="yes"
2338 swcodec="yes"
2339 toolset=$genericbitmaptools
2340 boottool="$rootdir/tools/scramble -ccpmp"
2341 bootoutput="ccpmp.bin"
2342 # architecture, manufacturer and model for the target-tree build
2343 t_cpu="mips"
2344 t_manufacturer="ingenic_jz47xx"
2345 t_model="onda_vx747"
2348 121|ondavx767)
2349 target_id=64
2350 modelname="ondavx767"
2351 target="-DONDA_VX767"
2352 memory=16 #FIXME
2353 mipselcc
2354 tool="cp"
2355 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2356 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2357 output="rockbox.vx767"
2358 appextra="recorder:gui:radio"
2359 plugins="" #FIXME
2360 swcodec="yes"
2361 toolset=$genericbitmaptools
2362 boottool="$rootdir/tools/scramble -ccpmp"
2363 bootoutput="ccpmp.bin"
2364 # architecture, manufacturer and model for the target-tree build
2365 t_cpu="mips"
2366 t_manufacturer="ingenic_jz47xx"
2367 t_model="onda_vx767"
2370 122|ondavx747p)
2371 target_id=54
2372 modelname="ondavx747p"
2373 target="-DONDA_VX747P"
2374 memory=16
2375 mipselcc
2376 tool="$rootdir/tools/scramble -add=747p"
2377 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2378 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2379 output="rockbox.vx747p"
2380 appextra="recorder:gui:radio"
2381 plugins="yes"
2382 swcodec="yes"
2383 toolset=$genericbitmaptools
2384 boottool="$rootdir/tools/scramble -ccpmp"
2385 bootoutput="ccpmp.bin"
2386 # architecture, manufacturer and model for the target-tree build
2387 t_cpu="mips"
2388 t_manufacturer="ingenic_jz47xx"
2389 t_model="onda_vx747"
2392 123|ondavx777)
2393 target_id=61
2394 modelname="ondavx777"
2395 target="-DONDA_VX777"
2396 memory=16
2397 mipselcc
2398 tool="$rootdir/tools/scramble -add=x777"
2399 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2400 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2401 output="rockbox.vx777"
2402 appextra="recorder:gui:radio"
2403 plugins="yes"
2404 swcodec="yes"
2405 toolset=$genericbitmaptools
2406 boottool="$rootdir/tools/scramble -ccpmp"
2407 bootoutput="ccpmp.bin"
2408 # architecture, manufacturer and model for the target-tree build
2409 t_cpu="mips"
2410 t_manufacturer="ingenic_jz47xx"
2411 t_model="onda_vx747"
2414 130|lyreproto1)
2415 target_id=56
2416 modelname="lyreproto1"
2417 target="-DLYRE_PROTO1"
2418 memory=64
2419 arm926ejscc
2420 tool="cp"
2421 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2422 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2423 output="rockbox.lyre"
2424 appextra="recorder:gui:radio"
2425 plugins=""
2426 swcodec="yes"
2427 toolset=$scramblebitmaptools
2428 boottool="cp"
2429 bootoutput="bootloader-proto1.lyre"
2430 # architecture, manufacturer and model for the target-tree build
2431 t_cpu="arm"
2432 t_manufacturer="at91sam"
2433 t_model="lyre_proto1"
2436 131|mini2440)
2437 target_id=99
2438 modelname="mini2440"
2439 target="-DMINI2440"
2440 memory=64
2441 arm9tdmicc
2442 tool="$rootdir/tools/scramble -add=m244"
2443 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2444 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2445 output="rockbox.mini2440"
2446 appextra="recorder:gui:radio"
2447 plugins=""
2448 swcodec="yes"
2449 toolset=$scramblebitmaptools
2450 boottool="cp"
2451 bootoutput="bootloader-mini2440.lyre"
2452 # architecture, manufacturer and model for the target-tree build
2453 t_cpu="arm"
2454 t_manufacturer="s3c2440"
2455 t_model="mini2440"
2458 140|samsungyh820)
2459 target_id=57
2460 modelname="samsungyh820"
2461 target="-DSAMSUNG_YH820"
2462 memory=32 # always
2463 arm7tdmicc
2464 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2465 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2466 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2467 output="rockbox.mi4"
2468 appextra="recorder:gui:radio"
2469 plugins="yes"
2470 swcodec="yes"
2471 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2472 bootoutput="FW_YH820.mi4"
2473 # toolset is the tools within the tools directory that we build for
2474 # this particular target.
2475 toolset=$scramblebitmaptools
2476 # architecture, manufacturer and model for the target-tree build
2477 t_cpu="arm"
2478 t_manufacturer="samsung"
2479 t_model="yh820"
2482 141|samsungyh920)
2483 target_id=58
2484 modelname="samsungyh920"
2485 target="-DSAMSUNG_YH920"
2486 memory=32 # always
2487 arm7tdmicc
2488 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2489 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2490 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2491 output="rockbox.mi4"
2492 appextra="recorder:gui:radio"
2493 plugins="yes"
2494 swcodec="yes"
2495 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2496 bootoutput="PP5020.mi4"
2497 # toolset is the tools within the tools directory that we build for
2498 # this particular target.
2499 toolset=$scramblebitmaptools
2500 # architecture, manufacturer and model for the target-tree build
2501 t_cpu="arm"
2502 t_manufacturer="samsung"
2503 t_model="yh920"
2506 142|samsungyh925)
2507 target_id=59
2508 modelname="samsungyh925"
2509 target="-DSAMSUNG_YH925"
2510 memory=32 # always
2511 arm7tdmicc
2512 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2513 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2514 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2515 output="rockbox.mi4"
2516 appextra="recorder:gui:radio"
2517 plugins="yes"
2518 swcodec="yes"
2519 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2520 bootoutput="FW_YH925.mi4"
2521 # toolset is the tools within the tools directory that we build for
2522 # this particular target.
2523 toolset=$scramblebitmaptools
2524 # architecture, manufacturer and model for the target-tree build
2525 t_cpu="arm"
2526 t_manufacturer="samsung"
2527 t_model="yh925"
2530 143|samsungyps3)
2531 target_id=60
2532 modelname="samsungyps3"
2533 target="-DSAMSUNG_YPS3"
2534 memory=16 # always
2535 arm940tbecc
2536 tool="cp"
2537 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2538 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2539 output="rockbox.yps3"
2540 appextra="recorder:gui:radio"
2541 plugins="no" #FIXME
2542 swcodec="yes"
2543 toolset=$genericbitmaptools
2544 boottool="cp"
2545 bootoutput="rockboot.ebn"
2546 # architecture, manufacturer and model for the target-tree build
2547 t_cpu="arm"
2548 t_manufacturer="s5l8700"
2549 t_model="yps3"
2552 160|vibe500)
2553 target_id=67
2554 modelname="vibe500"
2555 target="-DPBELL_VIBE500"
2556 memory=32 # always
2557 arm7tdmicc
2558 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2559 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2560 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2561 output="rockbox.mi4"
2562 appextra="recorder:gui:radio"
2563 plugins="yes"
2564 swcodec="yes"
2565 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2566 bootoutput="jukebox.mi4"
2567 # toolset is the tools within the tools directory that we build for
2568 # this particular target.
2569 toolset=$scramblebitmaptools
2570 # architecture, manufacturer and model for the target-tree build
2571 t_cpu="arm"
2572 t_manufacturer="pbell"
2573 t_model="vibe500"
2576 170|hd200)
2577 target_id=69
2578 modelname="mpiohd200"
2579 target="-DMPIO_HD200"
2580 memory=16 # always
2581 coldfirecc
2582 tool="$rootdir/tools/scramble -add=hd20"
2583 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2584 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2585 output="rockbox.mpio"
2586 bootoutput="bootloader.mpio"
2587 appextra="recorder:gui:radio"
2588 plugins="yes"
2589 swcodec="yes"
2590 # toolset is the tools within the tools directory that we build for
2591 # this particular target.
2592 toolset="$genericbitmaptools"
2593 # architecture, manufacturer and model for the target-tree build
2594 t_cpu="coldfire"
2595 t_manufacturer="mpio"
2596 t_model="hd200"
2600 echo "Please select a supported target platform!"
2601 exit 7
2604 esac
2606 echo "Platform set to $modelname"
2609 #remove start
2610 ############################################################################
2611 # Amount of memory, for those that can differ. They have $memory unset at
2612 # this point.
2615 if [ -z "$memory" ]; then
2616 case $target_id in
2618 if [ "$ARG_RAM" ]; then
2619 size=$ARG_RAM
2620 else
2621 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2622 size=`input`;
2624 case $size in
2625 60|64)
2626 memory="64"
2629 memory="32"
2631 esac
2634 if [ "$ARG_RAM" ]; then
2635 size=$ARG_RAM
2636 else
2637 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2638 size=`input`;
2640 case $size in
2642 memory="8"
2645 memory="2"
2647 esac
2649 esac
2650 echo "Memory size selected: $memory MB"
2651 [ "$ARG_TYPE" ] || echo ""
2653 #remove end
2655 ##################################################################
2656 # Figure out build "type"
2659 # the ifp7x0 is the only platform that supports building a gdb stub like
2660 # this
2661 case $modelname in
2662 iriverifp7xx)
2663 gdbstub="(G)DB stub, "
2665 sansae200r|sansae200)
2666 gdbstub="(I)nstaller, "
2668 sansac200)
2669 gdbstub="(E)raser, "
2673 esac
2674 if [ "$ARG_TYPE" ]; then
2675 btype=$ARG_TYPE
2676 else
2677 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2678 btype=`input`;
2681 case $btype in
2682 [Ii])
2683 appsdir='\$(ROOTDIR)/bootloader'
2684 apps="bootloader"
2685 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2686 bootloader="1"
2687 echo "e200R-installer build selected"
2689 [Ee])
2690 appsdir='\$(ROOTDIR)/bootloader'
2691 apps="bootloader"
2692 echo "C2(4)0 or C2(5)0"
2693 variant=`input`
2694 case $variant in
2696 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2697 echo "c240 eraser build selected"
2700 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2701 echo "c240 eraser build selected"
2703 esac
2704 bootloader="1"
2705 echo "c200 eraser build selected"
2707 [Bb])
2708 if test $t_manufacturer = "archos"; then
2709 # Archos SH-based players do this somewhat differently for
2710 # some reason
2711 appsdir='\$(ROOTDIR)/flash/bootbox'
2712 apps="bootbox"
2713 else
2714 appsdir='\$(ROOTDIR)/bootloader'
2715 apps="bootloader"
2716 flash=""
2717 if test -n "$boottool"; then
2718 tool="$boottool"
2720 if test -n "$bootoutput"; then
2721 output=$bootoutput
2724 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2725 bootloader="1"
2726 echo "Bootloader build selected"
2728 [Ss])
2729 if [ "$modelname" = "sansae200r" ]; then
2730 echo "Do not use the e200R target for simulator builds. Use e200 instead."
2731 exit 8
2733 debug="-DDEBUG"
2734 simulator="yes"
2735 extradefines="-DSIMULATOR"
2736 archosrom=""
2737 flash=""
2738 echo "Simulator build selected"
2740 [Aa]*)
2741 echo "Advanced build selected"
2742 whichadvanced $btype
2744 [Gg])
2745 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2746 appsdir='\$(ROOTDIR)/gdb'
2747 apps="stub"
2748 case $modelname in
2749 iriverifp7xx)
2750 output="stub.wma"
2754 esac
2755 echo "GDB stub build selected"
2757 [Mm])
2758 toolset='';
2759 apps="manual"
2760 echo "Manual build selected"
2762 [Cc])
2763 uname=`uname`
2764 simcc "checkwps"
2765 toolset='';
2766 t_cpu='';
2767 GCCOPTS='';
2768 extradefines="-DDEBUG"
2769 appsdir='\$(ROOTDIR)/tools/checkwps';
2770 output='checkwps.'${modelname};
2771 archosrom='';
2772 echo "CheckWPS build selected"
2774 [Dd])
2775 uname=`uname`
2776 simcc "database"
2777 toolset='';
2778 t_cpu='';
2779 GCCOPTS='';
2780 appsdir='\$(ROOTDIR)/tools/database';
2781 archosrom='';
2783 case $uname in
2784 CYGWIN*|MINGW*)
2785 output="database_${modelname}.exe"
2788 output='database.'${modelname};
2790 esac
2792 echo "Database tool build selected"
2795 if [ "$modelname" = "sansae200r" ]; then
2796 echo "Do not use the e200R target for regular builds. Use e200 instead."
2797 exit 8
2799 debug=""
2800 btype="N" # set it explicitly since RET only gets here as well
2801 echo "Normal build selected"
2804 esac
2805 # to be able running "make manual" from non-manual configuration
2806 case $modelname in
2807 archosrecorderv2)
2808 manualdev="archosfmrecorder"
2810 iriverh1??)
2811 manualdev="iriverh100"
2813 ipodmini2g)
2814 manualdev="ipodmini1g"
2817 manualdev=$modelname
2819 esac
2821 if [ -z "$debug" ]; then
2822 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2825 echo "Using source code root directory: $rootdir"
2827 # this was once possible to change at build-time, but no more:
2828 language="english"
2830 uname=`uname`
2832 if [ "yes" = "$simulator" ]; then
2833 # setup compiler and things for simulator
2834 simcc "sdl"
2836 if [ -d "simdisk" ]; then
2837 echo "Subdirectory 'simdisk' already present"
2838 else
2839 mkdir simdisk
2840 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2844 # Now, figure out version number of the (gcc) compiler we are about to use
2845 gccver=`$CC -dumpversion`;
2847 # figure out the binutil version too and display it, mostly for the build
2848 # system etc to be able to see it easier
2849 if [ $uname = "Darwin" ]; then
2850 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2851 else
2852 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2855 if [ -z "$gccver" ]; then
2856 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
2857 echo "[WARNING] this may cause your build to fail since we cannot do the"
2858 echo "[WARNING] checks we want now."
2859 else
2861 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2862 # DEPEND on it
2864 num1=`echo $gccver | cut -d . -f1`
2865 num2=`echo $gccver | cut -d . -f2`
2866 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2868 # This makes:
2869 # 3.3.X => 303
2870 # 3.4.X => 304
2871 # 2.95.3 => 295
2873 echo "Using $CC $gccver ($gccnum)"
2875 if test "$gccnum" -ge "400"; then
2876 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2877 # so we ignore that warnings for now
2878 # -Wno-pointer-sign
2879 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2882 if test "$gccnum" -ge "402"; then
2883 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2884 # and later would throw it for several valid cases
2885 GCCOPTS="$GCCOPTS -Wno-override-init"
2888 case $prefix in
2889 ""|"$CROSS_COMPILE")
2890 # simulator
2892 i586-mingw32msvc-)
2893 # cross-compile for win32
2896 # Verify that the cross-compiler is of a recommended version!
2897 if test "$gccver" != "$gccchoice"; then
2898 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2899 echo "WARNING: version $gccchoice!"
2900 echo "WARNING: This may cause your build to fail since it may be a version"
2901 echo "WARNING: that isn't functional or known to not be the best choice."
2902 echo "WARNING: If you suffer from build problems, you know that this is"
2903 echo "WARNING: a likely source for them..."
2906 esac
2911 echo "Using $LD $ldver"
2913 # check the compiler for SH platforms
2914 if test "$CC" = "sh-elf-gcc"; then
2915 if test "$gccnum" -lt "400"; then
2916 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2917 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2918 else
2919 # figure out patch status
2920 gccpatch=`$CC --version`;
2922 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2923 echo "gcc $gccver is rockbox patched"
2924 # then convert -O to -Os to get smaller binaries!
2925 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2926 else
2927 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2928 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2933 if test "$CC" = "m68k-elf-gcc"; then
2934 # convert -O to -Os to get smaller binaries!
2935 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2938 if [ "$ARG_CCACHE" = "1" ]; then
2939 echo "Enable ccache for building"
2940 ccache="ccache"
2941 elif [ "$ARG_CCACHE" != "0" ]; then
2942 ccache=`findtool ccache`
2943 if test -n "$ccache"; then
2944 echo "Found and uses ccache ($ccache)"
2948 # figure out the full path to the various commands if possible
2949 HOSTCC=`findtool gcc --lit`
2950 HOSTAR=`findtool ar --lit`
2951 CC=`findtool ${CC} --lit`
2952 LD=`findtool ${AR} --lit`
2953 AR=`findtool ${AR} --lit`
2954 AS=`findtool ${AS} --lit`
2955 OC=`findtool ${OC} --lit`
2956 WINDRES=`findtool ${WINDRES} --lit`
2957 DLLTOOL=`findtool ${DLLTOOL} --lit`
2958 DLLWRAP=`findtool ${DLLWRAP} --lit`
2959 RANLIB=`findtool ${RANLIB} --lit`
2961 if test "$ARG_ARM_THUMB" = "1"; then
2962 extradefines="$extradefines -DUSE_THUMB"
2963 CC="$toolsdir/thumb-cc.py $CC"
2966 if test -n "$ccache"; then
2967 CC="$ccache $CC"
2970 if test "X$endian" = "Xbig"; then
2971 defendian="ROCKBOX_BIG_ENDIAN"
2972 else
2973 defendian="ROCKBOX_LITTLE_ENDIAN"
2976 if [ "$ARG_RBDIR" ]; then
2977 rbdir=$ARG_RBDIR
2978 echo "Using alternate rockbox dir: ${rbdir}"
2981 sed > autoconf.h \
2982 -e "s,@ENDIAN@,${defendian},g" \
2983 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2984 -e "s,^#undef DO_BOOTCHART,$use_bootchart,g" \
2985 -e "s,@config_rtc@,$config_rtc,g" \
2986 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2987 -e "s,@RBDIR@,${rbdir},g" \
2988 -e "s,@have_backlight@,$have_backlight,g" \
2989 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
2990 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
2991 <<EOF
2992 /* This header was made by configure */
2993 #ifndef __BUILD_AUTOCONF_H
2994 #define __BUILD_AUTOCONF_H
2996 /* Define endianess for the target or simulator platform */
2997 #define @ENDIAN@ 1
2999 /* Define this if you build rockbox to support the logf logging and display */
3000 #undef ROCKBOX_HAS_LOGF
3002 /* Define this to record a chart with timings for the stages of boot */
3003 #undef DO_BOOTCHART
3005 /* optional define for a backlight modded Ondio */
3006 @have_backlight@
3008 /* optional define for FM radio mod for iAudio M5 */
3009 @have_fmradio_in@
3011 /* optional define for ATA poweroff on Player */
3012 @have_ata_poweroff@
3014 /* optional defines for RTC mod for h1x0 */
3015 @config_rtc@
3016 @have_rtc_alarm@
3018 /* root of Rockbox */
3019 #define ROCKBOX_DIR "/@RBDIR@"
3021 #endif /* __BUILD_AUTOCONF_H */
3024 if test -n "$t_cpu"; then
3025 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3026 if [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3027 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/"
3028 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/"
3030 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3031 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3032 GCCOPTS="$GCCOPTS"
3035 if test "$simulator" = "yes"; then
3036 # add simul make stuff on the #SIMUL# line
3037 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
3038 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
3039 else
3040 # delete the lines that match
3041 simmagic1='/@SIMUL1@/D'
3042 simmagic2='/@SIMUL2@/D'
3045 if test "$swcodec" = "yes"; then
3046 voicetoolset="rbspeexenc voicefont wavtrim"
3047 else
3048 voicetoolset="voicefont wavtrim"
3051 if test "$apps" = "apps"; then
3052 # only when we build "real" apps we build the .lng files
3053 buildlangs="langs"
3056 #### Fix the cmdline ###
3057 if [ "$ARG_CCACHE" = "1" ]; then
3058 cmdline="--ccache "
3059 elif [ "$ARG_CCACHE" = "0" ]; then
3060 cmdline="--no-ccache "
3062 if [ "$ARG_ARM_EABI" = "1" ]; then
3063 cmdline="$cmdline--eabi "
3066 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3067 ### end of cmdline
3069 sed > Makefile \
3070 -e "s,@ROOTDIR@,${rootdir},g" \
3071 -e "s,@DEBUG@,${debug},g" \
3072 -e "s,@MEMORY@,${memory},g" \
3073 -e "s,@TARGET_ID@,${target_id},g" \
3074 -e "s,@TARGET@,${target},g" \
3075 -e "s,@CPU@,${t_cpu},g" \
3076 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
3077 -e "s,@MODELNAME@,${modelname},g" \
3078 -e "s,@LANGUAGE@,${language},g" \
3079 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3080 -e "s,@PWD@,${pwd},g" \
3081 -e "s,@HOSTCC@,${HOSTCC},g" \
3082 -e "s,@HOSTAR@,${HOSTAR},g" \
3083 -e "s,@CC@,${CC},g" \
3084 -e "s,@LD@,${LD},g" \
3085 -e "s,@AR@,${AR},g" \
3086 -e "s,@AS@,${AS},g" \
3087 -e "s,@OC@,${OC},g" \
3088 -e "s,@WINDRES@,${WINDRES},g" \
3089 -e "s,@DLLTOOL@,${DLLTOOL},g" \
3090 -e "s,@DLLWRAP@,${DLLWRAP},g" \
3091 -e "s,@RANLIB@,${RANLIB},g" \
3092 -e "s,@TOOL@,${tool},g" \
3093 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
3094 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
3095 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
3096 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
3097 -e "s,@OUTPUT@,${output},g" \
3098 -e "s,@APPEXTRA@,${appextra},g" \
3099 -e "s,@ARCHOSROM@,${archosrom},g" \
3100 -e "s,@FLASHFILE@,${flash},g" \
3101 -e "s,@PLUGINS@,${plugins},g" \
3102 -e "s,@CODECS@,${swcodec},g" \
3103 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
3104 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
3105 -e "s,@GCCOPTS@,${GCCOPTS},g" \
3106 -e "s,@TARGET_INC@,${TARGET_INC},g" \
3107 -e "s!@LDOPTS@!${LDOPTS}!g" \
3108 -e "s,@LOADADDRESS@,${loadaddress},g" \
3109 -e "s,@EXTRADEF@,${extradefines},g" \
3110 -e "s,@APPSDIR@,${appsdir},g" \
3111 -e "s,@FIRMDIR@,${firmdir},g" \
3112 -e "s,@TOOLSDIR@,${toolsdir},g" \
3113 -e "s,@APPS@,${apps},g" \
3114 -e "s,@SIMVER@,${simver},g" \
3115 -e "s,@GCCVER@,${gccver},g" \
3116 -e "s,@GCCNUM@,${gccnum},g" \
3117 -e "s,@UNAME@,${uname},g" \
3118 -e "s,@ENDIAN@,${defendian},g" \
3119 -e "s,@TOOLSET@,${toolset},g" \
3120 -e "${simmagic1}" \
3121 -e "${simmagic2}" \
3122 -e "s,@MANUALDEV@,${manualdev},g" \
3123 -e "s,@ENCODER@,${ENC_CMD},g" \
3124 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
3125 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
3126 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
3127 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
3128 -e "s,@LANGS@,${buildlangs},g" \
3129 -e "s,@USE_ELF@,${USE_ELF},g" \
3130 -e "s,@RBDIR@,${rbdir},g" \
3131 -e "s,@PREFIX@,$PREFIX,g" \
3132 -e "s,@CMDLINE@,$cmdline,g" \
3133 -e "s,@SDLCONFIG@,$sdl,g" \
3134 <<EOF
3135 ## Automatically generated. http://www.rockbox.org/
3137 export ROOTDIR=@ROOTDIR@
3138 export FIRMDIR=@FIRMDIR@
3139 export APPSDIR=@APPSDIR@
3140 export TOOLSDIR=@TOOLSDIR@
3141 export DOCSDIR=\$(ROOTDIR)/docs
3142 export MANUALDIR=\${ROOTDIR}/manual
3143 export DEBUG=@DEBUG@
3144 export MODELNAME=@MODELNAME@
3145 export ARCHOSROM=@ARCHOSROM@
3146 export FLASHFILE=@FLASHFILE@
3147 export TARGET_ID=@TARGET_ID@
3148 export TARGET=@TARGET@
3149 export CPU=@CPU@
3150 export MANUFACTURER=@MANUFACTURER@
3151 export OBJDIR=@PWD@
3152 export BUILDDIR=@PWD@
3153 export LANGUAGE=@LANGUAGE@
3154 export VOICELANGUAGE=@VOICELANGUAGE@
3155 export MEMORYSIZE=@MEMORY@
3156 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3157 export MKFIRMWARE=@TOOL@
3158 export BMP2RB_MONO=@BMP2RB_MONO@
3159 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3160 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3161 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3162 export BINARY=@OUTPUT@
3163 export APPEXTRA=@APPEXTRA@
3164 export ENABLEDPLUGINS=@PLUGINS@
3165 export SOFTWARECODECS=@CODECS@
3166 export EXTRA_DEFINES=@EXTRADEF@
3167 export HOSTCC=@HOSTCC@
3168 export HOSTAR=@HOSTAR@
3169 export CC=@CC@
3170 export LD=@LD@
3171 export AR=@AR@
3172 export AS=@AS@
3173 export OC=@OC@
3174 export WINDRES=@WINDRES@
3175 export DLLTOOL=@DLLTOOL@
3176 export DLLWRAP=@DLLWRAP@
3177 export RANLIB=@RANLIB@
3178 export PREFIX=@PREFIX@
3179 export PROFILE_OPTS=@PROFILE_OPTS@
3180 export SIMVER=@SIMVER@
3181 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3182 export GCCOPTS=@GCCOPTS@
3183 export TARGET_INC=@TARGET_INC@
3184 export LOADADDRESS=@LOADADDRESS@
3185 export SHARED_FLAG=@SHARED_FLAG@
3186 export LDOPTS=@LDOPTS@
3187 export GCCVER=@GCCVER@
3188 export GCCNUM=@GCCNUM@
3189 export UNAME=@UNAME@
3190 export MANUALDEV=@MANUALDEV@
3191 export TTS_OPTS=@TTS_OPTS@
3192 export TTS_ENGINE=@TTS_ENGINE@
3193 export ENC_OPTS=@ENC_OPTS@
3194 export ENCODER=@ENCODER@
3195 export USE_ELF=@USE_ELF@
3196 export RBDIR=@RBDIR@
3197 export SDLCONFIG=@SDLCONFIG@
3199 CONFIGURE_OPTIONS=@CMDLINE@
3201 include \$(TOOLSDIR)/root.make
3205 echo "Created Makefile"