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