Make 'Backlight mod' an Advanced build option for the Ondios (largely inspired by...
[kugel-rb.git] / tools / configure
blob75908fe60c730a9fafcf1497220150393299a531
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"; 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-abicalls -mno-long-calls -Wno-parentheses"
308 GCCOPTIMIZE="-fomit-frame-pointer"
309 GCCOPTS="$GCCOPTS -fno-pic -fno-builtin -fno-exceptions -ffunction-sections -msoft-float -G 0"
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 -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=32 # unsure, must check
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 # toolset is the tools within the tools directory that we build for
1723 # this particular target.
1724 toolset=$tccbitmaptools
1725 # architecture, manufacturer and model for the target-tree build
1726 t_cpu="arm"
1727 t_manufacturer="tcc77x"
1728 t_model="c100"
1731 55|Clip|clip)
1732 target_id=50
1733 modelname="clip"
1734 target="-DSANSA_CLIP"
1735 memory=2
1736 arm9tdmicc
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"
1752 56|e200v2)
1753 target_id=51
1754 modelname="e200v2"
1755 target="-DSANSA_E200V2"
1756 memory=8
1757 arm9tdmicc
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"
1773 57|m200v4)
1774 target_id=52
1775 modelname="m200v4"
1776 target="-DSANSA_M200V4"
1777 memory=2
1778 arm9tdmicc
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"
1794 58|fuze)
1795 target_id=53
1796 modelname="fuze"
1797 target="-DSANSA_FUZE"
1798 memory=8
1799 arm9tdmicc
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"
1815 59|c200v2)
1816 target_id=55
1817 modelname="c200v2"
1818 target="-DSANSA_C200V2"
1819 memory=2 # as per OF diagnosis mode
1820 arm9tdmicc
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"
1838 60|Clipv2|clipv2)
1839 echo "Sansa Clipv2 is not yet supported !"
1840 exit 1
1841 target_id=60
1842 modelname="clipv2"
1843 target="-DSANSA_CLIPV2"
1844 memory=8
1845 arm926ejscc
1846 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1847 bmp2rb_native="$bmp2rb_mono"
1848 tool="$rootdir/tools/scramble -add=clv2"
1849 output="rockbox.sansa"
1850 bootoutput="bootloader-clipv2.sansa"
1851 appextra="recorder:gui"
1852 plugins="yes"
1853 swcodec="yes"
1854 toolset=$scramblebitmaptools
1855 t_cpu="arm"
1856 t_manufacturer="as3525"
1857 t_model="sansa-clipv2"
1860 150|tpj1022)
1861 target_id=25
1862 modelname="tpj1022"
1863 target="-DELIO_TPJ1022"
1864 memory=32 # always
1865 arm7tdmicc
1866 tool="$rootdir/tools/scramble -add tpj2"
1867 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1868 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1869 output="rockbox.elio"
1870 appextra="recorder:gui"
1871 plugins="yes"
1872 swcodec="yes"
1873 boottool="$rootdir/tools/scramble -mi4v2"
1874 bootoutput="pp5020.mi4"
1875 # toolset is the tools within the tools directory that we build for
1876 # this particular target.
1877 toolset=$scramblebitmaptools
1878 # architecture, manufacturer and model for the target-tree build
1879 t_cpu="arm"
1880 t_manufacturer="tatung"
1881 t_model="tpj1022"
1884 100|sa9200)
1885 target_id=41
1886 modelname="sa9200"
1887 target="-DPHILIPS_SA9200"
1888 memory=32 # supposedly
1889 arm7tdmicc
1890 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
1891 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1892 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1893 output="rockbox.mi4"
1894 appextra="recorder:gui"
1895 plugins=""
1896 swcodec="yes"
1897 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
1898 bootoutput="FWImage.ebn"
1899 # toolset is the tools within the tools directory that we build for
1900 # this particular target.
1901 toolset=$scramblebitmaptools
1902 # architecture, manufacturer and model for the target-tree build
1903 t_cpu="arm"
1904 t_manufacturer="philips"
1905 t_model="sa9200"
1908 101|hdd1630)
1909 target_id=43
1910 modelname="hdd1630"
1911 target="-DPHILIPS_HDD1630"
1912 memory=32 # supposedly
1913 arm7tdmicc
1914 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
1915 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1916 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1917 output="rockbox.mi4"
1918 appextra="recorder:gui"
1919 plugins="yes"
1920 swcodec="yes"
1921 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
1922 bootoutput="FWImage.ebn"
1923 # toolset is the tools within the tools directory that we build for
1924 # this particular target.
1925 toolset=$scramblebitmaptools
1926 # architecture, manufacturer and model for the target-tree build
1927 t_cpu="arm"
1928 t_manufacturer="philips"
1929 t_model="hdd1630"
1932 110|meizum6sl)
1933 target_id=49
1934 modelname="meizum6sl"
1935 target="-DMEIZU_M6SL"
1936 memory=16 # always
1937 arm940tbecc
1938 tool="cp"
1939 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1940 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1941 output="rockbox.meizu"
1942 appextra="recorder:gui"
1943 plugins="no" #FIXME
1944 swcodec="yes"
1945 toolset=$genericbitmaptools
1946 boottool="cp"
1947 bootoutput="rockboot.ebn"
1948 # architecture, manufacturer and model for the target-tree build
1949 t_cpu="arm"
1950 t_manufacturer="s5l8700"
1951 t_model="meizu-m6sl"
1954 111|meizum6sp)
1955 target_id=46
1956 modelname="meizum6sp"
1957 target="-DMEIZU_M6SP"
1958 memory=16 # always
1959 arm940tbecc
1960 tool="cp"
1961 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1962 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1963 output="rockbox.meizu"
1964 appextra="recorder:gui"
1965 plugins="no" #FIXME
1966 swcodec="yes"
1967 toolset=$genericbitmaptools
1968 boottool="cp"
1969 bootoutput="rockboot.ebn"
1970 # architecture, manufacturer and model for the target-tree build
1971 t_cpu="arm"
1972 t_manufacturer="s5l8700"
1973 t_model="meizu-m6sp"
1976 112|meizum3)
1977 target_id=47
1978 modelname="meizum3"
1979 target="-DMEIZU_M3"
1980 memory=16 # always
1981 arm940tbecc
1982 tool="cp"
1983 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1984 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1985 output="rockbox.meizu"
1986 appextra="recorder:gui"
1987 plugins="no" #FIXME
1988 swcodec="yes"
1989 toolset=$genericbitmaptools
1990 boottool="cp"
1991 bootoutput="rockboot.ebn"
1992 # architecture, manufacturer and model for the target-tree build
1993 t_cpu="arm"
1994 t_manufacturer="s5l8700"
1995 t_model="meizu-m3"
1998 120|ondavx747)
1999 target_id=44
2000 modelname="ondavx747"
2001 target="-DONDA_VX747"
2002 memory=16
2003 mipselcc
2004 tool="$rootdir/tools/scramble -add=x747"
2005 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2006 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2007 output="rockbox.vx747"
2008 appextra="recorder:gui"
2009 plugins="yes"
2010 swcodec="yes"
2011 toolset=$genericbitmaptools
2012 boottool="cp"
2013 bootoutput="rockboot.vx747"
2014 # architecture, manufacturer and model for the target-tree build
2015 t_cpu="mips"
2016 t_manufacturer="ingenic_jz47xx"
2017 t_model="onda_vx747"
2020 121|ondavx767)
2021 target_id=45
2022 modelname="ondavx767"
2023 target="-DONDA_VX767"
2024 memory=16 #FIXME
2025 mipselcc
2026 tool="cp"
2027 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2028 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2029 output="rockbox.vx767"
2030 appextra="recorder:gui"
2031 plugins="" #FIXME
2032 swcodec="yes"
2033 toolset=$genericbitmaptools
2034 boottool="cp"
2035 bootoutput="rockboot.vx767"
2036 # architecture, manufacturer and model for the target-tree build
2037 t_cpu="mips"
2038 t_manufacturer="ingenic_jz47xx"
2039 t_model="onda_vx767"
2042 122|ondavx747p)
2043 target_id=54
2044 modelname="ondavx747p"
2045 target="-DONDA_VX747P"
2046 memory=16 #FIXME
2047 mipselcc
2048 tool="cp"
2049 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2050 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2051 output="rockbox.vx747p"
2052 appextra="recorder:gui"
2053 plugins="" #FIXME
2054 swcodec="yes"
2055 toolset=$genericbitmaptools
2056 boottool="cp"
2057 bootoutput="rockboot.vx747p"
2058 # architecture, manufacturer and model for the target-tree build
2059 t_cpu="mips"
2060 t_manufacturer="ingenic_jz47xx"
2061 t_model="onda_vx747"
2064 130|lyre_proto1)
2065 target_id=56
2066 modelname="lyre_proto1"
2067 target="-DLYRE_PROTO1"
2068 memory=64
2069 arm926ejscc
2070 tool="cp"
2071 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2072 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2073 output="rockbox.lyre"
2074 appextra="recorder:gui"
2075 plugins=""
2076 swcodec="yes"
2077 toolset=$scramblebitmaptools
2078 boottool="cp"
2079 bootoutput="bootloader-proto1.lyre"
2080 # architecture, manufacturer and model for the target-tree build
2081 t_cpu="arm"
2082 t_manufacturer="at91sam"
2083 t_model="lyre_proto1"
2086 140|yh_820)
2087 target_id=57
2088 modelname="yh_820"
2089 target="-DSAMSUNG_YH820"
2090 memory=32 # always
2091 arm7tdmicc
2092 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2093 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2094 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2095 output="rockbox.mi4"
2096 appextra="recorder:gui"
2097 plugins=""
2098 swcodec="yes"
2099 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2100 bootoutput="FW_YH820.mi4"
2101 # toolset is the tools within the tools directory that we build for
2102 # this particular target.
2103 toolset=$scramblebitmaptools
2104 # architecture, manufacturer and model for the target-tree build
2105 t_cpu="arm"
2106 t_manufacturer="samsung"
2107 t_model="yh820"
2110 141|yh_920)
2111 target_id=58
2112 modelname="yh_920"
2113 target="-DSAMSUNG_YH920"
2114 memory=32 # always
2115 arm7tdmicc
2116 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2117 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2118 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2119 output="rockbox.mi4"
2120 appextra="recorder:gui"
2121 plugins=""
2122 swcodec="yes"
2123 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2124 bootoutput="PP5020.mi4"
2125 # toolset is the tools within the tools directory that we build for
2126 # this particular target.
2127 toolset=$scramblebitmaptools
2128 # architecture, manufacturer and model for the target-tree build
2129 t_cpu="arm"
2130 t_manufacturer="samsung"
2131 t_model="yh920"
2134 142|yh_925)
2135 target_id=59
2136 modelname="yh_925"
2137 target="-DSAMSUNG_YH925"
2138 memory=32 # always
2139 arm7tdmicc
2140 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2141 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2142 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2143 output="rockbox.mi4"
2144 appextra="recorder:gui"
2145 plugins=""
2146 swcodec="yes"
2147 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2148 bootoutput="FW_YH925.mi4"
2149 # toolset is the tools within the tools directory that we build for
2150 # this particular target.
2151 toolset=$scramblebitmaptools
2152 # architecture, manufacturer and model for the target-tree build
2153 t_cpu="arm"
2154 t_manufacturer="samsung"
2155 t_model="yh925"
2159 echo "Please select a supported target platform!"
2160 exit 7
2163 esac
2165 echo "Platform set to $modelname"
2168 #remove start
2169 ############################################################################
2170 # Amount of memory, for those that can differ. They have $memory unset at
2171 # this point.
2174 if [ -z "$memory" ]; then
2175 case $target_id in
2177 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2178 if [ "1" != `parse_args --ram` ]; then
2179 size=`parse_args --ram`;
2180 else
2181 size=`input`;
2183 case $size in
2184 60|64)
2185 memory="64"
2188 memory="32"
2190 esac
2193 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2194 if [ "1" != `parse_args --ram` ]; then
2195 size=`parse_args --ram`;
2196 else
2197 size=`input`;
2199 case $size in
2201 memory="8"
2204 memory="2"
2206 esac
2208 esac
2209 echo "Memory size selected: $memory MB"
2210 echo ""
2212 #remove end
2214 ##################################################################
2215 # Figure out build "type"
2218 # the ifp7x0 is the only platform that supports building a gdb stub like
2219 # this
2220 case $modelname in
2221 ifp7xx)
2222 gdbstub="(G)DB stub, "
2224 e200r|e200)
2225 gdbstub="(I)nstaller, "
2227 c200)
2228 gdbstub="(E)raser, "
2232 esac
2233 if [ "1" != `parse_args --type` ]; then
2234 btype=`parse_args --type`;
2235 else
2236 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual: (Defaults to N)"
2237 btype=`input`;
2240 case $btype in
2241 [Ii])
2242 appsdir='\$(ROOTDIR)/bootloader'
2243 apps="bootloader"
2244 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2245 bootloader="1"
2246 echo "e200R-installer build selected"
2248 [Ee])
2249 appsdir='\$(ROOTDIR)/bootloader'
2250 apps="bootloader"
2251 echo "C2(4)0 or C2(5)0"
2252 variant=`input`
2253 case $variant in
2255 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2256 echo "c240 eraser build selected"
2259 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2260 echo "c240 eraser build selected"
2262 esac
2263 bootloader="1"
2264 echo "c200 eraser build selected"
2266 [Bb])
2267 if test $t_manufacturer = "archos"; then
2268 # Archos SH-based players do this somewhat differently for
2269 # some reason
2270 appsdir='\$(ROOTDIR)/flash/bootbox'
2271 apps="bootbox"
2272 else
2273 appsdir='\$(ROOTDIR)/bootloader'
2274 apps="bootloader"
2275 flash=""
2276 if test -n "$boottool"; then
2277 tool="$boottool"
2279 if test -n "$bootoutput"; then
2280 output=$bootoutput
2283 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2284 bootloader="1"
2285 echo "Bootloader build selected"
2287 [Ss])
2288 debug="-DDEBUG"
2289 simulator="yes"
2290 extradefines="-DSIMULATOR"
2291 archosrom=""
2292 flash=""
2293 echo "Simulator build selected"
2295 [Aa])
2296 echo "Advanced build selected"
2297 whichadvanced
2299 [Gg])
2300 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2301 appsdir='\$(ROOTDIR)/gdb'
2302 apps="stub"
2303 case $modelname in
2304 ifp7xx)
2305 output="stub.wma"
2309 esac
2310 echo "GDB stub build selected"
2312 [Mm])
2313 toolset='';
2314 apps="manual"
2315 echo "Manual build selected"
2318 if [ "$modelname" = "e200r" ]; then
2319 echo "Do not use the e200R target for regular builds. Use e200 instead."
2320 exit 8
2322 debug=""
2323 btype="N" # set it explicitly since RET only gets here as well
2324 echo "Normal build selected"
2327 esac
2328 # to be able running "make manual" from non-manual configuration
2329 case $modelname in
2330 fmrecorder)
2331 manualdev="recorderv2fm"
2333 recorderv2)
2334 manualdev="recorderv2fm"
2336 h1??)
2337 manualdev="h100"
2339 ipodmini2g)
2340 manualdev="ipodmini"
2343 manualdev=$modelname
2345 esac
2347 if [ -z "$debug" ]; then
2348 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2351 echo "Using source code root directory: $rootdir"
2353 # this was once possible to change at build-time, but no more:
2354 language="english"
2356 uname=`uname`
2358 if [ "yes" = "$simulator" ]; then
2359 # setup compiler and things for simulator
2360 simcc
2362 if [ -d "simdisk" ]; then
2363 echo "Subdirectory 'simdisk' already present"
2364 else
2365 mkdir simdisk
2366 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2370 # Now, figure out version number of the (gcc) compiler we are about to use
2371 gccver=`$CC -dumpversion`;
2373 # figure out the binutil version too and display it, mostly for the build
2374 # system etc to be able to see it easier
2375 if [ $uname = "Darwin" ]; then
2376 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2377 else
2378 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2381 if [ -z "$gccver" ]; then
2382 echo "WARNING: The compiler you must use ($CC) is not in your path!"
2383 echo "WARNING: this may cause your build to fail since we cannot do the"
2384 echo "WARNING: checks we want now."
2385 else
2387 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2388 # DEPEND on it
2390 num1=`echo $gccver | cut -d . -f1`
2391 num2=`echo $gccver | cut -d . -f2`
2392 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2394 # This makes:
2395 # 3.3.X => 303
2396 # 3.4.X => 304
2397 # 2.95.3 => 295
2399 echo "Using $CC $gccver ($gccnum)"
2401 if test "$gccnum" -ge "400"; then
2402 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2403 # so we ignore that warnings for now
2404 # -Wno-pointer-sign
2405 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2408 if test "$gccnum" -ge "401"; then
2409 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2410 # will break strict-aliasing rules"
2412 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
2415 if test "$gccnum" -ge "402"; then
2416 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2417 # and later would throw it for several valid cases
2418 GCCOPTS="$GCCOPTS -Wno-override-init"
2421 case $prefix in
2423 # simulator
2425 i586-mingw32msvc-)
2426 # cross-compile for win32
2429 # Verify that the cross-compiler is of a recommended version!
2430 if test "$gccver" != "$gccchoice"; then
2431 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2432 echo "WARNING: version $gccchoice!"
2433 echo "WARNING: This may cause your build to fail since it may be a version"
2434 echo "WARNING: that isn't functional or known to not be the best choice."
2435 echo "WARNING: If you suffer from build problems, you know that this is"
2436 echo "WARNING: a likely source for them..."
2439 esac
2444 echo "Using $LD $ldver"
2446 # check the compiler for SH platforms
2447 if test "$CC" = "sh-elf-gcc"; then
2448 if test "$gccnum" -lt "400"; then
2449 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2450 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2451 else
2452 # figure out patch status
2453 gccpatch=`$CC --version`;
2455 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2456 echo "gcc $gccver is rockbox patched"
2457 # then convert -O to -Os to get smaller binaries!
2458 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2459 else
2460 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2461 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2466 if test "$CC" = "m68k-elf-gcc"; then
2467 # convert -O to -Os to get smaller binaries!
2468 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2471 if [ "1" != `parse_args --ccache` ]; then
2472 echo "Enable ccache for building"
2473 ccache="ccache"
2474 else
2475 if [ "1" = `parse_args --no-ccache` ]; then
2476 ccache=`findtool ccache`
2477 if test -n "$ccache"; then
2478 echo "Found and uses ccache ($ccache)"
2483 # figure out the full path to the various commands if possible
2484 HOSTCC=`findtool gcc --lit`
2485 HOSTAR=`findtool ar --lit`
2486 CC=`findtool ${CC} --lit`
2487 LD=`findtool ${AR} --lit`
2488 AR=`findtool ${AR} --lit`
2489 AS=`findtool ${AS} --lit`
2490 OC=`findtool ${OC} --lit`
2491 WINDRES=`findtool ${WINDRES} --lit`
2492 DLLTOOL=`findtool ${DLLTOOL} --lit`
2493 DLLWRAP=`findtool ${DLLWRAP} --lit`
2494 RANLIB=`findtool ${RANLIB} --lit`
2496 if test -n "$ccache"; then
2497 CC="$ccache $CC"
2500 if test "X$endian" = "Xbig"; then
2501 defendian="ROCKBOX_BIG_ENDIAN"
2502 else
2503 defendian="ROCKBOX_LITTLE_ENDIAN"
2506 if [ "1" != `parse_args --rbdir` ]; then
2507 rbdir=`parse_args --rbdir`;
2508 echo "Using alternate rockbox dir: ${rbdir}"
2511 sed > autoconf.h \
2512 -e "s,@ENDIAN@,${defendian},g" \
2513 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2514 -e "s,@config_rtc@,$config_rtc,g" \
2515 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2516 -e "s,@RBDIR@,${rbdir},g" \
2517 -e "s,@have_backlight@,$have_backlight,g" \
2518 <<EOF
2519 /* This header was made by configure */
2520 #ifndef __BUILD_AUTOCONF_H
2521 #define __BUILD_AUTOCONF_H
2523 /* Define endianess for the target or simulator platform */
2524 #define @ENDIAN@ 1
2526 /* Define this if you build rockbox to support the logf logging and display */
2527 #undef ROCKBOX_HAS_LOGF
2529 /* optional defines for RTC mod for h1x0 */
2530 @config_rtc@
2531 @have_rtc_alarm@
2533 /* optional define for a backlight modded Ondio */
2534 @have_backlight@
2536 /* root of Rockbox */
2537 #define ROCKBOX_DIR "/@RBDIR@"
2539 #endif /* __BUILD_AUTOCONF_H */
2542 if test -n "$t_cpu"; then
2543 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2544 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2545 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2546 GCCOPTS="$GCCOPTS"
2549 if test "$simulator" = "yes"; then
2550 # add simul make stuff on the #SIMUL# line
2551 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2552 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2553 else
2554 # delete the lines that match
2555 simmagic1='/@SIMUL1@/D'
2556 simmagic2='/@SIMUL2@/D'
2559 if test "$swcodec" = "yes"; then
2560 voicetoolset="rbspeexenc voicefont wavtrim"
2561 else
2562 voicetoolset="voicefont wavtrim"
2565 if test "$apps" = "apps"; then
2566 # only when we build "real" apps we build the .lng files
2567 buildlangs="langs"
2570 #### Fix the cmdline ###
2571 if test -n "$ccache"; then
2572 cmdline="--ccache"
2575 cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype"
2578 ### end of cmdline
2580 sed > Makefile \
2581 -e "s,@ROOTDIR@,${rootdir},g" \
2582 -e "s,@DEBUG@,${debug},g" \
2583 -e "s,@MEMORY@,${memory},g" \
2584 -e "s,@TARGET_ID@,${target_id},g" \
2585 -e "s,@TARGET@,${target},g" \
2586 -e "s,@CPU@,${t_cpu},g" \
2587 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2588 -e "s,@MODELNAME@,${modelname},g" \
2589 -e "s,@LANGUAGE@,${language},g" \
2590 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2591 -e "s,@PWD@,${pwd},g" \
2592 -e "s,@HOSTCC@,${HOSTCC},g" \
2593 -e "s,@HOSTAR@,${HOSTAR},g" \
2594 -e "s,@CC@,${CC},g" \
2595 -e "s,@LD@,${LD},g" \
2596 -e "s,@AR@,${AR},g" \
2597 -e "s,@AS@,${AS},g" \
2598 -e "s,@OC@,${OC},g" \
2599 -e "s,@WINDRES@,${WINDRES},g" \
2600 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2601 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2602 -e "s,@RANLIB@,${RANLIB},g" \
2603 -e "s,@TOOL@,${tool},g" \
2604 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2605 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2606 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2607 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2608 -e "s,@OUTPUT@,${output},g" \
2609 -e "s,@APPEXTRA@,${appextra},g" \
2610 -e "s,@ARCHOSROM@,${archosrom},g" \
2611 -e "s,@FLASHFILE@,${flash},g" \
2612 -e "s,@PLUGINS@,${plugins},g" \
2613 -e "s,@CODECS@,${swcodec},g" \
2614 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2615 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2616 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2617 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2618 -e "s!@LDOPTS@!${LDOPTS}!g" \
2619 -e "s,@LOADADDRESS@,${loadaddress},g" \
2620 -e "s,@EXTRADEF@,${extradefines},g" \
2621 -e "s,@APPSDIR@,${appsdir},g" \
2622 -e "s,@FIRMDIR@,${firmdir},g" \
2623 -e "s,@TOOLSDIR@,${toolsdir},g" \
2624 -e "s,@APPS@,${apps},g" \
2625 -e "s,@SIMVER@,${simver},g" \
2626 -e "s,@GCCVER@,${gccver},g" \
2627 -e "s,@GCCNUM@,${gccnum},g" \
2628 -e "s,@UNAME@,${uname},g" \
2629 -e "s,@ENDIAN@,${defendian},g" \
2630 -e "s,@TOOLSET@,${toolset},g" \
2631 -e "${simmagic1}" \
2632 -e "${simmagic2}" \
2633 -e "s,@MANUALDEV@,${manualdev},g" \
2634 -e "s,@ENCODER@,${ENC_CMD},g" \
2635 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2636 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2637 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2638 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2639 -e "s,@LANGS@,${buildlangs},g" \
2640 -e "s,@USE_ELF@,${USE_ELF},g" \
2641 -e "s,@RBDIR@,${rbdir},g" \
2642 -e "s,@PREFIX@,$PREFIX,g" \
2643 -e "s,@CMDLINE@,$cmdline,g" \
2644 <<EOF
2645 ## Automatically generated. http://www.rockbox.org/
2647 export ROOTDIR=@ROOTDIR@
2648 export FIRMDIR=@FIRMDIR@
2649 export APPSDIR=@APPSDIR@
2650 export TOOLSDIR=@TOOLSDIR@
2651 export DOCSDIR=\$(ROOTDIR)/docs
2652 export MANUALDIR=\${ROOTDIR}/manual
2653 export DEBUG=@DEBUG@
2654 export MODELNAME=@MODELNAME@
2655 export ARCHOSROM=@ARCHOSROM@
2656 export FLASHFILE=@FLASHFILE@
2657 export TARGET_ID=@TARGET_ID@
2658 export TARGET=@TARGET@
2659 export CPU=@CPU@
2660 export MANUFACTURER=@MANUFACTURER@
2661 export OBJDIR=@PWD@
2662 export BUILDDIR=@PWD@
2663 export LANGUAGE=@LANGUAGE@
2664 export VOICELANGUAGE=@VOICELANGUAGE@
2665 export MEMORYSIZE=@MEMORY@
2666 export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
2667 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2668 export MKFIRMWARE=@TOOL@
2669 export BMP2RB_MONO=@BMP2RB_MONO@
2670 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2671 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2672 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2673 export BINARY=@OUTPUT@
2674 export APPEXTRA=@APPEXTRA@
2675 export ENABLEDPLUGINS=@PLUGINS@
2676 export SOFTWARECODECS=@CODECS@
2677 export EXTRA_DEFINES=@EXTRADEF@
2678 export HOSTCC=@HOSTCC@
2679 export HOSTAR=@HOSTAR@
2680 export CC=@CC@
2681 export LD=@LD@
2682 export AR=@AR@
2683 export AS=@AS@
2684 export OC=@OC@
2685 export WINDRES=@WINDRES@
2686 export DLLTOOL=@DLLTOOL@
2687 export DLLWRAP=@DLLWRAP@
2688 export RANLIB=@RANLIB@
2689 export PREFIX=@PREFIX@
2690 export PROFILE_OPTS=@PROFILE_OPTS@
2691 export SIMVER=@SIMVER@
2692 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2693 export GCCOPTS=@GCCOPTS@
2694 export TARGET_INC=@TARGET_INC@
2695 export LOADADDRESS=@LOADADDRESS@
2696 export SHARED_FLAG=@SHARED_FLAG@
2697 export LDOPTS=@LDOPTS@
2698 export GCCVER=@GCCVER@
2699 export GCCNUM=@GCCNUM@
2700 export UNAME=@UNAME@
2701 export MANUALDEV=@MANUALDEV@
2702 export TTS_OPTS=@TTS_OPTS@
2703 export TTS_ENGINE=@TTS_ENGINE@
2704 export ENC_OPTS=@ENC_OPTS@
2705 export ENCODER=@ENCODER@
2706 export USE_ELF=@USE_ELF@
2707 export RBDIR=@RBDIR@
2709 CONFIGURE_OPTIONS=@CMDLINE@
2711 include \$(TOOLSDIR)/root.make
2715 echo "Created Makefile"