Remove unecessary casting
[maemo-rb.git] / tools / configure
blobd9324fdb8211d3b3ad7b3c0aac14769a9c24661c
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_lcd_width=
30 app_lcd_height=
31 app_lcd_orientation=
32 cmdline="$@"
34 # Begin Function Definitions
36 input() {
37 read response
38 echo $response
41 prefixtools () {
42 prefix="$1"
43 CC=${prefix}gcc
44 WINDRES=${prefix}windres
45 DLLTOOL=${prefix}dlltool
46 DLLWRAP=${prefix}dllwrap
47 RANLIB=${prefix}ranlib
48 LD=${prefix}ld
49 AR=${prefix}ar
50 AS=${prefix}as
51 OC=${prefix}objcopy
54 app_set_paths () {
55 # setup files and paths depending on the platform
56 if [ -z "$ARG_PREFIX" ]; then
57 sharedir="/usr/local/share/rockbox"
58 bindir="/usr/local/bin"
59 libdir="/usr/local/lib"
60 else
61 if [ -d "$ARG_PREFIX" ]; then
62 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
63 ARG_PREFIX=`realpath $ARG_PREFIX`
64 if [ "0" != "$?" ]; then
65 echo "ERROR: Could not get prefix path (is realpath installed?)."
66 exit
69 sharedir="$ARG_PREFIX/share/rockbox"
70 bindir="$ARG_PREFIX/bin"
71 libdir="$ARG_PREFIX/lib"
72 else
73 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
74 exit
79 # Set the application LCD size according to the following priorities:
80 # 1) If --lcdwidth and --lcdheight are set, use them
81 # 2) If a size is passed to the app_set_lcd_size() function, use that
82 # 3) Otherwise ask the user
83 app_set_lcd_size () {
84 if [ -z "$ARG_LCDWIDTH" ]; then
85 ARG_LCDWIDTH=$1
87 if [ -z "$ARG_LCDHEIGHT" ]; then
88 ARG_LCDHEIGHT=$2
91 echo "Enter the LCD width (default: 320)"
92 if [ -z "$ARG_LCDWIDTH" ]; then
93 app_lcd_width=`input`
94 else
95 app_lcd_width="$ARG_LCDWIDTH"
97 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
98 echo "Enter the LCD height (default: 480)"
99 if [ -z "$ARG_LCDHEIGHT" ]; then
100 app_lcd_height=`input`
101 else
102 app_lcd_height="$ARG_LCDHEIGHT"
104 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
105 if [ $app_lcd_width -gt $app_lcd_height ]; then
106 lcd_orientation="landscape"
107 else
108 lcd_orientation="portrait"
110 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
111 ARG_LCDWIDTH=$app_lcd_width
112 ARG_LCDHEIGHT=$app_lcd_height
114 app_lcd_width="#define LCD_WIDTH $app_lcd_width"
115 app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
118 findarmgcc() {
119 if [ "$ARG_ARM_EABI" != "0" ]; then
120 prefixtools arm-elf-eabi-
121 gccchoice="4.4.4"
122 else
123 prefixtools arm-elf-
124 gccchoice="4.0.3"
128 # scan the $PATH for the given command
129 findtool(){
130 file="$1"
132 IFS=":"
133 for path in $PATH
135 # echo "checks for $file in $path" >&2
136 if test -f "$path/$file"; then
137 echo "$path/$file"
138 return
140 done
141 # check whether caller wants literal return value if not found
142 if [ "$2" = "--lit" ]; then
143 echo "$file"
147 # scan the $PATH for sdl-config - check whether for a (cross-)win32
148 # sdl as requested
149 findsdl(){
150 file="sdl-config"
151 winbuild="$1"
153 IFS=":"
154 for path in $PATH
156 #echo "checks for $file in $path" >&2
157 if test -f "$path/$file"; then
158 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
159 if [ "yes" = "${winbuild}" ]; then
160 echo "$path/$file"
161 return
163 else
164 if [ "yes" != "${winbuild}" ]; then
165 echo "$path/$file"
166 return
170 done
173 # check for availability of sigaltstack to support our thread engine
174 check_sigaltstack() {
175 cat >$tmpdir/check_threads.c <<EOF
176 #include <signal.h>
177 int main(int argc, char **argv)
179 #ifndef NULL
180 #define NULL (void*)0
181 #endif
182 sigaltstack(NULL, NULL);
183 return 0;
186 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 1> /dev/null
187 result=$?
188 rm -rf $tmpdir/check_threads*
189 echo $result
192 # check for availability of Fiber on Win32 to support our thread engine
193 check_fiber() {
194 cat >$tmpdir/check_threads.c <<EOF
195 #include <windows.h>
196 int main(int argc, char **argv)
198 ConvertThreadToFiber(NULL);
199 return 0;
202 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 2>/dev/null
203 result=$?
204 rm -rf $tmpdir/check_threads*
205 echo $result
208 simcc () {
210 # default tool setup for native building
211 prefixtools "$CROSS_COMPILE"
212 ARG_ARM_THUMB=0 # can't use thumb in native builds
214 app_type=$1
215 winbuild=""
216 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef// -e s/-O//`
217 GCCOPTS="$GCCOPTS -fno-builtin -g"
218 GCCOPTIMIZE=''
219 LDOPTS='-lm' # button-sdl.c uses sqrt()
220 sigaltstack=""
221 fibers=""
223 # default output binary name, don't override app_get_platform()
224 if [ "$app_type" != "sdl-app" ]; then
225 output="rockboxui"
228 # default share option, override below if needed
229 SHARED_LDFLAG="-shared"
230 SHARED_CFLAGS="-fPIC -fvisibility=hidden"
232 if [ "$win32crosscompile" = "yes" ]; then
233 LDOPTS="$LDOPTS -mconsole"
234 output="$output.exe"
235 winbuild="yes"
236 SHARED_CFLAGS=''
237 else
238 case $uname in
239 CYGWIN*)
240 echo "Cygwin host detected"
242 fibers=`check_fiber`
243 LDOPTS="$LDOPTS -mconsole"
244 output="$output.exe"
245 winbuild="yes"
246 SHARED_CFLAGS=''
249 MINGW*)
250 echo "MinGW host detected"
252 fibers=`check_fiber`
253 LDOPTS="$LDOPTS -mconsole"
254 output="$output.exe"
255 winbuild="yes"
258 Linux)
259 sigaltstack=`check_sigaltstack`
260 echo "Linux host detected"
261 LDOPTS="$LDOPTS -ldl"
264 FreeBSD)
265 sigaltstack=`check_sigaltstack`
266 echo "FreeBSD host detected"
267 LDOPTS="$LDOPTS -ldl"
270 Darwin)
271 sigaltstack=`check_sigaltstack`
272 echo "Darwin host detected"
273 LDOPTS="$LDOPTS -ldl"
274 SHARED_LDFLAG="-dynamiclib -Wl\,-single_module"
277 SunOS)
278 sigaltstack=`check_sigaltstack`
279 echo "*Solaris host detected"
281 GCCOPTS="$GCCOPTS -fPIC"
282 LDOPTS="$LDOPTS -ldl"
286 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
287 exit 1
289 esac
292 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
293 sdl=`findsdl $winbuild`
295 if [ -n `echo $app_type | grep "sdl"` ]; then
296 if [ -z "$sdl" ]; then
297 echo "configure didn't find sdl-config, which indicates that you"
298 echo "don't have SDL (properly) installed. Please correct and"
299 echo "re-run configure!"
300 exit 2
301 else
302 # generic sdl-config checker
303 GCCOPTS="$GCCOPTS `$sdl --cflags`"
304 LDOPTS="$LDOPTS `$sdl --libs`"
309 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
311 if test "X$win32crosscompile" != "Xyes"; then
312 if test "`uname -m`" = "i686"; then
313 echo "Enabling MMX support"
314 GCCOPTS="$GCCOPTS -mmmx"
316 # x86_64 supports MMX by default
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 arm7ejscc () {
505 findarmgcc
506 GCCOPTS="$CCOPTS -march=armv5te"
507 GCCOPTIMIZE="-fomit-frame-pointer"
508 endian="little"
511 mipselcc () {
512 prefixtools mipsel-elf-
513 # mips is predefined, but we want it for paths. use __mips instead
514 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
515 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
516 GCCOPTIMIZE="-fomit-frame-pointer"
517 endian="little"
518 gccchoice="4.1.2"
521 maemocc () {
522 # Scratchbox sets up "gcc" based on the active target
523 prefixtools ""
525 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
526 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
527 GCCOPTIMIZE=''
528 LDOPTS="-lm -ldl $LDOPTS"
529 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
530 SHARED_LDFLAG="-shared"
531 SHARED_CFLAGS=''
532 endian="little"
533 thread_support="HAVE_SIGALTSTACK_THREADS"
535 is_n900=0
536 # Determine maemo version
537 if pkg-config --atleast-version=5 maemo-version; then
538 if [ "$1" == "4" ]; then
539 echo "ERROR: Maemo 4 SDK required."
540 exit 1
542 extradefines="$extradefines -DMAEMO5"
543 echo "Found N900 maemo version"
544 is_n900=1
545 elif pkg-config --atleast-version=4 maemo-version; then
546 if [ "$1" == "5" ]; then
547 echo "ERROR: Maemo 5 SDK required."
548 exit 1
550 extradefines="$extradefines -DMAEMO4"
551 echo "Found N8xx maemo version"
552 else
553 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
554 exit 1
557 # SDL
558 if [ $is_n900 -eq 1 ]; then
559 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
560 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
561 else
562 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
563 LDOPTS="$LDOPTS `sdl-config --libs`"
566 # glib and libosso support
567 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
568 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
570 # libhal support: Battery monitoring
571 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
572 LDOPTS="$LDOPTS `pkg-config --libs hal`"
574 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
575 if [ $is_n900 -eq 1 ]; then
576 # gstreamer support: Audio output.
577 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
578 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
580 # N900 specific: libplayback support
581 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
582 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
584 # N900 specific: Enable ARMv7 NEON support
585 if sb-conf show -A |grep -q -i arm; then
586 echo "Detected ARM target"
587 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
588 extradefines="$extradefines -DMAEMO_ARM_BUILD"
589 else
590 echo "Detected x86 target"
592 else
593 # N8xx specific: Enable armv5te instructions
594 if sb-conf show -A |grep -q -i arm; then
595 echo "Detected ARM target"
596 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
597 extradefines="$extradefines -DMAEMO_ARM_BUILD"
598 else
599 echo "Detected x86 target"
604 pandoracc () {
605 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
606 # You have to use the sebt3 toolchain:
607 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
609 PNDSDK="/usr/local/angstrom/arm"
610 if [ ! -x $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc ]; then
611 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
612 exit
615 PATH=$PNDSDK/bin:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi/usr/bin
616 PKG_CONFIG_PATH=$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib/pkgconfig
617 LDOPTS="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
618 PKG_CONFIG="pkg-config"
620 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
621 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
622 GCCOPTIMIZE=''
623 LDOPTS="-lm -ldl $LDOPTS"
624 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
625 SHARED_LDFLAG="-shared"
626 SHARED_CFLAGS=''
627 endian="little"
628 thread_support="HAVE_SIGALTSTACK_THREADS"
630 # Include path
631 GCCOPTS="-I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
633 # Set up compiler
634 gccchoice="4.3.3"
635 prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
637 # Detect SDL
638 GCCOPTS="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
639 LDOPTS="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
641 # Compiler options
642 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
643 GCCOPTS="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
644 GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant"
647 androidcc () {
648 if [ -z "$ANDROID_SDK_PATH" ]; then
649 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
650 echo "environment variable point to the root directory of the Android SDK."
651 exit
653 if [ -z "$ANDROID_NDK_PATH" ]; then
654 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
655 echo "environment variable point to the root directory of the Android NDK."
656 exit
658 buildhost=$(uname | tr "[:upper:]" "[:lower:]")
659 gccchoice="4.4.3"
660 gcctarget="arm-linux-androideabi-"
661 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
662 PATH=$PATH:$gccprefix/bin
663 prefixtools $gcctarget
664 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
665 GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
666 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
667 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
668 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
669 LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog"
670 endian="little"
671 SHARED_LDFLAG="-shared"
672 SHARED_CFLAGS=''
675 whichadvanced () {
676 atype=`echo "$1" | cut -c 2-`
677 ##################################################################
678 # Prompt for specific developer options
680 if [ "$atype" ]; then
681 interact=
682 else
683 interact=1
684 echo ""
685 printf "Enter your developer options (press only enter when done)\n\
686 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
687 (T)est plugins, S(m)all C lib:"
688 if [ "$memory" = "2" ]; then
689 printf ", (8)MB MOD"
691 if [ "$modelname" = "archosplayer" ]; then
692 printf ", Use (A)TA poweroff"
694 if [ "$t_model" = "ondio" ]; then
695 printf ", (B)acklight MOD"
697 if [ "$modelname" = "iaudiom5" ]; then
698 printf ", (F)M radio MOD"
700 if [ "$modelname" = "iriverh120" ]; then
701 printf ", (R)TC MOD"
703 echo ""
706 cont=1
707 while [ $cont = "1" ]; do
709 if [ "$interact" ]; then
710 option=`input`
711 else
712 option=`echo "$atype" | cut -c 1`
715 case $option in
716 [Dd])
717 if [ "yes" = "$profile" ]; then
718 echo "Debug is incompatible with profiling"
719 else
720 echo "DEBUG build enabled"
721 use_debug="yes"
724 [Ll])
725 echo "logf() support enabled"
726 logf="yes"
728 [Mm])
729 echo "Using Rockbox' small C library"
730 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
732 [Tt])
733 echo "Including test plugins"
734 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
736 [Cc])
737 echo "bootchart enabled (logf also enabled)"
738 bootchart="yes"
739 logf="yes"
741 [Ss])
742 echo "Simulator build enabled"
743 simulator="yes"
745 [Pp])
746 if [ "yes" = "$use_debug" ]; then
747 echo "Profiling is incompatible with debug"
748 else
749 echo "Profiling support is enabled"
750 profile="yes"
753 [Vv])
754 echo "Voice build selected"
755 voice="yes"
758 if [ "$memory" = "2" ]; then
759 memory="8"
760 echo "Memory size selected: 8MB"
763 [Aa])
764 if [ "$modelname" = "archosplayer" ]; then
765 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
766 echo "ATA power off enabled"
769 [Bb])
770 if [ "$t_model" = "ondio" ]; then
771 have_backlight="#define HAVE_BACKLIGHT"
772 echo "Backlight functions enabled"
775 [Ff])
776 if [ "$modelname" = "iaudiom5" ]; then
777 have_fmradio_in="#define HAVE_FMRADIO_IN"
778 echo "FM radio functions enabled"
781 [Rr])
782 if [ "$modelname" = "iriverh120" ]; then
783 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
784 have_rtc_alarm="#define HAVE_RTC_ALARM"
785 echo "RTC functions enabled (DS1339/DS3231)"
788 [Ww])
789 echo "Enabling Windows 32 cross-compiling"
790 win32crosscompile="yes"
792 "") # Match enter press when finished with advanced options
793 cont=0
796 echo "[ERROR] Option $option unsupported"
798 esac
799 if [ "$interact" ]; then
800 btype="$btype$option"
801 else
802 atype=`echo "$atype" | cut -c 2-`
803 [ "$atype" ] || cont=0
805 done
806 echo "done"
808 if [ "yes" = "$voice" ]; then
809 # Ask about languages to build
810 picklang
811 voicelanguage=`whichlang`
812 echo "Voice language set to $voicelanguage"
814 # Configure encoder and TTS engine for each language
815 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
816 voiceconfig "$thislang"
817 done
819 if [ "yes" = "$use_debug" ]; then
820 debug="-DDEBUG"
821 GCCOPTS="$GCCOPTS -g -DDEBUG"
823 if [ "yes" = "$logf" ]; then
824 use_logf="#define ROCKBOX_HAS_LOGF 1"
826 if [ "yes" = "$bootchart" ]; then
827 use_bootchart="#define DO_BOOTCHART 1"
829 if [ "yes" = "$simulator" ]; then
830 debug="-DDEBUG"
831 extradefines="$extradefines -DSIMULATOR"
832 archosrom=""
833 flash=""
835 if [ "yes" = "$profile" ]; then
836 extradefines="$extradefines -DRB_PROFILE"
837 PROFILE_OPTS="-finstrument-functions"
841 # Configure voice settings
842 voiceconfig () {
843 thislang=$1
844 if [ ! "$ARG_TTS" ]; then
845 echo "Building $thislang voice for $modelname. Select options"
846 echo ""
849 if [ -n "`findtool flite`" ]; then
850 FLITE="F(l)ite "
851 FLITE_OPTS=""
852 DEFAULT_TTS="flite"
853 DEFAULT_TTS_OPTS=$FLITE_OPTS
854 DEFAULT_NOISEFLOOR="500"
855 DEFAULT_CHOICE="L"
857 if [ -n "`findtool espeak`" ]; then
858 ESPEAK="(e)Speak "
859 ESPEAK_OPTS=""
860 DEFAULT_TTS="espeak"
861 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
862 DEFAULT_NOISEFLOOR="500"
863 DEFAULT_CHOICE="e"
865 if [ -n "`findtool festival`" ]; then
866 FESTIVAL="(F)estival "
867 case "$thislang" in
868 "italiano")
869 FESTIVAL_OPTS="--language italian"
871 "espanol")
872 FESTIVAL_OPTS="--language spanish"
874 "finnish")
875 FESTIVAL_OPTS="--language finnish"
877 "czech")
878 FESTIVAL_OPTS="--language czech"
881 FESTIVAL_OPTS=""
883 esac
884 DEFAULT_TTS="festival"
885 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
886 DEFAULT_NOISEFLOOR="500"
887 DEFAULT_CHOICE="F"
889 if [ -n "`findtool swift`" ]; then
890 SWIFT="S(w)ift "
891 SWIFT_OPTS=""
892 DEFAULT_TTS="swift"
893 DEFAULT_TTS_OPTS=$SWIFT_OPTS
894 DEFAULT_NOISEFLOOR="500"
895 DEFAULT_CHOICE="w"
897 # Allow SAPI if Windows is in use
898 if [ -n "`findtool winver`" ]; then
899 SAPI="(S)API "
900 SAPI_OPTS=""
901 DEFAULT_TTS="sapi"
902 DEFAULT_TTS_OPTS=$SAPI_OPTS
903 DEFAULT_NOISEFLOOR="500"
904 DEFAULT_CHOICE="S"
907 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
908 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
909 exit 3
912 if [ "$ARG_TTS" ]; then
913 option=$ARG_TTS
914 else
915 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
916 option=`input`
918 advopts="$advopts --tts=$option"
919 case "$option" in
920 [Ll])
921 TTS_ENGINE="flite"
922 NOISEFLOOR="500" # TODO: check this value
923 TTS_OPTS=$FLITE_OPTS
925 [Ee])
926 TTS_ENGINE="espeak"
927 NOISEFLOOR="500"
928 TTS_OPTS=$ESPEAK_OPTS
930 [Ff])
931 TTS_ENGINE="festival"
932 NOISEFLOOR="500"
933 TTS_OPTS=$FESTIVAL_OPTS
935 [Ss])
936 TTS_ENGINE="sapi"
937 NOISEFLOOR="500"
938 TTS_OPTS=$SAPI_OPTS
940 [Ww])
941 TTS_ENGINE="swift"
942 NOISEFLOOR="500"
943 TTS_OPTS=$SWIFT_OPTS
946 TTS_ENGINE=$DEFAULT_TTS
947 TTS_OPTS=$DEFAULT_TTS_OPTS
948 NOISEFLOOR=$DEFAULT_NOISEFLOOR
949 esac
950 echo "Using $TTS_ENGINE for TTS"
952 # Select which voice to use for Festival
953 if [ "$TTS_ENGINE" = "festival" ]; then
954 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
955 for voice in $voicelist; do
956 TTS_FESTIVAL_VOICE="$voice" # Default choice
957 break
958 done
959 if [ "$ARG_VOICE" ]; then
960 CHOICE=$ARG_VOICE
961 else
963 for voice in $voicelist; do
964 printf "%3d. %s\n" "$i" "$voice"
965 i=`expr $i + 1`
966 done
967 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
968 CHOICE=`input`
971 for voice in $voicelist; do
972 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
973 TTS_FESTIVAL_VOICE="$voice"
975 i=`expr $i + 1`
976 done
977 advopts="$advopts --voice=$CHOICE"
978 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
979 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
982 # Read custom tts options from command line
983 if [ "$ARG_TTSOPTS" ]; then
984 TTS_OPTS="$ARG_TTSOPTS"
985 advopts="$advopts --ttsopts='$TTS_OPTS'"
986 echo "$TTS_ENGINE options set to $TTS_OPTS"
989 if [ "$swcodec" = "yes" ]; then
990 ENCODER="rbspeexenc"
991 ENC_OPTS="-q 4 -c 10"
992 else
993 if [ -n "`findtool lame`" ]; then
994 ENCODER="lame"
995 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
996 else
997 echo "You need LAME in the system path to build voice files for"
998 echo "HWCODEC targets."
999 exit 4
1003 echo "Using $ENCODER for encoding voice clips"
1005 # Read custom encoder options from command line
1006 if [ "$ARG_ENCOPTS" ]; then
1007 ENC_OPTS="$ARG_ENCOPTS"
1008 advopts="$advopts --encopts='$ENC_OPTS'"
1009 echo "$ENCODER options set to $ENC_OPTS"
1012 TEMPDIR="${pwd}"
1013 if [ -n "`findtool cygpath`" ]; then
1014 TEMPDIR=`cygpath . -a -w`
1018 picklang() {
1019 # figure out which languages that are around
1020 for file in $rootdir/apps/lang/*.lang; do
1021 clean=`basename $file .lang`
1022 langs="$langs $clean"
1023 done
1025 if [ "$ARG_LANG" ]; then
1026 pick=$ARG_LANG
1027 else
1028 echo "Select a number for the language to use (default is english)"
1029 # FIXME The multiple-language feature is currently broken
1030 # echo "You may enter a comma-separated list of languages to build"
1032 num=1
1033 for one in $langs; do
1034 echo "$num. $one"
1035 num=`expr $num + 1`
1036 done
1037 pick=`input`
1039 advopts="$advopts --language=$pick"
1042 whichlang() {
1043 output=""
1044 # Allow the user to pass a comma-separated list of langauges
1045 for thispick in `echo $pick | sed 's/,/ /g'`; do
1046 num=1
1047 for one in $langs; do
1048 # Accept both the language number and name
1049 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
1050 if [ "$output" = "" ]; then
1051 output=$one
1052 else
1053 output=$output,$one
1056 num=`expr $num + 1`
1057 done
1058 done
1059 if [ -z "$output" ]; then
1060 # pick a default
1061 output="english"
1063 echo $output
1066 help() {
1067 echo "Rockbox configure script."
1068 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1069 echo "Do *NOT* run this within the tools directory!"
1070 echo ""
1071 cat <<EOF
1072 Usage: configure [OPTION]...
1073 Options:
1074 --target=TARGET Sets the target, TARGET can be either the target ID or
1075 corresponding string. Run without this option to see all
1076 available targets.
1078 --ram=RAM Sets the RAM for certain targets. Even though any number
1079 is accepted, not every number is correct. The default
1080 value will be applied, if you entered a wrong number
1081 (which depends on the target). Watch the output. Run
1082 without this option if you are not sure which the right
1083 number is.
1085 --type=TYPE Sets the build type. Shortcuts are also valid.
1086 Run without this option to see all available types.
1087 Multiple values are allowed and managed in the input
1088 order. So --type=b stands for Bootloader build, while
1089 --type=ab stands for "Backlight MOD" build.
1091 --lcdwidth=X Sets the width of the LCD. Used only for application
1092 targets.
1094 --lcdheight=Y Sets the height of the LCD. Used only for application
1095 targets.
1097 --language=LANG Set the language used for voice generation (used only if
1098 TYPE is AV).
1100 --tts=ENGINE Set the TTS engine used for voice generation (used only
1101 if TYPE is AV).
1103 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1104 AV).
1106 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1108 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1110 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1111 This is useful for having multiple alternate builds on
1112 your device that you can load with ROLO. However as the
1113 bootloader looks for .rockbox you won't be able to boot
1114 into this build.
1116 --ccache Enable ccache use (done by default these days)
1117 --no-ccache Disable ccache use
1119 --eabi Make configure prefer toolchains that are able to compile
1120 for the new ARM standard abi EABI
1121 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1122 --thumb Build with -mthumb (for ARM builds)
1123 --no-thumb The opposite of --thumb (don't use thumb even for targets
1124 where this is the default
1125 --sdl-threads Force use of SDL threads. They have inferior performance,
1126 but are better debuggable with GDB
1127 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1128 behavior of falling back to them if no native thread
1129 support was found.
1130 --prefix Target installation directory
1131 --help Shows this message (must not be used with other options)
1135 exit
1138 ARG_CCACHE=
1139 ARG_ENCOPTS=
1140 ARG_LANG=
1141 ARG_RAM=
1142 ARG_RBDIR=
1143 ARG_TARGET=
1144 ARG_TTS=
1145 ARG_TTSOPTS=
1146 ARG_TYPE=
1147 ARG_VOICE=
1148 ARG_ARM_EABI=
1149 ARG_ARM_THUMB=
1150 ARG_PREFIX="$PREFIX"
1151 ARG_THREAD_SUPPORT=
1152 err=
1153 for arg in "$@"; do
1154 case "$arg" in
1155 --ccache) ARG_CCACHE=1;;
1156 --no-ccache) ARG_CCACHE=0;;
1157 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1158 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
1159 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1160 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
1161 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1162 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1163 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1164 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1165 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1166 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1167 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
1168 --eabi) ARG_ARM_EABI=1;;
1169 --no-eabi) ARG_ARM_EABI=0;;
1170 --thumb) ARG_ARM_THUMB=1;;
1171 --no-thumb) ARG_ARM_THUMB=0;;
1172 --sdl-threads)ARG_THREAD_SUPPORT=1;;
1173 --no-sdl-threads)
1174 ARG_THREAD_SUPPORT=0;;
1175 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
1176 --help) help;;
1177 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1178 esac
1179 done
1180 [ "$err" ] && exit 1
1182 advopts=
1184 if [ "$TMPDIR" != "" ]; then
1185 tmpdir=$TMPDIR
1186 else
1187 tmpdir=/tmp
1189 echo Using temporary directory $tmpdir
1191 if test -r "configure"; then
1192 # this is a check for a configure script in the current directory, it there
1193 # is one, try to figure out if it is this one!
1195 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1196 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1197 echo "It will only cause you pain and grief. Instead do this:"
1198 echo ""
1199 echo " cd .."
1200 echo " mkdir build-dir"
1201 echo " cd build-dir"
1202 echo " ../tools/configure"
1203 echo ""
1204 echo "Much happiness will arise from this. Enjoy"
1205 exit 5
1209 # get our current directory
1210 pwd=`pwd`;
1212 if { echo $pwd | grep " "; } then
1213 echo "You're running this script in a path that contains space. The build"
1214 echo "system is unfortunately not clever enough to deal with this. Please"
1215 echo "run the script from a different path, rename the path or fix the build"
1216 echo "system!"
1217 exit 6
1220 if [ -z "$rootdir" ]; then
1221 ##################################################################
1222 # Figure out where the source code root is!
1224 rootdir=`dirname $0`/../
1226 #####################################################################
1227 # Convert the possibly relative directory name to an absolute version
1229 now=`pwd`
1230 cd $rootdir
1231 rootdir=`pwd`
1233 # cd back to the build dir
1234 cd $now
1237 apps="apps"
1238 appsdir='$(ROOTDIR)/apps'
1239 toolsdir='$(ROOTDIR)/tools'
1242 ##################################################################
1243 # Figure out target platform
1246 if [ "$ARG_TARGET" ]; then
1247 buildfor=$ARG_TARGET
1248 else
1249 echo "Enter target platform:"
1250 cat <<EOF
1251 ==Archos== ==iriver== ==Apple iPod==
1252 0) Player/Studio 10) H120/H140 20) Color/Photo
1253 1) Recorder 11) H320/H340 21) Nano 1G
1254 2) FM Recorder 12) iHP-100/110/115 22) Video
1255 3) Recorder v2 13) iFP-790 23) 3G
1256 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1257 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1258 6) AV300 26) Mini 2G
1259 ==Toshiba== 27) 1G, 2G
1260 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1261 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1262 31) M5/M5L
1263 32) 7 ==Olympus= ==SanDisk==
1264 33) D2 70) M:Robe 500 50) Sansa e200
1265 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1266 52) Sansa c200
1267 ==Creative== ==Philips== 53) Sansa m200
1268 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1269 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1270 92) Zen Vision HDD1830 56) Sansa e200v2
1271 102) GoGear HDD6330 57) Sansa m200v4
1272 ==Onda== 58) Sansa Fuze
1273 120) VX747 ==Meizu== 59) Sansa c200v2
1274 121) VX767 110) M6SL 60) Sansa Clipv2
1275 122) VX747+ 111) M6SP 61) Sansa View
1276 123) VX777 112) M3 62) Sansa Clip+
1277 63) Sansa Fuze v2
1278 ==Samsung== ==Tatung== 64) Sansa Fuze+
1279 140) YH-820 150) Elio TPJ-1022 65) Sansa Clip Zip
1280 141) YH-920
1281 142) YH-925 ==Packard Bell== ==Logik==
1282 143) YP-S3 160) Vibe 500 80) DAX 1GB MP3/DAB
1284 ==Application== ==MPIO== ==Lyre project==
1285 200) SDL 170) HD200 130) Lyre proto 1
1286 201) Android 171) HD300 131) Mini2440
1287 202) Nokia N8xx
1288 203) Nokia N900 ==ROCKCHIP==
1289 204) Pandora 180) rk27xx generic
1293 buildfor=`input`;
1296 # Set of tools built for all target platforms:
1297 toolset="rdf2binary convbdf codepages"
1299 # Toolsets for some target families:
1300 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1301 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1302 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1303 ipodbitmaptools="$toolset scramble bmp2rb"
1304 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1305 tccbitmaptools="$toolset scramble bmp2rb"
1306 # generic is used by IFP, Meizu and Onda
1307 genericbitmaptools="$toolset bmp2rb"
1308 # scramble is used by all other targets
1309 scramblebitmaptools="$genericbitmaptools scramble"
1312 # ---- For each target ----
1314 # *Variables*
1315 # target_id: a unique number identifying this target, IS NOT the menu number.
1316 # Just use the currently highest number+1 when you add a new
1317 # target.
1318 # modelname: short model name used all over to identify this target
1319 # memory: number of megabytes of RAM this target has. If the amount can
1320 # be selected by the size prompt, let memory be unset here
1321 # target: -Ddefine passed to the build commands to make the correct
1322 # config-*.h file get included etc
1323 # tool: the tool that takes a plain binary and converts that into a
1324 # working "firmware" file for your target
1325 # output: the final output file name
1326 # boottool: the tool that takes a plain binary and generates a bootloader
1327 # file for your target (or blank to use $tool)
1328 # bootoutput:the final output file name for the bootloader (or blank to use
1329 # $output)
1330 # appextra: passed to the APPEXTRA variable in the Makefiles.
1331 # TODO: add proper explanation
1332 # archosrom: used only for Archos targets that build a special flashable .ucl
1333 # image.
1334 # flash: name of output for flashing, for targets where there's a special
1335 # file output for this.
1336 # plugins: set to 'yes' to build the plugins. Early development builds can
1337 # set this to no in the early stages to have an easier life for a
1338 # while
1339 # swcodec: set 'yes' on swcodec targets
1340 # toolset: lists what particular tools in the tools/ directory that this
1341 # target needs to have built prior to building Rockbox
1343 # *Functions*
1344 # *cc: sets up gcc and compiler options for your target builds. Note
1345 # that if you select a simulator build, the compiler selection is
1346 # overridden later in the script.
1348 case $buildfor in
1350 0|archosplayer)
1351 target_id=1
1352 modelname="archosplayer"
1353 target="-DARCHOS_PLAYER"
1354 shcc
1355 tool="$rootdir/tools/scramble"
1356 output="archos.mod"
1357 appextra="player:gui"
1358 archosrom="$pwd/rombox.ucl"
1359 flash="$pwd/rockbox.ucl"
1360 plugins="yes"
1361 swcodec=""
1363 # toolset is the tools within the tools directory that we build for
1364 # this particular target.
1365 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1367 # Note: the convbdf is present in the toolset just because: 1) the
1368 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1369 # build the player simulator
1371 t_cpu="sh"
1372 t_manufacturer="archos"
1373 t_model="player"
1376 1|archosrecorder)
1377 target_id=2
1378 modelname="archosrecorder"
1379 target="-DARCHOS_RECORDER"
1380 shcc
1381 tool="$rootdir/tools/scramble"
1382 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1383 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1384 output="ajbrec.ajz"
1385 appextra="recorder:gui:radio"
1386 #archosrom="$pwd/rombox.ucl"
1387 flash="$pwd/rockbox.ucl"
1388 plugins="yes"
1389 swcodec=""
1390 # toolset is the tools within the tools directory that we build for
1391 # this particular target.
1392 toolset=$archosbitmaptools
1393 t_cpu="sh"
1394 t_manufacturer="archos"
1395 t_model="recorder"
1398 2|archosfmrecorder)
1399 target_id=3
1400 modelname="archosfmrecorder"
1401 target="-DARCHOS_FMRECORDER"
1402 shcc
1403 tool="$rootdir/tools/scramble -fm"
1404 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1405 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1406 output="ajbrec.ajz"
1407 appextra="recorder:gui:radio"
1408 #archosrom="$pwd/rombox.ucl"
1409 flash="$pwd/rockbox.ucl"
1410 plugins="yes"
1411 swcodec=""
1412 # toolset is the tools within the tools directory that we build for
1413 # this particular target.
1414 toolset=$archosbitmaptools
1415 t_cpu="sh"
1416 t_manufacturer="archos"
1417 t_model="fm_v2"
1420 3|archosrecorderv2)
1421 target_id=4
1422 modelname="archosrecorderv2"
1423 target="-DARCHOS_RECORDERV2"
1424 shcc
1425 tool="$rootdir/tools/scramble -v2"
1426 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1427 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1428 output="ajbrec.ajz"
1429 appextra="recorder:gui:radio"
1430 #archosrom="$pwd/rombox.ucl"
1431 flash="$pwd/rockbox.ucl"
1432 plugins="yes"
1433 swcodec=""
1434 # toolset is the tools within the tools directory that we build for
1435 # this particular target.
1436 toolset=$archosbitmaptools
1437 t_cpu="sh"
1438 t_manufacturer="archos"
1439 t_model="fm_v2"
1442 4|archosondiosp)
1443 target_id=7
1444 modelname="archosondiosp"
1445 target="-DARCHOS_ONDIOSP"
1446 shcc
1447 tool="$rootdir/tools/scramble -osp"
1448 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1449 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1450 output="ajbrec.ajz"
1451 appextra="recorder:gui:radio"
1452 #archosrom="$pwd/rombox.ucl"
1453 flash="$pwd/rockbox.ucl"
1454 plugins="yes"
1455 swcodec=""
1456 # toolset is the tools within the tools directory that we build for
1457 # this particular target.
1458 toolset=$archosbitmaptools
1459 t_cpu="sh"
1460 t_manufacturer="archos"
1461 t_model="ondio"
1464 5|archosondiofm)
1465 target_id=8
1466 modelname="archosondiofm"
1467 target="-DARCHOS_ONDIOFM"
1468 shcc
1469 tool="$rootdir/tools/scramble -ofm"
1470 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1471 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1472 output="ajbrec.ajz"
1473 appextra="recorder:gui:radio"
1474 #archosrom="$pwd/rombox.ucl"
1475 flash="$pwd/rockbox.ucl"
1476 plugins="yes"
1477 swcodec=""
1478 toolset=$archosbitmaptools
1479 t_cpu="sh"
1480 t_manufacturer="archos"
1481 t_model="ondio"
1484 6|archosav300)
1485 target_id=38
1486 modelname="archosav300"
1487 target="-DARCHOS_AV300"
1488 memory=16 # always
1489 arm7tdmicc
1490 tool="$rootdir/tools/scramble -mm=C"
1491 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1492 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1493 output="cjbm.ajz"
1494 appextra="recorder:gui:radio"
1495 plugins="yes"
1496 swcodec=""
1497 # toolset is the tools within the tools directory that we build for
1498 # this particular target.
1499 toolset="$toolset scramble descramble bmp2rb"
1500 # architecture, manufacturer and model for the target-tree build
1501 t_cpu="arm"
1502 t_manufacturer="archos"
1503 t_model="av300"
1506 10|iriverh120)
1507 target_id=9
1508 modelname="iriverh120"
1509 target="-DIRIVER_H120"
1510 memory=32 # always
1511 coldfirecc
1512 tool="$rootdir/tools/scramble -add=h120"
1513 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1514 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1515 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1516 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1517 output="rockbox.iriver"
1518 bootoutput="bootloader.iriver"
1519 appextra="recorder:gui:radio"
1520 flash="$pwd/rombox.iriver"
1521 plugins="yes"
1522 swcodec="yes"
1523 # toolset is the tools within the tools directory that we build for
1524 # this particular target.
1525 toolset=$iriverbitmaptools
1526 t_cpu="coldfire"
1527 t_manufacturer="iriver"
1528 t_model="h100"
1531 11|iriverh300)
1532 target_id=10
1533 modelname="iriverh300"
1534 target="-DIRIVER_H300"
1535 memory=32 # always
1536 coldfirecc
1537 tool="$rootdir/tools/scramble -add=h300"
1538 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1539 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1540 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1541 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1542 output="rockbox.iriver"
1543 appextra="recorder:gui:radio"
1544 plugins="yes"
1545 swcodec="yes"
1546 # toolset is the tools within the tools directory that we build for
1547 # this particular target.
1548 toolset=$iriverbitmaptools
1549 t_cpu="coldfire"
1550 t_manufacturer="iriver"
1551 t_model="h300"
1554 12|iriverh100)
1555 target_id=11
1556 modelname="iriverh100"
1557 target="-DIRIVER_H100"
1558 memory=16 # always
1559 coldfirecc
1560 tool="$rootdir/tools/scramble -add=h100"
1561 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1562 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1563 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1564 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1565 output="rockbox.iriver"
1566 bootoutput="bootloader.iriver"
1567 appextra="recorder:gui:radio"
1568 flash="$pwd/rombox.iriver"
1569 plugins="yes"
1570 swcodec="yes"
1571 # toolset is the tools within the tools directory that we build for
1572 # this particular target.
1573 toolset=$iriverbitmaptools
1574 t_cpu="coldfire"
1575 t_manufacturer="iriver"
1576 t_model="h100"
1579 13|iriverifp7xx)
1580 target_id=19
1581 modelname="iriverifp7xx"
1582 target="-DIRIVER_IFP7XX"
1583 memory=1
1584 arm7tdmicc short
1585 tool="cp"
1586 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1587 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1588 output="rockbox.wma"
1589 appextra="recorder:gui:radio"
1590 plugins="yes"
1591 swcodec="yes"
1592 # toolset is the tools within the tools directory that we build for
1593 # this particular target.
1594 toolset=$genericbitmaptools
1595 t_cpu="arm"
1596 t_manufacturer="pnx0101"
1597 t_model="iriver-ifp7xx"
1600 14|iriverh10)
1601 target_id=22
1602 modelname="iriverh10"
1603 target="-DIRIVER_H10"
1604 memory=32 # always
1605 arm7tdmicc
1606 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1607 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1608 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1609 output="rockbox.mi4"
1610 appextra="recorder:gui:radio"
1611 plugins="yes"
1612 swcodec="yes"
1613 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1614 bootoutput="H10_20GC.mi4"
1615 # toolset is the tools within the tools directory that we build for
1616 # this particular target.
1617 toolset=$scramblebitmaptools
1618 # architecture, manufacturer and model for the target-tree build
1619 t_cpu="arm"
1620 t_manufacturer="iriver"
1621 t_model="h10"
1624 15|iriverh10_5gb)
1625 target_id=24
1626 modelname="iriverh10_5gb"
1627 target="-DIRIVER_H10_5GB"
1628 memory=32 # always
1629 arm7tdmicc
1630 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1631 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1632 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1633 output="rockbox.mi4"
1634 appextra="recorder:gui:radio"
1635 plugins="yes"
1636 swcodec="yes"
1637 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1638 bootoutput="H10.mi4"
1639 # toolset is the tools within the tools directory that we build for
1640 # this particular target.
1641 toolset=$scramblebitmaptools
1642 # architecture, manufacturer and model for the target-tree build
1643 t_cpu="arm"
1644 t_manufacturer="iriver"
1645 t_model="h10"
1648 20|ipodcolor)
1649 target_id=13
1650 modelname="ipodcolor"
1651 target="-DIPOD_COLOR"
1652 memory=32 # always
1653 arm7tdmicc
1654 tool="$rootdir/tools/scramble -add=ipco"
1655 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1656 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1657 output="rockbox.ipod"
1658 appextra="recorder:gui:radio"
1659 plugins="yes"
1660 swcodec="yes"
1661 bootoutput="bootloader-$modelname.ipod"
1662 # toolset is the tools within the tools directory that we build for
1663 # this particular target.
1664 toolset=$ipodbitmaptools
1665 # architecture, manufacturer and model for the target-tree build
1666 t_cpu="arm"
1667 t_manufacturer="ipod"
1668 t_model="color"
1671 21|ipodnano1g)
1672 target_id=14
1673 modelname="ipodnano1g"
1674 target="-DIPOD_NANO"
1675 memory=32 # always
1676 arm7tdmicc
1677 tool="$rootdir/tools/scramble -add=nano"
1678 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1679 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1680 output="rockbox.ipod"
1681 appextra="recorder:gui:radio"
1682 plugins="yes"
1683 swcodec="yes"
1684 bootoutput="bootloader-$modelname.ipod"
1685 # toolset is the tools within the tools directory that we build for
1686 # this particular target.
1687 toolset=$ipodbitmaptools
1688 # architecture, manufacturer and model for the target-tree build
1689 t_cpu="arm"
1690 t_manufacturer="ipod"
1691 t_model="nano"
1694 22|ipodvideo)
1695 target_id=15
1696 modelname="ipodvideo"
1697 target="-DIPOD_VIDEO"
1698 memory=64 # always. This is reduced at runtime if needed
1699 arm7tdmicc
1700 tool="$rootdir/tools/scramble -add=ipvd"
1701 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1702 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1703 output="rockbox.ipod"
1704 appextra="recorder:gui:radio"
1705 plugins="yes"
1706 swcodec="yes"
1707 bootoutput="bootloader-$modelname.ipod"
1708 # toolset is the tools within the tools directory that we build for
1709 # this particular target.
1710 toolset=$ipodbitmaptools
1711 # architecture, manufacturer and model for the target-tree build
1712 t_cpu="arm"
1713 t_manufacturer="ipod"
1714 t_model="video"
1717 23|ipod3g)
1718 target_id=16
1719 modelname="ipod3g"
1720 target="-DIPOD_3G"
1721 memory=32 # always
1722 arm7tdmicc
1723 tool="$rootdir/tools/scramble -add=ip3g"
1724 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1725 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1726 output="rockbox.ipod"
1727 appextra="recorder:gui:radio"
1728 plugins="yes"
1729 swcodec="yes"
1730 bootoutput="bootloader-$modelname.ipod"
1731 # toolset is the tools within the tools directory that we build for
1732 # this particular target.
1733 toolset=$ipodbitmaptools
1734 # architecture, manufacturer and model for the target-tree build
1735 t_cpu="arm"
1736 t_manufacturer="ipod"
1737 t_model="3g"
1740 24|ipod4g)
1741 target_id=17
1742 modelname="ipod4g"
1743 target="-DIPOD_4G"
1744 memory=32 # always
1745 arm7tdmicc
1746 tool="$rootdir/tools/scramble -add=ip4g"
1747 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1748 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1749 output="rockbox.ipod"
1750 appextra="recorder:gui:radio"
1751 plugins="yes"
1752 swcodec="yes"
1753 bootoutput="bootloader-$modelname.ipod"
1754 # toolset is the tools within the tools directory that we build for
1755 # this particular target.
1756 toolset=$ipodbitmaptools
1757 # architecture, manufacturer and model for the target-tree build
1758 t_cpu="arm"
1759 t_manufacturer="ipod"
1760 t_model="4g"
1763 25|ipodmini1g)
1764 target_id=18
1765 modelname="ipodmini1g"
1766 target="-DIPOD_MINI"
1767 memory=32 # always
1768 arm7tdmicc
1769 tool="$rootdir/tools/scramble -add=mini"
1770 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1771 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1772 output="rockbox.ipod"
1773 appextra="recorder:gui:radio"
1774 plugins="yes"
1775 swcodec="yes"
1776 bootoutput="bootloader-$modelname.ipod"
1777 # toolset is the tools within the tools directory that we build for
1778 # this particular target.
1779 toolset=$ipodbitmaptools
1780 # architecture, manufacturer and model for the target-tree build
1781 t_cpu="arm"
1782 t_manufacturer="ipod"
1783 t_model="mini"
1786 26|ipodmini2g)
1787 target_id=21
1788 modelname="ipodmini2g"
1789 target="-DIPOD_MINI2G"
1790 memory=32 # always
1791 arm7tdmicc
1792 tool="$rootdir/tools/scramble -add=mn2g"
1793 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1794 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1795 output="rockbox.ipod"
1796 appextra="recorder:gui:radio"
1797 plugins="yes"
1798 swcodec="yes"
1799 bootoutput="bootloader-$modelname.ipod"
1800 # toolset is the tools within the tools directory that we build for
1801 # this particular target.
1802 toolset=$ipodbitmaptools
1803 # architecture, manufacturer and model for the target-tree build
1804 t_cpu="arm"
1805 t_manufacturer="ipod"
1806 t_model="mini2g"
1809 27|ipod1g2g)
1810 target_id=29
1811 modelname="ipod1g2g"
1812 target="-DIPOD_1G2G"
1813 memory=32 # always
1814 arm7tdmicc
1815 tool="$rootdir/tools/scramble -add=1g2g"
1816 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1817 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1818 output="rockbox.ipod"
1819 appextra="recorder:gui:radio"
1820 plugins="yes"
1821 swcodec="yes"
1822 bootoutput="bootloader-$modelname.ipod"
1823 # toolset is the tools within the tools directory that we build for
1824 # this particular target.
1825 toolset=$ipodbitmaptools
1826 # architecture, manufacturer and model for the target-tree build
1827 t_cpu="arm"
1828 t_manufacturer="ipod"
1829 t_model="1g2g"
1832 28|ipodnano2g)
1833 target_id=62
1834 modelname="ipodnano2g"
1835 target="-DIPOD_NANO2G"
1836 memory=32 # always
1837 arm940tcc
1838 tool="$rootdir/tools/scramble -add=nn2g"
1839 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1840 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1841 output="rockbox.ipod"
1842 appextra="recorder:gui:radio"
1843 plugins="yes"
1844 swcodec="yes"
1845 bootoutput="bootloader-$modelname.ipod"
1846 # toolset is the tools within the tools directory that we build for
1847 # this particular target.
1848 toolset=$ipodbitmaptools
1849 # architecture, manufacturer and model for the target-tree build
1850 t_cpu="arm"
1851 t_manufacturer="s5l8700"
1852 t_model="ipodnano2g"
1855 29|ipod6g)
1856 target_id=71
1857 modelname="ipod6g"
1858 target="-DIPOD_6G"
1859 memory=64 # always
1860 arm926ejscc
1861 tool="$rootdir/tools/scramble -add=ip6g"
1862 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1863 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1864 output="rockbox.ipod"
1865 appextra="recorder:gui:radio"
1866 plugins="yes"
1867 swcodec="yes"
1868 bootoutput="bootloader-$modelname.ipod"
1869 # toolset is the tools within the tools directory that we build for
1870 # this particular target.
1871 toolset=$ipodbitmaptools
1872 # architecture, manufacturer and model for the target-tree build
1873 t_cpu="arm"
1874 t_manufacturer="s5l8702"
1875 t_model="ipod6g"
1878 30|iaudiox5)
1879 target_id=12
1880 modelname="iaudiox5"
1881 target="-DIAUDIO_X5"
1882 memory=16 # always
1883 coldfirecc
1884 tool="$rootdir/tools/scramble -add=iax5"
1885 boottool="$rootdir/tools/scramble -iaudiox5"
1886 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1887 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1888 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1889 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1890 output="rockbox.iaudio"
1891 bootoutput="x5_fw.bin"
1892 appextra="recorder:gui:radio"
1893 plugins="yes"
1894 swcodec="yes"
1895 # toolset is the tools within the tools directory that we build for
1896 # this particular target.
1897 toolset="$iaudiobitmaptools"
1898 # architecture, manufacturer and model for the target-tree build
1899 t_cpu="coldfire"
1900 t_manufacturer="iaudio"
1901 t_model="x5"
1904 31|iaudiom5)
1905 target_id=28
1906 modelname="iaudiom5"
1907 target="-DIAUDIO_M5"
1908 memory=16 # always
1909 coldfirecc
1910 tool="$rootdir/tools/scramble -add=iam5"
1911 boottool="$rootdir/tools/scramble -iaudiom5"
1912 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1913 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1914 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1915 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1916 output="rockbox.iaudio"
1917 bootoutput="m5_fw.bin"
1918 appextra="recorder:gui:radio"
1919 plugins="yes"
1920 swcodec="yes"
1921 # toolset is the tools within the tools directory that we build for
1922 # this particular target.
1923 toolset="$iaudiobitmaptools"
1924 # architecture, manufacturer and model for the target-tree build
1925 t_cpu="coldfire"
1926 t_manufacturer="iaudio"
1927 t_model="m5"
1930 32|iaudio7)
1931 target_id=32
1932 modelname="iaudio7"
1933 target="-DIAUDIO_7"
1934 memory=16 # always
1935 arm946cc
1936 tool="$rootdir/tools/scramble -add=i7"
1937 boottool="$rootdir/tools/scramble -tcc=crc"
1938 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1939 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1940 output="rockbox.iaudio"
1941 appextra="recorder:gui:radio"
1942 plugins="yes"
1943 swcodec="yes"
1944 bootoutput="I7_FW.BIN"
1945 # toolset is the tools within the tools directory that we build for
1946 # this particular target.
1947 toolset="$tccbitmaptools"
1948 # architecture, manufacturer and model for the target-tree build
1949 t_cpu="arm"
1950 t_manufacturer="tcc77x"
1951 t_model="iaudio7"
1954 33|cowond2)
1955 target_id=34
1956 modelname="cowond2"
1957 target="-DCOWON_D2"
1958 memory=32
1959 arm926ejscc
1960 tool="$rootdir/tools/scramble -add=d2"
1961 boottool="cp "
1962 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1963 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1964 output="rockbox.d2"
1965 bootoutput="bootloader-cowond2.bin"
1966 appextra="recorder:gui:radio"
1967 plugins="yes"
1968 swcodec="yes"
1969 toolset="$tccbitmaptools"
1970 # architecture, manufacturer and model for the target-tree build
1971 t_cpu="arm"
1972 t_manufacturer="tcc780x"
1973 t_model="cowond2"
1976 34|iaudiom3)
1977 target_id=37
1978 modelname="iaudiom3"
1979 target="-DIAUDIO_M3"
1980 memory=16 # always
1981 coldfirecc
1982 tool="$rootdir/tools/scramble -add=iam3"
1983 boottool="$rootdir/tools/scramble -iaudiom3"
1984 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1985 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1986 output="rockbox.iaudio"
1987 bootoutput="cowon_m3.bin"
1988 appextra="recorder:gui:radio"
1989 plugins="yes"
1990 swcodec="yes"
1991 # toolset is the tools within the tools directory that we build for
1992 # this particular target.
1993 toolset="$iaudiobitmaptools"
1994 # architecture, manufacturer and model for the target-tree build
1995 t_cpu="coldfire"
1996 t_manufacturer="iaudio"
1997 t_model="m3"
2000 40|gigabeatfx)
2001 target_id=20
2002 modelname="gigabeatfx"
2003 target="-DGIGABEAT_F"
2004 memory=32 # always
2005 arm9tdmicc
2006 tool="$rootdir/tools/scramble -add=giga"
2007 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2008 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2009 output="rockbox.gigabeat"
2010 appextra="recorder:gui:radio"
2011 plugins="yes"
2012 swcodec="yes"
2013 toolset=$gigabeatbitmaptools
2014 boottool="$rootdir/tools/scramble -gigabeat"
2015 bootoutput="FWIMG01.DAT"
2016 # architecture, manufacturer and model for the target-tree build
2017 t_cpu="arm"
2018 t_manufacturer="s3c2440"
2019 t_model="gigabeat-fx"
2022 41|gigabeats)
2023 target_id=26
2024 modelname="gigabeats"
2025 target="-DGIGABEAT_S"
2026 memory=64
2027 arm1136jfscc
2028 tool="$rootdir/tools/scramble -add=gigs"
2029 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2030 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2031 output="rockbox.gigabeat"
2032 appextra="recorder:gui:radio"
2033 plugins="yes"
2034 swcodec="yes"
2035 toolset="$gigabeatbitmaptools"
2036 boottool="$rootdir/tools/scramble -gigabeats"
2037 bootoutput="nk.bin"
2038 # architecture, manufacturer and model for the target-tree build
2039 t_cpu="arm"
2040 t_manufacturer="imx31"
2041 t_model="gigabeat-s"
2044 70|mrobe500)
2045 target_id=36
2046 modelname="mrobe500"
2047 target="-DMROBE_500"
2048 memory=64 # always
2049 arm926ejscc
2050 tool="$rootdir/tools/scramble -add=m500"
2051 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2052 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
2053 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2054 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2055 output="rockbox.mrobe500"
2056 appextra="recorder:gui:radio"
2057 plugins="yes"
2058 swcodec="yes"
2059 toolset=$gigabeatbitmaptools
2060 boottool="cp "
2061 bootoutput="rockbox.mrboot"
2062 # architecture, manufacturer and model for the target-tree build
2063 t_cpu="arm"
2064 t_manufacturer="tms320dm320"
2065 t_model="mrobe-500"
2068 71|mrobe100)
2069 target_id=33
2070 modelname="mrobe100"
2071 target="-DMROBE_100"
2072 memory=32 # always
2073 arm7tdmicc
2074 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2075 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2076 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2077 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2078 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2079 output="rockbox.mi4"
2080 appextra="recorder:gui:radio"
2081 plugins="yes"
2082 swcodec="yes"
2083 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2084 bootoutput="pp5020.mi4"
2085 # toolset is the tools within the tools directory that we build for
2086 # this particular target.
2087 toolset=$scramblebitmaptools
2088 # architecture, manufacturer and model for the target-tree build
2089 t_cpu="arm"
2090 t_manufacturer="olympus"
2091 t_model="mrobe-100"
2094 80|logikdax)
2095 target_id=31
2096 modelname="logikdax"
2097 target="-DLOGIK_DAX"
2098 memory=2 # always
2099 arm946cc
2100 tool="$rootdir/tools/scramble -add=ldax"
2101 boottool="$rootdir/tools/scramble -tcc=crc"
2102 bootoutput="player.rom"
2103 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2104 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2105 output="rockbox.logik"
2106 appextra="recorder:gui:radio"
2107 plugins=""
2108 swcodec="yes"
2109 # toolset is the tools within the tools directory that we build for
2110 # this particular target.
2111 toolset=$tccbitmaptools
2112 # architecture, manufacturer and model for the target-tree build
2113 t_cpu="arm"
2114 t_manufacturer="tcc77x"
2115 t_model="logikdax"
2118 90|zenvisionm30gb)
2119 target_id=35
2120 modelname="zenvisionm30gb"
2121 target="-DCREATIVE_ZVM"
2122 memory=64
2123 arm926ejscc
2124 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2125 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2126 tool="$rootdir/tools/scramble -creative=zvm"
2127 USE_ELF="yes"
2128 output="rockbox.zvm"
2129 appextra="recorder:gui:radio"
2130 plugins="yes"
2131 swcodec="yes"
2132 toolset=$ipodbitmaptools
2133 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
2134 bootoutput="rockbox.zvmboot"
2135 # architecture, manufacturer and model for the target-tree build
2136 t_cpu="arm"
2137 t_manufacturer="tms320dm320"
2138 t_model="creative-zvm"
2141 91|zenvisionm60gb)
2142 target_id=40
2143 modelname="zenvisionm60gb"
2144 target="-DCREATIVE_ZVM60GB"
2145 memory=64
2146 arm926ejscc
2147 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2148 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2149 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2150 USE_ELF="yes"
2151 output="rockbox.zvm60"
2152 appextra="recorder:gui:radio"
2153 plugins="yes"
2154 swcodec="yes"
2155 toolset=$ipodbitmaptools
2156 boottool="$rootdir/tools/scramble -creative=zvm60"
2157 bootoutput="rockbox.zvm60boot"
2158 # architecture, manufacturer and model for the target-tree build
2159 t_cpu="arm"
2160 t_manufacturer="tms320dm320"
2161 t_model="creative-zvm"
2164 92|zenvision)
2165 target_id=39
2166 modelname="zenvision"
2167 target="-DCREATIVE_ZV"
2168 memory=64
2169 arm926ejscc
2170 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2171 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2172 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2173 USE_ELF="yes"
2174 output="rockbox.zv"
2175 appextra="recorder:gui:radio"
2176 plugins=""
2177 swcodec="yes"
2178 toolset=$ipodbitmaptools
2179 boottool="$rootdir/tools/scramble -creative=zenvision"
2180 bootoutput="rockbox.zvboot"
2181 # architecture, manufacturer and model for the target-tree build
2182 t_cpu="arm"
2183 t_manufacturer="tms320dm320"
2184 t_model="creative-zvm"
2187 50|sansae200)
2188 target_id=23
2189 modelname="sansae200"
2190 target="-DSANSA_E200"
2191 memory=32 # supposedly
2192 arm7tdmicc
2193 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2194 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2195 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2196 output="rockbox.mi4"
2197 appextra="recorder:gui:radio"
2198 plugins="yes"
2199 swcodec="yes"
2200 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2201 bootoutput="PP5022.mi4"
2202 # toolset is the tools within the tools directory that we build for
2203 # this particular target.
2204 toolset=$scramblebitmaptools
2205 # architecture, manufacturer and model for the target-tree build
2206 t_cpu="arm"
2207 t_manufacturer="sandisk"
2208 t_model="sansa-e200"
2211 51|sansae200r)
2212 # the e200R model is pretty much identical to the e200, it only has a
2213 # different option to the scramble tool when building a bootloader and
2214 # makes the bootloader output file name in all lower case.
2215 target_id=27
2216 modelname="sansae200r"
2217 target="-DSANSA_E200"
2218 memory=32 # supposedly
2219 arm7tdmicc
2220 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2221 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2222 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2223 output="rockbox.mi4"
2224 appextra="recorder:gui:radio"
2225 plugins="yes"
2226 swcodec="yes"
2227 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2228 bootoutput="pp5022.mi4"
2229 # toolset is the tools within the tools directory that we build for
2230 # this particular target.
2231 toolset=$scramblebitmaptools
2232 # architecture, manufacturer and model for the target-tree build
2233 t_cpu="arm"
2234 t_manufacturer="sandisk"
2235 t_model="sansa-e200"
2238 52|sansac200)
2239 target_id=30
2240 modelname="sansac200"
2241 target="-DSANSA_C200"
2242 memory=32 # supposedly
2243 arm7tdmicc
2244 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2245 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2246 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2247 output="rockbox.mi4"
2248 appextra="recorder:gui:radio"
2249 plugins="yes"
2250 swcodec="yes"
2251 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2252 bootoutput="firmware.mi4"
2253 # toolset is the tools within the tools directory that we build for
2254 # this particular target.
2255 toolset=$scramblebitmaptools
2256 # architecture, manufacturer and model for the target-tree build
2257 t_cpu="arm"
2258 t_manufacturer="sandisk"
2259 t_model="sansa-c200"
2262 53|sansam200)
2263 target_id=48
2264 modelname="sansam200"
2265 target="-DSANSA_M200"
2266 memory=1 # always
2267 arm946cc
2268 tool="$rootdir/tools/scramble -add=m200"
2269 boottool="$rootdir/tools/scramble -tcc=crc"
2270 bootoutput="player.rom"
2271 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2272 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2273 output="rockbox.m200"
2274 appextra="recorder:gui:radio"
2275 plugins=""
2276 swcodec="yes"
2277 # toolset is the tools within the tools directory that we build for
2278 # this particular target.
2279 toolset=$tccbitmaptools
2280 # architecture, manufacturer and model for the target-tree build
2281 t_cpu="arm"
2282 t_manufacturer="tcc77x"
2283 t_model="m200"
2286 54|sansac100)
2287 target_id=42
2288 modelname="sansac100"
2289 target="-DSANSA_C100"
2290 memory=2
2291 arm946cc
2292 tool="$rootdir/tools/scramble -add=c100"
2293 boottool="$rootdir/tools/scramble -tcc=crc"
2294 bootoutput="player.rom"
2295 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2296 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2297 output="rockbox.c100"
2298 appextra="recorder:gui:radio"
2299 plugins=""
2300 swcodec="yes"
2301 # toolset is the tools within the tools directory that we build for
2302 # this particular target.
2303 toolset=$tccbitmaptools
2304 # architecture, manufacturer and model for the target-tree build
2305 t_cpu="arm"
2306 t_manufacturer="tcc77x"
2307 t_model="c100"
2310 55|sansaclip)
2311 target_id=50
2312 modelname="sansaclip"
2313 target="-DSANSA_CLIP"
2314 memory=2
2315 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2316 bmp2rb_native="$bmp2rb_mono"
2317 tool="$rootdir/tools/scramble -add=clip"
2318 output="rockbox.sansa"
2319 bootoutput="bootloader-clip.sansa"
2320 appextra="recorder:gui:radio"
2321 plugins="yes"
2322 swcodec="yes"
2323 toolset=$scramblebitmaptools
2324 t_cpu="arm"
2325 t_manufacturer="as3525"
2326 t_model="sansa-clip"
2327 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2328 arm9tdmicc
2329 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2333 56|sansae200v2)
2334 target_id=51
2335 modelname="sansae200v2"
2336 target="-DSANSA_E200V2"
2337 memory=8
2338 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2339 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2340 tool="$rootdir/tools/scramble -add=e2v2"
2341 output="rockbox.sansa"
2342 bootoutput="bootloader-e200v2.sansa"
2343 appextra="recorder:gui:radio"
2344 plugins="yes"
2345 swcodec="yes"
2346 toolset=$scramblebitmaptools
2347 t_cpu="arm"
2348 t_manufacturer="as3525"
2349 t_model="sansa-e200v2"
2350 arm9tdmicc
2354 57|sansam200v4)
2355 target_id=52
2356 modelname="sansam200v4"
2357 target="-DSANSA_M200V4"
2358 memory=2
2359 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2360 bmp2rb_native="$bmp2rb_mono"
2361 tool="$rootdir/tools/scramble -add=m2v4"
2362 output="rockbox.sansa"
2363 bootoutput="bootloader-m200v4.sansa"
2364 appextra="recorder:gui:radio"
2365 plugins="yes"
2366 swcodec="yes"
2367 toolset=$scramblebitmaptools
2368 t_cpu="arm"
2369 t_manufacturer="as3525"
2370 t_model="sansa-m200v4"
2371 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2372 arm9tdmicc
2373 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2377 58|sansafuze)
2378 target_id=53
2379 modelname="sansafuze"
2380 target="-DSANSA_FUZE"
2381 memory=8
2382 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2383 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2384 tool="$rootdir/tools/scramble -add=fuze"
2385 output="rockbox.sansa"
2386 bootoutput="bootloader-fuze.sansa"
2387 appextra="recorder:gui:radio"
2388 plugins="yes"
2389 swcodec="yes"
2390 toolset=$scramblebitmaptools
2391 t_cpu="arm"
2392 t_manufacturer="as3525"
2393 t_model="sansa-fuze"
2394 arm9tdmicc
2398 59|sansac200v2)
2399 target_id=55
2400 modelname="sansac200v2"
2401 target="-DSANSA_C200V2"
2402 memory=2 # as per OF diagnosis mode
2403 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2404 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2405 tool="$rootdir/tools/scramble -add=c2v2"
2406 output="rockbox.sansa"
2407 bootoutput="bootloader-c200v2.sansa"
2408 appextra="recorder:gui:radio"
2409 plugins="yes"
2410 swcodec="yes"
2411 # toolset is the tools within the tools directory that we build for
2412 # this particular target.
2413 toolset=$scramblebitmaptools
2414 # architecture, manufacturer and model for the target-tree build
2415 t_cpu="arm"
2416 t_manufacturer="as3525"
2417 t_model="sansa-c200v2"
2418 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2419 arm9tdmicc
2420 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2423 60|sansaclipv2)
2424 target_id=60
2425 modelname="sansaclipv2"
2426 target="-DSANSA_CLIPV2"
2427 memory=8
2428 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2429 bmp2rb_native="$bmp2rb_mono"
2430 tool="$rootdir/tools/scramble -add=clv2"
2431 output="rockbox.sansa"
2432 bootoutput="bootloader-clipv2.sansa"
2433 appextra="recorder:gui:radio"
2434 plugins="yes"
2435 swcodec="yes"
2436 toolset=$scramblebitmaptools
2437 t_cpu="arm"
2438 t_manufacturer="as3525"
2439 t_model="sansa-clipv2"
2440 arm926ejscc
2443 61|sansaview)
2444 echo "Sansa View is not yet supported!"
2445 exit 1
2446 target_id=63
2447 modelname="sansaview"
2448 target="-DSANSA_VIEW"
2449 memory=32
2450 arm1176jzscc
2451 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2452 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2453 output="rockbox.mi4"
2454 appextra="gui"
2455 plugins=""
2456 swcodec="yes"
2457 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2458 bootoutput="firmware.mi4"
2459 # toolset is the tools within the tools directory that we build for
2460 # this particular target.
2461 toolset=$scramblebitmaptools
2462 t_cpu="arm"
2463 t_manufacturer="sandisk"
2464 t_model="sansa-view"
2467 62|sansaclipplus)
2468 target_id=66
2469 modelname="sansaclipplus"
2470 target="-DSANSA_CLIPPLUS"
2471 memory=8
2472 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2473 bmp2rb_native="$bmp2rb_mono"
2474 tool="$rootdir/tools/scramble -add=cli+"
2475 output="rockbox.sansa"
2476 bootoutput="bootloader-clipplus.sansa"
2477 appextra="recorder:gui:radio"
2478 plugins="yes"
2479 swcodec="yes"
2480 toolset=$scramblebitmaptools
2481 t_cpu="arm"
2482 t_manufacturer="as3525"
2483 t_model="sansa-clipplus"
2484 arm926ejscc
2487 63|sansafuzev2)
2488 target_id=68
2489 modelname="sansafuzev2"
2490 target="-DSANSA_FUZEV2"
2491 memory=8 # not sure
2492 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2493 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2494 tool="$rootdir/tools/scramble -add=fuz2"
2495 output="rockbox.sansa"
2496 bootoutput="bootloader-fuzev2.sansa"
2497 appextra="recorder:gui:radio"
2498 plugins="yes"
2499 swcodec="yes"
2500 toolset=$scramblebitmaptools
2501 t_cpu="arm"
2502 t_manufacturer="as3525"
2503 t_model="sansa-fuzev2"
2504 arm926ejscc
2507 64|sansafuzeplus)
2508 target_id=80
2509 modelname="sansafuzeplus"
2510 target="-DSANSA_FUZEPLUS"
2511 memory=64
2512 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2513 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2514 tool="$rootdir/tools/scramble -add=fuz+"
2515 output="rockbox.sansa"
2516 boottool="true"
2517 bootoutput=""
2518 appextra="gui:recorder:radio"
2519 plugins="no"
2520 swcodec="yes"
2521 toolset=$scramblebitmaptools
2522 t_cpu="arm"
2523 t_manufacturer="imx233"
2524 t_model="sansa-fuzeplus"
2525 arm926ejscc
2528 65|sansaclipzip)
2529 target_id=68
2530 modelname="sansaclipzip"
2531 target="-DSANSA_CLIPZIP"
2532 memory=8 # not sure
2533 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2534 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2535 tool="$rootdir/tools/scramble -add=clzp"
2536 output="rockbox.sansa"
2537 bootoutput="bootloader-clipzip.sansa"
2538 appextra="recorder:gui:radio"
2539 plugins="yes"
2540 swcodec="yes"
2541 toolset=$scramblebitmaptools
2542 t_cpu="arm"
2543 t_manufacturer="as3525"
2544 t_model="sansa-clipzip"
2545 arm926ejscc
2548 150|tatungtpj1022)
2549 target_id=25
2550 modelname="tatungtpj1022"
2551 target="-DTATUNG_TPJ1022"
2552 memory=32 # always
2553 arm7tdmicc
2554 tool="$rootdir/tools/scramble -add tpj2"
2555 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2556 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2557 output="rockbox.elio"
2558 appextra="recorder:gui:radio"
2559 plugins="yes"
2560 swcodec="yes"
2561 boottool="$rootdir/tools/scramble -mi4v2"
2562 bootoutput="pp5020.mi4"
2563 # toolset is the tools within the tools directory that we build for
2564 # this particular target.
2565 toolset=$scramblebitmaptools
2566 # architecture, manufacturer and model for the target-tree build
2567 t_cpu="arm"
2568 t_manufacturer="tatung"
2569 t_model="tpj1022"
2572 100|gogearsa9200)
2573 target_id=41
2574 modelname="gogearsa9200"
2575 target="-DPHILIPS_SA9200"
2576 memory=32 # supposedly
2577 arm7tdmicc
2578 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2579 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2580 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2581 output="rockbox.mi4"
2582 appextra="recorder:gui:radio"
2583 plugins="yes"
2584 swcodec="yes"
2585 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2586 bootoutput="FWImage.ebn"
2587 # toolset is the tools within the tools directory that we build for
2588 # this particular target.
2589 toolset=$scramblebitmaptools
2590 # architecture, manufacturer and model for the target-tree build
2591 t_cpu="arm"
2592 t_manufacturer="philips"
2593 t_model="sa9200"
2596 101|gogearhdd1630)
2597 target_id=43
2598 modelname="gogearhdd1630"
2599 target="-DPHILIPS_HDD1630"
2600 memory=32 # supposedly
2601 arm7tdmicc
2602 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2603 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2604 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2605 output="rockbox.mi4"
2606 appextra="recorder:gui:radio"
2607 plugins="yes"
2608 swcodec="yes"
2609 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2610 bootoutput="FWImage.ebn"
2611 # toolset is the tools within the tools directory that we build for
2612 # this particular target.
2613 toolset=$scramblebitmaptools
2614 # architecture, manufacturer and model for the target-tree build
2615 t_cpu="arm"
2616 t_manufacturer="philips"
2617 t_model="hdd1630"
2620 102|gogearhdd6330)
2621 target_id=65
2622 modelname="gogearhdd6330"
2623 target="-DPHILIPS_HDD6330"
2624 memory=64 # always
2625 arm7tdmicc
2626 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2627 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2628 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2629 output="rockbox.mi4"
2630 appextra="recorder:gui:radio"
2631 plugins="yes"
2632 swcodec="yes"
2633 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2634 bootoutput="FWImage.ebn"
2635 # toolset is the tools within the tools directory that we build for
2636 # this particular target.
2637 toolset=$scramblebitmaptools
2638 # architecture, manufacturer and model for the target-tree build
2639 t_cpu="arm"
2640 t_manufacturer="philips"
2641 t_model="hdd6330"
2644 110|meizum6sl)
2645 target_id=49
2646 modelname="meizum6sl"
2647 target="-DMEIZU_M6SL"
2648 memory=16 # always
2649 arm940tbecc
2650 tool="cp"
2651 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2652 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2653 output="rockbox.meizu"
2654 appextra="recorder:gui:radio"
2655 plugins="no" #FIXME
2656 swcodec="yes"
2657 toolset=$genericbitmaptools
2658 boottool="cp"
2659 bootoutput="rockboot.ebn"
2660 # architecture, manufacturer and model for the target-tree build
2661 t_cpu="arm"
2662 t_manufacturer="s5l8700"
2663 t_model="meizu-m6sl"
2666 111|meizum6sp)
2667 target_id=46
2668 modelname="meizum6sp"
2669 target="-DMEIZU_M6SP"
2670 memory=16 # always
2671 arm940tbecc
2672 tool="cp"
2673 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2674 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2675 output="rockbox.meizu"
2676 appextra="recorder:gui:radio"
2677 plugins="no" #FIXME
2678 swcodec="yes"
2679 toolset=$genericbitmaptools
2680 boottool="cp"
2681 bootoutput="rockboot.ebn"
2682 # architecture, manufacturer and model for the target-tree build
2683 t_cpu="arm"
2684 t_manufacturer="s5l8700"
2685 t_model="meizu-m6sp"
2688 112|meizum3)
2689 target_id=47
2690 modelname="meizum3"
2691 target="-DMEIZU_M3"
2692 memory=16 # always
2693 arm940tbecc
2694 tool="cp"
2695 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2696 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2697 output="rockbox.meizu"
2698 appextra="recorder:gui:radio"
2699 plugins="no" #FIXME
2700 swcodec="yes"
2701 toolset=$genericbitmaptools
2702 boottool="cp"
2703 bootoutput="rockboot.ebn"
2704 # architecture, manufacturer and model for the target-tree build
2705 t_cpu="arm"
2706 t_manufacturer="s5l8700"
2707 t_model="meizu-m3"
2710 120|ondavx747)
2711 target_id=45
2712 modelname="ondavx747"
2713 target="-DONDA_VX747"
2714 memory=16
2715 mipselcc
2716 tool="$rootdir/tools/scramble -add=x747"
2717 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2718 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2719 output="rockbox.vx747"
2720 appextra="recorder:gui:radio"
2721 plugins="yes"
2722 swcodec="yes"
2723 toolset=$genericbitmaptools
2724 boottool="$rootdir/tools/scramble -ccpmp"
2725 bootoutput="ccpmp.bin"
2726 # architecture, manufacturer and model for the target-tree build
2727 t_cpu="mips"
2728 t_manufacturer="ingenic_jz47xx"
2729 t_model="onda_vx747"
2732 121|ondavx767)
2733 target_id=64
2734 modelname="ondavx767"
2735 target="-DONDA_VX767"
2736 memory=16 #FIXME
2737 mipselcc
2738 tool="cp"
2739 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2740 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2741 output="rockbox.vx767"
2742 appextra="recorder:gui:radio"
2743 plugins="" #FIXME
2744 swcodec="yes"
2745 toolset=$genericbitmaptools
2746 boottool="$rootdir/tools/scramble -ccpmp"
2747 bootoutput="ccpmp.bin"
2748 # architecture, manufacturer and model for the target-tree build
2749 t_cpu="mips"
2750 t_manufacturer="ingenic_jz47xx"
2751 t_model="onda_vx767"
2754 122|ondavx747p)
2755 target_id=54
2756 modelname="ondavx747p"
2757 target="-DONDA_VX747P"
2758 memory=16
2759 mipselcc
2760 tool="$rootdir/tools/scramble -add=747p"
2761 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2762 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2763 output="rockbox.vx747p"
2764 appextra="recorder:gui:radio"
2765 plugins="yes"
2766 swcodec="yes"
2767 toolset=$genericbitmaptools
2768 boottool="$rootdir/tools/scramble -ccpmp"
2769 bootoutput="ccpmp.bin"
2770 # architecture, manufacturer and model for the target-tree build
2771 t_cpu="mips"
2772 t_manufacturer="ingenic_jz47xx"
2773 t_model="onda_vx747"
2776 123|ondavx777)
2777 target_id=61
2778 modelname="ondavx777"
2779 target="-DONDA_VX777"
2780 memory=16
2781 mipselcc
2782 tool="$rootdir/tools/scramble -add=x777"
2783 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2784 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2785 output="rockbox.vx777"
2786 appextra="recorder:gui:radio"
2787 plugins="yes"
2788 swcodec="yes"
2789 toolset=$genericbitmaptools
2790 boottool="$rootdir/tools/scramble -ccpmp"
2791 bootoutput="ccpmp.bin"
2792 # architecture, manufacturer and model for the target-tree build
2793 t_cpu="mips"
2794 t_manufacturer="ingenic_jz47xx"
2795 t_model="onda_vx747"
2798 130|lyreproto1)
2799 target_id=56
2800 modelname="lyreproto1"
2801 target="-DLYRE_PROTO1"
2802 memory=64
2803 arm926ejscc
2804 tool="cp"
2805 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2806 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2807 output="rockbox.lyre"
2808 appextra="recorder:gui:radio"
2809 plugins=""
2810 swcodec="yes"
2811 toolset=$scramblebitmaptools
2812 boottool="cp"
2813 bootoutput="bootloader-proto1.lyre"
2814 # architecture, manufacturer and model for the target-tree build
2815 t_cpu="arm"
2816 t_manufacturer="at91sam"
2817 t_model="lyre_proto1"
2820 131|mini2440)
2821 target_id=99
2822 modelname="mini2440"
2823 target="-DMINI2440"
2824 memory=64
2825 arm9tdmicc
2826 tool="$rootdir/tools/scramble -add=m244"
2827 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2828 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2829 output="rockbox.mini2440"
2830 appextra="recorder:gui:radio"
2831 plugins=""
2832 swcodec="yes"
2833 toolset=$scramblebitmaptools
2834 boottool="cp"
2835 bootoutput="bootloader-mini2440.lyre"
2836 # architecture, manufacturer and model for the target-tree build
2837 t_cpu="arm"
2838 t_manufacturer="s3c2440"
2839 t_model="mini2440"
2842 140|samsungyh820)
2843 target_id=57
2844 modelname="samsungyh820"
2845 target="-DSAMSUNG_YH820"
2846 memory=32 # always
2847 arm7tdmicc
2848 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2849 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2850 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2851 output="rockbox.mi4"
2852 appextra="recorder:gui:radio"
2853 plugins="yes"
2854 swcodec="yes"
2855 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2856 bootoutput="FW_YH820.mi4"
2857 # toolset is the tools within the tools directory that we build for
2858 # this particular target.
2859 toolset=$scramblebitmaptools
2860 # architecture, manufacturer and model for the target-tree build
2861 t_cpu="arm"
2862 t_manufacturer="samsung"
2863 t_model="yh820"
2866 141|samsungyh920)
2867 target_id=58
2868 modelname="samsungyh920"
2869 target="-DSAMSUNG_YH920"
2870 memory=32 # always
2871 arm7tdmicc
2872 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2873 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2874 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2875 output="rockbox.mi4"
2876 appextra="recorder:gui:radio"
2877 plugins="yes"
2878 swcodec="yes"
2879 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2880 bootoutput="PP5020.mi4"
2881 # toolset is the tools within the tools directory that we build for
2882 # this particular target.
2883 toolset=$scramblebitmaptools
2884 # architecture, manufacturer and model for the target-tree build
2885 t_cpu="arm"
2886 t_manufacturer="samsung"
2887 t_model="yh920"
2890 142|samsungyh925)
2891 target_id=59
2892 modelname="samsungyh925"
2893 target="-DSAMSUNG_YH925"
2894 memory=32 # always
2895 arm7tdmicc
2896 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2897 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2898 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2899 output="rockbox.mi4"
2900 appextra="recorder:gui:radio"
2901 plugins="yes"
2902 swcodec="yes"
2903 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2904 bootoutput="FW_YH925.mi4"
2905 # toolset is the tools within the tools directory that we build for
2906 # this particular target.
2907 toolset=$scramblebitmaptools
2908 # architecture, manufacturer and model for the target-tree build
2909 t_cpu="arm"
2910 t_manufacturer="samsung"
2911 t_model="yh925"
2914 143|samsungyps3)
2915 target_id=72
2916 modelname="samsungyps3"
2917 target="-DSAMSUNG_YPS3"
2918 memory=16 # always
2919 arm940tbecc
2920 tool="cp"
2921 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2922 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2923 output="rockbox.yps3"
2924 appextra="recorder:gui:radio"
2925 plugins="no" #FIXME
2926 swcodec="yes"
2927 toolset=$genericbitmaptools
2928 boottool="cp"
2929 bootoutput="rockboot.ebn"
2930 # architecture, manufacturer and model for the target-tree build
2931 t_cpu="arm"
2932 t_manufacturer="s5l8700"
2933 t_model="yps3"
2936 160|vibe500)
2937 target_id=67
2938 modelname="vibe500"
2939 target="-DPBELL_VIBE500"
2940 memory=32 # always
2941 arm7tdmicc
2942 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2943 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2944 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2945 output="rockbox.mi4"
2946 appextra="recorder:gui:radio"
2947 plugins="yes"
2948 swcodec="yes"
2949 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2950 bootoutput="jukebox.mi4"
2951 # toolset is the tools within the tools directory that we build for
2952 # this particular target.
2953 toolset=$scramblebitmaptools
2954 # architecture, manufacturer and model for the target-tree build
2955 t_cpu="arm"
2956 t_manufacturer="pbell"
2957 t_model="vibe500"
2960 170|mpiohd200)
2961 target_id=69
2962 modelname="mpiohd200"
2963 target="-DMPIO_HD200"
2964 memory=16 # always
2965 coldfirecc
2966 tool="$rootdir/tools/scramble -add=hd20"
2967 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2968 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2969 output="rockbox.mpio"
2970 bootoutput="bootloader.mpio"
2971 appextra="recorder:gui:radio"
2972 plugins="yes"
2973 swcodec="yes"
2974 # toolset is the tools within the tools directory that we build for
2975 # this particular target.
2976 toolset="$genericbitmaptools"
2977 # architecture, manufacturer and model for the target-tree build
2978 t_cpu="coldfire"
2979 t_manufacturer="mpio"
2980 t_model="hd200"
2983 171|mpiohd300)
2984 target_id=70
2985 modelname="mpiohd300"
2986 target="-DMPIO_HD300"
2987 memory=16 # always
2988 coldfirecc
2989 tool="$rootdir/tools/scramble -add=hd30"
2990 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2991 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2992 output="rockbox.mpio"
2993 bootoutput="bootloader.mpio"
2994 appextra="recorder:gui:radio"
2995 plugins="yes"
2996 swcodec="yes"
2997 # toolset is the tools within the tools directory that we build for
2998 # this particular target.
2999 toolset="$genericbitmaptools"
3000 # architecture, manufacturer and model for the target-tree build
3001 t_cpu="coldfire"
3002 t_manufacturer="mpio"
3003 t_model="hd300"
3006 180|rk27generic)
3007 target_id=78
3008 modelname="rk27generic"
3009 target="-DRK27_GENERIC"
3010 memory=16 # always
3011 arm7ejscc
3012 tool="$rootdir/tools/scramble -add=rk27"
3013 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3014 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3015 output="rockbox.rk27"
3016 bootoutput="bootloader.rk27"
3017 appextra="recorder:gui:radio"
3018 plugins="yes"
3019 swcodec="yes"
3020 # toolset is the tools within the tools directory that we build for
3021 # this particular target.
3022 toolset="$genericbitmaptools"
3023 # architecture, manufacturer and model for the target-tree build
3024 t_cpu="arm"
3025 t_manufacturer="rk27xx"
3026 t_model="rk27generic"
3029 200|sdlapp)
3030 application="yes"
3031 target_id=73
3032 modelname="sdlapp"
3033 target="-DSDLAPP"
3034 app_set_paths
3035 app_set_lcd_size
3036 memory=8
3037 uname=`uname`
3038 simcc "sdl-app"
3039 tool="cp "
3040 boottool="cp "
3041 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3042 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3043 output="rockbox"
3044 bootoutput="rockbox"
3045 appextra="recorder:gui:radio"
3046 plugins="yes"
3047 swcodec="yes"
3048 # architecture, manufacturer and model for the target-tree build
3049 t_cpu="hosted"
3050 t_manufacturer="sdl"
3051 t_model="app"
3054 201|android)
3055 application="yes"
3056 target_id=74
3057 modelname="android"
3058 target="-DANDROID"
3059 app_type="android"
3060 app_set_lcd_size
3061 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
3062 bindir="/data/data/org.rockbox/lib"
3063 libdir="/data/data/org.rockbox/app_rockbox"
3064 memory=8
3065 uname=`uname`
3066 androidcc
3067 tool="cp "
3068 boottool="cp "
3069 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3070 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3071 output="librockbox.so"
3072 bootoutput="librockbox.so"
3073 appextra="recorder:gui:radio:hosted/android"
3074 plugins="yes"
3075 swcodec="yes"
3076 # architecture, manufacturer and model for the target-tree build
3077 t_cpu="hosted"
3078 t_manufacturer="android"
3079 t_model="app"
3082 202|nokian8xx)
3083 application="yes"
3084 target_id=75
3085 modelname="nokian8xx"
3086 app_type="sdl-app"
3087 target="-DNOKIAN8XX"
3088 sharedir="/opt/rockbox/share/rockbox"
3089 bindir="/opt/rockbox/bin"
3090 libdir="/opt/rockbox/lib"
3091 memory=8
3092 uname=`uname`
3093 maemocc 4
3094 tool="cp "
3095 boottool="cp "
3096 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3097 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3098 output="rockbox"
3099 bootoutput="rockbox"
3100 appextra="recorder:gui:radio"
3101 plugins="yes"
3102 swcodec="yes"
3103 # architecture, manufacturer and model for the target-tree build
3104 t_cpu="hosted"
3105 t_manufacturer="maemo"
3106 t_model="app"
3109 203|nokian900)
3110 application="yes"
3111 target_id=76
3112 modelname="nokian900"
3113 app_type="sdl-app"
3114 target="-DNOKIAN900"
3115 sharedir="/opt/rockbox/share/rockbox"
3116 bindir="/opt/rockbox/bin"
3117 libdir="/opt/rockbox/lib"
3118 memory=8
3119 uname=`uname`
3120 maemocc 5
3121 tool="cp "
3122 boottool="cp "
3123 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3124 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3125 output="rockbox"
3126 bootoutput="rockbox"
3127 appextra="recorder:gui:radio"
3128 plugins="yes"
3129 swcodec="yes"
3130 # architecture, manufacturer and model for the target-tree build
3131 t_cpu="hosted"
3132 t_manufacturer="maemo"
3133 t_model="app"
3136 204|pandora)
3137 application="yes"
3138 target_id=77
3139 modelname="pandora"
3140 app_type="sdl-app"
3141 target="-DPANDORA"
3142 sharedir="rockbox/share/rockbox"
3143 bindir="rockbox/bin"
3144 libdir="rockbox/lib"
3145 memory=8
3146 uname=`uname`
3147 pandoracc
3148 tool="cp "
3149 boottool="cp "
3150 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3151 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3152 output="rockbox"
3153 bootoutput="rockbox"
3154 appextra="recorder:gui:radio"
3155 plugins="yes"
3156 swcodec="yes"
3157 # architecture, manufacturer and model for the target-tree build
3158 t_cpu="hosted"
3159 t_manufacturer="pandora"
3160 t_model="app"
3164 echo "Please select a supported target platform!"
3165 exit 7
3168 esac
3170 echo "Platform set to $modelname"
3173 #remove start
3174 ############################################################################
3175 # Amount of memory, for those that can differ. They have $memory unset at
3176 # this point.
3179 if [ -z "$memory" ]; then
3180 case $target_id in
3182 if [ "$ARG_RAM" ]; then
3183 size=$ARG_RAM
3184 else
3185 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3186 size=`input`;
3188 case $size in
3189 60|64)
3190 memory="64"
3193 memory="32"
3195 esac
3198 if [ "$ARG_RAM" ]; then
3199 size=$ARG_RAM
3200 else
3201 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3202 size=`input`;
3204 case $size in
3206 memory="8"
3209 memory="2"
3211 esac
3213 esac
3214 echo "Memory size selected: $memory MB"
3215 [ "$ARG_TYPE" ] || echo ""
3217 #remove end
3219 ##################################################################
3220 # Figure out build "type"
3223 # the ifp7x0 is the only platform that supports building a gdb stub like
3224 # this
3225 case $modelname in
3226 iriverifp7xx)
3227 gdbstub=", (G)DB stub"
3229 sansae200r|sansae200)
3230 gdbstub=", (I)nstaller"
3232 sansac200)
3233 gdbstub=", (E)raser"
3235 sansae200)
3236 gdbstub=", (E)raser"
3240 esac
3241 if [ "$ARG_TYPE" ]; then
3242 btype=$ARG_TYPE
3243 else
3244 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool$gdbstub: (Defaults to N)"
3245 btype=`input`;
3248 case $btype in
3249 [Ii])
3250 appsdir='$(ROOTDIR)/bootloader'
3251 apps="bootloader"
3252 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3253 bootloader="1"
3254 echo "e200R-installer build selected"
3256 [Ee])
3257 appsdir='$(ROOTDIR)/bootloader'
3258 apps="bootloader"
3259 extradefines="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3260 bootloader="1"
3261 echo "sansa eraser build selected"
3263 [Bb])
3264 if test $t_manufacturer = "archos"; then
3265 # Archos SH-based players do this somewhat differently for
3266 # some reason
3267 appsdir='$(ROOTDIR)/flash/bootbox'
3268 apps="bootbox"
3269 else
3270 appsdir='$(ROOTDIR)/bootloader'
3271 apps="bootloader"
3272 flash=""
3273 if test -n "$boottool"; then
3274 tool="$boottool"
3276 if test -n "$bootoutput"; then
3277 output=$bootoutput
3280 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3281 bootloader="1"
3282 echo "Bootloader build selected"
3284 [Ss])
3285 if [ "$modelname" = "sansae200r" ]; then
3286 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3287 exit 8
3289 debug="-DDEBUG"
3290 simulator="yes"
3291 extradefines="$extradefines -DSIMULATOR"
3292 archosrom=""
3293 flash=""
3294 echo "Simulator build selected"
3296 [Aa]*)
3297 echo "Advanced build selected"
3298 whichadvanced $btype
3300 [Gg])
3301 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3302 appsdir='$(ROOTDIR)/gdb'
3303 apps="stub"
3304 case $modelname in
3305 iriverifp7xx)
3306 output="stub.wma"
3310 esac
3311 echo "GDB stub build selected"
3313 [Cc])
3314 uname=`uname`
3315 simcc "checkwps"
3316 toolset='';
3317 t_cpu='';
3318 GCCOPTS='';
3319 extradefines="$extradefines -DDEBUG"
3320 appsdir='$(ROOTDIR)/tools/checkwps';
3321 output='checkwps.'${modelname};
3322 archosrom='';
3323 echo "CheckWPS build selected"
3325 [Dd])
3326 uname=`uname`
3327 simcc "database"
3328 toolset='';
3329 t_cpu='';
3330 GCCOPTS='';
3331 appsdir='$(ROOTDIR)/tools/database';
3332 archosrom='';
3334 case $uname in
3335 CYGWIN*|MINGW*)
3336 output="database_${modelname}.exe"
3339 output='database.'${modelname};
3341 esac
3343 echo "Database tool build selected"
3346 if [ "$modelname" = "sansae200r" ]; then
3347 echo "Do not use the e200R target for regular builds. Use e200 instead."
3348 exit 8
3350 debug=""
3351 btype="N" # set it explicitly since RET only gets here as well
3352 echo "Normal build selected"
3355 esac
3356 # to be able running "make manual" from non-manual configuration
3357 case $modelname in
3358 archosrecorderv2)
3359 manualdev="archosfmrecorder"
3361 iriverh1??)
3362 manualdev="iriverh100"
3364 ipodmini2g)
3365 manualdev="ipodmini1g"
3368 manualdev=$modelname
3370 esac
3372 if [ -z "$debug" ]; then
3373 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3376 if [ "yes" = "$application" ]; then
3377 echo Building Rockbox as an Application
3378 extradefines="$extradefines -DAPPLICATION"
3381 echo "Using source code root directory: $rootdir"
3383 # this was once possible to change at build-time, but no more:
3384 language="english"
3386 uname=`uname`
3388 if [ "yes" = "$simulator" ]; then
3389 # setup compiler and things for simulator
3390 simcc "sdl-sim"
3392 if [ -d "simdisk" ]; then
3393 echo "Subdirectory 'simdisk' already present"
3394 else
3395 mkdir simdisk
3396 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3400 # Now, figure out version number of the (gcc) compiler we are about to use
3401 gccver=`$CC -dumpversion`;
3403 # figure out the binutil version too and display it, mostly for the build
3404 # system etc to be able to see it easier
3405 if [ $uname = "Darwin" ]; then
3406 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3407 else
3408 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3411 if [ -z "$gccver" ]; then
3412 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3413 echo "[WARNING] this may cause your build to fail since we cannot do the"
3414 echo "[WARNING] checks we want now."
3415 else
3417 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3418 # DEPEND on it
3420 num1=`echo $gccver | cut -d . -f1`
3421 num2=`echo $gccver | cut -d . -f2`
3422 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3424 # This makes:
3425 # 3.3.X => 303
3426 # 3.4.X => 304
3427 # 2.95.3 => 295
3429 echo "Using $CC $gccver ($gccnum)"
3431 if test "$gccnum" -ge "400"; then
3432 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3433 # so we ignore that warnings for now
3434 # -Wno-pointer-sign
3435 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3438 if test "$gccnum" -ge "402"; then
3439 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3440 # and later would throw it for several valid cases
3441 GCCOPTS="$GCCOPTS -Wno-override-init"
3444 case $prefix in
3445 ""|"$CROSS_COMPILE")
3446 # simulator
3448 i586-mingw32msvc-)
3449 # cross-compile for win32
3452 # Verify that the cross-compiler is of a recommended version!
3453 if test "$gccver" != "$gccchoice"; then
3454 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3455 echo "WARNING: version $gccchoice!"
3456 echo "WARNING: This may cause your build to fail since it may be a version"
3457 echo "WARNING: that isn't functional or known to not be the best choice."
3458 echo "WARNING: If you suffer from build problems, you know that this is"
3459 echo "WARNING: a likely source for them..."
3462 esac
3467 echo "Using $LD $ldver"
3469 # check the compiler for SH platforms
3470 if test "$CC" = "sh-elf-gcc"; then
3471 if test "$gccnum" -lt "400"; then
3472 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3473 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3474 else
3475 # figure out patch status
3476 gccpatch=`$CC --version`;
3478 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3479 echo "gcc $gccver is rockbox patched"
3480 # then convert -O to -Os to get smaller binaries!
3481 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3482 else
3483 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3484 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3489 if test "$CC" = "m68k-elf-gcc"; then
3490 # convert -O to -Os to get smaller binaries!
3491 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3494 if [ "$ARG_CCACHE" = "1" ]; then
3495 echo "Enable ccache for building"
3496 ccache="ccache"
3497 elif [ "$ARG_CCACHE" != "0" ]; then
3498 ccache=`findtool ccache`
3499 if test -n "$ccache"; then
3500 echo "Found and uses ccache ($ccache)"
3504 # figure out the full path to the various commands if possible
3505 HOSTCC=`findtool gcc --lit`
3506 HOSTAR=`findtool ar --lit`
3507 CC=`findtool ${CC} --lit`
3508 LD=`findtool ${AR} --lit`
3509 AR=`findtool ${AR} --lit`
3510 AS=`findtool ${AS} --lit`
3511 OC=`findtool ${OC} --lit`
3512 WINDRES=`findtool ${WINDRES} --lit`
3513 DLLTOOL=`findtool ${DLLTOOL} --lit`
3514 DLLWRAP=`findtool ${DLLWRAP} --lit`
3515 RANLIB=`findtool ${RANLIB} --lit`
3517 if test -n "$ccache"; then
3518 CC="$ccache $CC"
3521 if test "$ARG_ARM_THUMB" = "1"; then
3522 extradefines="$extradefines -DUSE_THUMB"
3523 CC="$toolsdir/thumb-cc.py $CC"
3526 if test "X$endian" = "Xbig"; then
3527 defendian="ROCKBOX_BIG_ENDIAN"
3528 else
3529 defendian="ROCKBOX_LITTLE_ENDIAN"
3532 if [ "$ARG_RBDIR" != "" ]; then
3533 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3534 rbdir="/"$ARG_RBDIR
3535 else
3536 rbdir=$ARG_RBDIR
3538 echo "Using alternate rockbox dir: ${rbdir}"
3541 cat > autoconf.h <<EOF
3542 /* This header was made by configure */
3543 #ifndef __BUILD_AUTOCONF_H
3544 #define __BUILD_AUTOCONF_H
3546 /* Define endianess for the target or simulator platform */
3547 #define ${defendian} 1
3549 /* Define this if you build rockbox to support the logf logging and display */
3550 ${use_logf}
3552 /* Define this to record a chart with timings for the stages of boot */
3553 ${use_bootchart}
3555 /* optional define for a backlight modded Ondio */
3556 ${have_backlight}
3558 /* optional define for FM radio mod for iAudio M5 */
3559 ${have_fmradio_in}
3561 /* optional define for ATA poweroff on Player */
3562 ${have_ata_poweroff}
3564 /* optional defines for RTC mod for h1x0 */
3565 ${config_rtc}
3566 ${have_rtc_alarm}
3568 /* the threading backend we use */
3569 #define ${thread_support}
3571 /* lcd dimensions for application builds from configure */
3572 ${app_lcd_width}
3573 ${app_lcd_height}
3575 /* root of Rockbox */
3576 #define ROCKBOX_DIR "${rbdir}"
3577 #define ROCKBOX_SHARE_PATH "${sharedir}"
3578 #define ROCKBOX_BINARY_PATH "${bindir}"
3579 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3581 #endif /* __BUILD_AUTOCONF_H */
3584 if test -n "$t_cpu"; then
3585 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3587 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3588 # Maemo needs the SDL port, too
3589 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3590 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3591 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3592 # Pandora needs the SDL port, too
3593 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3594 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3595 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3596 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3597 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3600 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3601 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3602 GCCOPTS="$GCCOPTS"
3605 if test "$swcodec" = "yes"; then
3606 voicetoolset="rbspeexenc voicefont wavtrim"
3607 else
3608 voicetoolset="voicefont wavtrim"
3611 if test "$apps" = "apps"; then
3612 # only when we build "real" apps we build the .lng files
3613 buildlangs="langs"
3616 #### Fix the cmdline ###
3617 if [ -n "$ARG_PREFIX" ]; then
3618 cmdline="$cmdline --prefix=\$(PREFIX)"
3620 if [ -n "$ARG_LCDWIDTH" ]; then
3621 cmdline="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3624 # remove parts from the cmdline we're going to set unconditionally
3625 cmdline=`echo $cmdline | sed -e s,--target=[a-zA-Z0-9]\*,,g \
3626 -e s,--ram=[0-9]\*,,g \
3627 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3628 -e s,--type=[a-zA-Z]\*,,g`
3629 cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3631 ### end of cmdline
3633 cat > Makefile <<EOF
3634 ## Automatically generated. http://www.rockbox.org/
3636 export ROOTDIR=${rootdir}
3637 export FIRMDIR=\$(ROOTDIR)/firmware
3638 export APPSDIR=${appsdir}
3639 export TOOLSDIR=${toolsdir}
3640 export DOCSDIR=${rootdir}/docs
3641 export MANUALDIR=${rootdir}/manual
3642 export DEBUG=${debug}
3643 export MODELNAME=${modelname}
3644 export ARCHOSROM=${archosrom}
3645 export FLASHFILE=${flash}
3646 export TARGET_ID=${target_id}
3647 export TARGET=${target}
3648 export CPU=${t_cpu}
3649 export MANUFACTURER=${t_manufacturer}
3650 export OBJDIR=${pwd}
3651 export BUILDDIR=${pwd}
3652 export LANGUAGE=${language}
3653 export VOICELANGUAGE=${voicelanguage}
3654 export MEMORYSIZE=${memory}
3655 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3656 export MKFIRMWARE=${tool}
3657 export BMP2RB_MONO=${bmp2rb_mono}
3658 export BMP2RB_NATIVE=${bmp2rb_native}
3659 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3660 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3661 export BINARY=${output}
3662 export APPEXTRA=${appextra}
3663 export ENABLEDPLUGINS=${plugins}
3664 export SOFTWARECODECS=${swcodec}
3665 export EXTRA_DEFINES=${extradefines}
3666 export HOSTCC=${HOSTCC}
3667 export HOSTAR=${HOSTAR}
3668 export CC=${CC}
3669 export LD=${LD}
3670 export AR=${AR}
3671 export AS=${AS}
3672 export OC=${OC}
3673 export WINDRES=${WINDRES}
3674 export DLLTOOL=${DLLTOOL}
3675 export DLLWRAP=${DLLWRAP}
3676 export RANLIB=${RANLIB}
3677 export PREFIX=${ARG_PREFIX}
3678 export PROFILE_OPTS=${PROFILE_OPTS}
3679 export APP_TYPE=${app_type}
3680 export APPLICATION=${application}
3681 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3682 export GCCOPTS=${GCCOPTS}
3683 export TARGET_INC=${TARGET_INC}
3684 export LOADADDRESS=${loadaddress}
3685 export SHARED_LDFLAG=${SHARED_LDFLAG}
3686 export SHARED_CFLAGS=${SHARED_CFLAGS}
3687 export LDOPTS=${LDOPTS}
3688 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3689 export GCCVER=${gccver}
3690 export GCCNUM=${gccnum}
3691 export UNAME=${uname}
3692 export MANUALDEV=${manualdev}
3693 export TTS_OPTS=${TTS_OPTS}
3694 export TTS_ENGINE=${TTS_ENGINE}
3695 export ENC_OPTS=${ENC_OPTS}
3696 export ENCODER=${ENCODER}
3697 export USE_ELF=${USE_ELF}
3698 export RBDIR=${rbdir}
3699 export ROCKBOX_SHARE_PATH=${sharedir}
3700 export ROCKBOX_BINARY_PATH=${bindir}
3701 export ROCKBOX_LIBRARY_PATH=${libdir}
3702 export SDLCONFIG=${sdl}
3703 export LCDORIENTATION=${lcd_orientation}
3705 CONFIGURE_OPTIONS=${cmdline}
3707 include \$(TOOLSDIR)/root.make
3710 echo "Created Makefile"