keyclick: Add a callback so screens can cancel a click. Add a generic list callback...
[maemo-rb.git] / tools / configure
blobc265c1ef53030e34985f9263c81fdc09db7a63e4
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=
33 # Properly retain command line arguments containing spaces
34 cmdline=
35 for arg in "$@"; do
36 case "$arg" in
37 *\ *) cmdline="$cmdline \"$arg\"";;
38 *) cmdline="$cmdline $arg";;
39 esac
40 done
43 # Begin Function Definitions
45 input() {
46 read response
47 echo $response
50 prefixtools () {
51 prefix="$1"
52 CC=${prefix}gcc
53 WINDRES=${prefix}windres
54 DLLTOOL=${prefix}dlltool
55 DLLWRAP=${prefix}dllwrap
56 RANLIB=${prefix}ranlib
57 LD=${prefix}ld
58 AR=${prefix}ar
59 AS=${prefix}as
60 OC=${prefix}objcopy
63 app_set_paths () {
64 # setup files and paths depending on the platform
65 if [ -z "$ARG_PREFIX" ]; then
66 sharedir="/usr/local/share/rockbox"
67 bindir="/usr/local/bin"
68 libdir="/usr/local/lib"
69 else
70 if [ -d "$ARG_PREFIX" ]; then
71 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
72 ARG_PREFIX=`realpath $ARG_PREFIX`
73 if [ "0" != "$?" ]; then
74 echo "ERROR: Could not get prefix path (is realpath installed?)."
75 exit
78 sharedir="$ARG_PREFIX/share/rockbox"
79 bindir="$ARG_PREFIX/bin"
80 libdir="$ARG_PREFIX/lib"
81 else
82 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
83 exit
88 # Set the application LCD size according to the following priorities:
89 # 1) If --lcdwidth and --lcdheight are set, use them
90 # 2) If a size is passed to the app_set_lcd_size() function, use that
91 # 3) Otherwise ask the user
92 app_set_lcd_size () {
93 if [ -z "$ARG_LCDWIDTH" ]; then
94 ARG_LCDWIDTH=$1
96 if [ -z "$ARG_LCDHEIGHT" ]; then
97 ARG_LCDHEIGHT=$2
100 echo "Enter the LCD width (default: 320)"
101 if [ -z "$ARG_LCDWIDTH" ]; then
102 app_lcd_width=`input`
103 else
104 app_lcd_width="$ARG_LCDWIDTH"
106 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
107 echo "Enter the LCD height (default: 480)"
108 if [ -z "$ARG_LCDHEIGHT" ]; then
109 app_lcd_height=`input`
110 else
111 app_lcd_height="$ARG_LCDHEIGHT"
113 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
114 if [ $app_lcd_width -gt $app_lcd_height ]; then
115 lcd_orientation="landscape"
116 else
117 lcd_orientation="portrait"
119 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
120 ARG_LCDWIDTH=$app_lcd_width
121 ARG_LCDHEIGHT=$app_lcd_height
123 app_lcd_width="#define LCD_WIDTH $app_lcd_width"
124 app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
127 findarmgcc() {
128 if [ "$ARG_ARM_EABI" != "0" ]; then
129 prefixtools arm-elf-eabi-
130 gccchoice="4.4.4"
131 else
132 prefixtools arm-elf-
133 gccchoice="4.0.3"
137 # scan the $PATH for the given command
138 findtool(){
139 file="$1"
141 IFS=":"
142 for path in $PATH
144 # echo "checks for $file in $path" >&2
145 if test -f "$path/$file"; then
146 echo "$path/$file"
147 return
149 done
150 # check whether caller wants literal return value if not found
151 if [ "$2" = "--lit" ]; then
152 echo "$file"
156 # scan the $PATH for sdl-config - check whether for a (cross-)win32
157 # sdl as requested
158 findsdl(){
159 # sdl-config might (not) be prefixed for cross compiles so try both.
160 files="${CROSS_COMPILE}sdl-config:sdl-config"
161 winbuild="$1"
163 IFS=":"
164 for file in $files
166 for path in $PATH
168 #echo "checks for $file in $path" >&2
169 if test -f "$path/$file"; then
170 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
171 if [ "yes" = "${winbuild}" ]; then
172 echo "$path/$file"
173 return
175 else
176 if [ "yes" != "${winbuild}" ]; then
177 echo "$path/$file"
178 return
182 done
183 done
186 # check for availability of sigaltstack to support our thread engine
187 check_sigaltstack() {
188 cat >$tmpdir/check_threads.c <<EOF
189 #include <signal.h>
190 int main(int argc, char **argv)
192 #ifndef NULL
193 #define NULL (void*)0
194 #endif
195 sigaltstack(NULL, NULL);
196 return 0;
199 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 1> /dev/null
200 result=$?
201 rm -rf $tmpdir/check_threads*
202 echo $result
205 # check for availability of Fiber on Win32 to support our thread engine
206 check_fiber() {
207 cat >$tmpdir/check_threads.c <<EOF
208 #include <windows.h>
209 int main(int argc, char **argv)
211 ConvertThreadToFiber(NULL);
212 return 0;
215 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 2>/dev/null
216 result=$?
217 rm -rf $tmpdir/check_threads*
218 echo $result
221 simcc () {
223 # default tool setup for native building
224 prefixtools "$CROSS_COMPILE"
225 ARG_ARM_THUMB=0 # can't use thumb in native builds
227 app_type=$1
228 winbuild=""
229 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
230 if [ "$app_type" != "sdl-app" ]; then
231 # Disable optimizations for non-app builds
232 GCCOPTS=`echo $GCCOPTS | sed -e s/-O//`
235 GCCOPTS="$GCCOPTS -fno-builtin -g"
236 GCCOPTIMIZE=''
237 LDOPTS='-lm' # button-sdl.c uses sqrt()
238 sigaltstack=""
239 fibers=""
240 endian="" # endianess of the dap doesnt matter here
242 # default output binary name, don't override app_get_platform()
243 if [ "$app_type" != "sdl-app" ]; then
244 output="rockboxui"
247 # default share option, override below if needed
248 SHARED_LDFLAG="-shared"
249 SHARED_CFLAGS="-fPIC -fvisibility=hidden"
251 if [ "$win32crosscompile" = "yes" ]; then
252 # We are crosscompiling
253 # add cross-compiler option(s)
254 LDOPTS="$LDOPTS -mconsole"
255 output="$output.exe"
256 winbuild="yes"
257 CROSS_COMPILE=${CROSS_COMPILE:-"i586-mingw32msvc-"}
258 SHARED_CFLAGS=''
259 prefixtools "$CROSS_COMPILE"
260 fibers=`check_fiber`
261 endian="little" # windows is little endian
262 echo "Enabling MMX support"
263 GCCOPTS="$GCCOPTS -mmmx"
264 else
265 case $uname in
266 CYGWIN*)
267 echo "Cygwin host detected"
269 fibers=`check_fiber`
270 LDOPTS="$LDOPTS -mconsole"
271 output="$output.exe"
272 winbuild="yes"
273 SHARED_CFLAGS=''
276 MINGW*)
277 echo "MinGW host detected"
279 fibers=`check_fiber`
280 LDOPTS="$LDOPTS -mconsole"
281 output="$output.exe"
282 winbuild="yes"
285 Linux)
286 sigaltstack=`check_sigaltstack`
287 echo "Linux host detected"
288 LDOPTS="$LDOPTS -ldl"
291 FreeBSD)
292 sigaltstack=`check_sigaltstack`
293 echo "FreeBSD host detected"
294 LDOPTS="$LDOPTS -ldl"
297 Darwin)
298 sigaltstack=`check_sigaltstack`
299 echo "Darwin host detected"
300 LDOPTS="$LDOPTS -ldl"
301 SHARED_LDFLAG="-dynamiclib -Wl\,-single_module"
304 SunOS)
305 sigaltstack=`check_sigaltstack`
306 echo "*Solaris host detected"
308 GCCOPTS="$GCCOPTS -fPIC"
309 LDOPTS="$LDOPTS -ldl"
313 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
314 exit 1
316 esac
319 if [ "$winbuild" != "yes" ]; then
320 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
321 if [ "`uname -m`" = "i686" ]; then
322 echo "Enabling MMX support"
323 GCCOPTS="$GCCOPTS -mmmx"
327 sdl=`findsdl $winbuild`
329 if [ -n `echo $app_type | grep "sdl"` ]; then
330 if [ -z "$sdl" ]; then
331 echo "configure didn't find sdl-config, which indicates that you"
332 echo "don't have SDL (properly) installed. Please correct and"
333 echo "re-run configure!"
334 exit 2
335 else
336 # generic sdl-config checker
337 GCCOPTS="$GCCOPTS `$sdl --cflags`"
338 LDOPTS="$LDOPTS `$sdl --libs`"
343 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
344 # x86_64 supports MMX by default
346 if [ "$endian" = "" ]; then
347 id=$$
348 cat >$tmpdir/conftest-$id.c <<EOF
349 #include <stdio.h>
350 int main(int argc, char **argv)
352 int var=0;
353 char *varp = (char *)&var;
354 *varp=1;
356 printf("%d\n", var);
357 return 0;
360 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
361 # when cross compiling, the endianess cannot be detected because the above program doesn't run
362 # on the local machine. assume little endian but print a warning
363 endian=`$tmpdir/conftest-$id 2> /dev/null`
364 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
365 # big endian
366 endian="big"
367 else
368 # little endian
369 endian="little"
373 if [ "$CROSS_COMPILE" != "" ]; then
374 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
377 if [ "$app_type" = "sdl-sim" ]; then
378 echo "Simulator environment deemed $endian endian"
379 elif [ "$app_type" = "sdl-app" ]; then
380 echo "Application environment deemed $endian endian"
381 elif [ "$app_type" = "checkwps" ]; then
382 echo "CheckWPS environment deemed $endian endian"
385 # use wildcard here to make it work even if it was named *.exe like
386 # on cygwin
387 rm -f $tmpdir/conftest-$id*
389 thread_support=
390 if [ -z "$ARG_THREAD_SUPPORT" ] || [ "$ARG_THREAD_SUPPORT" = "0" ]; then
391 if [ "$sigaltstack" = "0" ]; then
392 thread_support="HAVE_SIGALTSTACK_THREADS"
393 LDOPTS="$LDOPTS -lpthread" # pthread needed
394 echo "Selected sigaltstack threads"
395 elif [ "$fibers" = "0" ]; then
396 thread_support="HAVE_WIN32_FIBER_THREADS"
397 echo "Selected Win32 Fiber threads"
401 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
402 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
403 thread_support="HAVE_SDL_THREADS"
404 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
405 echo "Selected SDL threads"
406 else
407 echo "WARNING: Falling back to SDL threads"
413 # functions for setting up cross-compiler names and options
414 # also set endianess and what the exact recommended gcc version is
415 # the gcc version should most likely match what versions we build with
416 # rockboxdev.sh
418 shcc () {
419 prefixtools sh-elf-
420 GCCOPTS="$CCOPTS -m1"
421 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
422 endian="big"
423 gccchoice="4.0.3"
426 calmrisccc () {
427 prefixtools calmrisc16-unknown-elf-
428 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
429 GCCOPTIMIZE="-fomit-frame-pointer"
430 endian="big"
433 coldfirecc () {
434 prefixtools m68k-elf-
435 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
436 GCCOPTIMIZE="-fomit-frame-pointer"
437 endian="big"
438 gccchoice="4.5.2"
441 arm7tdmicc () {
442 findarmgcc
443 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
444 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
445 GCCOPTS="$GCCOPTS -mlong-calls"
447 GCCOPTIMIZE="-fomit-frame-pointer"
448 endian="little"
451 arm9tdmicc () {
452 findarmgcc
453 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
454 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
455 GCCOPTS="$GCCOPTS -mlong-calls"
457 GCCOPTIMIZE="-fomit-frame-pointer"
458 endian="little"
461 arm940tbecc () {
462 findarmgcc
463 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
464 if test "$ARG_ARM_EABI" = "0"; then
465 GCCOPTS="$GCCOPTS -mlong-calls"
467 GCCOPTIMIZE="-fomit-frame-pointer"
468 endian="big"
471 arm940tcc () {
472 findarmgcc
473 GCCOPTS="$CCOPTS -mcpu=arm940t"
474 if test "$ARG_ARM_EABI" = "0"; then
475 GCCOPTS="$GCCOPTS -mlong-calls"
477 GCCOPTIMIZE="-fomit-frame-pointer"
478 endian="little"
481 arm946cc () {
482 findarmgcc
483 GCCOPTS="$CCOPTS -mcpu=arm9e"
484 if test "$ARG_ARM_EABI" = "0"; then
485 GCCOPTS="$GCCOPTS -mlong-calls"
487 GCCOPTIMIZE="-fomit-frame-pointer"
488 endian="little"
491 arm926ejscc () {
492 findarmgcc
493 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
494 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
495 GCCOPTS="$GCCOPTS -mlong-calls"
497 GCCOPTIMIZE="-fomit-frame-pointer"
498 endian="little"
501 arm1136jfscc () {
502 findarmgcc
503 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
504 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
505 GCCOPTS="$GCCOPTS -mlong-calls"
507 GCCOPTIMIZE="-fomit-frame-pointer"
508 endian="little"
511 arm1176jzscc () {
512 findarmgcc
513 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
514 if test "$ARG_ARM_EABI" = "0"; then
515 GCCOPTS="$GCCOPTS -mlong-calls"
517 GCCOPTIMIZE="-fomit-frame-pointer"
518 endian="little"
521 arm7ejscc () {
522 findarmgcc
523 GCCOPTS="$CCOPTS -march=armv5te"
524 GCCOPTIMIZE="-fomit-frame-pointer"
525 endian="little"
528 mipselcc () {
529 prefixtools mipsel-elf-
530 # mips is predefined, but we want it for paths. use __mips instead
531 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
532 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
533 GCCOPTIMIZE="-fomit-frame-pointer"
534 endian="little"
535 gccchoice="4.1.2"
538 maemocc () {
539 # Scratchbox sets up "gcc" based on the active target
540 prefixtools ""
542 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
543 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
544 GCCOPTIMIZE=''
545 LDOPTS="-lm -ldl $LDOPTS"
546 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
547 SHARED_LDFLAG="-shared"
548 SHARED_CFLAGS=''
549 endian="little"
550 thread_support="HAVE_SIGALTSTACK_THREADS"
552 is_n900=0
553 # Determine maemo version
554 if pkg-config --atleast-version=5 maemo-version; then
555 if [ "$1" == "4" ]; then
556 echo "ERROR: Maemo 4 SDK required."
557 exit 1
559 extradefines="$extradefines -DMAEMO5"
560 echo "Found N900 maemo version"
561 is_n900=1
562 elif pkg-config --atleast-version=4 maemo-version; then
563 if [ "$1" == "5" ]; then
564 echo "ERROR: Maemo 5 SDK required."
565 exit 1
567 extradefines="$extradefines -DMAEMO4"
568 echo "Found N8xx maemo version"
569 else
570 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
571 exit 1
574 # SDL
575 if [ $is_n900 -eq 1 ]; then
576 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
577 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
578 else
579 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
580 LDOPTS="$LDOPTS `sdl-config --libs`"
583 # glib and libosso support
584 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
585 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
587 # libhal support: Battery monitoring
588 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
589 LDOPTS="$LDOPTS `pkg-config --libs hal`"
591 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
592 if [ $is_n900 -eq 1 ]; then
593 # gstreamer support: Audio output.
594 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
595 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
597 # N900 specific: libplayback support
598 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
599 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
601 # N900 specific: Enable ARMv7 NEON support
602 if sb-conf show -A |grep -q -i arm; then
603 echo "Detected ARM target"
604 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
605 extradefines="$extradefines -DMAEMO_ARM_BUILD"
606 else
607 echo "Detected x86 target"
609 else
610 # N8xx specific: Enable armv5te instructions
611 if sb-conf show -A |grep -q -i arm; then
612 echo "Detected ARM target"
613 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
614 extradefines="$extradefines -DMAEMO_ARM_BUILD"
615 else
616 echo "Detected x86 target"
621 pandoracc () {
622 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
623 # You have to use the sebt3 toolchain:
624 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
626 PNDSDK="/usr/local/angstrom/arm"
627 if [ ! -x $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc ]; then
628 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
629 exit
632 PATH=$PNDSDK/bin:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi/usr/bin
633 PKG_CONFIG_PATH=$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib/pkgconfig
634 LDOPTS="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
635 PKG_CONFIG="pkg-config"
637 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
638 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
639 GCCOPTIMIZE=''
640 LDOPTS="-lm -ldl $LDOPTS"
641 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
642 SHARED_LDFLAG="-shared"
643 SHARED_CFLAGS=''
644 endian="little"
645 thread_support="HAVE_SIGALTSTACK_THREADS"
647 # Include path
648 GCCOPTS="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
650 # Set up compiler
651 gccchoice="4.3.3"
652 prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
654 # Detect SDL
655 GCCOPTS="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
656 LDOPTS="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
658 # Compiler options
659 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
660 GCCOPTS="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
661 GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant"
664 ypr0cc () {
666 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
667 GCCOPTIMIZE=''
668 LDOPTS="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
669 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
670 SHARED_LDFLAG="-shared"
671 SHARED_CFLAGS=''
672 endian="little"
673 thread_support="HAVE_SIGALTSTACK_THREADS"
674 app_type="ypr0"
676 # Include path
677 GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
679 # Set up compiler
680 gccchoice="4.4.6"
681 prefixtools "arm-ypr0-linux-gnueabi-"
684 androidcc () {
685 if [ -z "$ANDROID_SDK_PATH" ]; then
686 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
687 echo "environment variable point to the root directory of the Android SDK."
688 exit
690 if [ -z "$ANDROID_NDK_PATH" ]; then
691 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
692 echo "environment variable point to the root directory of the Android NDK."
693 exit
695 buildhost=$(uname | tr "[:upper:]" "[:lower:]")
696 gccchoice="4.4.3"
697 gcctarget="arm-linux-androideabi-"
698 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
699 PATH=$PATH:$gccprefix/bin
700 prefixtools $gcctarget
701 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
702 GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
703 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
704 GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack"
705 LDOPTS="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
706 endian="little"
707 SHARED_LDFLAG="-shared"
710 whichadvanced () {
711 atype=`echo "$1" | cut -c 2-`
712 ##################################################################
713 # Prompt for specific developer options
715 if [ "$atype" ]; then
716 interact=
717 else
718 interact=1
719 echo ""
720 printf "Enter your developer options (press only enter when done)\n\
721 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
722 (T)est plugins, S(m)all C lib:"
723 if [ "$modelname" = "archosplayer" ]; then
724 printf ", Use (A)TA poweroff"
726 if [ "$t_model" = "ondio" ]; then
727 printf ", (B)acklight MOD"
729 if [ "$modelname" = "iaudiom5" ]; then
730 printf ", (F)M radio MOD"
732 if [ "$modelname" = "iriverh120" ]; then
733 printf ", (R)TC MOD"
735 echo ""
738 cont=1
739 while [ $cont = "1" ]; do
741 if [ "$interact" ]; then
742 option=`input`
743 else
744 option=`echo "$atype" | cut -c 1`
747 case $option in
748 [Dd])
749 if [ "yes" = "$profile" ]; then
750 echo "Debug is incompatible with profiling"
751 else
752 echo "DEBUG build enabled"
753 use_debug="yes"
756 [Ll])
757 echo "logf() support enabled"
758 logf="yes"
760 [Mm])
761 echo "Using Rockbox' small C library"
762 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
764 [Tt])
765 echo "Including test plugins"
766 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
768 [Cc])
769 echo "bootchart enabled (logf also enabled)"
770 bootchart="yes"
771 logf="yes"
773 [Ss])
774 echo "Simulator build enabled"
775 simulator="yes"
777 [Pp])
778 if [ "yes" = "$use_debug" ]; then
779 echo "Profiling is incompatible with debug"
780 else
781 echo "Profiling support is enabled"
782 profile="yes"
785 [Vv])
786 echo "Voice build selected"
787 voice="yes"
789 [Aa])
790 if [ "$modelname" = "archosplayer" ]; then
791 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
792 echo "ATA power off enabled"
795 [Bb])
796 if [ "$t_model" = "ondio" ]; then
797 have_backlight="#define HAVE_BACKLIGHT"
798 echo "Backlight functions enabled"
801 [Ff])
802 if [ "$modelname" = "iaudiom5" ]; then
803 have_fmradio_in="#define HAVE_FMRADIO_IN"
804 echo "FM radio functions enabled"
807 [Rr])
808 if [ "$modelname" = "iriverh120" ]; then
809 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
810 have_rtc_alarm="#define HAVE_RTC_ALARM"
811 echo "RTC functions enabled (DS1339/DS3231)"
814 [Ww])
815 echo "Enabling Windows 32 cross-compiling"
816 win32crosscompile="yes"
818 "") # Match enter press when finished with advanced options
819 cont=0
822 echo "[ERROR] Option $option unsupported"
824 esac
825 if [ "$interact" ]; then
826 btype="$btype$option"
827 else
828 atype=`echo "$atype" | cut -c 2-`
829 [ "$atype" ] || cont=0
831 done
832 echo "done"
834 if [ "yes" = "$voice" ]; then
835 # Ask about languages to build
836 picklang
837 voicelanguage=`whichlang`
838 echo "Voice language set to $voicelanguage"
840 # Configure encoder and TTS engine for each language
841 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
842 voiceconfig "$thislang"
843 done
845 if [ "yes" = "$use_debug" ]; then
846 debug="-DDEBUG"
847 GCCOPTS="$GCCOPTS -g -DDEBUG"
849 if [ "yes" = "$logf" ]; then
850 use_logf="#define ROCKBOX_HAS_LOGF 1"
852 if [ "yes" = "$bootchart" ]; then
853 use_bootchart="#define DO_BOOTCHART 1"
855 if [ "yes" = "$simulator" ]; then
856 debug="-DDEBUG"
857 extradefines="$extradefines -DSIMULATOR"
858 archosrom=""
859 flash=""
861 if [ "yes" = "$profile" ]; then
862 extradefines="$extradefines -DRB_PROFILE"
863 PROFILE_OPTS="-finstrument-functions"
867 # Configure voice settings
868 voiceconfig () {
869 thislang=$1
870 if [ ! "$ARG_TTS" ]; then
871 echo "Building $thislang voice for $modelname. Select options"
872 echo ""
875 if [ -n "`findtool flite`" ]; then
876 FLITE="F(l)ite "
877 FLITE_OPTS=""
878 DEFAULT_TTS="flite"
879 DEFAULT_TTS_OPTS=$FLITE_OPTS
880 DEFAULT_NOISEFLOOR="500"
881 DEFAULT_CHOICE="l"
883 if [ -n "`findtool espeak`" ]; then
884 ESPEAK="(e)Speak "
885 ESPEAK_OPTS=""
886 DEFAULT_TTS="espeak"
887 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
888 DEFAULT_NOISEFLOOR="500"
889 DEFAULT_CHOICE="e"
891 if [ -n "`findtool festival`" ]; then
892 FESTIVAL="(F)estival "
893 case "$thislang" in
894 "italiano")
895 FESTIVAL_OPTS="--language italian"
897 "espanol")
898 FESTIVAL_OPTS="--language spanish"
900 "finnish")
901 FESTIVAL_OPTS="--language finnish"
903 "czech")
904 FESTIVAL_OPTS="--language czech"
907 FESTIVAL_OPTS=""
909 esac
910 DEFAULT_TTS="festival"
911 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
912 DEFAULT_NOISEFLOOR="500"
913 DEFAULT_CHOICE="f"
915 if [ -n "`findtool swift`" ]; then
916 SWIFT="S(w)ift "
917 SWIFT_OPTS=""
918 DEFAULT_TTS="swift"
919 DEFAULT_TTS_OPTS=$SWIFT_OPTS
920 DEFAULT_NOISEFLOOR="500"
921 DEFAULT_CHOICE="w"
923 # Allow SAPI if Windows is in use
924 if [ -n "`findtool winver`" ]; then
925 SAPI="(S)API "
926 SAPI_OPTS=""
927 DEFAULT_TTS="sapi"
928 DEFAULT_TTS_OPTS=$SAPI_OPTS
929 DEFAULT_NOISEFLOOR="500"
930 DEFAULT_CHOICE="s"
933 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
934 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
935 exit 3
938 if [ "$ARG_TTS" ]; then
939 option=$ARG_TTS
940 else
941 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
942 option=`input`
943 if [ -z "$option" ]; then option=${DEFAULT_CHOICE}; fi
944 advopts="$advopts --tts=$option"
946 case "$option" in
947 [Ll])
948 TTS_ENGINE="flite"
949 NOISEFLOOR="500" # TODO: check this value
950 TTS_OPTS=$FLITE_OPTS
952 [Ee])
953 TTS_ENGINE="espeak"
954 NOISEFLOOR="500"
955 TTS_OPTS=$ESPEAK_OPTS
957 [Ff])
958 TTS_ENGINE="festival"
959 NOISEFLOOR="500"
960 TTS_OPTS=$FESTIVAL_OPTS
962 [Ss])
963 TTS_ENGINE="sapi"
964 NOISEFLOOR="500"
965 TTS_OPTS=$SAPI_OPTS
967 [Ww])
968 TTS_ENGINE="swift"
969 NOISEFLOOR="500"
970 TTS_OPTS=$SWIFT_OPTS
973 TTS_ENGINE=$DEFAULT_TTS
974 TTS_OPTS=$DEFAULT_TTS_OPTS
975 NOISEFLOOR=$DEFAULT_NOISEFLOOR
976 esac
977 echo "Using $TTS_ENGINE for TTS"
979 # Select which voice to use for Festival
980 if [ "$TTS_ENGINE" = "festival" ]; then
981 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
982 for voice in $voicelist; do
983 TTS_FESTIVAL_VOICE="$voice" # Default choice
984 break
985 done
986 if [ "$ARG_VOICE" ]; then
987 CHOICE=$ARG_VOICE
988 else
990 for voice in $voicelist; do
991 printf "%3d. %s\n" "$i" "$voice"
992 i=`expr $i + 1`
993 done
994 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
995 CHOICE=`input`
998 for voice in $voicelist; do
999 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
1000 TTS_FESTIVAL_VOICE="$voice"
1002 i=`expr $i + 1`
1003 done
1004 advopts="$advopts --voice=$CHOICE"
1005 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1006 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1009 # Read custom tts options from command line
1010 if [ "$ARG_TTSOPTS" ]; then
1011 TTS_OPTS="$ARG_TTSOPTS"
1012 echo "$TTS_ENGINE options set to $TTS_OPTS"
1015 if [ "$swcodec" = "yes" ]; then
1016 ENCODER="rbspeexenc"
1017 ENC_OPTS="-q 4 -c 10"
1018 else
1019 if [ -n "`findtool lame`" ]; then
1020 ENCODER="lame"
1021 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1022 else
1023 echo "You need LAME in the system path to build voice files for"
1024 echo "HWCODEC targets."
1025 exit 4
1029 echo "Using $ENCODER for encoding voice clips"
1031 # Read custom encoder options from command line
1032 if [ "$ARG_ENCOPTS" ]; then
1033 ENC_OPTS="$ARG_ENCOPTS"
1034 echo "$ENCODER options set to $ENC_OPTS"
1037 TEMPDIR="${pwd}"
1038 if [ -n "`findtool cygpath`" ]; then
1039 TEMPDIR=`cygpath . -a -w`
1043 picklang() {
1044 # figure out which languages that are around
1045 for file in $rootdir/apps/lang/*.lang; do
1046 clean=`basename $file .lang`
1047 langs="$langs $clean"
1048 done
1050 if [ "$ARG_LANG" ]; then
1051 pick=$ARG_LANG
1052 else
1053 echo "Select a number for the language to use (default is english)"
1054 # FIXME The multiple-language feature is currently broken
1055 # echo "You may enter a comma-separated list of languages to build"
1057 num=1
1058 for one in $langs; do
1059 echo "$num. $one"
1060 num=`expr $num + 1`
1061 done
1062 pick=`input`
1063 advopts="$advopts --language=$pick"
1067 whichlang() {
1068 output=""
1069 # Allow the user to pass a comma-separated list of langauges
1070 for thispick in `echo $pick | sed 's/,/ /g'`; do
1071 num=1
1072 for one in $langs; do
1073 # Accept both the language number and name
1074 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
1075 if [ "$output" = "" ]; then
1076 output=$one
1077 else
1078 output=$output,$one
1081 num=`expr $num + 1`
1082 done
1083 done
1084 if [ -z "$output" ]; then
1085 # pick a default
1086 output="english"
1088 echo $output
1091 help() {
1092 echo "Rockbox configure script."
1093 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1094 echo "Do *NOT* run this within the tools directory!"
1095 echo ""
1096 cat <<EOF
1097 Usage: configure [OPTION]...
1098 Options:
1099 --target=TARGET Sets the target, TARGET can be either the target ID or
1100 corresponding string. Run without this option to see all
1101 available targets.
1103 --ram=RAM Sets the RAM for certain targets. Even though any number
1104 is accepted, not every number is correct. The default
1105 value will be applied, if you entered a wrong number
1106 (which depends on the target). Watch the output. Run
1107 without this option if you are not sure which the right
1108 number is.
1110 --type=TYPE Sets the build type. Shortcuts are also valid.
1111 Run without this option to see all available types.
1112 Multiple values are allowed and managed in the input
1113 order. So --type=b stands for Bootloader build, while
1114 --type=ab stands for "Backlight MOD" build.
1116 --lcdwidth=X Sets the width of the LCD. Used only for application
1117 targets.
1119 --lcdheight=Y Sets the height of the LCD. Used only for application
1120 targets.
1122 --language=LANG Set the language used for voice generation (used only if
1123 TYPE is AV).
1125 --tts=ENGINE Set the TTS engine used for voice generation (used only
1126 if TYPE is AV).
1128 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1129 AV).
1131 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1133 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1135 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1136 This is useful for having multiple alternate builds on
1137 your device that you can load with ROLO. However as the
1138 bootloader looks for .rockbox you won't be able to boot
1139 into this build.
1141 --ccache Enable ccache use (done by default these days)
1142 --no-ccache Disable ccache use
1144 --eabi Make configure prefer toolchains that are able to compile
1145 for the new ARM standard abi EABI
1146 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1147 --thumb Build with -mthumb (for ARM builds)
1148 --no-thumb The opposite of --thumb (don't use thumb even for targets
1149 where this is the default
1150 --sdl-threads Force use of SDL threads. They have inferior performance,
1151 but are better debuggable with GDB
1152 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1153 behavior of falling back to them if no native thread
1154 support was found.
1155 --prefix Target installation directory
1156 --help Shows this message (must not be used with other options)
1160 exit
1163 ARG_CCACHE=
1164 ARG_ENCOPTS=
1165 ARG_LANG=
1166 ARG_RAM=
1167 ARG_RBDIR=
1168 ARG_TARGET=
1169 ARG_TTS=
1170 ARG_TTSOPTS=
1171 ARG_TYPE=
1172 ARG_VOICE=
1173 ARG_ARM_EABI=
1174 ARG_ARM_THUMB=
1175 ARG_PREFIX="$PREFIX"
1176 ARG_THREAD_SUPPORT=
1177 err=
1178 for arg in "$@"; do
1179 case "$arg" in
1180 --ccache) ARG_CCACHE=1;;
1181 --no-ccache) ARG_CCACHE=0;;
1182 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1183 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
1184 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1185 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
1186 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1187 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1188 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1189 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1190 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1191 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1192 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
1193 --eabi) ARG_ARM_EABI=1;;
1194 --no-eabi) ARG_ARM_EABI=0;;
1195 --thumb) ARG_ARM_THUMB=1;;
1196 --no-thumb) ARG_ARM_THUMB=0;;
1197 --sdl-threads)ARG_THREAD_SUPPORT=1;;
1198 --no-sdl-threads)
1199 ARG_THREAD_SUPPORT=0;;
1200 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
1201 --help) help;;
1202 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1203 esac
1204 done
1205 [ "$err" ] && exit 1
1207 advopts=
1209 if [ "$TMPDIR" != "" ]; then
1210 tmpdir=$TMPDIR
1211 else
1212 tmpdir=/tmp
1214 echo Using temporary directory $tmpdir
1216 if test -r "configure"; then
1217 # this is a check for a configure script in the current directory, it there
1218 # is one, try to figure out if it is this one!
1220 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1221 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1222 echo "It will only cause you pain and grief. Instead do this:"
1223 echo ""
1224 echo " cd .."
1225 echo " mkdir build-dir"
1226 echo " cd build-dir"
1227 echo " ../tools/configure"
1228 echo ""
1229 echo "Much happiness will arise from this. Enjoy"
1230 exit 5
1234 # get our current directory
1235 pwd=`pwd`;
1237 if { echo $pwd | grep " "; } then
1238 echo "You're running this script in a path that contains space. The build"
1239 echo "system is unfortunately not clever enough to deal with this. Please"
1240 echo "run the script from a different path, rename the path or fix the build"
1241 echo "system!"
1242 exit 6
1245 if [ -z "$rootdir" ]; then
1246 ##################################################################
1247 # Figure out where the source code root is!
1249 rootdir=`dirname $0`/../
1251 #####################################################################
1252 # Convert the possibly relative directory name to an absolute version
1254 now=`pwd`
1255 cd $rootdir
1256 rootdir=`pwd`
1258 # cd back to the build dir
1259 cd $now
1262 apps="apps"
1263 appsdir='$(ROOTDIR)/apps'
1264 toolsdir='$(ROOTDIR)/tools'
1267 ##################################################################
1268 # Figure out target platform
1271 if [ "$ARG_TARGET" ]; then
1272 buildfor=$ARG_TARGET
1273 else
1274 echo "Enter target platform:"
1275 cat <<EOF
1276 ==Archos== ==iriver== ==Apple iPod==
1277 0) Player/Studio 10) H120/H140 20) Color/Photo
1278 1) Recorder 11) H320/H340 21) Nano 1G
1279 2) FM Recorder 12) iHP-100/110/115 22) Video
1280 3) Recorder v2 13) iFP-790 23) 3G
1281 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1282 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1283 6) AV300 26) Mini 2G
1284 ==Toshiba== 27) 1G, 2G
1285 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1286 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1287 31) M5/M5L
1288 32) 7 ==Olympus= ==SanDisk==
1289 33) D2 70) M:Robe 500 50) Sansa e200
1290 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1291 52) Sansa c200
1292 ==Creative== ==Philips== 53) Sansa m200
1293 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1294 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1295 92) Zen Vision HDD1830 56) Sansa e200v2
1296 102) GoGear HDD6330 57) Sansa m200v4
1297 ==Onda== 58) Sansa Fuze
1298 120) VX747 ==Meizu== 59) Sansa c200v2
1299 121) VX767 110) M6SL 60) Sansa Clipv2
1300 122) VX747+ 111) M6SP 61) Sansa View
1301 123) VX777 112) M3 62) Sansa Clip+
1302 63) Sansa Fuze v2
1303 ==Samsung== ==Tatung== 64) Sansa Fuze+
1304 140) YH-820 150) Elio TPJ-1022 65) Sansa Clip Zip
1305 141) YH-920 66) Sansa Connect
1306 142) YH-925 ==Packard Bell==
1307 143) YP-S3 160) Vibe 500 ==Logik==
1308 80) DAX 1GB MP3/DAB
1309 ==Application== ==MPIO==
1310 200) SDL 170) HD200 ==Lyre project==
1311 201) Android 171) HD300 130) Lyre proto 1
1312 202) Nokia N8xx 131) Mini2440
1313 203) Nokia N900 ==ROCKCHIP== ==HiFiMAN==
1314 204) Pandora 180) rk27xx generic 190) HM-60x
1315 205) Samsung YP-R0 191) HM-801
1319 buildfor=`input`;
1322 # Set of tools built for all target platforms:
1323 toolset="rdf2binary convbdf codepages"
1325 # Toolsets for some target families:
1326 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1327 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1328 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1329 ipodbitmaptools="$toolset scramble bmp2rb"
1330 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1331 tccbitmaptools="$toolset scramble bmp2rb"
1332 # generic is used by IFP, Meizu and Onda
1333 genericbitmaptools="$toolset bmp2rb"
1334 # scramble is used by all other targets
1335 scramblebitmaptools="$genericbitmaptools scramble"
1338 # ---- For each target ----
1340 # *Variables*
1341 # target_id: a unique number identifying this target, IS NOT the menu number.
1342 # Just use the currently highest number+1 when you add a new
1343 # target.
1344 # modelname: short model name used all over to identify this target
1345 # memory: number of megabytes of RAM this target has. If the amount can
1346 # be selected by the size prompt, let memory be unset here
1347 # target: -Ddefine passed to the build commands to make the correct
1348 # config-*.h file get included etc
1349 # tool: the tool that takes a plain binary and converts that into a
1350 # working "firmware" file for your target
1351 # output: the final output file name
1352 # boottool: the tool that takes a plain binary and generates a bootloader
1353 # file for your target (or blank to use $tool)
1354 # bootoutput:the final output file name for the bootloader (or blank to use
1355 # $output)
1356 # appextra: passed to the APPEXTRA variable in the Makefiles.
1357 # TODO: add proper explanation
1358 # archosrom: used only for Archos targets that build a special flashable .ucl
1359 # image.
1360 # flash: name of output for flashing, for targets where there's a special
1361 # file output for this.
1362 # plugins: set to 'yes' to build the plugins. Early development builds can
1363 # set this to no in the early stages to have an easier life for a
1364 # while
1365 # swcodec: set 'yes' on swcodec targets
1366 # toolset: lists what particular tools in the tools/ directory that this
1367 # target needs to have built prior to building Rockbox
1369 # *Functions*
1370 # *cc: sets up gcc and compiler options for your target builds. Note
1371 # that if you select a simulator build, the compiler selection is
1372 # overridden later in the script.
1374 case $buildfor in
1376 0|archosplayer)
1377 target_id=1
1378 modelname="archosplayer"
1379 target="ARCHOS_PLAYER"
1380 shcc
1381 tool="$rootdir/tools/scramble"
1382 output="archos.mod"
1383 appextra="player:gui"
1384 archosrom="$pwd/rombox.ucl"
1385 flash="$pwd/rockbox.ucl"
1386 plugins="yes"
1387 swcodec=""
1389 # toolset is the tools within the tools directory that we build for
1390 # this particular target.
1391 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1393 # Note: the convbdf is present in the toolset just because: 1) the
1394 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1395 # build the player simulator
1397 t_cpu="sh"
1398 t_manufacturer="archos"
1399 t_model="player"
1402 1|archosrecorder)
1403 target_id=2
1404 modelname="archosrecorder"
1405 target="ARCHOS_RECORDER"
1406 shcc
1407 tool="$rootdir/tools/scramble"
1408 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1409 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1410 output="ajbrec.ajz"
1411 appextra="recorder:gui:radio"
1412 #archosrom="$pwd/rombox.ucl"
1413 flash="$pwd/rockbox.ucl"
1414 plugins="yes"
1415 swcodec=""
1416 # toolset is the tools within the tools directory that we build for
1417 # this particular target.
1418 toolset=$archosbitmaptools
1419 t_cpu="sh"
1420 t_manufacturer="archos"
1421 t_model="recorder"
1424 2|archosfmrecorder)
1425 target_id=3
1426 modelname="archosfmrecorder"
1427 target="ARCHOS_FMRECORDER"
1428 shcc
1429 tool="$rootdir/tools/scramble -fm"
1430 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1431 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1432 output="ajbrec.ajz"
1433 appextra="recorder:gui:radio"
1434 #archosrom="$pwd/rombox.ucl"
1435 flash="$pwd/rockbox.ucl"
1436 plugins="yes"
1437 swcodec=""
1438 # toolset is the tools within the tools directory that we build for
1439 # this particular target.
1440 toolset=$archosbitmaptools
1441 t_cpu="sh"
1442 t_manufacturer="archos"
1443 t_model="fm_v2"
1446 3|archosrecorderv2)
1447 target_id=4
1448 modelname="archosrecorderv2"
1449 target="ARCHOS_RECORDERV2"
1450 shcc
1451 tool="$rootdir/tools/scramble -v2"
1452 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1453 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1454 output="ajbrec.ajz"
1455 appextra="recorder:gui:radio"
1456 #archosrom="$pwd/rombox.ucl"
1457 flash="$pwd/rockbox.ucl"
1458 plugins="yes"
1459 swcodec=""
1460 # toolset is the tools within the tools directory that we build for
1461 # this particular target.
1462 toolset=$archosbitmaptools
1463 t_cpu="sh"
1464 t_manufacturer="archos"
1465 t_model="fm_v2"
1468 4|archosondiosp)
1469 target_id=7
1470 modelname="archosondiosp"
1471 target="ARCHOS_ONDIOSP"
1472 shcc
1473 tool="$rootdir/tools/scramble -osp"
1474 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1475 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1476 output="ajbrec.ajz"
1477 appextra="recorder:gui:radio"
1478 #archosrom="$pwd/rombox.ucl"
1479 flash="$pwd/rockbox.ucl"
1480 plugins="yes"
1481 swcodec=""
1482 # toolset is the tools within the tools directory that we build for
1483 # this particular target.
1484 toolset=$archosbitmaptools
1485 t_cpu="sh"
1486 t_manufacturer="archos"
1487 t_model="ondio"
1490 5|archosondiofm)
1491 target_id=8
1492 modelname="archosondiofm"
1493 target="ARCHOS_ONDIOFM"
1494 shcc
1495 tool="$rootdir/tools/scramble -ofm"
1496 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1497 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1498 output="ajbrec.ajz"
1499 appextra="recorder:gui:radio"
1500 #archosrom="$pwd/rombox.ucl"
1501 flash="$pwd/rockbox.ucl"
1502 plugins="yes"
1503 swcodec=""
1504 toolset=$archosbitmaptools
1505 t_cpu="sh"
1506 t_manufacturer="archos"
1507 t_model="ondio"
1510 6|archosav300)
1511 target_id=38
1512 modelname="archosav300"
1513 target="ARCHOS_AV300"
1514 memory=16 # always
1515 arm7tdmicc
1516 tool="$rootdir/tools/scramble -mm=C"
1517 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1518 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1519 output="cjbm.ajz"
1520 appextra="recorder:gui:radio"
1521 plugins="yes"
1522 swcodec=""
1523 # toolset is the tools within the tools directory that we build for
1524 # this particular target.
1525 toolset="$toolset scramble descramble bmp2rb"
1526 # architecture, manufacturer and model for the target-tree build
1527 t_cpu="arm"
1528 t_manufacturer="archos"
1529 t_model="av300"
1532 10|iriverh120)
1533 target_id=9
1534 modelname="iriverh120"
1535 target="IRIVER_H120"
1536 memory=32 # always
1537 coldfirecc
1538 tool="$rootdir/tools/scramble -add=h120"
1539 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1540 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1541 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1542 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1543 output="rockbox.iriver"
1544 bootoutput="bootloader.iriver"
1545 appextra="recorder:gui:radio"
1546 flash="$pwd/rombox.iriver"
1547 plugins="yes"
1548 swcodec="yes"
1549 # toolset is the tools within the tools directory that we build for
1550 # this particular target.
1551 toolset=$iriverbitmaptools
1552 t_cpu="coldfire"
1553 t_manufacturer="iriver"
1554 t_model="h100"
1557 11|iriverh300)
1558 target_id=10
1559 modelname="iriverh300"
1560 target="IRIVER_H300"
1561 memory=32 # always
1562 coldfirecc
1563 tool="$rootdir/tools/scramble -add=h300"
1564 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1565 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1566 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1567 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1568 output="rockbox.iriver"
1569 appextra="recorder:gui:radio"
1570 plugins="yes"
1571 swcodec="yes"
1572 # toolset is the tools within the tools directory that we build for
1573 # this particular target.
1574 toolset=$iriverbitmaptools
1575 t_cpu="coldfire"
1576 t_manufacturer="iriver"
1577 t_model="h300"
1580 12|iriverh100)
1581 target_id=11
1582 modelname="iriverh100"
1583 target="IRIVER_H100"
1584 memory=16 # always
1585 coldfirecc
1586 tool="$rootdir/tools/scramble -add=h100"
1587 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1588 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1589 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1590 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1591 output="rockbox.iriver"
1592 bootoutput="bootloader.iriver"
1593 appextra="recorder:gui:radio"
1594 flash="$pwd/rombox.iriver"
1595 plugins="yes"
1596 swcodec="yes"
1597 # toolset is the tools within the tools directory that we build for
1598 # this particular target.
1599 toolset=$iriverbitmaptools
1600 t_cpu="coldfire"
1601 t_manufacturer="iriver"
1602 t_model="h100"
1605 13|iriverifp7xx)
1606 target_id=19
1607 modelname="iriverifp7xx"
1608 target="IRIVER_IFP7XX"
1609 memory=1
1610 arm7tdmicc short
1611 tool="cp"
1612 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1613 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1614 output="rockbox.wma"
1615 appextra="recorder:gui:radio"
1616 plugins="yes"
1617 swcodec="yes"
1618 # toolset is the tools within the tools directory that we build for
1619 # this particular target.
1620 toolset=$genericbitmaptools
1621 t_cpu="arm"
1622 t_manufacturer="pnx0101"
1623 t_model="iriver-ifp7xx"
1626 14|iriverh10)
1627 target_id=22
1628 modelname="iriverh10"
1629 target="IRIVER_H10"
1630 memory=32 # always
1631 arm7tdmicc
1632 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1633 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1634 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1635 output="rockbox.mi4"
1636 appextra="recorder:gui:radio"
1637 plugins="yes"
1638 swcodec="yes"
1639 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1640 bootoutput="H10_20GC.mi4"
1641 # toolset is the tools within the tools directory that we build for
1642 # this particular target.
1643 toolset=$scramblebitmaptools
1644 # architecture, manufacturer and model for the target-tree build
1645 t_cpu="arm"
1646 t_soc="pp"
1647 t_manufacturer="iriver"
1648 t_model="h10"
1651 15|iriverh10_5gb)
1652 target_id=24
1653 modelname="iriverh10_5gb"
1654 target="IRIVER_H10_5GB"
1655 memory=32 # always
1656 arm7tdmicc
1657 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1658 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1659 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1660 output="rockbox.mi4"
1661 appextra="recorder:gui:radio"
1662 plugins="yes"
1663 swcodec="yes"
1664 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1665 bootoutput="H10.mi4"
1666 # toolset is the tools within the tools directory that we build for
1667 # this particular target.
1668 toolset=$scramblebitmaptools
1669 # architecture, manufacturer and model for the target-tree build
1670 t_cpu="arm"
1671 t_soc="pp"
1672 t_manufacturer="iriver"
1673 t_model="h10"
1676 20|ipodcolor)
1677 target_id=13
1678 modelname="ipodcolor"
1679 target="IPOD_COLOR"
1680 memory=32 # always
1681 arm7tdmicc
1682 tool="$rootdir/tools/scramble -add=ipco"
1683 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1684 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1685 output="rockbox.ipod"
1686 appextra="recorder:gui:radio"
1687 plugins="yes"
1688 swcodec="yes"
1689 bootoutput="bootloader-$modelname.ipod"
1690 # toolset is the tools within the tools directory that we build for
1691 # this particular target.
1692 toolset=$ipodbitmaptools
1693 # architecture, manufacturer and model for the target-tree build
1694 t_cpu="arm"
1695 t_soc="pp"
1696 t_manufacturer="ipod"
1697 t_model="color"
1700 21|ipodnano1g)
1701 target_id=14
1702 modelname="ipodnano1g"
1703 target="IPOD_NANO"
1704 memory=32 # always
1705 arm7tdmicc
1706 tool="$rootdir/tools/scramble -add=nano"
1707 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1708 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1709 output="rockbox.ipod"
1710 appextra="recorder:gui:radio"
1711 plugins="yes"
1712 swcodec="yes"
1713 bootoutput="bootloader-$modelname.ipod"
1714 # toolset is the tools within the tools directory that we build for
1715 # this particular target.
1716 toolset=$ipodbitmaptools
1717 # architecture, manufacturer and model for the target-tree build
1718 t_cpu="arm"
1719 t_soc="pp"
1720 t_manufacturer="ipod"
1721 t_model="nano"
1724 22|ipodvideo)
1725 target_id=15
1726 modelname="ipodvideo"
1727 target="IPOD_VIDEO"
1728 memory=64 # always. This is reduced at runtime if needed
1729 arm7tdmicc
1730 tool="$rootdir/tools/scramble -add=ipvd"
1731 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1732 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1733 output="rockbox.ipod"
1734 appextra="recorder:gui:radio"
1735 plugins="yes"
1736 swcodec="yes"
1737 bootoutput="bootloader-$modelname.ipod"
1738 # toolset is the tools within the tools directory that we build for
1739 # this particular target.
1740 toolset=$ipodbitmaptools
1741 # architecture, manufacturer and model for the target-tree build
1742 t_cpu="arm"
1743 t_soc="pp"
1744 t_manufacturer="ipod"
1745 t_model="video"
1748 23|ipod3g)
1749 target_id=16
1750 modelname="ipod3g"
1751 target="IPOD_3G"
1752 memory=32 # always
1753 arm7tdmicc
1754 tool="$rootdir/tools/scramble -add=ip3g"
1755 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1756 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1757 output="rockbox.ipod"
1758 appextra="recorder:gui:radio"
1759 plugins="yes"
1760 swcodec="yes"
1761 bootoutput="bootloader-$modelname.ipod"
1762 # toolset is the tools within the tools directory that we build for
1763 # this particular target.
1764 toolset=$ipodbitmaptools
1765 # architecture, manufacturer and model for the target-tree build
1766 t_cpu="arm"
1767 t_soc="pp"
1768 t_manufacturer="ipod"
1769 t_model="3g"
1772 24|ipod4g)
1773 target_id=17
1774 modelname="ipod4g"
1775 target="IPOD_4G"
1776 memory=32 # always
1777 arm7tdmicc
1778 tool="$rootdir/tools/scramble -add=ip4g"
1779 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1780 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1781 output="rockbox.ipod"
1782 appextra="recorder:gui:radio"
1783 plugins="yes"
1784 swcodec="yes"
1785 bootoutput="bootloader-$modelname.ipod"
1786 # toolset is the tools within the tools directory that we build for
1787 # this particular target.
1788 toolset=$ipodbitmaptools
1789 # architecture, manufacturer and model for the target-tree build
1790 t_cpu="arm"
1791 t_soc="pp"
1792 t_manufacturer="ipod"
1793 t_model="4g"
1796 25|ipodmini1g)
1797 target_id=18
1798 modelname="ipodmini1g"
1799 target="IPOD_MINI"
1800 memory=32 # always
1801 arm7tdmicc
1802 tool="$rootdir/tools/scramble -add=mini"
1803 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1804 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1805 output="rockbox.ipod"
1806 appextra="recorder:gui:radio"
1807 plugins="yes"
1808 swcodec="yes"
1809 bootoutput="bootloader-$modelname.ipod"
1810 # toolset is the tools within the tools directory that we build for
1811 # this particular target.
1812 toolset=$ipodbitmaptools
1813 # architecture, manufacturer and model for the target-tree build
1814 t_cpu="arm"
1815 t_soc="pp"
1816 t_manufacturer="ipod"
1817 t_model="mini"
1820 26|ipodmini2g)
1821 target_id=21
1822 modelname="ipodmini2g"
1823 target="IPOD_MINI2G"
1824 memory=32 # always
1825 arm7tdmicc
1826 tool="$rootdir/tools/scramble -add=mn2g"
1827 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1828 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1829 output="rockbox.ipod"
1830 appextra="recorder:gui:radio"
1831 plugins="yes"
1832 swcodec="yes"
1833 bootoutput="bootloader-$modelname.ipod"
1834 # toolset is the tools within the tools directory that we build for
1835 # this particular target.
1836 toolset=$ipodbitmaptools
1837 # architecture, manufacturer and model for the target-tree build
1838 t_cpu="arm"
1839 t_soc="pp"
1840 t_manufacturer="ipod"
1841 t_model="mini2g"
1844 27|ipod1g2g)
1845 target_id=29
1846 modelname="ipod1g2g"
1847 target="IPOD_1G2G"
1848 memory=32 # always
1849 arm7tdmicc
1850 tool="$rootdir/tools/scramble -add=1g2g"
1851 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1852 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1853 output="rockbox.ipod"
1854 appextra="recorder:gui:radio"
1855 plugins="yes"
1856 swcodec="yes"
1857 bootoutput="bootloader-$modelname.ipod"
1858 # toolset is the tools within the tools directory that we build for
1859 # this particular target.
1860 toolset=$ipodbitmaptools
1861 # architecture, manufacturer and model for the target-tree build
1862 t_cpu="arm"
1863 t_soc="pp"
1864 t_manufacturer="ipod"
1865 t_model="1g2g"
1868 28|ipodnano2g)
1869 target_id=62
1870 modelname="ipodnano2g"
1871 target="IPOD_NANO2G"
1872 memory=32 # always
1873 arm940tcc
1874 tool="$rootdir/tools/scramble -add=nn2g"
1875 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1876 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1877 output="rockbox.ipod"
1878 appextra="recorder:gui:radio"
1879 plugins="yes"
1880 swcodec="yes"
1881 bootoutput="bootloader-$modelname.ipod"
1882 # toolset is the tools within the tools directory that we build for
1883 # this particular target.
1884 toolset=$ipodbitmaptools
1885 # architecture, manufacturer and model for the target-tree build
1886 t_cpu="arm"
1887 t_manufacturer="s5l8700"
1888 t_model="ipodnano2g"
1891 29|ipod6g)
1892 target_id=71
1893 modelname="ipod6g"
1894 target="IPOD_6G"
1895 memory=64 # always
1896 arm926ejscc
1897 tool="$rootdir/tools/scramble -add=ip6g"
1898 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1899 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1900 output="rockbox.ipod"
1901 appextra="recorder:gui:radio"
1902 plugins="yes"
1903 swcodec="yes"
1904 bootoutput="bootloader-$modelname.ipod"
1905 # toolset is the tools within the tools directory that we build for
1906 # this particular target.
1907 toolset=$ipodbitmaptools
1908 # architecture, manufacturer and model for the target-tree build
1909 t_cpu="arm"
1910 t_manufacturer="s5l8702"
1911 t_model="ipod6g"
1914 30|iaudiox5)
1915 target_id=12
1916 modelname="iaudiox5"
1917 target="IAUDIO_X5"
1918 memory=16 # always
1919 coldfirecc
1920 tool="$rootdir/tools/scramble -add=iax5"
1921 boottool="$rootdir/tools/scramble -iaudiox5"
1922 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1923 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1924 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1925 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1926 output="rockbox.iaudio"
1927 bootoutput="x5_fw.bin"
1928 appextra="recorder:gui:radio"
1929 plugins="yes"
1930 swcodec="yes"
1931 # toolset is the tools within the tools directory that we build for
1932 # this particular target.
1933 toolset="$iaudiobitmaptools"
1934 # architecture, manufacturer and model for the target-tree build
1935 t_cpu="coldfire"
1936 t_manufacturer="iaudio"
1937 t_model="x5"
1940 31|iaudiom5)
1941 target_id=28
1942 modelname="iaudiom5"
1943 target="IAUDIO_M5"
1944 memory=16 # always
1945 coldfirecc
1946 tool="$rootdir/tools/scramble -add=iam5"
1947 boottool="$rootdir/tools/scramble -iaudiom5"
1948 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1949 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1950 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1951 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1952 output="rockbox.iaudio"
1953 bootoutput="m5_fw.bin"
1954 appextra="recorder:gui:radio"
1955 plugins="yes"
1956 swcodec="yes"
1957 # toolset is the tools within the tools directory that we build for
1958 # this particular target.
1959 toolset="$iaudiobitmaptools"
1960 # architecture, manufacturer and model for the target-tree build
1961 t_cpu="coldfire"
1962 t_manufacturer="iaudio"
1963 t_model="m5"
1966 32|iaudio7)
1967 target_id=32
1968 modelname="iaudio7"
1969 target="IAUDIO_7"
1970 memory=16 # always
1971 arm946cc
1972 tool="$rootdir/tools/scramble -add=i7"
1973 boottool="$rootdir/tools/scramble -tcc=crc"
1974 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1975 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1976 output="rockbox.iaudio"
1977 appextra="recorder:gui:radio"
1978 plugins="yes"
1979 swcodec="yes"
1980 bootoutput="I7_FW.BIN"
1981 # toolset is the tools within the tools directory that we build for
1982 # this particular target.
1983 toolset="$tccbitmaptools"
1984 # architecture, manufacturer and model for the target-tree build
1985 t_cpu="arm"
1986 t_manufacturer="tcc77x"
1987 t_model="iaudio7"
1990 33|cowond2)
1991 target_id=34
1992 modelname="cowond2"
1993 target="COWON_D2"
1994 memory=32
1995 arm926ejscc
1996 tool="$rootdir/tools/scramble -add=d2"
1997 boottool="cp "
1998 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1999 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2000 output="rockbox.d2"
2001 bootoutput="bootloader-cowond2.bin"
2002 appextra="recorder:gui:radio"
2003 plugins="yes"
2004 swcodec="yes"
2005 toolset="$tccbitmaptools"
2006 # architecture, manufacturer and model for the target-tree build
2007 t_cpu="arm"
2008 t_manufacturer="tcc780x"
2009 t_model="cowond2"
2012 34|iaudiom3)
2013 target_id=37
2014 modelname="iaudiom3"
2015 target="IAUDIO_M3"
2016 memory=16 # always
2017 coldfirecc
2018 tool="$rootdir/tools/scramble -add=iam3"
2019 boottool="$rootdir/tools/scramble -iaudiom3"
2020 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2021 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2022 output="rockbox.iaudio"
2023 bootoutput="cowon_m3.bin"
2024 appextra="recorder:gui:radio"
2025 plugins="yes"
2026 swcodec="yes"
2027 # toolset is the tools within the tools directory that we build for
2028 # this particular target.
2029 toolset="$iaudiobitmaptools"
2030 # architecture, manufacturer and model for the target-tree build
2031 t_cpu="coldfire"
2032 t_manufacturer="iaudio"
2033 t_model="m3"
2036 40|gigabeatfx)
2037 target_id=20
2038 modelname="gigabeatfx"
2039 target="GIGABEAT_F"
2040 memory=32 # always
2041 arm9tdmicc
2042 tool="$rootdir/tools/scramble -add=giga"
2043 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2044 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2045 output="rockbox.gigabeat"
2046 appextra="recorder:gui:radio"
2047 plugins="yes"
2048 swcodec="yes"
2049 toolset=$gigabeatbitmaptools
2050 boottool="$rootdir/tools/scramble -gigabeat"
2051 bootoutput="FWIMG01.DAT"
2052 # architecture, manufacturer and model for the target-tree build
2053 t_cpu="arm"
2054 t_manufacturer="s3c2440"
2055 t_model="gigabeat-fx"
2058 41|gigabeats)
2059 target_id=26
2060 modelname="gigabeats"
2061 target="GIGABEAT_S"
2062 memory=64
2063 arm1136jfscc
2064 tool="$rootdir/tools/scramble -add=gigs"
2065 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2066 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2067 output="rockbox.gigabeat"
2068 appextra="recorder:gui:radio"
2069 plugins="yes"
2070 swcodec="yes"
2071 toolset="$gigabeatbitmaptools"
2072 boottool="$rootdir/tools/scramble -gigabeats"
2073 bootoutput="nk.bin"
2074 # architecture, manufacturer and model for the target-tree build
2075 t_cpu="arm"
2076 t_manufacturer="imx31"
2077 t_model="gigabeat-s"
2080 70|mrobe500)
2081 target_id=36
2082 modelname="mrobe500"
2083 target="MROBE_500"
2084 memory=64 # always
2085 arm926ejscc
2086 tool="$rootdir/tools/scramble -add=m500"
2087 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2088 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
2089 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2090 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2091 output="rockbox.mrobe500"
2092 appextra="recorder:gui:radio"
2093 plugins="yes"
2094 swcodec="yes"
2095 toolset=$gigabeatbitmaptools
2096 boottool="cp "
2097 bootoutput="rockbox.mrboot"
2098 # architecture, manufacturer and model for the target-tree build
2099 t_cpu="arm"
2100 t_manufacturer="tms320dm320"
2101 t_model="mrobe-500"
2104 71|mrobe100)
2105 target_id=33
2106 modelname="mrobe100"
2107 target="MROBE_100"
2108 memory=32 # always
2109 arm7tdmicc
2110 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2111 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2112 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2113 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2114 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2115 output="rockbox.mi4"
2116 appextra="recorder:gui:radio"
2117 plugins="yes"
2118 swcodec="yes"
2119 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2120 bootoutput="pp5020.mi4"
2121 # toolset is the tools within the tools directory that we build for
2122 # this particular target.
2123 toolset=$scramblebitmaptools
2124 # architecture, manufacturer and model for the target-tree build
2125 t_cpu="arm"
2126 t_soc="pp"
2127 t_manufacturer="olympus"
2128 t_model="mrobe-100"
2131 80|logikdax)
2132 target_id=31
2133 modelname="logikdax"
2134 target="LOGIK_DAX"
2135 memory=2 # always
2136 arm946cc
2137 tool="$rootdir/tools/scramble -add=ldax"
2138 boottool="$rootdir/tools/scramble -tcc=crc"
2139 bootoutput="player.rom"
2140 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2141 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2142 output="rockbox.logik"
2143 appextra="recorder:gui:radio"
2144 plugins=""
2145 swcodec="yes"
2146 # toolset is the tools within the tools directory that we build for
2147 # this particular target.
2148 toolset=$tccbitmaptools
2149 # architecture, manufacturer and model for the target-tree build
2150 t_cpu="arm"
2151 t_manufacturer="tcc77x"
2152 t_model="logikdax"
2155 90|zenvisionm30gb)
2156 target_id=35
2157 modelname="zenvisionm30gb"
2158 target="CREATIVE_ZVM"
2159 memory=64
2160 arm926ejscc
2161 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2162 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2163 tool="$rootdir/tools/scramble -creative=zvm"
2164 USE_ELF="yes"
2165 output="rockbox.zvm"
2166 appextra="recorder:gui:radio"
2167 plugins="yes"
2168 swcodec="yes"
2169 toolset=$ipodbitmaptools
2170 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
2171 bootoutput="rockbox.zvmboot"
2172 # architecture, manufacturer and model for the target-tree build
2173 t_cpu="arm"
2174 t_manufacturer="tms320dm320"
2175 t_model="creative-zvm"
2178 91|zenvisionm60gb)
2179 target_id=40
2180 modelname="zenvisionm60gb"
2181 target="CREATIVE_ZVM60GB"
2182 memory=64
2183 arm926ejscc
2184 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2185 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2186 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2187 USE_ELF="yes"
2188 output="rockbox.zvm60"
2189 appextra="recorder:gui:radio"
2190 plugins="yes"
2191 swcodec="yes"
2192 toolset=$ipodbitmaptools
2193 boottool="$rootdir/tools/scramble -creative=zvm60"
2194 bootoutput="rockbox.zvm60boot"
2195 # architecture, manufacturer and model for the target-tree build
2196 t_cpu="arm"
2197 t_manufacturer="tms320dm320"
2198 t_model="creative-zvm"
2201 92|zenvision)
2202 target_id=39
2203 modelname="zenvision"
2204 target="CREATIVE_ZV"
2205 memory=64
2206 arm926ejscc
2207 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2208 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2209 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2210 USE_ELF="yes"
2211 output="rockbox.zv"
2212 appextra="recorder:gui:radio"
2213 plugins=""
2214 swcodec="yes"
2215 toolset=$ipodbitmaptools
2216 boottool="$rootdir/tools/scramble -creative=zenvision"
2217 bootoutput="rockbox.zvboot"
2218 # architecture, manufacturer and model for the target-tree build
2219 t_cpu="arm"
2220 t_manufacturer="tms320dm320"
2221 t_model="creative-zvm"
2224 50|sansae200)
2225 target_id=23
2226 modelname="sansae200"
2227 target="SANSA_E200"
2228 memory=32 # supposedly
2229 arm7tdmicc
2230 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2231 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2232 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2233 output="rockbox.mi4"
2234 appextra="recorder:gui:radio"
2235 plugins="yes"
2236 swcodec="yes"
2237 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2238 bootoutput="PP5022.mi4"
2239 # toolset is the tools within the tools directory that we build for
2240 # this particular target.
2241 toolset=$scramblebitmaptools
2242 # architecture, manufacturer and model for the target-tree build
2243 t_cpu="arm"
2244 t_soc="pp"
2245 t_manufacturer="sandisk"
2246 t_model="sansa-e200"
2249 51|sansae200r)
2250 # the e200R model is pretty much identical to the e200, it only has a
2251 # different option to the scramble tool when building a bootloader and
2252 # makes the bootloader output file name in all lower case.
2253 target_id=27
2254 modelname="sansae200r"
2255 target="SANSA_E200"
2256 memory=32 # supposedly
2257 arm7tdmicc
2258 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2259 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2260 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2261 output="rockbox.mi4"
2262 appextra="recorder:gui:radio"
2263 plugins="yes"
2264 swcodec="yes"
2265 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2266 bootoutput="pp5022.mi4"
2267 # toolset is the tools within the tools directory that we build for
2268 # this particular target.
2269 toolset=$scramblebitmaptools
2270 # architecture, manufacturer and model for the target-tree build
2271 t_cpu="arm"
2272 t_soc="pp"
2273 t_manufacturer="sandisk"
2274 t_model="sansa-e200"
2277 52|sansac200)
2278 target_id=30
2279 modelname="sansac200"
2280 target="SANSA_C200"
2281 memory=32 # supposedly
2282 arm7tdmicc
2283 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2284 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2285 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2286 output="rockbox.mi4"
2287 appextra="recorder:gui:radio"
2288 plugins="yes"
2289 swcodec="yes"
2290 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2291 bootoutput="firmware.mi4"
2292 # toolset is the tools within the tools directory that we build for
2293 # this particular target.
2294 toolset=$scramblebitmaptools
2295 # architecture, manufacturer and model for the target-tree build
2296 t_cpu="arm"
2297 t_soc="pp"
2298 t_manufacturer="sandisk"
2299 t_model="sansa-c200"
2302 53|sansam200)
2303 target_id=48
2304 modelname="sansam200"
2305 target="SANSA_M200"
2306 memory=1 # always
2307 arm946cc
2308 tool="$rootdir/tools/scramble -add=m200"
2309 boottool="$rootdir/tools/scramble -tcc=crc"
2310 bootoutput="player.rom"
2311 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2312 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2313 output="rockbox.m200"
2314 appextra="recorder:gui:radio"
2315 plugins=""
2316 swcodec="yes"
2317 # toolset is the tools within the tools directory that we build for
2318 # this particular target.
2319 toolset=$tccbitmaptools
2320 # architecture, manufacturer and model for the target-tree build
2321 t_cpu="arm"
2322 t_manufacturer="tcc77x"
2323 t_model="m200"
2326 54|sansac100)
2327 target_id=42
2328 modelname="sansac100"
2329 target="SANSA_C100"
2330 memory=2
2331 arm946cc
2332 tool="$rootdir/tools/scramble -add=c100"
2333 boottool="$rootdir/tools/scramble -tcc=crc"
2334 bootoutput="player.rom"
2335 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2336 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2337 output="rockbox.c100"
2338 appextra="recorder:gui:radio"
2339 plugins=""
2340 swcodec="yes"
2341 # toolset is the tools within the tools directory that we build for
2342 # this particular target.
2343 toolset=$tccbitmaptools
2344 # architecture, manufacturer and model for the target-tree build
2345 t_cpu="arm"
2346 t_manufacturer="tcc77x"
2347 t_model="c100"
2350 55|sansaclip)
2351 target_id=50
2352 modelname="sansaclip"
2353 target="SANSA_CLIP"
2354 memory=2
2355 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2356 bmp2rb_native="$bmp2rb_mono"
2357 tool="$rootdir/tools/scramble -add=clip"
2358 output="rockbox.sansa"
2359 bootoutput="bootloader-clip.sansa"
2360 appextra="recorder:gui:radio"
2361 plugins="yes"
2362 swcodec="yes"
2363 toolset=$scramblebitmaptools
2364 t_cpu="arm"
2365 t_manufacturer="as3525"
2366 t_model="sansa-clip"
2367 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2368 arm9tdmicc
2369 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2373 56|sansae200v2)
2374 target_id=51
2375 modelname="sansae200v2"
2376 target="SANSA_E200V2"
2377 memory=8
2378 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2379 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2380 tool="$rootdir/tools/scramble -add=e2v2"
2381 output="rockbox.sansa"
2382 bootoutput="bootloader-e200v2.sansa"
2383 appextra="recorder:gui:radio"
2384 plugins="yes"
2385 swcodec="yes"
2386 toolset=$scramblebitmaptools
2387 t_cpu="arm"
2388 t_manufacturer="as3525"
2389 t_model="sansa-e200v2"
2390 arm9tdmicc
2394 57|sansam200v4)
2395 target_id=52
2396 modelname="sansam200v4"
2397 target="SANSA_M200V4"
2398 memory=2
2399 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2400 bmp2rb_native="$bmp2rb_mono"
2401 tool="$rootdir/tools/scramble -add=m2v4"
2402 output="rockbox.sansa"
2403 bootoutput="bootloader-m200v4.sansa"
2404 appextra="recorder:gui:radio"
2405 plugins="yes"
2406 swcodec="yes"
2407 toolset=$scramblebitmaptools
2408 t_cpu="arm"
2409 t_manufacturer="as3525"
2410 t_model="sansa-m200v4"
2411 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2412 arm9tdmicc
2413 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2417 58|sansafuze)
2418 target_id=53
2419 modelname="sansafuze"
2420 target="SANSA_FUZE"
2421 memory=8
2422 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2423 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2424 tool="$rootdir/tools/scramble -add=fuze"
2425 output="rockbox.sansa"
2426 bootoutput="bootloader-fuze.sansa"
2427 appextra="recorder:gui:radio"
2428 plugins="yes"
2429 swcodec="yes"
2430 toolset=$scramblebitmaptools
2431 t_cpu="arm"
2432 t_manufacturer="as3525"
2433 t_model="sansa-fuze"
2434 arm9tdmicc
2438 59|sansac200v2)
2439 target_id=55
2440 modelname="sansac200v2"
2441 target="SANSA_C200V2"
2442 memory=2 # as per OF diagnosis mode
2443 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2444 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2445 tool="$rootdir/tools/scramble -add=c2v2"
2446 output="rockbox.sansa"
2447 bootoutput="bootloader-c200v2.sansa"
2448 appextra="recorder:gui:radio"
2449 plugins="yes"
2450 swcodec="yes"
2451 # toolset is the tools within the tools directory that we build for
2452 # this particular target.
2453 toolset=$scramblebitmaptools
2454 # architecture, manufacturer and model for the target-tree build
2455 t_cpu="arm"
2456 t_manufacturer="as3525"
2457 t_model="sansa-c200v2"
2458 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2459 arm9tdmicc
2460 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2463 60|sansaclipv2)
2464 target_id=60
2465 modelname="sansaclipv2"
2466 target="SANSA_CLIPV2"
2467 memory=8
2468 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2469 bmp2rb_native="$bmp2rb_mono"
2470 tool="$rootdir/tools/scramble -add=clv2"
2471 output="rockbox.sansa"
2472 bootoutput="bootloader-clipv2.sansa"
2473 appextra="recorder:gui:radio"
2474 plugins="yes"
2475 swcodec="yes"
2476 toolset=$scramblebitmaptools
2477 t_cpu="arm"
2478 t_manufacturer="as3525"
2479 t_model="sansa-clipv2"
2480 arm926ejscc
2483 61|sansaview)
2484 echo "Sansa View is not yet supported!"
2485 exit 1
2486 target_id=63
2487 modelname="sansaview"
2488 target="SANSA_VIEW"
2489 memory=32
2490 arm1176jzscc
2491 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2492 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2493 output="rockbox.mi4"
2494 appextra="gui"
2495 plugins=""
2496 swcodec="yes"
2497 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2498 bootoutput="firmware.mi4"
2499 # toolset is the tools within the tools directory that we build for
2500 # this particular target.
2501 toolset=$scramblebitmaptools
2502 t_cpu="arm"
2503 t_soc="pp"
2504 t_manufacturer="sandisk"
2505 t_model="sansa-view"
2508 62|sansaclipplus)
2509 target_id=66
2510 modelname="sansaclipplus"
2511 target="SANSA_CLIPPLUS"
2512 memory=8
2513 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2514 bmp2rb_native="$bmp2rb_mono"
2515 tool="$rootdir/tools/scramble -add=cli+"
2516 output="rockbox.sansa"
2517 bootoutput="bootloader-clipplus.sansa"
2518 appextra="recorder:gui:radio"
2519 plugins="yes"
2520 swcodec="yes"
2521 toolset=$scramblebitmaptools
2522 t_cpu="arm"
2523 t_manufacturer="as3525"
2524 t_model="sansa-clipplus"
2525 arm926ejscc
2528 63|sansafuzev2)
2529 target_id=68
2530 modelname="sansafuzev2"
2531 target="SANSA_FUZEV2"
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=fuz2"
2536 output="rockbox.sansa"
2537 bootoutput="bootloader-fuzev2.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-fuzev2"
2545 arm926ejscc
2548 64|sansafuzeplus)
2549 target_id=80
2550 modelname="sansafuzeplus"
2551 target="SANSA_FUZEPLUS"
2552 memory=64
2553 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2554 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2555 tool="$rootdir/tools/scramble -add=fuz+"
2556 output="rockbox.sansa"
2557 bootoutput="bootloader-fuzeplus.sansa"
2558 appextra="gui:recorder:radio"
2559 plugins="yes"
2560 swcodec="yes"
2561 toolset=$scramblebitmaptools
2562 t_cpu="arm"
2563 t_manufacturer="imx233"
2564 t_model="sansa-fuzeplus"
2565 arm926ejscc
2568 65|sansaclipzip)
2569 target_id=68
2570 modelname="sansaclipzip"
2571 target="SANSA_CLIPZIP"
2572 memory=8 # not sure
2573 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2574 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2575 tool="$rootdir/tools/scramble -add=clzp"
2576 output="rockbox.sansa"
2577 bootoutput="bootloader-clipzip.sansa"
2578 appextra="recorder:gui:radio"
2579 plugins="yes"
2580 swcodec="yes"
2581 toolset=$scramblebitmaptools
2582 t_cpu="arm"
2583 t_manufacturer="as3525"
2584 t_model="sansa-clipzip"
2585 arm926ejscc
2588 66|sansaconnect)
2589 target_id=81
2590 modelname="sansaconnect"
2591 target="SANSA_CONNECT"
2592 memory=64
2593 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2594 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2595 tool="$rootdir/tools/scramble -add=conn"
2596 output="rockbox.sansa"
2597 bootoutput="bootloader-connect.sansa"
2598 appextra="recorder:gui"
2599 plugins="yes"
2600 swcodec="yes"
2601 toolset=$scramblebitmaptools
2602 t_cpu="arm"
2603 t_manufacturer="tms320dm320"
2604 t_model="sansa-connect"
2605 arm926ejscc
2608 150|tatungtpj1022)
2609 target_id=25
2610 modelname="tatungtpj1022"
2611 target="TATUNG_TPJ1022"
2612 memory=32 # always
2613 arm7tdmicc
2614 tool="$rootdir/tools/scramble -add tpj2"
2615 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2616 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2617 output="rockbox.elio"
2618 appextra="recorder:gui:radio"
2619 plugins="yes"
2620 swcodec="yes"
2621 boottool="$rootdir/tools/scramble -mi4v2"
2622 bootoutput="pp5020.mi4"
2623 # toolset is the tools within the tools directory that we build for
2624 # this particular target.
2625 toolset=$scramblebitmaptools
2626 # architecture, manufacturer and model for the target-tree build
2627 t_cpu="arm"
2628 t_soc="pp"
2629 t_manufacturer="tatung"
2630 t_model="tpj1022"
2633 100|gogearsa9200)
2634 target_id=41
2635 modelname="gogearsa9200"
2636 target="PHILIPS_SA9200"
2637 memory=32 # supposedly
2638 arm7tdmicc
2639 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2640 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2641 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2642 output="rockbox.mi4"
2643 appextra="recorder:gui:radio"
2644 plugins="yes"
2645 swcodec="yes"
2646 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2647 bootoutput="FWImage.ebn"
2648 # toolset is the tools within the tools directory that we build for
2649 # this particular target.
2650 toolset=$scramblebitmaptools
2651 # architecture, manufacturer and model for the target-tree build
2652 t_cpu="arm"
2653 t_soc="pp"
2654 t_manufacturer="philips"
2655 t_model="sa9200"
2658 101|gogearhdd1630)
2659 target_id=43
2660 modelname="gogearhdd1630"
2661 target="PHILIPS_HDD1630"
2662 memory=32 # supposedly
2663 arm7tdmicc
2664 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2665 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2666 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2667 output="rockbox.mi4"
2668 appextra="recorder:gui:radio"
2669 plugins="yes"
2670 swcodec="yes"
2671 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2672 bootoutput="FWImage.ebn"
2673 # toolset is the tools within the tools directory that we build for
2674 # this particular target.
2675 toolset=$scramblebitmaptools
2676 # architecture, manufacturer and model for the target-tree build
2677 t_cpu="arm"
2678 t_soc="pp"
2679 t_manufacturer="philips"
2680 t_model="hdd1630"
2683 102|gogearhdd6330)
2684 target_id=65
2685 modelname="gogearhdd6330"
2686 target="PHILIPS_HDD6330"
2687 memory=64 # always
2688 arm7tdmicc
2689 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2690 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2691 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2692 output="rockbox.mi4"
2693 appextra="recorder:gui:radio"
2694 plugins="yes"
2695 swcodec="yes"
2696 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2697 bootoutput="FWImage.ebn"
2698 # toolset is the tools within the tools directory that we build for
2699 # this particular target.
2700 toolset=$scramblebitmaptools
2701 # architecture, manufacturer and model for the target-tree build
2702 t_cpu="arm"
2703 t_soc="pp"
2704 t_manufacturer="philips"
2705 t_model="hdd6330"
2708 110|meizum6sl)
2709 target_id=49
2710 modelname="meizum6sl"
2711 target="MEIZU_M6SL"
2712 memory=16 # always
2713 arm940tbecc
2714 tool="cp"
2715 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2716 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2717 output="rockbox.meizu"
2718 appextra="recorder:gui:radio"
2719 plugins="no" #FIXME
2720 swcodec="yes"
2721 toolset=$genericbitmaptools
2722 boottool="cp"
2723 bootoutput="rockboot.ebn"
2724 # architecture, manufacturer and model for the target-tree build
2725 t_cpu="arm"
2726 t_manufacturer="s5l8700"
2727 t_model="meizu-m6sl"
2730 111|meizum6sp)
2731 target_id=46
2732 modelname="meizum6sp"
2733 target="MEIZU_M6SP"
2734 memory=16 # always
2735 arm940tbecc
2736 tool="cp"
2737 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2738 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2739 output="rockbox.meizu"
2740 appextra="recorder:gui:radio"
2741 plugins="no" #FIXME
2742 swcodec="yes"
2743 toolset=$genericbitmaptools
2744 boottool="cp"
2745 bootoutput="rockboot.ebn"
2746 # architecture, manufacturer and model for the target-tree build
2747 t_cpu="arm"
2748 t_manufacturer="s5l8700"
2749 t_model="meizu-m6sp"
2752 112|meizum3)
2753 target_id=47
2754 modelname="meizum3"
2755 target="MEIZU_M3"
2756 memory=16 # always
2757 arm940tbecc
2758 tool="cp"
2759 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2760 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2761 output="rockbox.meizu"
2762 appextra="recorder:gui:radio"
2763 plugins="no" #FIXME
2764 swcodec="yes"
2765 toolset=$genericbitmaptools
2766 boottool="cp"
2767 bootoutput="rockboot.ebn"
2768 # architecture, manufacturer and model for the target-tree build
2769 t_cpu="arm"
2770 t_manufacturer="s5l8700"
2771 t_model="meizu-m3"
2774 120|ondavx747)
2775 target_id=45
2776 modelname="ondavx747"
2777 target="ONDA_VX747"
2778 memory=16
2779 mipselcc
2780 tool="$rootdir/tools/scramble -add=x747"
2781 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2782 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2783 output="rockbox.vx747"
2784 appextra="recorder:gui:radio"
2785 plugins="yes"
2786 swcodec="yes"
2787 toolset=$genericbitmaptools
2788 boottool="$rootdir/tools/scramble -ccpmp"
2789 bootoutput="ccpmp.bin"
2790 # architecture, manufacturer and model for the target-tree build
2791 t_cpu="mips"
2792 t_manufacturer="ingenic_jz47xx"
2793 t_model="onda_vx747"
2796 121|ondavx767)
2797 target_id=64
2798 modelname="ondavx767"
2799 target="ONDA_VX767"
2800 memory=16 #FIXME
2801 mipselcc
2802 tool="cp"
2803 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2804 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2805 output="rockbox.vx767"
2806 appextra="recorder:gui:radio"
2807 plugins="" #FIXME
2808 swcodec="yes"
2809 toolset=$genericbitmaptools
2810 boottool="$rootdir/tools/scramble -ccpmp"
2811 bootoutput="ccpmp.bin"
2812 # architecture, manufacturer and model for the target-tree build
2813 t_cpu="mips"
2814 t_manufacturer="ingenic_jz47xx"
2815 t_model="onda_vx767"
2818 122|ondavx747p)
2819 target_id=54
2820 modelname="ondavx747p"
2821 target="ONDA_VX747P"
2822 memory=16
2823 mipselcc
2824 tool="$rootdir/tools/scramble -add=747p"
2825 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2826 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2827 output="rockbox.vx747p"
2828 appextra="recorder:gui:radio"
2829 plugins="yes"
2830 swcodec="yes"
2831 toolset=$genericbitmaptools
2832 boottool="$rootdir/tools/scramble -ccpmp"
2833 bootoutput="ccpmp.bin"
2834 # architecture, manufacturer and model for the target-tree build
2835 t_cpu="mips"
2836 t_manufacturer="ingenic_jz47xx"
2837 t_model="onda_vx747"
2840 123|ondavx777)
2841 target_id=61
2842 modelname="ondavx777"
2843 target="ONDA_VX777"
2844 memory=16
2845 mipselcc
2846 tool="$rootdir/tools/scramble -add=x777"
2847 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2848 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2849 output="rockbox.vx777"
2850 appextra="recorder:gui:radio"
2851 plugins="yes"
2852 swcodec="yes"
2853 toolset=$genericbitmaptools
2854 boottool="$rootdir/tools/scramble -ccpmp"
2855 bootoutput="ccpmp.bin"
2856 # architecture, manufacturer and model for the target-tree build
2857 t_cpu="mips"
2858 t_manufacturer="ingenic_jz47xx"
2859 t_model="onda_vx747"
2862 130|lyreproto1)
2863 target_id=56
2864 modelname="lyreproto1"
2865 target="LYRE_PROTO1"
2866 memory=64
2867 arm926ejscc
2868 tool="cp"
2869 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2870 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2871 output="rockbox.lyre"
2872 appextra="recorder:gui:radio"
2873 plugins=""
2874 swcodec="yes"
2875 toolset=$scramblebitmaptools
2876 boottool="cp"
2877 bootoutput="bootloader-proto1.lyre"
2878 # architecture, manufacturer and model for the target-tree build
2879 t_cpu="arm"
2880 t_manufacturer="at91sam"
2881 t_model="lyre_proto1"
2884 131|mini2440)
2885 target_id=99
2886 modelname="mini2440"
2887 target="MINI2440"
2888 memory=64
2889 arm9tdmicc
2890 tool="$rootdir/tools/scramble -add=m244"
2891 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2892 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2893 output="rockbox.mini2440"
2894 appextra="recorder:gui:radio"
2895 plugins=""
2896 swcodec="yes"
2897 toolset=$scramblebitmaptools
2898 boottool="cp"
2899 bootoutput="bootloader-mini2440.lyre"
2900 # architecture, manufacturer and model for the target-tree build
2901 t_cpu="arm"
2902 t_manufacturer="s3c2440"
2903 t_model="mini2440"
2906 140|samsungyh820)
2907 target_id=57
2908 modelname="samsungyh820"
2909 target="SAMSUNG_YH820"
2910 memory=32 # always
2911 arm7tdmicc
2912 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2913 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2914 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2915 output="rockbox.mi4"
2916 appextra="recorder:gui:radio"
2917 plugins="yes"
2918 swcodec="yes"
2919 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2920 bootoutput="FW_YH820.mi4"
2921 # toolset is the tools within the tools directory that we build for
2922 # this particular target.
2923 toolset=$scramblebitmaptools
2924 # architecture, manufacturer and model for the target-tree build
2925 t_cpu="arm"
2926 t_soc="pp"
2927 t_manufacturer="samsung"
2928 t_model="yh820"
2931 141|samsungyh920)
2932 target_id=58
2933 modelname="samsungyh920"
2934 target="SAMSUNG_YH920"
2935 memory=32 # always
2936 arm7tdmicc
2937 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2938 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2939 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2940 output="rockbox.mi4"
2941 appextra="recorder:gui:radio"
2942 plugins="yes"
2943 swcodec="yes"
2944 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2945 bootoutput="PP5020.mi4"
2946 # toolset is the tools within the tools directory that we build for
2947 # this particular target.
2948 toolset=$scramblebitmaptools
2949 # architecture, manufacturer and model for the target-tree build
2950 t_cpu="arm"
2951 t_soc="pp"
2952 t_manufacturer="samsung"
2953 t_model="yh920"
2956 142|samsungyh925)
2957 target_id=59
2958 modelname="samsungyh925"
2959 target="SAMSUNG_YH925"
2960 memory=32 # always
2961 arm7tdmicc
2962 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2963 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2964 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2965 output="rockbox.mi4"
2966 appextra="recorder:gui:radio"
2967 plugins="yes"
2968 swcodec="yes"
2969 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2970 bootoutput="FW_YH925.mi4"
2971 # toolset is the tools within the tools directory that we build for
2972 # this particular target.
2973 toolset=$scramblebitmaptools
2974 # architecture, manufacturer and model for the target-tree build
2975 t_cpu="arm"
2976 t_soc="pp"
2977 t_manufacturer="samsung"
2978 t_model="yh925"
2981 143|samsungyps3)
2982 target_id=72
2983 modelname="samsungyps3"
2984 target="SAMSUNG_YPS3"
2985 memory=16 # always
2986 arm940tbecc
2987 tool="cp"
2988 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2989 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2990 output="rockbox.yps3"
2991 appextra="recorder:gui:radio"
2992 plugins="no" #FIXME
2993 swcodec="yes"
2994 toolset=$genericbitmaptools
2995 boottool="cp"
2996 bootoutput="rockboot.ebn"
2997 # architecture, manufacturer and model for the target-tree build
2998 t_cpu="arm"
2999 t_manufacturer="s5l8700"
3000 t_model="yps3"
3003 160|vibe500)
3004 target_id=67
3005 modelname="vibe500"
3006 target="PBELL_VIBE500"
3007 memory=32 # always
3008 arm7tdmicc
3009 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
3010 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3011 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
3012 output="rockbox.mi4"
3013 appextra="recorder:gui:radio"
3014 plugins="yes"
3015 swcodec="yes"
3016 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
3017 bootoutput="jukebox.mi4"
3018 # toolset is the tools within the tools directory that we build for
3019 # this particular target.
3020 toolset=$scramblebitmaptools
3021 # architecture, manufacturer and model for the target-tree build
3022 t_cpu="arm"
3023 t_soc="pp"
3024 t_manufacturer="pbell"
3025 t_model="vibe500"
3028 170|mpiohd200)
3029 target_id=69
3030 modelname="mpiohd200"
3031 target="MPIO_HD200"
3032 memory=16 # always
3033 coldfirecc
3034 tool="$rootdir/tools/scramble -add=hd20"
3035 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3036 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
3037 output="rockbox.mpio"
3038 bootoutput="bootloader.mpio"
3039 appextra="recorder:gui:radio"
3040 plugins="yes"
3041 swcodec="yes"
3042 # toolset is the tools within the tools directory that we build for
3043 # this particular target.
3044 toolset="$genericbitmaptools"
3045 # architecture, manufacturer and model for the target-tree build
3046 t_cpu="coldfire"
3047 t_manufacturer="mpio"
3048 t_model="hd200"
3051 171|mpiohd300)
3052 target_id=70
3053 modelname="mpiohd300"
3054 target="MPIO_HD300"
3055 memory=16 # always
3056 coldfirecc
3057 tool="$rootdir/tools/scramble -add=hd30"
3058 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3059 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
3060 output="rockbox.mpio"
3061 bootoutput="bootloader.mpio"
3062 appextra="recorder:gui:radio"
3063 plugins="yes"
3064 swcodec="yes"
3065 # toolset is the tools within the tools directory that we build for
3066 # this particular target.
3067 toolset="$genericbitmaptools"
3068 # architecture, manufacturer and model for the target-tree build
3069 t_cpu="coldfire"
3070 t_manufacturer="mpio"
3071 t_model="hd300"
3074 180|rk27generic)
3075 target_id=78
3076 modelname="rk27generic"
3077 target="RK27_GENERIC"
3078 memory=16 # always
3079 arm7ejscc
3080 tool="$rootdir/tools/scramble -add=rk27"
3081 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3082 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3083 output="rockbox.rk27"
3084 bootoutput="bootloader.rk27"
3085 appextra="recorder:gui:radio"
3086 plugins="yes"
3087 swcodec="yes"
3088 # toolset is the tools within the tools directory that we build for
3089 # this particular target.
3090 toolset="$genericbitmaptools"
3091 # architecture, manufacturer and model for the target-tree build
3092 t_cpu="arm"
3093 t_manufacturer="rk27xx"
3094 t_model="rk27generic"
3097 190|hifimanhm60x)
3098 target_id=79
3099 modelname="hifimanhm60x"
3100 target="HM60X"
3101 memory=16
3102 arm7ejscc
3103 tool="$rootdir/tools/scramble -add=rk27"
3104 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3105 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3106 output="rockbox.rk27"
3107 bootoutput="bootloader.rk27"
3108 appextra="recorder:gui"
3109 plugins="yes"
3110 swcodec="yes"
3111 # toolset is the tools within the tools directory that we build for
3112 # this particular target.
3113 toolset="$genericbitmaptools"
3114 # architecture, manufacturer and model for the target-tree build
3115 t_cpu="arm"
3116 t_manufacturer="rk27xx"
3117 t_model="hm60x"
3120 191|hifimanhm801)
3121 target_id=82
3122 modelname="hifimanhm801"
3123 target="HM801"
3124 memory=16
3125 arm7ejscc
3126 tool="$rootdir/tools/scramble -add=rk27"
3127 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3128 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3129 output="rockbox.rk27"
3130 bootoutput="bootloader.rk27"
3131 appextra="recorder:gui"
3132 plugins="yes"
3133 swcodec="yes"
3134 # toolset is the tools within the tools directory that we build for
3135 # this particular target.
3136 toolset="$genericbitmaptools"
3137 # architecture, manufacturer and model for the target-tree build
3138 t_cpu="arm"
3139 t_manufacturer="rk27xx"
3140 t_model="hm801"
3143 200|sdlapp)
3144 application="yes"
3145 target_id=73
3146 modelname="sdlapp"
3147 target="SDLAPP"
3148 app_set_paths
3149 app_set_lcd_size
3150 memory=8
3151 uname=`uname`
3152 simcc "sdl-app"
3153 tool="cp "
3154 boottool="cp "
3155 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3156 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3157 output="rockbox"
3158 bootoutput="rockbox"
3159 appextra="recorder:gui:radio"
3160 plugins="yes"
3161 swcodec="yes"
3162 # architecture, manufacturer and model for the target-tree build
3163 t_cpu="hosted"
3164 t_manufacturer="sdl"
3165 t_model="app"
3168 201|android)
3169 application="yes"
3170 target_id=74
3171 modelname="android"
3172 target="ANDROID"
3173 app_type="android"
3174 app_set_lcd_size
3175 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
3176 bindir="/data/data/org.rockbox/lib"
3177 libdir="/data/data/org.rockbox/app_rockbox"
3178 memory=8
3179 uname=`uname`
3180 androidcc
3181 tool="cp "
3182 boottool="cp "
3183 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3184 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3185 output="librockbox.so"
3186 bootoutput="librockbox.so"
3187 appextra="recorder:gui:radio:hosted/android"
3188 plugins="yes"
3189 swcodec="yes"
3190 # architecture, manufacturer and model for the target-tree build
3191 t_cpu="hosted"
3192 t_manufacturer="android"
3193 t_model="app"
3196 202|nokian8xx)
3197 application="yes"
3198 target_id=75
3199 modelname="nokian8xx"
3200 app_type="sdl-app"
3201 target="NOKIAN8XX"
3202 sharedir="/opt/rockbox/share/rockbox"
3203 bindir="/opt/rockbox/bin"
3204 libdir="/opt/rockbox/lib"
3205 memory=8
3206 uname=`uname`
3207 maemocc 4
3208 tool="cp "
3209 boottool="cp "
3210 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3211 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3212 output="rockbox"
3213 bootoutput="rockbox"
3214 appextra="recorder:gui:radio"
3215 plugins="yes"
3216 swcodec="yes"
3217 # architecture, manufacturer and model for the target-tree build
3218 t_cpu="hosted"
3219 t_manufacturer="maemo"
3220 t_model="app"
3223 203|nokian900)
3224 application="yes"
3225 target_id=76
3226 modelname="nokian900"
3227 app_type="sdl-app"
3228 target="NOKIAN900"
3229 sharedir="/opt/rockbox/share/rockbox"
3230 bindir="/opt/rockbox/bin"
3231 libdir="/opt/rockbox/lib"
3232 memory=8
3233 uname=`uname`
3234 maemocc 5
3235 tool="cp "
3236 boottool="cp "
3237 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3238 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3239 output="rockbox"
3240 bootoutput="rockbox"
3241 appextra="recorder:gui:radio"
3242 plugins="yes"
3243 swcodec="yes"
3244 # architecture, manufacturer and model for the target-tree build
3245 t_cpu="hosted"
3246 t_manufacturer="maemo"
3247 t_model="app"
3250 204|pandora)
3251 application="yes"
3252 target_id=77
3253 modelname="pandora"
3254 app_type="sdl-app"
3255 target="PANDORA"
3256 sharedir="rockbox/share/rockbox"
3257 bindir="rockbox/bin"
3258 libdir="rockbox/lib"
3259 memory=8
3260 uname=`uname`
3261 pandoracc
3262 tool="cp "
3263 boottool="cp "
3264 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3265 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3266 output="rockbox"
3267 bootoutput="rockbox"
3268 appextra="recorder:gui:radio"
3269 plugins="yes"
3270 swcodec="yes"
3271 # architecture, manufacturer and model for the target-tree build
3272 t_cpu="hosted"
3273 t_manufacturer="pandora"
3274 t_model="app"
3277 205|samsungypr0)
3278 application="yes"
3279 target_id=78
3280 modelname="samsungypr0"
3281 target="SAMSUNG_YPR0"
3282 app_set_lcd_size 240 320
3283 memory=32
3284 uname=`uname`
3285 ypr0cc
3286 tool="cp "
3287 boottool="cp "
3288 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3289 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3290 output="rockbox"
3291 bootoutput="rockbox"
3292 appextra="recorder:gui:radio"
3293 plugins="yes"
3294 swcodec="yes"
3295 # architecture, manufacturer and model for the target-tree build
3296 t_cpu="hosted"
3297 t_manufacturer="ypr0"
3298 t_model="app"
3302 echo "Please select a supported target platform!"
3303 exit 7
3306 esac
3308 echo "Platform set to $modelname"
3311 #remove start
3312 ############################################################################
3313 # Amount of memory, for those that can differ. They have $memory unset at
3314 # this point.
3317 if [ -z "$memory" ]; then
3318 case $target_id in
3320 if [ "$ARG_RAM" ]; then
3321 size=$ARG_RAM
3322 else
3323 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3324 size=`input`;
3326 case $size in
3327 60|64)
3328 memory="64"
3331 memory="32"
3333 esac
3336 if [ "$ARG_RAM" ]; then
3337 size=$ARG_RAM
3338 else
3339 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3340 size=`input`;
3342 case $size in
3344 memory="8"
3347 memory="2"
3349 esac
3351 esac
3352 echo "Memory size selected: $memory MB"
3353 [ "$ARG_TYPE" ] || echo ""
3355 #remove end
3357 ##################################################################
3358 # Figure out build "type"
3361 # the ifp7x0 is the only platform that supports building a gdb stub like
3362 # this
3363 case $modelname in
3364 iriverifp7xx)
3365 gdbstub=", (G)DB stub"
3367 sansae200r|sansae200)
3368 gdbstub=", (I)nstaller"
3370 sansac200)
3371 gdbstub=", (E)raser"
3373 sansae200)
3374 gdbstub=", (E)raser"
3378 esac
3379 if [ "$ARG_TYPE" ]; then
3380 btype=$ARG_TYPE
3381 else
3382 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool$gdbstub: (Defaults to N)"
3383 btype=`input`;
3386 case $btype in
3387 [Ii])
3388 appsdir='$(ROOTDIR)/bootloader'
3389 apps="bootloader"
3390 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3391 bootloader="1"
3392 echo "e200R-installer build selected"
3394 [Ee])
3395 appsdir='$(ROOTDIR)/bootloader'
3396 apps="bootloader"
3397 extradefines="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3398 bootloader="1"
3399 echo "sansa eraser build selected"
3401 [Bb])
3402 if test $t_manufacturer = "archos"; then
3403 # Archos SH-based players do this somewhat differently for
3404 # some reason
3405 appsdir='$(ROOTDIR)/flash/bootbox'
3406 apps="bootbox"
3407 else
3408 appsdir='$(ROOTDIR)/bootloader'
3409 apps="bootloader"
3410 flash=""
3411 if test -n "$boottool"; then
3412 tool="$boottool"
3414 if test -n "$bootoutput"; then
3415 output=$bootoutput
3418 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3419 bootloader="1"
3420 echo "Bootloader build selected"
3422 [Ss])
3423 if [ "$modelname" = "sansae200r" ]; then
3424 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3425 exit 8
3427 debug="-DDEBUG"
3428 simulator="yes"
3429 extradefines="$extradefines -DSIMULATOR"
3430 archosrom=""
3431 flash=""
3432 echo "Simulator build selected"
3434 [Aa]*)
3435 echo "Advanced build selected"
3436 whichadvanced $btype
3438 [Gg])
3439 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3440 appsdir='$(ROOTDIR)/gdb'
3441 apps="stub"
3442 case $modelname in
3443 iriverifp7xx)
3444 output="stub.wma"
3448 esac
3449 echo "GDB stub build selected"
3451 [Cc])
3452 uname=`uname`
3453 simcc "checkwps"
3454 toolset='';
3455 t_cpu='';
3456 GCCOPTS='';
3457 extradefines="$extradefines -DDEBUG"
3458 appsdir='$(ROOTDIR)/tools/checkwps';
3459 output='checkwps.'${modelname};
3460 archosrom='';
3461 echo "CheckWPS build selected"
3463 [Dd])
3464 uname=`uname`
3465 simcc "database"
3466 toolset='';
3467 t_cpu='';
3468 GCCOPTS='';
3469 appsdir='$(ROOTDIR)/tools/database';
3470 archosrom='';
3472 case $uname in
3473 CYGWIN*|MINGW*)
3474 output="database_${modelname}.exe"
3477 output='database.'${modelname};
3479 esac
3481 echo "Database tool build selected"
3484 if [ "$modelname" = "sansae200r" ]; then
3485 echo "Do not use the e200R target for regular builds. Use e200 instead."
3486 exit 8
3488 debug=""
3489 btype="N" # set it explicitly since RET only gets here as well
3490 echo "Normal build selected"
3493 esac
3494 # to be able running "make manual" from non-manual configuration
3495 case $modelname in
3496 archosrecorderv2)
3497 manualdev="archosfmrecorder"
3499 iriverh1??)
3500 manualdev="iriverh100"
3502 ipodmini2g)
3503 manualdev="ipodmini1g"
3506 manualdev=$modelname
3508 esac
3510 if [ -z "$debug" ]; then
3511 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3514 if [ "yes" = "$application" ]; then
3515 echo Building Rockbox as an Application
3516 extradefines="$extradefines -DAPPLICATION"
3519 echo "Using source code root directory: $rootdir"
3521 # this was once possible to change at build-time, but no more:
3522 language="english"
3524 uname=`uname`
3526 if [ "yes" = "$simulator" ]; then
3527 # setup compiler and things for simulator
3528 simcc "sdl-sim"
3530 if [ -d "simdisk" ]; then
3531 echo "Subdirectory 'simdisk' already present"
3532 else
3533 mkdir simdisk
3534 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3538 # Now, figure out version number of the (gcc) compiler we are about to use
3539 gccver=`$CC -dumpversion`;
3541 # figure out the binutil version too and display it, mostly for the build
3542 # system etc to be able to see it easier
3543 if [ $uname = "Darwin" ]; then
3544 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3545 else
3546 ldver=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
3549 if [ -z "$gccver" ]; then
3550 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3551 echo "[WARNING] this may cause your build to fail since we cannot do the"
3552 echo "[WARNING] checks we want now."
3553 else
3555 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3556 # DEPEND on it
3558 num1=`echo $gccver | cut -d . -f1`
3559 num2=`echo $gccver | cut -d . -f2`
3560 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3562 # This makes:
3563 # 3.3.X => 303
3564 # 3.4.X => 304
3565 # 2.95.3 => 295
3567 echo "Using $CC $gccver ($gccnum)"
3569 if test "$gccnum" -ge "400"; then
3570 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3571 # so we ignore that warnings for now
3572 # -Wno-pointer-sign
3573 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3576 if test "$gccnum" -ge "402"; then
3577 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3578 # and later would throw it for several valid cases
3579 GCCOPTS="$GCCOPTS -Wno-override-init"
3582 case $prefix in
3583 ""|"$CROSS_COMPILE")
3584 # simulator
3587 # Verify that the cross-compiler is of a recommended version!
3588 if test "$gccver" != "$gccchoice"; then
3589 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3590 echo "WARNING: version $gccchoice!"
3591 echo "WARNING: This may cause your build to fail since it may be a version"
3592 echo "WARNING: that isn't functional or known to not be the best choice."
3593 echo "WARNING: If you suffer from build problems, you know that this is"
3594 echo "WARNING: a likely source for them..."
3597 esac
3602 echo "Using $LD $ldver"
3604 # check the compiler for SH platforms
3605 if test "$CC" = "sh-elf-gcc"; then
3606 if test "$gccnum" -lt "400"; then
3607 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3608 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3609 else
3610 # figure out patch status
3611 gccpatch=`$CC --version`;
3613 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3614 echo "gcc $gccver is rockbox patched"
3615 # then convert -O to -Os to get smaller binaries!
3616 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3617 else
3618 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3619 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3624 if test "$CC" = "m68k-elf-gcc"; then
3625 # convert -O to -Os to get smaller binaries!
3626 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3629 if [ "$ARG_CCACHE" = "1" ]; then
3630 echo "Enable ccache for building"
3631 ccache="ccache"
3632 elif [ "$ARG_CCACHE" != "0" ]; then
3633 ccache=`findtool ccache`
3634 if test -n "$ccache"; then
3635 echo "Found and uses ccache ($ccache)"
3639 # figure out the full path to the various commands if possible
3640 HOSTCC=`findtool gcc --lit`
3641 HOSTAR=`findtool ar --lit`
3642 CC=`findtool ${CC} --lit`
3643 LD=`findtool ${AR} --lit`
3644 AR=`findtool ${AR} --lit`
3645 AS=`findtool ${AS} --lit`
3646 OC=`findtool ${OC} --lit`
3647 WINDRES=`findtool ${WINDRES} --lit`
3648 DLLTOOL=`findtool ${DLLTOOL} --lit`
3649 DLLWRAP=`findtool ${DLLWRAP} --lit`
3650 RANLIB=`findtool ${RANLIB} --lit`
3652 if test -n "$ccache"; then
3653 CC="$ccache $CC"
3656 if test "$ARG_ARM_THUMB" = "1"; then
3657 extradefines="$extradefines -DUSE_THUMB"
3658 CC="$toolsdir/thumb-cc.py $CC"
3661 if test "X$endian" = "Xbig"; then
3662 defendian="ROCKBOX_BIG_ENDIAN"
3663 else
3664 defendian="ROCKBOX_LITTLE_ENDIAN"
3667 if [ "$ARG_RBDIR" != "" ]; then
3668 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3669 rbdir="/"$ARG_RBDIR
3670 else
3671 rbdir=$ARG_RBDIR
3673 echo "Using alternate rockbox dir: ${rbdir}"
3676 cat > autoconf.h <<EOF
3677 /* This header was made by configure */
3678 #ifndef __BUILD_AUTOCONF_H
3679 #define __BUILD_AUTOCONF_H
3681 /* Define endianess for the target or simulator platform */
3682 #define ${defendian} 1
3684 /* Define this if you build rockbox to support the logf logging and display */
3685 ${use_logf}
3687 /* Define this to record a chart with timings for the stages of boot */
3688 ${use_bootchart}
3690 /* optional define for a backlight modded Ondio */
3691 ${have_backlight}
3693 /* optional define for FM radio mod for iAudio M5 */
3694 ${have_fmradio_in}
3696 /* optional define for ATA poweroff on Player */
3697 ${have_ata_poweroff}
3699 /* optional defines for RTC mod for h1x0 */
3700 ${config_rtc}
3701 ${have_rtc_alarm}
3703 /* the threading backend we use */
3704 #define ${thread_support}
3706 /* lcd dimensions for application builds from configure */
3707 ${app_lcd_width}
3708 ${app_lcd_height}
3710 /* root of Rockbox */
3711 #define ROCKBOX_DIR "${rbdir}"
3712 #define ROCKBOX_SHARE_PATH "${sharedir}"
3713 #define ROCKBOX_BINARY_PATH "${bindir}"
3714 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3716 #endif /* __BUILD_AUTOCONF_H */
3719 if test -n "$t_cpu"; then
3720 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3722 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3723 # Maemo needs the SDL port, too
3724 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3725 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3726 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3727 # Pandora needs the SDL port, too
3728 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3729 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3730 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3731 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3732 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3735 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3736 test -n "$t_soc" && TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3737 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3738 GCCOPTS="$GCCOPTS"
3741 if test "$swcodec" = "yes"; then
3742 voicetoolset="rbspeexenc voicefont wavtrim"
3743 else
3744 voicetoolset="voicefont wavtrim"
3747 if test "$apps" = "apps"; then
3748 # only when we build "real" apps we build the .lng files
3749 buildlangs="langs"
3752 #### Fix the cmdline ###
3753 if [ -n "$ARG_PREFIX" ]; then
3754 cmdline="$cmdline --prefix=\$(PREFIX)"
3756 if [ -n "$ARG_LCDWIDTH" ]; then
3757 cmdline="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3760 # remove parts from the cmdline we're going to set unconditionally
3761 cmdline=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3762 -e s,--ram=[0-9]\*,,g \
3763 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3764 -e s,--type=[a-zA-Z]\*,,g`
3765 cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3767 ### end of cmdline
3769 cat > Makefile <<EOF
3770 ## Automatically generated. http://www.rockbox.org/
3772 export ROOTDIR=${rootdir}
3773 export FIRMDIR=\$(ROOTDIR)/firmware
3774 export APPSDIR=${appsdir}
3775 export TOOLSDIR=${toolsdir}
3776 export DOCSDIR=${rootdir}/docs
3777 export MANUALDIR=${rootdir}/manual
3778 export DEBUG=${debug}
3779 export MODELNAME=${modelname}
3780 export ARCHOSROM=${archosrom}
3781 export FLASHFILE=${flash}
3782 export TARGET_ID=${target_id}
3783 export TARGET=-D${target}
3784 export CPU=${t_cpu}
3785 export MANUFACTURER=${t_manufacturer}
3786 export OBJDIR=${pwd}
3787 export BUILDDIR=${pwd}
3788 export LANGUAGE=${language}
3789 export VOICELANGUAGE=${voicelanguage}
3790 export MEMORYSIZE=${memory}
3791 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3792 export MKFIRMWARE=${tool}
3793 export BMP2RB_MONO=${bmp2rb_mono}
3794 export BMP2RB_NATIVE=${bmp2rb_native}
3795 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3796 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3797 export BINARY=${output}
3798 export APPEXTRA=${appextra}
3799 export ENABLEDPLUGINS=${plugins}
3800 export SOFTWARECODECS=${swcodec}
3801 export EXTRA_DEFINES=${extradefines}
3802 export HOSTCC=${HOSTCC}
3803 export HOSTAR=${HOSTAR}
3804 export CC=${CC}
3805 export LD=${LD}
3806 export AR=${AR}
3807 export AS=${AS}
3808 export OC=${OC}
3809 export WINDRES=${WINDRES}
3810 export DLLTOOL=${DLLTOOL}
3811 export DLLWRAP=${DLLWRAP}
3812 export RANLIB=${RANLIB}
3813 export PREFIX=${ARG_PREFIX}
3814 export PROFILE_OPTS=${PROFILE_OPTS}
3815 export APP_TYPE=${app_type}
3816 export APPLICATION=${application}
3817 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3818 export GCCOPTS=${GCCOPTS}
3819 export TARGET_INC=${TARGET_INC}
3820 export LOADADDRESS=${loadaddress}
3821 export SHARED_LDFLAG=${SHARED_LDFLAG}
3822 export SHARED_CFLAGS=${SHARED_CFLAGS}
3823 export LDOPTS=${LDOPTS}
3824 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3825 export GCCVER=${gccver}
3826 export GCCNUM=${gccnum}
3827 export UNAME=${uname}
3828 export MANUALDEV=${manualdev}
3829 export TTS_OPTS=${TTS_OPTS}
3830 export TTS_ENGINE=${TTS_ENGINE}
3831 export ENC_OPTS=${ENC_OPTS}
3832 export ENCODER=${ENCODER}
3833 export USE_ELF=${USE_ELF}
3834 export RBDIR=${rbdir}
3835 export ROCKBOX_SHARE_PATH=${sharedir}
3836 export ROCKBOX_BINARY_PATH=${bindir}
3837 export ROCKBOX_LIBRARY_PATH=${libdir}
3838 export SDLCONFIG=${sdl}
3839 export LCDORIENTATION=${lcd_orientation}
3841 CONFIGURE_OPTIONS=${cmdline}
3843 include \$(TOOLSDIR)/root.make
3846 echo "Created Makefile"