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