Fix manuals, some of them were broken by r18469, by using the correct button macros...
[kugel-rb.git] / tools / configure
blobfd46f035190fc6e27d7e888d33679490656df424
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
69 # parse the argument list, returns the value after the = in case of a
70 # option=value type option, returns 0 in case of --ccache or --no-ccache,
71 # returns 1 if the searched argument type wasn't fount in the argument list
72 # Usage [var = ]`parse_args <argumenttype>`, e.g. `parse_args --target`
74 # var definitons below are needed so that parse_args can see the arguments
75 arg1=$1 arg2=$2 arg3=$3 arg4=$4 arg5=$5 arg6=$6 arg7=$7 arg8=$8 arg9=$9
77 parse_args() {
78 ret="1"
79 for i in $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7 $arg8 $arg9
81 if [ "$1" = "--ccache" ]; then
82 if [ "$i" = "--ccache" ]; then
83 ret="0"
85 elif [ "$1" = "--no-ccache" ]; then
86 if [ "$i" = "--no-ccache" ]; then
87 ret="0"
89 elif [ "$1" = `echo $i|cut -d'=' -f1` ]; then
90 ret=`echo $i|cut -d'=' -f2`
92 done
93 echo "$ret"
96 simcc () {
98 # default tool setup for native building
99 prefixtools ""
101 simver=sdl
102 GCCOPTS='-W -Wall -g -fno-builtin'
104 output="rockboxui" # use this as default output binary name
106 # generic sdl-config checker
107 sdl=`findtool sdl-config`
109 if [ -z "$sdl" ]; then
110 echo "configure didn't find sdl-config, which indicates that you"
111 echo "don't have SDL (properly) installed. Please correct and"
112 echo "re-run configure!"
113 exit
116 # default share option, override below if needed
117 SHARED_FLAG="-shared"
119 case $uname in
120 CYGWIN*)
121 echo "Cygwin host detected"
123 # sdl version
124 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
125 LDOPTS="`sdl-config --libs` -mconsole"
127 output="rockboxui.exe" # use this as output binary name
130 Linux)
131 echo "Linux host detected"
132 if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then
133 # Enable crosscompiling if sdl-config is from Windows SDL
134 crosswincc
135 else
136 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
137 LDOPTS="`sdl-config --libs`"
141 FreeBSD)
142 echo "FreeBSD host detected"
143 # sdl version
144 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
145 LDOPTS="`sdl-config --libs`"
148 Darwin)
149 echo "Darwin host detected"
150 # sdl version
151 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
152 LDOPTS="`sdl-config --libs`"
153 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
157 echo "Unsupported system: $uname, fix configure and retry"
158 exit
160 esac
162 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
164 if test "X$crosscompile" != "Xyes"; then
165 if [ "`uname -m`" = "x86_64" ] || [ "`uname -m`" = "amd64" ]; then
166 # fPIC is needed to make shared objects link
167 # setting visibility to hidden is necessary to avoid strange crashes
168 # due to symbol clashing
169 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
172 id=$$
173 cat >/tmp/conftest-$id.c <<EOF
174 #include <stdio.h>
175 int main(int argc, char **argv)
177 int var=0;
178 char *varp = (char *)&var;
179 *varp=1;
181 printf("%d\n", var);
182 return 0;
186 $CC -o /tmp/conftest-$id /tmp/conftest-$id.c 2>/dev/null
188 if test `/tmp/conftest-$id 2>/dev/null` -gt "1"; then
189 # big endian
190 endian="big"
191 else
192 # little endian
193 endian="little"
195 echo "Simulator environment deemed $endian endian"
197 # use wildcard here to make it work even if it was named *.exe like
198 # on cygwin
199 rm -f /tmp/conftest-$id*
204 # functions for setting up cross-compiler names and options
205 # also set endianess and what the exact recommended gcc version is
206 # the gcc version should most likely match what versions we build with
207 # rockboxdev.sh
209 shcc () {
210 prefixtools sh-elf-
211 GCCOPTS="$CCOPTS -m1"
212 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
213 endian="big"
214 gccchoice="4.0.3"
217 calmrisccc () {
218 prefixtools calmrisc16-unknown-elf-
219 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
220 GCCOPTIMIZE="-fomit-frame-pointer"
221 endian="big"
224 coldfirecc () {
225 prefixtools m68k-elf-
226 GCCOPTS="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
227 GCCOPTIMIZE="-fomit-frame-pointer"
228 endian="big"
229 gccchoice="3.4.6"
232 arm7tdmicc () {
233 prefixtools arm-elf-
234 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
235 if test "X$1" != "Xshort"; then
236 GCCOPTS="$GCCOPTS -mlong-calls"
238 GCCOPTIMIZE="-fomit-frame-pointer"
239 endian="little"
240 gccchoice="4.0.3"
243 arm9tdmicc () {
244 prefixtools arm-elf-
245 GCCOPTS="$CCOPTS -mcpu=arm9tdmi -mlong-calls"
246 GCCOPTIMIZE="-fomit-frame-pointer"
247 endian="little"
248 gccchoice="4.0.3"
251 arm940tbecc () {
252 prefixtools arm-elf-
253 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t -mlong-calls"
254 GCCOPTIMIZE="-fomit-frame-pointer"
255 endian="big"
256 gccchoice="4.0.3"
259 arm946cc () {
260 prefixtools arm-elf-
261 GCCOPTS="$CCOPTS -mcpu=arm9e -mlong-calls"
262 GCCOPTIMIZE="-fomit-frame-pointer"
263 endian="little"
264 gccchoice="4.0.3"
267 arm926ejscc () {
268 prefixtools arm-elf-
269 GCCOPTS="$CCOPTS -mcpu=arm926ej-s -mlong-calls"
270 GCCOPTIMIZE="-fomit-frame-pointer"
271 endian="little"
272 gccchoice="4.0.3"
275 arm1136jfscc () {
276 prefixtools arm-elf-
277 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s -mlong-calls"
278 GCCOPTIMIZE="-fomit-frame-pointer"
279 endian="little"
280 gccchoice="4.0.3"
283 mipselcc () {
284 prefixtools mipsel-elf-
285 GCCOPTS="$CCOPTS -mips32 -mno-abicalls"
286 GCCOPTIMIZE="-fomit-frame-pointer"
287 GCCOPTS="$GCCOPTS -fno-pic -fno-builtin -fno-exceptions -ffunction-sections -msoft-float -G 0"
288 endian="little"
289 gccchoice="4.1.2"
292 whichadvanced () {
293 ##################################################################
294 # Prompt for specific developer options
296 echo ""
297 echo "Enter your developer options (press enter when done)"
298 echo -n "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice"
299 if [ "$memory" = "2" ]; then
300 echo -n ", (8)MB MOD"
302 if [ "$modelname" = "h120" ]; then
303 echo -n ", (R)TC MOD"
305 echo ""
307 cont=1
309 while [ $cont = "1" ]; do
311 option=`input`;
313 case $option in
314 [Dd])
315 if [ "yes" = "$profile" ]; then
316 echo "Debug is incompatible with profiling"
317 else
318 echo "define DEBUG"
319 use_debug="yes"
322 [Ll])
323 echo "logf() support enabled"
324 logf="yes"
326 [Ss])
327 echo "Simulator build enabled"
328 simulator="yes"
330 [Pp])
331 if [ "yes" = "$use_debug" ]; then
332 echo "Profiling is incompatible with debug"
333 else
334 echo "Profiling support is enabled"
335 profile="yes"
338 [Vv])
339 echo "Voice build selected"
340 voice="yes"
343 if [ "$memory" = "2" ]; then
344 memory="8"
345 echo "Memory size selected: 8MB"
346 else
347 cont=0
350 [Rr])
351 if [ "$modelname" = "h120" ]; then
352 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
353 have_rtc_alarm="#define HAVE_RTC_ALARM"
354 echo "RTC functions enabled (DS1339/DS3231)"
355 else
356 cont=0
360 cont=0
362 esac
363 done
364 echo "done"
366 if [ "yes" = "$voice" ]; then
367 # Ask about languages to build
368 echo "Select a number for the language to use (default is english)"
369 # The multiple-language feature is currently broken
370 # echo "You may enter a comma-separated list of languages to build"
372 picklang
373 voicelanguage=`whichlang`
375 if [ -z "$voicelanguage" ]; then
376 # pick a default
377 voicelanguage="english"
379 echo "Voice language set to $voicelanguage"
381 # Configure encoder and TTS engine for each language
382 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
383 voiceconfig "$thislang"
384 done
386 if [ "yes" = "$use_debug" ]; then
387 debug="-DDEBUG"
388 GCCOPTS="$GCCOPTS -g -DDEBUG"
390 if [ "yes" = "$logf" ]; then
391 use_logf="#define ROCKBOX_HAS_LOGF 1"
393 if [ "yes" = "$simulator" ]; then
394 debug="-DDEBUG"
395 extradefines="$extradefines -DSIMULATOR"
397 if [ "yes" = "$profile" ]; then
398 extradefines="$extradefines -DRB_PROFILE"
399 PROFILE_OPTS="-finstrument-functions"
403 # Configure voice settings
404 voiceconfig () {
405 thislang=$1
406 echo "Building $thislang voice for $modelname. Select options"
407 echo ""
409 if [ -f "`which flite`" ]; then
410 FLITE="F(l)ite "
411 FLITE_OPTS=""
412 DEFAULT_TTS="flite"
413 DEFAULT_TTS_OPTS=$FLITE_OPTS
414 DEFAULT_NOISEFLOOR="500"
415 DEFAULT_CHOICE="L"
417 if [ -f "`which espeak`" ]; then
418 ESPEAK="(e)Speak "
419 ESPEAK_OPTS=""
420 DEFAULT_TTS="espeak"
421 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
422 DEFAULT_NOISEFLOOR="500"
423 DEFAULT_CHOICE="e"
425 if [ -f "`which festival`" ]; then
426 FESTIVAL="(F)estival "
427 case "$thislang" in
428 "italiano")
429 FESTIVAL_OPTS="--language italian"
431 "espanol")
432 FESTIVAL_OPTS="--language spanish"
434 "finnish")
435 FESTIVAL_OPTS="--language finnish"
437 "czech")
438 FESTIVAL_OPTS="--language czech"
441 FESTIVAL_OPTS=""
443 esac
444 DEFAULT_TTS="festival"
445 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
446 DEFAULT_NOISEFLOOR="500"
447 DEFAULT_CHOICE="F"
449 if [ -f "`which swift`" ]; then
450 SWIFT="S(w)ift "
451 SWIFT_OPTS=""
452 DEFAULT_TTS="swift"
453 DEFAULT_TTS_OPTS=$SWIFT_OPTS
454 DEFAULT_NOISEFLOOR="500"
455 DEFAULT_CHOICE="w"
457 # Allow SAPI if Windows is in use
458 if [ -f "`which winver`" ]; then
459 SAPI="(S)API "
460 SAPI_OPTS=""
461 DEFAULT_TTS="sapi"
462 DEFAULT_TTS_OPTS=$SAPI_OPTS
463 DEFAULT_NOISEFLOOR="500"
464 DEFAULT_CHOICE="S"
467 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
468 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
469 exit
472 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
473 option=`input`
474 case "$option" in
475 [Ll])
476 TTS_ENGINE="flite"
477 NOISEFLOOR="500" # TODO: check this value
478 TTS_OPTS=$FLITE_OPTS
480 [Ee])
481 TTS_ENGINE="espeak"
482 NOISEFLOOR="500"
483 TTS_OPTS=$ESPEAK_OPTS
485 [Ff])
486 TTS_ENGINE="festival"
487 NOISEFLOOR="500"
488 TTS_OPTS=$FESTIVAL_OPTS
490 [Ss])
491 TTS_ENGINE="sapi"
492 NOISEFLOOR="500"
493 TTS_OPTS=$SAPI_OPTS
495 [Ww])
496 TTS_ENGINE="swift"
497 NOISEFLOOR="500"
498 TTS_OPTS=$SWIFT_OPTS
501 TTS_ENGINE=$DEFAULT_TTS
502 TTS_OPTS=$DEFAULT_TTS_OPTS
503 NOISEFLOOR=$DEFAULT_NOISEFLOOR
504 esac
505 echo "Using $TTS_ENGINE for TTS"
507 # Allow the user to input manual commandline options
508 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
509 USER_TTS_OPTS=`input`
510 if [ -n "$USER_TTS_OPTS" ]; then
511 TTS_OPTS="$USER_TTS_OPTS"
514 echo ""
516 if [ "$swcodec" = "yes" ]; then
517 ENCODER="rbspeexenc"
518 ENC_CMD="rbspeexenc"
519 ENC_OPTS="-q 4 -c 10"
520 else
521 if [ -f "`which lame`" ]; then
522 ENCODER="lame"
523 ENC_CMD="lame"
524 ENC_OPTS="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
525 else
526 echo "You need LAME in the system path to build voice files for"
527 echo "HWCODEC targets."
528 exit
532 echo "Using $ENCODER for encoding voice clips"
534 # Allow the user to input manual commandline options
535 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
536 USER_ENC_OPTS=`input`
537 if [ -n "$USER_ENC_OPTS" ]; then
538 ENC_OPTS=$USER_ENC_OPTS
541 TEMPDIR="${pwd}"
542 if [ -f "`which cygpath`" ]; then
543 TEMPDIR=`cygpath . -a -w`
547 picklang() {
548 # figure out which languages that are around
549 for file in $rootdir/apps/lang/*.lang; do
550 clean=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
551 langs="$langs $clean"
552 done
554 num=1
555 for one in $langs; do
556 echo "$num. $one"
557 num=`expr $num + 1`
558 done
560 read pick
563 whichlang() {
564 output=""
565 # Allow the user to pass a comma-separated list of langauges
566 for thispick in `echo $pick | sed 's/,/ /g'`; do
567 num=1
568 for one in $langs; do
569 # Accept both the language number and name
570 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
571 if [ "$output" = "" ]; then
572 output=$one
573 else
574 output=$output,$one
577 num=`expr $num + 1`
578 done
579 done
580 echo $output
583 opt=$1
585 if test "$opt" = "--help"; then
586 echo "Rockbox configure script."
587 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
588 echo "Do *NOT* run this within the tools directory!"
589 echo ""
590 cat <<EOF
591 Usage: configure [OPTION]...
592 Options:
593 --target=TARGET Sets the target, TARGET can be either the target ID or
594 corresponding string. Run without this option to see all
595 available targets.
597 --ram=RAM Sets the RAM for certain targets. Even though any number
598 is accepted, not every number is correct. The default
599 value will be applied, if you entered a wrong number
600 (which depends on the target). Watch the output. Run
601 without this option if you are not sure which the right
602 number is.
604 --type=TYPE Sets the build type. The shortcut is also valid.
605 Run without this option to see available types.
606 --ccache Enable ccache use (done by default these days)
607 --no-ccache Disable ccache use
608 --help Shows this message (must not be used with other options)
612 exit
615 if test -r "configure"; then
616 # this is a check for a configure script in the current directory, it there
617 # is one, try to figure out if it is this one!
619 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
620 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
621 echo "It will only cause you pain and grief. Instead do this:"
622 echo ""
623 echo " cd .."
624 echo " mkdir build-dir"
625 echo " cd build-dir"
626 echo " ../tools/configure"
627 echo ""
628 echo "Much happiness will arise from this. Enjoy"
629 exit
633 # get our current directory
634 pwd=`pwd`;
636 if { echo $pwd | grep " "; } then
637 echo "You're running this script in a path that contains space. The build"
638 echo "system is unfortunately not clever enough to deal with this. Please"
639 echo "run the script from a different path, rename the path or fix the build"
640 echo "system!"
641 exit
644 if [ -z "$rootdir" ]; then
645 ##################################################################
646 # Figure out where the source code root is!
648 rootdir=`dirname $0`/../
650 #####################################################################
651 # Convert the possibly relative directory name to an absolute version
653 now=`pwd`
654 cd $rootdir
655 rootdir=`pwd`
657 # cd back to the build dir
658 cd $now
661 apps="apps"
662 appsdir='\$(ROOTDIR)/apps'
663 firmdir='\$(ROOTDIR)/firmware'
664 toolsdir='\$(ROOTDIR)/tools'
667 ##################################################################
668 # Figure out target platform
671 if [ "1" != `parse_args --target` ]; then
672 buildfor=`parse_args --target`;
673 else
674 echo "Enter target platform:"
675 cat <<EOF
676 ==Archos== ==iriver== ==Apple iPod==
677 0) Player/Studio 10) H120/H140 20) Color/Photo
678 1) Recorder 11) H320/H340 21) Nano
679 2) FM Recorder 12) iHP-100/110/115 22) Video
680 3) Recorder v2 13) iFP-790 23) 3G
681 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
682 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
683 6) AV300 26) Mini 2G
684 27) 1G, 2G
686 ==iAudio== ==Toshiba== ==SanDisk==
687 30) X5/X5V/X5L 40) Gigabeat F 50) Sansa e200
688 31) M5/M5L 41) Gigabeat S 51) Sansa e200R
689 32) 7 52) Sansa c200
690 33) Cowon D2 53) Sansa m200
691 34) M3/M3L 54) Sansa c100
693 ==Tatung== ==Olympus== ==Logik==
694 60) Elio TPJ-1022 70) M:Robe 500 80) DAX 1GB MP3/DAB
695 71) M:Robe 100
696 ==Creative== ==Philips== ==Meizu==
697 90) Zen Vision:M 30GB 100) GoGear SA9200 110) M6SL
698 91) Zen Vision:M 60GB 101) GoGear HDD1630
699 92) Zen Vision
701 ==Onda==
702 120) VX747
703 121) VX767
706 buildfor=`input`;
709 # Set of tools built for all target platforms:
710 toolset="rdf2binary convbdf codepages"
712 # Toolsets for some target families:
713 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
714 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
715 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
716 ipodbitmaptools="$toolset scramble bmp2rb"
717 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
718 tccbitmaptools="$toolset scramble mktccboot bmp2rb"
719 # generic is used by IFP, H10, Sansa-e200
720 genericbitmaptools="$toolset bmp2rb"
723 # ---- For each target ----
725 # *Variables*
726 # target_id: a unique number identifying this target, IS NOT the menu number.
727 # Just use the currently highest number+1 when you add a new
728 # target.
729 # modelname: short model name used all over to identify this target
730 # memory: number of megabytes of RAM this target has. If the amount can
731 # be selected by the size prompt, let memory be unset here
732 # target: -Ddefine passed to the build commands to make the correct
733 # config-*.h file get included etc
734 # tool: the tool that takes a plain binary and converts that into a
735 # working "firmware" file for your target
736 # output: the final output file name
737 # boottool: the tool that takes a plain binary and generates a bootloader
738 # file for your target (or blank to use $tool)
739 # bootoutput:the final output file name for the bootloader (or blank to use
740 # $output)
741 # appextra: passed to the APPEXTRA variable in the Makefiles.
742 # TODO: add proper explanation
743 # archosrom: used only for Archos targets that build a special flashable .ucl
744 # image.
745 # flash: name of output for flashing, for targets where there's a special
746 # file output for this.
747 # plugins: set to 'yes' to build the plugins. Early development builds can
748 # set this to no in the early stages to have an easier life for a
749 # while
750 # swcodec: set 'yes' on swcodec targets
751 # toolset: lists what particular tools in the tools/ directory that this
752 # target needs to have built prior to building Rockbox
754 # *Functions*
755 # *cc: sets up gcc and compiler options for your target builds. Note
756 # that if you select a simulator build, the compiler selection is
757 # overridden later in the script.
759 case $buildfor in
761 0|player)
762 target_id=1
763 modelname="player"
764 target="-DARCHOS_PLAYER"
765 shcc
766 tool="$rootdir/tools/scramble"
767 output="archos.mod"
768 appextra="player:gui"
769 archosrom="$pwd/rombox.ucl"
770 flash="$pwd/rockbox.ucl"
771 plugins="yes"
772 swcodec=""
774 # toolset is the tools within the tools directory that we build for
775 # this particular target.
776 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
778 # Note: the convbdf is present in the toolset just because: 1) the
779 # firmware/Makefile assumes it is present always, and 2) we will need it when we
780 # build the player simulator
782 t_cpu="sh"
783 t_manufacturer="archos"
784 t_model="player"
787 1|recorder)
788 target_id=2
789 modelname="recorder"
790 target="-DARCHOS_RECORDER"
791 shcc
792 tool="$rootdir/tools/scramble"
793 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
794 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
795 output="ajbrec.ajz"
796 appextra="recorder:gui"
797 #archosrom="$pwd/rombox.ucl"
798 flash="$pwd/rockbox.ucl"
799 plugins="yes"
800 swcodec=""
801 # toolset is the tools within the tools directory that we build for
802 # this particular target.
803 toolset=$archosbitmaptools
804 t_cpu="sh"
805 t_manufacturer="archos"
806 t_model="recorder"
809 2|fmrecorder)
810 target_id=3
811 modelname="fmrecorder"
812 target="-DARCHOS_FMRECORDER"
813 shcc
814 tool="$rootdir/tools/scramble -fm"
815 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
816 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
817 output="ajbrec.ajz"
818 appextra="recorder:gui"
819 #archosrom="$pwd/rombox.ucl"
820 flash="$pwd/rockbox.ucl"
821 plugins="yes"
822 swcodec=""
823 # toolset is the tools within the tools directory that we build for
824 # this particular target.
825 toolset=$archosbitmaptools
826 t_cpu="sh"
827 t_manufacturer="archos"
828 t_model="fm_v2"
831 3|recorderv2)
832 target_id=4
833 modelname="recorderv2"
834 target="-DARCHOS_RECORDERV2"
835 shcc
836 tool="$rootdir/tools/scramble -v2"
837 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
838 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
839 output="ajbrec.ajz"
840 appextra="recorder:gui"
841 #archosrom="$pwd/rombox.ucl"
842 flash="$pwd/rockbox.ucl"
843 plugins="yes"
844 swcodec=""
845 # toolset is the tools within the tools directory that we build for
846 # this particular target.
847 toolset=$archosbitmaptools
848 t_cpu="sh"
849 t_manufacturer="archos"
850 t_model="fm_v2"
853 4|ondiosp)
854 target_id=7
855 modelname="ondiosp"
856 target="-DARCHOS_ONDIOSP"
857 shcc
858 tool="$rootdir/tools/scramble -osp"
859 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
860 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
861 output="ajbrec.ajz"
862 appextra="recorder:gui"
863 archosrom="$pwd/rombox.ucl"
864 flash="$pwd/rockbox.ucl"
865 plugins="yes"
866 swcodec=""
867 # toolset is the tools within the tools directory that we build for
868 # this particular target.
869 toolset=$archosbitmaptools
870 t_cpu="sh"
871 t_manufacturer="archos"
872 t_model="ondio"
875 5|ondiofm)
876 target_id=8
877 modelname="ondiofm"
878 target="-DARCHOS_ONDIOFM"
879 shcc
880 tool="$rootdir/tools/scramble -ofm"
881 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
882 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
883 output="ajbrec.ajz"
884 appextra="recorder:gui"
885 #archosrom="$pwd/rombox.ucl"
886 flash="$pwd/rockbox.ucl"
887 plugins="yes"
888 swcodec=""
889 toolset=$archosbitmaptools
890 t_cpu="sh"
891 t_manufacturer="archos"
892 t_model="ondio"
895 6|av300)
896 target_id=38
897 modelname="av300"
898 target="-DARCHOS_AV300"
899 memory=16 # always
900 arm7tdmicc
901 tool="$rootdir/tools/scramble -mm=C"
902 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
903 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
904 output="cjbm.ajz"
905 appextra="recorder:gui"
906 plugins="yes"
907 swcodec=""
908 # toolset is the tools within the tools directory that we build for
909 # this particular target.
910 toolset="$toolset scramble descramble bmp2rb"
911 # architecture, manufacturer and model for the target-tree build
912 t_cpu="arm"
913 t_manufacturer="archos"
914 t_model="av300"
917 10|h120)
918 target_id=9
919 modelname="h120"
920 target="-DIRIVER_H120"
921 memory=32 # always
922 coldfirecc
923 tool="$rootdir/tools/scramble -add=h120"
924 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
925 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
926 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
927 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
928 output="rockbox.iriver"
929 appextra="recorder:gui"
930 flash="$pwd/rombox.iriver"
931 plugins="yes"
932 swcodec="yes"
933 # toolset is the tools within the tools directory that we build for
934 # this particular target.
935 toolset=$iriverbitmaptools
936 t_cpu="coldfire"
937 t_manufacturer="iriver"
938 t_model="h100"
941 11|h300)
942 target_id=10
943 modelname="h300"
944 target="-DIRIVER_H300"
945 memory=32 # always
946 coldfirecc
947 tool="$rootdir/tools/scramble -add=h300"
948 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
949 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
950 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
951 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
952 output="rockbox.iriver"
953 appextra="recorder:gui"
954 plugins="yes"
955 swcodec="yes"
956 # toolset is the tools within the tools directory that we build for
957 # this particular target.
958 toolset=$iriverbitmaptools
959 t_cpu="coldfire"
960 t_manufacturer="iriver"
961 t_model="h300"
964 12|h100)
965 target_id=11
966 modelname="h100"
967 target="-DIRIVER_H100"
968 memory=16 # always
969 coldfirecc
970 tool="$rootdir/tools/scramble -add=h100"
971 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
972 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
973 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
974 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
975 output="rockbox.iriver"
976 appextra="recorder:gui"
977 flash="$pwd/rombox.iriver"
978 plugins="yes"
979 swcodec="yes"
980 # toolset is the tools within the tools directory that we build for
981 # this particular target.
982 toolset=$iriverbitmaptools
983 t_cpu="coldfire"
984 t_manufacturer="iriver"
985 t_model="h100"
988 13|ifp7xx)
989 target_id=19
990 modelname="ifp7xx"
991 target="-DIRIVER_IFP7XX"
992 memory=1
993 arm7tdmicc short
994 tool="cp"
995 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
996 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
997 output="rockbox.wma"
998 appextra="recorder:gui"
999 plugins="yes"
1000 swcodec="yes"
1001 # toolset is the tools within the tools directory that we build for
1002 # this particular target.
1003 toolset=$genericbitmaptools
1004 t_cpu="arm"
1005 t_manufacturer="pnx0101"
1006 t_model="iriver-ifp7xx"
1009 14|h10)
1010 target_id=22
1011 modelname="h10"
1012 target="-DIRIVER_H10"
1013 memory=32 # always
1014 arm7tdmicc
1015 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1016 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1017 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1018 output="rockbox.mi4"
1019 appextra="recorder:gui"
1020 plugins="yes"
1021 swcodec="yes"
1022 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1023 bootoutput="H10_20GC.mi4"
1024 # toolset is the tools within the tools directory that we build for
1025 # this particular target.
1026 toolset="$genericbitmaptools scramble"
1027 # architecture, manufacturer and model for the target-tree build
1028 t_cpu="arm"
1029 t_manufacturer="iriver"
1030 t_model="h10"
1033 15|h10_5gb)
1034 target_id=24
1035 modelname="h10_5gb"
1036 target="-DIRIVER_H10_5GB"
1037 memory=32 # always
1038 arm7tdmicc
1039 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1040 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1041 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1042 output="rockbox.mi4"
1043 appextra="recorder:gui"
1044 plugins="yes"
1045 swcodec="yes"
1046 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1047 bootoutput="H10.mi4"
1048 # toolset is the tools within the tools directory that we build for
1049 # this particular target.
1050 toolset="$genericbitmaptools scramble"
1051 # architecture, manufacturer and model for the target-tree build
1052 t_cpu="arm"
1053 t_manufacturer="iriver"
1054 t_model="h10"
1057 20|ipodcolor)
1058 target_id=13
1059 modelname="ipodcolor"
1060 target="-DIPOD_COLOR"
1061 memory=32 # always
1062 arm7tdmicc
1063 tool="$rootdir/tools/scramble -add=ipco"
1064 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1065 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1066 output="rockbox.ipod"
1067 appextra="recorder:gui"
1068 plugins="yes"
1069 swcodec="yes"
1070 bootoutput="bootloader-$modelname.ipod"
1071 # toolset is the tools within the tools directory that we build for
1072 # this particular target.
1073 toolset=$ipodbitmaptools
1074 # architecture, manufacturer and model for the target-tree build
1075 t_cpu="arm"
1076 t_manufacturer="ipod"
1077 t_model="color"
1080 21|ipodnano)
1081 target_id=14
1082 modelname="ipodnano"
1083 target="-DIPOD_NANO"
1084 memory=32 # always
1085 arm7tdmicc
1086 tool="$rootdir/tools/scramble -add=nano"
1087 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1088 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1089 output="rockbox.ipod"
1090 appextra="recorder:gui"
1091 plugins="yes"
1092 swcodec="yes"
1093 bootoutput="bootloader-$modelname.ipod"
1094 # toolset is the tools within the tools directory that we build for
1095 # this particular target.
1096 toolset=$ipodbitmaptools
1097 # architecture, manufacturer and model for the target-tree build
1098 t_cpu="arm"
1099 t_manufacturer="ipod"
1100 t_model="nano"
1103 22|ipodvideo)
1104 target_id=15
1105 modelname="ipodvideo"
1106 target="-DIPOD_VIDEO"
1107 arm7tdmicc
1108 tool="$rootdir/tools/scramble -add=ipvd"
1109 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1110 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1111 output="rockbox.ipod"
1112 appextra="recorder:gui"
1113 plugins="yes"
1114 swcodec="yes"
1115 bootoutput="bootloader-$modelname.ipod"
1116 # toolset is the tools within the tools directory that we build for
1117 # this particular target.
1118 toolset=$ipodbitmaptools
1119 # architecture, manufacturer and model for the target-tree build
1120 t_cpu="arm"
1121 t_manufacturer="ipod"
1122 t_model="video"
1125 23|ipod3g)
1126 target_id=16
1127 modelname="ipod3g"
1128 target="-DIPOD_3G"
1129 memory=32 # always
1130 arm7tdmicc
1131 tool="$rootdir/tools/scramble -add=ip3g"
1132 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1133 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1134 output="rockbox.ipod"
1135 appextra="recorder:gui"
1136 plugins="yes"
1137 swcodec="yes"
1138 bootoutput="bootloader-$modelname.ipod"
1139 # toolset is the tools within the tools directory that we build for
1140 # this particular target.
1141 toolset=$ipodbitmaptools
1142 # architecture, manufacturer and model for the target-tree build
1143 t_cpu="arm"
1144 t_manufacturer="ipod"
1145 t_model="3g"
1148 24|ipod4g)
1149 target_id=17
1150 modelname="ipod4g"
1151 target="-DIPOD_4G"
1152 memory=32 # always
1153 arm7tdmicc
1154 tool="$rootdir/tools/scramble -add=ip4g"
1155 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1156 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1157 output="rockbox.ipod"
1158 appextra="recorder:gui"
1159 plugins="yes"
1160 swcodec="yes"
1161 bootoutput="bootloader-$modelname.ipod"
1162 # toolset is the tools within the tools directory that we build for
1163 # this particular target.
1164 toolset=$ipodbitmaptools
1165 # architecture, manufacturer and model for the target-tree build
1166 t_cpu="arm"
1167 t_manufacturer="ipod"
1168 t_model="4g"
1171 25|ipodmini)
1172 target_id=18
1173 modelname="ipodmini"
1174 target="-DIPOD_MINI"
1175 memory=32 # always
1176 arm7tdmicc
1177 tool="$rootdir/tools/scramble -add=mini"
1178 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1179 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
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="mini"
1194 26|ipodmini2g)
1195 target_id=21
1196 modelname="ipodmini2g"
1197 target="-DIPOD_MINI2G"
1198 memory=32 # always
1199 arm7tdmicc
1200 tool="$rootdir/tools/scramble -add=mn2g"
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="mini2g"
1217 27|ipod1g2g)
1218 target_id=29
1219 modelname="ipod1g2g"
1220 target="-DIPOD_1G2G"
1221 memory=32 # always
1222 arm7tdmicc
1223 tool="$rootdir/tools/scramble -add=1g2g"
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="1g2g"
1240 30|x5)
1241 target_id=12
1242 modelname="x5"
1243 target="-DIAUDIO_X5"
1244 memory=16 # always
1245 coldfirecc
1246 tool="$rootdir/tools/scramble -add=iax5"
1247 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1248 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1249 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1250 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1251 output="rockbox.iaudio"
1252 appextra="recorder:gui"
1253 plugins="yes"
1254 swcodec="yes"
1255 # toolset is the tools within the tools directory that we build for
1256 # this particular target.
1257 toolset="$iaudiobitmaptools"
1258 # architecture, manufacturer and model for the target-tree build
1259 t_cpu="coldfire"
1260 t_manufacturer="iaudio"
1261 t_model="x5"
1264 31|m5)
1265 target_id=28
1266 modelname="m5"
1267 target="-DIAUDIO_M5"
1268 memory=16 # always
1269 coldfirecc
1270 tool="$rootdir/tools/scramble -add=iam5"
1271 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1272 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1273 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1274 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1275 output="rockbox.iaudio"
1276 appextra="recorder:gui"
1277 plugins="yes"
1278 swcodec="yes"
1279 # toolset is the tools within the tools directory that we build for
1280 # this particular target.
1281 toolset="$iaudiobitmaptools"
1282 # architecture, manufacturer and model for the target-tree build
1283 t_cpu="coldfire"
1284 t_manufacturer="iaudio"
1285 t_model="m5"
1288 32|iaudio7)
1289 target_id=32
1290 modelname="iaudio7"
1291 target="-DIAUDIO_7"
1292 memory=16 # always
1293 arm946cc
1294 tool="$rootdir/tools/scramble -add=i7"
1295 boottool="$rootdir/tools/scramble -tcc=crc"
1296 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1297 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1298 output="rockbox.iaudio"
1299 appextra="recorder:gui"
1300 plugins="yes"
1301 swcodec="yes"
1302 bootoutput="I7_FW.BIN"
1303 # toolset is the tools within the tools directory that we build for
1304 # this particular target.
1305 toolset="$tccbitmaptools"
1306 # architecture, manufacturer and model for the target-tree build
1307 t_cpu="arm"
1308 t_manufacturer="tcc77x"
1309 t_model="iaudio7"
1312 33|cowond2)
1313 target_id=34
1314 modelname="cowond2"
1315 target="-DCOWON_D2"
1316 memory=32
1317 arm926ejscc
1318 tool="$rootdir/tools/scramble -add=d2"
1319 boottool="$rootdir/tools/scramble -tcc=crc"
1320 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1321 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1322 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1323 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1324 output="rockbox.iaudio"
1325 appextra="recorder:gui"
1326 plugins="yes"
1327 swcodec="yes"
1328 toolset="$tccbitmaptools"
1329 # architecture, manufacturer and model for the target-tree build
1330 t_cpu="arm"
1331 t_manufacturer="tcc780x"
1332 t_model="cowond2"
1335 34|m3)
1336 target_id=37
1337 modelname="m3"
1338 target="-DIAUDIO_M3"
1339 memory=16 # always
1340 coldfirecc
1341 tool="$rootdir/tools/scramble -add=iam3"
1342 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1343 bmp2rb_native="$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="m3"
1357 40|gigabeatf)
1358 target_id=20
1359 modelname="gigabeatf"
1360 target="-DGIGABEAT_F"
1361 memory=32 # always
1362 arm9tdmicc
1363 tool="$rootdir/tools/scramble -add=giga"
1364 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1365 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1366 output="rockbox.gigabeat"
1367 appextra="recorder:gui"
1368 plugins="yes"
1369 swcodec="yes"
1370 toolset=$gigabeatbitmaptools
1371 boottool="$rootdir/tools/scramble -gigabeat"
1372 bootoutput="FWIMG01.DAT"
1373 # architecture, manufacturer and model for the target-tree build
1374 t_cpu="arm"
1375 t_manufacturer="s3c2440"
1376 t_model="gigabeat-fx"
1379 41|gigabeats)
1380 target_id=26
1381 modelname="gigabeats"
1382 target="-DGIGABEAT_S"
1383 memory=64
1384 arm1136jfscc
1385 tool="$rootdir/tools/scramble -add=gigs"
1386 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1387 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1388 output="rockbox.gigabeat"
1389 appextra="recorder:gui"
1390 plugins="yes"
1391 swcodec="yes"
1392 toolset="$gigabeatbitmaptools mknkboot"
1393 boottool="$rootdir/tools/scramble -gigabeats"
1394 bootoutput="nk.bin"
1395 # architecture, manufacturer and model for the target-tree build
1396 t_cpu="arm"
1397 t_manufacturer="imx31"
1398 t_model="gigabeat-s"
1401 70|mrobe500)
1402 target_id=36
1403 modelname="mrobe500"
1404 target="-DMROBE_500"
1405 memory=64 # always
1406 arm926ejscc
1407 # tool="$rootdir/tools/scramble -add=m500"
1408 tool="cp "
1409 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1410 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1411 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1412 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1413 output="rockbox.mrobe500"
1414 appextra="recorder:gui"
1415 plugins="yes"
1416 swcodec="yes"
1417 toolset=$gigabeatbitmaptools
1418 boottool="cp "
1419 bootoutput="rockbox.mrboot"
1420 # architecture, manufacturer and model for the target-tree build
1421 t_cpu="arm"
1422 t_manufacturer="tms320dm320"
1423 t_model="mrobe-500"
1426 71|mrobe100)
1427 target_id=33
1428 modelname="mrobe100"
1429 target="-DMROBE_100"
1430 memory=32 # always
1431 arm7tdmicc
1432 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1433 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1434 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1435 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1436 bmp2rb_remotenative="$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="$genericbitmaptools scramble"
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 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1485 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1486 tool="$rootdir/tools/scramble -creative=zvm"
1487 USE_ELF="yes"
1488 output="rockbox.zvm"
1489 appextra="recorder:gui"
1490 plugins=""
1491 swcodec="yes"
1492 toolset=$ipodbitmaptools
1493 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1494 bootoutput="rockbox.zvmboot"
1495 # architecture, manufacturer and model for the target-tree build
1496 t_cpu="arm"
1497 t_manufacturer="tms320dm320"
1498 t_model="creative-zvm"
1501 91|creativezvm60gb)
1502 target_id=40
1503 modelname="creativezvm60"
1504 target="-DCREATIVE_ZVM60GB"
1505 memory=64
1506 arm926ejscc
1507 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1508 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1509 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1510 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1511 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1512 USE_ELF="yes"
1513 output="rockbox.zvm60"
1514 appextra="recorder:gui"
1515 plugins=""
1516 swcodec="yes"
1517 toolset=$ipodbitmaptools
1518 boottool="$rootdir/tools/scramble -creative=zvm60"
1519 bootoutput="rockbox.zvm60boot"
1520 # architecture, manufacturer and model for the target-tree build
1521 t_cpu="arm"
1522 t_manufacturer="tms320dm320"
1523 t_model="creative-zvm"
1526 92|creativezenvision)
1527 target_id=39
1528 modelname="creativezv"
1529 target="-DCREATIVE_ZV"
1530 memory=64
1531 arm926ejscc
1532 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1533 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1534 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1535 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1536 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1537 USE_ELF="yes"
1538 output="rockbox.zv"
1539 appextra="recorder:gui"
1540 plugins=""
1541 swcodec="yes"
1542 toolset=$ipodbitmaptools
1543 boottool="$rootdir/tools/scramble -creative=zenvision"
1544 bootoutput="rockbox.zvboot"
1545 # architecture, manufacturer and model for the target-tree build
1546 t_cpu="arm"
1547 t_manufacturer="tms320dm320"
1548 t_model="creative-zvm"
1551 50|e200)
1552 target_id=23
1553 modelname="e200"
1554 target="-DSANSA_E200"
1555 memory=32 # supposedly
1556 arm7tdmicc
1557 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1558 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1559 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1560 output="rockbox.mi4"
1561 appextra="recorder:gui"
1562 plugins="yes"
1563 swcodec="yes"
1564 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1565 bootoutput="PP5022.mi4"
1566 # toolset is the tools within the tools directory that we build for
1567 # this particular target.
1568 toolset="$genericbitmaptools scramble"
1569 # architecture, manufacturer and model for the target-tree build
1570 t_cpu="arm"
1571 t_manufacturer="sandisk"
1572 t_model="sansa-e200"
1575 51|e200r)
1576 # the e200R model is pretty much identical to the e200, it only has a
1577 # different option to the scramble tool when building a bootloader and
1578 # makes the bootloader output file name in all lower case.
1579 target_id=27
1580 modelname="e200r"
1581 target="-DSANSA_E200"
1582 memory=32 # supposedly
1583 arm7tdmicc
1584 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1585 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1586 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1587 output="rockbox.mi4"
1588 appextra="recorder:gui"
1589 plugins="yes"
1590 swcodec="yes"
1591 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1592 bootoutput="pp5022.mi4"
1593 # toolset is the tools within the tools directory that we build for
1594 # this particular target.
1595 toolset="$genericbitmaptools scramble"
1596 # architecture, manufacturer and model for the target-tree build
1597 t_cpu="arm"
1598 t_manufacturer="sandisk"
1599 t_model="sansa-e200"
1602 52|c200)
1603 target_id=30
1604 modelname="c200"
1605 target="-DSANSA_C200"
1606 memory=32 # supposedly
1607 arm7tdmicc
1608 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1609 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1610 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1611 output="rockbox.mi4"
1612 appextra="recorder:gui"
1613 plugins="yes"
1614 swcodec="yes"
1615 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1616 bootoutput="firmware.mi4"
1617 # toolset is the tools within the tools directory that we build for
1618 # this particular target.
1619 toolset="$genericbitmaptools scramble"
1620 # architecture, manufacturer and model for the target-tree build
1621 t_cpu="arm"
1622 t_manufacturer="sandisk"
1623 t_model="sansa-c200"
1626 53|m200)
1627 target_id=31
1628 modelname="m200"
1629 target="-DSANSA_M200"
1630 memory=2 # always
1631 arm946cc
1632 tool="$rootdir/tools/scramble -add=m200"
1633 boottool="$rootdir/tools/scramble -tcc=crc"
1634 bootoutput="player.rom"
1635 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1636 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1637 output="rockbox.m200"
1638 appextra="recorder:gui"
1639 plugins=""
1640 swcodec="yes"
1641 # toolset is the tools within the tools directory that we build for
1642 # this particular target.
1643 toolset=$tccbitmaptools
1644 # architecture, manufacturer and model for the target-tree build
1645 t_cpu="arm"
1646 t_manufacturer="tcc77x"
1647 t_model="m200"
1650 54|c100)
1651 target_id=42
1652 modelname="c100"
1653 target="-DSANSA_C100" # The #define used in firmware/export/config.h for conditional compilation
1654 memory=32 # how many megabytes of RAM
1655 arm946cc # Which compiler to use, see the beginning of the file
1656 tool="$rootdir/tools/scramble -add=c100" # Which command to use for creating a rockbox binary to be loaded by the bootloader
1657 boottool="$rootdir/tools/scramble -tcc=crc"
1658 bootoutput="player.rom"
1659 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" # How to create a monochrome bitmap
1660 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" # How to create a native bitmap
1661 output="rockbox.c100" # The name of the Rockbox binary file
1662 appextra="recorder:gui" # What directories in the apps/ tree to include in compilation
1663 plugins="" # Does it support plugins?
1664 toolset=$tccbitmaptools
1665 t_cpu="arm"
1666 t_manufacturer="tcc77x"
1667 t_model="c100"
1670 60|tpj1022)
1671 target_id=25
1672 modelname="tpj1022"
1673 target="-DELIO_TPJ1022"
1674 memory=32 # always
1675 arm7tdmicc
1676 tool="$rootdir/tools/scramble -add tpj2"
1677 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1678 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1679 output="rockbox.elio"
1680 appextra="recorder:gui"
1681 plugins="yes"
1682 swcodec="yes"
1683 boottool="$rootdir/tools/scramble -mi4v2"
1684 bootoutput="pp5020.mi4"
1685 # toolset is the tools within the tools directory that we build for
1686 # this particular target.
1687 toolset="$genericbitmaptools scramble"
1688 # architecture, manufacturer and model for the target-tree build
1689 t_cpu="arm"
1690 t_manufacturer="tatung"
1691 t_model="tpj1022"
1694 100|sa9200)
1695 target_id=41
1696 modelname="sa9200"
1697 target="-DPHILIPS_SA9200"
1698 memory=32 # supposedly
1699 arm7tdmicc
1700 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
1701 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1702 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1703 output="rockbox.mi4"
1704 appextra="recorder:gui"
1705 plugins=""
1706 swcodec="yes"
1707 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
1708 bootoutput="FWImage.ebn"
1709 # toolset is the tools within the tools directory that we build for
1710 # this particular target.
1711 toolset="$genericbitmaptools scramble"
1712 # architecture, manufacturer and model for the target-tree build
1713 t_cpu="arm"
1714 t_manufacturer="philips"
1715 t_model="sa9200"
1718 101|hdd1630)
1719 target_id=43
1720 modelname="hdd1630"
1721 target="-DPHILIPS_HDD1630"
1722 memory=32 # supposedly
1723 arm7tdmicc
1724 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
1725 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1726 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1727 output="rockbox.mi4"
1728 appextra="recorder:gui"
1729 plugins=""
1730 swcodec="yes"
1731 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
1732 bootoutput="FWImage.ebn"
1733 # toolset is the tools within the tools directory that we build for
1734 # this particular target.
1735 toolset="$genericbitmaptools scramble"
1736 # architecture, manufacturer and model for the target-tree build
1737 t_cpu="arm"
1738 t_manufacturer="philips"
1739 t_model="hdd1630"
1742 110|meizum6sl)
1743 target_id=20
1744 modelname="meizum6sl"
1745 target="-DMEIZU_M6SL"
1746 memory=16 # always
1747 arm940tbecc
1748 tool="cp"
1749 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1750 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1751 output="rockbox.meizu"
1752 appextra="recorder:gui"
1753 plugins="no" #FIXME
1754 swcodec="yes"
1755 toolset=$genericbitmaptools
1756 boottool="cp"
1757 bootoutput="rockboot.ebn"
1758 # architecture, manufacturer and model for the target-tree build
1759 t_cpu="arm"
1760 t_manufacturer="s5l8700"
1761 t_model="meizu-m6sl"
1764 120|ondavx747)
1765 target_id=44
1766 modelname="ondavx747"
1767 target="-DONDA_VX747"
1768 memory=16 #FIXME
1769 mipselcc
1770 tool="cp"
1771 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1772 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1773 output="rockbox.vx747"
1774 appextra="recorder:gui"
1775 plugins="no" #FIXME
1776 swcodec="yes"
1777 toolset=$genericbitmaptools
1778 boottool="cp"
1779 bootoutput="rockboot.vx747"
1780 # architecture, manufacturer and model for the target-tree build
1781 t_cpu="mips"
1782 t_manufacturer="ingenic_jz47xx"
1783 t_model="onda_vx747"
1786 121|ondavx767)
1787 target_id=45
1788 modelname="ondavx767"
1789 target="-DONDA_VX767"
1790 memory=16 #FIXME
1791 mipselcc
1792 tool="cp"
1793 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1794 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1795 output="rockbox.vx767"
1796 appextra="recorder:gui"
1797 plugins="no" #FIXME
1798 swcodec="yes"
1799 toolset=$genericbitmaptools
1800 boottool="cp"
1801 bootoutput="rockboot.vx767"
1802 # architecture, manufacturer and model for the target-tree build
1803 t_cpu="mips"
1804 t_manufacturer="ingenic_jz47xx"
1805 t_model="onda_vx767"
1808 echo "Please select a supported target platform!"
1809 exit
1812 esac
1814 echo "Platform set to $modelname"
1817 #remove start
1818 ############################################################################
1819 # Amount of memory, for those that can differ. They have $memory unset at
1820 # this point.
1823 if [ -z "$memory" ]; then
1824 case $target_id in
1826 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1827 if [ "1" != `parse_args --ram` ]; then
1828 size=`parse_args --ram`;
1829 else
1830 size=`input`;
1832 case $size in
1833 60|64)
1834 memory="64"
1837 memory="32"
1839 esac
1842 echo "Enter size of your RAM (in MB): (Defaults to 2)"
1843 if [ "1" != `parse_args --ram` ]; then
1844 size=`parse_args --ram`;
1845 else
1846 size=`input`;
1848 case $size in
1850 memory="8"
1853 memory="2"
1855 esac
1857 esac
1858 echo "Memory size selected: $memory MB"
1859 echo ""
1861 #remove end
1863 ##################################################################
1864 # Figure out build "type"
1867 # the ifp7x0 is the only platform that supports building a gdb stub like
1868 # this
1869 case $modelname in
1870 ifp7xx)
1871 gdbstub="(G)DB stub, "
1873 e200r|e200)
1874 gdbstub="(I)installer, "
1878 esac
1879 if [ "1" != `parse_args --type` ]; then
1880 option=`parse_args --type`;
1881 else
1882 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual: (Defaults to N)"
1883 option=`input`;
1886 case $option in
1887 [Ii])
1888 appsdir='\$(ROOTDIR)/bootloader'
1889 apps="bootloader"
1890 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
1891 bootloader="1"
1892 echo "e200R-installer build selected"
1894 [Bb])
1895 if test $t_manufacturer = "archos"; then
1896 # Archos SH-based players do this somewhat differently for
1897 # some reason
1898 appsdir='\$(ROOTDIR)/flash/bootbox'
1899 apps="bootbox"
1900 else
1901 appsdir='\$(ROOTDIR)/bootloader'
1902 apps="bootloader"
1903 flash=""
1904 if test -n "$boottool"; then
1905 tool="$boottool"
1907 if test -n "$bootoutput"; then
1908 output=$bootoutput
1911 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
1912 bootloader="1"
1913 echo "Bootloader build selected"
1915 [Ss])
1916 debug="-DDEBUG"
1917 simulator="yes"
1918 extradefines="-DSIMULATOR"
1919 echo "Simulator build selected"
1921 [Aa])
1922 echo "Advanced build selected"
1923 whichadvanced
1925 [Gg])
1926 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
1927 appsdir='\$(ROOTDIR)/gdb'
1928 apps="stub"
1929 case $modelname in
1930 ifp7xx)
1931 output="stub.wma"
1935 esac
1936 echo "GDB stub build selected"
1938 [Mm])
1939 toolset='';
1940 apps="manual"
1941 echo "Manual build selected"
1944 if [ "$modelname" = "e200r" ]; then
1945 echo "Do not use the e200R target for regular builds. Use e200 instead."
1946 exit
1948 debug=""
1949 echo "Normal build selected"
1952 esac
1953 # to be able running "make manual" from non-manual configuration
1954 case $modelname in
1955 fmrecorder)
1956 manualdev="recorderv2fm"
1958 recorderv2)
1959 manualdev="recorderv2fm"
1961 h1??)
1962 manualdev="h1xx"
1964 ipodmini2g)
1965 manualdev="ipodmini"
1968 manualdev=$modelname
1970 esac
1972 if [ -z "$debug" ]; then
1973 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
1976 echo "Using source code root directory: $rootdir"
1978 # this was once possible to change at build-time, but no more:
1979 language="english"
1981 uname=`uname`
1983 if [ "yes" = "$simulator" ]; then
1984 # setup compiler and things for simulator
1985 simcc
1987 if [ -d "archos" ]; then
1988 echo "sub directory archos already present"
1989 else
1990 mkdir archos
1991 echo "created an archos subdirectory for simulating the hard disk"
1995 # Now, figure out version number of the (gcc) compiler we are about to use
1996 gccver=`$CC -dumpversion`;
1998 # figure out the binutil version too and display it, mostly for the build
1999 # system etc to be able to see it easier
2000 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2002 if [ -z "$gccver" ]; then
2003 echo "WARNING: The compiler you must use ($CC) is not in your path!"
2004 echo "WARNING: this may cause your build to fail since we cannot do the"
2005 echo "WARNING: checks we want now."
2006 else
2008 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2009 # DEPEND on it
2011 num1=`echo $gccver | cut -d . -f1`
2012 num2=`echo $gccver | cut -d . -f2`
2013 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2015 # This makes:
2016 # 3.3.X => 303
2017 # 3.4.X => 304
2018 # 2.95.3 => 295
2020 echo "Using $CC $gccver ($gccnum)"
2022 if test "$gccnum" -ge "400"; then
2023 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2024 # so we ignore that warnings for now
2025 # -Wno-pointer-sign
2026 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2029 if test "$gccnum" -ge "401"; then
2030 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2031 # will break strict-aliasing rules"
2033 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
2036 if test "$gccnum" -ge "402"; then
2037 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2038 # and later would throw it for several valid cases
2039 GCCOPTS="$GCCOPTS -Wno-override-init"
2042 case $prefix in
2044 # simulator
2046 i586-mingw32msvc-)
2047 # cross-compile for win32
2050 # Verify that the cross-compiler is of a recommended version!
2051 if test "$gccver" != "$gccchoice"; then
2052 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2053 echo "WARNING: version $gccchoice!"
2054 echo "WARNING: This may cause your build to fail since it may be a version"
2055 echo "WARNING: that isn't functional or known to not be the best choice."
2056 echo "WARNING: If you suffer from build problems, you know that this is"
2057 echo "WARNING: a likely source for them..."
2060 esac
2065 echo "Using $LD $ldver"
2067 # check the compiler for SH platforms
2068 if test "$CC" = "sh-elf-gcc"; then
2069 if test "$gccnum" -lt "400"; then
2070 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2071 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2072 else
2073 # figure out patch status
2074 gccpatch=`$CC --version`;
2076 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2077 echo "gcc $gccver is rockbox patched"
2078 # then convert -O to -Os to get smaller binaries!
2079 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2080 else
2081 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2082 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2087 if test "$CC" = "m68k-elf-gcc"; then
2088 # convert -O to -Os to get smaller binaries!
2089 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2092 if [ "1" != `parse_args --ccache` ]; then
2093 echo "Enable ccache for building"
2094 ccache="ccache"
2095 else
2096 if [ "1" = `parse_args --no-ccache` ]; then
2097 ccache=`findtool ccache`
2098 if test -n "$ccache"; then
2099 echo "Found and uses ccache ($ccache)"
2104 if test -n "$ccache"; then
2105 CC="$ccache $CC"
2108 if test "X$endian" = "Xbig"; then
2109 defendian="ROCKBOX_BIG_ENDIAN"
2110 else
2111 defendian="ROCKBOX_LITTLE_ENDIAN"
2114 sed > autoconf.h \
2115 -e "s,@ENDIAN@,${defendian},g" \
2116 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2117 -e "s,@config_rtc@,$config_rtc,g" \
2118 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2119 <<EOF
2120 /* This header was made by configure */
2121 #ifndef __BUILD_AUTOCONF_H
2122 #define __BUILD_AUTOCONF_H
2124 /* Define endianess for the target or simulator platform */
2125 #define @ENDIAN@ 1
2127 /* Define this if you build rockbox to support the logf logging and display */
2128 #undef ROCKBOX_HAS_LOGF
2130 /* optional defines for RTC mod for h1x0 */
2131 @config_rtc@
2132 @have_rtc_alarm@
2134 #endif /* __BUILD_AUTOCONF_H */
2137 if test -n "$t_cpu"; then
2138 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2139 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2140 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2141 GCCOPTS="$GCCOPTS"
2144 if test "$simulator" = "yes"; then
2145 # add simul make stuff on the #SIMUL# line
2146 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2147 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2148 else
2149 # delete the lines that match
2150 simmagic1='/@SIMUL1@/D'
2151 simmagic2='/@SIMUL2@/D'
2154 if test "$swcodec" = "yes"; then
2155 voicetoolset="rbspeexenc voicefont wavtrim"
2156 else
2157 voicetoolset="voicefont wavtrim"
2160 if test "$apps" = "apps"; then
2161 # only when we build "real" apps we build the .lng files
2162 buildlangs="langs"
2165 sed > Makefile \
2166 -e "s,@ROOTDIR@,${rootdir},g" \
2167 -e "s,@DEBUG@,${debug},g" \
2168 -e "s,@MEMORY@,${memory},g" \
2169 -e "s,@TARGET_ID@,${target_id},g" \
2170 -e "s,@TARGET@,${target},g" \
2171 -e "s,@CPU@,${t_cpu},g" \
2172 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2173 -e "s,@MODELNAME@,${modelname},g" \
2174 -e "s,@LANGUAGE@,${language},g" \
2175 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2176 -e "s,@PWD@,${pwd},g" \
2177 -e "s,@CC@,${CC},g" \
2178 -e "s,@LD@,${LD},g" \
2179 -e "s,@AR@,${AR},g" \
2180 -e "s,@AS@,${AS},g" \
2181 -e "s,@OC@,${OC},g" \
2182 -e "s,@WINDRES@,${WINDRES},g" \
2183 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2184 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2185 -e "s,@RANLIB@,${RANLIB},g" \
2186 -e "s,@TOOL@,${tool},g" \
2187 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2188 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2189 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2190 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2191 -e "s,@OUTPUT@,${output},g" \
2192 -e "s,@APPEXTRA@,${appextra},g" \
2193 -e "s,@ARCHOSROM@,${archosrom},g" \
2194 -e "s,@FLASHFILE@,${flash},g" \
2195 -e "s,@PLUGINS@,${plugins},g" \
2196 -e "s,@CODECS@,${swcodec},g" \
2197 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2198 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2199 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2200 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2201 -e "s!@LDOPTS@!${LDOPTS}!g" \
2202 -e "s,@LOADADDRESS@,${loadaddress},g" \
2203 -e "s,@EXTRADEF@,${extradefines},g" \
2204 -e "s,@APPSDIR@,${appsdir},g" \
2205 -e "s,@FIRMDIR@,${firmdir},g" \
2206 -e "s,@TOOLSDIR@,${toolsdir},g" \
2207 -e "s,@APPS@,${apps},g" \
2208 -e "s,@SIMVER@,${simver},g" \
2209 -e "s,@GCCVER@,${gccver},g" \
2210 -e "s,@GCCNUM@,${gccnum},g" \
2211 -e "s,@UNAME@,${uname},g" \
2212 -e "s,@ENDIAN@,${defendian},g" \
2213 -e "s,@TOOLSET@,${toolset},g" \
2214 -e "${simmagic1}" \
2215 -e "${simmagic2}" \
2216 -e "s,@MANUALDEV@,${manualdev},g" \
2217 -e "s,@ENCODER@,${ENC_CMD},g" \
2218 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2219 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2220 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2221 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2222 -e "s,@LANGS@,${buildlangs},g" \
2223 -e "s,@USE_ELF@,${USE_ELF},g" \
2224 <<EOF
2225 ## Automatically generated. http://www.rockbox.org/
2227 ifndef V
2228 SILENT=@
2229 else
2230 VERBOSEOPT=-v
2231 endif
2233 # old 'make' versions don't have the built-in 'info' function
2234 info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.")
2235 ifeq (\$(call info),old)
2236 export info=echo "\$\$(1)";
2237 endif
2239 export ROOTDIR=@ROOTDIR@
2240 export FIRMDIR=@FIRMDIR@
2241 export APPSDIR=@APPSDIR@
2242 export TOOLSDIR=@TOOLSDIR@
2243 export DOCSDIR=\$(ROOTDIR)/docs
2244 export MANUALDIR=\${ROOTDIR}/manual
2245 export DEBUG=@DEBUG@
2246 export MODELNAME=@MODELNAME@
2247 export ARCHOSROM=@ARCHOSROM@
2248 export FLASHFILE=@FLASHFILE@
2249 export TARGET_ID=@TARGET_ID@
2250 export TARGET=@TARGET@
2251 export CPU=@CPU@
2252 export MANUFACTURER=@MANUFACTURER@
2253 export OBJDIR=@PWD@
2254 export BUILDDIR=@PWD@
2255 export LANGUAGE=@LANGUAGE@
2256 export VOICELANGUAGE=@VOICELANGUAGE@
2257 export MEMORYSIZE=@MEMORY@
2258 export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
2259 export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2260 export MKFIRMWARE=@TOOL@
2261 export BMP2RB_MONO=@BMP2RB_MONO@
2262 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2263 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2264 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2265 export BINARY=@OUTPUT@
2266 export APPEXTRA=@APPEXTRA@
2267 export ENABLEDPLUGINS=@PLUGINS@
2268 export SOFTWARECODECS=@CODECS@
2269 export EXTRA_DEFINES=@EXTRADEF@
2270 export HOSTCC=gcc
2271 export HOSTAR=ar
2272 export CC=@CC@
2273 export LD=@LD@
2274 export AR=@AR@
2275 export AS=@AS@
2276 export OC=@OC@
2277 export WINDRES=@WINDRES@
2278 export DLLTOOL=@DLLTOOL@
2279 export DLLWRAP=@DLLWRAP@
2280 export RANLIB=@RANLIB@
2281 export PROFILE_OPTS=@PROFILE_OPTS@
2282 export SIMVER=@SIMVER@
2283 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2284 export GCCOPTS=@GCCOPTS@
2285 export TARGET_INC=@TARGET_INC@
2286 export LOADADDRESS=@LOADADDRESS@
2287 export SHARED_FLAG=@SHARED_FLAG@
2288 export LDOPTS=@LDOPTS@
2289 export GCCVER=@GCCVER@
2290 export GCCNUM=@GCCNUM@
2291 export UNAME=@UNAME@
2292 export MANUALDEV=@MANUALDEV@
2293 export TTS_OPTS=@TTS_OPTS@
2294 export TTS_ENGINE=@TTS_ENGINE@
2295 export ENC_OPTS=@ENC_OPTS@
2296 export ENCODER=@ENCODER@
2297 export USE_ELF=@USE_ELF@
2299 # Do not print "Entering directory ..."
2300 MAKEFLAGS += --no-print-directory
2302 .PHONY: all clean tags zip tools manual bin build info langs
2304 all: info
2306 info: build
2307 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
2309 build: tools @LANGS@
2310 @SIMUL1@
2311 @SIMUL2@
2312 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
2313 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
2315 bin: tools @LANGS@
2316 @SIMUL1@
2317 @SIMUL2@
2318 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
2319 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY)
2321 rocks: tools
2322 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks
2324 veryclean: clean toolsclean
2326 toolsclean:
2327 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
2329 clean:
2330 \$(SILENT)echo Cleaning build directory
2331 \$(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \
2332 rockbox.tar.bz2 TAGS @APPS@ firmware comsim sim lang.[ch] \
2333 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
2334 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
2335 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
2336 voicefontids *.wav *.mp3 *.voice max_language_size.h
2338 tools:
2339 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@
2341 voicetools:
2342 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @VOICETOOLSET@
2344 tags:
2345 \$(SILENT)rm -f TAGS
2346 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
2347 \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
2348 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
2349 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
2351 fontzip:
2352 \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
2354 zip:
2355 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2356 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2358 mapzip:
2359 \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
2361 fullzip:
2362 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2363 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
2365 7zip:
2366 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2367 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a -mx=9" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2369 tar:
2370 \$(SILENT)rm -f rockbox.tar
2371 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2372 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2374 bzip2: tar
2375 \$(SILENT)bzip2 -f9 rockbox.tar
2377 gzip: tar
2378 \$(SILENT)gzip -f9 rockbox.tar
2380 langs: features
2381 \$(SILENT)mkdir -p \$(BUILDDIR)/apps/lang
2382 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/lang OBJDIR=\$(BUILDDIR)/apps/lang
2384 manual: manual-pdf
2385 manual-pdf:
2386 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
2387 manual-html:
2388 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html
2389 manual-zhtml: manual-zip
2390 manual-txt:
2391 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt
2392 manual-ztxt:
2393 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip
2394 manual-zip:
2395 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip
2397 features: tools
2398 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
2400 help:
2401 @echo "A few helpful make targets"
2402 @echo ""
2403 @echo "all - builds a full Rockbox (default), including tools"
2404 @echo "bin - builds only the Rockbox.<target name> file"
2405 @echo "rocks - builds only plugins and codecs"
2406 @echo "clean - cleans a build directory (not tools)"
2407 @echo "veryclean - cleans the build and tools directories"
2408 @echo "manual - builds a manual"
2409 @echo "manual-html - HTML manual"
2410 @echo "manual-zip - HTML manual (zipped)"
2411 @echo "manual-txt - txt manual"
2412 @echo "fullzip - creates a rockbox.zip of your build with fonts"
2413 @echo "zip - creates a rockbox.zip of your build (no fonts)"
2414 @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
2415 @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
2416 @echo "7zip - creates a rockbox.7z of your build (no fonts)"
2417 @echo "fontzip - creates rockbox-fonts.zip"
2418 @echo "mapzip - creates rockbox-maps.zip with all .map files"
2419 @echo "tools - builds the tools only"
2420 @echo "voicetools - builds the voice tools only"
2421 @echo "install - installs your build (for simulator builds only)"
2425 if [ "yes" = "$simulator" ]; then
2427 cat >> Makefile <<EOF
2429 install:
2430 @echo "installing a full setup in your archos dir"
2431 @(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
2436 if [ "yes" = "$voice" ]; then
2438 cat >> Makefile <<EOF
2440 voice: voicetools features
2441 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2442 for lang in \`echo \$(VOICELANGUAGE) |sed "s/,/ /g"\`; do \$(TOOLSDIR)/voice.pl -V -l=\$\$lang -t=\$(MODELNAME)\$\$feat -i=\$(TARGET_ID) -e="\$(ENCODER)" -E="\$(ENC_OPTS)" -s=\$(TTS_ENGINE) -S="\$(TTS_OPTS)"; done \\
2447 echo "Created Makefile"