Alright, revert r21229 for now. Stupid me forgetting about the inclusion sequence :(
[kugel-rb.git] / tools / configure
blobf081b8ba7264f27d97fdafdfde2c89019dbfbea5
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"
14 use_logf="#undef ROCKBOX_HAS_LOGF"
16 scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
18 rbdir=".rockbox"
21 # Begin Function Definitions
23 input() {
24 read response
25 echo $response
28 prefixtools () {
29 prefix="$1"
30 CC=${prefix}gcc
31 WINDRES=${prefix}windres
32 DLLTOOL=${prefix}dlltool
33 DLLWRAP=${prefix}dllwrap
34 RANLIB=${prefix}ranlib
35 LD=${prefix}ld
36 AR=${prefix}ar
37 AS=${prefix}as
38 OC=${prefix}objcopy
41 crosswincc () {
42 # naive approach to selecting a mingw cross-compiler on linux/*nix
43 echo "Enabling win32 crosscompiling"
45 prefixtools i586-mingw32msvc-
47 # add cross-compiler option(s)
48 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
49 LDOPTS="`sdl-config --libs` -mconsole"
51 output="rockboxui.exe" # use this as output binary name
52 crosscompile="yes"
53 endian="little" # windows is little endian
56 # scan the $PATH for the given command
57 findtool(){
58 file="$1"
60 IFS=":"
61 for path in $PATH
63 # echo "checks for $file in $path" >&2
64 if test -f "$path/$file"; then
65 echo "$path/$file"
66 return
68 done
69 # check whether caller wants literal return value if not found
70 if [ "$2" = "--lit" ]; then
71 echo "$file"
75 # parse the argument list, returns the value after the = in case of a
76 # option=value type option, returns 0 in case of --ccache or --no-ccache,
77 # returns 1 if the searched argument type wasn't fount in the argument list
78 # Usage [var = ]`parse_args <argumenttype>`, e.g. `parse_args --target`
80 # var definitons below are needed so that parse_args can see the arguments
81 arg1=$1 arg2=$2 arg3=$3 arg4=$4 arg5=$5 arg6=$6 arg7=$7 arg8=$8 arg9=$9
83 parse_args() {
84 ret="1"
85 for i in $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7 $arg8 $arg9
87 if [ "$1" = "--ccache" ]; then
88 if [ "$i" = "--ccache" ]; then
89 ret="0"
91 elif [ "$1" = "--no-ccache" ]; then
92 if [ "$i" = "--no-ccache" ]; then
93 ret="0"
95 elif [ "$1" = `echo $i|cut -d'=' -f1` ]; then
96 ret=`echo $i|cut -d'=' -f2`
98 done
99 echo "$ret"
102 simcc () {
104 # default tool setup for native building
105 prefixtools ""
107 simver=sdl
108 GCCOPTS='-W -Wall -g -fno-builtin'
110 output="rockboxui" # use this as default output binary name
112 # generic sdl-config checker
113 sdl=`findtool sdl-config`
115 if [ -z "$sdl" ]; then
116 echo "configure didn't find sdl-config, which indicates that you"
117 echo "don't have SDL (properly) installed. Please correct and"
118 echo "re-run configure!"
119 exit 1
122 # default share option, override below if needed
123 SHARED_FLAG="-shared"
125 case $uname in
126 CYGWIN*)
127 echo "Cygwin host detected"
129 # sdl version
130 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
131 LDOPTS="`sdl-config --libs` -mconsole"
133 output="rockboxui.exe" # use this as output binary name
136 MINGW*)
137 echo "MinGW host detected"
139 # sdl version
140 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
141 LDOPTS="`sdl-config --libs` -mconsole"
143 output="rockboxui.exe" # use this as output binary name
146 Linux)
147 echo "Linux host detected"
148 if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then
149 # Enable crosscompiling if sdl-config is from Windows SDL
150 crosswincc
151 else
152 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
153 LDOPTS="`sdl-config --libs`"
157 FreeBSD)
158 echo "FreeBSD host detected"
159 # sdl version
160 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
161 LDOPTS="`sdl-config --libs`"
164 Darwin)
165 echo "Darwin host detected"
166 # sdl version
167 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
168 LDOPTS="`sdl-config --libs`"
169 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
173 echo "Unsupported system: $uname, fix configure and retry"
174 exit 2
176 esac
178 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
180 if test "X$crosscompile" != "Xyes"; then
181 if [ "`uname -m`" = "x86_64" ] || [ "`uname -m`" = "amd64" ]; then
182 # fPIC is needed to make shared objects link
183 # setting visibility to hidden is necessary to avoid strange crashes
184 # due to symbol clashing
185 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
188 id=$$
189 cat >/tmp/conftest-$id.c <<EOF
190 #include <stdio.h>
191 int main(int argc, char **argv)
193 int var=0;
194 char *varp = (char *)&var;
195 *varp=1;
197 printf("%d\n", var);
198 return 0;
202 $CC -o /tmp/conftest-$id /tmp/conftest-$id.c 2>/dev/null
204 if test `/tmp/conftest-$id 2>/dev/null` -gt "1"; then
205 # big endian
206 endian="big"
207 else
208 # little endian
209 endian="little"
211 echo "Simulator environment deemed $endian endian"
213 # use wildcard here to make it work even if it was named *.exe like
214 # on cygwin
215 rm -f /tmp/conftest-$id*
220 # functions for setting up cross-compiler names and options
221 # also set endianess and what the exact recommended gcc version is
222 # the gcc version should most likely match what versions we build with
223 # rockboxdev.sh
225 shcc () {
226 prefixtools sh-elf-
227 GCCOPTS="$CCOPTS -m1"
228 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
229 endian="big"
230 gccchoice="4.0.3"
233 calmrisccc () {
234 prefixtools calmrisc16-unknown-elf-
235 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
236 GCCOPTIMIZE="-fomit-frame-pointer"
237 endian="big"
240 coldfirecc () {
241 prefixtools m68k-elf-
242 GCCOPTS="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
243 GCCOPTIMIZE="-fomit-frame-pointer"
244 endian="big"
245 gccchoice="3.4.6"
248 arm7tdmicc () {
249 prefixtools arm-elf-
250 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
251 if test "X$1" != "Xshort"; then
252 GCCOPTS="$GCCOPTS -mlong-calls"
254 GCCOPTIMIZE="-fomit-frame-pointer"
255 endian="little"
256 gccchoice="4.0.3"
259 arm9tdmicc () {
260 prefixtools arm-elf-
261 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
262 if test "$modelname" != "gigabeatf" -a "$t_manufacturer" != "as3525"; then
263 GCCOPTS="$GCCOPTS -mlong-calls"
265 GCCOPTIMIZE="-fomit-frame-pointer"
266 endian="little"
267 gccchoice="4.0.3"
270 arm940tbecc () {
271 prefixtools arm-elf-
272 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t -mlong-calls"
273 GCCOPTIMIZE="-fomit-frame-pointer"
274 endian="big"
275 gccchoice="4.0.3"
278 arm946cc () {
279 prefixtools arm-elf-
280 GCCOPTS="$CCOPTS -mcpu=arm9e -mlong-calls"
281 GCCOPTIMIZE="-fomit-frame-pointer"
282 endian="little"
283 gccchoice="4.0.3"
286 arm926ejscc () {
287 prefixtools arm-elf-
288 GCCOPTS="$CCOPTS -mcpu=arm926ej-s -mlong-calls"
289 GCCOPTIMIZE="-fomit-frame-pointer"
290 endian="little"
291 gccchoice="4.0.3"
294 arm1136jfscc () {
295 prefixtools arm-elf-
296 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
297 if test "$modelname" != "gigabeats"; then
298 GCCOPTS="$GCCOPTS -mlong-calls"
300 GCCOPTIMIZE="-fomit-frame-pointer"
301 endian="little"
302 gccchoice="4.0.3"
305 mipselcc () {
306 prefixtools mipsel-elf-
307 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls"
308 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
309 GCCOPTIMIZE="-fomit-frame-pointer"
310 endian="little"
311 gccchoice="4.1.2"
314 whichadvanced () {
315 ##################################################################
316 # Prompt for specific developer options
318 echo ""
319 echo "Enter your developer options (press enter when done)"
320 printf "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice"
321 if [ "$memory" = "2" ]; then
322 printf ", (8)MB MOD"
324 if [ "$modelname" = "h120" ]; then
325 printf ", (R)TC MOD"
327 if [ "$t_model" = "ondio" ]; then
328 printf ", (B)acklight MOD"
330 echo ""
332 cont=1
334 while [ $cont = "1" ]; do
336 option=`input`;
338 case $option in
339 [Dd])
340 if [ "yes" = "$profile" ]; then
341 echo "Debug is incompatible with profiling"
342 else
343 echo "define DEBUG"
344 use_debug="yes"
347 [Ll])
348 echo "logf() support enabled"
349 logf="yes"
351 [Ss])
352 echo "Simulator build enabled"
353 simulator="yes"
355 [Pp])
356 if [ "yes" = "$use_debug" ]; then
357 echo "Profiling is incompatible with debug"
358 else
359 echo "Profiling support is enabled"
360 profile="yes"
363 [Vv])
364 echo "Voice build selected"
365 voice="yes"
368 if [ "$memory" = "2" ]; then
369 memory="8"
370 echo "Memory size selected: 8MB"
371 else
372 cont=0
375 [Rr])
376 if [ "$modelname" = "h120" ]; then
377 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
378 have_rtc_alarm="#define HAVE_RTC_ALARM"
379 echo "RTC functions enabled (DS1339/DS3231)"
380 else
381 cont=0
384 [Bb])
385 if [ "$t_model" = "ondio" ]; then
386 have_backlight="#define HAVE_BACKLIGHT"
387 echo "Backlight functions enabled"
388 else
389 cont=0
393 cont=0
395 esac
396 done
397 echo "done"
399 if [ "yes" = "$voice" ]; then
400 # Ask about languages to build
401 echo "Select a number for the language to use (default is english)"
402 # The multiple-language feature is currently broken
403 # echo "You may enter a comma-separated list of languages to build"
405 picklang
406 voicelanguage=`whichlang`
408 if [ -z "$voicelanguage" ]; then
409 # pick a default
410 voicelanguage="english"
412 echo "Voice language set to $voicelanguage"
414 # Configure encoder and TTS engine for each language
415 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
416 voiceconfig "$thislang"
417 done
419 if [ "yes" = "$use_debug" ]; then
420 debug="-DDEBUG"
421 GCCOPTS="$GCCOPTS -g -DDEBUG"
423 if [ "yes" = "$logf" ]; then
424 use_logf="#define ROCKBOX_HAS_LOGF 1"
426 if [ "yes" = "$simulator" ]; then
427 debug="-DDEBUG"
428 extradefines="$extradefines -DSIMULATOR"
429 archosrom=""
430 flash=""
432 if [ "yes" = "$profile" ]; then
433 extradefines="$extradefines -DRB_PROFILE"
434 PROFILE_OPTS="-finstrument-functions"
438 # Configure voice settings
439 voiceconfig () {
440 thislang=$1
441 echo "Building $thislang voice for $modelname. Select options"
442 echo ""
444 if [ -n "`findtool flite`" ]; then
445 FLITE="F(l)ite "
446 FLITE_OPTS=""
447 DEFAULT_TTS="flite"
448 DEFAULT_TTS_OPTS=$FLITE_OPTS
449 DEFAULT_NOISEFLOOR="500"
450 DEFAULT_CHOICE="L"
452 if [ -n "`findtool espeak`" ]; then
453 ESPEAK="(e)Speak "
454 ESPEAK_OPTS=""
455 DEFAULT_TTS="espeak"
456 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
457 DEFAULT_NOISEFLOOR="500"
458 DEFAULT_CHOICE="e"
460 if [ -n "`findtool festival`" ]; then
461 FESTIVAL="(F)estival "
462 case "$thislang" in
463 "italiano")
464 FESTIVAL_OPTS="--language italian"
466 "espanol")
467 FESTIVAL_OPTS="--language spanish"
469 "finnish")
470 FESTIVAL_OPTS="--language finnish"
472 "czech")
473 FESTIVAL_OPTS="--language czech"
476 FESTIVAL_OPTS=""
478 esac
479 DEFAULT_TTS="festival"
480 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
481 DEFAULT_NOISEFLOOR="500"
482 DEFAULT_CHOICE="F"
484 if [ -n "`findtool swift`" ]; then
485 SWIFT="S(w)ift "
486 SWIFT_OPTS=""
487 DEFAULT_TTS="swift"
488 DEFAULT_TTS_OPTS=$SWIFT_OPTS
489 DEFAULT_NOISEFLOOR="500"
490 DEFAULT_CHOICE="w"
492 # Allow SAPI if Windows is in use
493 if [ -n "`findtool winver`" ]; then
494 SAPI="(S)API "
495 SAPI_OPTS=""
496 DEFAULT_TTS="sapi"
497 DEFAULT_TTS_OPTS=$SAPI_OPTS
498 DEFAULT_NOISEFLOOR="500"
499 DEFAULT_CHOICE="S"
502 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
503 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
504 exit 3
507 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
508 option=`input`
509 case "$option" in
510 [Ll])
511 TTS_ENGINE="flite"
512 NOISEFLOOR="500" # TODO: check this value
513 TTS_OPTS=$FLITE_OPTS
515 [Ee])
516 TTS_ENGINE="espeak"
517 NOISEFLOOR="500"
518 TTS_OPTS=$ESPEAK_OPTS
520 [Ff])
521 TTS_ENGINE="festival"
522 NOISEFLOOR="500"
523 TTS_OPTS=$FESTIVAL_OPTS
525 [Ss])
526 TTS_ENGINE="sapi"
527 NOISEFLOOR="500"
528 TTS_OPTS=$SAPI_OPTS
530 [Ww])
531 TTS_ENGINE="swift"
532 NOISEFLOOR="500"
533 TTS_OPTS=$SWIFT_OPTS
536 TTS_ENGINE=$DEFAULT_TTS
537 TTS_OPTS=$DEFAULT_TTS_OPTS
538 NOISEFLOOR=$DEFAULT_NOISEFLOOR
539 esac
540 echo "Using $TTS_ENGINE for TTS"
542 # Select which voice to use for Festival
543 if [ "$TTS_ENGINE" = "festival" ]; then
545 for voice in `echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`; do
546 if [ "$i" = "1" ]; then
547 TTS_FESTIVAL_VOICE="$voice" # Default choice
549 printf "%3d. %s\n" "$i" "$voice"
550 i=`expr $i + 1`
551 done
552 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
553 CHOICE=`input`
555 for voice in `echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`; do
556 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
557 TTS_FESTIVAL_VOICE="$voice"
559 i=`expr $i + 1`
560 done
561 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
562 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
565 # Allow the user to input manual commandline options
566 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
567 USER_TTS_OPTS=`input`
568 if [ -n "$USER_TTS_OPTS" ]; then
569 TTS_OPTS="$USER_TTS_OPTS"
572 echo ""
574 if [ "$swcodec" = "yes" ]; then
575 ENCODER="rbspeexenc"
576 ENC_CMD="rbspeexenc"
577 ENC_OPTS="-q 4 -c 10"
578 else
579 if [ -n "`findtool lame`" ]; then
580 ENCODER="lame"
581 ENC_CMD="lame"
582 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
583 else
584 echo "You need LAME in the system path to build voice files for"
585 echo "HWCODEC targets."
586 exit 4
590 echo "Using $ENCODER for encoding voice clips"
592 # Allow the user to input manual commandline options
593 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
594 USER_ENC_OPTS=`input`
595 if [ -n "$USER_ENC_OPTS" ]; then
596 ENC_OPTS=$USER_ENC_OPTS
599 TEMPDIR="${pwd}"
600 if [ -n "`findtool cygpath`" ]; then
601 TEMPDIR=`cygpath . -a -w`
605 picklang() {
606 # figure out which languages that are around
607 for file in $rootdir/apps/lang/*.lang; do
608 clean=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
609 langs="$langs $clean"
610 done
612 num=1
613 for one in $langs; do
614 echo "$num. $one"
615 num=`expr $num + 1`
616 done
618 read pick
621 whichlang() {
622 output=""
623 # Allow the user to pass a comma-separated list of langauges
624 for thispick in `echo $pick | sed 's/,/ /g'`; do
625 num=1
626 for one in $langs; do
627 # Accept both the language number and name
628 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
629 if [ "$output" = "" ]; then
630 output=$one
631 else
632 output=$output,$one
635 num=`expr $num + 1`
636 done
637 done
638 echo $output
641 opt=$1
643 if test "$opt" = "--help"; then
644 echo "Rockbox configure script."
645 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
646 echo "Do *NOT* run this within the tools directory!"
647 echo ""
648 cat <<EOF
649 Usage: configure [OPTION]...
650 Options:
651 --target=TARGET Sets the target, TARGET can be either the target ID or
652 corresponding string. Run without this option to see all
653 available targets.
655 --ram=RAM Sets the RAM for certain targets. Even though any number
656 is accepted, not every number is correct. The default
657 value will be applied, if you entered a wrong number
658 (which depends on the target). Watch the output. Run
659 without this option if you are not sure which the right
660 number is.
662 --type=TYPE Sets the build type. The shortcut is also valid.
663 Run without this option to see available types.
665 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
666 This is useful for having multiple alternate builds on
667 your device that you can load with ROLO. However as the
668 bootloader looks for .rockbox you won't be able to boot
669 into this build.
671 --ccache Enable ccache use (done by default these days)
672 --no-ccache Disable ccache use
673 --help Shows this message (must not be used with other options)
677 exit
680 if test -r "configure"; then
681 # this is a check for a configure script in the current directory, it there
682 # is one, try to figure out if it is this one!
684 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
685 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
686 echo "It will only cause you pain and grief. Instead do this:"
687 echo ""
688 echo " cd .."
689 echo " mkdir build-dir"
690 echo " cd build-dir"
691 echo " ../tools/configure"
692 echo ""
693 echo "Much happiness will arise from this. Enjoy"
694 exit 5
698 # get our current directory
699 pwd=`pwd`;
701 if { echo $pwd | grep " "; } then
702 echo "You're running this script in a path that contains space. The build"
703 echo "system is unfortunately not clever enough to deal with this. Please"
704 echo "run the script from a different path, rename the path or fix the build"
705 echo "system!"
706 exit 6
709 if [ -z "$rootdir" ]; then
710 ##################################################################
711 # Figure out where the source code root is!
713 rootdir=`dirname $0`/../
715 #####################################################################
716 # Convert the possibly relative directory name to an absolute version
718 now=`pwd`
719 cd $rootdir
720 rootdir=`pwd`
722 # cd back to the build dir
723 cd $now
726 apps="apps"
727 appsdir='\$(ROOTDIR)/apps'
728 firmdir='\$(ROOTDIR)/firmware'
729 toolsdir='\$(ROOTDIR)/tools'
732 ##################################################################
733 # Figure out target platform
736 if [ "1" != `parse_args --target` ]; then
737 buildfor=`parse_args --target`;
738 else
739 echo "Enter target platform:"
740 cat <<EOF
741 ==Archos== ==iriver== ==Apple iPod==
742 0) Player/Studio 10) H120/H140 20) Color/Photo
743 1) Recorder 11) H320/H340 21) Nano
744 2) FM Recorder 12) iHP-100/110/115 22) Video
745 3) Recorder v2 13) iFP-790 23) 3G
746 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
747 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
748 6) AV300 26) Mini 2G
749 ==Toshiba== 27) 1G, 2G
750 ==Cowon/iAudio== 40) Gigabeat F
751 30) X5/X5V/X5L 41) Gigabeat S ==SanDisk==
752 31) M5/M5L 50) Sansa e200
753 32) 7 ==Olympus= 51) Sansa e200R
754 33) D2 70) M:Robe 500 52) Sansa c200
755 34) M3/M3L 71) M:Robe 100 53) Sansa m200
756 54) Sansa c100
757 ==Creative== ==Philips== 55) Sansa Clip
758 90) Zen Vision:M 30GB 100) GoGear SA9200 56) Sansa e200v2
759 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 57) Sansa m200v4
760 92) Zen Vision HDD1830 58) Sansa Fuze
761 59) Sansa c200v2
762 ==Onda== ==Meizu== 60) Sansa Clipv2
763 120) VX747 110) M6SL
764 121) VX767 111) M6SP ==Logik==
765 122) VX747+ 112) M3 80) DAX 1GB MP3/DAB
767 ==Samsung== ==Tatung== ==Lyre project==
768 140) YH-820 150) Elio TPJ-1022 130) Lyre proto 1
769 141) YH-920
770 142) YH-925
773 buildfor=`input`;
776 # Set of tools built for all target platforms:
777 toolset="rdf2binary convbdf codepages"
779 # Toolsets for some target families:
780 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
781 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
782 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
783 ipodbitmaptools="$toolset scramble bmp2rb"
784 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
785 tccbitmaptools="$toolset scramble mktccboot bmp2rb"
786 # generic is used by IFP, Meizu and Onda
787 genericbitmaptools="$toolset bmp2rb"
788 # scramble is used by all other targets
789 scramblebitmaptools="$genericbitmaptools scramble"
792 # ---- For each target ----
794 # *Variables*
795 # target_id: a unique number identifying this target, IS NOT the menu number.
796 # Just use the currently highest number+1 when you add a new
797 # target.
798 # modelname: short model name used all over to identify this target
799 # memory: number of megabytes of RAM this target has. If the amount can
800 # be selected by the size prompt, let memory be unset here
801 # target: -Ddefine passed to the build commands to make the correct
802 # config-*.h file get included etc
803 # tool: the tool that takes a plain binary and converts that into a
804 # working "firmware" file for your target
805 # output: the final output file name
806 # boottool: the tool that takes a plain binary and generates a bootloader
807 # file for your target (or blank to use $tool)
808 # bootoutput:the final output file name for the bootloader (or blank to use
809 # $output)
810 # appextra: passed to the APPEXTRA variable in the Makefiles.
811 # TODO: add proper explanation
812 # archosrom: used only for Archos targets that build a special flashable .ucl
813 # image.
814 # flash: name of output for flashing, for targets where there's a special
815 # file output for this.
816 # plugins: set to 'yes' to build the plugins. Early development builds can
817 # set this to no in the early stages to have an easier life for a
818 # while
819 # swcodec: set 'yes' on swcodec targets
820 # toolset: lists what particular tools in the tools/ directory that this
821 # target needs to have built prior to building Rockbox
823 # *Functions*
824 # *cc: sets up gcc and compiler options for your target builds. Note
825 # that if you select a simulator build, the compiler selection is
826 # overridden later in the script.
828 case $buildfor in
830 0|player)
831 target_id=1
832 modelname="player"
833 target="-DARCHOS_PLAYER"
834 shcc
835 tool="$rootdir/tools/scramble"
836 output="archos.mod"
837 appextra="player:gui"
838 archosrom="$pwd/rombox.ucl"
839 flash="$pwd/rockbox.ucl"
840 plugins="yes"
841 swcodec=""
843 # toolset is the tools within the tools directory that we build for
844 # this particular target.
845 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
847 # Note: the convbdf is present in the toolset just because: 1) the
848 # firmware/Makefile assumes it is present always, and 2) we will need it when we
849 # build the player simulator
851 t_cpu="sh"
852 t_manufacturer="archos"
853 t_model="player"
856 1|recorder)
857 target_id=2
858 modelname="recorder"
859 target="-DARCHOS_RECORDER"
860 shcc
861 tool="$rootdir/tools/scramble"
862 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
863 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
864 output="ajbrec.ajz"
865 appextra="recorder:gui"
866 #archosrom="$pwd/rombox.ucl"
867 flash="$pwd/rockbox.ucl"
868 plugins="yes"
869 swcodec=""
870 # toolset is the tools within the tools directory that we build for
871 # this particular target.
872 toolset=$archosbitmaptools
873 t_cpu="sh"
874 t_manufacturer="archos"
875 t_model="recorder"
878 2|fmrecorder)
879 target_id=3
880 modelname="fmrecorder"
881 target="-DARCHOS_FMRECORDER"
882 shcc
883 tool="$rootdir/tools/scramble -fm"
884 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
885 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
886 output="ajbrec.ajz"
887 appextra="recorder:gui"
888 #archosrom="$pwd/rombox.ucl"
889 flash="$pwd/rockbox.ucl"
890 plugins="yes"
891 swcodec=""
892 # toolset is the tools within the tools directory that we build for
893 # this particular target.
894 toolset=$archosbitmaptools
895 t_cpu="sh"
896 t_manufacturer="archos"
897 t_model="fm_v2"
900 3|recorderv2)
901 target_id=4
902 modelname="recorderv2"
903 target="-DARCHOS_RECORDERV2"
904 shcc
905 tool="$rootdir/tools/scramble -v2"
906 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
907 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
908 output="ajbrec.ajz"
909 appextra="recorder:gui"
910 #archosrom="$pwd/rombox.ucl"
911 flash="$pwd/rockbox.ucl"
912 plugins="yes"
913 swcodec=""
914 # toolset is the tools within the tools directory that we build for
915 # this particular target.
916 toolset=$archosbitmaptools
917 t_cpu="sh"
918 t_manufacturer="archos"
919 t_model="fm_v2"
922 4|ondiosp)
923 target_id=7
924 modelname="ondiosp"
925 target="-DARCHOS_ONDIOSP"
926 shcc
927 tool="$rootdir/tools/scramble -osp"
928 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
929 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
930 output="ajbrec.ajz"
931 appextra="recorder:gui"
932 archosrom="$pwd/rombox.ucl"
933 flash="$pwd/rockbox.ucl"
934 plugins="yes"
935 swcodec=""
936 # toolset is the tools within the tools directory that we build for
937 # this particular target.
938 toolset=$archosbitmaptools
939 t_cpu="sh"
940 t_manufacturer="archos"
941 t_model="ondio"
944 5|ondiofm)
945 target_id=8
946 modelname="ondiofm"
947 target="-DARCHOS_ONDIOFM"
948 shcc
949 tool="$rootdir/tools/scramble -ofm"
950 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
951 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
952 output="ajbrec.ajz"
953 appextra="recorder:gui"
954 #archosrom="$pwd/rombox.ucl"
955 flash="$pwd/rockbox.ucl"
956 plugins="yes"
957 swcodec=""
958 toolset=$archosbitmaptools
959 t_cpu="sh"
960 t_manufacturer="archos"
961 t_model="ondio"
964 6|av300)
965 target_id=38
966 modelname="av300"
967 target="-DARCHOS_AV300"
968 memory=16 # always
969 arm7tdmicc
970 tool="$rootdir/tools/scramble -mm=C"
971 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
972 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
973 output="cjbm.ajz"
974 appextra="recorder:gui"
975 plugins="yes"
976 swcodec=""
977 # toolset is the tools within the tools directory that we build for
978 # this particular target.
979 toolset="$toolset scramble descramble bmp2rb"
980 # architecture, manufacturer and model for the target-tree build
981 t_cpu="arm"
982 t_manufacturer="archos"
983 t_model="av300"
986 10|h120)
987 target_id=9
988 modelname="h120"
989 target="-DIRIVER_H120"
990 memory=32 # always
991 coldfirecc
992 tool="$rootdir/tools/scramble -add=h120"
993 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
994 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
995 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
996 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
997 output="rockbox.iriver"
998 appextra="recorder:gui"
999 flash="$pwd/rombox.iriver"
1000 plugins="yes"
1001 swcodec="yes"
1002 # toolset is the tools within the tools directory that we build for
1003 # this particular target.
1004 toolset=$iriverbitmaptools
1005 t_cpu="coldfire"
1006 t_manufacturer="iriver"
1007 t_model="h100"
1010 11|h300)
1011 target_id=10
1012 modelname="h300"
1013 target="-DIRIVER_H300"
1014 memory=32 # always
1015 coldfirecc
1016 tool="$rootdir/tools/scramble -add=h300"
1017 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1018 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1019 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1020 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1021 output="rockbox.iriver"
1022 appextra="recorder:gui"
1023 plugins="yes"
1024 swcodec="yes"
1025 # toolset is the tools within the tools directory that we build for
1026 # this particular target.
1027 toolset=$iriverbitmaptools
1028 t_cpu="coldfire"
1029 t_manufacturer="iriver"
1030 t_model="h300"
1033 12|h100)
1034 target_id=11
1035 modelname="h100"
1036 target="-DIRIVER_H100"
1037 memory=16 # always
1038 coldfirecc
1039 tool="$rootdir/tools/scramble -add=h100"
1040 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1041 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1042 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1043 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1044 output="rockbox.iriver"
1045 appextra="recorder:gui"
1046 flash="$pwd/rombox.iriver"
1047 plugins="yes"
1048 swcodec="yes"
1049 # toolset is the tools within the tools directory that we build for
1050 # this particular target.
1051 toolset=$iriverbitmaptools
1052 t_cpu="coldfire"
1053 t_manufacturer="iriver"
1054 t_model="h100"
1057 13|ifp7xx)
1058 target_id=19
1059 modelname="ifp7xx"
1060 target="-DIRIVER_IFP7XX"
1061 memory=1
1062 arm7tdmicc short
1063 tool="cp"
1064 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1065 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1066 output="rockbox.wma"
1067 appextra="recorder:gui"
1068 plugins="yes"
1069 swcodec="yes"
1070 # toolset is the tools within the tools directory that we build for
1071 # this particular target.
1072 toolset=$genericbitmaptools
1073 t_cpu="arm"
1074 t_manufacturer="pnx0101"
1075 t_model="iriver-ifp7xx"
1078 14|h10)
1079 target_id=22
1080 modelname="h10"
1081 target="-DIRIVER_H10"
1082 memory=32 # always
1083 arm7tdmicc
1084 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1085 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1086 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1087 output="rockbox.mi4"
1088 appextra="recorder:gui"
1089 plugins="yes"
1090 swcodec="yes"
1091 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1092 bootoutput="H10_20GC.mi4"
1093 # toolset is the tools within the tools directory that we build for
1094 # this particular target.
1095 toolset=$scramblebitmaptools
1096 # architecture, manufacturer and model for the target-tree build
1097 t_cpu="arm"
1098 t_manufacturer="iriver"
1099 t_model="h10"
1102 15|h10_5gb)
1103 target_id=24
1104 modelname="h10_5gb"
1105 target="-DIRIVER_H10_5GB"
1106 memory=32 # always
1107 arm7tdmicc
1108 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1109 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1110 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1111 output="rockbox.mi4"
1112 appextra="recorder:gui"
1113 plugins="yes"
1114 swcodec="yes"
1115 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1116 bootoutput="H10.mi4"
1117 # toolset is the tools within the tools directory that we build for
1118 # this particular target.
1119 toolset=$scramblebitmaptools
1120 # architecture, manufacturer and model for the target-tree build
1121 t_cpu="arm"
1122 t_manufacturer="iriver"
1123 t_model="h10"
1126 20|ipodcolor)
1127 target_id=13
1128 modelname="ipodcolor"
1129 target="-DIPOD_COLOR"
1130 memory=32 # always
1131 arm7tdmicc
1132 tool="$rootdir/tools/scramble -add=ipco"
1133 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1134 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1135 output="rockbox.ipod"
1136 appextra="recorder:gui"
1137 plugins="yes"
1138 swcodec="yes"
1139 bootoutput="bootloader-$modelname.ipod"
1140 # toolset is the tools within the tools directory that we build for
1141 # this particular target.
1142 toolset=$ipodbitmaptools
1143 # architecture, manufacturer and model for the target-tree build
1144 t_cpu="arm"
1145 t_manufacturer="ipod"
1146 t_model="color"
1149 21|ipodnano)
1150 target_id=14
1151 modelname="ipodnano"
1152 target="-DIPOD_NANO"
1153 memory=32 # always
1154 arm7tdmicc
1155 tool="$rootdir/tools/scramble -add=nano"
1156 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1157 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1158 output="rockbox.ipod"
1159 appextra="recorder:gui"
1160 plugins="yes"
1161 swcodec="yes"
1162 bootoutput="bootloader-$modelname.ipod"
1163 # toolset is the tools within the tools directory that we build for
1164 # this particular target.
1165 toolset=$ipodbitmaptools
1166 # architecture, manufacturer and model for the target-tree build
1167 t_cpu="arm"
1168 t_manufacturer="ipod"
1169 t_model="nano"
1172 22|ipodvideo)
1173 target_id=15
1174 modelname="ipodvideo"
1175 target="-DIPOD_VIDEO"
1176 arm7tdmicc
1177 tool="$rootdir/tools/scramble -add=ipvd"
1178 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1179 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1180 output="rockbox.ipod"
1181 appextra="recorder:gui"
1182 plugins="yes"
1183 swcodec="yes"
1184 bootoutput="bootloader-$modelname.ipod"
1185 # toolset is the tools within the tools directory that we build for
1186 # this particular target.
1187 toolset=$ipodbitmaptools
1188 # architecture, manufacturer and model for the target-tree build
1189 t_cpu="arm"
1190 t_manufacturer="ipod"
1191 t_model="video"
1194 23|ipod3g)
1195 target_id=16
1196 modelname="ipod3g"
1197 target="-DIPOD_3G"
1198 memory=32 # always
1199 arm7tdmicc
1200 tool="$rootdir/tools/scramble -add=ip3g"
1201 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1202 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1203 output="rockbox.ipod"
1204 appextra="recorder:gui"
1205 plugins="yes"
1206 swcodec="yes"
1207 bootoutput="bootloader-$modelname.ipod"
1208 # toolset is the tools within the tools directory that we build for
1209 # this particular target.
1210 toolset=$ipodbitmaptools
1211 # architecture, manufacturer and model for the target-tree build
1212 t_cpu="arm"
1213 t_manufacturer="ipod"
1214 t_model="3g"
1217 24|ipod4g)
1218 target_id=17
1219 modelname="ipod4g"
1220 target="-DIPOD_4G"
1221 memory=32 # always
1222 arm7tdmicc
1223 tool="$rootdir/tools/scramble -add=ip4g"
1224 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1225 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1226 output="rockbox.ipod"
1227 appextra="recorder:gui"
1228 plugins="yes"
1229 swcodec="yes"
1230 bootoutput="bootloader-$modelname.ipod"
1231 # toolset is the tools within the tools directory that we build for
1232 # this particular target.
1233 toolset=$ipodbitmaptools
1234 # architecture, manufacturer and model for the target-tree build
1235 t_cpu="arm"
1236 t_manufacturer="ipod"
1237 t_model="4g"
1240 25|ipodmini)
1241 target_id=18
1242 modelname="ipodmini"
1243 target="-DIPOD_MINI"
1244 memory=32 # always
1245 arm7tdmicc
1246 tool="$rootdir/tools/scramble -add=mini"
1247 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1248 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1249 output="rockbox.ipod"
1250 appextra="recorder:gui"
1251 plugins="yes"
1252 swcodec="yes"
1253 bootoutput="bootloader-$modelname.ipod"
1254 # toolset is the tools within the tools directory that we build for
1255 # this particular target.
1256 toolset=$ipodbitmaptools
1257 # architecture, manufacturer and model for the target-tree build
1258 t_cpu="arm"
1259 t_manufacturer="ipod"
1260 t_model="mini"
1263 26|ipodmini2g)
1264 target_id=21
1265 modelname="ipodmini2g"
1266 target="-DIPOD_MINI2G"
1267 memory=32 # always
1268 arm7tdmicc
1269 tool="$rootdir/tools/scramble -add=mn2g"
1270 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1271 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1272 output="rockbox.ipod"
1273 appextra="recorder:gui"
1274 plugins="yes"
1275 swcodec="yes"
1276 bootoutput="bootloader-$modelname.ipod"
1277 # toolset is the tools within the tools directory that we build for
1278 # this particular target.
1279 toolset=$ipodbitmaptools
1280 # architecture, manufacturer and model for the target-tree build
1281 t_cpu="arm"
1282 t_manufacturer="ipod"
1283 t_model="mini2g"
1286 27|ipod1g2g)
1287 target_id=29
1288 modelname="ipod1g2g"
1289 target="-DIPOD_1G2G"
1290 memory=32 # always
1291 arm7tdmicc
1292 tool="$rootdir/tools/scramble -add=1g2g"
1293 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1294 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1295 output="rockbox.ipod"
1296 appextra="recorder:gui"
1297 plugins="yes"
1298 swcodec="yes"
1299 bootoutput="bootloader-$modelname.ipod"
1300 # toolset is the tools within the tools directory that we build for
1301 # this particular target.
1302 toolset=$ipodbitmaptools
1303 # architecture, manufacturer and model for the target-tree build
1304 t_cpu="arm"
1305 t_manufacturer="ipod"
1306 t_model="1g2g"
1309 30|x5)
1310 target_id=12
1311 modelname="x5"
1312 target="-DIAUDIO_X5"
1313 memory=16 # always
1314 coldfirecc
1315 tool="$rootdir/tools/scramble -add=iax5"
1316 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1317 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1318 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1319 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1320 output="rockbox.iaudio"
1321 appextra="recorder:gui"
1322 plugins="yes"
1323 swcodec="yes"
1324 # toolset is the tools within the tools directory that we build for
1325 # this particular target.
1326 toolset="$iaudiobitmaptools"
1327 # architecture, manufacturer and model for the target-tree build
1328 t_cpu="coldfire"
1329 t_manufacturer="iaudio"
1330 t_model="x5"
1333 31|m5)
1334 target_id=28
1335 modelname="m5"
1336 target="-DIAUDIO_M5"
1337 memory=16 # always
1338 coldfirecc
1339 tool="$rootdir/tools/scramble -add=iam5"
1340 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1341 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1342 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1343 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1344 output="rockbox.iaudio"
1345 appextra="recorder:gui"
1346 plugins="yes"
1347 swcodec="yes"
1348 # toolset is the tools within the tools directory that we build for
1349 # this particular target.
1350 toolset="$iaudiobitmaptools"
1351 # architecture, manufacturer and model for the target-tree build
1352 t_cpu="coldfire"
1353 t_manufacturer="iaudio"
1354 t_model="m5"
1357 32|iaudio7)
1358 target_id=32
1359 modelname="iaudio7"
1360 target="-DIAUDIO_7"
1361 memory=16 # always
1362 arm946cc
1363 tool="$rootdir/tools/scramble -add=i7"
1364 boottool="$rootdir/tools/scramble -tcc=crc"
1365 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1366 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1367 output="rockbox.iaudio"
1368 appextra="recorder:gui"
1369 plugins="yes"
1370 swcodec="yes"
1371 bootoutput="I7_FW.BIN"
1372 # toolset is the tools within the tools directory that we build for
1373 # this particular target.
1374 toolset="$tccbitmaptools"
1375 # architecture, manufacturer and model for the target-tree build
1376 t_cpu="arm"
1377 t_manufacturer="tcc77x"
1378 t_model="iaudio7"
1381 33|cowond2)
1382 target_id=34
1383 modelname="cowond2"
1384 target="-DCOWON_D2"
1385 memory=32
1386 arm926ejscc
1387 tool="$rootdir/tools/scramble -add=d2"
1388 boottool="$rootdir/tools/scramble -tcc=crc"
1389 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1390 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1391 output="rockbox.d2"
1392 appextra="recorder:gui"
1393 plugins="yes"
1394 swcodec="yes"
1395 toolset="$tccbitmaptools"
1396 # architecture, manufacturer and model for the target-tree build
1397 t_cpu="arm"
1398 t_manufacturer="tcc780x"
1399 t_model="cowond2"
1402 34|m3)
1403 target_id=37
1404 modelname="m3"
1405 target="-DIAUDIO_M3"
1406 memory=16 # always
1407 coldfirecc
1408 tool="$rootdir/tools/scramble -add=iam3"
1409 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1410 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1411 output="rockbox.iaudio"
1412 appextra="recorder:gui"
1413 plugins="yes"
1414 swcodec="yes"
1415 # toolset is the tools within the tools directory that we build for
1416 # this particular target.
1417 toolset="$iaudiobitmaptools"
1418 # architecture, manufacturer and model for the target-tree build
1419 t_cpu="coldfire"
1420 t_manufacturer="iaudio"
1421 t_model="m3"
1424 40|gigabeatf)
1425 target_id=20
1426 modelname="gigabeatf"
1427 target="-DGIGABEAT_F"
1428 memory=32 # always
1429 arm9tdmicc
1430 tool="$rootdir/tools/scramble -add=giga"
1431 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1432 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1433 output="rockbox.gigabeat"
1434 appextra="recorder:gui"
1435 plugins="yes"
1436 swcodec="yes"
1437 toolset=$gigabeatbitmaptools
1438 boottool="$rootdir/tools/scramble -gigabeat"
1439 bootoutput="FWIMG01.DAT"
1440 # architecture, manufacturer and model for the target-tree build
1441 t_cpu="arm"
1442 t_manufacturer="s3c2440"
1443 t_model="gigabeat-fx"
1446 41|gigabeats)
1447 target_id=26
1448 modelname="gigabeats"
1449 target="-DGIGABEAT_S"
1450 memory=64
1451 arm1136jfscc
1452 tool="$rootdir/tools/scramble -add=gigs"
1453 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1454 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1455 output="rockbox.gigabeat"
1456 appextra="recorder:gui"
1457 plugins="yes"
1458 swcodec="yes"
1459 toolset="$gigabeatbitmaptools mknkboot"
1460 boottool="$rootdir/tools/scramble -gigabeats"
1461 bootoutput="nk.bin"
1462 # architecture, manufacturer and model for the target-tree build
1463 t_cpu="arm"
1464 t_manufacturer="imx31"
1465 t_model="gigabeat-s"
1468 70|mrobe500)
1469 target_id=36
1470 modelname="mrobe500"
1471 target="-DMROBE_500"
1472 memory=64 # always
1473 arm926ejscc
1474 tool="$rootdir/tools/scramble -add=m500"
1475 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1476 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1477 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1478 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1479 output="rockbox.mrobe500"
1480 appextra="recorder:gui"
1481 plugins="yes"
1482 swcodec="yes"
1483 toolset=$gigabeatbitmaptools
1484 boottool="cp "
1485 bootoutput="rockbox.mrboot"
1486 # architecture, manufacturer and model for the target-tree build
1487 t_cpu="arm"
1488 t_manufacturer="tms320dm320"
1489 t_model="mrobe-500"
1492 71|mrobe100)
1493 target_id=33
1494 modelname="mrobe100"
1495 target="-DMROBE_100"
1496 memory=32 # always
1497 arm7tdmicc
1498 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1499 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1500 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1501 output="rockbox.mi4"
1502 appextra="recorder:gui"
1503 plugins="yes"
1504 swcodec="yes"
1505 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1506 bootoutput="pp5020.mi4"
1507 # toolset is the tools within the tools directory that we build for
1508 # this particular target.
1509 toolset=$scramblebitmaptools
1510 # architecture, manufacturer and model for the target-tree build
1511 t_cpu="arm"
1512 t_manufacturer="olympus"
1513 t_model="mrobe-100"
1516 80|logikdax)
1517 target_id=31
1518 modelname="logikdax"
1519 target="-DLOGIK_DAX"
1520 memory=2 # always
1521 arm946cc
1522 tool="$rootdir/tools/scramble -add=ldax"
1523 boottool="$rootdir/tools/scramble -tcc=crc"
1524 bootoutput="player.rom"
1525 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1526 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1527 output="rockbox.logik"
1528 appextra="recorder:gui"
1529 plugins=""
1530 swcodec="yes"
1531 # toolset is the tools within the tools directory that we build for
1532 # this particular target.
1533 toolset=$tccbitmaptools
1534 # architecture, manufacturer and model for the target-tree build
1535 t_cpu="arm"
1536 t_manufacturer="tcc77x"
1537 t_model="logikdax"
1540 90|creativezvm30gb)
1541 target_id=35
1542 modelname="creativezvm30"
1543 target="-DCREATIVE_ZVM"
1544 memory=64
1545 arm926ejscc
1546 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1547 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1548 tool="$rootdir/tools/scramble -creative=zvm"
1549 USE_ELF="yes"
1550 output="rockbox.zvm"
1551 appextra="recorder:gui"
1552 plugins="yes"
1553 swcodec="yes"
1554 toolset=$ipodbitmaptools
1555 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1556 bootoutput="rockbox.zvmboot"
1557 # architecture, manufacturer and model for the target-tree build
1558 t_cpu="arm"
1559 t_manufacturer="tms320dm320"
1560 t_model="creative-zvm"
1563 91|creativezvm60gb)
1564 target_id=40
1565 modelname="creativezvm60"
1566 target="-DCREATIVE_ZVM60GB"
1567 memory=64
1568 arm926ejscc
1569 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1570 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1571 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1572 USE_ELF="yes"
1573 output="rockbox.zvm60"
1574 appextra="recorder:gui"
1575 plugins="yes"
1576 swcodec="yes"
1577 toolset=$ipodbitmaptools
1578 boottool="$rootdir/tools/scramble -creative=zvm60"
1579 bootoutput="rockbox.zvm60boot"
1580 # architecture, manufacturer and model for the target-tree build
1581 t_cpu="arm"
1582 t_manufacturer="tms320dm320"
1583 t_model="creative-zvm"
1586 92|creativezenvision)
1587 target_id=39
1588 modelname="creativezv"
1589 target="-DCREATIVE_ZV"
1590 memory=64
1591 arm926ejscc
1592 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1593 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1594 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1595 USE_ELF="yes"
1596 output="rockbox.zv"
1597 appextra="recorder:gui"
1598 plugins=""
1599 swcodec="yes"
1600 toolset=$ipodbitmaptools
1601 boottool="$rootdir/tools/scramble -creative=zenvision"
1602 bootoutput="rockbox.zvboot"
1603 # architecture, manufacturer and model for the target-tree build
1604 t_cpu="arm"
1605 t_manufacturer="tms320dm320"
1606 t_model="creative-zvm"
1609 50|e200)
1610 target_id=23
1611 modelname="e200"
1612 target="-DSANSA_E200"
1613 memory=32 # supposedly
1614 arm7tdmicc
1615 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1616 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1617 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1618 output="rockbox.mi4"
1619 appextra="recorder:gui"
1620 plugins="yes"
1621 swcodec="yes"
1622 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1623 bootoutput="PP5022.mi4"
1624 # toolset is the tools within the tools directory that we build for
1625 # this particular target.
1626 toolset=$scramblebitmaptools
1627 # architecture, manufacturer and model for the target-tree build
1628 t_cpu="arm"
1629 t_manufacturer="sandisk"
1630 t_model="sansa-e200"
1633 51|e200r)
1634 # the e200R model is pretty much identical to the e200, it only has a
1635 # different option to the scramble tool when building a bootloader and
1636 # makes the bootloader output file name in all lower case.
1637 target_id=27
1638 modelname="e200r"
1639 target="-DSANSA_E200"
1640 memory=32 # supposedly
1641 arm7tdmicc
1642 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1643 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1644 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1645 output="rockbox.mi4"
1646 appextra="recorder:gui"
1647 plugins="yes"
1648 swcodec="yes"
1649 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1650 bootoutput="pp5022.mi4"
1651 # toolset is the tools within the tools directory that we build for
1652 # this particular target.
1653 toolset=$scramblebitmaptools
1654 # architecture, manufacturer and model for the target-tree build
1655 t_cpu="arm"
1656 t_manufacturer="sandisk"
1657 t_model="sansa-e200"
1660 52|c200)
1661 target_id=30
1662 modelname="c200"
1663 target="-DSANSA_C200"
1664 memory=32 # supposedly
1665 arm7tdmicc
1666 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1667 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1668 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1669 output="rockbox.mi4"
1670 appextra="recorder:gui"
1671 plugins="yes"
1672 swcodec="yes"
1673 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1674 bootoutput="firmware.mi4"
1675 # toolset is the tools within the tools directory that we build for
1676 # this particular target.
1677 toolset=$scramblebitmaptools
1678 # architecture, manufacturer and model for the target-tree build
1679 t_cpu="arm"
1680 t_manufacturer="sandisk"
1681 t_model="sansa-c200"
1684 53|m200)
1685 target_id=48
1686 modelname="m200"
1687 target="-DSANSA_M200"
1688 memory=1 # always
1689 arm946cc
1690 tool="$rootdir/tools/scramble -add=m200"
1691 boottool="$rootdir/tools/scramble -tcc=crc"
1692 bootoutput="player.rom"
1693 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1694 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1695 output="rockbox.m200"
1696 appextra="recorder:gui"
1697 plugins=""
1698 swcodec="yes"
1699 # toolset is the tools within the tools directory that we build for
1700 # this particular target.
1701 toolset=$tccbitmaptools
1702 # architecture, manufacturer and model for the target-tree build
1703 t_cpu="arm"
1704 t_manufacturer="tcc77x"
1705 t_model="m200"
1708 54|c100)
1709 target_id=42
1710 modelname="c100"
1711 target="-DSANSA_C100"
1712 memory=2
1713 arm946cc
1714 tool="$rootdir/tools/scramble -add=c100"
1715 boottool="$rootdir/tools/scramble -tcc=crc"
1716 bootoutput="player.rom"
1717 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1718 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1719 output="rockbox.c100"
1720 appextra="recorder:gui"
1721 plugins=""
1722 swcodec="yes"
1723 # toolset is the tools within the tools directory that we build for
1724 # this particular target.
1725 toolset=$tccbitmaptools
1726 # architecture, manufacturer and model for the target-tree build
1727 t_cpu="arm"
1728 t_manufacturer="tcc77x"
1729 t_model="c100"
1732 55|Clip|clip)
1733 target_id=50
1734 modelname="clip"
1735 target="-DSANSA_CLIP"
1736 memory=2
1737 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1738 bmp2rb_native="$bmp2rb_mono"
1739 tool="$rootdir/tools/scramble -add=clip"
1740 output="rockbox.sansa"
1741 bootoutput="bootloader-clip.sansa"
1742 appextra="recorder:gui"
1743 plugins="yes"
1744 swcodec="yes"
1745 toolset=$scramblebitmaptools
1746 t_cpu="arm"
1747 t_manufacturer="as3525"
1748 t_model="sansa-clip"
1749 arm9tdmicc
1753 56|e200v2)
1754 target_id=51
1755 modelname="e200v2"
1756 target="-DSANSA_E200V2"
1757 memory=8
1758 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1759 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1760 tool="$rootdir/tools/scramble -add=e2v2"
1761 output="rockbox.sansa"
1762 bootoutput="bootloader-e200v2.sansa"
1763 appextra="recorder:gui"
1764 plugins="yes"
1765 swcodec="yes"
1766 toolset=$scramblebitmaptools
1767 t_cpu="arm"
1768 t_manufacturer="as3525"
1769 t_model="sansa-e200v2"
1770 arm9tdmicc
1774 57|m200v4)
1775 target_id=52
1776 modelname="m200v4"
1777 target="-DSANSA_M200V4"
1778 memory=2
1779 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1780 bmp2rb_native="$bmp2rb_mono"
1781 tool="$rootdir/tools/scramble -add=m2v4"
1782 output="rockbox.sansa"
1783 bootoutput="bootloader-m200v4.sansa"
1784 appextra="recorder:gui"
1785 plugins="yes"
1786 swcodec="yes"
1787 toolset=$scramblebitmaptools
1788 t_cpu="arm"
1789 t_manufacturer="as3525"
1790 t_model="sansa-m200v4"
1791 arm9tdmicc
1795 58|fuze)
1796 target_id=53
1797 modelname="fuze"
1798 target="-DSANSA_FUZE"
1799 memory=8
1800 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1801 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1802 tool="$rootdir/tools/scramble -add=fuze"
1803 output="rockbox.sansa"
1804 bootoutput="bootloader-fuze.sansa"
1805 appextra="recorder:gui"
1806 plugins="yes"
1807 swcodec="yes"
1808 toolset=$scramblebitmaptools
1809 t_cpu="arm"
1810 t_manufacturer="as3525"
1811 t_model="sansa-fuze"
1812 arm9tdmicc
1816 59|c200v2)
1817 target_id=55
1818 modelname="c200v2"
1819 target="-DSANSA_C200V2"
1820 memory=2 # as per OF diagnosis mode
1821 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1822 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1823 tool="$rootdir/tools/scramble -add=c2v2"
1824 output="rockbox.sansa"
1825 bootoutput="bootloader-c200v2.sansa"
1826 appextra="recorder:gui"
1827 plugins="yes"
1828 swcodec="yes"
1829 # toolset is the tools within the tools directory that we build for
1830 # this particular target.
1831 toolset=$scramblebitmaptools
1832 # architecture, manufacturer and model for the target-tree build
1833 t_cpu="arm"
1834 t_manufacturer="as3525"
1835 t_model="sansa-c200v2"
1836 arm9tdmicc
1839 60|Clipv2|clipv2)
1840 echo "Sansa Clipv2 is not yet supported !"
1841 exit 1
1842 target_id=60
1843 modelname="clipv2"
1844 target="-DSANSA_CLIPV2"
1845 memory=8
1846 arm926ejscc
1847 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1848 bmp2rb_native="$bmp2rb_mono"
1849 tool="$rootdir/tools/scramble -add=clv2"
1850 output="rockbox.sansa"
1851 bootoutput="bootloader-clipv2.sansa"
1852 appextra="recorder:gui"
1853 plugins="yes"
1854 swcodec="yes"
1855 toolset=$scramblebitmaptools
1856 t_cpu="arm"
1857 t_manufacturer="as3525"
1858 t_model="sansa-clipv2"
1861 150|tpj1022)
1862 target_id=25
1863 modelname="tpj1022"
1864 target="-DELIO_TPJ1022"
1865 memory=32 # always
1866 arm7tdmicc
1867 tool="$rootdir/tools/scramble -add tpj2"
1868 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1869 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1870 output="rockbox.elio"
1871 appextra="recorder:gui"
1872 plugins="yes"
1873 swcodec="yes"
1874 boottool="$rootdir/tools/scramble -mi4v2"
1875 bootoutput="pp5020.mi4"
1876 # toolset is the tools within the tools directory that we build for
1877 # this particular target.
1878 toolset=$scramblebitmaptools
1879 # architecture, manufacturer and model for the target-tree build
1880 t_cpu="arm"
1881 t_manufacturer="tatung"
1882 t_model="tpj1022"
1885 100|sa9200)
1886 target_id=41
1887 modelname="sa9200"
1888 target="-DPHILIPS_SA9200"
1889 memory=32 # supposedly
1890 arm7tdmicc
1891 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
1892 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1893 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1894 output="rockbox.mi4"
1895 appextra="recorder:gui"
1896 plugins=""
1897 swcodec="yes"
1898 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
1899 bootoutput="FWImage.ebn"
1900 # toolset is the tools within the tools directory that we build for
1901 # this particular target.
1902 toolset=$scramblebitmaptools
1903 # architecture, manufacturer and model for the target-tree build
1904 t_cpu="arm"
1905 t_manufacturer="philips"
1906 t_model="sa9200"
1909 101|hdd1630)
1910 target_id=43
1911 modelname="hdd1630"
1912 target="-DPHILIPS_HDD1630"
1913 memory=32 # supposedly
1914 arm7tdmicc
1915 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
1916 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1917 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1918 output="rockbox.mi4"
1919 appextra="recorder:gui"
1920 plugins="yes"
1921 swcodec="yes"
1922 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
1923 bootoutput="FWImage.ebn"
1924 # toolset is the tools within the tools directory that we build for
1925 # this particular target.
1926 toolset=$scramblebitmaptools
1927 # architecture, manufacturer and model for the target-tree build
1928 t_cpu="arm"
1929 t_manufacturer="philips"
1930 t_model="hdd1630"
1933 110|meizum6sl)
1934 target_id=49
1935 modelname="meizum6sl"
1936 target="-DMEIZU_M6SL"
1937 memory=16 # always
1938 arm940tbecc
1939 tool="cp"
1940 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1941 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1942 output="rockbox.meizu"
1943 appextra="recorder:gui"
1944 plugins="no" #FIXME
1945 swcodec="yes"
1946 toolset=$genericbitmaptools
1947 boottool="cp"
1948 bootoutput="rockboot.ebn"
1949 # architecture, manufacturer and model for the target-tree build
1950 t_cpu="arm"
1951 t_manufacturer="s5l8700"
1952 t_model="meizu-m6sl"
1955 111|meizum6sp)
1956 target_id=46
1957 modelname="meizum6sp"
1958 target="-DMEIZU_M6SP"
1959 memory=16 # always
1960 arm940tbecc
1961 tool="cp"
1962 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1963 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1964 output="rockbox.meizu"
1965 appextra="recorder:gui"
1966 plugins="no" #FIXME
1967 swcodec="yes"
1968 toolset=$genericbitmaptools
1969 boottool="cp"
1970 bootoutput="rockboot.ebn"
1971 # architecture, manufacturer and model for the target-tree build
1972 t_cpu="arm"
1973 t_manufacturer="s5l8700"
1974 t_model="meizu-m6sp"
1977 112|meizum3)
1978 target_id=47
1979 modelname="meizum3"
1980 target="-DMEIZU_M3"
1981 memory=16 # always
1982 arm940tbecc
1983 tool="cp"
1984 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1985 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1986 output="rockbox.meizu"
1987 appextra="recorder:gui"
1988 plugins="no" #FIXME
1989 swcodec="yes"
1990 toolset=$genericbitmaptools
1991 boottool="cp"
1992 bootoutput="rockboot.ebn"
1993 # architecture, manufacturer and model for the target-tree build
1994 t_cpu="arm"
1995 t_manufacturer="s5l8700"
1996 t_model="meizu-m3"
1999 120|ondavx747)
2000 target_id=44
2001 modelname="ondavx747"
2002 target="-DONDA_VX747"
2003 memory=16
2004 mipselcc
2005 tool="$rootdir/tools/scramble -add=x747"
2006 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2007 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2008 output="rockbox.vx747"
2009 appextra="recorder:gui"
2010 plugins="yes"
2011 swcodec="yes"
2012 toolset=$genericbitmaptools
2013 boottool="cp"
2014 bootoutput="rockboot.vx747"
2015 # architecture, manufacturer and model for the target-tree build
2016 t_cpu="mips"
2017 t_manufacturer="ingenic_jz47xx"
2018 t_model="onda_vx747"
2021 121|ondavx767)
2022 target_id=45
2023 modelname="ondavx767"
2024 target="-DONDA_VX767"
2025 memory=16 #FIXME
2026 mipselcc
2027 tool="cp"
2028 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2029 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2030 output="rockbox.vx767"
2031 appextra="recorder:gui"
2032 plugins="" #FIXME
2033 swcodec="yes"
2034 toolset=$genericbitmaptools
2035 boottool="cp"
2036 bootoutput="rockboot.vx767"
2037 # architecture, manufacturer and model for the target-tree build
2038 t_cpu="mips"
2039 t_manufacturer="ingenic_jz47xx"
2040 t_model="onda_vx767"
2043 122|ondavx747p)
2044 target_id=54
2045 modelname="ondavx747p"
2046 target="-DONDA_VX747P"
2047 memory=16 #FIXME
2048 mipselcc
2049 tool="cp"
2050 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2051 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2052 output="rockbox.vx747p"
2053 appextra="recorder:gui"
2054 plugins="" #FIXME
2055 swcodec="yes"
2056 toolset=$genericbitmaptools
2057 boottool="cp"
2058 bootoutput="rockboot.vx747p"
2059 # architecture, manufacturer and model for the target-tree build
2060 t_cpu="mips"
2061 t_manufacturer="ingenic_jz47xx"
2062 t_model="onda_vx747"
2065 130|lyre_proto1)
2066 target_id=56
2067 modelname="lyre_proto1"
2068 target="-DLYRE_PROTO1"
2069 memory=64
2070 arm926ejscc
2071 tool="cp"
2072 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2073 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2074 output="rockbox.lyre"
2075 appextra="recorder:gui"
2076 plugins=""
2077 swcodec="yes"
2078 toolset=$scramblebitmaptools
2079 boottool="cp"
2080 bootoutput="bootloader-proto1.lyre"
2081 # architecture, manufacturer and model for the target-tree build
2082 t_cpu="arm"
2083 t_manufacturer="at91sam"
2084 t_model="lyre_proto1"
2087 140|yh_820)
2088 target_id=57
2089 modelname="yh_820"
2090 target="-DSAMSUNG_YH820"
2091 memory=32 # always
2092 arm7tdmicc
2093 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2094 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2095 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2096 output="rockbox.mi4"
2097 appextra="recorder:gui"
2098 plugins=""
2099 swcodec="yes"
2100 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2101 bootoutput="FW_YH820.mi4"
2102 # toolset is the tools within the tools directory that we build for
2103 # this particular target.
2104 toolset=$scramblebitmaptools
2105 # architecture, manufacturer and model for the target-tree build
2106 t_cpu="arm"
2107 t_manufacturer="samsung"
2108 t_model="yh820"
2111 141|yh_920)
2112 target_id=58
2113 modelname="yh_920"
2114 target="-DSAMSUNG_YH920"
2115 memory=32 # always
2116 arm7tdmicc
2117 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2118 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2119 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2120 output="rockbox.mi4"
2121 appextra="recorder:gui"
2122 plugins=""
2123 swcodec="yes"
2124 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2125 bootoutput="PP5020.mi4"
2126 # toolset is the tools within the tools directory that we build for
2127 # this particular target.
2128 toolset=$scramblebitmaptools
2129 # architecture, manufacturer and model for the target-tree build
2130 t_cpu="arm"
2131 t_manufacturer="samsung"
2132 t_model="yh920"
2135 142|yh_925)
2136 target_id=59
2137 modelname="yh_925"
2138 target="-DSAMSUNG_YH925"
2139 memory=32 # always
2140 arm7tdmicc
2141 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2142 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2143 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2144 output="rockbox.mi4"
2145 appextra="recorder:gui"
2146 plugins=""
2147 swcodec="yes"
2148 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2149 bootoutput="FW_YH925.mi4"
2150 # toolset is the tools within the tools directory that we build for
2151 # this particular target.
2152 toolset=$scramblebitmaptools
2153 # architecture, manufacturer and model for the target-tree build
2154 t_cpu="arm"
2155 t_manufacturer="samsung"
2156 t_model="yh925"
2160 echo "Please select a supported target platform!"
2161 exit 7
2164 esac
2166 echo "Platform set to $modelname"
2169 #remove start
2170 ############################################################################
2171 # Amount of memory, for those that can differ. They have $memory unset at
2172 # this point.
2175 if [ -z "$memory" ]; then
2176 case $target_id in
2178 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2179 if [ "1" != `parse_args --ram` ]; then
2180 size=`parse_args --ram`;
2181 else
2182 size=`input`;
2184 case $size in
2185 60|64)
2186 memory="64"
2189 memory="32"
2191 esac
2194 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2195 if [ "1" != `parse_args --ram` ]; then
2196 size=`parse_args --ram`;
2197 else
2198 size=`input`;
2200 case $size in
2202 memory="8"
2205 memory="2"
2207 esac
2209 esac
2210 echo "Memory size selected: $memory MB"
2211 echo ""
2213 #remove end
2215 ##################################################################
2216 # Figure out build "type"
2219 # the ifp7x0 is the only platform that supports building a gdb stub like
2220 # this
2221 case $modelname in
2222 ifp7xx)
2223 gdbstub="(G)DB stub, "
2225 e200r|e200)
2226 gdbstub="(I)nstaller, "
2228 c200)
2229 gdbstub="(E)raser, "
2233 esac
2234 if [ "1" != `parse_args --type` ]; then
2235 btype=`parse_args --type`;
2236 else
2237 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual: (Defaults to N)"
2238 btype=`input`;
2241 case $btype in
2242 [Ii])
2243 appsdir='\$(ROOTDIR)/bootloader'
2244 apps="bootloader"
2245 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2246 bootloader="1"
2247 echo "e200R-installer build selected"
2249 [Ee])
2250 appsdir='\$(ROOTDIR)/bootloader'
2251 apps="bootloader"
2252 echo "C2(4)0 or C2(5)0"
2253 variant=`input`
2254 case $variant in
2256 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2257 echo "c240 eraser build selected"
2260 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2261 echo "c240 eraser build selected"
2263 esac
2264 bootloader="1"
2265 echo "c200 eraser build selected"
2267 [Bb])
2268 if test $t_manufacturer = "archos"; then
2269 # Archos SH-based players do this somewhat differently for
2270 # some reason
2271 appsdir='\$(ROOTDIR)/flash/bootbox'
2272 apps="bootbox"
2273 else
2274 appsdir='\$(ROOTDIR)/bootloader'
2275 apps="bootloader"
2276 flash=""
2277 if test -n "$boottool"; then
2278 tool="$boottool"
2280 if test -n "$bootoutput"; then
2281 output=$bootoutput
2284 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2285 bootloader="1"
2286 echo "Bootloader build selected"
2288 [Ss])
2289 debug="-DDEBUG"
2290 simulator="yes"
2291 extradefines="-DSIMULATOR"
2292 archosrom=""
2293 flash=""
2294 echo "Simulator build selected"
2296 [Aa])
2297 echo "Advanced build selected"
2298 whichadvanced
2300 [Gg])
2301 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2302 appsdir='\$(ROOTDIR)/gdb'
2303 apps="stub"
2304 case $modelname in
2305 ifp7xx)
2306 output="stub.wma"
2310 esac
2311 echo "GDB stub build selected"
2313 [Mm])
2314 toolset='';
2315 apps="manual"
2316 echo "Manual build selected"
2319 if [ "$modelname" = "e200r" ]; then
2320 echo "Do not use the e200R target for regular builds. Use e200 instead."
2321 exit 8
2323 debug=""
2324 btype="N" # set it explicitly since RET only gets here as well
2325 echo "Normal build selected"
2328 esac
2329 # to be able running "make manual" from non-manual configuration
2330 case $modelname in
2331 fmrecorder)
2332 manualdev="recorderv2fm"
2334 recorderv2)
2335 manualdev="recorderv2fm"
2337 h1??)
2338 manualdev="h100"
2340 ipodmini2g)
2341 manualdev="ipodmini"
2344 manualdev=$modelname
2346 esac
2348 if [ -z "$debug" ]; then
2349 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2352 echo "Using source code root directory: $rootdir"
2354 # this was once possible to change at build-time, but no more:
2355 language="english"
2357 uname=`uname`
2359 if [ "yes" = "$simulator" ]; then
2360 # setup compiler and things for simulator
2361 simcc
2363 if [ -d "simdisk" ]; then
2364 echo "Subdirectory 'simdisk' already present"
2365 else
2366 mkdir simdisk
2367 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2371 # Now, figure out version number of the (gcc) compiler we are about to use
2372 gccver=`$CC -dumpversion`;
2374 # figure out the binutil version too and display it, mostly for the build
2375 # system etc to be able to see it easier
2376 if [ $uname = "Darwin" ]; then
2377 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2378 else
2379 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2382 if [ -z "$gccver" ]; then
2383 echo "WARNING: The compiler you must use ($CC) is not in your path!"
2384 echo "WARNING: this may cause your build to fail since we cannot do the"
2385 echo "WARNING: checks we want now."
2386 else
2388 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2389 # DEPEND on it
2391 num1=`echo $gccver | cut -d . -f1`
2392 num2=`echo $gccver | cut -d . -f2`
2393 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2395 # This makes:
2396 # 3.3.X => 303
2397 # 3.4.X => 304
2398 # 2.95.3 => 295
2400 echo "Using $CC $gccver ($gccnum)"
2402 if test "$gccnum" -ge "400"; then
2403 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2404 # so we ignore that warnings for now
2405 # -Wno-pointer-sign
2406 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2409 if test "$gccnum" -ge "401"; then
2410 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2411 # will break strict-aliasing rules"
2413 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
2416 if test "$gccnum" -ge "402"; then
2417 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2418 # and later would throw it for several valid cases
2419 GCCOPTS="$GCCOPTS -Wno-override-init"
2422 case $prefix in
2424 # simulator
2426 i586-mingw32msvc-)
2427 # cross-compile for win32
2430 # Verify that the cross-compiler is of a recommended version!
2431 if test "$gccver" != "$gccchoice"; then
2432 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2433 echo "WARNING: version $gccchoice!"
2434 echo "WARNING: This may cause your build to fail since it may be a version"
2435 echo "WARNING: that isn't functional or known to not be the best choice."
2436 echo "WARNING: If you suffer from build problems, you know that this is"
2437 echo "WARNING: a likely source for them..."
2440 esac
2445 echo "Using $LD $ldver"
2447 # check the compiler for SH platforms
2448 if test "$CC" = "sh-elf-gcc"; then
2449 if test "$gccnum" -lt "400"; then
2450 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2451 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2452 else
2453 # figure out patch status
2454 gccpatch=`$CC --version`;
2456 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2457 echo "gcc $gccver is rockbox patched"
2458 # then convert -O to -Os to get smaller binaries!
2459 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2460 else
2461 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2462 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2467 if test "$CC" = "m68k-elf-gcc"; then
2468 # convert -O to -Os to get smaller binaries!
2469 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2472 if [ "1" != `parse_args --ccache` ]; then
2473 echo "Enable ccache for building"
2474 ccache="ccache"
2475 else
2476 if [ "1" = `parse_args --no-ccache` ]; then
2477 ccache=`findtool ccache`
2478 if test -n "$ccache"; then
2479 echo "Found and uses ccache ($ccache)"
2484 # figure out the full path to the various commands if possible
2485 HOSTCC=`findtool gcc --lit`
2486 HOSTAR=`findtool ar --lit`
2487 CC=`findtool ${CC} --lit`
2488 LD=`findtool ${AR} --lit`
2489 AR=`findtool ${AR} --lit`
2490 AS=`findtool ${AS} --lit`
2491 OC=`findtool ${OC} --lit`
2492 WINDRES=`findtool ${WINDRES} --lit`
2493 DLLTOOL=`findtool ${DLLTOOL} --lit`
2494 DLLWRAP=`findtool ${DLLWRAP} --lit`
2495 RANLIB=`findtool ${RANLIB} --lit`
2497 if test -n "$ccache"; then
2498 CC="$ccache $CC"
2501 if test "X$endian" = "Xbig"; then
2502 defendian="ROCKBOX_BIG_ENDIAN"
2503 else
2504 defendian="ROCKBOX_LITTLE_ENDIAN"
2507 if [ "1" != `parse_args --rbdir` ]; then
2508 rbdir=`parse_args --rbdir`;
2509 echo "Using alternate rockbox dir: ${rbdir}"
2512 sed > autoconf.h \
2513 -e "s,@ENDIAN@,${defendian},g" \
2514 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2515 -e "s,@config_rtc@,$config_rtc,g" \
2516 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2517 -e "s,@RBDIR@,${rbdir},g" \
2518 -e "s,@have_backlight@,$have_backlight,g" \
2519 <<EOF
2520 /* This header was made by configure */
2521 #ifndef __BUILD_AUTOCONF_H
2522 #define __BUILD_AUTOCONF_H
2524 /* Define endianess for the target or simulator platform */
2525 #define @ENDIAN@ 1
2527 /* Define this if you build rockbox to support the logf logging and display */
2528 #undef ROCKBOX_HAS_LOGF
2530 /* optional defines for RTC mod for h1x0 */
2531 @config_rtc@
2532 @have_rtc_alarm@
2534 /* optional define for a backlight modded Ondio */
2535 @have_backlight@
2537 /* root of Rockbox */
2538 #define ROCKBOX_DIR "/@RBDIR@"
2540 #endif /* __BUILD_AUTOCONF_H */
2543 if test -n "$t_cpu"; then
2544 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2545 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2546 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2547 GCCOPTS="$GCCOPTS"
2550 if test "$simulator" = "yes"; then
2551 # add simul make stuff on the #SIMUL# line
2552 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2553 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2554 else
2555 # delete the lines that match
2556 simmagic1='/@SIMUL1@/D'
2557 simmagic2='/@SIMUL2@/D'
2560 if test "$swcodec" = "yes"; then
2561 voicetoolset="rbspeexenc voicefont wavtrim"
2562 else
2563 voicetoolset="voicefont wavtrim"
2566 if test "$apps" = "apps"; then
2567 # only when we build "real" apps we build the .lng files
2568 buildlangs="langs"
2571 #### Fix the cmdline ###
2572 if test -n "$ccache"; then
2573 cmdline="--ccache"
2576 cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype"
2579 ### end of cmdline
2581 sed > Makefile \
2582 -e "s,@ROOTDIR@,${rootdir},g" \
2583 -e "s,@DEBUG@,${debug},g" \
2584 -e "s,@MEMORY@,${memory},g" \
2585 -e "s,@TARGET_ID@,${target_id},g" \
2586 -e "s,@TARGET@,${target},g" \
2587 -e "s,@CPU@,${t_cpu},g" \
2588 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2589 -e "s,@MODELNAME@,${modelname},g" \
2590 -e "s,@LANGUAGE@,${language},g" \
2591 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2592 -e "s,@PWD@,${pwd},g" \
2593 -e "s,@HOSTCC@,${HOSTCC},g" \
2594 -e "s,@HOSTAR@,${HOSTAR},g" \
2595 -e "s,@CC@,${CC},g" \
2596 -e "s,@LD@,${LD},g" \
2597 -e "s,@AR@,${AR},g" \
2598 -e "s,@AS@,${AS},g" \
2599 -e "s,@OC@,${OC},g" \
2600 -e "s,@WINDRES@,${WINDRES},g" \
2601 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2602 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2603 -e "s,@RANLIB@,${RANLIB},g" \
2604 -e "s,@TOOL@,${tool},g" \
2605 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2606 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2607 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2608 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2609 -e "s,@OUTPUT@,${output},g" \
2610 -e "s,@APPEXTRA@,${appextra},g" \
2611 -e "s,@ARCHOSROM@,${archosrom},g" \
2612 -e "s,@FLASHFILE@,${flash},g" \
2613 -e "s,@PLUGINS@,${plugins},g" \
2614 -e "s,@CODECS@,${swcodec},g" \
2615 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2616 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2617 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2618 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2619 -e "s!@LDOPTS@!${LDOPTS}!g" \
2620 -e "s,@LOADADDRESS@,${loadaddress},g" \
2621 -e "s,@EXTRADEF@,${extradefines},g" \
2622 -e "s,@APPSDIR@,${appsdir},g" \
2623 -e "s,@FIRMDIR@,${firmdir},g" \
2624 -e "s,@TOOLSDIR@,${toolsdir},g" \
2625 -e "s,@APPS@,${apps},g" \
2626 -e "s,@SIMVER@,${simver},g" \
2627 -e "s,@GCCVER@,${gccver},g" \
2628 -e "s,@GCCNUM@,${gccnum},g" \
2629 -e "s,@UNAME@,${uname},g" \
2630 -e "s,@ENDIAN@,${defendian},g" \
2631 -e "s,@TOOLSET@,${toolset},g" \
2632 -e "${simmagic1}" \
2633 -e "${simmagic2}" \
2634 -e "s,@MANUALDEV@,${manualdev},g" \
2635 -e "s,@ENCODER@,${ENC_CMD},g" \
2636 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2637 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2638 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2639 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2640 -e "s,@LANGS@,${buildlangs},g" \
2641 -e "s,@USE_ELF@,${USE_ELF},g" \
2642 -e "s,@RBDIR@,${rbdir},g" \
2643 -e "s,@PREFIX@,$PREFIX,g" \
2644 -e "s,@CMDLINE@,$cmdline,g" \
2645 <<EOF
2646 ## Automatically generated. http://www.rockbox.org/
2648 export ROOTDIR=@ROOTDIR@
2649 export FIRMDIR=@FIRMDIR@
2650 export APPSDIR=@APPSDIR@
2651 export TOOLSDIR=@TOOLSDIR@
2652 export DOCSDIR=\$(ROOTDIR)/docs
2653 export MANUALDIR=\${ROOTDIR}/manual
2654 export DEBUG=@DEBUG@
2655 export MODELNAME=@MODELNAME@
2656 export ARCHOSROM=@ARCHOSROM@
2657 export FLASHFILE=@FLASHFILE@
2658 export TARGET_ID=@TARGET_ID@
2659 export TARGET=@TARGET@
2660 export CPU=@CPU@
2661 export MANUFACTURER=@MANUFACTURER@
2662 export OBJDIR=@PWD@
2663 export BUILDDIR=@PWD@
2664 export LANGUAGE=@LANGUAGE@
2665 export VOICELANGUAGE=@VOICELANGUAGE@
2666 export MEMORYSIZE=@MEMORY@
2667 export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
2668 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2669 export MKFIRMWARE=@TOOL@
2670 export BMP2RB_MONO=@BMP2RB_MONO@
2671 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2672 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2673 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2674 export BINARY=@OUTPUT@
2675 export APPEXTRA=@APPEXTRA@
2676 export ENABLEDPLUGINS=@PLUGINS@
2677 export SOFTWARECODECS=@CODECS@
2678 export EXTRA_DEFINES=@EXTRADEF@
2679 export HOSTCC=@HOSTCC@
2680 export HOSTAR=@HOSTAR@
2681 export CC=@CC@
2682 export LD=@LD@
2683 export AR=@AR@
2684 export AS=@AS@
2685 export OC=@OC@
2686 export WINDRES=@WINDRES@
2687 export DLLTOOL=@DLLTOOL@
2688 export DLLWRAP=@DLLWRAP@
2689 export RANLIB=@RANLIB@
2690 export PREFIX=@PREFIX@
2691 export PROFILE_OPTS=@PROFILE_OPTS@
2692 export SIMVER=@SIMVER@
2693 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2694 export GCCOPTS=@GCCOPTS@
2695 export TARGET_INC=@TARGET_INC@
2696 export LOADADDRESS=@LOADADDRESS@
2697 export SHARED_FLAG=@SHARED_FLAG@
2698 export LDOPTS=@LDOPTS@
2699 export GCCVER=@GCCVER@
2700 export GCCNUM=@GCCNUM@
2701 export UNAME=@UNAME@
2702 export MANUALDEV=@MANUALDEV@
2703 export TTS_OPTS=@TTS_OPTS@
2704 export TTS_ENGINE=@TTS_ENGINE@
2705 export ENC_OPTS=@ENC_OPTS@
2706 export ENCODER=@ENCODER@
2707 export USE_ELF=@USE_ELF@
2708 export RBDIR=@RBDIR@
2710 CONFIGURE_OPTIONS=@CMDLINE@
2712 include \$(TOOLSDIR)/root.make
2716 echo "Created Makefile"