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