Renamed simulator disk directory from 'archos' to 'simdisk'.
[kugel-rb.git] / tools / configure
blob9b3f1081851d178576e7384e96028df53538c839
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: //'`
19 # Begin Function Definitions
21 input() {
22 read response
23 echo $response
26 prefixtools () {
27 prefix="$1"
28 CC=${prefix}gcc
29 WINDRES=${prefix}windres
30 DLLTOOL=${prefix}dlltool
31 DLLWRAP=${prefix}dllwrap
32 RANLIB=${prefix}ranlib
33 LD=${prefix}ld
34 AR=${prefix}ar
35 AS=${prefix}as
36 OC=${prefix}objcopy
39 crosswincc () {
40 # naive approach to selecting a mingw cross-compiler on linux/*nix
41 echo "Enabling win32 crosscompiling"
43 prefixtools i586-mingw32msvc-
45 # add cross-compiler option(s)
46 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
47 LDOPTS="`sdl-config --libs` -mconsole"
49 output="rockboxui.exe" # use this as output binary name
50 crosscompile="yes"
51 endian="little" # windows is little endian
54 # scan the $PATH for the given command
55 findtool(){
56 file="$1"
58 IFS=":"
59 for path in $PATH
61 # echo "checks for $file in $path" >&2
62 if test -f "$path/$file"; then
63 echo "$path/$file"
64 return
66 done
67 # check whether caller wants literal return value if not found
68 if [ "$2" = "--lit" ]; then
69 echo "$file"
73 # parse the argument list, returns the value after the = in case of a
74 # option=value type option, returns 0 in case of --ccache or --no-ccache,
75 # returns 1 if the searched argument type wasn't fount in the argument list
76 # Usage [var = ]`parse_args <argumenttype>`, e.g. `parse_args --target`
78 # var definitons below are needed so that parse_args can see the arguments
79 arg1=$1 arg2=$2 arg3=$3 arg4=$4 arg5=$5 arg6=$6 arg7=$7 arg8=$8 arg9=$9
81 parse_args() {
82 ret="1"
83 for i in $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7 $arg8 $arg9
85 if [ "$1" = "--ccache" ]; then
86 if [ "$i" = "--ccache" ]; then
87 ret="0"
89 elif [ "$1" = "--no-ccache" ]; then
90 if [ "$i" = "--no-ccache" ]; then
91 ret="0"
93 elif [ "$1" = `echo $i|cut -d'=' -f1` ]; then
94 ret=`echo $i|cut -d'=' -f2`
96 done
97 echo "$ret"
100 simcc () {
102 # default tool setup for native building
103 prefixtools ""
105 simver=sdl
106 GCCOPTS='-W -Wall -g -fno-builtin'
108 output="rockboxui" # use this as default output binary name
110 # generic sdl-config checker
111 sdl=`findtool sdl-config`
113 if [ -z "$sdl" ]; then
114 echo "configure didn't find sdl-config, which indicates that you"
115 echo "don't have SDL (properly) installed. Please correct and"
116 echo "re-run configure!"
117 exit
120 # default share option, override below if needed
121 SHARED_FLAG="-shared"
123 case $uname in
124 CYGWIN*)
125 echo "Cygwin host detected"
127 # sdl version
128 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
129 LDOPTS="`sdl-config --libs` -mconsole"
131 output="rockboxui.exe" # use this as output binary name
134 Linux)
135 echo "Linux host detected"
136 if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then
137 # Enable crosscompiling if sdl-config is from Windows SDL
138 crosswincc
139 else
140 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
141 LDOPTS="`sdl-config --libs`"
145 FreeBSD)
146 echo "FreeBSD host detected"
147 # sdl version
148 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
149 LDOPTS="`sdl-config --libs`"
152 Darwin)
153 echo "Darwin host detected"
154 # sdl version
155 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
156 LDOPTS="`sdl-config --libs`"
157 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
161 echo "Unsupported system: $uname, fix configure and retry"
162 exit
164 esac
166 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
168 if test "X$crosscompile" != "Xyes"; then
169 if [ "`uname -m`" = "x86_64" ] || [ "`uname -m`" = "amd64" ]; then
170 # fPIC is needed to make shared objects link
171 # setting visibility to hidden is necessary to avoid strange crashes
172 # due to symbol clashing
173 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
176 id=$$
177 cat >/tmp/conftest-$id.c <<EOF
178 #include <stdio.h>
179 int main(int argc, char **argv)
181 int var=0;
182 char *varp = (char *)&var;
183 *varp=1;
185 printf("%d\n", var);
186 return 0;
190 $CC -o /tmp/conftest-$id /tmp/conftest-$id.c 2>/dev/null
192 if test `/tmp/conftest-$id 2>/dev/null` -gt "1"; then
193 # big endian
194 endian="big"
195 else
196 # little endian
197 endian="little"
199 echo "Simulator environment deemed $endian endian"
201 # use wildcard here to make it work even if it was named *.exe like
202 # on cygwin
203 rm -f /tmp/conftest-$id*
208 # functions for setting up cross-compiler names and options
209 # also set endianess and what the exact recommended gcc version is
210 # the gcc version should most likely match what versions we build with
211 # rockboxdev.sh
213 shcc () {
214 prefixtools sh-elf-
215 GCCOPTS="$CCOPTS -m1"
216 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
217 endian="big"
218 gccchoice="4.0.3"
221 calmrisccc () {
222 prefixtools calmrisc16-unknown-elf-
223 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
224 GCCOPTIMIZE="-fomit-frame-pointer"
225 endian="big"
228 coldfirecc () {
229 prefixtools m68k-elf-
230 GCCOPTS="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
231 GCCOPTIMIZE="-fomit-frame-pointer"
232 endian="big"
233 gccchoice="3.4.6"
236 arm7tdmicc () {
237 prefixtools arm-elf-
238 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
239 if test "X$1" != "Xshort"; then
240 GCCOPTS="$GCCOPTS -mlong-calls"
242 GCCOPTIMIZE="-fomit-frame-pointer"
243 endian="little"
244 gccchoice="4.0.3"
247 arm9tdmicc () {
248 prefixtools arm-elf-
249 GCCOPTS="$CCOPTS -mcpu=arm9tdmi -mlong-calls"
250 GCCOPTIMIZE="-fomit-frame-pointer"
251 endian="little"
252 gccchoice="4.0.3"
255 arm940tbecc () {
256 prefixtools arm-elf-
257 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t -mlong-calls"
258 GCCOPTIMIZE="-fomit-frame-pointer"
259 endian="big"
260 gccchoice="4.0.3"
263 arm946cc () {
264 prefixtools arm-elf-
265 GCCOPTS="$CCOPTS -mcpu=arm9e -mlong-calls"
266 GCCOPTIMIZE="-fomit-frame-pointer"
267 endian="little"
268 gccchoice="4.0.3"
271 arm926ejscc () {
272 prefixtools arm-elf-
273 GCCOPTS="$CCOPTS -mcpu=arm926ej-s -mlong-calls"
274 GCCOPTIMIZE="-fomit-frame-pointer"
275 endian="little"
276 gccchoice="4.0.3"
279 arm1136jfscc () {
280 prefixtools arm-elf-
281 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s -mlong-calls"
282 GCCOPTIMIZE="-fomit-frame-pointer"
283 endian="little"
284 gccchoice="4.0.3"
287 mipselcc () {
288 prefixtools mipsel-elf-
289 GCCOPTS="$CCOPTS -march=mips32 -mno-mips16 -mno-abicalls -mlong-calls"
290 GCCOPTIMIZE="-fomit-frame-pointer"
291 GCCOPTS="$GCCOPTS -fno-pic -fno-builtin -fno-exceptions -ffunction-sections -msoft-float -G 0"
292 endian="little"
293 gccchoice="4.1.2"
296 whichadvanced () {
297 ##################################################################
298 # Prompt for specific developer options
300 echo ""
301 echo "Enter your developer options (press enter when done)"
302 echo -n "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice"
303 if [ "$memory" = "2" ]; then
304 echo -n ", (8)MB MOD"
306 if [ "$modelname" = "h120" ]; then
307 echo -n ", (R)TC MOD"
309 echo ""
311 cont=1
313 while [ $cont = "1" ]; do
315 option=`input`;
317 case $option in
318 [Dd])
319 if [ "yes" = "$profile" ]; then
320 echo "Debug is incompatible with profiling"
321 else
322 echo "define DEBUG"
323 use_debug="yes"
326 [Ll])
327 echo "logf() support enabled"
328 logf="yes"
330 [Ss])
331 echo "Simulator build enabled"
332 simulator="yes"
334 [Pp])
335 if [ "yes" = "$use_debug" ]; then
336 echo "Profiling is incompatible with debug"
337 else
338 echo "Profiling support is enabled"
339 profile="yes"
342 [Vv])
343 echo "Voice build selected"
344 voice="yes"
347 if [ "$memory" = "2" ]; then
348 memory="8"
349 echo "Memory size selected: 8MB"
350 else
351 cont=0
354 [Rr])
355 if [ "$modelname" = "h120" ]; then
356 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
357 have_rtc_alarm="#define HAVE_RTC_ALARM"
358 echo "RTC functions enabled (DS1339/DS3231)"
359 else
360 cont=0
364 cont=0
366 esac
367 done
368 echo "done"
370 if [ "yes" = "$voice" ]; then
371 # Ask about languages to build
372 echo "Select a number for the language to use (default is english)"
373 # The multiple-language feature is currently broken
374 # echo "You may enter a comma-separated list of languages to build"
376 picklang
377 voicelanguage=`whichlang`
379 if [ -z "$voicelanguage" ]; then
380 # pick a default
381 voicelanguage="english"
383 echo "Voice language set to $voicelanguage"
385 # Configure encoder and TTS engine for each language
386 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
387 voiceconfig "$thislang"
388 done
390 if [ "yes" = "$use_debug" ]; then
391 debug="-DDEBUG"
392 GCCOPTS="$GCCOPTS -g -DDEBUG"
394 if [ "yes" = "$logf" ]; then
395 use_logf="#define ROCKBOX_HAS_LOGF 1"
397 if [ "yes" = "$simulator" ]; then
398 debug="-DDEBUG"
399 extradefines="$extradefines -DSIMULATOR"
401 if [ "yes" = "$profile" ]; then
402 extradefines="$extradefines -DRB_PROFILE"
403 PROFILE_OPTS="-finstrument-functions"
407 # Configure voice settings
408 voiceconfig () {
409 thislang=$1
410 echo "Building $thislang voice for $modelname. Select options"
411 echo ""
413 if [ -n "`findtool flite`" ]; then
414 FLITE="F(l)ite "
415 FLITE_OPTS=""
416 DEFAULT_TTS="flite"
417 DEFAULT_TTS_OPTS=$FLITE_OPTS
418 DEFAULT_NOISEFLOOR="500"
419 DEFAULT_CHOICE="L"
421 if [ -n "`findtool espeak`" ]; then
422 ESPEAK="(e)Speak "
423 ESPEAK_OPTS=""
424 DEFAULT_TTS="espeak"
425 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
426 DEFAULT_NOISEFLOOR="500"
427 DEFAULT_CHOICE="e"
429 if [ -n "`findtool festival`" ]; then
430 FESTIVAL="(F)estival "
431 case "$thislang" in
432 "italiano")
433 FESTIVAL_OPTS="--language italian"
435 "espanol")
436 FESTIVAL_OPTS="--language spanish"
438 "finnish")
439 FESTIVAL_OPTS="--language finnish"
441 "czech")
442 FESTIVAL_OPTS="--language czech"
445 FESTIVAL_OPTS=""
447 esac
448 DEFAULT_TTS="festival"
449 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
450 DEFAULT_NOISEFLOOR="500"
451 DEFAULT_CHOICE="F"
453 if [ -n "`findtool swift`" ]; then
454 SWIFT="S(w)ift "
455 SWIFT_OPTS=""
456 DEFAULT_TTS="swift"
457 DEFAULT_TTS_OPTS=$SWIFT_OPTS
458 DEFAULT_NOISEFLOOR="500"
459 DEFAULT_CHOICE="w"
461 # Allow SAPI if Windows is in use
462 if [ -n "`findtool winver`" ]; then
463 SAPI="(S)API "
464 SAPI_OPTS=""
465 DEFAULT_TTS="sapi"
466 DEFAULT_TTS_OPTS=$SAPI_OPTS
467 DEFAULT_NOISEFLOOR="500"
468 DEFAULT_CHOICE="S"
471 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
472 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
473 exit
476 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
477 option=`input`
478 case "$option" in
479 [Ll])
480 TTS_ENGINE="flite"
481 NOISEFLOOR="500" # TODO: check this value
482 TTS_OPTS=$FLITE_OPTS
484 [Ee])
485 TTS_ENGINE="espeak"
486 NOISEFLOOR="500"
487 TTS_OPTS=$ESPEAK_OPTS
489 [Ff])
490 TTS_ENGINE="festival"
491 NOISEFLOOR="500"
492 TTS_OPTS=$FESTIVAL_OPTS
494 [Ss])
495 TTS_ENGINE="sapi"
496 NOISEFLOOR="500"
497 TTS_OPTS=$SAPI_OPTS
499 [Ww])
500 TTS_ENGINE="swift"
501 NOISEFLOOR="500"
502 TTS_OPTS=$SWIFT_OPTS
505 TTS_ENGINE=$DEFAULT_TTS
506 TTS_OPTS=$DEFAULT_TTS_OPTS
507 NOISEFLOOR=$DEFAULT_NOISEFLOOR
508 esac
509 echo "Using $TTS_ENGINE for TTS"
511 # Allow the user to input manual commandline options
512 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
513 USER_TTS_OPTS=`input`
514 if [ -n "$USER_TTS_OPTS" ]; then
515 TTS_OPTS="$USER_TTS_OPTS"
518 echo ""
520 if [ "$swcodec" = "yes" ]; then
521 ENCODER="rbspeexenc"
522 ENC_CMD="rbspeexenc"
523 ENC_OPTS="-q 4 -c 10"
524 else
525 if [ -n "`findtool lame`" ]; then
526 ENCODER="lame"
527 ENC_CMD="lame"
528 ENC_OPTS="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
529 else
530 echo "You need LAME in the system path to build voice files for"
531 echo "HWCODEC targets."
532 exit
536 echo "Using $ENCODER for encoding voice clips"
538 # Allow the user to input manual commandline options
539 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
540 USER_ENC_OPTS=`input`
541 if [ -n "$USER_ENC_OPTS" ]; then
542 ENC_OPTS=$USER_ENC_OPTS
545 TEMPDIR="${pwd}"
546 if [ -n "`findtool cygpath`" ]; then
547 TEMPDIR=`cygpath . -a -w`
551 picklang() {
552 # figure out which languages that are around
553 for file in $rootdir/apps/lang/*.lang; do
554 clean=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
555 langs="$langs $clean"
556 done
558 num=1
559 for one in $langs; do
560 echo "$num. $one"
561 num=`expr $num + 1`
562 done
564 read pick
567 whichlang() {
568 output=""
569 # Allow the user to pass a comma-separated list of langauges
570 for thispick in `echo $pick | sed 's/,/ /g'`; do
571 num=1
572 for one in $langs; do
573 # Accept both the language number and name
574 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
575 if [ "$output" = "" ]; then
576 output=$one
577 else
578 output=$output,$one
581 num=`expr $num + 1`
582 done
583 done
584 echo $output
587 opt=$1
589 if test "$opt" = "--help"; then
590 echo "Rockbox configure script."
591 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
592 echo "Do *NOT* run this within the tools directory!"
593 echo ""
594 cat <<EOF
595 Usage: configure [OPTION]...
596 Options:
597 --target=TARGET Sets the target, TARGET can be either the target ID or
598 corresponding string. Run without this option to see all
599 available targets.
601 --ram=RAM Sets the RAM for certain targets. Even though any number
602 is accepted, not every number is correct. The default
603 value will be applied, if you entered a wrong number
604 (which depends on the target). Watch the output. Run
605 without this option if you are not sure which the right
606 number is.
608 --type=TYPE Sets the build type. The shortcut is also valid.
609 Run without this option to see available types.
610 --ccache Enable ccache use (done by default these days)
611 --no-ccache Disable ccache use
612 --help Shows this message (must not be used with other options)
616 exit
619 if test -r "configure"; then
620 # this is a check for a configure script in the current directory, it there
621 # is one, try to figure out if it is this one!
623 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
624 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
625 echo "It will only cause you pain and grief. Instead do this:"
626 echo ""
627 echo " cd .."
628 echo " mkdir build-dir"
629 echo " cd build-dir"
630 echo " ../tools/configure"
631 echo ""
632 echo "Much happiness will arise from this. Enjoy"
633 exit
637 # get our current directory
638 pwd=`pwd`;
640 if { echo $pwd | grep " "; } then
641 echo "You're running this script in a path that contains space. The build"
642 echo "system is unfortunately not clever enough to deal with this. Please"
643 echo "run the script from a different path, rename the path or fix the build"
644 echo "system!"
645 exit
648 if [ -z "$rootdir" ]; then
649 ##################################################################
650 # Figure out where the source code root is!
652 rootdir=`dirname $0`/../
654 #####################################################################
655 # Convert the possibly relative directory name to an absolute version
657 now=`pwd`
658 cd $rootdir
659 rootdir=`pwd`
661 # cd back to the build dir
662 cd $now
665 apps="apps"
666 appsdir='\$(ROOTDIR)/apps'
667 firmdir='\$(ROOTDIR)/firmware'
668 toolsdir='\$(ROOTDIR)/tools'
671 ##################################################################
672 # Figure out target platform
675 if [ "1" != `parse_args --target` ]; then
676 buildfor=`parse_args --target`;
677 else
678 echo "Enter target platform:"
679 cat <<EOF
680 ==Archos== ==iriver== ==Apple iPod==
681 0) Player/Studio 10) H120/H140 20) Color/Photo
682 1) Recorder 11) H320/H340 21) Nano
683 2) FM Recorder 12) iHP-100/110/115 22) Video
684 3) Recorder v2 13) iFP-790 23) 3G
685 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
686 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
687 6) AV300 26) Mini 2G
688 ==Toshiba== 27) 1G, 2G
689 40) Gigabeat F
690 ==Cowon/iAudio== 41) Gigabeat S ==SanDisk==
691 30) X5/X5V/X5L 50) Sansa e200
692 31) M5/M5L ==Tatung== 51) Sansa e200R
693 32) 7 60) Elio TPJ-1022 52) Sansa c200
694 33) D2 53) Sansa m200
695 34) M3/M3L ==Olympus== 54) Sansa c100
696 70) M:Robe 500 55) Sansa Clip
697 ==Creative== 71) M:Robe 100 56) Sansa e200v2
698 90) Zen Vision:M 30GB 57) Sansa m200v4
699 91) Zen Vision:M 60GB ==Philips== 58) Sansa Fuze
700 92) Zen Vision 100) GoGear SA9200
701 101) GoGear HDD1630 ==Logik==
702 ==Onda== 80) DAX 1GB MP3/DAB
703 120) VX747 ==Meizu==
704 121) VX767 110) M6SL
705 111) M6SP
706 112) M3
710 buildfor=`input`;
713 # Set of tools built for all target platforms:
714 toolset="rdf2binary convbdf codepages"
716 # Toolsets for some target families:
717 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
718 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
719 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
720 ipodbitmaptools="$toolset scramble bmp2rb"
721 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
722 tccbitmaptools="$toolset scramble mktccboot bmp2rb"
723 # generic is used by IFP, Meizu and Onda
724 genericbitmaptools="$toolset bmp2rb"
725 # scramble is used by all other targets
726 scramblebitmaptools="$genericbitmaptools scramble"
729 # ---- For each target ----
731 # *Variables*
732 # target_id: a unique number identifying this target, IS NOT the menu number.
733 # Just use the currently highest number+1 when you add a new
734 # target.
735 # modelname: short model name used all over to identify this target
736 # memory: number of megabytes of RAM this target has. If the amount can
737 # be selected by the size prompt, let memory be unset here
738 # target: -Ddefine passed to the build commands to make the correct
739 # config-*.h file get included etc
740 # tool: the tool that takes a plain binary and converts that into a
741 # working "firmware" file for your target
742 # output: the final output file name
743 # boottool: the tool that takes a plain binary and generates a bootloader
744 # file for your target (or blank to use $tool)
745 # bootoutput:the final output file name for the bootloader (or blank to use
746 # $output)
747 # appextra: passed to the APPEXTRA variable in the Makefiles.
748 # TODO: add proper explanation
749 # archosrom: used only for Archos targets that build a special flashable .ucl
750 # image.
751 # flash: name of output for flashing, for targets where there's a special
752 # file output for this.
753 # plugins: set to 'yes' to build the plugins. Early development builds can
754 # set this to no in the early stages to have an easier life for a
755 # while
756 # swcodec: set 'yes' on swcodec targets
757 # toolset: lists what particular tools in the tools/ directory that this
758 # target needs to have built prior to building Rockbox
760 # *Functions*
761 # *cc: sets up gcc and compiler options for your target builds. Note
762 # that if you select a simulator build, the compiler selection is
763 # overridden later in the script.
765 case $buildfor in
767 0|player)
768 target_id=1
769 modelname="player"
770 target="-DARCHOS_PLAYER"
771 shcc
772 tool="$rootdir/tools/scramble"
773 output="archos.mod"
774 appextra="player:gui"
775 archosrom="$pwd/rombox.ucl"
776 flash="$pwd/rockbox.ucl"
777 plugins="yes"
778 swcodec=""
780 # toolset is the tools within the tools directory that we build for
781 # this particular target.
782 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
784 # Note: the convbdf is present in the toolset just because: 1) the
785 # firmware/Makefile assumes it is present always, and 2) we will need it when we
786 # build the player simulator
788 t_cpu="sh"
789 t_manufacturer="archos"
790 t_model="player"
793 1|recorder)
794 target_id=2
795 modelname="recorder"
796 target="-DARCHOS_RECORDER"
797 shcc
798 tool="$rootdir/tools/scramble"
799 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
800 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
801 output="ajbrec.ajz"
802 appextra="recorder:gui"
803 #archosrom="$pwd/rombox.ucl"
804 flash="$pwd/rockbox.ucl"
805 plugins="yes"
806 swcodec=""
807 # toolset is the tools within the tools directory that we build for
808 # this particular target.
809 toolset=$archosbitmaptools
810 t_cpu="sh"
811 t_manufacturer="archos"
812 t_model="recorder"
815 2|fmrecorder)
816 target_id=3
817 modelname="fmrecorder"
818 target="-DARCHOS_FMRECORDER"
819 shcc
820 tool="$rootdir/tools/scramble -fm"
821 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
822 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
823 output="ajbrec.ajz"
824 appextra="recorder:gui"
825 #archosrom="$pwd/rombox.ucl"
826 flash="$pwd/rockbox.ucl"
827 plugins="yes"
828 swcodec=""
829 # toolset is the tools within the tools directory that we build for
830 # this particular target.
831 toolset=$archosbitmaptools
832 t_cpu="sh"
833 t_manufacturer="archos"
834 t_model="fm_v2"
837 3|recorderv2)
838 target_id=4
839 modelname="recorderv2"
840 target="-DARCHOS_RECORDERV2"
841 shcc
842 tool="$rootdir/tools/scramble -v2"
843 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
844 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
845 output="ajbrec.ajz"
846 appextra="recorder:gui"
847 #archosrom="$pwd/rombox.ucl"
848 flash="$pwd/rockbox.ucl"
849 plugins="yes"
850 swcodec=""
851 # toolset is the tools within the tools directory that we build for
852 # this particular target.
853 toolset=$archosbitmaptools
854 t_cpu="sh"
855 t_manufacturer="archos"
856 t_model="fm_v2"
859 4|ondiosp)
860 target_id=7
861 modelname="ondiosp"
862 target="-DARCHOS_ONDIOSP"
863 shcc
864 tool="$rootdir/tools/scramble -osp"
865 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
866 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
867 output="ajbrec.ajz"
868 appextra="recorder:gui"
869 archosrom="$pwd/rombox.ucl"
870 flash="$pwd/rockbox.ucl"
871 plugins="yes"
872 swcodec=""
873 # toolset is the tools within the tools directory that we build for
874 # this particular target.
875 toolset=$archosbitmaptools
876 t_cpu="sh"
877 t_manufacturer="archos"
878 t_model="ondio"
881 5|ondiofm)
882 target_id=8
883 modelname="ondiofm"
884 target="-DARCHOS_ONDIOFM"
885 shcc
886 tool="$rootdir/tools/scramble -ofm"
887 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
888 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
889 output="ajbrec.ajz"
890 appextra="recorder:gui"
891 #archosrom="$pwd/rombox.ucl"
892 flash="$pwd/rockbox.ucl"
893 plugins="yes"
894 swcodec=""
895 toolset=$archosbitmaptools
896 t_cpu="sh"
897 t_manufacturer="archos"
898 t_model="ondio"
901 6|av300)
902 target_id=38
903 modelname="av300"
904 target="-DARCHOS_AV300"
905 memory=16 # always
906 arm7tdmicc
907 tool="$rootdir/tools/scramble -mm=C"
908 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
909 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
910 output="cjbm.ajz"
911 appextra="recorder:gui"
912 plugins="yes"
913 swcodec=""
914 # toolset is the tools within the tools directory that we build for
915 # this particular target.
916 toolset="$toolset scramble descramble bmp2rb"
917 # architecture, manufacturer and model for the target-tree build
918 t_cpu="arm"
919 t_manufacturer="archos"
920 t_model="av300"
923 10|h120)
924 target_id=9
925 modelname="h120"
926 target="-DIRIVER_H120"
927 memory=32 # always
928 coldfirecc
929 tool="$rootdir/tools/scramble -add=h120"
930 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
931 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
932 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
933 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
934 output="rockbox.iriver"
935 appextra="recorder:gui"
936 flash="$pwd/rombox.iriver"
937 plugins="yes"
938 swcodec="yes"
939 # toolset is the tools within the tools directory that we build for
940 # this particular target.
941 toolset=$iriverbitmaptools
942 t_cpu="coldfire"
943 t_manufacturer="iriver"
944 t_model="h100"
947 11|h300)
948 target_id=10
949 modelname="h300"
950 target="-DIRIVER_H300"
951 memory=32 # always
952 coldfirecc
953 tool="$rootdir/tools/scramble -add=h300"
954 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
955 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
956 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
957 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
958 output="rockbox.iriver"
959 appextra="recorder:gui"
960 plugins="yes"
961 swcodec="yes"
962 # toolset is the tools within the tools directory that we build for
963 # this particular target.
964 toolset=$iriverbitmaptools
965 t_cpu="coldfire"
966 t_manufacturer="iriver"
967 t_model="h300"
970 12|h100)
971 target_id=11
972 modelname="h100"
973 target="-DIRIVER_H100"
974 memory=16 # always
975 coldfirecc
976 tool="$rootdir/tools/scramble -add=h100"
977 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
978 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
979 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
980 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
981 output="rockbox.iriver"
982 appextra="recorder:gui"
983 flash="$pwd/rombox.iriver"
984 plugins="yes"
985 swcodec="yes"
986 # toolset is the tools within the tools directory that we build for
987 # this particular target.
988 toolset=$iriverbitmaptools
989 t_cpu="coldfire"
990 t_manufacturer="iriver"
991 t_model="h100"
994 13|ifp7xx)
995 target_id=19
996 modelname="ifp7xx"
997 target="-DIRIVER_IFP7XX"
998 memory=1
999 arm7tdmicc short
1000 tool="cp"
1001 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1002 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1003 output="rockbox.wma"
1004 appextra="recorder:gui"
1005 plugins="yes"
1006 swcodec="yes"
1007 # toolset is the tools within the tools directory that we build for
1008 # this particular target.
1009 toolset=$genericbitmaptools
1010 t_cpu="arm"
1011 t_manufacturer="pnx0101"
1012 t_model="iriver-ifp7xx"
1015 14|h10)
1016 target_id=22
1017 modelname="h10"
1018 target="-DIRIVER_H10"
1019 memory=32 # always
1020 arm7tdmicc
1021 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1022 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1023 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1024 output="rockbox.mi4"
1025 appextra="recorder:gui"
1026 plugins="yes"
1027 swcodec="yes"
1028 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1029 bootoutput="H10_20GC.mi4"
1030 # toolset is the tools within the tools directory that we build for
1031 # this particular target.
1032 toolset=$scramblebitmaptools
1033 # architecture, manufacturer and model for the target-tree build
1034 t_cpu="arm"
1035 t_manufacturer="iriver"
1036 t_model="h10"
1039 15|h10_5gb)
1040 target_id=24
1041 modelname="h10_5gb"
1042 target="-DIRIVER_H10_5GB"
1043 memory=32 # always
1044 arm7tdmicc
1045 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1046 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1047 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1048 output="rockbox.mi4"
1049 appextra="recorder:gui"
1050 plugins="yes"
1051 swcodec="yes"
1052 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1053 bootoutput="H10.mi4"
1054 # toolset is the tools within the tools directory that we build for
1055 # this particular target.
1056 toolset=$scramblebitmaptools
1057 # architecture, manufacturer and model for the target-tree build
1058 t_cpu="arm"
1059 t_manufacturer="iriver"
1060 t_model="h10"
1063 20|ipodcolor)
1064 target_id=13
1065 modelname="ipodcolor"
1066 target="-DIPOD_COLOR"
1067 memory=32 # always
1068 arm7tdmicc
1069 tool="$rootdir/tools/scramble -add=ipco"
1070 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1071 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1072 output="rockbox.ipod"
1073 appextra="recorder:gui"
1074 plugins="yes"
1075 swcodec="yes"
1076 bootoutput="bootloader-$modelname.ipod"
1077 # toolset is the tools within the tools directory that we build for
1078 # this particular target.
1079 toolset=$ipodbitmaptools
1080 # architecture, manufacturer and model for the target-tree build
1081 t_cpu="arm"
1082 t_manufacturer="ipod"
1083 t_model="color"
1086 21|ipodnano)
1087 target_id=14
1088 modelname="ipodnano"
1089 target="-DIPOD_NANO"
1090 memory=32 # always
1091 arm7tdmicc
1092 tool="$rootdir/tools/scramble -add=nano"
1093 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1094 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1095 output="rockbox.ipod"
1096 appextra="recorder:gui"
1097 plugins="yes"
1098 swcodec="yes"
1099 bootoutput="bootloader-$modelname.ipod"
1100 # toolset is the tools within the tools directory that we build for
1101 # this particular target.
1102 toolset=$ipodbitmaptools
1103 # architecture, manufacturer and model for the target-tree build
1104 t_cpu="arm"
1105 t_manufacturer="ipod"
1106 t_model="nano"
1109 22|ipodvideo)
1110 target_id=15
1111 modelname="ipodvideo"
1112 target="-DIPOD_VIDEO"
1113 arm7tdmicc
1114 tool="$rootdir/tools/scramble -add=ipvd"
1115 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1116 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1117 output="rockbox.ipod"
1118 appextra="recorder:gui"
1119 plugins="yes"
1120 swcodec="yes"
1121 bootoutput="bootloader-$modelname.ipod"
1122 # toolset is the tools within the tools directory that we build for
1123 # this particular target.
1124 toolset=$ipodbitmaptools
1125 # architecture, manufacturer and model for the target-tree build
1126 t_cpu="arm"
1127 t_manufacturer="ipod"
1128 t_model="video"
1131 23|ipod3g)
1132 target_id=16
1133 modelname="ipod3g"
1134 target="-DIPOD_3G"
1135 memory=32 # always
1136 arm7tdmicc
1137 tool="$rootdir/tools/scramble -add=ip3g"
1138 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1139 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1140 output="rockbox.ipod"
1141 appextra="recorder:gui"
1142 plugins="yes"
1143 swcodec="yes"
1144 bootoutput="bootloader-$modelname.ipod"
1145 # toolset is the tools within the tools directory that we build for
1146 # this particular target.
1147 toolset=$ipodbitmaptools
1148 # architecture, manufacturer and model for the target-tree build
1149 t_cpu="arm"
1150 t_manufacturer="ipod"
1151 t_model="3g"
1154 24|ipod4g)
1155 target_id=17
1156 modelname="ipod4g"
1157 target="-DIPOD_4G"
1158 memory=32 # always
1159 arm7tdmicc
1160 tool="$rootdir/tools/scramble -add=ip4g"
1161 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1162 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1163 output="rockbox.ipod"
1164 appextra="recorder:gui"
1165 plugins="yes"
1166 swcodec="yes"
1167 bootoutput="bootloader-$modelname.ipod"
1168 # toolset is the tools within the tools directory that we build for
1169 # this particular target.
1170 toolset=$ipodbitmaptools
1171 # architecture, manufacturer and model for the target-tree build
1172 t_cpu="arm"
1173 t_manufacturer="ipod"
1174 t_model="4g"
1177 25|ipodmini)
1178 target_id=18
1179 modelname="ipodmini"
1180 target="-DIPOD_MINI"
1181 memory=32 # always
1182 arm7tdmicc
1183 tool="$rootdir/tools/scramble -add=mini"
1184 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1185 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1186 output="rockbox.ipod"
1187 appextra="recorder:gui"
1188 plugins="yes"
1189 swcodec="yes"
1190 bootoutput="bootloader-$modelname.ipod"
1191 # toolset is the tools within the tools directory that we build for
1192 # this particular target.
1193 toolset=$ipodbitmaptools
1194 # architecture, manufacturer and model for the target-tree build
1195 t_cpu="arm"
1196 t_manufacturer="ipod"
1197 t_model="mini"
1200 26|ipodmini2g)
1201 target_id=21
1202 modelname="ipodmini2g"
1203 target="-DIPOD_MINI2G"
1204 memory=32 # always
1205 arm7tdmicc
1206 tool="$rootdir/tools/scramble -add=mn2g"
1207 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1208 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1209 output="rockbox.ipod"
1210 appextra="recorder:gui"
1211 plugins="yes"
1212 swcodec="yes"
1213 bootoutput="bootloader-$modelname.ipod"
1214 # toolset is the tools within the tools directory that we build for
1215 # this particular target.
1216 toolset=$ipodbitmaptools
1217 # architecture, manufacturer and model for the target-tree build
1218 t_cpu="arm"
1219 t_manufacturer="ipod"
1220 t_model="mini2g"
1223 27|ipod1g2g)
1224 target_id=29
1225 modelname="ipod1g2g"
1226 target="-DIPOD_1G2G"
1227 memory=32 # always
1228 arm7tdmicc
1229 tool="$rootdir/tools/scramble -add=1g2g"
1230 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1231 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1232 output="rockbox.ipod"
1233 appextra="recorder:gui"
1234 plugins="yes"
1235 swcodec="yes"
1236 bootoutput="bootloader-$modelname.ipod"
1237 # toolset is the tools within the tools directory that we build for
1238 # this particular target.
1239 toolset=$ipodbitmaptools
1240 # architecture, manufacturer and model for the target-tree build
1241 t_cpu="arm"
1242 t_manufacturer="ipod"
1243 t_model="1g2g"
1246 30|x5)
1247 target_id=12
1248 modelname="x5"
1249 target="-DIAUDIO_X5"
1250 memory=16 # always
1251 coldfirecc
1252 tool="$rootdir/tools/scramble -add=iax5"
1253 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1254 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1255 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1256 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1257 output="rockbox.iaudio"
1258 appextra="recorder:gui"
1259 plugins="yes"
1260 swcodec="yes"
1261 # toolset is the tools within the tools directory that we build for
1262 # this particular target.
1263 toolset="$iaudiobitmaptools"
1264 # architecture, manufacturer and model for the target-tree build
1265 t_cpu="coldfire"
1266 t_manufacturer="iaudio"
1267 t_model="x5"
1270 31|m5)
1271 target_id=28
1272 modelname="m5"
1273 target="-DIAUDIO_M5"
1274 memory=16 # always
1275 coldfirecc
1276 tool="$rootdir/tools/scramble -add=iam5"
1277 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1278 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1279 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1280 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1281 output="rockbox.iaudio"
1282 appextra="recorder:gui"
1283 plugins="yes"
1284 swcodec="yes"
1285 # toolset is the tools within the tools directory that we build for
1286 # this particular target.
1287 toolset="$iaudiobitmaptools"
1288 # architecture, manufacturer and model for the target-tree build
1289 t_cpu="coldfire"
1290 t_manufacturer="iaudio"
1291 t_model="m5"
1294 32|iaudio7)
1295 target_id=32
1296 modelname="iaudio7"
1297 target="-DIAUDIO_7"
1298 memory=16 # always
1299 arm946cc
1300 tool="$rootdir/tools/scramble -add=i7"
1301 boottool="$rootdir/tools/scramble -tcc=crc"
1302 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1303 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1304 output="rockbox.iaudio"
1305 appextra="recorder:gui"
1306 plugins="yes"
1307 swcodec="yes"
1308 bootoutput="I7_FW.BIN"
1309 # toolset is the tools within the tools directory that we build for
1310 # this particular target.
1311 toolset="$tccbitmaptools"
1312 # architecture, manufacturer and model for the target-tree build
1313 t_cpu="arm"
1314 t_manufacturer="tcc77x"
1315 t_model="iaudio7"
1318 33|cowond2)
1319 target_id=34
1320 modelname="cowond2"
1321 target="-DCOWON_D2"
1322 memory=32
1323 arm926ejscc
1324 tool="$rootdir/tools/scramble -add=d2"
1325 boottool="$rootdir/tools/scramble -tcc=crc"
1326 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1327 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1328 output="rockbox.d2"
1329 appextra="recorder:gui"
1330 plugins="yes"
1331 swcodec="yes"
1332 toolset="$tccbitmaptools"
1333 # architecture, manufacturer and model for the target-tree build
1334 t_cpu="arm"
1335 t_manufacturer="tcc780x"
1336 t_model="cowond2"
1339 34|m3)
1340 target_id=37
1341 modelname="m3"
1342 target="-DIAUDIO_M3"
1343 memory=16 # always
1344 coldfirecc
1345 tool="$rootdir/tools/scramble -add=iam3"
1346 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1347 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1348 output="rockbox.iaudio"
1349 appextra="recorder:gui"
1350 plugins="yes"
1351 swcodec="yes"
1352 # toolset is the tools within the tools directory that we build for
1353 # this particular target.
1354 toolset="$iaudiobitmaptools"
1355 # architecture, manufacturer and model for the target-tree build
1356 t_cpu="coldfire"
1357 t_manufacturer="iaudio"
1358 t_model="m3"
1361 40|gigabeatf)
1362 target_id=20
1363 modelname="gigabeatf"
1364 target="-DGIGABEAT_F"
1365 memory=32 # always
1366 arm9tdmicc
1367 tool="$rootdir/tools/scramble -add=giga"
1368 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1369 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1370 output="rockbox.gigabeat"
1371 appextra="recorder:gui"
1372 plugins="yes"
1373 swcodec="yes"
1374 toolset=$gigabeatbitmaptools
1375 boottool="$rootdir/tools/scramble -gigabeat"
1376 bootoutput="FWIMG01.DAT"
1377 # architecture, manufacturer and model for the target-tree build
1378 t_cpu="arm"
1379 t_manufacturer="s3c2440"
1380 t_model="gigabeat-fx"
1383 41|gigabeats)
1384 target_id=26
1385 modelname="gigabeats"
1386 target="-DGIGABEAT_S"
1387 memory=64
1388 arm1136jfscc
1389 tool="$rootdir/tools/scramble -add=gigs"
1390 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1391 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1392 output="rockbox.gigabeat"
1393 appextra="recorder:gui"
1394 plugins="yes"
1395 swcodec="yes"
1396 toolset="$gigabeatbitmaptools mknkboot"
1397 boottool="$rootdir/tools/scramble -gigabeats"
1398 bootoutput="nk.bin"
1399 # architecture, manufacturer and model for the target-tree build
1400 t_cpu="arm"
1401 t_manufacturer="imx31"
1402 t_model="gigabeat-s"
1405 70|mrobe500)
1406 target_id=36
1407 modelname="mrobe500"
1408 target="-DMROBE_500"
1409 memory=64 # always
1410 arm926ejscc
1411 # tool="$rootdir/tools/scramble -add=m500"
1412 tool="cp "
1413 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1414 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1415 output="rockbox.mrobe500"
1416 appextra="recorder:gui"
1417 plugins="yes"
1418 swcodec="yes"
1419 toolset=$gigabeatbitmaptools
1420 boottool="cp "
1421 bootoutput="rockbox.mrboot"
1422 # architecture, manufacturer and model for the target-tree build
1423 t_cpu="arm"
1424 t_manufacturer="tms320dm320"
1425 t_model="mrobe-500"
1428 71|mrobe100)
1429 target_id=33
1430 modelname="mrobe100"
1431 target="-DMROBE_100"
1432 memory=32 # always
1433 arm7tdmicc
1434 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1435 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1436 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1437 output="rockbox.mi4"
1438 appextra="recorder:gui"
1439 plugins="yes"
1440 swcodec="yes"
1441 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1442 bootoutput="pp5020.mi4"
1443 # toolset is the tools within the tools directory that we build for
1444 # this particular target.
1445 toolset=$scramblebitmaptools
1446 # architecture, manufacturer and model for the target-tree build
1447 t_cpu="arm"
1448 t_manufacturer="olympus"
1449 t_model="mrobe-100"
1452 80|logikdax)
1453 target_id=31
1454 modelname="logikdax"
1455 target="-DLOGIK_DAX"
1456 memory=2 # always
1457 arm946cc
1458 tool="$rootdir/tools/scramble -add=ldax"
1459 boottool="$rootdir/tools/scramble -tcc=crc"
1460 bootoutput="player.rom"
1461 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1462 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1463 output="rockbox.logik"
1464 appextra="recorder:gui"
1465 plugins=""
1466 swcodec="yes"
1467 # toolset is the tools within the tools directory that we build for
1468 # this particular target.
1469 toolset=$tccbitmaptools
1470 # architecture, manufacturer and model for the target-tree build
1471 t_cpu="arm"
1472 t_manufacturer="tcc77x"
1473 t_model="logikdax"
1476 90|creativezvm30gb)
1477 target_id=35
1478 modelname="creativezvm30"
1479 target="-DCREATIVE_ZVM"
1480 memory=64
1481 arm926ejscc
1482 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1483 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1484 tool="$rootdir/tools/scramble -creative=zvm"
1485 USE_ELF="yes"
1486 output="rockbox.zvm"
1487 appextra="recorder:gui"
1488 plugins=""
1489 swcodec="yes"
1490 toolset=$ipodbitmaptools
1491 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1492 bootoutput="rockbox.zvmboot"
1493 # architecture, manufacturer and model for the target-tree build
1494 t_cpu="arm"
1495 t_manufacturer="tms320dm320"
1496 t_model="creative-zvm"
1499 91|creativezvm60gb)
1500 target_id=40
1501 modelname="creativezvm60"
1502 target="-DCREATIVE_ZVM60GB"
1503 memory=64
1504 arm926ejscc
1505 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1506 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1507 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1508 USE_ELF="yes"
1509 output="rockbox.zvm60"
1510 appextra="recorder:gui"
1511 plugins=""
1512 swcodec="yes"
1513 toolset=$ipodbitmaptools
1514 boottool="$rootdir/tools/scramble -creative=zvm60"
1515 bootoutput="rockbox.zvm60boot"
1516 # architecture, manufacturer and model for the target-tree build
1517 t_cpu="arm"
1518 t_manufacturer="tms320dm320"
1519 t_model="creative-zvm"
1522 92|creativezenvision)
1523 target_id=39
1524 modelname="creativezv"
1525 target="-DCREATIVE_ZV"
1526 memory=64
1527 arm926ejscc
1528 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1529 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1530 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1531 USE_ELF="yes"
1532 output="rockbox.zv"
1533 appextra="recorder:gui"
1534 plugins=""
1535 swcodec="yes"
1536 toolset=$ipodbitmaptools
1537 boottool="$rootdir/tools/scramble -creative=zenvision"
1538 bootoutput="rockbox.zvboot"
1539 # architecture, manufacturer and model for the target-tree build
1540 t_cpu="arm"
1541 t_manufacturer="tms320dm320"
1542 t_model="creative-zvm"
1545 50|e200)
1546 target_id=23
1547 modelname="e200"
1548 target="-DSANSA_E200"
1549 memory=32 # supposedly
1550 arm7tdmicc
1551 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1552 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1553 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1554 output="rockbox.mi4"
1555 appextra="recorder:gui"
1556 plugins="yes"
1557 swcodec="yes"
1558 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1559 bootoutput="PP5022.mi4"
1560 # toolset is the tools within the tools directory that we build for
1561 # this particular target.
1562 toolset=$scramblebitmaptools
1563 # architecture, manufacturer and model for the target-tree build
1564 t_cpu="arm"
1565 t_manufacturer="sandisk"
1566 t_model="sansa-e200"
1569 51|e200r)
1570 # the e200R model is pretty much identical to the e200, it only has a
1571 # different option to the scramble tool when building a bootloader and
1572 # makes the bootloader output file name in all lower case.
1573 target_id=27
1574 modelname="e200r"
1575 target="-DSANSA_E200"
1576 memory=32 # supposedly
1577 arm7tdmicc
1578 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1579 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1580 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1581 output="rockbox.mi4"
1582 appextra="recorder:gui"
1583 plugins="yes"
1584 swcodec="yes"
1585 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1586 bootoutput="pp5022.mi4"
1587 # toolset is the tools within the tools directory that we build for
1588 # this particular target.
1589 toolset=$scramblebitmaptools
1590 # architecture, manufacturer and model for the target-tree build
1591 t_cpu="arm"
1592 t_manufacturer="sandisk"
1593 t_model="sansa-e200"
1596 52|c200)
1597 target_id=30
1598 modelname="c200"
1599 target="-DSANSA_C200"
1600 memory=32 # supposedly
1601 arm7tdmicc
1602 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1603 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1604 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1605 output="rockbox.mi4"
1606 appextra="recorder:gui"
1607 plugins="yes"
1608 swcodec="yes"
1609 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1610 bootoutput="firmware.mi4"
1611 # toolset is the tools within the tools directory that we build for
1612 # this particular target.
1613 toolset=$scramblebitmaptools
1614 # architecture, manufacturer and model for the target-tree build
1615 t_cpu="arm"
1616 t_manufacturer="sandisk"
1617 t_model="sansa-c200"
1620 53|m200)
1621 target_id=48
1622 modelname="m200"
1623 target="-DSANSA_M200"
1624 memory=1 # always
1625 arm946cc
1626 tool="$rootdir/tools/scramble -add=m200"
1627 boottool="$rootdir/tools/scramble -tcc=crc"
1628 bootoutput="player.rom"
1629 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1630 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1631 output="rockbox.m200"
1632 appextra="recorder:gui"
1633 plugins=""
1634 swcodec="yes"
1635 # toolset is the tools within the tools directory that we build for
1636 # this particular target.
1637 toolset=$tccbitmaptools
1638 # architecture, manufacturer and model for the target-tree build
1639 t_cpu="arm"
1640 t_manufacturer="tcc77x"
1641 t_model="m200"
1644 54|c100)
1645 target_id=42
1646 modelname="c100"
1647 target="-DSANSA_C100"
1648 memory=32 # unsure, must check
1649 arm946cc
1650 tool="$rootdir/tools/scramble -add=c100"
1651 boottool="$rootdir/tools/scramble -tcc=crc"
1652 bootoutput="player.rom"
1653 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1654 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1655 output="rockbox.c100"
1656 appextra="recorder:gui"
1657 plugins=""
1658 # toolset is the tools within the tools directory that we build for
1659 # this particular target.
1660 toolset=$tccbitmaptools
1661 # architecture, manufacturer and model for the target-tree build
1662 t_cpu="arm"
1663 t_manufacturer="tcc77x"
1664 t_model="c100"
1667 55|Clip|clip)
1668 target_id=50
1669 modelname="clip"
1670 target="-DSANSA_CLIP"
1671 memory=2
1672 arm9tdmicc
1673 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1674 bmp2rb_native="$bmp2rb_mono"
1675 tool="$rootdir/tools/scramble -add=clip"
1676 output="rockbox.sansa"
1677 bootoutput="bootloader-clip.sansa"
1678 appextra="recorder:gui"
1679 plugins=""
1680 swcodec="yes"
1681 toolset=$scramblebitmaptools
1682 t_cpu="arm"
1683 t_manufacturer="as3525"
1684 t_model="sansa-clip"
1688 56|e200v2)
1689 target_id=51
1690 modelname="e200v2"
1691 target="-DSANSA_E200V2"
1692 memory=8
1693 arm9tdmicc
1694 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1695 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1696 tool="$rootdir/tools/scramble -add=e2v2"
1697 output="rockbox.sansa"
1698 bootoutput="bootloader-e200v2.sansa"
1699 appextra="recorder:gui"
1700 plugins="yes"
1701 swcodec="yes"
1702 toolset=$scramblebitmaptools
1703 t_cpu="arm"
1704 t_manufacturer="as3525"
1705 t_model="sansa-e200v2"
1709 57|m200v4)
1710 target_id=52
1711 modelname="m200v4"
1712 target="-DSANSA_M200V4"
1713 memory=2
1714 arm9tdmicc
1715 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1716 bmp2rb_native="$bmp2rb_mono"
1717 tool="$rootdir/tools/scramble -add=m2v4"
1718 output="rockbox.sansa"
1719 bootoutput="bootloader-m200v4.sansa"
1720 appextra="recorder:gui"
1721 plugins=""
1722 swcodec="yes"
1723 toolset=$scramblebitmaptools
1724 t_cpu="arm"
1725 t_manufacturer="as3525"
1726 t_model="sansa-m200v4"
1730 58|fuze)
1731 target_id=53
1732 modelname="fuze"
1733 target="-DSANSA_FUZE"
1734 memory=8
1735 arm9tdmicc
1736 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1737 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1738 tool="$rootdir/tools/scramble -add=fuze"
1739 output="rockbox.sansa"
1740 bootoutput="bootloader-fuze.sansa"
1741 appextra="recorder:gui"
1742 plugins=""
1743 swcodec="yes"
1744 toolset=$scramblebitmaptools
1745 t_cpu="arm"
1746 t_manufacturer="as3525"
1747 t_model="sansa-fuze"
1751 60|tpj1022)
1752 target_id=25
1753 modelname="tpj1022"
1754 target="-DELIO_TPJ1022"
1755 memory=32 # always
1756 arm7tdmicc
1757 tool="$rootdir/tools/scramble -add tpj2"
1758 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1759 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1760 output="rockbox.elio"
1761 appextra="recorder:gui"
1762 plugins="yes"
1763 swcodec="yes"
1764 boottool="$rootdir/tools/scramble -mi4v2"
1765 bootoutput="pp5020.mi4"
1766 # toolset is the tools within the tools directory that we build for
1767 # this particular target.
1768 toolset=$scramblebitmaptools
1769 # architecture, manufacturer and model for the target-tree build
1770 t_cpu="arm"
1771 t_manufacturer="tatung"
1772 t_model="tpj1022"
1775 100|sa9200)
1776 target_id=41
1777 modelname="sa9200"
1778 target="-DPHILIPS_SA9200"
1779 memory=32 # supposedly
1780 arm7tdmicc
1781 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
1782 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1783 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1784 output="rockbox.mi4"
1785 appextra="recorder:gui"
1786 plugins=""
1787 swcodec="yes"
1788 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
1789 bootoutput="FWImage.ebn"
1790 # toolset is the tools within the tools directory that we build for
1791 # this particular target.
1792 toolset=$scramblebitmaptools
1793 # architecture, manufacturer and model for the target-tree build
1794 t_cpu="arm"
1795 t_manufacturer="philips"
1796 t_model="sa9200"
1799 101|hdd1630)
1800 target_id=43
1801 modelname="hdd1630"
1802 target="-DPHILIPS_HDD1630"
1803 memory=32 # supposedly
1804 arm7tdmicc
1805 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
1806 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1807 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1808 output="rockbox.mi4"
1809 appextra="recorder:gui"
1810 plugins=""
1811 swcodec="yes"
1812 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
1813 bootoutput="FWImage.ebn"
1814 # toolset is the tools within the tools directory that we build for
1815 # this particular target.
1816 toolset=$scramblebitmaptools
1817 # architecture, manufacturer and model for the target-tree build
1818 t_cpu="arm"
1819 t_manufacturer="philips"
1820 t_model="hdd1630"
1823 110|meizum6sl)
1824 target_id=49
1825 modelname="meizum6sl"
1826 target="-DMEIZU_M6SL"
1827 memory=16 # always
1828 arm940tbecc
1829 tool="cp"
1830 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1831 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1832 output="rockbox.meizu"
1833 appextra="recorder:gui"
1834 plugins="no" #FIXME
1835 swcodec="yes"
1836 toolset=$genericbitmaptools
1837 boottool="cp"
1838 bootoutput="rockboot.ebn"
1839 # architecture, manufacturer and model for the target-tree build
1840 t_cpu="arm"
1841 t_manufacturer="s5l8700"
1842 t_model="meizu-m6sl"
1845 111|meizum6sp)
1846 target_id=46
1847 modelname="meizum6sp"
1848 target="-DMEIZU_M6SP"
1849 memory=16 # always
1850 arm940tbecc
1851 tool="cp"
1852 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1853 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1854 output="rockbox.meizu"
1855 appextra="recorder:gui"
1856 plugins="no" #FIXME
1857 swcodec="yes"
1858 toolset=$genericbitmaptools
1859 boottool="cp"
1860 bootoutput="rockboot.ebn"
1861 # architecture, manufacturer and model for the target-tree build
1862 t_cpu="arm"
1863 t_manufacturer="s5l8700"
1864 t_model="meizu-m6sp"
1867 112|meizum3)
1868 target_id=47
1869 modelname="meizum3"
1870 target="-DMEIZU_M3"
1871 memory=16 # always
1872 arm940tbecc
1873 tool="cp"
1874 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1875 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1876 output="rockbox.meizu"
1877 appextra="recorder:gui"
1878 plugins="no" #FIXME
1879 swcodec="yes"
1880 toolset=$genericbitmaptools
1881 boottool="cp"
1882 bootoutput="rockboot.ebn"
1883 # architecture, manufacturer and model for the target-tree build
1884 t_cpu="arm"
1885 t_manufacturer="s5l8700"
1886 t_model="meizu-m3"
1889 120|ondavx747)
1890 target_id=44
1891 modelname="ondavx747"
1892 target="-DONDA_VX747"
1893 memory=16 #FIXME
1894 mipselcc
1895 tool="cp"
1896 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1897 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1898 output="rockbox.vx747"
1899 appextra="recorder:gui"
1900 plugins="no" #FIXME
1901 swcodec="yes"
1902 toolset=$genericbitmaptools
1903 boottool="cp"
1904 bootoutput="rockboot.vx747"
1905 # architecture, manufacturer and model for the target-tree build
1906 t_cpu="mips"
1907 t_manufacturer="ingenic_jz47xx"
1908 t_model="onda_vx747"
1911 121|ondavx767)
1912 target_id=45
1913 modelname="ondavx767"
1914 target="-DONDA_VX767"
1915 memory=16 #FIXME
1916 mipselcc
1917 tool="cp"
1918 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1919 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1920 output="rockbox.vx767"
1921 appextra="recorder:gui"
1922 plugins="no" #FIXME
1923 swcodec="yes"
1924 toolset=$genericbitmaptools
1925 boottool="cp"
1926 bootoutput="rockboot.vx767"
1927 # architecture, manufacturer and model for the target-tree build
1928 t_cpu="mips"
1929 t_manufacturer="ingenic_jz47xx"
1930 t_model="onda_vx767"
1933 echo "Please select a supported target platform!"
1934 exit
1937 esac
1939 echo "Platform set to $modelname"
1942 #remove start
1943 ############################################################################
1944 # Amount of memory, for those that can differ. They have $memory unset at
1945 # this point.
1948 if [ -z "$memory" ]; then
1949 case $target_id in
1951 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1952 if [ "1" != `parse_args --ram` ]; then
1953 size=`parse_args --ram`;
1954 else
1955 size=`input`;
1957 case $size in
1958 60|64)
1959 memory="64"
1962 memory="32"
1964 esac
1967 echo "Enter size of your RAM (in MB): (Defaults to 2)"
1968 if [ "1" != `parse_args --ram` ]; then
1969 size=`parse_args --ram`;
1970 else
1971 size=`input`;
1973 case $size in
1975 memory="8"
1978 memory="2"
1980 esac
1982 esac
1983 echo "Memory size selected: $memory MB"
1984 echo ""
1986 #remove end
1988 ##################################################################
1989 # Figure out build "type"
1992 # the ifp7x0 is the only platform that supports building a gdb stub like
1993 # this
1994 case $modelname in
1995 ifp7xx)
1996 gdbstub="(G)DB stub, "
1998 e200r|e200)
1999 gdbstub="(I)installer, "
2001 c200)
2002 gdbstub="(E)raser, "
2006 esac
2007 if [ "1" != `parse_args --type` ]; then
2008 option=`parse_args --type`;
2009 else
2010 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual: (Defaults to N)"
2011 option=`input`;
2014 case $option in
2015 [Ii])
2016 appsdir='\$(ROOTDIR)/bootloader'
2017 apps="bootloader"
2018 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2019 bootloader="1"
2020 echo "e200R-installer build selected"
2022 [Ee])
2023 appsdir='\$(ROOTDIR)/bootloader'
2024 apps="bootloader"
2025 echo "C2(4)0 or C2(5)0"
2026 variant=`input`
2027 case $variant in
2029 extradefines="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2030 echo "c240 eraser build selected"
2033 extradefines="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2034 echo "c240 eraser build selected"
2036 esac
2037 bootloader="1"
2038 echo "c200 eraser build selected"
2040 [Bb])
2041 if test $t_manufacturer = "archos"; then
2042 # Archos SH-based players do this somewhat differently for
2043 # some reason
2044 appsdir='\$(ROOTDIR)/flash/bootbox'
2045 apps="bootbox"
2046 else
2047 appsdir='\$(ROOTDIR)/bootloader'
2048 apps="bootloader"
2049 flash=""
2050 if test -n "$boottool"; then
2051 tool="$boottool"
2053 if test -n "$bootoutput"; then
2054 output=$bootoutput
2057 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
2058 bootloader="1"
2059 echo "Bootloader build selected"
2061 [Ss])
2062 debug="-DDEBUG"
2063 simulator="yes"
2064 extradefines="-DSIMULATOR"
2065 archosrom=""
2066 flash=""
2067 echo "Simulator build selected"
2069 [Aa])
2070 echo "Advanced build selected"
2071 whichadvanced
2073 [Gg])
2074 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2075 appsdir='\$(ROOTDIR)/gdb'
2076 apps="stub"
2077 case $modelname in
2078 ifp7xx)
2079 output="stub.wma"
2083 esac
2084 echo "GDB stub build selected"
2086 [Mm])
2087 toolset='';
2088 apps="manual"
2089 echo "Manual build selected"
2092 if [ "$modelname" = "e200r" ]; then
2093 echo "Do not use the e200R target for regular builds. Use e200 instead."
2094 exit
2096 debug=""
2097 echo "Normal build selected"
2100 esac
2101 # to be able running "make manual" from non-manual configuration
2102 case $modelname in
2103 fmrecorder)
2104 manualdev="recorderv2fm"
2106 recorderv2)
2107 manualdev="recorderv2fm"
2109 h1??)
2110 manualdev="h1xx"
2112 ipodmini2g)
2113 manualdev="ipodmini"
2116 manualdev=$modelname
2118 esac
2120 if [ -z "$debug" ]; then
2121 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
2124 echo "Using source code root directory: $rootdir"
2126 # this was once possible to change at build-time, but no more:
2127 language="english"
2129 uname=`uname`
2131 if [ "yes" = "$simulator" ]; then
2132 # setup compiler and things for simulator
2133 simcc
2135 if [ -d "simdisk" ]; then
2136 echo "Subdirectory 'simdisk' already present"
2137 else
2138 mkdir simdisk
2139 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2143 # Now, figure out version number of the (gcc) compiler we are about to use
2144 gccver=`$CC -dumpversion`;
2146 # figure out the binutil version too and display it, mostly for the build
2147 # system etc to be able to see it easier
2148 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2150 if [ -z "$gccver" ]; then
2151 echo "WARNING: The compiler you must use ($CC) is not in your path!"
2152 echo "WARNING: this may cause your build to fail since we cannot do the"
2153 echo "WARNING: checks we want now."
2154 else
2156 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2157 # DEPEND on it
2159 num1=`echo $gccver | cut -d . -f1`
2160 num2=`echo $gccver | cut -d . -f2`
2161 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2163 # This makes:
2164 # 3.3.X => 303
2165 # 3.4.X => 304
2166 # 2.95.3 => 295
2168 echo "Using $CC $gccver ($gccnum)"
2170 if test "$gccnum" -ge "400"; then
2171 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2172 # so we ignore that warnings for now
2173 # -Wno-pointer-sign
2174 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2177 if test "$gccnum" -ge "401"; then
2178 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2179 # will break strict-aliasing rules"
2181 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
2184 if test "$gccnum" -ge "402"; then
2185 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2186 # and later would throw it for several valid cases
2187 GCCOPTS="$GCCOPTS -Wno-override-init"
2190 case $prefix in
2192 # simulator
2194 i586-mingw32msvc-)
2195 # cross-compile for win32
2198 # Verify that the cross-compiler is of a recommended version!
2199 if test "$gccver" != "$gccchoice"; then
2200 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2201 echo "WARNING: version $gccchoice!"
2202 echo "WARNING: This may cause your build to fail since it may be a version"
2203 echo "WARNING: that isn't functional or known to not be the best choice."
2204 echo "WARNING: If you suffer from build problems, you know that this is"
2205 echo "WARNING: a likely source for them..."
2208 esac
2213 echo "Using $LD $ldver"
2215 # check the compiler for SH platforms
2216 if test "$CC" = "sh-elf-gcc"; then
2217 if test "$gccnum" -lt "400"; then
2218 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2219 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2220 else
2221 # figure out patch status
2222 gccpatch=`$CC --version`;
2224 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2225 echo "gcc $gccver is rockbox patched"
2226 # then convert -O to -Os to get smaller binaries!
2227 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2228 else
2229 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2230 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2235 if test "$CC" = "m68k-elf-gcc"; then
2236 # convert -O to -Os to get smaller binaries!
2237 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2240 if [ "1" != `parse_args --ccache` ]; then
2241 echo "Enable ccache for building"
2242 ccache="ccache"
2243 else
2244 if [ "1" = `parse_args --no-ccache` ]; then
2245 ccache=`findtool ccache`
2246 if test -n "$ccache"; then
2247 echo "Found and uses ccache ($ccache)"
2252 # figure out the full path to the various commands if possible
2253 HOSTCC=`findtool gcc --lit`
2254 HOSTAR=`findtool ar --lit`
2255 CC=`findtool ${CC} --lit`
2256 LD=`findtool ${AR} --lit`
2257 AR=`findtool ${AR} --lit`
2258 AS=`findtool ${AS} --lit`
2259 OC=`findtool ${OC} --lit`
2260 WINDRES=`findtool ${WINDRES} --lit`
2261 DLLTOOL=`findtool ${DLLTOOL} --lit`
2262 DLLWRAP=`findtool ${DLLWRAP} --lit`
2263 RANLIB=`findtool ${RANLIB} --lit`
2265 if test -n "$ccache"; then
2266 CC="$ccache $CC"
2269 if test "X$endian" = "Xbig"; then
2270 defendian="ROCKBOX_BIG_ENDIAN"
2271 else
2272 defendian="ROCKBOX_LITTLE_ENDIAN"
2275 sed > autoconf.h \
2276 -e "s,@ENDIAN@,${defendian},g" \
2277 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2278 -e "s,@config_rtc@,$config_rtc,g" \
2279 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2280 <<EOF
2281 /* This header was made by configure */
2282 #ifndef __BUILD_AUTOCONF_H
2283 #define __BUILD_AUTOCONF_H
2285 /* Define endianess for the target or simulator platform */
2286 #define @ENDIAN@ 1
2288 /* Define this if you build rockbox to support the logf logging and display */
2289 #undef ROCKBOX_HAS_LOGF
2291 /* optional defines for RTC mod for h1x0 */
2292 @config_rtc@
2293 @have_rtc_alarm@
2295 #endif /* __BUILD_AUTOCONF_H */
2298 if test -n "$t_cpu"; then
2299 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2300 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2301 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2302 GCCOPTS="$GCCOPTS"
2305 if test "$simulator" = "yes"; then
2306 # add simul make stuff on the #SIMUL# line
2307 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2308 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2309 else
2310 # delete the lines that match
2311 simmagic1='/@SIMUL1@/D'
2312 simmagic2='/@SIMUL2@/D'
2315 if test "$swcodec" = "yes"; then
2316 voicetoolset="rbspeexenc voicefont wavtrim"
2317 else
2318 voicetoolset="voicefont wavtrim"
2321 if test "$apps" = "apps"; then
2322 # only when we build "real" apps we build the .lng files
2323 buildlangs="langs"
2326 sed > Makefile \
2327 -e "s,@ROOTDIR@,${rootdir},g" \
2328 -e "s,@DEBUG@,${debug},g" \
2329 -e "s,@MEMORY@,${memory},g" \
2330 -e "s,@TARGET_ID@,${target_id},g" \
2331 -e "s,@TARGET@,${target},g" \
2332 -e "s,@CPU@,${t_cpu},g" \
2333 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2334 -e "s,@MODELNAME@,${modelname},g" \
2335 -e "s,@LANGUAGE@,${language},g" \
2336 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2337 -e "s,@PWD@,${pwd},g" \
2338 -e "s,@HOSTCC@,${HOSTCC},g" \
2339 -e "s,@HOSTAR@,${HOSTAR},g" \
2340 -e "s,@CC@,${CC},g" \
2341 -e "s,@LD@,${LD},g" \
2342 -e "s,@AR@,${AR},g" \
2343 -e "s,@AS@,${AS},g" \
2344 -e "s,@OC@,${OC},g" \
2345 -e "s,@WINDRES@,${WINDRES},g" \
2346 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2347 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2348 -e "s,@RANLIB@,${RANLIB},g" \
2349 -e "s,@TOOL@,${tool},g" \
2350 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2351 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2352 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2353 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2354 -e "s,@OUTPUT@,${output},g" \
2355 -e "s,@APPEXTRA@,${appextra},g" \
2356 -e "s,@ARCHOSROM@,${archosrom},g" \
2357 -e "s,@FLASHFILE@,${flash},g" \
2358 -e "s,@PLUGINS@,${plugins},g" \
2359 -e "s,@CODECS@,${swcodec},g" \
2360 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2361 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2362 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2363 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2364 -e "s!@LDOPTS@!${LDOPTS}!g" \
2365 -e "s,@LOADADDRESS@,${loadaddress},g" \
2366 -e "s,@EXTRADEF@,${extradefines},g" \
2367 -e "s,@APPSDIR@,${appsdir},g" \
2368 -e "s,@FIRMDIR@,${firmdir},g" \
2369 -e "s,@TOOLSDIR@,${toolsdir},g" \
2370 -e "s,@APPS@,${apps},g" \
2371 -e "s,@SIMVER@,${simver},g" \
2372 -e "s,@GCCVER@,${gccver},g" \
2373 -e "s,@GCCNUM@,${gccnum},g" \
2374 -e "s,@UNAME@,${uname},g" \
2375 -e "s,@ENDIAN@,${defendian},g" \
2376 -e "s,@TOOLSET@,${toolset},g" \
2377 -e "${simmagic1}" \
2378 -e "${simmagic2}" \
2379 -e "s,@MANUALDEV@,${manualdev},g" \
2380 -e "s,@ENCODER@,${ENC_CMD},g" \
2381 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2382 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2383 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2384 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2385 -e "s,@LANGS@,${buildlangs},g" \
2386 -e "s,@USE_ELF@,${USE_ELF},g" \
2387 <<EOF
2388 ## Automatically generated. http://www.rockbox.org/
2390 export ROOTDIR=@ROOTDIR@
2391 export FIRMDIR=@FIRMDIR@
2392 export APPSDIR=@APPSDIR@
2393 export TOOLSDIR=@TOOLSDIR@
2394 export DOCSDIR=\$(ROOTDIR)/docs
2395 export MANUALDIR=\${ROOTDIR}/manual
2396 export DEBUG=@DEBUG@
2397 export MODELNAME=@MODELNAME@
2398 export ARCHOSROM=@ARCHOSROM@
2399 export FLASHFILE=@FLASHFILE@
2400 export TARGET_ID=@TARGET_ID@
2401 export TARGET=@TARGET@
2402 export CPU=@CPU@
2403 export MANUFACTURER=@MANUFACTURER@
2404 export OBJDIR=@PWD@
2405 export BUILDDIR=@PWD@
2406 export LANGUAGE=@LANGUAGE@
2407 export VOICELANGUAGE=@VOICELANGUAGE@
2408 export MEMORYSIZE=@MEMORY@
2409 export VERSION:=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
2410 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2411 export MKFIRMWARE=@TOOL@
2412 export BMP2RB_MONO=@BMP2RB_MONO@
2413 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2414 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2415 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2416 export BINARY=@OUTPUT@
2417 export APPEXTRA=@APPEXTRA@
2418 export ENABLEDPLUGINS=@PLUGINS@
2419 export SOFTWARECODECS=@CODECS@
2420 export EXTRA_DEFINES=@EXTRADEF@
2421 export HOSTCC=@HOSTCC@
2422 export HOSTAR=@HOSTAR@
2423 export CC=@CC@
2424 export LD=@LD@
2425 export AR=@AR@
2426 export AS=@AS@
2427 export OC=@OC@
2428 export WINDRES=@WINDRES@
2429 export DLLTOOL=@DLLTOOL@
2430 export DLLWRAP=@DLLWRAP@
2431 export RANLIB=@RANLIB@
2432 export PROFILE_OPTS=@PROFILE_OPTS@
2433 export SIMVER=@SIMVER@
2434 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2435 export GCCOPTS=@GCCOPTS@
2436 export TARGET_INC=@TARGET_INC@
2437 export LOADADDRESS=@LOADADDRESS@
2438 export SHARED_FLAG=@SHARED_FLAG@
2439 export LDOPTS=@LDOPTS@
2440 export GCCVER=@GCCVER@
2441 export GCCNUM=@GCCNUM@
2442 export UNAME=@UNAME@
2443 export MANUALDEV=@MANUALDEV@
2444 export TTS_OPTS=@TTS_OPTS@
2445 export TTS_ENGINE=@TTS_ENGINE@
2446 export ENC_OPTS=@ENC_OPTS@
2447 export ENCODER=@ENCODER@
2448 export USE_ELF=@USE_ELF@
2450 include \$(TOOLSDIR)/root.make
2454 echo "Created Makefile"