Make sure we don't read past the end of a C-string in format_track_path. Second part...
[maemo-rb.git] / tools / configure
blobbcb7d0a8645a062cc7b7c041c68a9ae4977dd269
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 bindir=
25 libdir=
26 sharedir=
28 app_modelname=
29 app_lcd_width=
30 app_lcd_height=
32 # Begin Function Definitions
34 input() {
35 read response
36 echo $response
39 prefixtools () {
40 prefix="$1"
41 CC=${prefix}gcc
42 WINDRES=${prefix}windres
43 DLLTOOL=${prefix}dlltool
44 DLLWRAP=${prefix}dllwrap
45 RANLIB=${prefix}ranlib
46 LD=${prefix}ld
47 AR=${prefix}ar
48 AS=${prefix}as
49 OC=${prefix}objcopy
52 app_set_paths () {
53 # setup files and paths depending on the platform
54 if [ -z "$ARG_PREFIX" ]; then
55 sharedir="/usr/local/share/rockbox"
56 bindir="/usr/local/bin"
57 libdir="/usr/local/lib"
58 else
59 if [ -d "$ARG_PREFIX" ]; then
60 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
61 ARG_PREFIX=`realpath $ARG_PREFIX`
62 if [ "0" != "$?" ]; then
63 echo "ERROR: Could not get prefix path (is realpath installed?)."
64 exit
67 sharedir="$ARG_PREFIX/share/rockbox"
68 bindir="$ARG_PREFIX/bin"
69 libdir="$ARG_PREFIX/lib"
70 else
71 echo "ERROR: PREFIX does not exist"
72 exit
77 # Set the application LCD size according to the following priorities:
78 # 1) If --lcdwidth and --lcdheight are set, use them
79 # 2) If a size is passed to the app_set_lcd_size() function, use that
80 # 3) Otherwise ask the user
81 app_set_lcd_size () {
82 if [ -z "$ARG_LCDWIDTH" ]; then
83 ARG_LCDWIDTH=$1
85 if [ -z "$ARG_LCDHEIGHT" ]; then
86 ARG_LCDHEIGHT=$2
89 echo "Enter the LCD width (default: 320)"
90 if [ -z "$ARG_LCDWIDTH" ]; then
91 app_lcd_width=`input`
92 else
93 app_lcd_width="$ARG_LCDWIDTH"
95 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
96 echo "Enter the LCD height (default: 480)"
97 if [ -z "$ARG_LCDHEIGHT" ]; then
98 app_lcd_height=`input`
99 else
100 app_lcd_height="$ARG_LCDHEIGHT"
102 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
103 echo "Selected $app_lcd_width x $app_lcd_height resolution"
104 ARG_LCDWIDTH=$app_lcd_width
105 ARG_LCDHEIGHT=$app_lcd_height
107 app_lcd_width="#define LCD_WIDTH $app_lcd_width"
108 app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
111 findarmgcc() {
112 if [ "$ARG_ARM_EABI" != "0" ]; then
113 prefixtools arm-elf-eabi-
114 gccchoice="4.4.4"
115 else
116 prefixtools arm-elf-
117 gccchoice="4.0.3"
121 # scan the $PATH for the given command
122 findtool(){
123 file="$1"
125 IFS=":"
126 for path in $PATH
128 # echo "checks for $file in $path" >&2
129 if test -f "$path/$file"; then
130 echo "$path/$file"
131 return
133 done
134 # check whether caller wants literal return value if not found
135 if [ "$2" = "--lit" ]; then
136 echo "$file"
140 # scan the $PATH for sdl-config - check whether for a (cross-)win32
141 # sdl as requested
142 findsdl(){
143 file="sdl-config"
144 winbuild="$1"
146 IFS=":"
147 for path in $PATH
149 #echo "checks for $file in $path" >&2
150 if test -f "$path/$file"; then
151 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
152 if [ "yes" = "${winbuild}" ]; then
153 echo "$path/$file"
154 return
156 else
157 if [ "yes" != "${winbuild}" ]; then
158 echo "$path/$file"
159 return
163 done
166 simcc () {
168 # default tool setup for native building
169 prefixtools "$CROSS_COMPILE"
170 ARG_ARM_THUMB=0 # can't use thumb in native builds
172 app_type=$1
173 winbuild=""
174 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef// -e s/-O//`
175 GCCOPTS="$GCCOPTS -fno-builtin -g"
176 GCCOPTIMIZE=''
177 LDOPTS='-lm' # button-sdl.c uses sqrt()
179 # default output binary name, don't override app_get_platform()
180 if [ "$app_type" != "sdl-app" ]; then
181 output="rockboxui"
184 # default share option, override below if needed
185 SHARED_FLAG="-shared"
187 if [ "$win32crosscompile" = "yes" ]; then
188 LDOPTS="$LDOPTS -mconsole"
189 output="$output.exe"
190 winbuild="yes"
191 else
192 case $uname in
193 CYGWIN*)
194 echo "Cygwin host detected"
196 LDOPTS="$LDOPTS -mconsole"
197 output="$output.exe"
198 winbuild="yes"
201 MINGW*)
202 echo "MinGW host detected"
204 LDOPTS="$LDOPTS -mconsole"
205 output="$output.exe"
206 winbuild="yes"
209 Linux)
210 echo "Linux host detected"
211 LDOPTS="$LDOPTS -ldl"
214 FreeBSD)
215 echo "FreeBSD host detected"
216 LDOPTS="$LDOPTS -ldl"
219 Darwin)
220 echo "Darwin host detected"
221 LDOPTS="$LDOPTS -ldl"
223 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
226 SunOS)
227 echo "*Solaris host detected"
229 GCCOPTS="$GCCOPTS -fPIC"
230 LDOPTS="$LDOPTS -ldl"
234 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
235 exit 1
237 esac
240 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
241 sdl=`findsdl $winbuild`
243 if [ -n `echo $app_type | grep "sdl"` ]; then
244 if [ -z "$sdl" ]; then
245 echo "configure didn't find sdl-config, which indicates that you"
246 echo "don't have SDL (properly) installed. Please correct and"
247 echo "re-run configure!"
248 exit 2
249 else
250 # generic sdl-config checker
251 GCCOPTS="$GCCOPTS `$sdl --cflags`"
252 LDOPTS="$LDOPTS `$sdl --libs`"
257 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
259 if test "X$win32crosscompile" != "Xyes"; then
260 case `uname -m` in
261 x86_64|amd64)
262 # fPIC is needed to make shared objects link
263 # setting visibility to hidden is necessary to avoid strange crashes
264 # due to symbol clashing
265 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
266 # x86_64 supports MMX by default
269 i686)
270 echo "Enabling MMX support"
271 GCCOPTS="$GCCOPTS -mmmx"
273 esac
275 id=$$
276 cat >$tmpdir/conftest-$id.c <<EOF
277 #include <stdio.h>
278 int main(int argc, char **argv)
280 int var=0;
281 char *varp = (char *)&var;
282 *varp=1;
284 printf("%d\n", var);
285 return 0;
289 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
291 # when cross compiling, the endianess cannot be detected because the above program doesn't run
292 # on the local machine. assume little endian but print a warning
293 endian=`$tmpdir/conftest-$id 2> /dev/null`
294 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
295 # big endian
296 endian="big"
297 else
298 # little endian
299 endian="little"
302 if [ "$CROSS_COMPILE" != "" ]; then
303 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
306 if [ "$app_type" = "sdl-sim" ]; then
307 echo "Simulator environment deemed $endian endian"
308 elif [ "$app_type" = "sdl-app" ]; then
309 echo "Application environment deemed $endian endian"
310 elif [ "$app_type" = "checkwps" ]; then
311 echo "CheckWPS environment deemed $endian endian"
314 # use wildcard here to make it work even if it was named *.exe like
315 # on cygwin
316 rm -f $tmpdir/conftest-$id*
317 else
318 # We are crosscompiling
319 # add cross-compiler option(s)
320 prefixtools i586-mingw32msvc-
321 LDOPTS="$LDOPTS -mconsole"
322 output="rockboxui.exe"
323 endian="little" # windows is little endian
324 echo "Enabling MMX support"
325 GCCOPTS="$GCCOPTS -mmmx"
330 # functions for setting up cross-compiler names and options
331 # also set endianess and what the exact recommended gcc version is
332 # the gcc version should most likely match what versions we build with
333 # rockboxdev.sh
335 shcc () {
336 prefixtools sh-elf-
337 GCCOPTS="$CCOPTS -m1"
338 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
339 endian="big"
340 gccchoice="4.0.3"
343 calmrisccc () {
344 prefixtools calmrisc16-unknown-elf-
345 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
346 GCCOPTIMIZE="-fomit-frame-pointer"
347 endian="big"
350 coldfirecc () {
351 prefixtools m68k-elf-
352 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
353 GCCOPTIMIZE="-fomit-frame-pointer"
354 endian="big"
355 gccchoice="4.5.2"
358 arm7tdmicc () {
359 findarmgcc
360 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
361 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
362 GCCOPTS="$GCCOPTS -mlong-calls"
364 GCCOPTIMIZE="-fomit-frame-pointer"
365 endian="little"
368 arm9tdmicc () {
369 findarmgcc
370 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
371 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
372 GCCOPTS="$GCCOPTS -mlong-calls"
374 GCCOPTIMIZE="-fomit-frame-pointer"
375 endian="little"
378 arm940tbecc () {
379 findarmgcc
380 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
381 if test "$ARG_ARM_EABI" = "0"; then
382 GCCOPTS="$GCCOPTS -mlong-calls"
384 GCCOPTIMIZE="-fomit-frame-pointer"
385 endian="big"
388 arm940tcc () {
389 findarmgcc
390 GCCOPTS="$CCOPTS -mcpu=arm940t"
391 if test "$ARG_ARM_EABI" = "0"; then
392 GCCOPTS="$GCCOPTS -mlong-calls"
394 GCCOPTIMIZE="-fomit-frame-pointer"
395 endian="little"
398 arm946cc () {
399 findarmgcc
400 GCCOPTS="$CCOPTS -mcpu=arm9e"
401 if test "$ARG_ARM_EABI" = "0"; then
402 GCCOPTS="$GCCOPTS -mlong-calls"
404 GCCOPTIMIZE="-fomit-frame-pointer"
405 endian="little"
408 arm926ejscc () {
409 findarmgcc
410 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
411 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
412 GCCOPTS="$GCCOPTS -mlong-calls"
414 GCCOPTIMIZE="-fomit-frame-pointer"
415 endian="little"
418 arm1136jfscc () {
419 findarmgcc
420 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
421 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
422 GCCOPTS="$GCCOPTS -mlong-calls"
424 GCCOPTIMIZE="-fomit-frame-pointer"
425 endian="little"
428 arm1176jzscc () {
429 findarmgcc
430 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
431 if test "$ARG_ARM_EABI" = "0"; then
432 GCCOPTS="$GCCOPTS -mlong-calls"
434 GCCOPTIMIZE="-fomit-frame-pointer"
435 endian="little"
438 mipselcc () {
439 prefixtools mipsel-elf-
440 # mips is predefined, but we want it for paths. use __mips instead
441 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
442 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
443 GCCOPTIMIZE="-fomit-frame-pointer"
444 endian="little"
445 gccchoice="4.1.2"
448 maemocc () {
449 # Scratchbox sets up "gcc" based on the active target
450 prefixtools ""
452 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
453 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
454 GCCOPTIMIZE=''
455 LDOPTS="-lm -ldl $LDOPTS"
456 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
457 SHARED_FLAG="-shared"
458 endian="little"
460 is_n900=0
461 # Determine maemo version
462 if pkg-config --atleast-version=5 maemo-version; then
463 if [ "$1" == "4" ]; then
464 echo "ERROR: Maemo 4 SDK required."
465 exit 1
467 extradefines="$extradefines -DMAEMO5"
468 echo "Found N900 maemo version"
469 is_n900=1
470 elif pkg-config --atleast-version=4 maemo-version; then
471 if [ "$1" == "5" ]; then
472 echo "ERROR: Maemo 5 SDK required."
473 exit 1
475 extradefines="$extradefines -DMAEMO4"
476 echo "Found N8xx maemo version"
477 else
478 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
479 exit 1
482 # SDL
483 if [ $is_n900 -eq 1 ]; then
484 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
485 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
486 else
487 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
488 LDOPTS="$LDOPTS `sdl-config --libs`"
491 # glib and libosso support
492 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
493 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
495 # libhal support: Battery monitoring
496 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
497 LDOPTS="$LDOPTS `pkg-config --libs hal`"
499 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
500 if [ $is_n900 -eq 1 ]; then
501 # gstreamer support: Audio output.
502 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
503 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
505 # N900 specific: libplayback support
506 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
507 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
509 # N900 specific: Enable ARMv7 NEON support
510 if sb-conf current |grep ARMEL; then
511 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
512 extradefines="$extradefines -DMAEMO_ARM_BUILD"
514 else
515 # N8xx specific: Enable armv5te instructions
516 if sb-conf current |grep ARMEL; then
517 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
518 extradefines="$extradefines -DMAEMO_ARM_BUILD"
523 androidcc () {
524 if [ -z "$ANDROID_SDK_PATH" ]; then
525 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
526 echo "environment variable point to the root directory of the Android SDK."
527 exit
529 if [ -z "$ANDROID_NDK_PATH" ]; then
530 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
531 echo "environment variable point to the root directory of the Android NDK."
532 exit
534 buildhost=`uname | tr [:upper:] [:lower:]`
535 gccchoice="4.4.3"
536 gcctarget="arm-linux-androideabi-"
537 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
538 PATH=$PATH:$gccprefix/bin
539 prefixtools $gcctarget
540 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
541 GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
542 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
543 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
544 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
545 LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog"
546 extradefines="$extradefines -DANDROID"
547 endian="little"
548 SHARED_FLAG="-shared"
551 whichadvanced () {
552 atype=`echo "$1" | cut -c 2-`
553 ##################################################################
554 # Prompt for specific developer options
556 if [ "$atype" ]; then
557 interact=
558 else
559 interact=1
560 echo ""
561 printf "Enter your developer options (press only enter when done)\n\
562 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
563 (T)est plugins, S(m)all C lib:"
564 if [ "$memory" = "2" ]; then
565 printf ", (8)MB MOD"
567 if [ "$modelname" = "archosplayer" ]; then
568 printf ", Use (A)TA poweroff"
570 if [ "$t_model" = "ondio" ]; then
571 printf ", (B)acklight MOD"
573 if [ "$modelname" = "iaudiom5" ]; then
574 printf ", (F)M radio MOD"
576 if [ "$modelname" = "iriverh120" ]; then
577 printf ", (R)TC MOD"
579 echo ""
582 cont=1
583 while [ $cont = "1" ]; do
585 if [ "$interact" ]; then
586 option=`input`
587 else
588 option=`echo "$atype" | cut -c 1`
591 case $option in
592 [Dd])
593 if [ "yes" = "$profile" ]; then
594 echo "Debug is incompatible with profiling"
595 else
596 echo "DEBUG build enabled"
597 use_debug="yes"
600 [Ll])
601 echo "logf() support enabled"
602 logf="yes"
604 [Mm])
605 echo "Using Rockbox' small C library"
606 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
608 [Tt])
609 echo "Including test plugins"
610 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
612 [Cc])
613 echo "bootchart enabled (logf also enabled)"
614 bootchart="yes"
615 logf="yes"
617 [Ss])
618 echo "Simulator build enabled"
619 simulator="yes"
621 [Pp])
622 if [ "yes" = "$use_debug" ]; then
623 echo "Profiling is incompatible with debug"
624 else
625 echo "Profiling support is enabled"
626 profile="yes"
629 [Vv])
630 echo "Voice build selected"
631 voice="yes"
634 if [ "$memory" = "2" ]; then
635 memory="8"
636 echo "Memory size selected: 8MB"
639 [Aa])
640 if [ "$modelname" = "archosplayer" ]; then
641 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
642 echo "ATA power off enabled"
645 [Bb])
646 if [ "$t_model" = "ondio" ]; then
647 have_backlight="#define HAVE_BACKLIGHT"
648 echo "Backlight functions enabled"
651 [Ff])
652 if [ "$modelname" = "iaudiom5" ]; then
653 have_fmradio_in="#define HAVE_FMRADIO_IN"
654 echo "FM radio functions enabled"
657 [Rr])
658 if [ "$modelname" = "iriverh120" ]; then
659 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
660 have_rtc_alarm="#define HAVE_RTC_ALARM"
661 echo "RTC functions enabled (DS1339/DS3231)"
664 [Ww])
665 echo "Enabling Windows 32 cross-compiling"
666 win32crosscompile="yes"
668 "") # Match enter press when finished with advanced options
669 cont=0
672 echo "[ERROR] Option $option unsupported"
674 esac
675 if [ "$interact" ]; then
676 btype="$btype$option"
677 else
678 atype=`echo "$atype" | cut -c 2-`
679 [ "$atype" ] || cont=0
681 done
682 echo "done"
684 if [ "yes" = "$voice" ]; then
685 # Ask about languages to build
686 picklang
687 voicelanguage=`whichlang`
688 echo "Voice language set to $voicelanguage"
690 # Configure encoder and TTS engine for each language
691 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
692 voiceconfig "$thislang"
693 done
695 if [ "yes" = "$use_debug" ]; then
696 debug="-DDEBUG"
697 GCCOPTS="$GCCOPTS -g -DDEBUG"
699 if [ "yes" = "$logf" ]; then
700 use_logf="#define ROCKBOX_HAS_LOGF 1"
702 if [ "yes" = "$bootchart" ]; then
703 use_bootchart="#define DO_BOOTCHART 1"
705 if [ "yes" = "$simulator" ]; then
706 debug="-DDEBUG"
707 extradefines="$extradefines -DSIMULATOR"
708 archosrom=""
709 flash=""
711 if [ "yes" = "$profile" ]; then
712 extradefines="$extradefines -DRB_PROFILE"
713 PROFILE_OPTS="-finstrument-functions"
717 # Configure voice settings
718 voiceconfig () {
719 thislang=$1
720 if [ ! "$ARG_TTS" ]; then
721 echo "Building $thislang voice for $modelname. Select options"
722 echo ""
725 if [ -n "`findtool flite`" ]; then
726 FLITE="F(l)ite "
727 FLITE_OPTS=""
728 DEFAULT_TTS="flite"
729 DEFAULT_TTS_OPTS=$FLITE_OPTS
730 DEFAULT_NOISEFLOOR="500"
731 DEFAULT_CHOICE="L"
733 if [ -n "`findtool espeak`" ]; then
734 ESPEAK="(e)Speak "
735 ESPEAK_OPTS=""
736 DEFAULT_TTS="espeak"
737 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
738 DEFAULT_NOISEFLOOR="500"
739 DEFAULT_CHOICE="e"
741 if [ -n "`findtool festival`" ]; then
742 FESTIVAL="(F)estival "
743 case "$thislang" in
744 "italiano")
745 FESTIVAL_OPTS="--language italian"
747 "espanol")
748 FESTIVAL_OPTS="--language spanish"
750 "finnish")
751 FESTIVAL_OPTS="--language finnish"
753 "czech")
754 FESTIVAL_OPTS="--language czech"
757 FESTIVAL_OPTS=""
759 esac
760 DEFAULT_TTS="festival"
761 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
762 DEFAULT_NOISEFLOOR="500"
763 DEFAULT_CHOICE="F"
765 if [ -n "`findtool swift`" ]; then
766 SWIFT="S(w)ift "
767 SWIFT_OPTS=""
768 DEFAULT_TTS="swift"
769 DEFAULT_TTS_OPTS=$SWIFT_OPTS
770 DEFAULT_NOISEFLOOR="500"
771 DEFAULT_CHOICE="w"
773 # Allow SAPI if Windows is in use
774 if [ -n "`findtool winver`" ]; then
775 SAPI="(S)API "
776 SAPI_OPTS=""
777 DEFAULT_TTS="sapi"
778 DEFAULT_TTS_OPTS=$SAPI_OPTS
779 DEFAULT_NOISEFLOOR="500"
780 DEFAULT_CHOICE="S"
783 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
784 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
785 exit 3
788 if [ "$ARG_TTS" ]; then
789 option=$ARG_TTS
790 else
791 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
792 option=`input`
794 advopts="$advopts --tts=$option"
795 case "$option" in
796 [Ll])
797 TTS_ENGINE="flite"
798 NOISEFLOOR="500" # TODO: check this value
799 TTS_OPTS=$FLITE_OPTS
801 [Ee])
802 TTS_ENGINE="espeak"
803 NOISEFLOOR="500"
804 TTS_OPTS=$ESPEAK_OPTS
806 [Ff])
807 TTS_ENGINE="festival"
808 NOISEFLOOR="500"
809 TTS_OPTS=$FESTIVAL_OPTS
811 [Ss])
812 TTS_ENGINE="sapi"
813 NOISEFLOOR="500"
814 TTS_OPTS=$SAPI_OPTS
816 [Ww])
817 TTS_ENGINE="swift"
818 NOISEFLOOR="500"
819 TTS_OPTS=$SWIFT_OPTS
822 TTS_ENGINE=$DEFAULT_TTS
823 TTS_OPTS=$DEFAULT_TTS_OPTS
824 NOISEFLOOR=$DEFAULT_NOISEFLOOR
825 esac
826 echo "Using $TTS_ENGINE for TTS"
828 # Select which voice to use for Festival
829 if [ "$TTS_ENGINE" = "festival" ]; then
830 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
831 for voice in $voicelist; do
832 TTS_FESTIVAL_VOICE="$voice" # Default choice
833 break
834 done
835 if [ "$ARG_VOICE" ]; then
836 CHOICE=$ARG_VOICE
837 else
839 for voice in $voicelist; do
840 printf "%3d. %s\n" "$i" "$voice"
841 i=`expr $i + 1`
842 done
843 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
844 CHOICE=`input`
847 for voice in $voicelist; do
848 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
849 TTS_FESTIVAL_VOICE="$voice"
851 i=`expr $i + 1`
852 done
853 advopts="$advopts --voice=$CHOICE"
854 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
855 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
858 # Read custom tts options from command line
859 if [ "$ARG_TTSOPTS" ]; then
860 TTS_OPTS="$ARG_TTSOPTS"
861 advopts="$advopts --ttsopts='$TTS_OPTS'"
862 echo "$TTS_ENGINE options set to $TTS_OPTS"
865 if [ "$swcodec" = "yes" ]; then
866 ENCODER="rbspeexenc"
867 ENC_CMD="rbspeexenc"
868 ENC_OPTS="-q 4 -c 10"
869 else
870 if [ -n "`findtool lame`" ]; then
871 ENCODER="lame"
872 ENC_CMD="lame"
873 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
874 else
875 echo "You need LAME in the system path to build voice files for"
876 echo "HWCODEC targets."
877 exit 4
881 echo "Using $ENCODER for encoding voice clips"
883 # Read custom encoder options from command line
884 if [ "$ARG_ENCOPTS" ]; then
885 ENC_OPTS="$ARG_ENCOPTS"
886 advopts="$advopts --encopts='$ENC_OPTS'"
887 echo "$ENCODER options set to $ENC_OPTS"
890 TEMPDIR="${pwd}"
891 if [ -n "`findtool cygpath`" ]; then
892 TEMPDIR=`cygpath . -a -w`
896 picklang() {
897 # figure out which languages that are around
898 for file in $rootdir/apps/lang/*.lang; do
899 clean=`basename $file .lang`
900 langs="$langs $clean"
901 done
903 if [ "$ARG_LANG" ]; then
904 pick=$ARG_LANG
905 else
906 echo "Select a number for the language to use (default is english)"
907 # FIXME The multiple-language feature is currently broken
908 # echo "You may enter a comma-separated list of languages to build"
910 num=1
911 for one in $langs; do
912 echo "$num. $one"
913 num=`expr $num + 1`
914 done
915 pick=`input`
917 advopts="$advopts --language=$pick"
920 whichlang() {
921 output=""
922 # Allow the user to pass a comma-separated list of langauges
923 for thispick in `echo $pick | sed 's/,/ /g'`; do
924 num=1
925 for one in $langs; do
926 # Accept both the language number and name
927 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
928 if [ "$output" = "" ]; then
929 output=$one
930 else
931 output=$output,$one
934 num=`expr $num + 1`
935 done
936 done
937 if [ -z "$output" ]; then
938 # pick a default
939 output="english"
941 echo $output
944 help() {
945 echo "Rockbox configure script."
946 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
947 echo "Do *NOT* run this within the tools directory!"
948 echo ""
949 cat <<EOF
950 Usage: configure [OPTION]...
951 Options:
952 --target=TARGET Sets the target, TARGET can be either the target ID or
953 corresponding string. Run without this option to see all
954 available targets.
956 --ram=RAM Sets the RAM for certain targets. Even though any number
957 is accepted, not every number is correct. The default
958 value will be applied, if you entered a wrong number
959 (which depends on the target). Watch the output. Run
960 without this option if you are not sure which the right
961 number is.
963 --type=TYPE Sets the build type. Shortcuts are also valid.
964 Run without this option to see all available types.
965 Multiple values are allowed and managed in the input
966 order. So --type=b stands for Bootloader build, while
967 --type=ab stands for "Backlight MOD" build.
969 --language=LANG Set the language used for voice generation (used only if
970 TYPE is AV).
972 --tts=ENGINE Set the TTS engine used for voice generation (used only
973 if TYPE is AV).
975 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
976 AV).
978 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
980 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
982 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
983 This is useful for having multiple alternate builds on
984 your device that you can load with ROLO. However as the
985 bootloader looks for .rockbox you won't be able to boot
986 into this build.
988 --ccache Enable ccache use (done by default these days)
989 --no-ccache Disable ccache use
991 --eabi Make configure prefer toolchains that are able to compile
992 for the new ARM standard abi EABI
993 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
994 --thumb Build with -mthumb (for ARM builds)
995 --no-thumb The opposite of --thumb (don't use thumb even for targets
996 where this is the default
997 --prefix Target installation directory
998 --help Shows this message (must not be used with other options)
1002 exit
1005 ARG_CCACHE=
1006 ARG_ENCOPTS=
1007 ARG_LANG=
1008 ARG_RAM=
1009 ARG_RBDIR=
1010 ARG_TARGET=
1011 ARG_TTS=
1012 ARG_TTSOPTS=
1013 ARG_TYPE=
1014 ARG_VOICE=
1015 ARG_ARM_EABI=
1016 ARG_ARM_THUMB=
1017 ARG_PREFIX="$PREFIX"
1018 err=
1019 for arg in "$@"; do
1020 case "$arg" in
1021 --ccache) ARG_CCACHE=1;;
1022 --no-ccache) ARG_CCACHE=0;;
1023 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1024 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
1025 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1026 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
1027 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1028 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1029 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1030 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1031 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1032 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1033 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
1034 --eabi) ARG_ARM_EABI=1;;
1035 --no-eabi) ARG_ARM_EABI=0;;
1036 --thumb) ARG_ARM_THUMB=1;;
1037 --no-thumb) ARG_ARM_THUMB=0;;
1038 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
1039 --help) help;;
1040 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1041 esac
1042 done
1043 [ "$err" ] && exit 1
1045 advopts=
1047 if [ "$TMPDIR" != "" ]; then
1048 tmpdir=$TMPDIR
1049 else
1050 tmpdir=/tmp
1052 echo Using temporary directory $tmpdir
1054 if test -r "configure"; then
1055 # this is a check for a configure script in the current directory, it there
1056 # is one, try to figure out if it is this one!
1058 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1059 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1060 echo "It will only cause you pain and grief. Instead do this:"
1061 echo ""
1062 echo " cd .."
1063 echo " mkdir build-dir"
1064 echo " cd build-dir"
1065 echo " ../tools/configure"
1066 echo ""
1067 echo "Much happiness will arise from this. Enjoy"
1068 exit 5
1072 # get our current directory
1073 pwd=`pwd`;
1075 if { echo $pwd | grep " "; } then
1076 echo "You're running this script in a path that contains space. The build"
1077 echo "system is unfortunately not clever enough to deal with this. Please"
1078 echo "run the script from a different path, rename the path or fix the build"
1079 echo "system!"
1080 exit 6
1083 if [ -z "$rootdir" ]; then
1084 ##################################################################
1085 # Figure out where the source code root is!
1087 rootdir=`dirname $0`/../
1089 #####################################################################
1090 # Convert the possibly relative directory name to an absolute version
1092 now=`pwd`
1093 cd $rootdir
1094 rootdir=`pwd`
1096 # cd back to the build dir
1097 cd $now
1100 apps="apps"
1101 appsdir='\$(ROOTDIR)/apps'
1102 firmdir='\$(ROOTDIR)/firmware'
1103 toolsdir='\$(ROOTDIR)/tools'
1106 ##################################################################
1107 # Figure out target platform
1110 if [ "$ARG_TARGET" ]; then
1111 buildfor=$ARG_TARGET
1112 else
1113 echo "Enter target platform:"
1114 cat <<EOF
1115 ==Archos== ==iriver== ==Apple iPod==
1116 0) Player/Studio 10) H120/H140 20) Color/Photo
1117 1) Recorder 11) H320/H340 21) Nano 1G
1118 2) FM Recorder 12) iHP-100/110/115 22) Video
1119 3) Recorder v2 13) iFP-790 23) 3G
1120 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1121 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1122 6) AV300 26) Mini 2G
1123 ==Toshiba== 27) 1G, 2G
1124 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1125 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1126 31) M5/M5L
1127 32) 7 ==Olympus= ==SanDisk==
1128 33) D2 70) M:Robe 500 50) Sansa e200
1129 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1130 52) Sansa c200
1131 ==Creative== ==Philips== 53) Sansa m200
1132 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1133 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1134 92) Zen Vision HDD1830 56) Sansa e200v2
1135 102) GoGear HDD6330 57) Sansa m200v4
1136 ==Onda== 58) Sansa Fuze
1137 120) VX747 ==Meizu== 59) Sansa c200v2
1138 121) VX767 110) M6SL 60) Sansa Clipv2
1139 122) VX747+ 111) M6SP 61) Sansa View
1140 123) VX777 112) M3 62) Sansa Clip+
1141 63) Sansa Fuze v2
1142 ==Samsung== ==Tatung==
1143 140) YH-820 150) Elio TPJ-1022 ==Logik==
1144 141) YH-920 80) DAX 1GB MP3/DAB
1145 142) YH-925 ==Packard Bell==
1146 143) YP-S3 160) Vibe 500 ==Lyre project==
1147 130) Lyre proto 1
1148 ==Application== ==MPIO== 131) Mini2440
1149 200) SDL 170) HD200
1150 201) Android 171) HD300
1151 202) Nokia N8xx
1152 203) Nokia N900
1156 buildfor=`input`;
1159 # Set of tools built for all target platforms:
1160 toolset="rdf2binary convbdf codepages"
1162 # Toolsets for some target families:
1163 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1164 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1165 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1166 ipodbitmaptools="$toolset scramble bmp2rb"
1167 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1168 tccbitmaptools="$toolset scramble bmp2rb"
1169 # generic is used by IFP, Meizu and Onda
1170 genericbitmaptools="$toolset bmp2rb"
1171 # scramble is used by all other targets
1172 scramblebitmaptools="$genericbitmaptools scramble"
1175 # ---- For each target ----
1177 # *Variables*
1178 # target_id: a unique number identifying this target, IS NOT the menu number.
1179 # Just use the currently highest number+1 when you add a new
1180 # target.
1181 # modelname: short model name used all over to identify this target
1182 # memory: number of megabytes of RAM this target has. If the amount can
1183 # be selected by the size prompt, let memory be unset here
1184 # target: -Ddefine passed to the build commands to make the correct
1185 # config-*.h file get included etc
1186 # tool: the tool that takes a plain binary and converts that into a
1187 # working "firmware" file for your target
1188 # output: the final output file name
1189 # boottool: the tool that takes a plain binary and generates a bootloader
1190 # file for your target (or blank to use $tool)
1191 # bootoutput:the final output file name for the bootloader (or blank to use
1192 # $output)
1193 # appextra: passed to the APPEXTRA variable in the Makefiles.
1194 # TODO: add proper explanation
1195 # archosrom: used only for Archos targets that build a special flashable .ucl
1196 # image.
1197 # flash: name of output for flashing, for targets where there's a special
1198 # file output for this.
1199 # plugins: set to 'yes' to build the plugins. Early development builds can
1200 # set this to no in the early stages to have an easier life for a
1201 # while
1202 # swcodec: set 'yes' on swcodec targets
1203 # toolset: lists what particular tools in the tools/ directory that this
1204 # target needs to have built prior to building Rockbox
1206 # *Functions*
1207 # *cc: sets up gcc and compiler options for your target builds. Note
1208 # that if you select a simulator build, the compiler selection is
1209 # overridden later in the script.
1211 case $buildfor in
1213 0|archosplayer)
1214 target_id=1
1215 modelname="archosplayer"
1216 target="-DARCHOS_PLAYER"
1217 shcc
1218 tool="$rootdir/tools/scramble"
1219 output="archos.mod"
1220 appextra="player:gui"
1221 archosrom="$pwd/rombox.ucl"
1222 flash="$pwd/rockbox.ucl"
1223 plugins="yes"
1224 swcodec=""
1226 # toolset is the tools within the tools directory that we build for
1227 # this particular target.
1228 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1230 # Note: the convbdf is present in the toolset just because: 1) the
1231 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1232 # build the player simulator
1234 t_cpu="sh"
1235 t_manufacturer="archos"
1236 t_model="player"
1239 1|archosrecorder)
1240 target_id=2
1241 modelname="archosrecorder"
1242 target="-DARCHOS_RECORDER"
1243 shcc
1244 tool="$rootdir/tools/scramble"
1245 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1246 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1247 output="ajbrec.ajz"
1248 appextra="recorder:gui:radio"
1249 #archosrom="$pwd/rombox.ucl"
1250 flash="$pwd/rockbox.ucl"
1251 plugins="yes"
1252 swcodec=""
1253 # toolset is the tools within the tools directory that we build for
1254 # this particular target.
1255 toolset=$archosbitmaptools
1256 t_cpu="sh"
1257 t_manufacturer="archos"
1258 t_model="recorder"
1261 2|archosfmrecorder)
1262 target_id=3
1263 modelname="archosfmrecorder"
1264 target="-DARCHOS_FMRECORDER"
1265 shcc
1266 tool="$rootdir/tools/scramble -fm"
1267 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1268 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1269 output="ajbrec.ajz"
1270 appextra="recorder:gui:radio"
1271 #archosrom="$pwd/rombox.ucl"
1272 flash="$pwd/rockbox.ucl"
1273 plugins="yes"
1274 swcodec=""
1275 # toolset is the tools within the tools directory that we build for
1276 # this particular target.
1277 toolset=$archosbitmaptools
1278 t_cpu="sh"
1279 t_manufacturer="archos"
1280 t_model="fm_v2"
1283 3|archosrecorderv2)
1284 target_id=4
1285 modelname="archosrecorderv2"
1286 target="-DARCHOS_RECORDERV2"
1287 shcc
1288 tool="$rootdir/tools/scramble -v2"
1289 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1290 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1291 output="ajbrec.ajz"
1292 appextra="recorder:gui:radio"
1293 #archosrom="$pwd/rombox.ucl"
1294 flash="$pwd/rockbox.ucl"
1295 plugins="yes"
1296 swcodec=""
1297 # toolset is the tools within the tools directory that we build for
1298 # this particular target.
1299 toolset=$archosbitmaptools
1300 t_cpu="sh"
1301 t_manufacturer="archos"
1302 t_model="fm_v2"
1305 4|archosondiosp)
1306 target_id=7
1307 modelname="archosondiosp"
1308 target="-DARCHOS_ONDIOSP"
1309 shcc
1310 tool="$rootdir/tools/scramble -osp"
1311 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1312 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1313 output="ajbrec.ajz"
1314 appextra="recorder:gui:radio"
1315 #archosrom="$pwd/rombox.ucl"
1316 flash="$pwd/rockbox.ucl"
1317 plugins="yes"
1318 swcodec=""
1319 # toolset is the tools within the tools directory that we build for
1320 # this particular target.
1321 toolset=$archosbitmaptools
1322 t_cpu="sh"
1323 t_manufacturer="archos"
1324 t_model="ondio"
1327 5|archosondiofm)
1328 target_id=8
1329 modelname="archosondiofm"
1330 target="-DARCHOS_ONDIOFM"
1331 shcc
1332 tool="$rootdir/tools/scramble -ofm"
1333 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1334 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1335 output="ajbrec.ajz"
1336 appextra="recorder:gui:radio"
1337 #archosrom="$pwd/rombox.ucl"
1338 flash="$pwd/rockbox.ucl"
1339 plugins="yes"
1340 swcodec=""
1341 toolset=$archosbitmaptools
1342 t_cpu="sh"
1343 t_manufacturer="archos"
1344 t_model="ondio"
1347 6|archosav300)
1348 target_id=38
1349 modelname="archosav300"
1350 target="-DARCHOS_AV300"
1351 memory=16 # always
1352 arm7tdmicc
1353 tool="$rootdir/tools/scramble -mm=C"
1354 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1355 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1356 output="cjbm.ajz"
1357 appextra="recorder:gui:radio"
1358 plugins="yes"
1359 swcodec=""
1360 # toolset is the tools within the tools directory that we build for
1361 # this particular target.
1362 toolset="$toolset scramble descramble bmp2rb"
1363 # architecture, manufacturer and model for the target-tree build
1364 t_cpu="arm"
1365 t_manufacturer="archos"
1366 t_model="av300"
1369 10|iriverh120)
1370 target_id=9
1371 modelname="iriverh120"
1372 target="-DIRIVER_H120"
1373 memory=32 # always
1374 coldfirecc
1375 tool="$rootdir/tools/scramble -add=h120"
1376 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1377 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1378 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1379 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1380 output="rockbox.iriver"
1381 bootoutput="bootloader.iriver"
1382 appextra="recorder:gui:radio"
1383 flash="$pwd/rombox.iriver"
1384 plugins="yes"
1385 swcodec="yes"
1386 # toolset is the tools within the tools directory that we build for
1387 # this particular target.
1388 toolset=$iriverbitmaptools
1389 t_cpu="coldfire"
1390 t_manufacturer="iriver"
1391 t_model="h100"
1394 11|iriverh300)
1395 target_id=10
1396 modelname="iriverh300"
1397 target="-DIRIVER_H300"
1398 memory=32 # always
1399 coldfirecc
1400 tool="$rootdir/tools/scramble -add=h300"
1401 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1402 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1403 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1404 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1405 output="rockbox.iriver"
1406 appextra="recorder:gui:radio"
1407 plugins="yes"
1408 swcodec="yes"
1409 # toolset is the tools within the tools directory that we build for
1410 # this particular target.
1411 toolset=$iriverbitmaptools
1412 t_cpu="coldfire"
1413 t_manufacturer="iriver"
1414 t_model="h300"
1417 12|iriverh100)
1418 target_id=11
1419 modelname="iriverh100"
1420 target="-DIRIVER_H100"
1421 memory=16 # always
1422 coldfirecc
1423 tool="$rootdir/tools/scramble -add=h100"
1424 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1425 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1426 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1427 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1428 output="rockbox.iriver"
1429 bootoutput="bootloader.iriver"
1430 appextra="recorder:gui:radio"
1431 flash="$pwd/rombox.iriver"
1432 plugins="yes"
1433 swcodec="yes"
1434 # toolset is the tools within the tools directory that we build for
1435 # this particular target.
1436 toolset=$iriverbitmaptools
1437 t_cpu="coldfire"
1438 t_manufacturer="iriver"
1439 t_model="h100"
1442 13|iriverifp7xx)
1443 target_id=19
1444 modelname="iriverifp7xx"
1445 target="-DIRIVER_IFP7XX"
1446 memory=1
1447 arm7tdmicc short
1448 tool="cp"
1449 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1450 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1451 output="rockbox.wma"
1452 appextra="recorder:gui:radio"
1453 plugins="yes"
1454 swcodec="yes"
1455 # toolset is the tools within the tools directory that we build for
1456 # this particular target.
1457 toolset=$genericbitmaptools
1458 t_cpu="arm"
1459 t_manufacturer="pnx0101"
1460 t_model="iriver-ifp7xx"
1463 14|iriverh10)
1464 target_id=22
1465 modelname="iriverh10"
1466 target="-DIRIVER_H10"
1467 memory=32 # always
1468 arm7tdmicc
1469 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1470 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1471 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1472 output="rockbox.mi4"
1473 appextra="recorder:gui:radio"
1474 plugins="yes"
1475 swcodec="yes"
1476 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1477 bootoutput="H10_20GC.mi4"
1478 # toolset is the tools within the tools directory that we build for
1479 # this particular target.
1480 toolset=$scramblebitmaptools
1481 # architecture, manufacturer and model for the target-tree build
1482 t_cpu="arm"
1483 t_manufacturer="iriver"
1484 t_model="h10"
1487 15|iriverh10_5gb)
1488 target_id=24
1489 modelname="iriverh10_5gb"
1490 target="-DIRIVER_H10_5GB"
1491 memory=32 # always
1492 arm7tdmicc
1493 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1494 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1495 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1496 output="rockbox.mi4"
1497 appextra="recorder:gui:radio"
1498 plugins="yes"
1499 swcodec="yes"
1500 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1501 bootoutput="H10.mi4"
1502 # toolset is the tools within the tools directory that we build for
1503 # this particular target.
1504 toolset=$scramblebitmaptools
1505 # architecture, manufacturer and model for the target-tree build
1506 t_cpu="arm"
1507 t_manufacturer="iriver"
1508 t_model="h10"
1511 20|ipodcolor)
1512 target_id=13
1513 modelname="ipodcolor"
1514 target="-DIPOD_COLOR"
1515 memory=32 # always
1516 arm7tdmicc
1517 tool="$rootdir/tools/scramble -add=ipco"
1518 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1519 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1520 output="rockbox.ipod"
1521 appextra="recorder:gui:radio"
1522 plugins="yes"
1523 swcodec="yes"
1524 bootoutput="bootloader-$modelname.ipod"
1525 # toolset is the tools within the tools directory that we build for
1526 # this particular target.
1527 toolset=$ipodbitmaptools
1528 # architecture, manufacturer and model for the target-tree build
1529 t_cpu="arm"
1530 t_manufacturer="ipod"
1531 t_model="color"
1534 21|ipodnano1g)
1535 target_id=14
1536 modelname="ipodnano1g"
1537 target="-DIPOD_NANO"
1538 memory=32 # always
1539 arm7tdmicc
1540 tool="$rootdir/tools/scramble -add=nano"
1541 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1542 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1543 output="rockbox.ipod"
1544 appextra="recorder:gui:radio"
1545 plugins="yes"
1546 swcodec="yes"
1547 bootoutput="bootloader-$modelname.ipod"
1548 # toolset is the tools within the tools directory that we build for
1549 # this particular target.
1550 toolset=$ipodbitmaptools
1551 # architecture, manufacturer and model for the target-tree build
1552 t_cpu="arm"
1553 t_manufacturer="ipod"
1554 t_model="nano"
1557 22|ipodvideo)
1558 target_id=15
1559 modelname="ipodvideo"
1560 target="-DIPOD_VIDEO"
1561 memory=64 # always. This is reduced at runtime if needed
1562 arm7tdmicc
1563 tool="$rootdir/tools/scramble -add=ipvd"
1564 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1565 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1566 output="rockbox.ipod"
1567 appextra="recorder:gui:radio"
1568 plugins="yes"
1569 swcodec="yes"
1570 bootoutput="bootloader-$modelname.ipod"
1571 # toolset is the tools within the tools directory that we build for
1572 # this particular target.
1573 toolset=$ipodbitmaptools
1574 # architecture, manufacturer and model for the target-tree build
1575 t_cpu="arm"
1576 t_manufacturer="ipod"
1577 t_model="video"
1580 23|ipod3g)
1581 target_id=16
1582 modelname="ipod3g"
1583 target="-DIPOD_3G"
1584 memory=32 # always
1585 arm7tdmicc
1586 tool="$rootdir/tools/scramble -add=ip3g"
1587 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1588 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1589 output="rockbox.ipod"
1590 appextra="recorder:gui:radio"
1591 plugins="yes"
1592 swcodec="yes"
1593 bootoutput="bootloader-$modelname.ipod"
1594 # toolset is the tools within the tools directory that we build for
1595 # this particular target.
1596 toolset=$ipodbitmaptools
1597 # architecture, manufacturer and model for the target-tree build
1598 t_cpu="arm"
1599 t_manufacturer="ipod"
1600 t_model="3g"
1603 24|ipod4g)
1604 target_id=17
1605 modelname="ipod4g"
1606 target="-DIPOD_4G"
1607 memory=32 # always
1608 arm7tdmicc
1609 tool="$rootdir/tools/scramble -add=ip4g"
1610 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1611 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1612 output="rockbox.ipod"
1613 appextra="recorder:gui:radio"
1614 plugins="yes"
1615 swcodec="yes"
1616 bootoutput="bootloader-$modelname.ipod"
1617 # toolset is the tools within the tools directory that we build for
1618 # this particular target.
1619 toolset=$ipodbitmaptools
1620 # architecture, manufacturer and model for the target-tree build
1621 t_cpu="arm"
1622 t_manufacturer="ipod"
1623 t_model="4g"
1626 25|ipodmini1g)
1627 target_id=18
1628 modelname="ipodmini1g"
1629 target="-DIPOD_MINI"
1630 memory=32 # always
1631 arm7tdmicc
1632 tool="$rootdir/tools/scramble -add=mini"
1633 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1634 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1635 output="rockbox.ipod"
1636 appextra="recorder:gui:radio"
1637 plugins="yes"
1638 swcodec="yes"
1639 bootoutput="bootloader-$modelname.ipod"
1640 # toolset is the tools within the tools directory that we build for
1641 # this particular target.
1642 toolset=$ipodbitmaptools
1643 # architecture, manufacturer and model for the target-tree build
1644 t_cpu="arm"
1645 t_manufacturer="ipod"
1646 t_model="mini"
1649 26|ipodmini2g)
1650 target_id=21
1651 modelname="ipodmini2g"
1652 target="-DIPOD_MINI2G"
1653 memory=32 # always
1654 arm7tdmicc
1655 tool="$rootdir/tools/scramble -add=mn2g"
1656 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1657 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1658 output="rockbox.ipod"
1659 appextra="recorder:gui:radio"
1660 plugins="yes"
1661 swcodec="yes"
1662 bootoutput="bootloader-$modelname.ipod"
1663 # toolset is the tools within the tools directory that we build for
1664 # this particular target.
1665 toolset=$ipodbitmaptools
1666 # architecture, manufacturer and model for the target-tree build
1667 t_cpu="arm"
1668 t_manufacturer="ipod"
1669 t_model="mini2g"
1672 27|ipod1g2g)
1673 target_id=29
1674 modelname="ipod1g2g"
1675 target="-DIPOD_1G2G"
1676 memory=32 # always
1677 arm7tdmicc
1678 tool="$rootdir/tools/scramble -add=1g2g"
1679 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1680 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1681 output="rockbox.ipod"
1682 appextra="recorder:gui:radio"
1683 plugins="yes"
1684 swcodec="yes"
1685 bootoutput="bootloader-$modelname.ipod"
1686 # toolset is the tools within the tools directory that we build for
1687 # this particular target.
1688 toolset=$ipodbitmaptools
1689 # architecture, manufacturer and model for the target-tree build
1690 t_cpu="arm"
1691 t_manufacturer="ipod"
1692 t_model="1g2g"
1695 28|ipodnano2g)
1696 target_id=62
1697 modelname="ipodnano2g"
1698 target="-DIPOD_NANO2G"
1699 memory=32 # always
1700 arm940tcc
1701 tool="$rootdir/tools/scramble -add=nn2g"
1702 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1703 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1704 output="rockbox.ipod"
1705 appextra="recorder:gui:radio"
1706 plugins="yes"
1707 swcodec="yes"
1708 bootoutput="bootloader-$modelname.ipod"
1709 # toolset is the tools within the tools directory that we build for
1710 # this particular target.
1711 toolset=$ipodbitmaptools
1712 # architecture, manufacturer and model for the target-tree build
1713 t_cpu="arm"
1714 t_manufacturer="s5l8700"
1715 t_model="ipodnano2g"
1718 29|ipod6g)
1719 target_id=71
1720 modelname="ipod6g"
1721 target="-DIPOD_6G"
1722 memory=64 # always
1723 arm926ejscc
1724 tool="$rootdir/tools/scramble -add=ip6g"
1725 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1726 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1727 output="rockbox.ipod"
1728 appextra="recorder:gui:radio"
1729 plugins="yes"
1730 swcodec="yes"
1731 bootoutput="bootloader-$modelname.ipod"
1732 # toolset is the tools within the tools directory that we build for
1733 # this particular target.
1734 toolset=$ipodbitmaptools
1735 # architecture, manufacturer and model for the target-tree build
1736 t_cpu="arm"
1737 t_manufacturer="s5l8702"
1738 t_model="ipod6g"
1741 30|iaudiox5)
1742 target_id=12
1743 modelname="iaudiox5"
1744 target="-DIAUDIO_X5"
1745 memory=16 # always
1746 coldfirecc
1747 tool="$rootdir/tools/scramble -add=iax5"
1748 boottool="$rootdir/tools/scramble -iaudiox5"
1749 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1750 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1751 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1752 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1753 output="rockbox.iaudio"
1754 bootoutput="x5_fw.bin"
1755 appextra="recorder:gui:radio"
1756 plugins="yes"
1757 swcodec="yes"
1758 # toolset is the tools within the tools directory that we build for
1759 # this particular target.
1760 toolset="$iaudiobitmaptools"
1761 # architecture, manufacturer and model for the target-tree build
1762 t_cpu="coldfire"
1763 t_manufacturer="iaudio"
1764 t_model="x5"
1767 31|iaudiom5)
1768 target_id=28
1769 modelname="iaudiom5"
1770 target="-DIAUDIO_M5"
1771 memory=16 # always
1772 coldfirecc
1773 tool="$rootdir/tools/scramble -add=iam5"
1774 boottool="$rootdir/tools/scramble -iaudiom5"
1775 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1776 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1777 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1778 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1779 output="rockbox.iaudio"
1780 bootoutput="m5_fw.bin"
1781 appextra="recorder:gui:radio"
1782 plugins="yes"
1783 swcodec="yes"
1784 # toolset is the tools within the tools directory that we build for
1785 # this particular target.
1786 toolset="$iaudiobitmaptools"
1787 # architecture, manufacturer and model for the target-tree build
1788 t_cpu="coldfire"
1789 t_manufacturer="iaudio"
1790 t_model="m5"
1793 32|iaudio7)
1794 target_id=32
1795 modelname="iaudio7"
1796 target="-DIAUDIO_7"
1797 memory=16 # always
1798 arm946cc
1799 tool="$rootdir/tools/scramble -add=i7"
1800 boottool="$rootdir/tools/scramble -tcc=crc"
1801 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1802 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1803 output="rockbox.iaudio"
1804 appextra="recorder:gui:radio"
1805 plugins="yes"
1806 swcodec="yes"
1807 bootoutput="I7_FW.BIN"
1808 # toolset is the tools within the tools directory that we build for
1809 # this particular target.
1810 toolset="$tccbitmaptools"
1811 # architecture, manufacturer and model for the target-tree build
1812 t_cpu="arm"
1813 t_manufacturer="tcc77x"
1814 t_model="iaudio7"
1817 33|cowond2)
1818 target_id=34
1819 modelname="cowond2"
1820 target="-DCOWON_D2"
1821 memory=32
1822 arm926ejscc
1823 tool="$rootdir/tools/scramble -add=d2"
1824 boottool="cp "
1825 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1826 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1827 output="rockbox.d2"
1828 bootoutput="bootloader-cowond2.bin"
1829 appextra="recorder:gui:radio"
1830 plugins="yes"
1831 swcodec="yes"
1832 toolset="$tccbitmaptools"
1833 # architecture, manufacturer and model for the target-tree build
1834 t_cpu="arm"
1835 t_manufacturer="tcc780x"
1836 t_model="cowond2"
1839 34|iaudiom3)
1840 target_id=37
1841 modelname="iaudiom3"
1842 target="-DIAUDIO_M3"
1843 memory=16 # always
1844 coldfirecc
1845 tool="$rootdir/tools/scramble -add=iam3"
1846 boottool="$rootdir/tools/scramble -iaudiom3"
1847 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1848 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1849 output="rockbox.iaudio"
1850 bootoutput="cowon_m3.bin"
1851 appextra="recorder:gui:radio"
1852 plugins="yes"
1853 swcodec="yes"
1854 # toolset is the tools within the tools directory that we build for
1855 # this particular target.
1856 toolset="$iaudiobitmaptools"
1857 # architecture, manufacturer and model for the target-tree build
1858 t_cpu="coldfire"
1859 t_manufacturer="iaudio"
1860 t_model="m3"
1863 40|gigabeatfx)
1864 target_id=20
1865 modelname="gigabeatfx"
1866 target="-DGIGABEAT_F"
1867 memory=32 # always
1868 arm9tdmicc
1869 tool="$rootdir/tools/scramble -add=giga"
1870 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1871 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1872 output="rockbox.gigabeat"
1873 appextra="recorder:gui:radio"
1874 plugins="yes"
1875 swcodec="yes"
1876 toolset=$gigabeatbitmaptools
1877 boottool="$rootdir/tools/scramble -gigabeat"
1878 bootoutput="FWIMG01.DAT"
1879 # architecture, manufacturer and model for the target-tree build
1880 t_cpu="arm"
1881 t_manufacturer="s3c2440"
1882 t_model="gigabeat-fx"
1885 41|gigabeats)
1886 target_id=26
1887 modelname="gigabeats"
1888 target="-DGIGABEAT_S"
1889 memory=64
1890 arm1136jfscc
1891 tool="$rootdir/tools/scramble -add=gigs"
1892 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1893 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1894 output="rockbox.gigabeat"
1895 appextra="recorder:gui:radio"
1896 plugins="yes"
1897 swcodec="yes"
1898 toolset="$gigabeatbitmaptools"
1899 boottool="$rootdir/tools/scramble -gigabeats"
1900 bootoutput="nk.bin"
1901 # architecture, manufacturer and model for the target-tree build
1902 t_cpu="arm"
1903 t_manufacturer="imx31"
1904 t_model="gigabeat-s"
1907 70|mrobe500)
1908 target_id=36
1909 modelname="mrobe500"
1910 target="-DMROBE_500"
1911 memory=64 # always
1912 arm926ejscc
1913 tool="$rootdir/tools/scramble -add=m500"
1914 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1915 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
1916 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1917 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1918 output="rockbox.mrobe500"
1919 appextra="recorder:gui:radio"
1920 plugins="yes"
1921 swcodec="yes"
1922 toolset=$gigabeatbitmaptools
1923 boottool="cp "
1924 bootoutput="rockbox.mrboot"
1925 # architecture, manufacturer and model for the target-tree build
1926 t_cpu="arm"
1927 t_manufacturer="tms320dm320"
1928 t_model="mrobe-500"
1931 71|mrobe100)
1932 target_id=33
1933 modelname="mrobe100"
1934 target="-DMROBE_100"
1935 memory=32 # always
1936 arm7tdmicc
1937 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1938 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1939 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1940 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1941 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1942 output="rockbox.mi4"
1943 appextra="recorder:gui:radio"
1944 plugins="yes"
1945 swcodec="yes"
1946 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1947 bootoutput="pp5020.mi4"
1948 # toolset is the tools within the tools directory that we build for
1949 # this particular target.
1950 toolset=$scramblebitmaptools
1951 # architecture, manufacturer and model for the target-tree build
1952 t_cpu="arm"
1953 t_manufacturer="olympus"
1954 t_model="mrobe-100"
1957 80|logikdax)
1958 target_id=31
1959 modelname="logikdax"
1960 target="-DLOGIK_DAX"
1961 memory=2 # always
1962 arm946cc
1963 tool="$rootdir/tools/scramble -add=ldax"
1964 boottool="$rootdir/tools/scramble -tcc=crc"
1965 bootoutput="player.rom"
1966 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1967 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1968 output="rockbox.logik"
1969 appextra="recorder:gui:radio"
1970 plugins=""
1971 swcodec="yes"
1972 # toolset is the tools within the tools directory that we build for
1973 # this particular target.
1974 toolset=$tccbitmaptools
1975 # architecture, manufacturer and model for the target-tree build
1976 t_cpu="arm"
1977 t_manufacturer="tcc77x"
1978 t_model="logikdax"
1981 90|zenvisionm30gb)
1982 target_id=35
1983 modelname="zenvisionm30gb"
1984 target="-DCREATIVE_ZVM"
1985 memory=64
1986 arm926ejscc
1987 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1988 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1989 tool="$rootdir/tools/scramble -creative=zvm"
1990 USE_ELF="yes"
1991 output="rockbox.zvm"
1992 appextra="recorder:gui:radio"
1993 plugins="yes"
1994 swcodec="yes"
1995 toolset=$ipodbitmaptools
1996 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1997 bootoutput="rockbox.zvmboot"
1998 # architecture, manufacturer and model for the target-tree build
1999 t_cpu="arm"
2000 t_manufacturer="tms320dm320"
2001 t_model="creative-zvm"
2004 91|zenvisionm60gb)
2005 target_id=40
2006 modelname="zenvisionm60gb"
2007 target="-DCREATIVE_ZVM60GB"
2008 memory=64
2009 arm926ejscc
2010 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2011 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2012 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2013 USE_ELF="yes"
2014 output="rockbox.zvm60"
2015 appextra="recorder:gui:radio"
2016 plugins="yes"
2017 swcodec="yes"
2018 toolset=$ipodbitmaptools
2019 boottool="$rootdir/tools/scramble -creative=zvm60"
2020 bootoutput="rockbox.zvm60boot"
2021 # architecture, manufacturer and model for the target-tree build
2022 t_cpu="arm"
2023 t_manufacturer="tms320dm320"
2024 t_model="creative-zvm"
2027 92|zenvision)
2028 target_id=39
2029 modelname="zenvision"
2030 target="-DCREATIVE_ZV"
2031 memory=64
2032 arm926ejscc
2033 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2034 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2035 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2036 USE_ELF="yes"
2037 output="rockbox.zv"
2038 appextra="recorder:gui:radio"
2039 plugins=""
2040 swcodec="yes"
2041 toolset=$ipodbitmaptools
2042 boottool="$rootdir/tools/scramble -creative=zenvision"
2043 bootoutput="rockbox.zvboot"
2044 # architecture, manufacturer and model for the target-tree build
2045 t_cpu="arm"
2046 t_manufacturer="tms320dm320"
2047 t_model="creative-zvm"
2050 50|sansae200)
2051 target_id=23
2052 modelname="sansae200"
2053 target="-DSANSA_E200"
2054 memory=32 # supposedly
2055 arm7tdmicc
2056 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2057 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2058 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2059 output="rockbox.mi4"
2060 appextra="recorder:gui:radio"
2061 plugins="yes"
2062 swcodec="yes"
2063 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2064 bootoutput="PP5022.mi4"
2065 # toolset is the tools within the tools directory that we build for
2066 # this particular target.
2067 toolset=$scramblebitmaptools
2068 # architecture, manufacturer and model for the target-tree build
2069 t_cpu="arm"
2070 t_manufacturer="sandisk"
2071 t_model="sansa-e200"
2074 51|sansae200r)
2075 # the e200R model is pretty much identical to the e200, it only has a
2076 # different option to the scramble tool when building a bootloader and
2077 # makes the bootloader output file name in all lower case.
2078 target_id=27
2079 modelname="sansae200r"
2080 target="-DSANSA_E200"
2081 memory=32 # supposedly
2082 arm7tdmicc
2083 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2084 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2085 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2086 output="rockbox.mi4"
2087 appextra="recorder:gui:radio"
2088 plugins="yes"
2089 swcodec="yes"
2090 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2091 bootoutput="pp5022.mi4"
2092 # toolset is the tools within the tools directory that we build for
2093 # this particular target.
2094 toolset=$scramblebitmaptools
2095 # architecture, manufacturer and model for the target-tree build
2096 t_cpu="arm"
2097 t_manufacturer="sandisk"
2098 t_model="sansa-e200"
2101 52|sansac200)
2102 target_id=30
2103 modelname="sansac200"
2104 target="-DSANSA_C200"
2105 memory=32 # supposedly
2106 arm7tdmicc
2107 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2108 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2109 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2110 output="rockbox.mi4"
2111 appextra="recorder:gui:radio"
2112 plugins="yes"
2113 swcodec="yes"
2114 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2115 bootoutput="firmware.mi4"
2116 # toolset is the tools within the tools directory that we build for
2117 # this particular target.
2118 toolset=$scramblebitmaptools
2119 # architecture, manufacturer and model for the target-tree build
2120 t_cpu="arm"
2121 t_manufacturer="sandisk"
2122 t_model="sansa-c200"
2125 53|sansam200)
2126 target_id=48
2127 modelname="sansam200"
2128 target="-DSANSA_M200"
2129 memory=1 # always
2130 arm946cc
2131 tool="$rootdir/tools/scramble -add=m200"
2132 boottool="$rootdir/tools/scramble -tcc=crc"
2133 bootoutput="player.rom"
2134 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2135 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2136 output="rockbox.m200"
2137 appextra="recorder:gui:radio"
2138 plugins=""
2139 swcodec="yes"
2140 # toolset is the tools within the tools directory that we build for
2141 # this particular target.
2142 toolset=$tccbitmaptools
2143 # architecture, manufacturer and model for the target-tree build
2144 t_cpu="arm"
2145 t_manufacturer="tcc77x"
2146 t_model="m200"
2149 54|sansac100)
2150 target_id=42
2151 modelname="sansac100"
2152 target="-DSANSA_C100"
2153 memory=2
2154 arm946cc
2155 tool="$rootdir/tools/scramble -add=c100"
2156 boottool="$rootdir/tools/scramble -tcc=crc"
2157 bootoutput="player.rom"
2158 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2159 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2160 output="rockbox.c100"
2161 appextra="recorder:gui:radio"
2162 plugins=""
2163 swcodec="yes"
2164 # toolset is the tools within the tools directory that we build for
2165 # this particular target.
2166 toolset=$tccbitmaptools
2167 # architecture, manufacturer and model for the target-tree build
2168 t_cpu="arm"
2169 t_manufacturer="tcc77x"
2170 t_model="c100"
2173 55|sansaclip)
2174 target_id=50
2175 modelname="sansaclip"
2176 target="-DSANSA_CLIP"
2177 memory=2
2178 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2179 bmp2rb_native="$bmp2rb_mono"
2180 tool="$rootdir/tools/scramble -add=clip"
2181 output="rockbox.sansa"
2182 bootoutput="bootloader-clip.sansa"
2183 appextra="recorder:gui:radio"
2184 plugins="yes"
2185 swcodec="yes"
2186 toolset=$scramblebitmaptools
2187 t_cpu="arm"
2188 t_manufacturer="as3525"
2189 t_model="sansa-clip"
2190 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2191 arm9tdmicc
2192 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2196 56|sansae200v2)
2197 target_id=51
2198 modelname="sansae200v2"
2199 target="-DSANSA_E200V2"
2200 memory=8
2201 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2202 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2203 tool="$rootdir/tools/scramble -add=e2v2"
2204 output="rockbox.sansa"
2205 bootoutput="bootloader-e200v2.sansa"
2206 appextra="recorder:gui:radio"
2207 plugins="yes"
2208 swcodec="yes"
2209 toolset=$scramblebitmaptools
2210 t_cpu="arm"
2211 t_manufacturer="as3525"
2212 t_model="sansa-e200v2"
2213 arm9tdmicc
2217 57|sansam200v4)
2218 target_id=52
2219 modelname="sansam200v4"
2220 target="-DSANSA_M200V4"
2221 memory=2
2222 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2223 bmp2rb_native="$bmp2rb_mono"
2224 tool="$rootdir/tools/scramble -add=m2v4"
2225 output="rockbox.sansa"
2226 bootoutput="bootloader-m200v4.sansa"
2227 appextra="recorder:gui:radio"
2228 plugins="yes"
2229 swcodec="yes"
2230 toolset=$scramblebitmaptools
2231 t_cpu="arm"
2232 t_manufacturer="as3525"
2233 t_model="sansa-m200v4"
2234 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2235 arm9tdmicc
2236 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2240 58|sansafuze)
2241 target_id=53
2242 modelname="sansafuze"
2243 target="-DSANSA_FUZE"
2244 memory=8
2245 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2246 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2247 tool="$rootdir/tools/scramble -add=fuze"
2248 output="rockbox.sansa"
2249 bootoutput="bootloader-fuze.sansa"
2250 appextra="recorder:gui:radio"
2251 plugins="yes"
2252 swcodec="yes"
2253 toolset=$scramblebitmaptools
2254 t_cpu="arm"
2255 t_manufacturer="as3525"
2256 t_model="sansa-fuze"
2257 arm9tdmicc
2261 59|sansac200v2)
2262 target_id=55
2263 modelname="sansac200v2"
2264 target="-DSANSA_C200V2"
2265 memory=2 # as per OF diagnosis mode
2266 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2267 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2268 tool="$rootdir/tools/scramble -add=c2v2"
2269 output="rockbox.sansa"
2270 bootoutput="bootloader-c200v2.sansa"
2271 appextra="recorder:gui:radio"
2272 plugins="yes"
2273 swcodec="yes"
2274 # toolset is the tools within the tools directory that we build for
2275 # this particular target.
2276 toolset=$scramblebitmaptools
2277 # architecture, manufacturer and model for the target-tree build
2278 t_cpu="arm"
2279 t_manufacturer="as3525"
2280 t_model="sansa-c200v2"
2281 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2282 arm9tdmicc
2283 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2286 60|sansaclipv2)
2287 target_id=60
2288 modelname="sansaclipv2"
2289 target="-DSANSA_CLIPV2"
2290 memory=8
2291 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2292 bmp2rb_native="$bmp2rb_mono"
2293 tool="$rootdir/tools/scramble -add=clv2"
2294 output="rockbox.sansa"
2295 bootoutput="bootloader-clipv2.sansa"
2296 appextra="recorder:gui:radio"
2297 plugins="yes"
2298 swcodec="yes"
2299 toolset=$scramblebitmaptools
2300 t_cpu="arm"
2301 t_manufacturer="as3525"
2302 t_model="sansa-clipv2"
2303 arm926ejscc
2306 61|sansaview)
2307 echo "Sansa View is not yet supported!"
2308 exit 1
2309 target_id=63
2310 modelname="sansaview"
2311 target="-DSANSA_VIEW"
2312 memory=32
2313 arm1176jzscc
2314 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2315 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2316 output="rockbox.mi4"
2317 appextra="gui"
2318 plugins=""
2319 swcodec="yes"
2320 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2321 bootoutput="firmware.mi4"
2322 # toolset is the tools within the tools directory that we build for
2323 # this particular target.
2324 toolset=$scramblebitmaptools
2325 t_cpu="arm"
2326 t_manufacturer="sandisk"
2327 t_model="sansa-view"
2330 62|sansaclipplus)
2331 target_id=66
2332 modelname="sansaclipplus"
2333 target="-DSANSA_CLIPPLUS"
2334 memory=8
2335 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2336 bmp2rb_native="$bmp2rb_mono"
2337 tool="$rootdir/tools/scramble -add=cli+"
2338 output="rockbox.sansa"
2339 bootoutput="bootloader-clipplus.sansa"
2340 appextra="recorder:gui:radio"
2341 plugins="yes"
2342 swcodec="yes"
2343 toolset=$scramblebitmaptools
2344 t_cpu="arm"
2345 t_manufacturer="as3525"
2346 t_model="sansa-clipplus"
2347 arm926ejscc
2350 63|sansafuzev2)
2351 target_id=68
2352 modelname="sansafuzev2"
2353 target="-DSANSA_FUZEV2"
2354 memory=8 # not sure
2355 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2356 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2357 tool="$rootdir/tools/scramble -add=fuz2"
2358 output="rockbox.sansa"
2359 bootoutput="bootloader-fuzev2.sansa"
2360 appextra="recorder:gui:radio"
2361 plugins="yes"
2362 swcodec="yes"
2363 toolset=$scramblebitmaptools
2364 t_cpu="arm"
2365 t_manufacturer="as3525"
2366 t_model="sansa-fuzev2"
2367 arm926ejscc
2370 150|tatungtpj1022)
2371 target_id=25
2372 modelname="tatungtpj1022"
2373 target="-DTATUNG_TPJ1022"
2374 memory=32 # always
2375 arm7tdmicc
2376 tool="$rootdir/tools/scramble -add tpj2"
2377 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2378 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2379 output="rockbox.elio"
2380 appextra="recorder:gui:radio"
2381 plugins="yes"
2382 swcodec="yes"
2383 boottool="$rootdir/tools/scramble -mi4v2"
2384 bootoutput="pp5020.mi4"
2385 # toolset is the tools within the tools directory that we build for
2386 # this particular target.
2387 toolset=$scramblebitmaptools
2388 # architecture, manufacturer and model for the target-tree build
2389 t_cpu="arm"
2390 t_manufacturer="tatung"
2391 t_model="tpj1022"
2394 100|gogearsa9200)
2395 target_id=41
2396 modelname="gogearsa9200"
2397 target="-DPHILIPS_SA9200"
2398 memory=32 # supposedly
2399 arm7tdmicc
2400 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2401 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2402 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2403 output="rockbox.mi4"
2404 appextra="recorder:gui:radio"
2405 plugins="yes"
2406 swcodec="yes"
2407 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2408 bootoutput="FWImage.ebn"
2409 # toolset is the tools within the tools directory that we build for
2410 # this particular target.
2411 toolset=$scramblebitmaptools
2412 # architecture, manufacturer and model for the target-tree build
2413 t_cpu="arm"
2414 t_manufacturer="philips"
2415 t_model="sa9200"
2418 101|gogearhdd1630)
2419 target_id=43
2420 modelname="gogearhdd1630"
2421 target="-DPHILIPS_HDD1630"
2422 memory=32 # supposedly
2423 arm7tdmicc
2424 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2425 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2426 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2427 output="rockbox.mi4"
2428 appextra="recorder:gui:radio"
2429 plugins="yes"
2430 swcodec="yes"
2431 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2432 bootoutput="FWImage.ebn"
2433 # toolset is the tools within the tools directory that we build for
2434 # this particular target.
2435 toolset=$scramblebitmaptools
2436 # architecture, manufacturer and model for the target-tree build
2437 t_cpu="arm"
2438 t_manufacturer="philips"
2439 t_model="hdd1630"
2442 102|gogearhdd6330)
2443 target_id=65
2444 modelname="gogearhdd6330"
2445 target="-DPHILIPS_HDD6330"
2446 memory=64 # always
2447 arm7tdmicc
2448 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2449 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2450 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2451 output="rockbox.mi4"
2452 appextra="recorder:gui:radio"
2453 plugins="yes"
2454 swcodec="yes"
2455 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2456 bootoutput="FWImage.ebn"
2457 # toolset is the tools within the tools directory that we build for
2458 # this particular target.
2459 toolset=$scramblebitmaptools
2460 # architecture, manufacturer and model for the target-tree build
2461 t_cpu="arm"
2462 t_manufacturer="philips"
2463 t_model="hdd6330"
2466 110|meizum6sl)
2467 target_id=49
2468 modelname="meizum6sl"
2469 target="-DMEIZU_M6SL"
2470 memory=16 # always
2471 arm940tbecc
2472 tool="cp"
2473 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2474 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2475 output="rockbox.meizu"
2476 appextra="recorder:gui:radio"
2477 plugins="no" #FIXME
2478 swcodec="yes"
2479 toolset=$genericbitmaptools
2480 boottool="cp"
2481 bootoutput="rockboot.ebn"
2482 # architecture, manufacturer and model for the target-tree build
2483 t_cpu="arm"
2484 t_manufacturer="s5l8700"
2485 t_model="meizu-m6sl"
2488 111|meizum6sp)
2489 target_id=46
2490 modelname="meizum6sp"
2491 target="-DMEIZU_M6SP"
2492 memory=16 # always
2493 arm940tbecc
2494 tool="cp"
2495 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2496 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2497 output="rockbox.meizu"
2498 appextra="recorder:gui:radio"
2499 plugins="no" #FIXME
2500 swcodec="yes"
2501 toolset=$genericbitmaptools
2502 boottool="cp"
2503 bootoutput="rockboot.ebn"
2504 # architecture, manufacturer and model for the target-tree build
2505 t_cpu="arm"
2506 t_manufacturer="s5l8700"
2507 t_model="meizu-m6sp"
2510 112|meizum3)
2511 target_id=47
2512 modelname="meizum3"
2513 target="-DMEIZU_M3"
2514 memory=16 # always
2515 arm940tbecc
2516 tool="cp"
2517 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2518 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2519 output="rockbox.meizu"
2520 appextra="recorder:gui:radio"
2521 plugins="no" #FIXME
2522 swcodec="yes"
2523 toolset=$genericbitmaptools
2524 boottool="cp"
2525 bootoutput="rockboot.ebn"
2526 # architecture, manufacturer and model for the target-tree build
2527 t_cpu="arm"
2528 t_manufacturer="s5l8700"
2529 t_model="meizu-m3"
2532 120|ondavx747)
2533 target_id=45
2534 modelname="ondavx747"
2535 target="-DONDA_VX747"
2536 memory=16
2537 mipselcc
2538 tool="$rootdir/tools/scramble -add=x747"
2539 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2540 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2541 output="rockbox.vx747"
2542 appextra="recorder:gui:radio"
2543 plugins="yes"
2544 swcodec="yes"
2545 toolset=$genericbitmaptools
2546 boottool="$rootdir/tools/scramble -ccpmp"
2547 bootoutput="ccpmp.bin"
2548 # architecture, manufacturer and model for the target-tree build
2549 t_cpu="mips"
2550 t_manufacturer="ingenic_jz47xx"
2551 t_model="onda_vx747"
2554 121|ondavx767)
2555 target_id=64
2556 modelname="ondavx767"
2557 target="-DONDA_VX767"
2558 memory=16 #FIXME
2559 mipselcc
2560 tool="cp"
2561 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2562 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2563 output="rockbox.vx767"
2564 appextra="recorder:gui:radio"
2565 plugins="" #FIXME
2566 swcodec="yes"
2567 toolset=$genericbitmaptools
2568 boottool="$rootdir/tools/scramble -ccpmp"
2569 bootoutput="ccpmp.bin"
2570 # architecture, manufacturer and model for the target-tree build
2571 t_cpu="mips"
2572 t_manufacturer="ingenic_jz47xx"
2573 t_model="onda_vx767"
2576 122|ondavx747p)
2577 target_id=54
2578 modelname="ondavx747p"
2579 target="-DONDA_VX747P"
2580 memory=16
2581 mipselcc
2582 tool="$rootdir/tools/scramble -add=747p"
2583 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2584 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2585 output="rockbox.vx747p"
2586 appextra="recorder:gui:radio"
2587 plugins="yes"
2588 swcodec="yes"
2589 toolset=$genericbitmaptools
2590 boottool="$rootdir/tools/scramble -ccpmp"
2591 bootoutput="ccpmp.bin"
2592 # architecture, manufacturer and model for the target-tree build
2593 t_cpu="mips"
2594 t_manufacturer="ingenic_jz47xx"
2595 t_model="onda_vx747"
2598 123|ondavx777)
2599 target_id=61
2600 modelname="ondavx777"
2601 target="-DONDA_VX777"
2602 memory=16
2603 mipselcc
2604 tool="$rootdir/tools/scramble -add=x777"
2605 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2606 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2607 output="rockbox.vx777"
2608 appextra="recorder:gui:radio"
2609 plugins="yes"
2610 swcodec="yes"
2611 toolset=$genericbitmaptools
2612 boottool="$rootdir/tools/scramble -ccpmp"
2613 bootoutput="ccpmp.bin"
2614 # architecture, manufacturer and model for the target-tree build
2615 t_cpu="mips"
2616 t_manufacturer="ingenic_jz47xx"
2617 t_model="onda_vx747"
2620 130|lyreproto1)
2621 target_id=56
2622 modelname="lyreproto1"
2623 target="-DLYRE_PROTO1"
2624 memory=64
2625 arm926ejscc
2626 tool="cp"
2627 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2628 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2629 output="rockbox.lyre"
2630 appextra="recorder:gui:radio"
2631 plugins=""
2632 swcodec="yes"
2633 toolset=$scramblebitmaptools
2634 boottool="cp"
2635 bootoutput="bootloader-proto1.lyre"
2636 # architecture, manufacturer and model for the target-tree build
2637 t_cpu="arm"
2638 t_manufacturer="at91sam"
2639 t_model="lyre_proto1"
2642 131|mini2440)
2643 target_id=99
2644 modelname="mini2440"
2645 target="-DMINI2440"
2646 memory=64
2647 arm9tdmicc
2648 tool="$rootdir/tools/scramble -add=m244"
2649 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2650 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2651 output="rockbox.mini2440"
2652 appextra="recorder:gui:radio"
2653 plugins=""
2654 swcodec="yes"
2655 toolset=$scramblebitmaptools
2656 boottool="cp"
2657 bootoutput="bootloader-mini2440.lyre"
2658 # architecture, manufacturer and model for the target-tree build
2659 t_cpu="arm"
2660 t_manufacturer="s3c2440"
2661 t_model="mini2440"
2664 140|samsungyh820)
2665 target_id=57
2666 modelname="samsungyh820"
2667 target="-DSAMSUNG_YH820"
2668 memory=32 # always
2669 arm7tdmicc
2670 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2671 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2672 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2673 output="rockbox.mi4"
2674 appextra="recorder:gui:radio"
2675 plugins="yes"
2676 swcodec="yes"
2677 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2678 bootoutput="FW_YH820.mi4"
2679 # toolset is the tools within the tools directory that we build for
2680 # this particular target.
2681 toolset=$scramblebitmaptools
2682 # architecture, manufacturer and model for the target-tree build
2683 t_cpu="arm"
2684 t_manufacturer="samsung"
2685 t_model="yh820"
2688 141|samsungyh920)
2689 target_id=58
2690 modelname="samsungyh920"
2691 target="-DSAMSUNG_YH920"
2692 memory=32 # always
2693 arm7tdmicc
2694 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2695 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2696 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2697 output="rockbox.mi4"
2698 appextra="recorder:gui:radio"
2699 plugins="yes"
2700 swcodec="yes"
2701 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2702 bootoutput="PP5020.mi4"
2703 # toolset is the tools within the tools directory that we build for
2704 # this particular target.
2705 toolset=$scramblebitmaptools
2706 # architecture, manufacturer and model for the target-tree build
2707 t_cpu="arm"
2708 t_manufacturer="samsung"
2709 t_model="yh920"
2712 142|samsungyh925)
2713 target_id=59
2714 modelname="samsungyh925"
2715 target="-DSAMSUNG_YH925"
2716 memory=32 # always
2717 arm7tdmicc
2718 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2719 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2720 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2721 output="rockbox.mi4"
2722 appextra="recorder:gui:radio"
2723 plugins="yes"
2724 swcodec="yes"
2725 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2726 bootoutput="FW_YH925.mi4"
2727 # toolset is the tools within the tools directory that we build for
2728 # this particular target.
2729 toolset=$scramblebitmaptools
2730 # architecture, manufacturer and model for the target-tree build
2731 t_cpu="arm"
2732 t_manufacturer="samsung"
2733 t_model="yh925"
2736 143|samsungyps3)
2737 target_id=72
2738 modelname="samsungyps3"
2739 target="-DSAMSUNG_YPS3"
2740 memory=16 # always
2741 arm940tbecc
2742 tool="cp"
2743 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2744 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2745 output="rockbox.yps3"
2746 appextra="recorder:gui:radio"
2747 plugins="no" #FIXME
2748 swcodec="yes"
2749 toolset=$genericbitmaptools
2750 boottool="cp"
2751 bootoutput="rockboot.ebn"
2752 # architecture, manufacturer and model for the target-tree build
2753 t_cpu="arm"
2754 t_manufacturer="s5l8700"
2755 t_model="yps3"
2758 160|vibe500)
2759 target_id=67
2760 modelname="vibe500"
2761 target="-DPBELL_VIBE500"
2762 memory=32 # always
2763 arm7tdmicc
2764 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2765 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2766 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2767 output="rockbox.mi4"
2768 appextra="recorder:gui:radio"
2769 plugins="yes"
2770 swcodec="yes"
2771 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2772 bootoutput="jukebox.mi4"
2773 # toolset is the tools within the tools directory that we build for
2774 # this particular target.
2775 toolset=$scramblebitmaptools
2776 # architecture, manufacturer and model for the target-tree build
2777 t_cpu="arm"
2778 t_manufacturer="pbell"
2779 t_model="vibe500"
2782 170|mpiohd200)
2783 target_id=69
2784 modelname="mpiohd200"
2785 target="-DMPIO_HD200"
2786 memory=16 # always
2787 coldfirecc
2788 tool="$rootdir/tools/scramble -add=hd20"
2789 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2790 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2791 output="rockbox.mpio"
2792 bootoutput="bootloader.mpio"
2793 appextra="recorder:gui:radio"
2794 plugins="yes"
2795 swcodec="yes"
2796 # toolset is the tools within the tools directory that we build for
2797 # this particular target.
2798 toolset="$genericbitmaptools"
2799 # architecture, manufacturer and model for the target-tree build
2800 t_cpu="coldfire"
2801 t_manufacturer="mpio"
2802 t_model="hd200"
2805 171|mpiohd300)
2806 target_id=70
2807 modelname="mpiohd300"
2808 target="-DMPIO_HD300"
2809 memory=16 # always
2810 coldfirecc
2811 tool="$rootdir/tools/scramble -add=hd30"
2812 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2813 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2814 output="rockbox.mpio"
2815 bootoutput="bootloader.mpio"
2816 appextra="recorder:gui:radio"
2817 plugins="yes"
2818 swcodec="yes"
2819 # toolset is the tools within the tools directory that we build for
2820 # this particular target.
2821 toolset="$genericbitmaptools"
2822 # architecture, manufacturer and model for the target-tree build
2823 t_cpu="coldfire"
2824 t_manufacturer="mpio"
2825 t_model="hd300"
2828 200|sdlapp)
2829 target_id=73
2830 modelname="application"
2831 app_modelname="sdlapp"
2832 target="-DAPPLICATION"
2833 app_set_paths
2834 app_set_lcd_size
2835 memory=8
2836 uname=`uname`
2837 simcc "sdl-app"
2838 tool="cp "
2839 boottool="cp "
2840 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2841 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2842 output="rockbox"
2843 bootoutput="rockbox"
2844 appextra="recorder:gui:radio"
2845 plugins=""
2846 swcodec="yes"
2847 # architecture, manufacturer and model for the target-tree build
2848 t_cpu="hosted"
2849 t_manufacturer="sdl"
2850 t_model="app"
2853 201|android)
2854 target_id=74
2855 modelname="application"
2856 app_modelname="android"
2857 target="-DAPPLICATION"
2858 app_type="android"
2859 app_set_lcd_size
2860 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
2861 bindir="/data/data/org.rockbox/lib"
2862 libdir="/data/data/org.rockbox/app_rockbox"
2863 memory=8
2864 uname=`uname`
2865 androidcc
2866 tool="cp "
2867 boottool="cp "
2868 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2869 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2870 output="librockbox.so"
2871 bootoutput="librockbox.so"
2872 appextra="recorder:gui:radio"
2873 plugins=""
2874 swcodec="yes"
2875 # architecture, manufacturer and model for the target-tree build
2876 t_cpu="hosted"
2877 t_manufacturer="android"
2878 t_model="app"
2881 202|nokian8xx)
2882 target_id=75
2883 modelname="application"
2884 app_modelname="nokian8xx"
2885 app_type="sdl-app"
2886 target="-DAPPLICATION"
2887 app_set_lcd_size 800 480
2888 sharedir="/opt/rockbox/share/rockbox"
2889 bindir="/opt/rockbox/bin"
2890 libdir="/opt/rockbox/lib"
2891 memory=8
2892 uname=`uname`
2893 maemocc 4
2894 tool="cp "
2895 boottool="cp "
2896 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2897 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2898 output="rockbox"
2899 bootoutput="rockbox"
2900 appextra="recorder:gui:radio"
2901 plugins=""
2902 swcodec="yes"
2903 # architecture, manufacturer and model for the target-tree build
2904 t_cpu="hosted"
2905 t_manufacturer="maemo"
2906 t_model="app"
2909 203|nokian900)
2910 target_id=76
2911 modelname="application"
2912 app_modelname="nokian900"
2913 app_type="sdl-app"
2914 target="-DAPPLICATION"
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"