Compiling rockbox using sebt3 SDK works
[maemo-rb.git] / tools / configure
blob51885698b9c03de0c326fc2c708d01fe621e8162
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 directory $ARG_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 pandoracc () {
591 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
592 # You have to use the sebt3 toolchain:
593 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
595 PNDSDK="/usr/local/angstrom/arm"
596 if [ ! -x $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc ]; then
597 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
598 exit
601 PATH=$PNDSDK/bin:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi/usr/bin
602 PKG_CONFIG_PATH=$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib/pkgconfig
603 LDOPTS="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
604 PKG_CONFIG="pkg-config"
606 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
607 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
608 GCCOPTIMIZE=''
609 LDOPTS="-lm -ldl $LDOPTS"
610 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
611 SHARED_FLAG="-shared"
612 endian="little"
613 thread_support="HAVE_SIGALTSTACK_THREADS"
614 extradefines="$extradefines -DPANDORA"
616 # Set paths to PNDSDK root
617 # GCCOPTS="$GCCOPTS -I$PNDSDK/usr/include -L$PNDSDK/usr/lib -Wl,-rpath,$PNDSDK/usr/lib"
619 # Set up compiler
620 gccchoice="4.3.3"
621 prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
623 # Detect SDL
624 GCCOPTS="$GCCOPTS `$PKG_CONFIG --cflags sdl`"
625 LDOPTS="$LDOPTS `$PKG_CONFIG --libs sdl`"
627 # Compiler options
628 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
629 GCCOPTS="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
630 GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant"
633 androidcc () {
634 if [ -z "$ANDROID_SDK_PATH" ]; then
635 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
636 echo "environment variable point to the root directory of the Android SDK."
637 exit
639 if [ -z "$ANDROID_NDK_PATH" ]; then
640 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
641 echo "environment variable point to the root directory of the Android NDK."
642 exit
644 buildhost=`uname | tr [:upper:] [:lower:]`
645 gccchoice="4.4.3"
646 gcctarget="arm-linux-androideabi-"
647 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
648 PATH=$PATH:$gccprefix/bin
649 prefixtools $gcctarget
650 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
651 GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
652 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
653 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
654 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
655 LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog"
656 extradefines="$extradefines -DANDROID"
657 endian="little"
658 SHARED_FLAG="-shared"
661 whichadvanced () {
662 atype=`echo "$1" | cut -c 2-`
663 ##################################################################
664 # Prompt for specific developer options
666 if [ "$atype" ]; then
667 interact=
668 else
669 interact=1
670 echo ""
671 printf "Enter your developer options (press only enter when done)\n\
672 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
673 (T)est plugins, S(m)all C lib:"
674 if [ "$memory" = "2" ]; then
675 printf ", (8)MB MOD"
677 if [ "$modelname" = "archosplayer" ]; then
678 printf ", Use (A)TA poweroff"
680 if [ "$t_model" = "ondio" ]; then
681 printf ", (B)acklight MOD"
683 if [ "$modelname" = "iaudiom5" ]; then
684 printf ", (F)M radio MOD"
686 if [ "$modelname" = "iriverh120" ]; then
687 printf ", (R)TC MOD"
689 echo ""
692 cont=1
693 while [ $cont = "1" ]; do
695 if [ "$interact" ]; then
696 option=`input`
697 else
698 option=`echo "$atype" | cut -c 1`
701 case $option in
702 [Dd])
703 if [ "yes" = "$profile" ]; then
704 echo "Debug is incompatible with profiling"
705 else
706 echo "DEBUG build enabled"
707 use_debug="yes"
710 [Ll])
711 echo "logf() support enabled"
712 logf="yes"
714 [Mm])
715 echo "Using Rockbox' small C library"
716 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
718 [Tt])
719 echo "Including test plugins"
720 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
722 [Cc])
723 echo "bootchart enabled (logf also enabled)"
724 bootchart="yes"
725 logf="yes"
727 [Ss])
728 echo "Simulator build enabled"
729 simulator="yes"
731 [Pp])
732 if [ "yes" = "$use_debug" ]; then
733 echo "Profiling is incompatible with debug"
734 else
735 echo "Profiling support is enabled"
736 profile="yes"
739 [Vv])
740 echo "Voice build selected"
741 voice="yes"
744 if [ "$memory" = "2" ]; then
745 memory="8"
746 echo "Memory size selected: 8MB"
749 [Aa])
750 if [ "$modelname" = "archosplayer" ]; then
751 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
752 echo "ATA power off enabled"
755 [Bb])
756 if [ "$t_model" = "ondio" ]; then
757 have_backlight="#define HAVE_BACKLIGHT"
758 echo "Backlight functions enabled"
761 [Ff])
762 if [ "$modelname" = "iaudiom5" ]; then
763 have_fmradio_in="#define HAVE_FMRADIO_IN"
764 echo "FM radio functions enabled"
767 [Rr])
768 if [ "$modelname" = "iriverh120" ]; then
769 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
770 have_rtc_alarm="#define HAVE_RTC_ALARM"
771 echo "RTC functions enabled (DS1339/DS3231)"
774 [Ww])
775 echo "Enabling Windows 32 cross-compiling"
776 win32crosscompile="yes"
778 "") # Match enter press when finished with advanced options
779 cont=0
782 echo "[ERROR] Option $option unsupported"
784 esac
785 if [ "$interact" ]; then
786 btype="$btype$option"
787 else
788 atype=`echo "$atype" | cut -c 2-`
789 [ "$atype" ] || cont=0
791 done
792 echo "done"
794 if [ "yes" = "$voice" ]; then
795 # Ask about languages to build
796 picklang
797 voicelanguage=`whichlang`
798 echo "Voice language set to $voicelanguage"
800 # Configure encoder and TTS engine for each language
801 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
802 voiceconfig "$thislang"
803 done
805 if [ "yes" = "$use_debug" ]; then
806 debug="-DDEBUG"
807 GCCOPTS="$GCCOPTS -g -DDEBUG"
809 if [ "yes" = "$logf" ]; then
810 use_logf="#define ROCKBOX_HAS_LOGF 1"
812 if [ "yes" = "$bootchart" ]; then
813 use_bootchart="#define DO_BOOTCHART 1"
815 if [ "yes" = "$simulator" ]; then
816 debug="-DDEBUG"
817 extradefines="$extradefines -DSIMULATOR"
818 archosrom=""
819 flash=""
821 if [ "yes" = "$profile" ]; then
822 extradefines="$extradefines -DRB_PROFILE"
823 PROFILE_OPTS="-finstrument-functions"
827 # Configure voice settings
828 voiceconfig () {
829 thislang=$1
830 if [ ! "$ARG_TTS" ]; then
831 echo "Building $thislang voice for $modelname. Select options"
832 echo ""
835 if [ -n "`findtool flite`" ]; then
836 FLITE="F(l)ite "
837 FLITE_OPTS=""
838 DEFAULT_TTS="flite"
839 DEFAULT_TTS_OPTS=$FLITE_OPTS
840 DEFAULT_NOISEFLOOR="500"
841 DEFAULT_CHOICE="L"
843 if [ -n "`findtool espeak`" ]; then
844 ESPEAK="(e)Speak "
845 ESPEAK_OPTS=""
846 DEFAULT_TTS="espeak"
847 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
848 DEFAULT_NOISEFLOOR="500"
849 DEFAULT_CHOICE="e"
851 if [ -n "`findtool festival`" ]; then
852 FESTIVAL="(F)estival "
853 case "$thislang" in
854 "italiano")
855 FESTIVAL_OPTS="--language italian"
857 "espanol")
858 FESTIVAL_OPTS="--language spanish"
860 "finnish")
861 FESTIVAL_OPTS="--language finnish"
863 "czech")
864 FESTIVAL_OPTS="--language czech"
867 FESTIVAL_OPTS=""
869 esac
870 DEFAULT_TTS="festival"
871 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
872 DEFAULT_NOISEFLOOR="500"
873 DEFAULT_CHOICE="F"
875 if [ -n "`findtool swift`" ]; then
876 SWIFT="S(w)ift "
877 SWIFT_OPTS=""
878 DEFAULT_TTS="swift"
879 DEFAULT_TTS_OPTS=$SWIFT_OPTS
880 DEFAULT_NOISEFLOOR="500"
881 DEFAULT_CHOICE="w"
883 # Allow SAPI if Windows is in use
884 if [ -n "`findtool winver`" ]; then
885 SAPI="(S)API "
886 SAPI_OPTS=""
887 DEFAULT_TTS="sapi"
888 DEFAULT_TTS_OPTS=$SAPI_OPTS
889 DEFAULT_NOISEFLOOR="500"
890 DEFAULT_CHOICE="S"
893 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
894 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
895 exit 3
898 if [ "$ARG_TTS" ]; then
899 option=$ARG_TTS
900 else
901 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
902 option=`input`
904 advopts="$advopts --tts=$option"
905 case "$option" in
906 [Ll])
907 TTS_ENGINE="flite"
908 NOISEFLOOR="500" # TODO: check this value
909 TTS_OPTS=$FLITE_OPTS
911 [Ee])
912 TTS_ENGINE="espeak"
913 NOISEFLOOR="500"
914 TTS_OPTS=$ESPEAK_OPTS
916 [Ff])
917 TTS_ENGINE="festival"
918 NOISEFLOOR="500"
919 TTS_OPTS=$FESTIVAL_OPTS
921 [Ss])
922 TTS_ENGINE="sapi"
923 NOISEFLOOR="500"
924 TTS_OPTS=$SAPI_OPTS
926 [Ww])
927 TTS_ENGINE="swift"
928 NOISEFLOOR="500"
929 TTS_OPTS=$SWIFT_OPTS
932 TTS_ENGINE=$DEFAULT_TTS
933 TTS_OPTS=$DEFAULT_TTS_OPTS
934 NOISEFLOOR=$DEFAULT_NOISEFLOOR
935 esac
936 echo "Using $TTS_ENGINE for TTS"
938 # Select which voice to use for Festival
939 if [ "$TTS_ENGINE" = "festival" ]; then
940 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
941 for voice in $voicelist; do
942 TTS_FESTIVAL_VOICE="$voice" # Default choice
943 break
944 done
945 if [ "$ARG_VOICE" ]; then
946 CHOICE=$ARG_VOICE
947 else
949 for voice in $voicelist; do
950 printf "%3d. %s\n" "$i" "$voice"
951 i=`expr $i + 1`
952 done
953 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
954 CHOICE=`input`
957 for voice in $voicelist; do
958 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
959 TTS_FESTIVAL_VOICE="$voice"
961 i=`expr $i + 1`
962 done
963 advopts="$advopts --voice=$CHOICE"
964 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
965 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
968 # Read custom tts options from command line
969 if [ "$ARG_TTSOPTS" ]; then
970 TTS_OPTS="$ARG_TTSOPTS"
971 advopts="$advopts --ttsopts='$TTS_OPTS'"
972 echo "$TTS_ENGINE options set to $TTS_OPTS"
975 if [ "$swcodec" = "yes" ]; then
976 ENCODER="rbspeexenc"
977 ENC_CMD="rbspeexenc"
978 ENC_OPTS="-q 4 -c 10"
979 else
980 if [ -n "`findtool lame`" ]; then
981 ENCODER="lame"
982 ENC_CMD="lame"
983 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
984 else
985 echo "You need LAME in the system path to build voice files for"
986 echo "HWCODEC targets."
987 exit 4
991 echo "Using $ENCODER for encoding voice clips"
993 # Read custom encoder options from command line
994 if [ "$ARG_ENCOPTS" ]; then
995 ENC_OPTS="$ARG_ENCOPTS"
996 advopts="$advopts --encopts='$ENC_OPTS'"
997 echo "$ENCODER options set to $ENC_OPTS"
1000 TEMPDIR="${pwd}"
1001 if [ -n "`findtool cygpath`" ]; then
1002 TEMPDIR=`cygpath . -a -w`
1006 picklang() {
1007 # figure out which languages that are around
1008 for file in $rootdir/apps/lang/*.lang; do
1009 clean=`basename $file .lang`
1010 langs="$langs $clean"
1011 done
1013 if [ "$ARG_LANG" ]; then
1014 pick=$ARG_LANG
1015 else
1016 echo "Select a number for the language to use (default is english)"
1017 # FIXME The multiple-language feature is currently broken
1018 # echo "You may enter a comma-separated list of languages to build"
1020 num=1
1021 for one in $langs; do
1022 echo "$num. $one"
1023 num=`expr $num + 1`
1024 done
1025 pick=`input`
1027 advopts="$advopts --language=$pick"
1030 whichlang() {
1031 output=""
1032 # Allow the user to pass a comma-separated list of langauges
1033 for thispick in `echo $pick | sed 's/,/ /g'`; do
1034 num=1
1035 for one in $langs; do
1036 # Accept both the language number and name
1037 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
1038 if [ "$output" = "" ]; then
1039 output=$one
1040 else
1041 output=$output,$one
1044 num=`expr $num + 1`
1045 done
1046 done
1047 if [ -z "$output" ]; then
1048 # pick a default
1049 output="english"
1051 echo $output
1054 help() {
1055 echo "Rockbox configure script."
1056 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1057 echo "Do *NOT* run this within the tools directory!"
1058 echo ""
1059 cat <<EOF
1060 Usage: configure [OPTION]...
1061 Options:
1062 --target=TARGET Sets the target, TARGET can be either the target ID or
1063 corresponding string. Run without this option to see all
1064 available targets.
1066 --ram=RAM Sets the RAM for certain targets. Even though any number
1067 is accepted, not every number is correct. The default
1068 value will be applied, if you entered a wrong number
1069 (which depends on the target). Watch the output. Run
1070 without this option if you are not sure which the right
1071 number is.
1073 --type=TYPE Sets the build type. Shortcuts are also valid.
1074 Run without this option to see all available types.
1075 Multiple values are allowed and managed in the input
1076 order. So --type=b stands for Bootloader build, while
1077 --type=ab stands for "Backlight MOD" build.
1079 --language=LANG Set the language used for voice generation (used only if
1080 TYPE is AV).
1082 --tts=ENGINE Set the TTS engine used for voice generation (used only
1083 if TYPE is AV).
1085 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1086 AV).
1088 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1090 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1092 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1093 This is useful for having multiple alternate builds on
1094 your device that you can load with ROLO. However as the
1095 bootloader looks for .rockbox you won't be able to boot
1096 into this build.
1098 --ccache Enable ccache use (done by default these days)
1099 --no-ccache Disable ccache use
1101 --eabi Make configure prefer toolchains that are able to compile
1102 for the new ARM standard abi EABI
1103 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1104 --thumb Build with -mthumb (for ARM builds)
1105 --no-thumb The opposite of --thumb (don't use thumb even for targets
1106 where this is the default
1107 --sdl-threads Force use of SDL threads. They have inferior performance,
1108 but are better debuggable with GDB
1109 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1110 behavior of falling back to them if no native thread
1111 support was found.
1112 --prefix Target installation directory
1113 --help Shows this message (must not be used with other options)
1117 exit
1120 ARG_CCACHE=
1121 ARG_ENCOPTS=
1122 ARG_LANG=
1123 ARG_RAM=
1124 ARG_RBDIR=
1125 ARG_TARGET=
1126 ARG_TTS=
1127 ARG_TTSOPTS=
1128 ARG_TYPE=
1129 ARG_VOICE=
1130 ARG_ARM_EABI=
1131 ARG_ARM_THUMB=
1132 ARG_PREFIX="$PREFIX"
1133 ARG_THREAD_SUPPORT=
1134 err=
1135 for arg in "$@"; do
1136 case "$arg" in
1137 --ccache) ARG_CCACHE=1;;
1138 --no-ccache) ARG_CCACHE=0;;
1139 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1140 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
1141 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1142 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
1143 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1144 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1145 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1146 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1147 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1148 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1149 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
1150 --eabi) ARG_ARM_EABI=1;;
1151 --no-eabi) ARG_ARM_EABI=0;;
1152 --thumb) ARG_ARM_THUMB=1;;
1153 --no-thumb) ARG_ARM_THUMB=0;;
1154 --sdl-threads)ARG_THREAD_SUPPORT=1;;
1155 --no-sdl-threads)
1156 ARG_THREAD_SUPPORT=0;;
1157 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
1158 --help) help;;
1159 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1160 esac
1161 done
1162 [ "$err" ] && exit 1
1164 advopts=
1166 if [ "$TMPDIR" != "" ]; then
1167 tmpdir=$TMPDIR
1168 else
1169 tmpdir=/tmp
1171 echo Using temporary directory $tmpdir
1173 if test -r "configure"; then
1174 # this is a check for a configure script in the current directory, it there
1175 # is one, try to figure out if it is this one!
1177 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1178 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1179 echo "It will only cause you pain and grief. Instead do this:"
1180 echo ""
1181 echo " cd .."
1182 echo " mkdir build-dir"
1183 echo " cd build-dir"
1184 echo " ../tools/configure"
1185 echo ""
1186 echo "Much happiness will arise from this. Enjoy"
1187 exit 5
1191 # get our current directory
1192 pwd=`pwd`;
1194 if { echo $pwd | grep " "; } then
1195 echo "You're running this script in a path that contains space. The build"
1196 echo "system is unfortunately not clever enough to deal with this. Please"
1197 echo "run the script from a different path, rename the path or fix the build"
1198 echo "system!"
1199 exit 6
1202 if [ -z "$rootdir" ]; then
1203 ##################################################################
1204 # Figure out where the source code root is!
1206 rootdir=`dirname $0`/../
1208 #####################################################################
1209 # Convert the possibly relative directory name to an absolute version
1211 now=`pwd`
1212 cd $rootdir
1213 rootdir=`pwd`
1215 # cd back to the build dir
1216 cd $now
1219 apps="apps"
1220 appsdir='\$(ROOTDIR)/apps'
1221 firmdir='\$(ROOTDIR)/firmware'
1222 toolsdir='\$(ROOTDIR)/tools'
1225 ##################################################################
1226 # Figure out target platform
1229 if [ "$ARG_TARGET" ]; then
1230 buildfor=$ARG_TARGET
1231 else
1232 echo "Enter target platform:"
1233 cat <<EOF
1234 ==Archos== ==iriver== ==Apple iPod==
1235 0) Player/Studio 10) H120/H140 20) Color/Photo
1236 1) Recorder 11) H320/H340 21) Nano 1G
1237 2) FM Recorder 12) iHP-100/110/115 22) Video
1238 3) Recorder v2 13) iFP-790 23) 3G
1239 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1240 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1241 6) AV300 26) Mini 2G
1242 ==Toshiba== 27) 1G, 2G
1243 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1244 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1245 31) M5/M5L
1246 32) 7 ==Olympus= ==SanDisk==
1247 33) D2 70) M:Robe 500 50) Sansa e200
1248 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1249 52) Sansa c200
1250 ==Creative== ==Philips== 53) Sansa m200
1251 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1252 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1253 92) Zen Vision HDD1830 56) Sansa e200v2
1254 102) GoGear HDD6330 57) Sansa m200v4
1255 ==Onda== 58) Sansa Fuze
1256 120) VX747 ==Meizu== 59) Sansa c200v2
1257 121) VX767 110) M6SL 60) Sansa Clipv2
1258 122) VX747+ 111) M6SP 61) Sansa View
1259 123) VX777 112) M3 62) Sansa Clip+
1260 63) Sansa Fuze v2
1261 ==Samsung== ==Tatung==
1262 140) YH-820 150) Elio TPJ-1022 ==Logik==
1263 141) YH-920 80) DAX 1GB MP3/DAB
1264 142) YH-925 ==Packard Bell==
1265 143) YP-S3 160) Vibe 500 ==Lyre project==
1266 130) Lyre proto 1
1267 ==Application== ==MPIO== 131) Mini2440
1268 200) SDL 170) HD200
1269 201) Android 171) HD300
1270 202) Nokia N8xx
1271 203) Nokia N900
1272 204) Pandora
1276 buildfor=`input`;
1279 # Set of tools built for all target platforms:
1280 toolset="rdf2binary convbdf codepages"
1282 # Toolsets for some target families:
1283 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1284 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1285 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1286 ipodbitmaptools="$toolset scramble bmp2rb"
1287 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1288 tccbitmaptools="$toolset scramble bmp2rb"
1289 # generic is used by IFP, Meizu and Onda
1290 genericbitmaptools="$toolset bmp2rb"
1291 # scramble is used by all other targets
1292 scramblebitmaptools="$genericbitmaptools scramble"
1295 # ---- For each target ----
1297 # *Variables*
1298 # target_id: a unique number identifying this target, IS NOT the menu number.
1299 # Just use the currently highest number+1 when you add a new
1300 # target.
1301 # modelname: short model name used all over to identify this target
1302 # memory: number of megabytes of RAM this target has. If the amount can
1303 # be selected by the size prompt, let memory be unset here
1304 # target: -Ddefine passed to the build commands to make the correct
1305 # config-*.h file get included etc
1306 # tool: the tool that takes a plain binary and converts that into a
1307 # working "firmware" file for your target
1308 # output: the final output file name
1309 # boottool: the tool that takes a plain binary and generates a bootloader
1310 # file for your target (or blank to use $tool)
1311 # bootoutput:the final output file name for the bootloader (or blank to use
1312 # $output)
1313 # appextra: passed to the APPEXTRA variable in the Makefiles.
1314 # TODO: add proper explanation
1315 # archosrom: used only for Archos targets that build a special flashable .ucl
1316 # image.
1317 # flash: name of output for flashing, for targets where there's a special
1318 # file output for this.
1319 # plugins: set to 'yes' to build the plugins. Early development builds can
1320 # set this to no in the early stages to have an easier life for a
1321 # while
1322 # swcodec: set 'yes' on swcodec targets
1323 # toolset: lists what particular tools in the tools/ directory that this
1324 # target needs to have built prior to building Rockbox
1326 # *Functions*
1327 # *cc: sets up gcc and compiler options for your target builds. Note
1328 # that if you select a simulator build, the compiler selection is
1329 # overridden later in the script.
1331 case $buildfor in
1333 0|archosplayer)
1334 target_id=1
1335 modelname="archosplayer"
1336 target="-DARCHOS_PLAYER"
1337 shcc
1338 tool="$rootdir/tools/scramble"
1339 output="archos.mod"
1340 appextra="player:gui"
1341 archosrom="$pwd/rombox.ucl"
1342 flash="$pwd/rockbox.ucl"
1343 plugins="yes"
1344 swcodec=""
1346 # toolset is the tools within the tools directory that we build for
1347 # this particular target.
1348 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1350 # Note: the convbdf is present in the toolset just because: 1) the
1351 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1352 # build the player simulator
1354 t_cpu="sh"
1355 t_manufacturer="archos"
1356 t_model="player"
1359 1|archosrecorder)
1360 target_id=2
1361 modelname="archosrecorder"
1362 target="-DARCHOS_RECORDER"
1363 shcc
1364 tool="$rootdir/tools/scramble"
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="recorder"
1381 2|archosfmrecorder)
1382 target_id=3
1383 modelname="archosfmrecorder"
1384 target="-DARCHOS_FMRECORDER"
1385 shcc
1386 tool="$rootdir/tools/scramble -fm"
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="fm_v2"
1403 3|archosrecorderv2)
1404 target_id=4
1405 modelname="archosrecorderv2"
1406 target="-DARCHOS_RECORDERV2"
1407 shcc
1408 tool="$rootdir/tools/scramble -v2"
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 is the tools within the tools directory that we build for
1418 # this particular target.
1419 toolset=$archosbitmaptools
1420 t_cpu="sh"
1421 t_manufacturer="archos"
1422 t_model="fm_v2"
1425 4|archosondiosp)
1426 target_id=7
1427 modelname="archosondiosp"
1428 target="-DARCHOS_ONDIOSP"
1429 shcc
1430 tool="$rootdir/tools/scramble -osp"
1431 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1432 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1433 output="ajbrec.ajz"
1434 appextra="recorder:gui:radio"
1435 #archosrom="$pwd/rombox.ucl"
1436 flash="$pwd/rockbox.ucl"
1437 plugins="yes"
1438 swcodec=""
1439 # toolset is the tools within the tools directory that we build for
1440 # this particular target.
1441 toolset=$archosbitmaptools
1442 t_cpu="sh"
1443 t_manufacturer="archos"
1444 t_model="ondio"
1447 5|archosondiofm)
1448 target_id=8
1449 modelname="archosondiofm"
1450 target="-DARCHOS_ONDIOFM"
1451 shcc
1452 tool="$rootdir/tools/scramble -ofm"
1453 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1454 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1455 output="ajbrec.ajz"
1456 appextra="recorder:gui:radio"
1457 #archosrom="$pwd/rombox.ucl"
1458 flash="$pwd/rockbox.ucl"
1459 plugins="yes"
1460 swcodec=""
1461 toolset=$archosbitmaptools
1462 t_cpu="sh"
1463 t_manufacturer="archos"
1464 t_model="ondio"
1467 6|archosav300)
1468 target_id=38
1469 modelname="archosav300"
1470 target="-DARCHOS_AV300"
1471 memory=16 # always
1472 arm7tdmicc
1473 tool="$rootdir/tools/scramble -mm=C"
1474 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1475 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1476 output="cjbm.ajz"
1477 appextra="recorder:gui:radio"
1478 plugins="yes"
1479 swcodec=""
1480 # toolset is the tools within the tools directory that we build for
1481 # this particular target.
1482 toolset="$toolset scramble descramble bmp2rb"
1483 # architecture, manufacturer and model for the target-tree build
1484 t_cpu="arm"
1485 t_manufacturer="archos"
1486 t_model="av300"
1489 10|iriverh120)
1490 target_id=9
1491 modelname="iriverh120"
1492 target="-DIRIVER_H120"
1493 memory=32 # always
1494 coldfirecc
1495 tool="$rootdir/tools/scramble -add=h120"
1496 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1497 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1498 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1499 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1500 output="rockbox.iriver"
1501 bootoutput="bootloader.iriver"
1502 appextra="recorder:gui:radio"
1503 flash="$pwd/rombox.iriver"
1504 plugins="yes"
1505 swcodec="yes"
1506 # toolset is the tools within the tools directory that we build for
1507 # this particular target.
1508 toolset=$iriverbitmaptools
1509 t_cpu="coldfire"
1510 t_manufacturer="iriver"
1511 t_model="h100"
1514 11|iriverh300)
1515 target_id=10
1516 modelname="iriverh300"
1517 target="-DIRIVER_H300"
1518 memory=32 # always
1519 coldfirecc
1520 tool="$rootdir/tools/scramble -add=h300"
1521 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1522 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1523 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1524 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1525 output="rockbox.iriver"
1526 appextra="recorder:gui:radio"
1527 plugins="yes"
1528 swcodec="yes"
1529 # toolset is the tools within the tools directory that we build for
1530 # this particular target.
1531 toolset=$iriverbitmaptools
1532 t_cpu="coldfire"
1533 t_manufacturer="iriver"
1534 t_model="h300"
1537 12|iriverh100)
1538 target_id=11
1539 modelname="iriverh100"
1540 target="-DIRIVER_H100"
1541 memory=16 # always
1542 coldfirecc
1543 tool="$rootdir/tools/scramble -add=h100"
1544 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1545 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1546 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1547 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1548 output="rockbox.iriver"
1549 bootoutput="bootloader.iriver"
1550 appextra="recorder:gui:radio"
1551 flash="$pwd/rombox.iriver"
1552 plugins="yes"
1553 swcodec="yes"
1554 # toolset is the tools within the tools directory that we build for
1555 # this particular target.
1556 toolset=$iriverbitmaptools
1557 t_cpu="coldfire"
1558 t_manufacturer="iriver"
1559 t_model="h100"
1562 13|iriverifp7xx)
1563 target_id=19
1564 modelname="iriverifp7xx"
1565 target="-DIRIVER_IFP7XX"
1566 memory=1
1567 arm7tdmicc short
1568 tool="cp"
1569 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1570 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1571 output="rockbox.wma"
1572 appextra="recorder:gui:radio"
1573 plugins="yes"
1574 swcodec="yes"
1575 # toolset is the tools within the tools directory that we build for
1576 # this particular target.
1577 toolset=$genericbitmaptools
1578 t_cpu="arm"
1579 t_manufacturer="pnx0101"
1580 t_model="iriver-ifp7xx"
1583 14|iriverh10)
1584 target_id=22
1585 modelname="iriverh10"
1586 target="-DIRIVER_H10"
1587 memory=32 # always
1588 arm7tdmicc
1589 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1590 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1591 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1592 output="rockbox.mi4"
1593 appextra="recorder:gui:radio"
1594 plugins="yes"
1595 swcodec="yes"
1596 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1597 bootoutput="H10_20GC.mi4"
1598 # toolset is the tools within the tools directory that we build for
1599 # this particular target.
1600 toolset=$scramblebitmaptools
1601 # architecture, manufacturer and model for the target-tree build
1602 t_cpu="arm"
1603 t_manufacturer="iriver"
1604 t_model="h10"
1607 15|iriverh10_5gb)
1608 target_id=24
1609 modelname="iriverh10_5gb"
1610 target="-DIRIVER_H10_5GB"
1611 memory=32 # always
1612 arm7tdmicc
1613 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1614 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1615 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1616 output="rockbox.mi4"
1617 appextra="recorder:gui:radio"
1618 plugins="yes"
1619 swcodec="yes"
1620 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1621 bootoutput="H10.mi4"
1622 # toolset is the tools within the tools directory that we build for
1623 # this particular target.
1624 toolset=$scramblebitmaptools
1625 # architecture, manufacturer and model for the target-tree build
1626 t_cpu="arm"
1627 t_manufacturer="iriver"
1628 t_model="h10"
1631 20|ipodcolor)
1632 target_id=13
1633 modelname="ipodcolor"
1634 target="-DIPOD_COLOR"
1635 memory=32 # always
1636 arm7tdmicc
1637 tool="$rootdir/tools/scramble -add=ipco"
1638 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1639 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1640 output="rockbox.ipod"
1641 appextra="recorder:gui:radio"
1642 plugins="yes"
1643 swcodec="yes"
1644 bootoutput="bootloader-$modelname.ipod"
1645 # toolset is the tools within the tools directory that we build for
1646 # this particular target.
1647 toolset=$ipodbitmaptools
1648 # architecture, manufacturer and model for the target-tree build
1649 t_cpu="arm"
1650 t_manufacturer="ipod"
1651 t_model="color"
1654 21|ipodnano1g)
1655 target_id=14
1656 modelname="ipodnano1g"
1657 target="-DIPOD_NANO"
1658 memory=32 # always
1659 arm7tdmicc
1660 tool="$rootdir/tools/scramble -add=nano"
1661 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1662 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1663 output="rockbox.ipod"
1664 appextra="recorder:gui:radio"
1665 plugins="yes"
1666 swcodec="yes"
1667 bootoutput="bootloader-$modelname.ipod"
1668 # toolset is the tools within the tools directory that we build for
1669 # this particular target.
1670 toolset=$ipodbitmaptools
1671 # architecture, manufacturer and model for the target-tree build
1672 t_cpu="arm"
1673 t_manufacturer="ipod"
1674 t_model="nano"
1677 22|ipodvideo)
1678 target_id=15
1679 modelname="ipodvideo"
1680 target="-DIPOD_VIDEO"
1681 memory=64 # always. This is reduced at runtime if needed
1682 arm7tdmicc
1683 tool="$rootdir/tools/scramble -add=ipvd"
1684 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1685 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1686 output="rockbox.ipod"
1687 appextra="recorder:gui:radio"
1688 plugins="yes"
1689 swcodec="yes"
1690 bootoutput="bootloader-$modelname.ipod"
1691 # toolset is the tools within the tools directory that we build for
1692 # this particular target.
1693 toolset=$ipodbitmaptools
1694 # architecture, manufacturer and model for the target-tree build
1695 t_cpu="arm"
1696 t_manufacturer="ipod"
1697 t_model="video"
1700 23|ipod3g)
1701 target_id=16
1702 modelname="ipod3g"
1703 target="-DIPOD_3G"
1704 memory=32 # always
1705 arm7tdmicc
1706 tool="$rootdir/tools/scramble -add=ip3g"
1707 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1708 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1709 output="rockbox.ipod"
1710 appextra="recorder:gui:radio"
1711 plugins="yes"
1712 swcodec="yes"
1713 bootoutput="bootloader-$modelname.ipod"
1714 # toolset is the tools within the tools directory that we build for
1715 # this particular target.
1716 toolset=$ipodbitmaptools
1717 # architecture, manufacturer and model for the target-tree build
1718 t_cpu="arm"
1719 t_manufacturer="ipod"
1720 t_model="3g"
1723 24|ipod4g)
1724 target_id=17
1725 modelname="ipod4g"
1726 target="-DIPOD_4G"
1727 memory=32 # always
1728 arm7tdmicc
1729 tool="$rootdir/tools/scramble -add=ip4g"
1730 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1731 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1732 output="rockbox.ipod"
1733 appextra="recorder:gui:radio"
1734 plugins="yes"
1735 swcodec="yes"
1736 bootoutput="bootloader-$modelname.ipod"
1737 # toolset is the tools within the tools directory that we build for
1738 # this particular target.
1739 toolset=$ipodbitmaptools
1740 # architecture, manufacturer and model for the target-tree build
1741 t_cpu="arm"
1742 t_manufacturer="ipod"
1743 t_model="4g"
1746 25|ipodmini1g)
1747 target_id=18
1748 modelname="ipodmini1g"
1749 target="-DIPOD_MINI"
1750 memory=32 # always
1751 arm7tdmicc
1752 tool="$rootdir/tools/scramble -add=mini"
1753 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1754 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1755 output="rockbox.ipod"
1756 appextra="recorder:gui:radio"
1757 plugins="yes"
1758 swcodec="yes"
1759 bootoutput="bootloader-$modelname.ipod"
1760 # toolset is the tools within the tools directory that we build for
1761 # this particular target.
1762 toolset=$ipodbitmaptools
1763 # architecture, manufacturer and model for the target-tree build
1764 t_cpu="arm"
1765 t_manufacturer="ipod"
1766 t_model="mini"
1769 26|ipodmini2g)
1770 target_id=21
1771 modelname="ipodmini2g"
1772 target="-DIPOD_MINI2G"
1773 memory=32 # always
1774 arm7tdmicc
1775 tool="$rootdir/tools/scramble -add=mn2g"
1776 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1777 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1778 output="rockbox.ipod"
1779 appextra="recorder:gui:radio"
1780 plugins="yes"
1781 swcodec="yes"
1782 bootoutput="bootloader-$modelname.ipod"
1783 # toolset is the tools within the tools directory that we build for
1784 # this particular target.
1785 toolset=$ipodbitmaptools
1786 # architecture, manufacturer and model for the target-tree build
1787 t_cpu="arm"
1788 t_manufacturer="ipod"
1789 t_model="mini2g"
1792 27|ipod1g2g)
1793 target_id=29
1794 modelname="ipod1g2g"
1795 target="-DIPOD_1G2G"
1796 memory=32 # always
1797 arm7tdmicc
1798 tool="$rootdir/tools/scramble -add=1g2g"
1799 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1800 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1801 output="rockbox.ipod"
1802 appextra="recorder:gui:radio"
1803 plugins="yes"
1804 swcodec="yes"
1805 bootoutput="bootloader-$modelname.ipod"
1806 # toolset is the tools within the tools directory that we build for
1807 # this particular target.
1808 toolset=$ipodbitmaptools
1809 # architecture, manufacturer and model for the target-tree build
1810 t_cpu="arm"
1811 t_manufacturer="ipod"
1812 t_model="1g2g"
1815 28|ipodnano2g)
1816 target_id=62
1817 modelname="ipodnano2g"
1818 target="-DIPOD_NANO2G"
1819 memory=32 # always
1820 arm940tcc
1821 tool="$rootdir/tools/scramble -add=nn2g"
1822 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1823 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1824 output="rockbox.ipod"
1825 appextra="recorder:gui:radio"
1826 plugins="yes"
1827 swcodec="yes"
1828 bootoutput="bootloader-$modelname.ipod"
1829 # toolset is the tools within the tools directory that we build for
1830 # this particular target.
1831 toolset=$ipodbitmaptools
1832 # architecture, manufacturer and model for the target-tree build
1833 t_cpu="arm"
1834 t_manufacturer="s5l8700"
1835 t_model="ipodnano2g"
1838 29|ipod6g)
1839 target_id=71
1840 modelname="ipod6g"
1841 target="-DIPOD_6G"
1842 memory=64 # always
1843 arm926ejscc
1844 tool="$rootdir/tools/scramble -add=ip6g"
1845 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1846 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1847 output="rockbox.ipod"
1848 appextra="recorder:gui:radio"
1849 plugins="yes"
1850 swcodec="yes"
1851 bootoutput="bootloader-$modelname.ipod"
1852 # toolset is the tools within the tools directory that we build for
1853 # this particular target.
1854 toolset=$ipodbitmaptools
1855 # architecture, manufacturer and model for the target-tree build
1856 t_cpu="arm"
1857 t_manufacturer="s5l8702"
1858 t_model="ipod6g"
1861 30|iaudiox5)
1862 target_id=12
1863 modelname="iaudiox5"
1864 target="-DIAUDIO_X5"
1865 memory=16 # always
1866 coldfirecc
1867 tool="$rootdir/tools/scramble -add=iax5"
1868 boottool="$rootdir/tools/scramble -iaudiox5"
1869 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1870 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1871 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1872 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1873 output="rockbox.iaudio"
1874 bootoutput="x5_fw.bin"
1875 appextra="recorder:gui:radio"
1876 plugins="yes"
1877 swcodec="yes"
1878 # toolset is the tools within the tools directory that we build for
1879 # this particular target.
1880 toolset="$iaudiobitmaptools"
1881 # architecture, manufacturer and model for the target-tree build
1882 t_cpu="coldfire"
1883 t_manufacturer="iaudio"
1884 t_model="x5"
1887 31|iaudiom5)
1888 target_id=28
1889 modelname="iaudiom5"
1890 target="-DIAUDIO_M5"
1891 memory=16 # always
1892 coldfirecc
1893 tool="$rootdir/tools/scramble -add=iam5"
1894 boottool="$rootdir/tools/scramble -iaudiom5"
1895 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1896 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1897 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1898 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1899 output="rockbox.iaudio"
1900 bootoutput="m5_fw.bin"
1901 appextra="recorder:gui:radio"
1902 plugins="yes"
1903 swcodec="yes"
1904 # toolset is the tools within the tools directory that we build for
1905 # this particular target.
1906 toolset="$iaudiobitmaptools"
1907 # architecture, manufacturer and model for the target-tree build
1908 t_cpu="coldfire"
1909 t_manufacturer="iaudio"
1910 t_model="m5"
1913 32|iaudio7)
1914 target_id=32
1915 modelname="iaudio7"
1916 target="-DIAUDIO_7"
1917 memory=16 # always
1918 arm946cc
1919 tool="$rootdir/tools/scramble -add=i7"
1920 boottool="$rootdir/tools/scramble -tcc=crc"
1921 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1922 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1923 output="rockbox.iaudio"
1924 appextra="recorder:gui:radio"
1925 plugins="yes"
1926 swcodec="yes"
1927 bootoutput="I7_FW.BIN"
1928 # toolset is the tools within the tools directory that we build for
1929 # this particular target.
1930 toolset="$tccbitmaptools"
1931 # architecture, manufacturer and model for the target-tree build
1932 t_cpu="arm"
1933 t_manufacturer="tcc77x"
1934 t_model="iaudio7"
1937 33|cowond2)
1938 target_id=34
1939 modelname="cowond2"
1940 target="-DCOWON_D2"
1941 memory=32
1942 arm926ejscc
1943 tool="$rootdir/tools/scramble -add=d2"
1944 boottool="cp "
1945 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1946 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1947 output="rockbox.d2"
1948 bootoutput="bootloader-cowond2.bin"
1949 appextra="recorder:gui:radio"
1950 plugins="yes"
1951 swcodec="yes"
1952 toolset="$tccbitmaptools"
1953 # architecture, manufacturer and model for the target-tree build
1954 t_cpu="arm"
1955 t_manufacturer="tcc780x"
1956 t_model="cowond2"
1959 34|iaudiom3)
1960 target_id=37
1961 modelname="iaudiom3"
1962 target="-DIAUDIO_M3"
1963 memory=16 # always
1964 coldfirecc
1965 tool="$rootdir/tools/scramble -add=iam3"
1966 boottool="$rootdir/tools/scramble -iaudiom3"
1967 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1968 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1969 output="rockbox.iaudio"
1970 bootoutput="cowon_m3.bin"
1971 appextra="recorder:gui:radio"
1972 plugins="yes"
1973 swcodec="yes"
1974 # toolset is the tools within the tools directory that we build for
1975 # this particular target.
1976 toolset="$iaudiobitmaptools"
1977 # architecture, manufacturer and model for the target-tree build
1978 t_cpu="coldfire"
1979 t_manufacturer="iaudio"
1980 t_model="m3"
1983 40|gigabeatfx)
1984 target_id=20
1985 modelname="gigabeatfx"
1986 target="-DGIGABEAT_F"
1987 memory=32 # always
1988 arm9tdmicc
1989 tool="$rootdir/tools/scramble -add=giga"
1990 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1991 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1992 output="rockbox.gigabeat"
1993 appextra="recorder:gui:radio"
1994 plugins="yes"
1995 swcodec="yes"
1996 toolset=$gigabeatbitmaptools
1997 boottool="$rootdir/tools/scramble -gigabeat"
1998 bootoutput="FWIMG01.DAT"
1999 # architecture, manufacturer and model for the target-tree build
2000 t_cpu="arm"
2001 t_manufacturer="s3c2440"
2002 t_model="gigabeat-fx"
2005 41|gigabeats)
2006 target_id=26
2007 modelname="gigabeats"
2008 target="-DGIGABEAT_S"
2009 memory=64
2010 arm1136jfscc
2011 tool="$rootdir/tools/scramble -add=gigs"
2012 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2013 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2014 output="rockbox.gigabeat"
2015 appextra="recorder:gui:radio"
2016 plugins="yes"
2017 swcodec="yes"
2018 toolset="$gigabeatbitmaptools"
2019 boottool="$rootdir/tools/scramble -gigabeats"
2020 bootoutput="nk.bin"
2021 # architecture, manufacturer and model for the target-tree build
2022 t_cpu="arm"
2023 t_manufacturer="imx31"
2024 t_model="gigabeat-s"
2027 70|mrobe500)
2028 target_id=36
2029 modelname="mrobe500"
2030 target="-DMROBE_500"
2031 memory=64 # always
2032 arm926ejscc
2033 tool="$rootdir/tools/scramble -add=m500"
2034 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2035 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
2036 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2037 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2038 output="rockbox.mrobe500"
2039 appextra="recorder:gui:radio"
2040 plugins="yes"
2041 swcodec="yes"
2042 toolset=$gigabeatbitmaptools
2043 boottool="cp "
2044 bootoutput="rockbox.mrboot"
2045 # architecture, manufacturer and model for the target-tree build
2046 t_cpu="arm"
2047 t_manufacturer="tms320dm320"
2048 t_model="mrobe-500"
2051 71|mrobe100)
2052 target_id=33
2053 modelname="mrobe100"
2054 target="-DMROBE_100"
2055 memory=32 # always
2056 arm7tdmicc
2057 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2058 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2059 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2060 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2061 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2062 output="rockbox.mi4"
2063 appextra="recorder:gui:radio"
2064 plugins="yes"
2065 swcodec="yes"
2066 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2067 bootoutput="pp5020.mi4"
2068 # toolset is the tools within the tools directory that we build for
2069 # this particular target.
2070 toolset=$scramblebitmaptools
2071 # architecture, manufacturer and model for the target-tree build
2072 t_cpu="arm"
2073 t_manufacturer="olympus"
2074 t_model="mrobe-100"
2077 80|logikdax)
2078 target_id=31
2079 modelname="logikdax"
2080 target="-DLOGIK_DAX"
2081 memory=2 # always
2082 arm946cc
2083 tool="$rootdir/tools/scramble -add=ldax"
2084 boottool="$rootdir/tools/scramble -tcc=crc"
2085 bootoutput="player.rom"
2086 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2087 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2088 output="rockbox.logik"
2089 appextra="recorder:gui:radio"
2090 plugins=""
2091 swcodec="yes"
2092 # toolset is the tools within the tools directory that we build for
2093 # this particular target.
2094 toolset=$tccbitmaptools
2095 # architecture, manufacturer and model for the target-tree build
2096 t_cpu="arm"
2097 t_manufacturer="tcc77x"
2098 t_model="logikdax"
2101 90|zenvisionm30gb)
2102 target_id=35
2103 modelname="zenvisionm30gb"
2104 target="-DCREATIVE_ZVM"
2105 memory=64
2106 arm926ejscc
2107 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2108 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2109 tool="$rootdir/tools/scramble -creative=zvm"
2110 USE_ELF="yes"
2111 output="rockbox.zvm"
2112 appextra="recorder:gui:radio"
2113 plugins="yes"
2114 swcodec="yes"
2115 toolset=$ipodbitmaptools
2116 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
2117 bootoutput="rockbox.zvmboot"
2118 # architecture, manufacturer and model for the target-tree build
2119 t_cpu="arm"
2120 t_manufacturer="tms320dm320"
2121 t_model="creative-zvm"
2124 91|zenvisionm60gb)
2125 target_id=40
2126 modelname="zenvisionm60gb"
2127 target="-DCREATIVE_ZVM60GB"
2128 memory=64
2129 arm926ejscc
2130 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2131 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2132 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2133 USE_ELF="yes"
2134 output="rockbox.zvm60"
2135 appextra="recorder:gui:radio"
2136 plugins="yes"
2137 swcodec="yes"
2138 toolset=$ipodbitmaptools
2139 boottool="$rootdir/tools/scramble -creative=zvm60"
2140 bootoutput="rockbox.zvm60boot"
2141 # architecture, manufacturer and model for the target-tree build
2142 t_cpu="arm"
2143 t_manufacturer="tms320dm320"
2144 t_model="creative-zvm"
2147 92|zenvision)
2148 target_id=39
2149 modelname="zenvision"
2150 target="-DCREATIVE_ZV"
2151 memory=64
2152 arm926ejscc
2153 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2154 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2155 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2156 USE_ELF="yes"
2157 output="rockbox.zv"
2158 appextra="recorder:gui:radio"
2159 plugins=""
2160 swcodec="yes"
2161 toolset=$ipodbitmaptools
2162 boottool="$rootdir/tools/scramble -creative=zenvision"
2163 bootoutput="rockbox.zvboot"
2164 # architecture, manufacturer and model for the target-tree build
2165 t_cpu="arm"
2166 t_manufacturer="tms320dm320"
2167 t_model="creative-zvm"
2170 50|sansae200)
2171 target_id=23
2172 modelname="sansae200"
2173 target="-DSANSA_E200"
2174 memory=32 # supposedly
2175 arm7tdmicc
2176 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2177 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2178 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2179 output="rockbox.mi4"
2180 appextra="recorder:gui:radio"
2181 plugins="yes"
2182 swcodec="yes"
2183 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2184 bootoutput="PP5022.mi4"
2185 # toolset is the tools within the tools directory that we build for
2186 # this particular target.
2187 toolset=$scramblebitmaptools
2188 # architecture, manufacturer and model for the target-tree build
2189 t_cpu="arm"
2190 t_manufacturer="sandisk"
2191 t_model="sansa-e200"
2194 51|sansae200r)
2195 # the e200R model is pretty much identical to the e200, it only has a
2196 # different option to the scramble tool when building a bootloader and
2197 # makes the bootloader output file name in all lower case.
2198 target_id=27
2199 modelname="sansae200r"
2200 target="-DSANSA_E200"
2201 memory=32 # supposedly
2202 arm7tdmicc
2203 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2204 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2205 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2206 output="rockbox.mi4"
2207 appextra="recorder:gui:radio"
2208 plugins="yes"
2209 swcodec="yes"
2210 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2211 bootoutput="pp5022.mi4"
2212 # toolset is the tools within the tools directory that we build for
2213 # this particular target.
2214 toolset=$scramblebitmaptools
2215 # architecture, manufacturer and model for the target-tree build
2216 t_cpu="arm"
2217 t_manufacturer="sandisk"
2218 t_model="sansa-e200"
2221 52|sansac200)
2222 target_id=30
2223 modelname="sansac200"
2224 target="-DSANSA_C200"
2225 memory=32 # supposedly
2226 arm7tdmicc
2227 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2228 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2229 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2230 output="rockbox.mi4"
2231 appextra="recorder:gui:radio"
2232 plugins="yes"
2233 swcodec="yes"
2234 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2235 bootoutput="firmware.mi4"
2236 # toolset is the tools within the tools directory that we build for
2237 # this particular target.
2238 toolset=$scramblebitmaptools
2239 # architecture, manufacturer and model for the target-tree build
2240 t_cpu="arm"
2241 t_manufacturer="sandisk"
2242 t_model="sansa-c200"
2245 53|sansam200)
2246 target_id=48
2247 modelname="sansam200"
2248 target="-DSANSA_M200"
2249 memory=1 # always
2250 arm946cc
2251 tool="$rootdir/tools/scramble -add=m200"
2252 boottool="$rootdir/tools/scramble -tcc=crc"
2253 bootoutput="player.rom"
2254 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2255 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2256 output="rockbox.m200"
2257 appextra="recorder:gui:radio"
2258 plugins=""
2259 swcodec="yes"
2260 # toolset is the tools within the tools directory that we build for
2261 # this particular target.
2262 toolset=$tccbitmaptools
2263 # architecture, manufacturer and model for the target-tree build
2264 t_cpu="arm"
2265 t_manufacturer="tcc77x"
2266 t_model="m200"
2269 54|sansac100)
2270 target_id=42
2271 modelname="sansac100"
2272 target="-DSANSA_C100"
2273 memory=2
2274 arm946cc
2275 tool="$rootdir/tools/scramble -add=c100"
2276 boottool="$rootdir/tools/scramble -tcc=crc"
2277 bootoutput="player.rom"
2278 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2279 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2280 output="rockbox.c100"
2281 appextra="recorder:gui:radio"
2282 plugins=""
2283 swcodec="yes"
2284 # toolset is the tools within the tools directory that we build for
2285 # this particular target.
2286 toolset=$tccbitmaptools
2287 # architecture, manufacturer and model for the target-tree build
2288 t_cpu="arm"
2289 t_manufacturer="tcc77x"
2290 t_model="c100"
2293 55|sansaclip)
2294 target_id=50
2295 modelname="sansaclip"
2296 target="-DSANSA_CLIP"
2297 memory=2
2298 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2299 bmp2rb_native="$bmp2rb_mono"
2300 tool="$rootdir/tools/scramble -add=clip"
2301 output="rockbox.sansa"
2302 bootoutput="bootloader-clip.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-clip"
2310 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2311 arm9tdmicc
2312 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2316 56|sansae200v2)
2317 target_id=51
2318 modelname="sansae200v2"
2319 target="-DSANSA_E200V2"
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=e2v2"
2324 output="rockbox.sansa"
2325 bootoutput="bootloader-e200v2.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-e200v2"
2333 arm9tdmicc
2337 57|sansam200v4)
2338 target_id=52
2339 modelname="sansam200v4"
2340 target="-DSANSA_M200V4"
2341 memory=2
2342 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2343 bmp2rb_native="$bmp2rb_mono"
2344 tool="$rootdir/tools/scramble -add=m2v4"
2345 output="rockbox.sansa"
2346 bootoutput="bootloader-m200v4.sansa"
2347 appextra="recorder:gui:radio"
2348 plugins="yes"
2349 swcodec="yes"
2350 toolset=$scramblebitmaptools
2351 t_cpu="arm"
2352 t_manufacturer="as3525"
2353 t_model="sansa-m200v4"
2354 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2355 arm9tdmicc
2356 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2360 58|sansafuze)
2361 target_id=53
2362 modelname="sansafuze"
2363 target="-DSANSA_FUZE"
2364 memory=8
2365 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2366 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2367 tool="$rootdir/tools/scramble -add=fuze"
2368 output="rockbox.sansa"
2369 bootoutput="bootloader-fuze.sansa"
2370 appextra="recorder:gui:radio"
2371 plugins="yes"
2372 swcodec="yes"
2373 toolset=$scramblebitmaptools
2374 t_cpu="arm"
2375 t_manufacturer="as3525"
2376 t_model="sansa-fuze"
2377 arm9tdmicc
2381 59|sansac200v2)
2382 target_id=55
2383 modelname="sansac200v2"
2384 target="-DSANSA_C200V2"
2385 memory=2 # as per OF diagnosis mode
2386 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2387 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2388 tool="$rootdir/tools/scramble -add=c2v2"
2389 output="rockbox.sansa"
2390 bootoutput="bootloader-c200v2.sansa"
2391 appextra="recorder:gui:radio"
2392 plugins="yes"
2393 swcodec="yes"
2394 # toolset is the tools within the tools directory that we build for
2395 # this particular target.
2396 toolset=$scramblebitmaptools
2397 # architecture, manufacturer and model for the target-tree build
2398 t_cpu="arm"
2399 t_manufacturer="as3525"
2400 t_model="sansa-c200v2"
2401 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2402 arm9tdmicc
2403 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2406 60|sansaclipv2)
2407 target_id=60
2408 modelname="sansaclipv2"
2409 target="-DSANSA_CLIPV2"
2410 memory=8
2411 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2412 bmp2rb_native="$bmp2rb_mono"
2413 tool="$rootdir/tools/scramble -add=clv2"
2414 output="rockbox.sansa"
2415 bootoutput="bootloader-clipv2.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-clipv2"
2423 arm926ejscc
2426 61|sansaview)
2427 echo "Sansa View is not yet supported!"
2428 exit 1
2429 target_id=63
2430 modelname="sansaview"
2431 target="-DSANSA_VIEW"
2432 memory=32
2433 arm1176jzscc
2434 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2435 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2436 output="rockbox.mi4"
2437 appextra="gui"
2438 plugins=""
2439 swcodec="yes"
2440 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2441 bootoutput="firmware.mi4"
2442 # toolset is the tools within the tools directory that we build for
2443 # this particular target.
2444 toolset=$scramblebitmaptools
2445 t_cpu="arm"
2446 t_manufacturer="sandisk"
2447 t_model="sansa-view"
2450 62|sansaclipplus)
2451 target_id=66
2452 modelname="sansaclipplus"
2453 target="-DSANSA_CLIPPLUS"
2454 memory=8
2455 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2456 bmp2rb_native="$bmp2rb_mono"
2457 tool="$rootdir/tools/scramble -add=cli+"
2458 output="rockbox.sansa"
2459 bootoutput="bootloader-clipplus.sansa"
2460 appextra="recorder:gui:radio"
2461 plugins="yes"
2462 swcodec="yes"
2463 toolset=$scramblebitmaptools
2464 t_cpu="arm"
2465 t_manufacturer="as3525"
2466 t_model="sansa-clipplus"
2467 arm926ejscc
2470 63|sansafuzev2)
2471 target_id=68
2472 modelname="sansafuzev2"
2473 target="-DSANSA_FUZEV2"
2474 memory=8 # not sure
2475 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2476 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2477 tool="$rootdir/tools/scramble -add=fuz2"
2478 output="rockbox.sansa"
2479 bootoutput="bootloader-fuzev2.sansa"
2480 appextra="recorder:gui:radio"
2481 plugins="yes"
2482 swcodec="yes"
2483 toolset=$scramblebitmaptools
2484 t_cpu="arm"
2485 t_manufacturer="as3525"
2486 t_model="sansa-fuzev2"
2487 arm926ejscc
2490 150|tatungtpj1022)
2491 target_id=25
2492 modelname="tatungtpj1022"
2493 target="-DTATUNG_TPJ1022"
2494 memory=32 # always
2495 arm7tdmicc
2496 tool="$rootdir/tools/scramble -add tpj2"
2497 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2498 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2499 output="rockbox.elio"
2500 appextra="recorder:gui:radio"
2501 plugins="yes"
2502 swcodec="yes"
2503 boottool="$rootdir/tools/scramble -mi4v2"
2504 bootoutput="pp5020.mi4"
2505 # toolset is the tools within the tools directory that we build for
2506 # this particular target.
2507 toolset=$scramblebitmaptools
2508 # architecture, manufacturer and model for the target-tree build
2509 t_cpu="arm"
2510 t_manufacturer="tatung"
2511 t_model="tpj1022"
2514 100|gogearsa9200)
2515 target_id=41
2516 modelname="gogearsa9200"
2517 target="-DPHILIPS_SA9200"
2518 memory=32 # supposedly
2519 arm7tdmicc
2520 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2521 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2522 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2523 output="rockbox.mi4"
2524 appextra="recorder:gui:radio"
2525 plugins="yes"
2526 swcodec="yes"
2527 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2528 bootoutput="FWImage.ebn"
2529 # toolset is the tools within the tools directory that we build for
2530 # this particular target.
2531 toolset=$scramblebitmaptools
2532 # architecture, manufacturer and model for the target-tree build
2533 t_cpu="arm"
2534 t_manufacturer="philips"
2535 t_model="sa9200"
2538 101|gogearhdd1630)
2539 target_id=43
2540 modelname="gogearhdd1630"
2541 target="-DPHILIPS_HDD1630"
2542 memory=32 # supposedly
2543 arm7tdmicc
2544 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2545 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2546 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2547 output="rockbox.mi4"
2548 appextra="recorder:gui:radio"
2549 plugins="yes"
2550 swcodec="yes"
2551 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2552 bootoutput="FWImage.ebn"
2553 # toolset is the tools within the tools directory that we build for
2554 # this particular target.
2555 toolset=$scramblebitmaptools
2556 # architecture, manufacturer and model for the target-tree build
2557 t_cpu="arm"
2558 t_manufacturer="philips"
2559 t_model="hdd1630"
2562 102|gogearhdd6330)
2563 target_id=65
2564 modelname="gogearhdd6330"
2565 target="-DPHILIPS_HDD6330"
2566 memory=64 # always
2567 arm7tdmicc
2568 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2569 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2570 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2571 output="rockbox.mi4"
2572 appextra="recorder:gui:radio"
2573 plugins="yes"
2574 swcodec="yes"
2575 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2576 bootoutput="FWImage.ebn"
2577 # toolset is the tools within the tools directory that we build for
2578 # this particular target.
2579 toolset=$scramblebitmaptools
2580 # architecture, manufacturer and model for the target-tree build
2581 t_cpu="arm"
2582 t_manufacturer="philips"
2583 t_model="hdd6330"
2586 110|meizum6sl)
2587 target_id=49
2588 modelname="meizum6sl"
2589 target="-DMEIZU_M6SL"
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-m6sl"
2608 111|meizum6sp)
2609 target_id=46
2610 modelname="meizum6sp"
2611 target="-DMEIZU_M6SP"
2612 memory=16 # always
2613 arm940tbecc
2614 tool="cp"
2615 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2616 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2617 output="rockbox.meizu"
2618 appextra="recorder:gui:radio"
2619 plugins="no" #FIXME
2620 swcodec="yes"
2621 toolset=$genericbitmaptools
2622 boottool="cp"
2623 bootoutput="rockboot.ebn"
2624 # architecture, manufacturer and model for the target-tree build
2625 t_cpu="arm"
2626 t_manufacturer="s5l8700"
2627 t_model="meizu-m6sp"
2630 112|meizum3)
2631 target_id=47
2632 modelname="meizum3"
2633 target="-DMEIZU_M3"
2634 memory=16 # always
2635 arm940tbecc
2636 tool="cp"
2637 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2638 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2639 output="rockbox.meizu"
2640 appextra="recorder:gui:radio"
2641 plugins="no" #FIXME
2642 swcodec="yes"
2643 toolset=$genericbitmaptools
2644 boottool="cp"
2645 bootoutput="rockboot.ebn"
2646 # architecture, manufacturer and model for the target-tree build
2647 t_cpu="arm"
2648 t_manufacturer="s5l8700"
2649 t_model="meizu-m3"
2652 120|ondavx747)
2653 target_id=45
2654 modelname="ondavx747"
2655 target="-DONDA_VX747"
2656 memory=16
2657 mipselcc
2658 tool="$rootdir/tools/scramble -add=x747"
2659 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2660 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2661 output="rockbox.vx747"
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 121|ondavx767)
2675 target_id=64
2676 modelname="ondavx767"
2677 target="-DONDA_VX767"
2678 memory=16 #FIXME
2679 mipselcc
2680 tool="cp"
2681 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2682 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2683 output="rockbox.vx767"
2684 appextra="recorder:gui:radio"
2685 plugins="" #FIXME
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_vx767"
2696 122|ondavx747p)
2697 target_id=54
2698 modelname="ondavx747p"
2699 target="-DONDA_VX747P"
2700 memory=16
2701 mipselcc
2702 tool="$rootdir/tools/scramble -add=747p"
2703 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2704 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2705 output="rockbox.vx747p"
2706 appextra="recorder:gui:radio"
2707 plugins="yes"
2708 swcodec="yes"
2709 toolset=$genericbitmaptools
2710 boottool="$rootdir/tools/scramble -ccpmp"
2711 bootoutput="ccpmp.bin"
2712 # architecture, manufacturer and model for the target-tree build
2713 t_cpu="mips"
2714 t_manufacturer="ingenic_jz47xx"
2715 t_model="onda_vx747"
2718 123|ondavx777)
2719 target_id=61
2720 modelname="ondavx777"
2721 target="-DONDA_VX777"
2722 memory=16
2723 mipselcc
2724 tool="$rootdir/tools/scramble -add=x777"
2725 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2726 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2727 output="rockbox.vx777"
2728 appextra="recorder:gui:radio"
2729 plugins="yes"
2730 swcodec="yes"
2731 toolset=$genericbitmaptools
2732 boottool="$rootdir/tools/scramble -ccpmp"
2733 bootoutput="ccpmp.bin"
2734 # architecture, manufacturer and model for the target-tree build
2735 t_cpu="mips"
2736 t_manufacturer="ingenic_jz47xx"
2737 t_model="onda_vx747"
2740 130|lyreproto1)
2741 target_id=56
2742 modelname="lyreproto1"
2743 target="-DLYRE_PROTO1"
2744 memory=64
2745 arm926ejscc
2746 tool="cp"
2747 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2748 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2749 output="rockbox.lyre"
2750 appextra="recorder:gui:radio"
2751 plugins=""
2752 swcodec="yes"
2753 toolset=$scramblebitmaptools
2754 boottool="cp"
2755 bootoutput="bootloader-proto1.lyre"
2756 # architecture, manufacturer and model for the target-tree build
2757 t_cpu="arm"
2758 t_manufacturer="at91sam"
2759 t_model="lyre_proto1"
2762 131|mini2440)
2763 target_id=99
2764 modelname="mini2440"
2765 target="-DMINI2440"
2766 memory=64
2767 arm9tdmicc
2768 tool="$rootdir/tools/scramble -add=m244"
2769 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2770 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2771 output="rockbox.mini2440"
2772 appextra="recorder:gui:radio"
2773 plugins=""
2774 swcodec="yes"
2775 toolset=$scramblebitmaptools
2776 boottool="cp"
2777 bootoutput="bootloader-mini2440.lyre"
2778 # architecture, manufacturer and model for the target-tree build
2779 t_cpu="arm"
2780 t_manufacturer="s3c2440"
2781 t_model="mini2440"
2784 140|samsungyh820)
2785 target_id=57
2786 modelname="samsungyh820"
2787 target="-DSAMSUNG_YH820"
2788 memory=32 # always
2789 arm7tdmicc
2790 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2791 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2792 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2793 output="rockbox.mi4"
2794 appextra="recorder:gui:radio"
2795 plugins="yes"
2796 swcodec="yes"
2797 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2798 bootoutput="FW_YH820.mi4"
2799 # toolset is the tools within the tools directory that we build for
2800 # this particular target.
2801 toolset=$scramblebitmaptools
2802 # architecture, manufacturer and model for the target-tree build
2803 t_cpu="arm"
2804 t_manufacturer="samsung"
2805 t_model="yh820"
2808 141|samsungyh920)
2809 target_id=58
2810 modelname="samsungyh920"
2811 target="-DSAMSUNG_YH920"
2812 memory=32 # always
2813 arm7tdmicc
2814 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2815 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2816 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2817 output="rockbox.mi4"
2818 appextra="recorder:gui:radio"
2819 plugins="yes"
2820 swcodec="yes"
2821 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2822 bootoutput="PP5020.mi4"
2823 # toolset is the tools within the tools directory that we build for
2824 # this particular target.
2825 toolset=$scramblebitmaptools
2826 # architecture, manufacturer and model for the target-tree build
2827 t_cpu="arm"
2828 t_manufacturer="samsung"
2829 t_model="yh920"
2832 142|samsungyh925)
2833 target_id=59
2834 modelname="samsungyh925"
2835 target="-DSAMSUNG_YH925"
2836 memory=32 # always
2837 arm7tdmicc
2838 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2839 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2840 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2841 output="rockbox.mi4"
2842 appextra="recorder:gui:radio"
2843 plugins="yes"
2844 swcodec="yes"
2845 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2846 bootoutput="FW_YH925.mi4"
2847 # toolset is the tools within the tools directory that we build for
2848 # this particular target.
2849 toolset=$scramblebitmaptools
2850 # architecture, manufacturer and model for the target-tree build
2851 t_cpu="arm"
2852 t_manufacturer="samsung"
2853 t_model="yh925"
2856 143|samsungyps3)
2857 target_id=72
2858 modelname="samsungyps3"
2859 target="-DSAMSUNG_YPS3"
2860 memory=16 # always
2861 arm940tbecc
2862 tool="cp"
2863 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2864 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2865 output="rockbox.yps3"
2866 appextra="recorder:gui:radio"
2867 plugins="no" #FIXME
2868 swcodec="yes"
2869 toolset=$genericbitmaptools
2870 boottool="cp"
2871 bootoutput="rockboot.ebn"
2872 # architecture, manufacturer and model for the target-tree build
2873 t_cpu="arm"
2874 t_manufacturer="s5l8700"
2875 t_model="yps3"
2878 160|vibe500)
2879 target_id=67
2880 modelname="vibe500"
2881 target="-DPBELL_VIBE500"
2882 memory=32 # always
2883 arm7tdmicc
2884 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2885 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2886 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2887 output="rockbox.mi4"
2888 appextra="recorder:gui:radio"
2889 plugins="yes"
2890 swcodec="yes"
2891 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2892 bootoutput="jukebox.mi4"
2893 # toolset is the tools within the tools directory that we build for
2894 # this particular target.
2895 toolset=$scramblebitmaptools
2896 # architecture, manufacturer and model for the target-tree build
2897 t_cpu="arm"
2898 t_manufacturer="pbell"
2899 t_model="vibe500"
2902 170|mpiohd200)
2903 target_id=69
2904 modelname="mpiohd200"
2905 target="-DMPIO_HD200"
2906 memory=16 # always
2907 coldfirecc
2908 tool="$rootdir/tools/scramble -add=hd20"
2909 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2910 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2911 output="rockbox.mpio"
2912 bootoutput="bootloader.mpio"
2913 appextra="recorder:gui:radio"
2914 plugins="yes"
2915 swcodec="yes"
2916 # toolset is the tools within the tools directory that we build for
2917 # this particular target.
2918 toolset="$genericbitmaptools"
2919 # architecture, manufacturer and model for the target-tree build
2920 t_cpu="coldfire"
2921 t_manufacturer="mpio"
2922 t_model="hd200"
2925 171|mpiohd300)
2926 target_id=70
2927 modelname="mpiohd300"
2928 target="-DMPIO_HD300"
2929 memory=16 # always
2930 coldfirecc
2931 tool="$rootdir/tools/scramble -add=hd30"
2932 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2933 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2934 output="rockbox.mpio"
2935 bootoutput="bootloader.mpio"
2936 appextra="recorder:gui:radio"
2937 plugins="yes"
2938 swcodec="yes"
2939 # toolset is the tools within the tools directory that we build for
2940 # this particular target.
2941 toolset="$genericbitmaptools"
2942 # architecture, manufacturer and model for the target-tree build
2943 t_cpu="coldfire"
2944 t_manufacturer="mpio"
2945 t_model="hd300"
2948 200|sdlapp)
2949 target_id=73
2950 modelname="application"
2951 app_modelname="sdlapp"
2952 target="-DAPPLICATION"
2953 app_set_paths
2954 app_set_lcd_size
2955 memory=8
2956 uname=`uname`
2957 simcc "sdl-app"
2958 tool="cp "
2959 boottool="cp "
2960 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2961 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2962 output="rockbox"
2963 bootoutput="rockbox"
2964 appextra="recorder:gui:radio"
2965 plugins="yes"
2966 swcodec="yes"
2967 # architecture, manufacturer and model for the target-tree build
2968 t_cpu="hosted"
2969 t_manufacturer="sdl"
2970 t_model="app"
2973 201|android)
2974 target_id=74
2975 modelname="application"
2976 app_modelname="android"
2977 target="-DAPPLICATION"
2978 app_type="android"
2979 app_set_lcd_size
2980 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
2981 bindir="/data/data/org.rockbox/lib"
2982 libdir="/data/data/org.rockbox/app_rockbox"
2983 memory=8
2984 uname=`uname`
2985 androidcc
2986 tool="cp "
2987 boottool="cp "
2988 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2989 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2990 output="librockbox.so"
2991 bootoutput="librockbox.so"
2992 appextra="recorder:gui:radio"
2993 plugins=""
2994 swcodec="yes"
2995 # architecture, manufacturer and model for the target-tree build
2996 t_cpu="hosted"
2997 t_manufacturer="android"
2998 t_model="app"
3001 202|nokian8xx)
3002 target_id=75
3003 modelname="application"
3004 app_modelname="nokian8xx"
3005 app_type="sdl-app"
3006 target="-DAPPLICATION"
3007 app_set_lcd_size 800 480
3008 sharedir="/opt/rockbox/share/rockbox"
3009 bindir="/opt/rockbox/bin"
3010 libdir="/opt/rockbox/lib"
3011 memory=8
3012 uname=`uname`
3013 maemocc 4
3014 tool="cp "
3015 boottool="cp "
3016 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3017 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3018 output="rockbox"
3019 bootoutput="rockbox"
3020 appextra="recorder:gui:radio"
3021 plugins="yes"
3022 swcodec="yes"
3023 # architecture, manufacturer and model for the target-tree build
3024 t_cpu="hosted"
3025 t_manufacturer="maemo"
3026 t_model="app"
3029 203|nokian900)
3030 target_id=76
3031 modelname="application"
3032 app_modelname="nokian900"
3033 app_type="sdl-app"
3034 target="-DAPPLICATION"
3035 app_set_lcd_size 800 480
3036 sharedir="/opt/rockbox/share/rockbox"
3037 bindir="/opt/rockbox/bin"
3038 libdir="/opt/rockbox/lib"
3039 memory=8
3040 uname=`uname`
3041 maemocc 5
3042 tool="cp "
3043 boottool="cp "
3044 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3045 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3046 output="rockbox"
3047 bootoutput="rockbox"
3048 appextra="recorder:gui:radio"
3049 plugins="yes"
3050 swcodec="yes"
3051 # architecture, manufacturer and model for the target-tree build
3052 t_cpu="hosted"
3053 t_manufacturer="maemo"
3054 t_model="app"
3057 204|pandora)
3058 target_id=77
3059 modelname="application"
3060 app_modelname="pandora"
3061 app_type="sdl-app"
3062 target="-DAPPLICATION"
3063 app_set_lcd_size 800 480
3064 sharedir="rockbox/share"
3065 bindir="rockbox/bin"
3066 libdir="rockbox/lib"
3067 memory=8
3068 uname=`uname`
3069 pandoracc
3070 tool="cp "
3071 boottool="cp "
3072 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3073 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3074 output="rockbox"
3075 bootoutput="rockbox"
3076 appextra="recorder:gui:radio"
3077 plugins="yes"
3078 swcodec="yes"
3079 # architecture, manufacturer and model for the target-tree build
3080 t_cpu="hosted"
3081 t_manufacturer="pandora"
3082 t_model="app"
3086 echo "Please select a supported target platform!"
3087 exit 7
3090 esac
3092 echo "Platform set to $modelname"
3095 #remove start
3096 ############################################################################
3097 # Amount of memory, for those that can differ. They have $memory unset at
3098 # this point.
3101 if [ -z "$memory" ]; then
3102 case $target_id in
3104 if [ "$ARG_RAM" ]; then
3105 size=$ARG_RAM
3106 else
3107 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3108 size=`input`;
3110 case $size in
3111 60|64)
3112 memory="64"
3115 memory="32"
3117 esac
3120 if [ "$ARG_RAM" ]; then
3121 size=$ARG_RAM
3122 else
3123 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3124 size=`input`;
3126 case $size in
3128 memory="8"
3131 memory="2"
3133 esac
3135 esac
3136 echo "Memory size selected: $memory MB"
3137 [ "$ARG_TYPE" ] || echo ""
3139 #remove end
3141 ##################################################################
3142 # Figure out build "type"
3145 # the ifp7x0 is the only platform that supports building a gdb stub like
3146 # this
3147 case $modelname in
3148 iriverifp7xx)
3149 gdbstub="(G)DB stub, "
3151 sansae200r|sansae200)
3152 gdbstub="(I)nstaller, "
3154 sansac200)
3155 gdbstub="(E)raser, "
3159 esac
3160 if [ "$ARG_TYPE" ]; then
3161 btype=$ARG_TYPE
3162 else
3163 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
3164 btype=`input`;
3167 case $btype in
3168 [Ii])
3169 appsdir='\$(ROOTDIR)/bootloader'
3170 apps="bootloader"
3171 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3172 bootloader="1"
3173 echo "e200R-installer build selected"
3175 [Ee])
3176 appsdir='\$(ROOTDIR)/bootloader'
3177 apps="bootloader"
3178 echo "C2(4)0 or C2(5)0"
3179 variant=`input`
3180 case $variant in
3182 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
3183 echo "c240 eraser build selected"
3186 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
3187 echo "c240 eraser build selected"
3189 esac
3190 bootloader="1"
3191 echo "c200 eraser build selected"
3193 [Bb])
3194 if test $t_manufacturer = "archos"; then
3195 # Archos SH-based players do this somewhat differently for
3196 # some reason
3197 appsdir='\$(ROOTDIR)/flash/bootbox'
3198 apps="bootbox"
3199 else
3200 appsdir='\$(ROOTDIR)/bootloader'
3201 apps="bootloader"
3202 flash=""
3203 if test -n "$boottool"; then
3204 tool="$boottool"
3206 if test -n "$bootoutput"; then
3207 output=$bootoutput
3210 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3211 bootloader="1"
3212 echo "Bootloader build selected"
3214 [Ss])
3215 if [ "$modelname" = "sansae200r" ]; then
3216 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3217 exit 8
3219 debug="-DDEBUG"
3220 simulator="yes"
3221 extradefines="$extradefines -DSIMULATOR"
3222 archosrom=""
3223 flash=""
3224 echo "Simulator build selected"
3226 [Aa]*)
3227 echo "Advanced build selected"
3228 whichadvanced $btype
3230 [Gg])
3231 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3232 appsdir='\$(ROOTDIR)/gdb'
3233 apps="stub"
3234 case $modelname in
3235 iriverifp7xx)
3236 output="stub.wma"
3240 esac
3241 echo "GDB stub build selected"
3243 [Mm])
3244 toolset='';
3245 apps="manual"
3246 echo "Manual build selected"
3248 [Cc])
3249 uname=`uname`
3250 simcc "checkwps"
3251 toolset='';
3252 t_cpu='';
3253 GCCOPTS='';
3254 extradefines="$extradefines -DDEBUG"
3255 appsdir='\$(ROOTDIR)/tools/checkwps';
3256 output='checkwps.'${modelname};
3257 archosrom='';
3258 echo "CheckWPS build selected"
3260 [Dd])
3261 uname=`uname`
3262 simcc "database"
3263 toolset='';
3264 t_cpu='';
3265 GCCOPTS='';
3266 appsdir='\$(ROOTDIR)/tools/database';
3267 archosrom='';
3269 case $uname in
3270 CYGWIN*|MINGW*)
3271 output="database_${modelname}.exe"
3274 output='database.'${modelname};
3276 esac
3278 echo "Database tool build selected"
3281 if [ "$modelname" = "sansae200r" ]; then
3282 echo "Do not use the e200R target for regular builds. Use e200 instead."
3283 exit 8
3285 debug=""
3286 btype="N" # set it explicitly since RET only gets here as well
3287 echo "Normal build selected"
3290 esac
3291 # to be able running "make manual" from non-manual configuration
3292 case $modelname in
3293 archosrecorderv2)
3294 manualdev="archosfmrecorder"
3296 iriverh1??)
3297 manualdev="iriverh100"
3299 ipodmini2g)
3300 manualdev="ipodmini1g"
3303 manualdev=$modelname
3305 esac
3307 if [ -z "$debug" ]; then
3308 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3311 echo "Using source code root directory: $rootdir"
3313 # this was once possible to change at build-time, but no more:
3314 language="english"
3316 uname=`uname`
3318 if [ "yes" = "$simulator" ]; then
3319 # setup compiler and things for simulator
3320 simcc "sdl-sim"
3322 if [ -d "simdisk" ]; then
3323 echo "Subdirectory 'simdisk' already present"
3324 else
3325 mkdir simdisk
3326 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3330 # Now, figure out version number of the (gcc) compiler we are about to use
3331 gccver=`$CC -dumpversion`;
3333 # figure out the binutil version too and display it, mostly for the build
3334 # system etc to be able to see it easier
3335 if [ $uname = "Darwin" ]; then
3336 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3337 else
3338 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3341 if [ -z "$gccver" ]; then
3342 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3343 echo "[WARNING] this may cause your build to fail since we cannot do the"
3344 echo "[WARNING] checks we want now."
3345 else
3347 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3348 # DEPEND on it
3350 num1=`echo $gccver | cut -d . -f1`
3351 num2=`echo $gccver | cut -d . -f2`
3352 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3354 # This makes:
3355 # 3.3.X => 303
3356 # 3.4.X => 304
3357 # 2.95.3 => 295
3359 echo "Using $CC $gccver ($gccnum)"
3361 if test "$gccnum" -ge "400"; then
3362 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3363 # so we ignore that warnings for now
3364 # -Wno-pointer-sign
3365 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3368 if test "$gccnum" -ge "402"; then
3369 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3370 # and later would throw it for several valid cases
3371 GCCOPTS="$GCCOPTS -Wno-override-init"
3374 case $prefix in
3375 ""|"$CROSS_COMPILE")
3376 # simulator
3378 i586-mingw32msvc-)
3379 # cross-compile for win32
3382 # Verify that the cross-compiler is of a recommended version!
3383 if test "$gccver" != "$gccchoice"; then
3384 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3385 echo "WARNING: version $gccchoice!"
3386 echo "WARNING: This may cause your build to fail since it may be a version"
3387 echo "WARNING: that isn't functional or known to not be the best choice."
3388 echo "WARNING: If you suffer from build problems, you know that this is"
3389 echo "WARNING: a likely source for them..."
3392 esac
3397 echo "Using $LD $ldver"
3399 # check the compiler for SH platforms
3400 if test "$CC" = "sh-elf-gcc"; then
3401 if test "$gccnum" -lt "400"; then
3402 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3403 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3404 else
3405 # figure out patch status
3406 gccpatch=`$CC --version`;
3408 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3409 echo "gcc $gccver is rockbox patched"
3410 # then convert -O to -Os to get smaller binaries!
3411 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3412 else
3413 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3414 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3419 if test "$CC" = "m68k-elf-gcc"; then
3420 # convert -O to -Os to get smaller binaries!
3421 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3424 if [ "$ARG_CCACHE" = "1" ]; then
3425 echo "Enable ccache for building"
3426 ccache="ccache"
3427 elif [ "$ARG_CCACHE" != "0" ]; then
3428 ccache=`findtool ccache`
3429 if test -n "$ccache"; then
3430 echo "Found and uses ccache ($ccache)"
3434 # figure out the full path to the various commands if possible
3435 HOSTCC=`findtool gcc --lit`
3436 HOSTAR=`findtool ar --lit`
3437 CC=`findtool ${CC} --lit`
3438 LD=`findtool ${AR} --lit`
3439 AR=`findtool ${AR} --lit`
3440 AS=`findtool ${AS} --lit`
3441 OC=`findtool ${OC} --lit`
3442 WINDRES=`findtool ${WINDRES} --lit`
3443 DLLTOOL=`findtool ${DLLTOOL} --lit`
3444 DLLWRAP=`findtool ${DLLWRAP} --lit`
3445 RANLIB=`findtool ${RANLIB} --lit`
3447 if test -n "$ccache"; then
3448 CC="$ccache $CC"
3451 if test "$ARG_ARM_THUMB" = "1"; then
3452 extradefines="$extradefines -DUSE_THUMB"
3453 CC="$toolsdir/thumb-cc.py $CC"
3456 if test "X$endian" = "Xbig"; then
3457 defendian="ROCKBOX_BIG_ENDIAN"
3458 else
3459 defendian="ROCKBOX_LITTLE_ENDIAN"
3462 if [ "$ARG_RBDIR" != "" ]; then
3463 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3464 rbdir="/"$ARG_RBDIR
3465 else
3466 rbdir=$ARG_RBDIR
3468 echo "Using alternate rockbox dir: ${rbdir}"
3471 sed > autoconf.h \
3472 -e "s<@ENDIAN@<${defendian}<g" \
3473 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3474 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3475 -e "s<@config_rtc@<$config_rtc<g" \
3476 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3477 -e "s<@thread_support@<$thread_support<g" \
3478 -e "s<@RBDIR@<${rbdir}<g" \
3479 -e "s<@sharepath@<${sharedir}<g" \
3480 -e "s<@binpath@<${bindir}<g" \
3481 -e "s<@libpath@<${libdir}<g" \
3482 -e "s<@have_backlight@<$have_backlight<g" \
3483 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3484 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3485 -e "s<@lcd_width@<$app_lcd_width<g" \
3486 -e "s<@lcd_height@<$app_lcd_height<g" \
3487 <<EOF
3488 /* This header was made by configure */
3489 #ifndef __BUILD_AUTOCONF_H
3490 #define __BUILD_AUTOCONF_H
3492 /* Define endianess for the target or simulator platform */
3493 #define @ENDIAN@ 1
3495 /* Define this if you build rockbox to support the logf logging and display */
3496 #undef ROCKBOX_HAS_LOGF
3498 /* Define this to record a chart with timings for the stages of boot */
3499 #undef DO_BOOTCHART
3501 /* optional define for a backlight modded Ondio */
3502 @have_backlight@
3504 /* optional define for FM radio mod for iAudio M5 */
3505 @have_fmradio_in@
3507 /* optional define for ATA poweroff on Player */
3508 @have_ata_poweroff@
3510 /* optional defines for RTC mod for h1x0 */
3511 @config_rtc@
3512 @have_rtc_alarm@
3514 /* the threading backend we use */
3515 #define @thread_support@
3517 /* lcd dimensions for application builds from configure */
3518 @lcd_width@
3519 @lcd_height@
3521 /* root of Rockbox */
3522 #define ROCKBOX_DIR "@RBDIR@"
3523 #define ROCKBOX_SHARE_PATH "@sharepath@"
3524 #define ROCKBOX_BINARY_PATH "@binpath@"
3525 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3527 #endif /* __BUILD_AUTOCONF_H */
3530 if test -n "$t_cpu"; then
3531 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3533 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3534 # Maemo needs the SDL port, too
3535 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3536 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3537 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3538 # Pandora needs the SDL port, too
3539 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3540 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3541 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3542 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3543 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3546 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3547 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3548 GCCOPTS="$GCCOPTS"
3551 if test "$simulator" = "yes"; then
3552 # add simul make stuff on the #SIMUL# line
3553 simmagic1="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3554 simmagic2="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3555 else
3556 # delete the lines that match
3557 simmagic1='/@SIMUL1@/D'
3558 simmagic2='/@SIMUL2@/D'
3561 if test "$swcodec" = "yes"; then
3562 voicetoolset="rbspeexenc voicefont wavtrim"
3563 else
3564 voicetoolset="voicefont wavtrim"
3567 if test "$apps" = "apps"; then
3568 # only when we build "real" apps we build the .lng files
3569 buildlangs="langs"
3572 #### Fix the cmdline ###
3573 if [ "$ARG_CCACHE" = "1" ]; then
3574 cmdline="--ccache "
3575 elif [ "$ARG_CCACHE" = "0" ]; then
3576 cmdline="--no-ccache "
3578 if [ "$ARG_ARM_EABI" = "1" ]; then
3579 cmdline="$cmdline--eabi "
3581 if [ -n "$ARG_PREFIX" ]; then
3582 cmdline="$cmdline--prefix=\$(PREFIX) "
3584 if [ "$modelname" = "application" ]; then
3585 cmdline="$cmdline--target=$app_modelname --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3586 else
3587 cmdline="$cmdline--target=\$(MODELNAME) "
3590 cmdline="$cmdline--ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3592 ### end of cmdline
3594 sed > Makefile \
3595 -e "s<@ROOTDIR@<${rootdir}<g" \
3596 -e "s<@DEBUG@<${debug}<g" \
3597 -e "s<@MEMORY@<${memory}<g" \
3598 -e "s<@TARGET_ID@<${target_id}<g" \
3599 -e "s<@TARGET@<${target}<g" \
3600 -e "s<@CPU@<${t_cpu}<g" \
3601 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3602 -e "s<@MODELNAME@<${modelname}<g" \
3603 -e "s<@LANGUAGE@<${language}<g" \
3604 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3605 -e "s<@PWD@<${pwd}<g" \
3606 -e "s<@HOSTCC@<${HOSTCC}<g" \
3607 -e "s<@HOSTAR@<${HOSTAR}<g" \
3608 -e "s<@CC@<${CC}<g" \
3609 -e "s<@LD@<${LD}<g" \
3610 -e "s<@AR@<${AR}<g" \
3611 -e "s<@AS@<${AS}<g" \
3612 -e "s<@OC@<${OC}<g" \
3613 -e "s<@WINDRES@<${WINDRES}<g" \
3614 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3615 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3616 -e "s<@RANLIB@<${RANLIB}<g" \
3617 -e "s<@TOOL@<${tool}<g" \
3618 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3619 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3620 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3621 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3622 -e "s<@OUTPUT@<${output}<g" \
3623 -e "s<@APPEXTRA@<${appextra}<g" \
3624 -e "s<@ARCHOSROM@<${archosrom}<g" \
3625 -e "s<@FLASHFILE@<${flash}<g" \
3626 -e "s<@PLUGINS@<${plugins}<g" \
3627 -e "s<@CODECS@<${swcodec}<g" \
3628 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3629 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3630 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3631 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3632 -e "s<@LDOPTS@<${LDOPTS}<g" \
3633 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3634 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3635 -e "s<@EXTRADEF@<${extradefines}<g" \
3636 -e "s<@APPSDIR@<${appsdir}<g" \
3637 -e "s<@FIRMDIR@<${firmdir}<g" \
3638 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3639 -e "s<@APPS@<${apps}<g" \
3640 -e "s<@APP_TYPE@<${app_type}<g" \
3641 -e "s<@GCCVER@<${gccver}<g" \
3642 -e "s<@GCCNUM@<${gccnum}<g" \
3643 -e "s<@UNAME@<${uname}<g" \
3644 -e "s<@ENDIAN@<${defendian}<g" \
3645 -e "s<@TOOLSET@<${toolset}<g" \
3646 -e "${simmagic1}" \
3647 -e "${simmagic2}" \
3648 -e "s<@MANUALDEV@<${manualdev}<g" \
3649 -e "s<@ENCODER@<${ENC_CMD}<g" \
3650 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3651 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3652 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3653 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3654 -e "s<@LANGS@<${buildlangs}<g" \
3655 -e "s<@USE_ELF@<${USE_ELF}<g" \
3656 -e "s<@RBDIR@<${rbdir}<g" \
3657 -e "s<@sharepath@<${sharedir}<g" \
3658 -e "s<@binpath@<${bindir}<g" \
3659 -e "s<@libpath@<${libdir}<g" \
3660 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3661 -e "s<@CMDLINE@<$cmdline<g" \
3662 -e "s<@SDLCONFIG@<$sdl<g" \
3663 <<EOF
3664 ## Automatically generated. http://www.rockbox.org/
3666 export ROOTDIR=@ROOTDIR@
3667 export FIRMDIR=@FIRMDIR@
3668 export APPSDIR=@APPSDIR@
3669 export TOOLSDIR=@TOOLSDIR@
3670 export DOCSDIR=\$(ROOTDIR)/docs
3671 export MANUALDIR=\${ROOTDIR}/manual
3672 export DEBUG=@DEBUG@
3673 export MODELNAME=@MODELNAME@
3674 export ARCHOSROM=@ARCHOSROM@
3675 export FLASHFILE=@FLASHFILE@
3676 export TARGET_ID=@TARGET_ID@
3677 export TARGET=@TARGET@
3678 export CPU=@CPU@
3679 export MANUFACTURER=@MANUFACTURER@
3680 export OBJDIR=@PWD@
3681 export BUILDDIR=@PWD@
3682 export LANGUAGE=@LANGUAGE@
3683 export VOICELANGUAGE=@VOICELANGUAGE@
3684 export MEMORYSIZE=@MEMORY@
3685 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3686 export MKFIRMWARE=@TOOL@
3687 export BMP2RB_MONO=@BMP2RB_MONO@
3688 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3689 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3690 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3691 export BINARY=@OUTPUT@
3692 export APPEXTRA=@APPEXTRA@
3693 export ENABLEDPLUGINS=@PLUGINS@
3694 export SOFTWARECODECS=@CODECS@
3695 export EXTRA_DEFINES=@EXTRADEF@
3696 export HOSTCC=@HOSTCC@
3697 export HOSTAR=@HOSTAR@
3698 export CC=@CC@
3699 export LD=@LD@
3700 export AR=@AR@
3701 export AS=@AS@
3702 export OC=@OC@
3703 export WINDRES=@WINDRES@
3704 export DLLTOOL=@DLLTOOL@
3705 export DLLWRAP=@DLLWRAP@
3706 export RANLIB=@RANLIB@
3707 export PREFIX=@PREFIX@
3708 export PROFILE_OPTS=@PROFILE_OPTS@
3709 export APP_TYPE=@APP_TYPE@
3710 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3711 export GCCOPTS=@GCCOPTS@
3712 export TARGET_INC=@TARGET_INC@
3713 export LOADADDRESS=@LOADADDRESS@
3714 export SHARED_FLAG=@SHARED_FLAG@
3715 export LDOPTS=@LDOPTS@
3716 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3717 export GCCVER=@GCCVER@
3718 export GCCNUM=@GCCNUM@
3719 export UNAME=@UNAME@
3720 export MANUALDEV=@MANUALDEV@
3721 export TTS_OPTS=@TTS_OPTS@
3722 export TTS_ENGINE=@TTS_ENGINE@
3723 export ENC_OPTS=@ENC_OPTS@
3724 export ENCODER=@ENCODER@
3725 export USE_ELF=@USE_ELF@
3726 export RBDIR=@RBDIR@
3727 export ROCKBOX_SHARE_PATH=@sharepath@
3728 export ROCKBOX_BINARY_PATH=@binpath@
3729 export ROCKBOX_LIBRARY_PATH=@libpath@
3730 export SDLCONFIG=@SDLCONFIG@
3732 CONFIGURE_OPTIONS=@CMDLINE@
3734 include \$(TOOLSDIR)/root.make
3738 echo "Created Makefile"