FS#11924 - Use separate targets for RaaA devices. This changes tools/configure to...
[kugel-rb.git] / tools / configure
blob136b9a59d4fee59e08a822118e1211c0a80f289f
1 #!/bin/sh
2 # __________ __ ___.
3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 # \/ \/ \/ \/ \/
8 # $Id$
11 # global CC options for all platforms
12 CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
14 # global LD options for all platforms
15 GLOBAL_LDOPTS=""
17 extradefines=""
18 use_logf="#undef ROCKBOX_HAS_LOGF"
19 use_bootchart="#undef DO_BOOTCHART"
21 scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
23 rbdir="/.rockbox"
24 need_full_path=
25 bindir=
26 libdir=
27 sharedir=
29 app_modelname=
30 app_lcd_width=
31 app_lcd_height=
33 # Begin Function Definitions
35 input() {
36 read response
37 echo $response
40 prefixtools () {
41 prefix="$1"
42 CC=${prefix}gcc
43 WINDRES=${prefix}windres
44 DLLTOOL=${prefix}dlltool
45 DLLWRAP=${prefix}dllwrap
46 RANLIB=${prefix}ranlib
47 LD=${prefix}ld
48 AR=${prefix}ar
49 AS=${prefix}as
50 OC=${prefix}objcopy
53 app_set_paths () {
54 # setup files and paths depending on the platform
55 if [ -z "$ARG_PREFIX" ]; then
56 sharedir="/usr/local/share/rockbox"
57 bindir="/usr/local/bin"
58 libdir="/usr/local/lib"
59 else
60 if [ -d "$ARG_PREFIX" ]; then
61 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
62 ARG_PREFIX=`realpath $ARG_PREFIX`
63 if [ "0" != "$?" ]; then
64 echo "ERROR: Could not get prefix path (is realpath installed?)."
65 exit
68 sharedir="$ARG_PREFIX/share/rockbox"
69 bindir="$ARG_PREFIX/bin"
70 libdir="$ARG_PREFIX/lib"
71 else
72 echo "ERROR: PREFIX does not exist"
73 exit
78 # Set the application LCD size according to the following priorities:
79 # 1) If --lcdwidth and --lcdheight are set, use them
80 # 2) If a size is passed to the app_set_lcd_size() function, use that
81 # 3) Otherwise ask the user
82 app_set_lcd_size () {
83 if [ -z "$ARG_LCDWIDTH" ]; then
84 ARG_LCDWIDTH=$1
86 if [ -z "$ARG_LCDHEIGHT" ]; then
87 ARG_LCDHEIGHT=$2
90 echo "Enter the LCD width (default: 320)"
91 if [ -z "$ARG_LCDWIDTH" ]; then
92 app_lcd_width=`input`
93 else
94 app_lcd_width="$ARG_LCDWIDTH"
96 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
97 echo "Enter the LCD height (default: 480)"
98 if [ -z "$ARG_LCDHEIGHT" ]; then
99 app_lcd_height=`input`
100 else
101 app_lcd_height="$ARG_LCDHEIGHT"
103 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
104 echo "Selected $app_lcd_width x $app_lcd_height resolution"
105 ARG_LCDWIDTH=$app_lcd_width
106 ARG_LCDHEIGHT=$app_lcd_height
108 app_lcd_width="#define LCD_WIDTH $app_lcd_width"
109 app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
112 findarmgcc() {
113 if [ "$ARG_ARM_EABI" != "0" ]; then
114 prefixtools arm-elf-eabi-
115 gccchoice="4.4.4"
116 else
117 prefixtools arm-elf-
118 gccchoice="4.0.3"
122 # scan the $PATH for the given command
123 findtool(){
124 file="$1"
126 IFS=":"
127 for path in $PATH
129 # echo "checks for $file in $path" >&2
130 if test -f "$path/$file"; then
131 echo "$path/$file"
132 return
134 done
135 # check whether caller wants literal return value if not found
136 if [ "$2" = "--lit" ]; then
137 echo "$file"
141 # scan the $PATH for sdl-config - check whether for a (cross-)win32
142 # sdl as requested
143 findsdl(){
144 file="sdl-config"
145 winbuild="$1"
147 IFS=":"
148 for path in $PATH
150 #echo "checks for $file in $path" >&2
151 if test -f "$path/$file"; then
152 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
153 if [ "yes" = "${winbuild}" ]; then
154 echo "$path/$file"
155 return
157 else
158 if [ "yes" != "${winbuild}" ]; then
159 echo "$path/$file"
160 return
164 done
167 simcc () {
169 # default tool setup for native building
170 prefixtools "$CROSS_COMPILE"
171 ARG_ARM_THUMB=0 # can't use thumb in native builds
173 app_type=$1
174 winbuild=""
175 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef// -e s/-O//`
176 GCCOPTS="$GCCOPTS -fno-builtin -g"
177 GCCOPTIMIZE=''
178 LDOPTS='-lm' # button-sdl.c uses sqrt()
180 # default output binary name, don't override app_get_platform()
181 if [ "$app_type" != "sdl-app" ]; then
182 output="rockboxui"
185 # default share option, override below if needed
186 SHARED_FLAG="-shared"
188 if [ "$win32crosscompile" = "yes" ]; then
189 LDOPTS="$LDOPTS -mconsole"
190 output="$output.exe"
191 winbuild="yes"
192 else
193 case $uname in
194 CYGWIN*)
195 echo "Cygwin host detected"
197 LDOPTS="$LDOPTS -mconsole"
198 output="$output.exe"
199 winbuild="yes"
202 MINGW*)
203 echo "MinGW host detected"
205 LDOPTS="$LDOPTS -mconsole"
206 output="$output.exe"
207 winbuild="yes"
210 Linux)
211 echo "Linux host detected"
212 LDOPTS="$LDOPTS -ldl"
215 FreeBSD)
216 echo "FreeBSD host detected"
217 LDOPTS="$LDOPTS -ldl"
220 Darwin)
221 echo "Darwin host detected"
222 LDOPTS="$LDOPTS -ldl"
224 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
227 SunOS)
228 echo "*Solaris host detected"
230 GCCOPTS="$GCCOPTS -fPIC"
231 LDOPTS="$LDOPTS -ldl"
235 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
236 exit 1
238 esac
241 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
242 sdl=`findsdl $winbuild`
244 if [ -n `echo $app_type | grep "sdl"` ]; then
245 if [ -z "$sdl" ]; then
246 echo "configure didn't find sdl-config, which indicates that you"
247 echo "don't have SDL (properly) installed. Please correct and"
248 echo "re-run configure!"
249 exit 2
250 else
251 # generic sdl-config checker
252 GCCOPTS="$GCCOPTS `$sdl --cflags`"
253 LDOPTS="$LDOPTS `$sdl --libs`"
258 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
260 if test "X$win32crosscompile" != "Xyes"; then
261 case `uname -m` in
262 x86_64|amd64)
263 # fPIC is needed to make shared objects link
264 # setting visibility to hidden is necessary to avoid strange crashes
265 # due to symbol clashing
266 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
267 # x86_64 supports MMX by default
270 i686)
271 echo "Enabling MMX support"
272 GCCOPTS="$GCCOPTS -mmmx"
274 esac
276 id=$$
277 cat >$tmpdir/conftest-$id.c <<EOF
278 #include <stdio.h>
279 int main(int argc, char **argv)
281 int var=0;
282 char *varp = (char *)&var;
283 *varp=1;
285 printf("%d\n", var);
286 return 0;
290 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
292 # when cross compiling, the endianess cannot be detected because the above program doesn't run
293 # on the local machine. assume little endian but print a warning
294 endian=`$tmpdir/conftest-$id 2> /dev/null`
295 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
296 # big endian
297 endian="big"
298 else
299 # little endian
300 endian="little"
303 if [ "$CROSS_COMPILE" != "" ]; then
304 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
307 if [ "$app_type" = "sdl-sim" ]; then
308 echo "Simulator environment deemed $endian endian"
309 elif [ "$app_type" = "sdl-app" ]; then
310 echo "Application environment deemed $endian endian"
311 elif [ "$app_type" = "checkwps" ]; then
312 echo "CheckWPS environment deemed $endian endian"
315 # use wildcard here to make it work even if it was named *.exe like
316 # on cygwin
317 rm -f $tmpdir/conftest-$id*
318 else
319 # We are crosscompiling
320 # add cross-compiler option(s)
321 prefixtools i586-mingw32msvc-
322 LDOPTS="$LDOPTS -mconsole"
323 output="rockboxui.exe"
324 endian="little" # windows is little endian
325 echo "Enabling MMX support"
326 GCCOPTS="$GCCOPTS -mmmx"
331 # functions for setting up cross-compiler names and options
332 # also set endianess and what the exact recommended gcc version is
333 # the gcc version should most likely match what versions we build with
334 # rockboxdev.sh
336 shcc () {
337 prefixtools sh-elf-
338 GCCOPTS="$CCOPTS -m1"
339 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
340 endian="big"
341 gccchoice="4.0.3"
344 calmrisccc () {
345 prefixtools calmrisc16-unknown-elf-
346 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
347 GCCOPTIMIZE="-fomit-frame-pointer"
348 endian="big"
351 coldfirecc () {
352 prefixtools m68k-elf-
353 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
354 GCCOPTIMIZE="-fomit-frame-pointer"
355 endian="big"
356 gccchoice="4.5.2"
359 arm7tdmicc () {
360 findarmgcc
361 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
362 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
363 GCCOPTS="$GCCOPTS -mlong-calls"
365 GCCOPTIMIZE="-fomit-frame-pointer"
366 endian="little"
369 arm9tdmicc () {
370 findarmgcc
371 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
372 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
373 GCCOPTS="$GCCOPTS -mlong-calls"
375 GCCOPTIMIZE="-fomit-frame-pointer"
376 endian="little"
379 arm940tbecc () {
380 findarmgcc
381 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
382 if test "$ARG_ARM_EABI" = "0"; then
383 GCCOPTS="$GCCOPTS -mlong-calls"
385 GCCOPTIMIZE="-fomit-frame-pointer"
386 endian="big"
389 arm940tcc () {
390 findarmgcc
391 GCCOPTS="$CCOPTS -mcpu=arm940t"
392 if test "$ARG_ARM_EABI" = "0"; then
393 GCCOPTS="$GCCOPTS -mlong-calls"
395 GCCOPTIMIZE="-fomit-frame-pointer"
396 endian="little"
399 arm946cc () {
400 findarmgcc
401 GCCOPTS="$CCOPTS -mcpu=arm9e"
402 if test "$ARG_ARM_EABI" = "0"; then
403 GCCOPTS="$GCCOPTS -mlong-calls"
405 GCCOPTIMIZE="-fomit-frame-pointer"
406 endian="little"
409 arm926ejscc () {
410 findarmgcc
411 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
412 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
413 GCCOPTS="$GCCOPTS -mlong-calls"
415 GCCOPTIMIZE="-fomit-frame-pointer"
416 endian="little"
419 arm1136jfscc () {
420 findarmgcc
421 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
422 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
423 GCCOPTS="$GCCOPTS -mlong-calls"
425 GCCOPTIMIZE="-fomit-frame-pointer"
426 endian="little"
429 arm1176jzscc () {
430 findarmgcc
431 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
432 if test "$ARG_ARM_EABI" = "0"; then
433 GCCOPTS="$GCCOPTS -mlong-calls"
435 GCCOPTIMIZE="-fomit-frame-pointer"
436 endian="little"
439 mipselcc () {
440 prefixtools mipsel-elf-
441 # mips is predefined, but we want it for paths. use __mips instead
442 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
443 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
444 GCCOPTIMIZE="-fomit-frame-pointer"
445 endian="little"
446 gccchoice="4.1.2"
449 maemocc () {
450 # Scratchbox sets up "gcc" based on the active target
451 prefixtools ""
453 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
454 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
455 GCCOPTIMIZE=''
456 LDOPTS="-lm -ldl $LDOPTS"
457 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
458 SHARED_FLAG="-shared"
459 endian="little"
461 is_n900=0
462 # Determine maemo version
463 if pkg-config --atleast-version=5 maemo-version; then
464 if [ "$1" == "4" ]; then
465 echo "ERROR: Maemo 4 SDK required."
466 exit 1
468 extradefines="$extradefines -DMAEMO5"
469 echo "Found N900 maemo version"
470 is_n900=1
471 elif pkg-config --atleast-version=4 maemo-version; then
472 if [ "$1" == "5" ]; then
473 echo "ERROR: Maemo 5 SDK required."
474 exit 1
476 extradefines="$extradefines -DMAEMO4"
477 echo "Found N8xx maemo version"
478 else
479 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
480 exit 1
483 # SDL
484 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
485 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
487 # glib and libosso support
488 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
489 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
491 # libhal support: Battery monitoring
492 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
493 LDOPTS="$LDOPTS `pkg-config --libs hal`"
495 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
496 if [ $is_n900 -eq 1 ]; then
497 # gstreamer support: Audio output.
498 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
499 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
501 # N900 specific: libplayback support
502 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
503 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
505 # N900 specific: Enable ARMv7 NEON support
506 if sb-conf current |grep ARMEL; then
507 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
508 extradefines="$extradefines -DMAEMO_ARM_BUILD"
510 else
511 # N8xx specific: Enable armv5te instructions
512 if sb-conf current |grep ARMEL; then
513 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
514 extradefines="$extradefines -DMAEMO_ARM_BUILD"
519 androidcc () {
520 if [ -z "$ANDROID_SDK_PATH" ]; then
521 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
522 echo "environment variable point to the root directory of the Android SDK."
523 exit
525 if [ -z "$ANDROID_NDK_PATH" ]; then
526 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
527 echo "environment variable point to the root directory of the Android NDK."
528 exit
530 buildhost=`uname | tr [:upper:] [:lower:]`
531 gccchoice="4.4.3"
532 gcctarget="arm-linux-androideabi-"
533 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
534 PATH=$PATH:$gccprefix/bin
535 prefixtools $gcctarget
536 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
537 GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
538 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
539 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
540 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
541 LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog"
542 extradefines="$extradefines -DANDROID"
543 endian="little"
544 SHARED_FLAG="-shared"
547 whichadvanced () {
548 atype=`echo "$1" | cut -c 2-`
549 ##################################################################
550 # Prompt for specific developer options
552 if [ "$atype" ]; then
553 interact=
554 else
555 interact=1
556 echo ""
557 printf "Enter your developer options (press only enter when done)\n\
558 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
559 (T)est plugins, S(m)all C lib:"
560 if [ "$memory" = "2" ]; then
561 printf ", (8)MB MOD"
563 if [ "$modelname" = "archosplayer" ]; then
564 printf ", Use (A)TA poweroff"
566 if [ "$t_model" = "ondio" ]; then
567 printf ", (B)acklight MOD"
569 if [ "$modelname" = "iaudiom5" ]; then
570 printf ", (F)M radio MOD"
572 if [ "$modelname" = "iriverh120" ]; then
573 printf ", (R)TC MOD"
575 echo ""
578 cont=1
579 while [ $cont = "1" ]; do
581 if [ "$interact" ]; then
582 option=`input`
583 else
584 option=`echo "$atype" | cut -c 1`
587 case $option in
588 [Dd])
589 if [ "yes" = "$profile" ]; then
590 echo "Debug is incompatible with profiling"
591 else
592 echo "DEBUG build enabled"
593 use_debug="yes"
596 [Ll])
597 echo "logf() support enabled"
598 logf="yes"
600 [Mm])
601 echo "Using Rockbox' small C library"
602 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
604 [Tt])
605 echo "Including test plugins"
606 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
608 [Cc])
609 echo "bootchart enabled (logf also enabled)"
610 bootchart="yes"
611 logf="yes"
613 [Ss])
614 echo "Simulator build enabled"
615 simulator="yes"
617 [Pp])
618 if [ "yes" = "$use_debug" ]; then
619 echo "Profiling is incompatible with debug"
620 else
621 echo "Profiling support is enabled"
622 profile="yes"
625 [Vv])
626 echo "Voice build selected"
627 voice="yes"
630 if [ "$memory" = "2" ]; then
631 memory="8"
632 echo "Memory size selected: 8MB"
635 [Aa])
636 if [ "$modelname" = "archosplayer" ]; then
637 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
638 echo "ATA power off enabled"
641 [Bb])
642 if [ "$t_model" = "ondio" ]; then
643 have_backlight="#define HAVE_BACKLIGHT"
644 echo "Backlight functions enabled"
647 [Ff])
648 if [ "$modelname" = "iaudiom5" ]; then
649 have_fmradio_in="#define HAVE_FMRADIO_IN"
650 echo "FM radio functions enabled"
653 [Rr])
654 if [ "$modelname" = "iriverh120" ]; then
655 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
656 have_rtc_alarm="#define HAVE_RTC_ALARM"
657 echo "RTC functions enabled (DS1339/DS3231)"
660 [Ww])
661 echo "Enabling Windows 32 cross-compiling"
662 win32crosscompile="yes"
664 "") # Match enter press when finished with advanced options
665 cont=0
668 echo "[ERROR] Option $option unsupported"
670 esac
671 if [ "$interact" ]; then
672 btype="$btype$option"
673 else
674 atype=`echo "$atype" | cut -c 2-`
675 [ "$atype" ] || cont=0
677 done
678 echo "done"
680 if [ "yes" = "$voice" ]; then
681 # Ask about languages to build
682 picklang
683 voicelanguage=`whichlang`
684 echo "Voice language set to $voicelanguage"
686 # Configure encoder and TTS engine for each language
687 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
688 voiceconfig "$thislang"
689 done
691 if [ "yes" = "$use_debug" ]; then
692 debug="-DDEBUG"
693 GCCOPTS="$GCCOPTS -g -DDEBUG"
695 if [ "yes" = "$logf" ]; then
696 use_logf="#define ROCKBOX_HAS_LOGF 1"
698 if [ "yes" = "$bootchart" ]; then
699 use_bootchart="#define DO_BOOTCHART 1"
701 if [ "yes" = "$simulator" ]; then
702 debug="-DDEBUG"
703 extradefines="$extradefines -DSIMULATOR"
704 archosrom=""
705 flash=""
707 if [ "yes" = "$profile" ]; then
708 extradefines="$extradefines -DRB_PROFILE"
709 PROFILE_OPTS="-finstrument-functions"
713 # Configure voice settings
714 voiceconfig () {
715 thislang=$1
716 if [ ! "$ARG_TTS" ]; then
717 echo "Building $thislang voice for $modelname. Select options"
718 echo ""
721 if [ -n "`findtool flite`" ]; then
722 FLITE="F(l)ite "
723 FLITE_OPTS=""
724 DEFAULT_TTS="flite"
725 DEFAULT_TTS_OPTS=$FLITE_OPTS
726 DEFAULT_NOISEFLOOR="500"
727 DEFAULT_CHOICE="L"
729 if [ -n "`findtool espeak`" ]; then
730 ESPEAK="(e)Speak "
731 ESPEAK_OPTS=""
732 DEFAULT_TTS="espeak"
733 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
734 DEFAULT_NOISEFLOOR="500"
735 DEFAULT_CHOICE="e"
737 if [ -n "`findtool festival`" ]; then
738 FESTIVAL="(F)estival "
739 case "$thislang" in
740 "italiano")
741 FESTIVAL_OPTS="--language italian"
743 "espanol")
744 FESTIVAL_OPTS="--language spanish"
746 "finnish")
747 FESTIVAL_OPTS="--language finnish"
749 "czech")
750 FESTIVAL_OPTS="--language czech"
753 FESTIVAL_OPTS=""
755 esac
756 DEFAULT_TTS="festival"
757 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
758 DEFAULT_NOISEFLOOR="500"
759 DEFAULT_CHOICE="F"
761 if [ -n "`findtool swift`" ]; then
762 SWIFT="S(w)ift "
763 SWIFT_OPTS=""
764 DEFAULT_TTS="swift"
765 DEFAULT_TTS_OPTS=$SWIFT_OPTS
766 DEFAULT_NOISEFLOOR="500"
767 DEFAULT_CHOICE="w"
769 # Allow SAPI if Windows is in use
770 if [ -n "`findtool winver`" ]; then
771 SAPI="(S)API "
772 SAPI_OPTS=""
773 DEFAULT_TTS="sapi"
774 DEFAULT_TTS_OPTS=$SAPI_OPTS
775 DEFAULT_NOISEFLOOR="500"
776 DEFAULT_CHOICE="S"
779 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
780 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
781 exit 3
784 if [ "$ARG_TTS" ]; then
785 option=$ARG_TTS
786 else
787 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
788 option=`input`
790 advopts="$advopts --tts=$option"
791 case "$option" in
792 [Ll])
793 TTS_ENGINE="flite"
794 NOISEFLOOR="500" # TODO: check this value
795 TTS_OPTS=$FLITE_OPTS
797 [Ee])
798 TTS_ENGINE="espeak"
799 NOISEFLOOR="500"
800 TTS_OPTS=$ESPEAK_OPTS
802 [Ff])
803 TTS_ENGINE="festival"
804 NOISEFLOOR="500"
805 TTS_OPTS=$FESTIVAL_OPTS
807 [Ss])
808 TTS_ENGINE="sapi"
809 NOISEFLOOR="500"
810 TTS_OPTS=$SAPI_OPTS
812 [Ww])
813 TTS_ENGINE="swift"
814 NOISEFLOOR="500"
815 TTS_OPTS=$SWIFT_OPTS
818 TTS_ENGINE=$DEFAULT_TTS
819 TTS_OPTS=$DEFAULT_TTS_OPTS
820 NOISEFLOOR=$DEFAULT_NOISEFLOOR
821 esac
822 echo "Using $TTS_ENGINE for TTS"
824 # Select which voice to use for Festival
825 if [ "$TTS_ENGINE" = "festival" ]; then
826 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
827 for voice in $voicelist; do
828 TTS_FESTIVAL_VOICE="$voice" # Default choice
829 break
830 done
831 if [ "$ARG_VOICE" ]; then
832 CHOICE=$ARG_VOICE
833 else
835 for voice in $voicelist; do
836 printf "%3d. %s\n" "$i" "$voice"
837 i=`expr $i + 1`
838 done
839 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
840 CHOICE=`input`
843 for voice in $voicelist; do
844 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
845 TTS_FESTIVAL_VOICE="$voice"
847 i=`expr $i + 1`
848 done
849 advopts="$advopts --voice=$CHOICE"
850 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
851 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
854 # Read custom tts options from command line
855 if [ "$ARG_TTSOPTS" ]; then
856 TTS_OPTS="$ARG_TTSOPTS"
857 advopts="$advopts --ttsopts='$TTS_OPTS'"
858 echo "$TTS_ENGINE options set to $TTS_OPTS"
861 if [ "$swcodec" = "yes" ]; then
862 ENCODER="rbspeexenc"
863 ENC_CMD="rbspeexenc"
864 ENC_OPTS="-q 4 -c 10"
865 else
866 if [ -n "`findtool lame`" ]; then
867 ENCODER="lame"
868 ENC_CMD="lame"
869 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
870 else
871 echo "You need LAME in the system path to build voice files for"
872 echo "HWCODEC targets."
873 exit 4
877 echo "Using $ENCODER for encoding voice clips"
879 # Read custom encoder options from command line
880 if [ "$ARG_ENCOPTS" ]; then
881 ENC_OPTS="$ARG_ENCOPTS"
882 advopts="$advopts --encopts='$ENC_OPTS'"
883 echo "$ENCODER options set to $ENC_OPTS"
886 TEMPDIR="${pwd}"
887 if [ -n "`findtool cygpath`" ]; then
888 TEMPDIR=`cygpath . -a -w`
892 picklang() {
893 # figure out which languages that are around
894 for file in $rootdir/apps/lang/*.lang; do
895 clean=`basename $file .lang`
896 langs="$langs $clean"
897 done
899 if [ "$ARG_LANG" ]; then
900 pick=$ARG_LANG
901 else
902 echo "Select a number for the language to use (default is english)"
903 # FIXME The multiple-language feature is currently broken
904 # echo "You may enter a comma-separated list of languages to build"
906 num=1
907 for one in $langs; do
908 echo "$num. $one"
909 num=`expr $num + 1`
910 done
911 pick=`input`
913 advopts="$advopts --language=$pick"
916 whichlang() {
917 output=""
918 # Allow the user to pass a comma-separated list of langauges
919 for thispick in `echo $pick | sed 's/,/ /g'`; do
920 num=1
921 for one in $langs; do
922 # Accept both the language number and name
923 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
924 if [ "$output" = "" ]; then
925 output=$one
926 else
927 output=$output,$one
930 num=`expr $num + 1`
931 done
932 done
933 if [ -z "$output" ]; then
934 # pick a default
935 output="english"
937 echo $output
940 help() {
941 echo "Rockbox configure script."
942 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
943 echo "Do *NOT* run this within the tools directory!"
944 echo ""
945 cat <<EOF
946 Usage: configure [OPTION]...
947 Options:
948 --target=TARGET Sets the target, TARGET can be either the target ID or
949 corresponding string. Run without this option to see all
950 available targets.
952 --ram=RAM Sets the RAM for certain targets. Even though any number
953 is accepted, not every number is correct. The default
954 value will be applied, if you entered a wrong number
955 (which depends on the target). Watch the output. Run
956 without this option if you are not sure which the right
957 number is.
959 --type=TYPE Sets the build type. Shortcuts are also valid.
960 Run without this option to see all available types.
961 Multiple values are allowed and managed in the input
962 order. So --type=b stands for Bootloader build, while
963 --type=ab stands for "Backlight MOD" build.
965 --language=LANG Set the language used for voice generation (used only if
966 TYPE is AV).
968 --tts=ENGINE Set the TTS engine used for voice generation (used only
969 if TYPE is AV).
971 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
972 AV).
974 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
976 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
978 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
979 This is useful for having multiple alternate builds on
980 your device that you can load with ROLO. However as the
981 bootloader looks for .rockbox you won't be able to boot
982 into this build.
984 --ccache Enable ccache use (done by default these days)
985 --no-ccache Disable ccache use
987 --eabi Make configure prefer toolchains that are able to compile
988 for the new ARM standard abi EABI
989 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
990 --thumb Build with -mthumb (for ARM builds)
991 --no-thumb The opposite of --thumb (don't use thumb even for targets
992 where this is the default
993 --prefix Target installation directory
994 --help Shows this message (must not be used with other options)
998 exit
1001 ARG_CCACHE=
1002 ARG_ENCOPTS=
1003 ARG_LANG=
1004 ARG_RAM=
1005 ARG_RBDIR=
1006 ARG_TARGET=
1007 ARG_TTS=
1008 ARG_TTSOPTS=
1009 ARG_TYPE=
1010 ARG_VOICE=
1011 ARG_ARM_EABI=
1012 ARG_ARM_THUMB=
1013 ARG_PREFIX="$PREFIX"
1014 err=
1015 for arg in "$@"; do
1016 case "$arg" in
1017 --ccache) ARG_CCACHE=1;;
1018 --no-ccache) ARG_CCACHE=0;;
1019 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1020 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
1021 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1022 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
1023 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1024 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1025 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1026 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1027 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1028 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1029 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
1030 --eabi) ARG_ARM_EABI=1;;
1031 --no-eabi) ARG_ARM_EABI=0;;
1032 --thumb) ARG_ARM_THUMB=1;;
1033 --no-thumb) ARG_ARM_THUMB=0;;
1034 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
1035 --help) help;;
1036 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1037 esac
1038 done
1039 [ "$err" ] && exit 1
1041 advopts=
1043 if [ "$TMPDIR" != "" ]; then
1044 tmpdir=$TMPDIR
1045 else
1046 tmpdir=/tmp
1048 echo Using temporary directory $tmpdir
1050 if test -r "configure"; then
1051 # this is a check for a configure script in the current directory, it there
1052 # is one, try to figure out if it is this one!
1054 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1055 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1056 echo "It will only cause you pain and grief. Instead do this:"
1057 echo ""
1058 echo " cd .."
1059 echo " mkdir build-dir"
1060 echo " cd build-dir"
1061 echo " ../tools/configure"
1062 echo ""
1063 echo "Much happiness will arise from this. Enjoy"
1064 exit 5
1068 # get our current directory
1069 pwd=`pwd`;
1071 if { echo $pwd | grep " "; } then
1072 echo "You're running this script in a path that contains space. The build"
1073 echo "system is unfortunately not clever enough to deal with this. Please"
1074 echo "run the script from a different path, rename the path or fix the build"
1075 echo "system!"
1076 exit 6
1079 if [ -z "$rootdir" ]; then
1080 ##################################################################
1081 # Figure out where the source code root is!
1083 rootdir=`dirname $0`/../
1085 #####################################################################
1086 # Convert the possibly relative directory name to an absolute version
1088 now=`pwd`
1089 cd $rootdir
1090 rootdir=`pwd`
1092 # cd back to the build dir
1093 cd $now
1096 apps="apps"
1097 appsdir='\$(ROOTDIR)/apps'
1098 firmdir='\$(ROOTDIR)/firmware'
1099 toolsdir='\$(ROOTDIR)/tools'
1102 ##################################################################
1103 # Figure out target platform
1106 if [ "$ARG_TARGET" ]; then
1107 buildfor=$ARG_TARGET
1108 else
1109 echo "Enter target platform:"
1110 cat <<EOF
1111 ==Archos== ==iriver== ==Apple iPod==
1112 0) Player/Studio 10) H120/H140 20) Color/Photo
1113 1) Recorder 11) H320/H340 21) Nano 1G
1114 2) FM Recorder 12) iHP-100/110/115 22) Video
1115 3) Recorder v2 13) iFP-790 23) 3G
1116 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1117 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1118 6) AV300 26) Mini 2G
1119 ==Toshiba== 27) 1G, 2G
1120 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1121 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1122 31) M5/M5L
1123 32) 7 ==Olympus= ==SanDisk==
1124 33) D2 70) M:Robe 500 50) Sansa e200
1125 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1126 52) Sansa c200
1127 ==Creative== ==Philips== 53) Sansa m200
1128 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1129 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1130 92) Zen Vision HDD1830 56) Sansa e200v2
1131 102) GoGear HDD6330 57) Sansa m200v4
1132 ==Onda== 58) Sansa Fuze
1133 120) VX747 ==Meizu== 59) Sansa c200v2
1134 121) VX767 110) M6SL 60) Sansa Clipv2
1135 122) VX747+ 111) M6SP 61) Sansa View
1136 123) VX777 112) M3 62) Sansa Clip+
1137 63) Sansa Fuze v2
1138 ==Samsung== ==Tatung==
1139 140) YH-820 150) Elio TPJ-1022 ==Logik==
1140 141) YH-920 80) DAX 1GB MP3/DAB
1141 142) YH-925 ==Packard Bell==
1142 143) YP-S3 160) Vibe 500 ==Lyre project==
1143 130) Lyre proto 1
1144 ==Application== ==MPIO== 131) Mini2440
1145 200) SDL 170) HD200
1146 201) Android 171) HD300
1147 202) Nokia N8xx
1148 203) Nokia N900
1152 buildfor=`input`;
1155 # Set of tools built for all target platforms:
1156 toolset="rdf2binary convbdf codepages"
1158 # Toolsets for some target families:
1159 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1160 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1161 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1162 ipodbitmaptools="$toolset scramble bmp2rb"
1163 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1164 tccbitmaptools="$toolset scramble bmp2rb"
1165 # generic is used by IFP, Meizu and Onda
1166 genericbitmaptools="$toolset bmp2rb"
1167 # scramble is used by all other targets
1168 scramblebitmaptools="$genericbitmaptools scramble"
1171 # ---- For each target ----
1173 # *Variables*
1174 # target_id: a unique number identifying this target, IS NOT the menu number.
1175 # Just use the currently highest number+1 when you add a new
1176 # target.
1177 # modelname: short model name used all over to identify this target
1178 # memory: number of megabytes of RAM this target has. If the amount can
1179 # be selected by the size prompt, let memory be unset here
1180 # target: -Ddefine passed to the build commands to make the correct
1181 # config-*.h file get included etc
1182 # tool: the tool that takes a plain binary and converts that into a
1183 # working "firmware" file for your target
1184 # output: the final output file name
1185 # boottool: the tool that takes a plain binary and generates a bootloader
1186 # file for your target (or blank to use $tool)
1187 # bootoutput:the final output file name for the bootloader (or blank to use
1188 # $output)
1189 # appextra: passed to the APPEXTRA variable in the Makefiles.
1190 # TODO: add proper explanation
1191 # archosrom: used only for Archos targets that build a special flashable .ucl
1192 # image.
1193 # flash: name of output for flashing, for targets where there's a special
1194 # file output for this.
1195 # plugins: set to 'yes' to build the plugins. Early development builds can
1196 # set this to no in the early stages to have an easier life for a
1197 # while
1198 # swcodec: set 'yes' on swcodec targets
1199 # toolset: lists what particular tools in the tools/ directory that this
1200 # target needs to have built prior to building Rockbox
1202 # *Functions*
1203 # *cc: sets up gcc and compiler options for your target builds. Note
1204 # that if you select a simulator build, the compiler selection is
1205 # overridden later in the script.
1207 case $buildfor in
1209 0|archosplayer)
1210 target_id=1
1211 modelname="archosplayer"
1212 target="-DARCHOS_PLAYER"
1213 shcc
1214 tool="$rootdir/tools/scramble"
1215 output="archos.mod"
1216 appextra="player:gui"
1217 archosrom="$pwd/rombox.ucl"
1218 flash="$pwd/rockbox.ucl"
1219 plugins="yes"
1220 swcodec=""
1222 # toolset is the tools within the tools directory that we build for
1223 # this particular target.
1224 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1226 # Note: the convbdf is present in the toolset just because: 1) the
1227 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1228 # build the player simulator
1230 t_cpu="sh"
1231 t_manufacturer="archos"
1232 t_model="player"
1235 1|archosrecorder)
1236 target_id=2
1237 modelname="archosrecorder"
1238 target="-DARCHOS_RECORDER"
1239 shcc
1240 tool="$rootdir/tools/scramble"
1241 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1242 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1243 output="ajbrec.ajz"
1244 appextra="recorder:gui:radio"
1245 #archosrom="$pwd/rombox.ucl"
1246 flash="$pwd/rockbox.ucl"
1247 plugins="yes"
1248 swcodec=""
1249 # toolset is the tools within the tools directory that we build for
1250 # this particular target.
1251 toolset=$archosbitmaptools
1252 t_cpu="sh"
1253 t_manufacturer="archos"
1254 t_model="recorder"
1257 2|archosfmrecorder)
1258 target_id=3
1259 modelname="archosfmrecorder"
1260 target="-DARCHOS_FMRECORDER"
1261 shcc
1262 tool="$rootdir/tools/scramble -fm"
1263 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1264 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1265 output="ajbrec.ajz"
1266 appextra="recorder:gui:radio"
1267 #archosrom="$pwd/rombox.ucl"
1268 flash="$pwd/rockbox.ucl"
1269 plugins="yes"
1270 swcodec=""
1271 # toolset is the tools within the tools directory that we build for
1272 # this particular target.
1273 toolset=$archosbitmaptools
1274 t_cpu="sh"
1275 t_manufacturer="archos"
1276 t_model="fm_v2"
1279 3|archosrecorderv2)
1280 target_id=4
1281 modelname="archosrecorderv2"
1282 target="-DARCHOS_RECORDERV2"
1283 shcc
1284 tool="$rootdir/tools/scramble -v2"
1285 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1286 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1287 output="ajbrec.ajz"
1288 appextra="recorder:gui:radio"
1289 #archosrom="$pwd/rombox.ucl"
1290 flash="$pwd/rockbox.ucl"
1291 plugins="yes"
1292 swcodec=""
1293 # toolset is the tools within the tools directory that we build for
1294 # this particular target.
1295 toolset=$archosbitmaptools
1296 t_cpu="sh"
1297 t_manufacturer="archos"
1298 t_model="fm_v2"
1301 4|archosondiosp)
1302 target_id=7
1303 modelname="archosondiosp"
1304 target="-DARCHOS_ONDIOSP"
1305 shcc
1306 tool="$rootdir/tools/scramble -osp"
1307 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1308 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1309 output="ajbrec.ajz"
1310 appextra="recorder:gui:radio"
1311 #archosrom="$pwd/rombox.ucl"
1312 flash="$pwd/rockbox.ucl"
1313 plugins="yes"
1314 swcodec=""
1315 # toolset is the tools within the tools directory that we build for
1316 # this particular target.
1317 toolset=$archosbitmaptools
1318 t_cpu="sh"
1319 t_manufacturer="archos"
1320 t_model="ondio"
1323 5|archosondiofm)
1324 target_id=8
1325 modelname="archosondiofm"
1326 target="-DARCHOS_ONDIOFM"
1327 shcc
1328 tool="$rootdir/tools/scramble -ofm"
1329 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1330 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1331 output="ajbrec.ajz"
1332 appextra="recorder:gui:radio"
1333 #archosrom="$pwd/rombox.ucl"
1334 flash="$pwd/rockbox.ucl"
1335 plugins="yes"
1336 swcodec=""
1337 toolset=$archosbitmaptools
1338 t_cpu="sh"
1339 t_manufacturer="archos"
1340 t_model="ondio"
1343 6|archosav300)
1344 target_id=38
1345 modelname="archosav300"
1346 target="-DARCHOS_AV300"
1347 memory=16 # always
1348 arm7tdmicc
1349 tool="$rootdir/tools/scramble -mm=C"
1350 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1351 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1352 output="cjbm.ajz"
1353 appextra="recorder:gui:radio"
1354 plugins="yes"
1355 swcodec=""
1356 # toolset is the tools within the tools directory that we build for
1357 # this particular target.
1358 toolset="$toolset scramble descramble bmp2rb"
1359 # architecture, manufacturer and model for the target-tree build
1360 t_cpu="arm"
1361 t_manufacturer="archos"
1362 t_model="av300"
1365 10|iriverh120)
1366 target_id=9
1367 modelname="iriverh120"
1368 target="-DIRIVER_H120"
1369 memory=32 # always
1370 coldfirecc
1371 tool="$rootdir/tools/scramble -add=h120"
1372 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1373 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1374 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1375 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1376 output="rockbox.iriver"
1377 bootoutput="bootloader.iriver"
1378 appextra="recorder:gui:radio"
1379 flash="$pwd/rombox.iriver"
1380 plugins="yes"
1381 swcodec="yes"
1382 # toolset is the tools within the tools directory that we build for
1383 # this particular target.
1384 toolset=$iriverbitmaptools
1385 t_cpu="coldfire"
1386 t_manufacturer="iriver"
1387 t_model="h100"
1390 11|iriverh300)
1391 target_id=10
1392 modelname="iriverh300"
1393 target="-DIRIVER_H300"
1394 memory=32 # always
1395 coldfirecc
1396 tool="$rootdir/tools/scramble -add=h300"
1397 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1398 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1399 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1400 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1401 output="rockbox.iriver"
1402 appextra="recorder:gui:radio"
1403 plugins="yes"
1404 swcodec="yes"
1405 # toolset is the tools within the tools directory that we build for
1406 # this particular target.
1407 toolset=$iriverbitmaptools
1408 t_cpu="coldfire"
1409 t_manufacturer="iriver"
1410 t_model="h300"
1413 12|iriverh100)
1414 target_id=11
1415 modelname="iriverh100"
1416 target="-DIRIVER_H100"
1417 memory=16 # always
1418 coldfirecc
1419 tool="$rootdir/tools/scramble -add=h100"
1420 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1421 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1422 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1423 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1424 output="rockbox.iriver"
1425 bootoutput="bootloader.iriver"
1426 appextra="recorder:gui:radio"
1427 flash="$pwd/rombox.iriver"
1428 plugins="yes"
1429 swcodec="yes"
1430 # toolset is the tools within the tools directory that we build for
1431 # this particular target.
1432 toolset=$iriverbitmaptools
1433 t_cpu="coldfire"
1434 t_manufacturer="iriver"
1435 t_model="h100"
1438 13|iriverifp7xx)
1439 target_id=19
1440 modelname="iriverifp7xx"
1441 target="-DIRIVER_IFP7XX"
1442 memory=1
1443 arm7tdmicc short
1444 tool="cp"
1445 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1446 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1447 output="rockbox.wma"
1448 appextra="recorder:gui:radio"
1449 plugins="yes"
1450 swcodec="yes"
1451 # toolset is the tools within the tools directory that we build for
1452 # this particular target.
1453 toolset=$genericbitmaptools
1454 t_cpu="arm"
1455 t_manufacturer="pnx0101"
1456 t_model="iriver-ifp7xx"
1459 14|iriverh10)
1460 target_id=22
1461 modelname="iriverh10"
1462 target="-DIRIVER_H10"
1463 memory=32 # always
1464 arm7tdmicc
1465 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1466 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1467 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1468 output="rockbox.mi4"
1469 appextra="recorder:gui:radio"
1470 plugins="yes"
1471 swcodec="yes"
1472 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1473 bootoutput="H10_20GC.mi4"
1474 # toolset is the tools within the tools directory that we build for
1475 # this particular target.
1476 toolset=$scramblebitmaptools
1477 # architecture, manufacturer and model for the target-tree build
1478 t_cpu="arm"
1479 t_manufacturer="iriver"
1480 t_model="h10"
1483 15|iriverh10_5gb)
1484 target_id=24
1485 modelname="iriverh10_5gb"
1486 target="-DIRIVER_H10_5GB"
1487 memory=32 # always
1488 arm7tdmicc
1489 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1490 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1491 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1492 output="rockbox.mi4"
1493 appextra="recorder:gui:radio"
1494 plugins="yes"
1495 swcodec="yes"
1496 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1497 bootoutput="H10.mi4"
1498 # toolset is the tools within the tools directory that we build for
1499 # this particular target.
1500 toolset=$scramblebitmaptools
1501 # architecture, manufacturer and model for the target-tree build
1502 t_cpu="arm"
1503 t_manufacturer="iriver"
1504 t_model="h10"
1507 20|ipodcolor)
1508 target_id=13
1509 modelname="ipodcolor"
1510 target="-DIPOD_COLOR"
1511 memory=32 # always
1512 arm7tdmicc
1513 tool="$rootdir/tools/scramble -add=ipco"
1514 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1515 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1516 output="rockbox.ipod"
1517 appextra="recorder:gui:radio"
1518 plugins="yes"
1519 swcodec="yes"
1520 bootoutput="bootloader-$modelname.ipod"
1521 # toolset is the tools within the tools directory that we build for
1522 # this particular target.
1523 toolset=$ipodbitmaptools
1524 # architecture, manufacturer and model for the target-tree build
1525 t_cpu="arm"
1526 t_manufacturer="ipod"
1527 t_model="color"
1530 21|ipodnano1g)
1531 target_id=14
1532 modelname="ipodnano1g"
1533 target="-DIPOD_NANO"
1534 memory=32 # always
1535 arm7tdmicc
1536 tool="$rootdir/tools/scramble -add=nano"
1537 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1538 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1539 output="rockbox.ipod"
1540 appextra="recorder:gui:radio"
1541 plugins="yes"
1542 swcodec="yes"
1543 bootoutput="bootloader-$modelname.ipod"
1544 # toolset is the tools within the tools directory that we build for
1545 # this particular target.
1546 toolset=$ipodbitmaptools
1547 # architecture, manufacturer and model for the target-tree build
1548 t_cpu="arm"
1549 t_manufacturer="ipod"
1550 t_model="nano"
1553 22|ipodvideo)
1554 target_id=15
1555 modelname="ipodvideo"
1556 target="-DIPOD_VIDEO"
1557 memory=64 # always. This is reduced at runtime if needed
1558 arm7tdmicc
1559 tool="$rootdir/tools/scramble -add=ipvd"
1560 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1561 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1562 output="rockbox.ipod"
1563 appextra="recorder:gui:radio"
1564 plugins="yes"
1565 swcodec="yes"
1566 bootoutput="bootloader-$modelname.ipod"
1567 # toolset is the tools within the tools directory that we build for
1568 # this particular target.
1569 toolset=$ipodbitmaptools
1570 # architecture, manufacturer and model for the target-tree build
1571 t_cpu="arm"
1572 t_manufacturer="ipod"
1573 t_model="video"
1576 23|ipod3g)
1577 target_id=16
1578 modelname="ipod3g"
1579 target="-DIPOD_3G"
1580 memory=32 # always
1581 arm7tdmicc
1582 tool="$rootdir/tools/scramble -add=ip3g"
1583 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1584 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1585 output="rockbox.ipod"
1586 appextra="recorder:gui:radio"
1587 plugins="yes"
1588 swcodec="yes"
1589 bootoutput="bootloader-$modelname.ipod"
1590 # toolset is the tools within the tools directory that we build for
1591 # this particular target.
1592 toolset=$ipodbitmaptools
1593 # architecture, manufacturer and model for the target-tree build
1594 t_cpu="arm"
1595 t_manufacturer="ipod"
1596 t_model="3g"
1599 24|ipod4g)
1600 target_id=17
1601 modelname="ipod4g"
1602 target="-DIPOD_4G"
1603 memory=32 # always
1604 arm7tdmicc
1605 tool="$rootdir/tools/scramble -add=ip4g"
1606 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1607 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1608 output="rockbox.ipod"
1609 appextra="recorder:gui:radio"
1610 plugins="yes"
1611 swcodec="yes"
1612 bootoutput="bootloader-$modelname.ipod"
1613 # toolset is the tools within the tools directory that we build for
1614 # this particular target.
1615 toolset=$ipodbitmaptools
1616 # architecture, manufacturer and model for the target-tree build
1617 t_cpu="arm"
1618 t_manufacturer="ipod"
1619 t_model="4g"
1622 25|ipodmini1g)
1623 target_id=18
1624 modelname="ipodmini1g"
1625 target="-DIPOD_MINI"
1626 memory=32 # always
1627 arm7tdmicc
1628 tool="$rootdir/tools/scramble -add=mini"
1629 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1630 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1631 output="rockbox.ipod"
1632 appextra="recorder:gui:radio"
1633 plugins="yes"
1634 swcodec="yes"
1635 bootoutput="bootloader-$modelname.ipod"
1636 # toolset is the tools within the tools directory that we build for
1637 # this particular target.
1638 toolset=$ipodbitmaptools
1639 # architecture, manufacturer and model for the target-tree build
1640 t_cpu="arm"
1641 t_manufacturer="ipod"
1642 t_model="mini"
1645 26|ipodmini2g)
1646 target_id=21
1647 modelname="ipodmini2g"
1648 target="-DIPOD_MINI2G"
1649 memory=32 # always
1650 arm7tdmicc
1651 tool="$rootdir/tools/scramble -add=mn2g"
1652 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1653 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1654 output="rockbox.ipod"
1655 appextra="recorder:gui:radio"
1656 plugins="yes"
1657 swcodec="yes"
1658 bootoutput="bootloader-$modelname.ipod"
1659 # toolset is the tools within the tools directory that we build for
1660 # this particular target.
1661 toolset=$ipodbitmaptools
1662 # architecture, manufacturer and model for the target-tree build
1663 t_cpu="arm"
1664 t_manufacturer="ipod"
1665 t_model="mini2g"
1668 27|ipod1g2g)
1669 target_id=29
1670 modelname="ipod1g2g"
1671 target="-DIPOD_1G2G"
1672 memory=32 # always
1673 arm7tdmicc
1674 tool="$rootdir/tools/scramble -add=1g2g"
1675 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1676 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1677 output="rockbox.ipod"
1678 appextra="recorder:gui:radio"
1679 plugins="yes"
1680 swcodec="yes"
1681 bootoutput="bootloader-$modelname.ipod"
1682 # toolset is the tools within the tools directory that we build for
1683 # this particular target.
1684 toolset=$ipodbitmaptools
1685 # architecture, manufacturer and model for the target-tree build
1686 t_cpu="arm"
1687 t_manufacturer="ipod"
1688 t_model="1g2g"
1691 28|ipodnano2g)
1692 target_id=62
1693 modelname="ipodnano2g"
1694 target="-DIPOD_NANO2G"
1695 memory=32 # always
1696 arm940tcc
1697 tool="$rootdir/tools/scramble -add=nn2g"
1698 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1699 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1700 output="rockbox.ipod"
1701 appextra="recorder:gui:radio"
1702 plugins="yes"
1703 swcodec="yes"
1704 bootoutput="bootloader-$modelname.ipod"
1705 # toolset is the tools within the tools directory that we build for
1706 # this particular target.
1707 toolset=$ipodbitmaptools
1708 # architecture, manufacturer and model for the target-tree build
1709 t_cpu="arm"
1710 t_manufacturer="s5l8700"
1711 t_model="ipodnano2g"
1714 29|ipod6g)
1715 target_id=71
1716 modelname="ipod6g"
1717 target="-DIPOD_6G"
1718 memory=64 # always
1719 arm926ejscc
1720 tool="$rootdir/tools/scramble -add=ip6g"
1721 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1722 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1723 output="rockbox.ipod"
1724 appextra="recorder:gui:radio"
1725 plugins="yes"
1726 swcodec="yes"
1727 bootoutput="bootloader-$modelname.ipod"
1728 # toolset is the tools within the tools directory that we build for
1729 # this particular target.
1730 toolset=$ipodbitmaptools
1731 # architecture, manufacturer and model for the target-tree build
1732 t_cpu="arm"
1733 t_manufacturer="s5l8702"
1734 t_model="ipod6g"
1737 30|iaudiox5)
1738 target_id=12
1739 modelname="iaudiox5"
1740 target="-DIAUDIO_X5"
1741 memory=16 # always
1742 coldfirecc
1743 tool="$rootdir/tools/scramble -add=iax5"
1744 boottool="$rootdir/tools/scramble -iaudiox5"
1745 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1746 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1747 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1748 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1749 output="rockbox.iaudio"
1750 bootoutput="x5_fw.bin"
1751 appextra="recorder:gui:radio"
1752 plugins="yes"
1753 swcodec="yes"
1754 # toolset is the tools within the tools directory that we build for
1755 # this particular target.
1756 toolset="$iaudiobitmaptools"
1757 # architecture, manufacturer and model for the target-tree build
1758 t_cpu="coldfire"
1759 t_manufacturer="iaudio"
1760 t_model="x5"
1763 31|iaudiom5)
1764 target_id=28
1765 modelname="iaudiom5"
1766 target="-DIAUDIO_M5"
1767 memory=16 # always
1768 coldfirecc
1769 tool="$rootdir/tools/scramble -add=iam5"
1770 boottool="$rootdir/tools/scramble -iaudiom5"
1771 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1772 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1773 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1774 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1775 output="rockbox.iaudio"
1776 bootoutput="m5_fw.bin"
1777 appextra="recorder:gui:radio"
1778 plugins="yes"
1779 swcodec="yes"
1780 # toolset is the tools within the tools directory that we build for
1781 # this particular target.
1782 toolset="$iaudiobitmaptools"
1783 # architecture, manufacturer and model for the target-tree build
1784 t_cpu="coldfire"
1785 t_manufacturer="iaudio"
1786 t_model="m5"
1789 32|iaudio7)
1790 target_id=32
1791 modelname="iaudio7"
1792 target="-DIAUDIO_7"
1793 memory=16 # always
1794 arm946cc
1795 tool="$rootdir/tools/scramble -add=i7"
1796 boottool="$rootdir/tools/scramble -tcc=crc"
1797 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1798 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1799 output="rockbox.iaudio"
1800 appextra="recorder:gui:radio"
1801 plugins="yes"
1802 swcodec="yes"
1803 bootoutput="I7_FW.BIN"
1804 # toolset is the tools within the tools directory that we build for
1805 # this particular target.
1806 toolset="$tccbitmaptools"
1807 # architecture, manufacturer and model for the target-tree build
1808 t_cpu="arm"
1809 t_manufacturer="tcc77x"
1810 t_model="iaudio7"
1813 33|cowond2)
1814 target_id=34
1815 modelname="cowond2"
1816 target="-DCOWON_D2"
1817 memory=32
1818 arm926ejscc
1819 tool="$rootdir/tools/scramble -add=d2"
1820 boottool="cp "
1821 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1822 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1823 output="rockbox.d2"
1824 bootoutput="bootloader-cowond2.bin"
1825 appextra="recorder:gui:radio"
1826 plugins="yes"
1827 swcodec="yes"
1828 toolset="$tccbitmaptools"
1829 # architecture, manufacturer and model for the target-tree build
1830 t_cpu="arm"
1831 t_manufacturer="tcc780x"
1832 t_model="cowond2"
1835 34|iaudiom3)
1836 target_id=37
1837 modelname="iaudiom3"
1838 target="-DIAUDIO_M3"
1839 memory=16 # always
1840 coldfirecc
1841 tool="$rootdir/tools/scramble -add=iam3"
1842 boottool="$rootdir/tools/scramble -iaudiom3"
1843 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1844 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1845 output="rockbox.iaudio"
1846 bootoutput="cowon_m3.bin"
1847 appextra="recorder:gui:radio"
1848 plugins="yes"
1849 swcodec="yes"
1850 # toolset is the tools within the tools directory that we build for
1851 # this particular target.
1852 toolset="$iaudiobitmaptools"
1853 # architecture, manufacturer and model for the target-tree build
1854 t_cpu="coldfire"
1855 t_manufacturer="iaudio"
1856 t_model="m3"
1859 40|gigabeatfx)
1860 target_id=20
1861 modelname="gigabeatfx"
1862 target="-DGIGABEAT_F"
1863 memory=32 # always
1864 arm9tdmicc
1865 tool="$rootdir/tools/scramble -add=giga"
1866 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1867 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1868 output="rockbox.gigabeat"
1869 appextra="recorder:gui:radio"
1870 plugins="yes"
1871 swcodec="yes"
1872 toolset=$gigabeatbitmaptools
1873 boottool="$rootdir/tools/scramble -gigabeat"
1874 bootoutput="FWIMG01.DAT"
1875 # architecture, manufacturer and model for the target-tree build
1876 t_cpu="arm"
1877 t_manufacturer="s3c2440"
1878 t_model="gigabeat-fx"
1881 41|gigabeats)
1882 target_id=26
1883 modelname="gigabeats"
1884 target="-DGIGABEAT_S"
1885 memory=64
1886 arm1136jfscc
1887 tool="$rootdir/tools/scramble -add=gigs"
1888 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1889 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1890 output="rockbox.gigabeat"
1891 appextra="recorder:gui:radio"
1892 plugins="yes"
1893 swcodec="yes"
1894 toolset="$gigabeatbitmaptools"
1895 boottool="$rootdir/tools/scramble -gigabeats"
1896 bootoutput="nk.bin"
1897 # architecture, manufacturer and model for the target-tree build
1898 t_cpu="arm"
1899 t_manufacturer="imx31"
1900 t_model="gigabeat-s"
1903 70|mrobe500)
1904 target_id=36
1905 modelname="mrobe500"
1906 target="-DMROBE_500"
1907 memory=64 # always
1908 arm926ejscc
1909 tool="$rootdir/tools/scramble -add=m500"
1910 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1911 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1912 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1913 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1914 output="rockbox.mrobe500"
1915 appextra="recorder:gui:radio"
1916 plugins="yes"
1917 swcodec="yes"
1918 toolset=$gigabeatbitmaptools
1919 boottool="cp "
1920 bootoutput="rockbox.mrboot"
1921 # architecture, manufacturer and model for the target-tree build
1922 t_cpu="arm"
1923 t_manufacturer="tms320dm320"
1924 t_model="mrobe-500"
1927 71|mrobe100)
1928 target_id=33
1929 modelname="mrobe100"
1930 target="-DMROBE_100"
1931 memory=32 # always
1932 arm7tdmicc
1933 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1934 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1935 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1936 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1937 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1938 output="rockbox.mi4"
1939 appextra="recorder:gui:radio"
1940 plugins="yes"
1941 swcodec="yes"
1942 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1943 bootoutput="pp5020.mi4"
1944 # toolset is the tools within the tools directory that we build for
1945 # this particular target.
1946 toolset=$scramblebitmaptools
1947 # architecture, manufacturer and model for the target-tree build
1948 t_cpu="arm"
1949 t_manufacturer="olympus"
1950 t_model="mrobe-100"
1953 80|logikdax)
1954 target_id=31
1955 modelname="logikdax"
1956 target="-DLOGIK_DAX"
1957 memory=2 # always
1958 arm946cc
1959 tool="$rootdir/tools/scramble -add=ldax"
1960 boottool="$rootdir/tools/scramble -tcc=crc"
1961 bootoutput="player.rom"
1962 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1963 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1964 output="rockbox.logik"
1965 appextra="recorder:gui:radio"
1966 plugins=""
1967 swcodec="yes"
1968 # toolset is the tools within the tools directory that we build for
1969 # this particular target.
1970 toolset=$tccbitmaptools
1971 # architecture, manufacturer and model for the target-tree build
1972 t_cpu="arm"
1973 t_manufacturer="tcc77x"
1974 t_model="logikdax"
1977 90|zenvisionm30gb)
1978 target_id=35
1979 modelname="zenvisionm30gb"
1980 target="-DCREATIVE_ZVM"
1981 memory=64
1982 arm926ejscc
1983 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1984 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1985 tool="$rootdir/tools/scramble -creative=zvm"
1986 USE_ELF="yes"
1987 output="rockbox.zvm"
1988 appextra="recorder:gui:radio"
1989 plugins="yes"
1990 swcodec="yes"
1991 toolset=$ipodbitmaptools
1992 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1993 bootoutput="rockbox.zvmboot"
1994 # architecture, manufacturer and model for the target-tree build
1995 t_cpu="arm"
1996 t_manufacturer="tms320dm320"
1997 t_model="creative-zvm"
2000 91|zenvisionm60gb)
2001 target_id=40
2002 modelname="zenvisionm60gb"
2003 target="-DCREATIVE_ZVM60GB"
2004 memory=64
2005 arm926ejscc
2006 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2007 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2008 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2009 USE_ELF="yes"
2010 output="rockbox.zvm60"
2011 appextra="recorder:gui:radio"
2012 plugins="yes"
2013 swcodec="yes"
2014 toolset=$ipodbitmaptools
2015 boottool="$rootdir/tools/scramble -creative=zvm60"
2016 bootoutput="rockbox.zvm60boot"
2017 # architecture, manufacturer and model for the target-tree build
2018 t_cpu="arm"
2019 t_manufacturer="tms320dm320"
2020 t_model="creative-zvm"
2023 92|zenvision)
2024 target_id=39
2025 modelname="zenvision"
2026 target="-DCREATIVE_ZV"
2027 memory=64
2028 arm926ejscc
2029 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2030 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2031 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2032 USE_ELF="yes"
2033 output="rockbox.zv"
2034 appextra="recorder:gui:radio"
2035 plugins=""
2036 swcodec="yes"
2037 toolset=$ipodbitmaptools
2038 boottool="$rootdir/tools/scramble -creative=zenvision"
2039 bootoutput="rockbox.zvboot"
2040 # architecture, manufacturer and model for the target-tree build
2041 t_cpu="arm"
2042 t_manufacturer="tms320dm320"
2043 t_model="creative-zvm"
2046 50|sansae200)
2047 target_id=23
2048 modelname="sansae200"
2049 target="-DSANSA_E200"
2050 memory=32 # supposedly
2051 arm7tdmicc
2052 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2053 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2054 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2055 output="rockbox.mi4"
2056 appextra="recorder:gui:radio"
2057 plugins="yes"
2058 swcodec="yes"
2059 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2060 bootoutput="PP5022.mi4"
2061 # toolset is the tools within the tools directory that we build for
2062 # this particular target.
2063 toolset=$scramblebitmaptools
2064 # architecture, manufacturer and model for the target-tree build
2065 t_cpu="arm"
2066 t_manufacturer="sandisk"
2067 t_model="sansa-e200"
2070 51|sansae200r)
2071 # the e200R model is pretty much identical to the e200, it only has a
2072 # different option to the scramble tool when building a bootloader and
2073 # makes the bootloader output file name in all lower case.
2074 target_id=27
2075 modelname="sansae200r"
2076 target="-DSANSA_E200"
2077 memory=32 # supposedly
2078 arm7tdmicc
2079 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2080 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2081 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2082 output="rockbox.mi4"
2083 appextra="recorder:gui:radio"
2084 plugins="yes"
2085 swcodec="yes"
2086 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2087 bootoutput="pp5022.mi4"
2088 # toolset is the tools within the tools directory that we build for
2089 # this particular target.
2090 toolset=$scramblebitmaptools
2091 # architecture, manufacturer and model for the target-tree build
2092 t_cpu="arm"
2093 t_manufacturer="sandisk"
2094 t_model="sansa-e200"
2097 52|sansac200)
2098 target_id=30
2099 modelname="sansac200"
2100 target="-DSANSA_C200"
2101 memory=32 # supposedly
2102 arm7tdmicc
2103 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2104 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2105 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2106 output="rockbox.mi4"
2107 appextra="recorder:gui:radio"
2108 plugins="yes"
2109 swcodec="yes"
2110 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2111 bootoutput="firmware.mi4"
2112 # toolset is the tools within the tools directory that we build for
2113 # this particular target.
2114 toolset=$scramblebitmaptools
2115 # architecture, manufacturer and model for the target-tree build
2116 t_cpu="arm"
2117 t_manufacturer="sandisk"
2118 t_model="sansa-c200"
2121 53|sansam200)
2122 target_id=48
2123 modelname="sansam200"
2124 target="-DSANSA_M200"
2125 memory=1 # always
2126 arm946cc
2127 tool="$rootdir/tools/scramble -add=m200"
2128 boottool="$rootdir/tools/scramble -tcc=crc"
2129 bootoutput="player.rom"
2130 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2131 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2132 output="rockbox.m200"
2133 appextra="recorder:gui:radio"
2134 plugins=""
2135 swcodec="yes"
2136 # toolset is the tools within the tools directory that we build for
2137 # this particular target.
2138 toolset=$tccbitmaptools
2139 # architecture, manufacturer and model for the target-tree build
2140 t_cpu="arm"
2141 t_manufacturer="tcc77x"
2142 t_model="m200"
2145 54|sansac100)
2146 target_id=42
2147 modelname="sansac100"
2148 target="-DSANSA_C100"
2149 memory=2
2150 arm946cc
2151 tool="$rootdir/tools/scramble -add=c100"
2152 boottool="$rootdir/tools/scramble -tcc=crc"
2153 bootoutput="player.rom"
2154 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2155 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2156 output="rockbox.c100"
2157 appextra="recorder:gui:radio"
2158 plugins=""
2159 swcodec="yes"
2160 # toolset is the tools within the tools directory that we build for
2161 # this particular target.
2162 toolset=$tccbitmaptools
2163 # architecture, manufacturer and model for the target-tree build
2164 t_cpu="arm"
2165 t_manufacturer="tcc77x"
2166 t_model="c100"
2169 55|sansaclip)
2170 target_id=50
2171 modelname="sansaclip"
2172 target="-DSANSA_CLIP"
2173 memory=2
2174 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2175 bmp2rb_native="$bmp2rb_mono"
2176 tool="$rootdir/tools/scramble -add=clip"
2177 output="rockbox.sansa"
2178 bootoutput="bootloader-clip.sansa"
2179 appextra="recorder:gui:radio"
2180 plugins="yes"
2181 swcodec="yes"
2182 toolset=$scramblebitmaptools
2183 t_cpu="arm"
2184 t_manufacturer="as3525"
2185 t_model="sansa-clip"
2186 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2187 arm9tdmicc
2188 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2192 56|sansae200v2)
2193 target_id=51
2194 modelname="sansae200v2"
2195 target="-DSANSA_E200V2"
2196 memory=8
2197 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2198 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2199 tool="$rootdir/tools/scramble -add=e2v2"
2200 output="rockbox.sansa"
2201 bootoutput="bootloader-e200v2.sansa"
2202 appextra="recorder:gui:radio"
2203 plugins="yes"
2204 swcodec="yes"
2205 toolset=$scramblebitmaptools
2206 t_cpu="arm"
2207 t_manufacturer="as3525"
2208 t_model="sansa-e200v2"
2209 arm9tdmicc
2213 57|sansam200v4)
2214 target_id=52
2215 modelname="sansam200v4"
2216 target="-DSANSA_M200V4"
2217 memory=2
2218 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2219 bmp2rb_native="$bmp2rb_mono"
2220 tool="$rootdir/tools/scramble -add=m2v4"
2221 output="rockbox.sansa"
2222 bootoutput="bootloader-m200v4.sansa"
2223 appextra="recorder:gui:radio"
2224 plugins="yes"
2225 swcodec="yes"
2226 toolset=$scramblebitmaptools
2227 t_cpu="arm"
2228 t_manufacturer="as3525"
2229 t_model="sansa-m200v4"
2230 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2231 arm9tdmicc
2232 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2236 58|sansafuze)
2237 target_id=53
2238 modelname="sansafuze"
2239 target="-DSANSA_FUZE"
2240 memory=8
2241 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2242 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2243 tool="$rootdir/tools/scramble -add=fuze"
2244 output="rockbox.sansa"
2245 bootoutput="bootloader-fuze.sansa"
2246 appextra="recorder:gui:radio"
2247 plugins="yes"
2248 swcodec="yes"
2249 toolset=$scramblebitmaptools
2250 t_cpu="arm"
2251 t_manufacturer="as3525"
2252 t_model="sansa-fuze"
2253 arm9tdmicc
2257 59|sansac200v2)
2258 target_id=55
2259 modelname="sansac200v2"
2260 target="-DSANSA_C200V2"
2261 memory=2 # as per OF diagnosis mode
2262 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2263 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2264 tool="$rootdir/tools/scramble -add=c2v2"
2265 output="rockbox.sansa"
2266 bootoutput="bootloader-c200v2.sansa"
2267 appextra="recorder:gui:radio"
2268 plugins="yes"
2269 swcodec="yes"
2270 # toolset is the tools within the tools directory that we build for
2271 # this particular target.
2272 toolset=$scramblebitmaptools
2273 # architecture, manufacturer and model for the target-tree build
2274 t_cpu="arm"
2275 t_manufacturer="as3525"
2276 t_model="sansa-c200v2"
2277 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2278 arm9tdmicc
2279 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2282 60|sansaclipv2)
2283 target_id=60
2284 modelname="sansaclipv2"
2285 target="-DSANSA_CLIPV2"
2286 memory=8
2287 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2288 bmp2rb_native="$bmp2rb_mono"
2289 tool="$rootdir/tools/scramble -add=clv2"
2290 output="rockbox.sansa"
2291 bootoutput="bootloader-clipv2.sansa"
2292 appextra="recorder:gui:radio"
2293 plugins="yes"
2294 swcodec="yes"
2295 toolset=$scramblebitmaptools
2296 t_cpu="arm"
2297 t_manufacturer="as3525"
2298 t_model="sansa-clipv2"
2299 arm926ejscc
2302 61|sansaview)
2303 echo "Sansa View is not yet supported!"
2304 exit 1
2305 target_id=63
2306 modelname="sansaview"
2307 target="-DSANSA_VIEW"
2308 memory=32
2309 arm1176jzscc
2310 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2311 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2312 output="rockbox.mi4"
2313 appextra="gui"
2314 plugins=""
2315 swcodec="yes"
2316 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2317 bootoutput="firmware.mi4"
2318 # toolset is the tools within the tools directory that we build for
2319 # this particular target.
2320 toolset=$scramblebitmaptools
2321 t_cpu="arm"
2322 t_manufacturer="sandisk"
2323 t_model="sansa-view"
2326 62|sansaclipplus)
2327 target_id=66
2328 modelname="sansaclipplus"
2329 target="-DSANSA_CLIPPLUS"
2330 memory=8
2331 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2332 bmp2rb_native="$bmp2rb_mono"
2333 tool="$rootdir/tools/scramble -add=cli+"
2334 output="rockbox.sansa"
2335 bootoutput="bootloader-clipplus.sansa"
2336 appextra="recorder:gui:radio"
2337 plugins="yes"
2338 swcodec="yes"
2339 toolset=$scramblebitmaptools
2340 t_cpu="arm"
2341 t_manufacturer="as3525"
2342 t_model="sansa-clipplus"
2343 arm926ejscc
2346 63|sansafuzev2)
2347 target_id=68
2348 modelname="sansafuzev2"
2349 target="-DSANSA_FUZEV2"
2350 memory=8 # not sure
2351 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2352 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2353 tool="$rootdir/tools/scramble -add=fuz2"
2354 output="rockbox.sansa"
2355 bootoutput="bootloader-fuzev2.sansa"
2356 appextra="recorder:gui:radio"
2357 plugins="yes"
2358 swcodec="yes"
2359 toolset=$scramblebitmaptools
2360 t_cpu="arm"
2361 t_manufacturer="as3525"
2362 t_model="sansa-fuzev2"
2363 arm926ejscc
2366 150|tatungtpj1022)
2367 target_id=25
2368 modelname="tatungtpj1022"
2369 target="-DTATUNG_TPJ1022"
2370 memory=32 # always
2371 arm7tdmicc
2372 tool="$rootdir/tools/scramble -add tpj2"
2373 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2374 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2375 output="rockbox.elio"
2376 appextra="recorder:gui:radio"
2377 plugins="yes"
2378 swcodec="yes"
2379 boottool="$rootdir/tools/scramble -mi4v2"
2380 bootoutput="pp5020.mi4"
2381 # toolset is the tools within the tools directory that we build for
2382 # this particular target.
2383 toolset=$scramblebitmaptools
2384 # architecture, manufacturer and model for the target-tree build
2385 t_cpu="arm"
2386 t_manufacturer="tatung"
2387 t_model="tpj1022"
2390 100|gogearsa9200)
2391 target_id=41
2392 modelname="gogearsa9200"
2393 target="-DPHILIPS_SA9200"
2394 memory=32 # supposedly
2395 arm7tdmicc
2396 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2397 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2398 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2399 output="rockbox.mi4"
2400 appextra="recorder:gui:radio"
2401 plugins="yes"
2402 swcodec="yes"
2403 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2404 bootoutput="FWImage.ebn"
2405 # toolset is the tools within the tools directory that we build for
2406 # this particular target.
2407 toolset=$scramblebitmaptools
2408 # architecture, manufacturer and model for the target-tree build
2409 t_cpu="arm"
2410 t_manufacturer="philips"
2411 t_model="sa9200"
2414 101|gogearhdd1630)
2415 target_id=43
2416 modelname="gogearhdd1630"
2417 target="-DPHILIPS_HDD1630"
2418 memory=32 # supposedly
2419 arm7tdmicc
2420 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2421 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2422 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2423 output="rockbox.mi4"
2424 appextra="recorder:gui:radio"
2425 plugins="yes"
2426 swcodec="yes"
2427 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2428 bootoutput="FWImage.ebn"
2429 # toolset is the tools within the tools directory that we build for
2430 # this particular target.
2431 toolset=$scramblebitmaptools
2432 # architecture, manufacturer and model for the target-tree build
2433 t_cpu="arm"
2434 t_manufacturer="philips"
2435 t_model="hdd1630"
2438 102|gogearhdd6330)
2439 target_id=65
2440 modelname="gogearhdd6330"
2441 target="-DPHILIPS_HDD6330"
2442 memory=64 # always
2443 arm7tdmicc
2444 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2445 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2446 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2447 output="rockbox.mi4"
2448 appextra="recorder:gui:radio"
2449 plugins="yes"
2450 swcodec="yes"
2451 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2452 bootoutput="FWImage.ebn"
2453 # toolset is the tools within the tools directory that we build for
2454 # this particular target.
2455 toolset=$scramblebitmaptools
2456 # architecture, manufacturer and model for the target-tree build
2457 t_cpu="arm"
2458 t_manufacturer="philips"
2459 t_model="hdd6330"
2462 110|meizum6sl)
2463 target_id=49
2464 modelname="meizum6sl"
2465 target="-DMEIZU_M6SL"
2466 memory=16 # always
2467 arm940tbecc
2468 tool="cp"
2469 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2470 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2471 output="rockbox.meizu"
2472 appextra="recorder:gui:radio"
2473 plugins="no" #FIXME
2474 swcodec="yes"
2475 toolset=$genericbitmaptools
2476 boottool="cp"
2477 bootoutput="rockboot.ebn"
2478 # architecture, manufacturer and model for the target-tree build
2479 t_cpu="arm"
2480 t_manufacturer="s5l8700"
2481 t_model="meizu-m6sl"
2484 111|meizum6sp)
2485 target_id=46
2486 modelname="meizum6sp"
2487 target="-DMEIZU_M6SP"
2488 memory=16 # always
2489 arm940tbecc
2490 tool="cp"
2491 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2492 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2493 output="rockbox.meizu"
2494 appextra="recorder:gui:radio"
2495 plugins="no" #FIXME
2496 swcodec="yes"
2497 toolset=$genericbitmaptools
2498 boottool="cp"
2499 bootoutput="rockboot.ebn"
2500 # architecture, manufacturer and model for the target-tree build
2501 t_cpu="arm"
2502 t_manufacturer="s5l8700"
2503 t_model="meizu-m6sp"
2506 112|meizum3)
2507 target_id=47
2508 modelname="meizum3"
2509 target="-DMEIZU_M3"
2510 memory=16 # always
2511 arm940tbecc
2512 tool="cp"
2513 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2514 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2515 output="rockbox.meizu"
2516 appextra="recorder:gui:radio"
2517 plugins="no" #FIXME
2518 swcodec="yes"
2519 toolset=$genericbitmaptools
2520 boottool="cp"
2521 bootoutput="rockboot.ebn"
2522 # architecture, manufacturer and model for the target-tree build
2523 t_cpu="arm"
2524 t_manufacturer="s5l8700"
2525 t_model="meizu-m3"
2528 120|ondavx747)
2529 target_id=45
2530 modelname="ondavx747"
2531 target="-DONDA_VX747"
2532 memory=16
2533 mipselcc
2534 tool="$rootdir/tools/scramble -add=x747"
2535 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2536 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2537 output="rockbox.vx747"
2538 appextra="recorder:gui:radio"
2539 plugins="yes"
2540 swcodec="yes"
2541 toolset=$genericbitmaptools
2542 boottool="$rootdir/tools/scramble -ccpmp"
2543 bootoutput="ccpmp.bin"
2544 # architecture, manufacturer and model for the target-tree build
2545 t_cpu="mips"
2546 t_manufacturer="ingenic_jz47xx"
2547 t_model="onda_vx747"
2550 121|ondavx767)
2551 target_id=64
2552 modelname="ondavx767"
2553 target="-DONDA_VX767"
2554 memory=16 #FIXME
2555 mipselcc
2556 tool="cp"
2557 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2558 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2559 output="rockbox.vx767"
2560 appextra="recorder:gui:radio"
2561 plugins="" #FIXME
2562 swcodec="yes"
2563 toolset=$genericbitmaptools
2564 boottool="$rootdir/tools/scramble -ccpmp"
2565 bootoutput="ccpmp.bin"
2566 # architecture, manufacturer and model for the target-tree build
2567 t_cpu="mips"
2568 t_manufacturer="ingenic_jz47xx"
2569 t_model="onda_vx767"
2572 122|ondavx747p)
2573 target_id=54
2574 modelname="ondavx747p"
2575 target="-DONDA_VX747P"
2576 memory=16
2577 mipselcc
2578 tool="$rootdir/tools/scramble -add=747p"
2579 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2580 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2581 output="rockbox.vx747p"
2582 appextra="recorder:gui:radio"
2583 plugins="yes"
2584 swcodec="yes"
2585 toolset=$genericbitmaptools
2586 boottool="$rootdir/tools/scramble -ccpmp"
2587 bootoutput="ccpmp.bin"
2588 # architecture, manufacturer and model for the target-tree build
2589 t_cpu="mips"
2590 t_manufacturer="ingenic_jz47xx"
2591 t_model="onda_vx747"
2594 123|ondavx777)
2595 target_id=61
2596 modelname="ondavx777"
2597 target="-DONDA_VX777"
2598 memory=16
2599 mipselcc
2600 tool="$rootdir/tools/scramble -add=x777"
2601 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2602 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2603 output="rockbox.vx777"
2604 appextra="recorder:gui:radio"
2605 plugins="yes"
2606 swcodec="yes"
2607 toolset=$genericbitmaptools
2608 boottool="$rootdir/tools/scramble -ccpmp"
2609 bootoutput="ccpmp.bin"
2610 # architecture, manufacturer and model for the target-tree build
2611 t_cpu="mips"
2612 t_manufacturer="ingenic_jz47xx"
2613 t_model="onda_vx747"
2616 130|lyreproto1)
2617 target_id=56
2618 modelname="lyreproto1"
2619 target="-DLYRE_PROTO1"
2620 memory=64
2621 arm926ejscc
2622 tool="cp"
2623 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2624 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2625 output="rockbox.lyre"
2626 appextra="recorder:gui:radio"
2627 plugins=""
2628 swcodec="yes"
2629 toolset=$scramblebitmaptools
2630 boottool="cp"
2631 bootoutput="bootloader-proto1.lyre"
2632 # architecture, manufacturer and model for the target-tree build
2633 t_cpu="arm"
2634 t_manufacturer="at91sam"
2635 t_model="lyre_proto1"
2638 131|mini2440)
2639 target_id=99
2640 modelname="mini2440"
2641 target="-DMINI2440"
2642 memory=64
2643 arm9tdmicc
2644 tool="$rootdir/tools/scramble -add=m244"
2645 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2646 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2647 output="rockbox.mini2440"
2648 appextra="recorder:gui:radio"
2649 plugins=""
2650 swcodec="yes"
2651 toolset=$scramblebitmaptools
2652 boottool="cp"
2653 bootoutput="bootloader-mini2440.lyre"
2654 # architecture, manufacturer and model for the target-tree build
2655 t_cpu="arm"
2656 t_manufacturer="s3c2440"
2657 t_model="mini2440"
2660 140|samsungyh820)
2661 target_id=57
2662 modelname="samsungyh820"
2663 target="-DSAMSUNG_YH820"
2664 memory=32 # always
2665 arm7tdmicc
2666 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2667 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2668 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2669 output="rockbox.mi4"
2670 appextra="recorder:gui:radio"
2671 plugins="yes"
2672 swcodec="yes"
2673 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2674 bootoutput="FW_YH820.mi4"
2675 # toolset is the tools within the tools directory that we build for
2676 # this particular target.
2677 toolset=$scramblebitmaptools
2678 # architecture, manufacturer and model for the target-tree build
2679 t_cpu="arm"
2680 t_manufacturer="samsung"
2681 t_model="yh820"
2684 141|samsungyh920)
2685 target_id=58
2686 modelname="samsungyh920"
2687 target="-DSAMSUNG_YH920"
2688 memory=32 # always
2689 arm7tdmicc
2690 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2691 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2692 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2693 output="rockbox.mi4"
2694 appextra="recorder:gui:radio"
2695 plugins="yes"
2696 swcodec="yes"
2697 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2698 bootoutput="PP5020.mi4"
2699 # toolset is the tools within the tools directory that we build for
2700 # this particular target.
2701 toolset=$scramblebitmaptools
2702 # architecture, manufacturer and model for the target-tree build
2703 t_cpu="arm"
2704 t_manufacturer="samsung"
2705 t_model="yh920"
2708 142|samsungyh925)
2709 target_id=59
2710 modelname="samsungyh925"
2711 target="-DSAMSUNG_YH925"
2712 memory=32 # always
2713 arm7tdmicc
2714 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2715 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2716 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2717 output="rockbox.mi4"
2718 appextra="recorder:gui:radio"
2719 plugins="yes"
2720 swcodec="yes"
2721 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2722 bootoutput="FW_YH925.mi4"
2723 # toolset is the tools within the tools directory that we build for
2724 # this particular target.
2725 toolset=$scramblebitmaptools
2726 # architecture, manufacturer and model for the target-tree build
2727 t_cpu="arm"
2728 t_manufacturer="samsung"
2729 t_model="yh925"
2732 143|samsungyps3)
2733 target_id=72
2734 modelname="samsungyps3"
2735 target="-DSAMSUNG_YPS3"
2736 memory=16 # always
2737 arm940tbecc
2738 tool="cp"
2739 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2740 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2741 output="rockbox.yps3"
2742 appextra="recorder:gui:radio"
2743 plugins="no" #FIXME
2744 swcodec="yes"
2745 toolset=$genericbitmaptools
2746 boottool="cp"
2747 bootoutput="rockboot.ebn"
2748 # architecture, manufacturer and model for the target-tree build
2749 t_cpu="arm"
2750 t_manufacturer="s5l8700"
2751 t_model="yps3"
2754 160|vibe500)
2755 target_id=67
2756 modelname="vibe500"
2757 target="-DPBELL_VIBE500"
2758 memory=32 # always
2759 arm7tdmicc
2760 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2761 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2762 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2763 output="rockbox.mi4"
2764 appextra="recorder:gui:radio"
2765 plugins="yes"
2766 swcodec="yes"
2767 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2768 bootoutput="jukebox.mi4"
2769 # toolset is the tools within the tools directory that we build for
2770 # this particular target.
2771 toolset=$scramblebitmaptools
2772 # architecture, manufacturer and model for the target-tree build
2773 t_cpu="arm"
2774 t_manufacturer="pbell"
2775 t_model="vibe500"
2778 170|mpiohd200)
2779 target_id=69
2780 modelname="mpiohd200"
2781 target="-DMPIO_HD200"
2782 memory=16 # always
2783 coldfirecc
2784 tool="$rootdir/tools/scramble -add=hd20"
2785 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2786 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2787 output="rockbox.mpio"
2788 bootoutput="bootloader.mpio"
2789 appextra="recorder:gui:radio"
2790 plugins="yes"
2791 swcodec="yes"
2792 # toolset is the tools within the tools directory that we build for
2793 # this particular target.
2794 toolset="$genericbitmaptools"
2795 # architecture, manufacturer and model for the target-tree build
2796 t_cpu="coldfire"
2797 t_manufacturer="mpio"
2798 t_model="hd200"
2801 171|mpiohd300)
2802 target_id=70
2803 modelname="mpiohd300"
2804 target="-DMPIO_HD300"
2805 memory=16 # always
2806 coldfirecc
2807 tool="$rootdir/tools/scramble -add=hd30"
2808 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2809 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2810 output="rockbox.mpio"
2811 bootoutput="bootloader.mpio"
2812 appextra="recorder:gui:radio"
2813 plugins="yes"
2814 swcodec="yes"
2815 # toolset is the tools within the tools directory that we build for
2816 # this particular target.
2817 toolset="$genericbitmaptools"
2818 # architecture, manufacturer and model for the target-tree build
2819 t_cpu="coldfire"
2820 t_manufacturer="mpio"
2821 t_model="hd300"
2824 200|sdlapp)
2825 target_id=73
2826 modelname="application"
2827 app_modelname="sdlapp"
2828 target="-DAPPLICATION"
2829 need_full_path="yes"
2830 app_set_paths
2831 app_set_lcd_size
2832 memory=8
2833 uname=`uname`
2834 simcc "sdl-app"
2835 tool="cp "
2836 boottool="cp "
2837 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2838 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2839 output="rockbox"
2840 bootoutput="rockbox"
2841 appextra="recorder:gui:radio"
2842 plugins=""
2843 swcodec="yes"
2844 # architecture, manufacturer and model for the target-tree build
2845 t_cpu="hosted"
2846 t_manufacturer="sdl"
2847 t_model="app"
2850 201|android)
2851 target_id=74
2852 modelname="application"
2853 app_modelname="android"
2854 target="-DAPPLICATION"
2855 app_type="android"
2856 need_full_path="yes"
2857 app_set_lcd_size
2858 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
2859 bindir="/data/data/org.rockbox/lib"
2860 libdir="/data/data/org.rockbox/app_rockbox"
2861 memory=8
2862 uname=`uname`
2863 androidcc
2864 tool="cp "
2865 boottool="cp "
2866 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2867 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2868 output="librockbox.so"
2869 bootoutput="librockbox.so"
2870 appextra="recorder:gui:radio"
2871 plugins=""
2872 swcodec="yes"
2873 # architecture, manufacturer and model for the target-tree build
2874 t_cpu="hosted"
2875 t_manufacturer="android"
2876 t_model="app"
2879 202|nokian8xx)
2880 target_id=75
2881 modelname="application"
2882 app_modelname="nokian8xx"
2883 app_type="sdl-app"
2884 target="-DAPPLICATION"
2885 need_full_path="yes"
2886 app_set_lcd_size 800 480
2887 sharedir="/opt/rockbox/share/rockbox"
2888 bindir="/opt/rockbox/bin"
2889 libdir="/opt/rockbox/lib"
2890 memory=8
2891 uname=`uname`
2892 maemocc 4
2893 tool="cp "
2894 boottool="cp "
2895 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2896 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2897 output="rockbox"
2898 bootoutput="rockbox"
2899 appextra="recorder:gui:radio"
2900 plugins=""
2901 swcodec="yes"
2902 # architecture, manufacturer and model for the target-tree build
2903 t_cpu="hosted"
2904 t_manufacturer="maemo"
2905 t_model="app"
2908 203|nokian900)
2909 target_id=76
2910 modelname="application"
2911 app_modelname="nokian900"
2912 app_type="sdl-app"
2913 target="-DAPPLICATION"
2914 need_full_path="yes"
2915 app_set_lcd_size 800 480
2916 sharedir="/opt/rockbox/share/rockbox"
2917 bindir="/opt/rockbox/bin"
2918 libdir="/opt/rockbox/lib"
2919 memory=8
2920 uname=`uname`
2921 maemocc 5
2922 tool="cp "
2923 boottool="cp "
2924 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2925 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2926 output="rockbox"
2927 bootoutput="rockbox"
2928 appextra="recorder:gui:radio"
2929 plugins=""
2930 swcodec="yes"
2931 # architecture, manufacturer and model for the target-tree build
2932 t_cpu="hosted"
2933 t_manufacturer="maemo"
2934 t_model="app"
2938 echo "Please select a supported target platform!"
2939 exit 7
2942 esac
2944 echo "Platform set to $modelname"
2947 #remove start
2948 ############################################################################
2949 # Amount of memory, for those that can differ. They have $memory unset at
2950 # this point.
2953 if [ -z "$memory" ]; then
2954 case $target_id in
2956 if [ "$ARG_RAM" ]; then
2957 size=$ARG_RAM
2958 else
2959 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2960 size=`input`;
2962 case $size in
2963 60|64)
2964 memory="64"
2967 memory="32"
2969 esac
2972 if [ "$ARG_RAM" ]; then
2973 size=$ARG_RAM
2974 else
2975 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2976 size=`input`;
2978 case $size in
2980 memory="8"
2983 memory="2"
2985 esac
2987 esac
2988 echo "Memory size selected: $memory MB"
2989 [ "$ARG_TYPE" ] || echo ""
2991 #remove end
2993 ##################################################################
2994 # Figure out build "type"
2997 # the ifp7x0 is the only platform that supports building a gdb stub like
2998 # this
2999 case $modelname in
3000 iriverifp7xx)
3001 gdbstub="(G)DB stub, "
3003 sansae200r|sansae200)
3004 gdbstub="(I)nstaller, "
3006 sansac200)
3007 gdbstub="(E)raser, "
3011 esac
3012 if [ "$ARG_TYPE" ]; then
3013 btype=$ARG_TYPE
3014 else
3015 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
3016 btype=`input`;
3019 case $btype in
3020 [Ii])
3021 appsdir='\$(ROOTDIR)/bootloader'
3022 apps="bootloader"
3023 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3024 bootloader="1"
3025 echo "e200R-installer build selected"
3027 [Ee])
3028 appsdir='\$(ROOTDIR)/bootloader'
3029 apps="bootloader"
3030 echo "C2(4)0 or C2(5)0"
3031 variant=`input`
3032 case $variant in
3034 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
3035 echo "c240 eraser build selected"
3038 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
3039 echo "c240 eraser build selected"
3041 esac
3042 bootloader="1"
3043 echo "c200 eraser build selected"
3045 [Bb])
3046 if test $t_manufacturer = "archos"; then
3047 # Archos SH-based players do this somewhat differently for
3048 # some reason
3049 appsdir='\$(ROOTDIR)/flash/bootbox'
3050 apps="bootbox"
3051 else
3052 appsdir='\$(ROOTDIR)/bootloader'
3053 apps="bootloader"
3054 flash=""
3055 if test -n "$boottool"; then
3056 tool="$boottool"
3058 if test -n "$bootoutput"; then
3059 output=$bootoutput
3062 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3063 bootloader="1"
3064 echo "Bootloader build selected"
3066 [Ss])
3067 if [ "$modelname" = "sansae200r" ]; then
3068 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3069 exit 8
3071 debug="-DDEBUG"
3072 simulator="yes"
3073 extradefines="$extradefines -DSIMULATOR"
3074 archosrom=""
3075 flash=""
3076 echo "Simulator build selected"
3078 [Aa]*)
3079 echo "Advanced build selected"
3080 whichadvanced $btype
3082 [Gg])
3083 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3084 appsdir='\$(ROOTDIR)/gdb'
3085 apps="stub"
3086 case $modelname in
3087 iriverifp7xx)
3088 output="stub.wma"
3092 esac
3093 echo "GDB stub build selected"
3095 [Mm])
3096 toolset='';
3097 apps="manual"
3098 echo "Manual build selected"
3100 [Cc])
3101 uname=`uname`
3102 simcc "checkwps"
3103 toolset='';
3104 t_cpu='';
3105 GCCOPTS='';
3106 extradefines="$extradefines -DDEBUG"
3107 appsdir='\$(ROOTDIR)/tools/checkwps';
3108 output='checkwps.'${modelname};
3109 archosrom='';
3110 echo "CheckWPS build selected"
3112 [Dd])
3113 uname=`uname`
3114 simcc "database"
3115 toolset='';
3116 t_cpu='';
3117 GCCOPTS='';
3118 appsdir='\$(ROOTDIR)/tools/database';
3119 archosrom='';
3121 case $uname in
3122 CYGWIN*|MINGW*)
3123 output="database_${modelname}.exe"
3126 output='database.'${modelname};
3128 esac
3130 echo "Database tool build selected"
3133 if [ "$modelname" = "sansae200r" ]; then
3134 echo "Do not use the e200R target for regular builds. Use e200 instead."
3135 exit 8
3137 debug=""
3138 btype="N" # set it explicitly since RET only gets here as well
3139 echo "Normal build selected"
3142 esac
3143 # to be able running "make manual" from non-manual configuration
3144 case $modelname in
3145 archosrecorderv2)
3146 manualdev="archosfmrecorder"
3148 iriverh1??)
3149 manualdev="iriverh100"
3151 ipodmini2g)
3152 manualdev="ipodmini1g"
3155 manualdev=$modelname
3157 esac
3159 if [ -z "$debug" ]; then
3160 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3163 echo "Using source code root directory: $rootdir"
3165 # this was once possible to change at build-time, but no more:
3166 language="english"
3168 uname=`uname`
3170 if [ "yes" = "$simulator" ]; then
3171 # setup compiler and things for simulator
3172 simcc "sdl-sim"
3174 if [ -d "simdisk" ]; then
3175 echo "Subdirectory 'simdisk' already present"
3176 else
3177 mkdir simdisk
3178 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3182 # Now, figure out version number of the (gcc) compiler we are about to use
3183 gccver=`$CC -dumpversion`;
3185 # figure out the binutil version too and display it, mostly for the build
3186 # system etc to be able to see it easier
3187 if [ $uname = "Darwin" ]; then
3188 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3189 else
3190 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3193 if [ -z "$gccver" ]; then
3194 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3195 echo "[WARNING] this may cause your build to fail since we cannot do the"
3196 echo "[WARNING] checks we want now."
3197 else
3199 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3200 # DEPEND on it
3202 num1=`echo $gccver | cut -d . -f1`
3203 num2=`echo $gccver | cut -d . -f2`
3204 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3206 # This makes:
3207 # 3.3.X => 303
3208 # 3.4.X => 304
3209 # 2.95.3 => 295
3211 echo "Using $CC $gccver ($gccnum)"
3213 if test "$gccnum" -ge "400"; then
3214 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3215 # so we ignore that warnings for now
3216 # -Wno-pointer-sign
3217 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3220 if test "$gccnum" -ge "402"; then
3221 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3222 # and later would throw it for several valid cases
3223 GCCOPTS="$GCCOPTS -Wno-override-init"
3226 case $prefix in
3227 ""|"$CROSS_COMPILE")
3228 # simulator
3230 i586-mingw32msvc-)
3231 # cross-compile for win32
3234 # Verify that the cross-compiler is of a recommended version!
3235 if test "$gccver" != "$gccchoice"; then
3236 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3237 echo "WARNING: version $gccchoice!"
3238 echo "WARNING: This may cause your build to fail since it may be a version"
3239 echo "WARNING: that isn't functional or known to not be the best choice."
3240 echo "WARNING: If you suffer from build problems, you know that this is"
3241 echo "WARNING: a likely source for them..."
3244 esac
3249 echo "Using $LD $ldver"
3251 # check the compiler for SH platforms
3252 if test "$CC" = "sh-elf-gcc"; then
3253 if test "$gccnum" -lt "400"; then
3254 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3255 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3256 else
3257 # figure out patch status
3258 gccpatch=`$CC --version`;
3260 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3261 echo "gcc $gccver is rockbox patched"
3262 # then convert -O to -Os to get smaller binaries!
3263 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3264 else
3265 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3266 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3271 if test "$CC" = "m68k-elf-gcc"; then
3272 # convert -O to -Os to get smaller binaries!
3273 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3276 if [ "$ARG_CCACHE" = "1" ]; then
3277 echo "Enable ccache for building"
3278 ccache="ccache"
3279 elif [ "$ARG_CCACHE" != "0" ]; then
3280 ccache=`findtool ccache`
3281 if test -n "$ccache"; then
3282 echo "Found and uses ccache ($ccache)"
3286 # figure out the full path to the various commands if possible
3287 HOSTCC=`findtool gcc --lit`
3288 HOSTAR=`findtool ar --lit`
3289 CC=`findtool ${CC} --lit`
3290 LD=`findtool ${AR} --lit`
3291 AR=`findtool ${AR} --lit`
3292 AS=`findtool ${AS} --lit`
3293 OC=`findtool ${OC} --lit`
3294 WINDRES=`findtool ${WINDRES} --lit`
3295 DLLTOOL=`findtool ${DLLTOOL} --lit`
3296 DLLWRAP=`findtool ${DLLWRAP} --lit`
3297 RANLIB=`findtool ${RANLIB} --lit`
3299 if test -n "$ccache"; then
3300 CC="$ccache $CC"
3303 if test "$ARG_ARM_THUMB" = "1"; then
3304 extradefines="$extradefines -DUSE_THUMB"
3305 CC="$toolsdir/thumb-cc.py $CC"
3308 if test "X$endian" = "Xbig"; then
3309 defendian="ROCKBOX_BIG_ENDIAN"
3310 else
3311 defendian="ROCKBOX_LITTLE_ENDIAN"
3314 if [ "$ARG_RBDIR" != "" ]; then
3315 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3316 rbdir="/"$ARG_RBDIR
3317 else
3318 rbdir=$ARG_RBDIR
3320 echo "Using alternate rockbox dir: ${rbdir}"
3323 sed > autoconf.h \
3324 -e "s<@ENDIAN@<${defendian}<g" \
3325 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3326 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3327 -e "s<@config_rtc@<$config_rtc<g" \
3328 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3329 -e "s<@RBDIR@<${rbdir}<g" \
3330 -e "s<@sharepath@<${sharedir}<g" \
3331 -e "s<@binpath@<${bindir}<g" \
3332 -e "s<@libpath@<${libdir}<g" \
3333 -e "s<@have_backlight@<$have_backlight<g" \
3334 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3335 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3336 -e "s<@lcd_width@<$app_lcd_width<g" \
3337 -e "s<@lcd_height@<$app_lcd_height<g" \
3338 <<EOF
3339 /* This header was made by configure */
3340 #ifndef __BUILD_AUTOCONF_H
3341 #define __BUILD_AUTOCONF_H
3343 /* Define endianess for the target or simulator platform */
3344 #define @ENDIAN@ 1
3346 /* Define this if you build rockbox to support the logf logging and display */
3347 #undef ROCKBOX_HAS_LOGF
3349 /* Define this to record a chart with timings for the stages of boot */
3350 #undef DO_BOOTCHART
3352 /* optional define for a backlight modded Ondio */
3353 @have_backlight@
3355 /* optional define for FM radio mod for iAudio M5 */
3356 @have_fmradio_in@
3358 /* optional define for ATA poweroff on Player */
3359 @have_ata_poweroff@
3361 /* optional defines for RTC mod for h1x0 */
3362 @config_rtc@
3363 @have_rtc_alarm@
3365 /* lcd dimensions for application builds from configure */
3366 @lcd_width@
3367 @lcd_height@
3369 /* root of Rockbox */
3370 #define ROCKBOX_DIR "@RBDIR@"
3371 #define ROCKBOX_SHARE_PATH "@sharepath@"
3372 #define ROCKBOX_BINARY_PATH "@binpath@"
3373 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3375 #endif /* __BUILD_AUTOCONF_H */
3378 if test -n "$t_cpu"; then
3379 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3381 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3382 # Maemo needs the SDL port, too
3383 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3384 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3385 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3386 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3387 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3389 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3390 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3391 GCCOPTS="$GCCOPTS"
3394 if test "$simulator" = "yes"; then
3395 # add simul make stuff on the #SIMUL# line
3396 simmagic1="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3397 simmagic2="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3398 else
3399 # delete the lines that match
3400 simmagic1='/@SIMUL1@/D'
3401 simmagic2='/@SIMUL2@/D'
3404 if test "$swcodec" = "yes"; then
3405 voicetoolset="rbspeexenc voicefont wavtrim"
3406 else
3407 voicetoolset="voicefont wavtrim"
3410 if test "$apps" = "apps"; then
3411 # only when we build "real" apps we build the .lng files
3412 buildlangs="langs"
3415 #### Fix the cmdline ###
3416 if [ "$ARG_CCACHE" = "1" ]; then
3417 cmdline="--ccache "
3418 elif [ "$ARG_CCACHE" = "0" ]; then
3419 cmdline="--no-ccache "
3421 if [ "$ARG_ARM_EABI" = "1" ]; then
3422 cmdline="$cmdline--eabi "
3424 if [ -n "$ARG_PREFIX" ]; then
3425 cmdline="$cmdline--prefix=\$(PREFIX) "
3427 if [ "$modelname" = "application" ]; then
3428 cmdline="$cmdline--target=$app_modelname --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3429 else
3430 cmdline="$cmdline--target=\$(MODELNAME) "
3433 cmdline="$cmdline--ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3435 ### end of cmdline
3437 sed > Makefile \
3438 -e "s<@ROOTDIR@<${rootdir}<g" \
3439 -e "s<@DEBUG@<${debug}<g" \
3440 -e "s<@MEMORY@<${memory}<g" \
3441 -e "s<@TARGET_ID@<${target_id}<g" \
3442 -e "s<@TARGET@<${target}<g" \
3443 -e "s<@CPU@<${t_cpu}<g" \
3444 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3445 -e "s<@MODELNAME@<${modelname}<g" \
3446 -e "s<@LANGUAGE@<${language}<g" \
3447 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3448 -e "s<@PWD@<${pwd}<g" \
3449 -e "s<@HOSTCC@<${HOSTCC}<g" \
3450 -e "s<@HOSTAR@<${HOSTAR}<g" \
3451 -e "s<@CC@<${CC}<g" \
3452 -e "s<@LD@<${LD}<g" \
3453 -e "s<@AR@<${AR}<g" \
3454 -e "s<@AS@<${AS}<g" \
3455 -e "s<@OC@<${OC}<g" \
3456 -e "s<@WINDRES@<${WINDRES}<g" \
3457 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3458 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3459 -e "s<@RANLIB@<${RANLIB}<g" \
3460 -e "s<@TOOL@<${tool}<g" \
3461 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3462 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3463 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3464 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3465 -e "s<@OUTPUT@<${output}<g" \
3466 -e "s<@APPEXTRA@<${appextra}<g" \
3467 -e "s<@ARCHOSROM@<${archosrom}<g" \
3468 -e "s<@FLASHFILE@<${flash}<g" \
3469 -e "s<@PLUGINS@<${plugins}<g" \
3470 -e "s<@CODECS@<${swcodec}<g" \
3471 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3472 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3473 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3474 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3475 -e "s<@LDOPTS@<${LDOPTS}<g" \
3476 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3477 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3478 -e "s<@EXTRADEF@<${extradefines}<g" \
3479 -e "s<@APPSDIR@<${appsdir}<g" \
3480 -e "s<@FIRMDIR@<${firmdir}<g" \
3481 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3482 -e "s<@APPS@<${apps}<g" \
3483 -e "s<@APP_TYPE@<${app_type}<g" \
3484 -e "s<@GCCVER@<${gccver}<g" \
3485 -e "s<@GCCNUM@<${gccnum}<g" \
3486 -e "s<@UNAME@<${uname}<g" \
3487 -e "s<@ENDIAN@<${defendian}<g" \
3488 -e "s<@TOOLSET@<${toolset}<g" \
3489 -e "${simmagic1}" \
3490 -e "${simmagic2}" \
3491 -e "s<@MANUALDEV@<${manualdev}<g" \
3492 -e "s<@ENCODER@<${ENC_CMD}<g" \
3493 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3494 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3495 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3496 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3497 -e "s<@LANGS@<${buildlangs}<g" \
3498 -e "s<@USE_ELF@<${USE_ELF}<g" \
3499 -e "s<@RBDIR@<${rbdir}<g" \
3500 -e "s<@sharepath@<${sharedir}<g" \
3501 -e "s<@binpath@<${bindir}<g" \
3502 -e "s<@libpath@<${libdir}<g" \
3503 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3504 -e "s<@CMDLINE@<$cmdline<g" \
3505 -e "s<@SDLCONFIG@<$sdl<g" \
3506 <<EOF
3507 ## Automatically generated. http://www.rockbox.org/
3509 export ROOTDIR=@ROOTDIR@
3510 export FIRMDIR=@FIRMDIR@
3511 export APPSDIR=@APPSDIR@
3512 export TOOLSDIR=@TOOLSDIR@
3513 export DOCSDIR=\$(ROOTDIR)/docs
3514 export MANUALDIR=\${ROOTDIR}/manual
3515 export DEBUG=@DEBUG@
3516 export MODELNAME=@MODELNAME@
3517 export ARCHOSROM=@ARCHOSROM@
3518 export FLASHFILE=@FLASHFILE@
3519 export TARGET_ID=@TARGET_ID@
3520 export TARGET=@TARGET@
3521 export CPU=@CPU@
3522 export MANUFACTURER=@MANUFACTURER@
3523 export OBJDIR=@PWD@
3524 export BUILDDIR=@PWD@
3525 export LANGUAGE=@LANGUAGE@
3526 export VOICELANGUAGE=@VOICELANGUAGE@
3527 export MEMORYSIZE=@MEMORY@
3528 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3529 export MKFIRMWARE=@TOOL@
3530 export BMP2RB_MONO=@BMP2RB_MONO@
3531 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3532 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3533 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3534 export BINARY=@OUTPUT@
3535 export APPEXTRA=@APPEXTRA@
3536 export ENABLEDPLUGINS=@PLUGINS@
3537 export SOFTWARECODECS=@CODECS@
3538 export EXTRA_DEFINES=@EXTRADEF@
3539 export HOSTCC=@HOSTCC@
3540 export HOSTAR=@HOSTAR@
3541 export CC=@CC@
3542 export LD=@LD@
3543 export AR=@AR@
3544 export AS=@AS@
3545 export OC=@OC@
3546 export WINDRES=@WINDRES@
3547 export DLLTOOL=@DLLTOOL@
3548 export DLLWRAP=@DLLWRAP@
3549 export RANLIB=@RANLIB@
3550 export PREFIX=@PREFIX@
3551 export PROFILE_OPTS=@PROFILE_OPTS@
3552 export APP_TYPE=@APP_TYPE@
3553 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3554 export GCCOPTS=@GCCOPTS@
3555 export TARGET_INC=@TARGET_INC@
3556 export LOADADDRESS=@LOADADDRESS@
3557 export SHARED_FLAG=@SHARED_FLAG@
3558 export LDOPTS=@LDOPTS@
3559 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3560 export GCCVER=@GCCVER@
3561 export GCCNUM=@GCCNUM@
3562 export UNAME=@UNAME@
3563 export MANUALDEV=@MANUALDEV@
3564 export TTS_OPTS=@TTS_OPTS@
3565 export TTS_ENGINE=@TTS_ENGINE@
3566 export ENC_OPTS=@ENC_OPTS@
3567 export ENCODER=@ENCODER@
3568 export USE_ELF=@USE_ELF@
3569 export RBDIR=@RBDIR@
3570 export ROCKBOX_SHARE_PATH=@sharepath@
3571 export ROCKBOX_BINARY_PATH=@binpath@
3572 export ROCKBOX_LIBRARY_PATH=@libpath@
3573 export SDLCONFIG=@SDLCONFIG@
3575 CONFIGURE_OPTIONS=@CMDLINE@
3577 include \$(TOOLSDIR)/root.make
3581 echo "Created Makefile"