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