Add new tarball generation script.
[maemo-rb.git] / tools / configure
blobb682cbd223e240e0d61d73c0b5ea02ad97cad4d2
1 #!/bin/sh
2 # __________ __ ___.
3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 # \/ \/ \/ \/ \/
10 # global CC options for all platforms
11 CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
13 # LD options for the core
14 LDOPTS=""
15 # LD options for the core + plugins
16 GLOBAL_LDOPTS=""
18 extradefines=""
19 use_logf="#undef ROCKBOX_HAS_LOGF"
20 use_bootchart="#undef DO_BOOTCHART"
21 use_logf_serial="#undef LOGF_SERIAL"
23 scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
25 rbdir="/.rockbox"
26 bindir=
27 libdir=
28 sharedir=
30 thread_support="ASSEMBLER_THREADS"
31 app_lcd_width=
32 app_lcd_height=
33 app_lcd_orientation=
35 # Properly retain command line arguments containing spaces
36 cmdline=
37 for arg in "$@"; do
38 case "$arg" in
39 *\ *) cmdline="$cmdline \"$arg\"";;
40 *) cmdline="$cmdline $arg";;
41 esac
42 done
45 # Begin Function Definitions
47 input() {
48 read response
49 echo $response
52 prefixtools () {
53 prefix="$1"
54 CC=${prefix}gcc
55 CPP=${prefix}cpp
56 WINDRES=${prefix}windres
57 DLLTOOL=${prefix}dlltool
58 DLLWRAP=${prefix}dllwrap
59 RANLIB=${prefix}ranlib
60 LD=${prefix}ld
61 AR=${prefix}ar
62 AS=${prefix}as
63 OC=${prefix}objcopy
66 app_set_paths () {
67 # setup files and paths depending on the platform
68 if [ -z "$ARG_PREFIX" ]; then
69 sharedir="/usr/local/share/rockbox"
70 bindir="/usr/local/bin"
71 libdir="/usr/local/lib"
72 else
73 if [ -d "$ARG_PREFIX" ]; then
74 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
75 ARG_PREFIX=`realpath $ARG_PREFIX`
76 if [ "0" != "$?" ]; then
77 echo "ERROR: Could not get prefix path (is realpath installed?)."
78 exit
81 sharedir="$ARG_PREFIX/share/rockbox"
82 bindir="$ARG_PREFIX/bin"
83 libdir="$ARG_PREFIX/lib"
84 else
85 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
86 exit
91 # Set the application LCD size according to the following priorities:
92 # 1) If --lcdwidth and --lcdheight are set, use them
93 # 2) If a size is passed to the app_set_lcd_size() function, use that
94 # 3) Otherwise ask the user
95 app_set_lcd_size () {
96 if [ -z "$ARG_LCDWIDTH" ]; then
97 ARG_LCDWIDTH=$1
99 if [ -z "$ARG_LCDHEIGHT" ]; then
100 ARG_LCDHEIGHT=$2
103 echo "Enter the LCD width (default: 320)"
104 if [ -z "$ARG_LCDWIDTH" ]; then
105 app_lcd_width=`input`
106 else
107 app_lcd_width="$ARG_LCDWIDTH"
109 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
110 echo "Enter the LCD height (default: 480)"
111 if [ -z "$ARG_LCDHEIGHT" ]; then
112 app_lcd_height=`input`
113 else
114 app_lcd_height="$ARG_LCDHEIGHT"
116 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
117 if [ $app_lcd_width -gt $app_lcd_height ]; then
118 lcd_orientation="landscape"
119 else
120 lcd_orientation="portrait"
122 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
123 ARG_LCDWIDTH=$app_lcd_width
124 ARG_LCDHEIGHT=$app_lcd_height
126 app_lcd_width="#define LCD_WIDTH $app_lcd_width"
127 app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
130 findarmgcc() {
131 if [ "$ARG_ARM_EABI" != "0" ]; then
132 prefixtools arm-elf-eabi-
133 gccchoice="4.4.4"
134 else
135 prefixtools arm-elf-
136 gccchoice="4.0.3"
140 # scan the $PATH for the given command
141 findtool(){
142 file="$1"
144 IFS=":"
145 for path in $PATH
147 # echo "checks for $file in $path" >&2
148 if test -f "$path/$file"; then
149 echo "$path/$file"
150 return
152 done
153 # check whether caller wants literal return value if not found
154 if [ "$2" = "--lit" ]; then
155 echo "$file"
159 # scan the $PATH for sdl-config - check whether for a (cross-)win32
160 # sdl as requested
161 findsdl(){
162 # sdl-config might (not) be prefixed for cross compiles so try both.
163 files="${CROSS_COMPILE}sdl-config:sdl-config"
164 winbuild="$1"
166 IFS=":"
167 for file in $files
169 for path in $PATH
171 #echo "checks for $file in $path" >&2
172 if test -f "$path/$file"; then
173 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
174 if [ "yes" = "${winbuild}" ]; then
175 echo "$path/$file"
176 return
178 else
179 if [ "yes" != "${winbuild}" ]; then
180 echo "$path/$file"
181 return
185 done
186 done
189 # check for availability of sigaltstack to support our thread engine
190 check_sigaltstack() {
191 cat >$tmpdir/check_threads.c <<EOF
192 #include <signal.h>
193 int main(int argc, char **argv)
195 #ifndef NULL
196 #define NULL (void*)0
197 #endif
198 sigaltstack(NULL, NULL);
199 return 0;
202 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 1> /dev/null
203 result=$?
204 rm -rf $tmpdir/check_threads*
205 echo $result
208 # check for availability of Fiber on Win32 to support our thread engine
209 check_fiber() {
210 cat >$tmpdir/check_threads.c <<EOF
211 #include <windows.h>
212 int main(int argc, char **argv)
214 ConvertThreadToFiber(NULL);
215 return 0;
218 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 2>/dev/null
219 result=$?
220 rm -rf $tmpdir/check_threads*
221 echo $result
224 simcc () {
226 # default tool setup for native building
227 prefixtools "$CROSS_COMPILE"
228 ARG_ARM_THUMB=0 # can't use thumb in native builds
230 # unset arch if already set shcc() and friends
231 arch=
232 arch_version=
234 app_type=$1
235 winbuild=""
236 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
238 GCCOPTS="$GCCOPTS -fno-builtin -g"
239 GCCOPTIMIZE=''
240 LDOPTS="$LDOPTS -lm" # button-sdl.c uses sqrt()
241 sigaltstack=""
242 fibers=""
243 endian="" # endianess of the dap doesnt matter here
245 # default output binary name, don't override app_get_platform()
246 if [ "$app_type" != "sdl-app" ]; then
247 output="rockboxui"
250 # default share option, override below if needed
251 SHARED_LDFLAG="-shared"
252 SHARED_CFLAGS="-fPIC -fvisibility=hidden"
254 if [ "$win32crosscompile" = "yes" ]; then
255 # We are crosscompiling
256 # add cross-compiler option(s)
257 LDOPTS="$LDOPTS -mconsole"
258 output="$output.exe"
259 winbuild="yes"
260 CROSS_COMPILE=${CROSS_COMPILE:-"i586-mingw32msvc-"}
261 SHARED_CFLAGS=''
262 prefixtools "$CROSS_COMPILE"
263 fibers=`check_fiber`
264 endian="little" # windows is little endian
265 echo "Enabling MMX support"
266 GCCOPTS="$GCCOPTS -mmmx"
267 else
268 case $uname in
269 CYGWIN*)
270 echo "Cygwin host detected"
272 fibers=`check_fiber`
273 LDOPTS="$LDOPTS -mconsole"
274 output="$output.exe"
275 winbuild="yes"
276 SHARED_CFLAGS=''
279 MINGW*)
280 echo "MinGW host detected"
282 fibers=`check_fiber`
283 LDOPTS="$LDOPTS -mconsole"
284 output="$output.exe"
285 winbuild="yes"
288 Linux)
289 sigaltstack=`check_sigaltstack`
290 echo "Linux host detected"
291 LDOPTS="$LDOPTS -ldl"
294 FreeBSD)
295 sigaltstack=`check_sigaltstack`
296 echo "FreeBSD host detected"
297 LDOPTS="$LDOPTS -ldl"
300 Darwin)
301 sigaltstack=`check_sigaltstack`
302 echo "Darwin host detected"
303 LDOPTS="$LDOPTS -ldl"
304 SHARED_LDFLAG="-dynamiclib -Wl\,-single_module"
307 SunOS)
308 sigaltstack=`check_sigaltstack`
309 echo "*Solaris host detected"
311 GCCOPTS="$GCCOPTS -fPIC"
312 LDOPTS="$LDOPTS -ldl"
316 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
317 exit 1
319 esac
322 if [ "$winbuild" != "yes" ]; then
323 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
324 if [ "`uname -m`" = "i686" ]; then
325 echo "Enabling MMX support"
326 GCCOPTS="$GCCOPTS -mmmx"
330 sdl=`findsdl $winbuild`
332 if [ -n `echo $app_type | grep "sdl"` ]; then
333 if [ -z "$sdl" ]; then
334 echo "configure didn't find sdl-config, which indicates that you"
335 echo "don't have SDL (properly) installed. Please correct and"
336 echo "re-run configure!"
337 exit 2
338 else
339 # generic sdl-config checker
340 GCCOPTS="$GCCOPTS `$sdl --cflags`"
341 LDOPTS="$LDOPTS `$sdl --libs`"
346 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
347 # x86_64 supports MMX by default
349 if [ "$endian" = "" ]; then
350 id=$$
351 cat >$tmpdir/conftest-$id.c <<EOF
352 #include <stdio.h>
353 int main(int argc, char **argv)
355 int var=0;
356 char *varp = (char *)&var;
357 *varp=1;
359 printf("%d\n", var);
360 return 0;
363 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
364 # when cross compiling, the endianess cannot be detected because the above program doesn't run
365 # on the local machine. assume little endian but print a warning
366 endian=`$tmpdir/conftest-$id 2> /dev/null`
367 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
368 # big endian
369 endian="big"
370 else
371 # little endian
372 endian="little"
376 if [ "$CROSS_COMPILE" != "" ]; then
377 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
380 if [ "$app_type" = "sdl-sim" ]; then
381 echo "Simulator environment deemed $endian endian"
382 elif [ "$app_type" = "sdl-app" ]; then
383 echo "Application environment deemed $endian endian"
384 elif [ "$app_type" = "checkwps" ]; then
385 echo "CheckWPS environment deemed $endian endian"
388 # use wildcard here to make it work even if it was named *.exe like
389 # on cygwin
390 rm -f $tmpdir/conftest-$id*
392 thread_support=
393 if [ -z "$ARG_THREAD_SUPPORT" ] || [ "$ARG_THREAD_SUPPORT" = "0" ]; then
394 if [ "$sigaltstack" = "0" ]; then
395 thread_support="HAVE_SIGALTSTACK_THREADS"
396 LDOPTS="$LDOPTS -lpthread" # pthread needed
397 echo "Selected sigaltstack threads"
398 elif [ "$fibers" = "0" ]; then
399 thread_support="HAVE_WIN32_FIBER_THREADS"
400 echo "Selected Win32 Fiber threads"
404 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
405 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
406 thread_support="HAVE_SDL_THREADS"
407 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
408 echo "Selected SDL threads"
409 else
410 echo "WARNING: Falling back to SDL threads"
416 # functions for setting up cross-compiler names and options
417 # also set endianess and what the exact recommended gcc version is
418 # the gcc version should most likely match what versions we build with
419 # rockboxdev.sh
421 shcc () {
422 prefixtools sh-elf-
423 GCCOPTS="$CCOPTS -m1"
424 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
425 endian="big"
426 gccchoice="4.0.3"
429 calmrisccc () {
430 prefixtools calmrisc16-unknown-elf-
431 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
432 GCCOPTIMIZE="-fomit-frame-pointer"
433 endian="big"
436 coldfirecc () {
437 prefixtools m68k-elf-
438 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
439 GCCOPTIMIZE="-fomit-frame-pointer"
440 endian="big"
441 gccchoice="4.5.2"
444 arm7tdmicc () {
445 findarmgcc
446 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
447 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
448 GCCOPTS="$GCCOPTS -mlong-calls"
450 GCCOPTIMIZE="-fomit-frame-pointer"
451 endian="little"
454 arm9tdmicc () {
455 findarmgcc
456 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
457 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
458 GCCOPTS="$GCCOPTS -mlong-calls"
460 GCCOPTIMIZE="-fomit-frame-pointer"
461 endian="little"
464 arm940tbecc () {
465 findarmgcc
466 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
467 if test "$ARG_ARM_EABI" = "0"; then
468 GCCOPTS="$GCCOPTS -mlong-calls"
470 GCCOPTIMIZE="-fomit-frame-pointer"
471 endian="big"
474 arm940tcc () {
475 findarmgcc
476 GCCOPTS="$CCOPTS -mcpu=arm940t"
477 if test "$ARG_ARM_EABI" = "0"; then
478 GCCOPTS="$GCCOPTS -mlong-calls"
480 GCCOPTIMIZE="-fomit-frame-pointer"
481 endian="little"
484 arm946cc () {
485 findarmgcc
486 GCCOPTS="$CCOPTS -mcpu=arm9e"
487 if test "$ARG_ARM_EABI" = "0"; then
488 GCCOPTS="$GCCOPTS -mlong-calls"
490 GCCOPTIMIZE="-fomit-frame-pointer"
491 endian="little"
494 arm926ejscc () {
495 findarmgcc
496 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
497 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
498 GCCOPTS="$GCCOPTS -mlong-calls"
500 GCCOPTIMIZE="-fomit-frame-pointer"
501 endian="little"
504 arm1136jfscc () {
505 findarmgcc
506 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
507 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
508 GCCOPTS="$GCCOPTS -mlong-calls"
510 GCCOPTIMIZE="-fomit-frame-pointer"
511 endian="little"
514 arm1176jzscc () {
515 findarmgcc
516 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
517 if test "$ARG_ARM_EABI" = "0"; then
518 GCCOPTS="$GCCOPTS -mlong-calls"
520 GCCOPTIMIZE="-fomit-frame-pointer"
521 endian="little"
524 arm7ejscc () {
525 findarmgcc
526 GCCOPTS="$CCOPTS -march=armv5te"
527 GCCOPTIMIZE="-fomit-frame-pointer"
528 endian="little"
531 mipselcc () {
532 arch="mips"
533 arch_version=32 # FIXME: autodetect version (32 or 64)
534 prefixtools mipsel-elf-
535 # mips is predefined, but we want it for paths. use __mips instead
536 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
537 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
538 GCCOPTIMIZE="-fomit-frame-pointer"
539 endian="little"
540 gccchoice="4.1.2"
543 maemocc () {
544 # Scratchbox sets up "gcc" based on the active target
545 prefixtools ""
547 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
548 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
549 GCCOPTIMIZE=''
550 LDOPTS="-lm -ldl $LDOPTS"
551 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
552 SHARED_LDFLAG="-shared"
553 SHARED_CFLAGS=''
554 endian="little"
555 thread_support="HAVE_SIGALTSTACK_THREADS"
557 is_n900=0
558 # Determine maemo version
559 if pkg-config --atleast-version=5 maemo-version; then
560 if [ "$1" == "4" ]; then
561 echo "ERROR: Maemo 4 SDK required."
562 exit 1
564 extradefines="$extradefines -DMAEMO5"
565 echo "Found N900 maemo version"
566 is_n900=1
567 elif pkg-config --atleast-version=4 maemo-version; then
568 if [ "$1" == "5" ]; then
569 echo "ERROR: Maemo 5 SDK required."
570 exit 1
572 extradefines="$extradefines -DMAEMO4"
573 echo "Found N8xx maemo version"
574 else
575 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
576 exit 1
579 # SDL
580 if [ $is_n900 -eq 1 ]; then
581 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
582 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
583 else
584 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
585 LDOPTS="$LDOPTS `sdl-config --libs`"
588 # glib and libosso support
589 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
590 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
592 # libhal support: Battery monitoring
593 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
594 LDOPTS="$LDOPTS `pkg-config --libs hal`"
596 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
597 if [ $is_n900 -eq 1 ]; then
598 # gstreamer support: Audio output.
599 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
600 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
602 # N900 specific: libplayback support
603 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
604 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
606 # N900 specific: Enable ARMv7 NEON support
607 if sb-conf show -A |grep -q -i arm; then
608 echo "Detected ARM target"
609 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
610 extradefines="$extradefines -DMAEMO_ARM_BUILD"
611 else
612 echo "Detected x86 target"
614 else
615 # N8xx specific: Enable armv5te instructions
616 if sb-conf show -A |grep -q -i arm; then
617 echo "Detected ARM target"
618 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
619 extradefines="$extradefines -DMAEMO_ARM_BUILD"
620 else
621 echo "Detected x86 target"
626 pandoracc () {
627 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
628 # You have to use the sebt3 toolchain:
629 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
631 PNDSDK="/usr/local/angstrom/arm"
632 if [ ! -x $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc ]; then
633 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
634 exit
637 PATH=$PNDSDK/bin:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi/usr/bin
638 PKG_CONFIG_PATH=$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib/pkgconfig
639 LDOPTS="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
640 PKG_CONFIG="pkg-config"
642 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
643 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
644 GCCOPTIMIZE=''
645 LDOPTS="-lm -ldl $LDOPTS"
646 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
647 SHARED_LDFLAG="-shared"
648 SHARED_CFLAGS=''
649 endian="little"
650 thread_support="HAVE_SIGALTSTACK_THREADS"
652 # Include path
653 GCCOPTS="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
655 # Set up compiler
656 gccchoice="4.3.3"
657 prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
659 # Detect SDL
660 GCCOPTS="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
661 LDOPTS="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
663 # Compiler options
664 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
665 GCCOPTS="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
666 GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant"
669 ypr0cc () {
671 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
672 GCCOPTIMIZE=''
673 LDOPTS="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
674 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
675 SHARED_LDFLAG="-shared"
676 SHARED_CFLAGS=''
677 endian="little"
678 thread_support="HAVE_SIGALTSTACK_THREADS"
679 app_type="ypr0"
681 # Include path
682 GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
684 # Set up compiler
685 gccchoice="4.4.6"
686 prefixtools "arm-ypr0-linux-gnueabi-"
689 androidcc () {
690 if [ -z "$ANDROID_SDK_PATH" ]; then
691 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
692 echo "environment variable point to the root directory of the Android SDK."
693 exit
695 if [ -z "$ANDROID_NDK_PATH" ]; then
696 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
697 echo "environment variable point to the root directory of the Android NDK."
698 exit
700 buildhost=$(uname | tr "[:upper:]" "[:lower:]")
701 gccchoice="4.4.3"
702 gcctarget="arm-linux-androideabi-"
703 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
704 PATH=$PATH:$gccprefix/bin
705 prefixtools $gcctarget
706 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
707 GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
708 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
709 GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack"
710 LDOPTS="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
711 endian="little"
712 SHARED_LDFLAG="-shared"
715 whichadvanced () {
716 atype=`echo "$1" | cut -c 2-`
717 ##################################################################
718 # Prompt for specific developer options
720 if [ "$atype" ]; then
721 interact=
722 else
723 interact=1
724 echo ""
725 printf "Enter your developer options (press only enter when done)\n\
726 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
727 (T)est plugins, S(m)all C lib, Logf to Ser(i)al port:"
728 if [ "$modelname" = "archosplayer" ]; then
729 printf ", Use (A)TA poweroff"
731 if [ "$t_model" = "ondio" ]; then
732 printf ", (B)acklight MOD"
734 if [ "$modelname" = "iaudiom5" ]; then
735 printf ", (F)M radio MOD"
737 if [ "$modelname" = "iriverh120" ]; then
738 printf ", (R)TC MOD"
740 echo ""
743 cont=1
744 while [ $cont = "1" ]; do
746 if [ "$interact" ]; then
747 option=`input`
748 else
749 option=`echo "$atype" | cut -c 1`
752 case $option in
753 [Dd])
754 if [ "yes" = "$profile" ]; then
755 echo "Debug is incompatible with profiling"
756 else
757 echo "DEBUG build enabled"
758 use_debug="yes"
761 [Ll])
762 echo "logf() support enabled"
763 logf="yes"
765 [Mm])
766 echo "Using Rockbox' small C library"
767 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
769 [Tt])
770 echo "Including test plugins"
771 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
773 [Cc])
774 echo "bootchart enabled (logf also enabled)"
775 bootchart="yes"
776 logf="yes"
778 [Ii])
779 echo "Logf to serial port enabled (logf also enabled)"
780 logf="yes"
781 logf_serial="yes"
783 [Ss])
784 echo "Simulator build enabled"
785 simulator="yes"
787 [Pp])
788 if [ "yes" = "$use_debug" ]; then
789 echo "Profiling is incompatible with debug"
790 else
791 echo "Profiling support is enabled"
792 profile="yes"
795 [Vv])
796 echo "Voice build selected"
797 voice="yes"
799 [Aa])
800 if [ "$modelname" = "archosplayer" ]; then
801 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
802 echo "ATA power off enabled"
805 [Bb])
806 if [ "$t_model" = "ondio" ]; then
807 have_backlight="#define HAVE_BACKLIGHT"
808 echo "Backlight functions enabled"
811 [Ff])
812 if [ "$modelname" = "iaudiom5" ]; then
813 have_fmradio_in="#define HAVE_FMRADIO_IN"
814 echo "FM radio functions enabled"
817 [Rr])
818 if [ "$modelname" = "iriverh120" ]; then
819 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
820 have_rtc_alarm="#define HAVE_RTC_ALARM"
821 echo "RTC functions enabled (DS1339/DS3231)"
824 [Ww])
825 echo "Enabling Windows 32 cross-compiling"
826 win32crosscompile="yes"
828 "") # Match enter press when finished with advanced options
829 cont=0
832 echo "[ERROR] Option $option unsupported"
834 esac
835 if [ "$interact" ]; then
836 btype="$btype$option"
837 else
838 atype=`echo "$atype" | cut -c 2-`
839 [ "$atype" ] || cont=0
841 done
842 echo "done"
844 if [ "yes" = "$voice" ]; then
845 # Ask about languages to build
846 picklang
847 voicelanguage=`whichlang`
848 echo "Voice language set to $voicelanguage"
850 # Configure encoder and TTS engine for each language
851 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
852 voiceconfig "$thislang"
853 done
855 if [ "yes" = "$use_debug" ]; then
856 debug="-DDEBUG"
857 GCCOPTS="$GCCOPTS -g -DDEBUG"
859 if [ "yes" = "$logf" ]; then
860 use_logf="#define ROCKBOX_HAS_LOGF 1"
862 if [ "yes" = "$logf_serial" ]; then
863 use_logf_serial="#define LOGF_SERIAL 1"
865 if [ "yes" = "$bootchart" ]; then
866 use_bootchart="#define DO_BOOTCHART 1"
868 if [ "yes" = "$simulator" ]; then
869 debug="-DDEBUG"
870 extradefines="$extradefines -DSIMULATOR"
871 archosrom=""
872 flash=""
874 if [ "yes" = "$profile" ]; then
875 extradefines="$extradefines -DRB_PROFILE"
876 PROFILE_OPTS="-finstrument-functions"
880 # Configure voice settings
881 voiceconfig () {
882 thislang=$1
883 if [ ! "$ARG_TTS" ]; then
884 echo "Building $thislang voice for $modelname. Select options"
885 echo ""
888 if [ -n "`findtool flite`" ]; then
889 FLITE="F(l)ite "
890 FLITE_OPTS=""
891 DEFAULT_TTS="flite"
892 DEFAULT_TTS_OPTS=$FLITE_OPTS
893 DEFAULT_NOISEFLOOR="500"
894 DEFAULT_CHOICE="l"
896 if [ -n "`findtool espeak`" ]; then
897 ESPEAK="(e)Speak "
898 ESPEAK_OPTS=""
899 DEFAULT_TTS="espeak"
900 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
901 DEFAULT_NOISEFLOOR="500"
902 DEFAULT_CHOICE="e"
904 if [ -n "`findtool festival`" ]; then
905 FESTIVAL="(F)estival "
906 case "$thislang" in
907 "italiano")
908 FESTIVAL_OPTS="--language italian"
910 "espanol")
911 FESTIVAL_OPTS="--language spanish"
913 "finnish")
914 FESTIVAL_OPTS="--language finnish"
916 "czech")
917 FESTIVAL_OPTS="--language czech"
920 FESTIVAL_OPTS=""
922 esac
923 DEFAULT_TTS="festival"
924 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
925 DEFAULT_NOISEFLOOR="500"
926 DEFAULT_CHOICE="f"
928 if [ -n "`findtool swift`" ]; then
929 SWIFT="S(w)ift "
930 SWIFT_OPTS=""
931 DEFAULT_TTS="swift"
932 DEFAULT_TTS_OPTS=$SWIFT_OPTS
933 DEFAULT_NOISEFLOOR="500"
934 DEFAULT_CHOICE="w"
936 # Allow SAPI if Windows is in use
937 if [ -n "`findtool winver`" ]; then
938 SAPI="(S)API "
939 SAPI_OPTS=""
940 DEFAULT_TTS="sapi"
941 DEFAULT_TTS_OPTS=$SAPI_OPTS
942 DEFAULT_NOISEFLOOR="500"
943 DEFAULT_CHOICE="s"
946 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
947 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
948 exit 3
951 if [ "$ARG_TTS" ]; then
952 option=$ARG_TTS
953 else
954 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
955 option=`input`
956 if [ -z "$option" ]; then option=${DEFAULT_CHOICE}; fi
957 advopts="$advopts --tts=$option"
959 case "$option" in
960 [Ll])
961 TTS_ENGINE="flite"
962 NOISEFLOOR="500" # TODO: check this value
963 TTS_OPTS=$FLITE_OPTS
965 [Ee])
966 TTS_ENGINE="espeak"
967 NOISEFLOOR="500"
968 TTS_OPTS=$ESPEAK_OPTS
970 [Ff])
971 TTS_ENGINE="festival"
972 NOISEFLOOR="500"
973 TTS_OPTS=$FESTIVAL_OPTS
975 [Ss])
976 TTS_ENGINE="sapi"
977 NOISEFLOOR="500"
978 TTS_OPTS=$SAPI_OPTS
980 [Ww])
981 TTS_ENGINE="swift"
982 NOISEFLOOR="500"
983 TTS_OPTS=$SWIFT_OPTS
986 TTS_ENGINE=$DEFAULT_TTS
987 TTS_OPTS=$DEFAULT_TTS_OPTS
988 NOISEFLOOR=$DEFAULT_NOISEFLOOR
989 esac
990 echo "Using $TTS_ENGINE for TTS"
992 # Select which voice to use for Festival
993 if [ "$TTS_ENGINE" = "festival" ]; then
994 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
995 for voice in $voicelist; do
996 TTS_FESTIVAL_VOICE="$voice" # Default choice
997 break
998 done
999 if [ "$ARG_VOICE" ]; then
1000 CHOICE=$ARG_VOICE
1001 else
1003 for voice in $voicelist; do
1004 printf "%3d. %s\n" "$i" "$voice"
1005 i=`expr $i + 1`
1006 done
1007 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
1008 CHOICE=`input`
1011 for voice in $voicelist; do
1012 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
1013 TTS_FESTIVAL_VOICE="$voice"
1015 i=`expr $i + 1`
1016 done
1017 advopts="$advopts --voice=$CHOICE"
1018 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1019 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1022 # Read custom tts options from command line
1023 if [ "$ARG_TTSOPTS" ]; then
1024 TTS_OPTS="$ARG_TTSOPTS"
1025 echo "$TTS_ENGINE options set to $TTS_OPTS"
1028 if [ "$swcodec" = "yes" ]; then
1029 ENCODER="rbspeexenc"
1030 ENC_OPTS="-q 4 -c 10"
1031 else
1032 if [ -n "`findtool lame`" ]; then
1033 ENCODER="lame"
1034 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1035 else
1036 echo "You need LAME in the system path to build voice files for"
1037 echo "HWCODEC targets."
1038 exit 4
1042 echo "Using $ENCODER for encoding voice clips"
1044 # Read custom encoder options from command line
1045 if [ "$ARG_ENCOPTS" ]; then
1046 ENC_OPTS="$ARG_ENCOPTS"
1047 echo "$ENCODER options set to $ENC_OPTS"
1050 TEMPDIR="${pwd}"
1051 if [ -n "`findtool cygpath`" ]; then
1052 TEMPDIR=`cygpath . -a -w`
1056 picklang() {
1057 # figure out which languages that are around
1058 for file in $rootdir/apps/lang/*.lang; do
1059 clean=`basename $file .lang`
1060 langs="$langs $clean"
1061 done
1063 if [ "$ARG_LANG" ]; then
1064 pick=$ARG_LANG
1065 else
1066 echo "Select a number for the language to use (default is english)"
1067 # FIXME The multiple-language feature is currently broken
1068 # echo "You may enter a comma-separated list of languages to build"
1070 num=1
1071 for one in $langs; do
1072 echo "$num. $one"
1073 num=`expr $num + 1`
1074 done
1075 pick=`input`
1076 advopts="$advopts --language=$pick"
1080 whichlang() {
1081 output=""
1082 # Allow the user to pass a comma-separated list of langauges
1083 for thispick in `echo $pick | sed 's/,/ /g'`; do
1084 num=1
1085 for one in $langs; do
1086 # Accept both the language number and name
1087 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
1088 if [ "$output" = "" ]; then
1089 output=$one
1090 else
1091 output=$output,$one
1094 num=`expr $num + 1`
1095 done
1096 done
1097 if [ -z "$output" ]; then
1098 # pick a default
1099 output="english"
1101 echo $output
1104 help() {
1105 echo "Rockbox configure script."
1106 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1107 echo "Do *NOT* run this within the tools directory!"
1108 echo ""
1109 cat <<EOF
1110 Usage: configure [OPTION]...
1111 Options:
1112 --target=TARGET Sets the target, TARGET can be either the target ID or
1113 corresponding string. Run without this option to see all
1114 available targets.
1116 --ram=RAM Sets the RAM for certain targets. Even though any number
1117 is accepted, not every number is correct. The default
1118 value will be applied, if you entered a wrong number
1119 (which depends on the target). Watch the output. Run
1120 without this option if you are not sure which the right
1121 number is.
1123 --type=TYPE Sets the build type. Shortcuts are also valid.
1124 Run without this option to see all available types.
1125 Multiple values are allowed and managed in the input
1126 order. So --type=b stands for Bootloader build, while
1127 --type=ab stands for "Backlight MOD" build.
1129 --lcdwidth=X Sets the width of the LCD. Used only for application
1130 targets.
1132 --lcdheight=Y Sets the height of the LCD. Used only for application
1133 targets.
1135 --language=LANG Set the language used for voice generation (used only if
1136 TYPE is AV).
1138 --tts=ENGINE Set the TTS engine used for voice generation (used only
1139 if TYPE is AV).
1141 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1142 AV).
1144 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1146 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1148 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1149 This is useful for having multiple alternate builds on
1150 your device that you can load with ROLO. However as the
1151 bootloader looks for .rockbox you won't be able to boot
1152 into this build.
1154 --ccache Enable ccache use (done by default these days)
1155 --no-ccache Disable ccache use
1157 --eabi Make configure prefer toolchains that are able to compile
1158 for the new ARM standard abi EABI
1159 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1160 --thumb Build with -mthumb (for ARM builds)
1161 --no-thumb The opposite of --thumb (don't use thumb even for targets
1162 where this is the default
1163 --sdl-threads Force use of SDL threads. They have inferior performance,
1164 but are better debuggable with GDB
1165 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1166 behavior of falling back to them if no native thread
1167 support was found.
1168 --prefix Target installation directory
1169 --help Shows this message (must not be used with other options)
1173 exit
1176 ARG_CCACHE=
1177 ARG_ENCOPTS=
1178 ARG_LANG=
1179 ARG_RAM=
1180 ARG_RBDIR=
1181 ARG_TARGET=
1182 ARG_TTS=
1183 ARG_TTSOPTS=
1184 ARG_TYPE=
1185 ARG_VOICE=
1186 ARG_ARM_EABI=
1187 ARG_ARM_THUMB=
1188 ARG_PREFIX="$PREFIX"
1189 ARG_THREAD_SUPPORT=
1190 err=
1191 for arg in "$@"; do
1192 case "$arg" in
1193 --ccache) ARG_CCACHE=1;;
1194 --no-ccache) ARG_CCACHE=0;;
1195 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1196 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
1197 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1198 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
1199 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1200 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1201 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1202 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1203 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1204 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1205 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
1206 --eabi) ARG_ARM_EABI=1;;
1207 --no-eabi) ARG_ARM_EABI=0;;
1208 --thumb) ARG_ARM_THUMB=1;;
1209 --no-thumb) ARG_ARM_THUMB=0;;
1210 --sdl-threads)ARG_THREAD_SUPPORT=1;;
1211 --no-sdl-threads)
1212 ARG_THREAD_SUPPORT=0;;
1213 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
1214 --help) help;;
1215 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1216 esac
1217 done
1218 [ "$err" ] && exit 1
1220 advopts=
1222 if [ "$TMPDIR" != "" ]; then
1223 tmpdir=$TMPDIR
1224 else
1225 tmpdir=/tmp
1227 echo Using temporary directory $tmpdir
1229 if test -r "configure"; then
1230 # this is a check for a configure script in the current directory, it there
1231 # is one, try to figure out if it is this one!
1233 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1234 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1235 echo "It will only cause you pain and grief. Instead do this:"
1236 echo ""
1237 echo " cd .."
1238 echo " mkdir build-dir"
1239 echo " cd build-dir"
1240 echo " ../tools/configure"
1241 echo ""
1242 echo "Much happiness will arise from this. Enjoy"
1243 exit 5
1247 # get our current directory
1248 pwd=`pwd`;
1250 if { echo $pwd | grep " "; } then
1251 echo "You're running this script in a path that contains space. The build"
1252 echo "system is unfortunately not clever enough to deal with this. Please"
1253 echo "run the script from a different path, rename the path or fix the build"
1254 echo "system!"
1255 exit 6
1258 if [ -z "$rootdir" ]; then
1259 ##################################################################
1260 # Figure out where the source code root is!
1262 rootdir=`dirname $0`/../
1264 #####################################################################
1265 # Convert the possibly relative directory name to an absolute version
1267 now=`pwd`
1268 cd $rootdir
1269 rootdir=`pwd`
1271 # cd back to the build dir
1272 cd $now
1275 apps="apps"
1276 appsdir='$(ROOTDIR)/apps'
1277 toolsdir='$(ROOTDIR)/tools'
1280 ##################################################################
1281 # Figure out target platform
1284 if [ "$ARG_TARGET" ]; then
1285 buildfor=$ARG_TARGET
1286 else
1287 echo "Enter target platform:"
1288 cat <<EOF
1289 ==Archos== ==iriver== ==Apple iPod==
1290 0) Player/Studio 10) H120/H140 20) Color/Photo
1291 1) Recorder 11) H320/H340 21) Nano 1G
1292 2) FM Recorder 12) iHP-100/110/115 22) Video
1293 3) Recorder v2 13) iFP-790 23) 3G
1294 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1295 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1296 6) AV300 26) Mini 2G
1297 ==Toshiba== 27) 1G, 2G
1298 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1299 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1300 31) M5/M5L
1301 32) 7 ==Olympus= ==SanDisk==
1302 33) D2 70) M:Robe 500 50) Sansa e200
1303 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1304 52) Sansa c200
1305 ==Creative== ==Philips== 53) Sansa m200
1306 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1307 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1308 92) Zen Vision HDD1830 56) Sansa e200v2
1309 102) GoGear HDD6330 57) Sansa m200v4
1310 ==Onda== 58) Sansa Fuze
1311 120) VX747 ==Meizu== 59) Sansa c200v2
1312 121) VX767 110) M6SL 60) Sansa Clipv2
1313 122) VX747+ 111) M6SP 61) Sansa View
1314 123) VX777 112) M3 62) Sansa Clip+
1315 63) Sansa Fuze v2
1316 ==Samsung== ==Tatung== 64) Sansa Fuze+
1317 140) YH-820 150) Elio TPJ-1022 65) Sansa Clip Zip
1318 141) YH-920 66) Sansa Connect
1319 142) YH-925 ==Packard Bell==
1320 143) YP-S3 160) Vibe 500 ==Logik==
1321 80) DAX 1GB MP3/DAB
1322 ==Application== ==MPIO==
1323 200) SDL 170) HD200 ==Lyre project==
1324 201) Android 171) HD300 130) Lyre proto 1
1325 202) Nokia N8xx 131) Mini2440
1326 203) Nokia N900 ==ROCKCHIP== ==HiFiMAN==
1327 204) Pandora 180) rk27xx generic 190) HM-60x
1328 205) Samsung YP-R0 191) HM-801
1332 buildfor=`input`;
1335 # Set of tools built for all target platforms:
1336 toolset="rdf2binary convbdf codepages"
1338 # Toolsets for some target families:
1339 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1340 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1341 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1342 ipodbitmaptools="$toolset scramble bmp2rb"
1343 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1344 tccbitmaptools="$toolset scramble bmp2rb"
1345 # generic is used by IFP, Meizu and Onda
1346 genericbitmaptools="$toolset bmp2rb"
1347 # scramble is used by all other targets
1348 scramblebitmaptools="$genericbitmaptools scramble"
1351 # ---- For each target ----
1353 # *Variables*
1354 # target_id: a unique number identifying this target, IS NOT the menu number.
1355 # Just use the currently highest number+1 when you add a new
1356 # target.
1357 # modelname: short model name used all over to identify this target
1358 # memory: number of megabytes of RAM this target has. If the amount can
1359 # be selected by the size prompt, let memory be unset here
1360 # target: -Ddefine passed to the build commands to make the correct
1361 # config-*.h file get included etc
1362 # tool: the tool that takes a plain binary and converts that into a
1363 # working "firmware" file for your target
1364 # output: the final output file name
1365 # boottool: the tool that takes a plain binary and generates a bootloader
1366 # file for your target (or blank to use $tool)
1367 # bootoutput:the final output file name for the bootloader (or blank to use
1368 # $output)
1369 # appextra: passed to the APPEXTRA variable in the Makefiles.
1370 # TODO: add proper explanation
1371 # archosrom: used only for Archos targets that build a special flashable .ucl
1372 # image.
1373 # flash: name of output for flashing, for targets where there's a special
1374 # file output for this.
1375 # plugins: set to 'yes' to build the plugins. Early development builds can
1376 # set this to no in the early stages to have an easier life for a
1377 # while
1378 # swcodec: set 'yes' on swcodec targets
1379 # toolset: lists what particular tools in the tools/ directory that this
1380 # target needs to have built prior to building Rockbox
1382 # *Functions*
1383 # *cc: sets up gcc and compiler options for your target builds. Note
1384 # that if you select a simulator build, the compiler selection is
1385 # overridden later in the script.
1387 case $buildfor in
1389 0|archosplayer)
1390 target_id=1
1391 modelname="archosplayer"
1392 target="ARCHOS_PLAYER"
1393 shcc
1394 tool="$rootdir/tools/scramble"
1395 output="archos.mod"
1396 appextra="player:gui"
1397 archosrom="$pwd/rombox.ucl"
1398 flash="$pwd/rockbox.ucl"
1399 plugins="yes"
1400 swcodec=""
1402 # toolset is the tools within the tools directory that we build for
1403 # this particular target.
1404 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1406 # Note: the convbdf is present in the toolset just because: 1) the
1407 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1408 # build the player simulator
1410 t_cpu="sh"
1411 t_manufacturer="archos"
1412 t_model="player"
1415 1|archosrecorder)
1416 target_id=2
1417 modelname="archosrecorder"
1418 target="ARCHOS_RECORDER"
1419 shcc
1420 tool="$rootdir/tools/scramble"
1421 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1422 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1423 output="ajbrec.ajz"
1424 appextra="recorder:gui:radio"
1425 #archosrom="$pwd/rombox.ucl"
1426 flash="$pwd/rockbox.ucl"
1427 plugins="yes"
1428 swcodec=""
1429 # toolset is the tools within the tools directory that we build for
1430 # this particular target.
1431 toolset=$archosbitmaptools
1432 t_cpu="sh"
1433 t_manufacturer="archos"
1434 t_model="recorder"
1437 2|archosfmrecorder)
1438 target_id=3
1439 modelname="archosfmrecorder"
1440 target="ARCHOS_FMRECORDER"
1441 shcc
1442 tool="$rootdir/tools/scramble -fm"
1443 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1444 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1445 output="ajbrec.ajz"
1446 appextra="recorder:gui:radio"
1447 #archosrom="$pwd/rombox.ucl"
1448 flash="$pwd/rockbox.ucl"
1449 plugins="yes"
1450 swcodec=""
1451 # toolset is the tools within the tools directory that we build for
1452 # this particular target.
1453 toolset=$archosbitmaptools
1454 t_cpu="sh"
1455 t_manufacturer="archos"
1456 t_model="fm_v2"
1459 3|archosrecorderv2)
1460 target_id=4
1461 modelname="archosrecorderv2"
1462 target="ARCHOS_RECORDERV2"
1463 shcc
1464 tool="$rootdir/tools/scramble -v2"
1465 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1466 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1467 output="ajbrec.ajz"
1468 appextra="recorder:gui:radio"
1469 #archosrom="$pwd/rombox.ucl"
1470 flash="$pwd/rockbox.ucl"
1471 plugins="yes"
1472 swcodec=""
1473 # toolset is the tools within the tools directory that we build for
1474 # this particular target.
1475 toolset=$archosbitmaptools
1476 t_cpu="sh"
1477 t_manufacturer="archos"
1478 t_model="fm_v2"
1481 4|archosondiosp)
1482 target_id=7
1483 modelname="archosondiosp"
1484 target="ARCHOS_ONDIOSP"
1485 shcc
1486 tool="$rootdir/tools/scramble -osp"
1487 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1488 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1489 output="ajbrec.ajz"
1490 appextra="recorder:gui:radio"
1491 #archosrom="$pwd/rombox.ucl"
1492 flash="$pwd/rockbox.ucl"
1493 plugins="yes"
1494 swcodec=""
1495 # toolset is the tools within the tools directory that we build for
1496 # this particular target.
1497 toolset=$archosbitmaptools
1498 t_cpu="sh"
1499 t_manufacturer="archos"
1500 t_model="ondio"
1503 5|archosondiofm)
1504 target_id=8
1505 modelname="archosondiofm"
1506 target="ARCHOS_ONDIOFM"
1507 shcc
1508 tool="$rootdir/tools/scramble -ofm"
1509 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1510 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1511 output="ajbrec.ajz"
1512 appextra="recorder:gui:radio"
1513 #archosrom="$pwd/rombox.ucl"
1514 flash="$pwd/rockbox.ucl"
1515 plugins="yes"
1516 swcodec=""
1517 toolset=$archosbitmaptools
1518 t_cpu="sh"
1519 t_manufacturer="archos"
1520 t_model="ondio"
1523 6|archosav300)
1524 target_id=38
1525 modelname="archosav300"
1526 target="ARCHOS_AV300"
1527 memory=16 # always
1528 arm7tdmicc
1529 tool="$rootdir/tools/scramble -mm=C"
1530 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1531 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1532 output="cjbm.ajz"
1533 appextra="recorder:gui:radio"
1534 plugins="yes"
1535 swcodec=""
1536 # toolset is the tools within the tools directory that we build for
1537 # this particular target.
1538 toolset="$toolset scramble descramble bmp2rb"
1539 # architecture, manufacturer and model for the target-tree build
1540 t_cpu="arm"
1541 t_manufacturer="archos"
1542 t_model="av300"
1545 10|iriverh120)
1546 target_id=9
1547 modelname="iriverh120"
1548 target="IRIVER_H120"
1549 memory=32 # always
1550 coldfirecc
1551 tool="$rootdir/tools/scramble -add=h120"
1552 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1553 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1554 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1555 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1556 output="rockbox.iriver"
1557 bootoutput="bootloader.iriver"
1558 appextra="recorder:gui:radio"
1559 flash="$pwd/rombox.iriver"
1560 plugins="yes"
1561 swcodec="yes"
1562 # toolset is the tools within the tools directory that we build for
1563 # this particular target.
1564 toolset=$iriverbitmaptools
1565 t_cpu="coldfire"
1566 t_manufacturer="iriver"
1567 t_model="h100"
1570 11|iriverh300)
1571 target_id=10
1572 modelname="iriverh300"
1573 target="IRIVER_H300"
1574 memory=32 # always
1575 coldfirecc
1576 tool="$rootdir/tools/scramble -add=h300"
1577 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1578 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1579 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1580 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1581 output="rockbox.iriver"
1582 appextra="recorder:gui:radio"
1583 plugins="yes"
1584 swcodec="yes"
1585 # toolset is the tools within the tools directory that we build for
1586 # this particular target.
1587 toolset=$iriverbitmaptools
1588 t_cpu="coldfire"
1589 t_manufacturer="iriver"
1590 t_model="h300"
1593 12|iriverh100)
1594 target_id=11
1595 modelname="iriverh100"
1596 target="IRIVER_H100"
1597 memory=16 # always
1598 coldfirecc
1599 tool="$rootdir/tools/scramble -add=h100"
1600 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1601 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1602 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1603 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1604 output="rockbox.iriver"
1605 bootoutput="bootloader.iriver"
1606 appextra="recorder:gui:radio"
1607 flash="$pwd/rombox.iriver"
1608 plugins="yes"
1609 swcodec="yes"
1610 # toolset is the tools within the tools directory that we build for
1611 # this particular target.
1612 toolset=$iriverbitmaptools
1613 t_cpu="coldfire"
1614 t_manufacturer="iriver"
1615 t_model="h100"
1618 13|iriverifp7xx)
1619 target_id=19
1620 modelname="iriverifp7xx"
1621 target="IRIVER_IFP7XX"
1622 memory=1
1623 arm7tdmicc short
1624 tool="cp"
1625 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1626 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1627 output="rockbox.wma"
1628 appextra="recorder:gui:radio"
1629 plugins="yes"
1630 swcodec="yes"
1631 # toolset is the tools within the tools directory that we build for
1632 # this particular target.
1633 toolset=$genericbitmaptools
1634 t_cpu="arm"
1635 t_manufacturer="pnx0101"
1636 t_model="iriver-ifp7xx"
1639 14|iriverh10)
1640 target_id=22
1641 modelname="iriverh10"
1642 target="IRIVER_H10"
1643 memory=32 # always
1644 arm7tdmicc
1645 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1646 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1647 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1648 output="rockbox.mi4"
1649 appextra="recorder:gui:radio"
1650 plugins="yes"
1651 swcodec="yes"
1652 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1653 bootoutput="H10_20GC.mi4"
1654 # toolset is the tools within the tools directory that we build for
1655 # this particular target.
1656 toolset=$scramblebitmaptools
1657 # architecture, manufacturer and model for the target-tree build
1658 t_cpu="arm"
1659 t_soc="pp"
1660 t_manufacturer="iriver"
1661 t_model="h10"
1664 15|iriverh10_5gb)
1665 target_id=24
1666 modelname="iriverh10_5gb"
1667 target="IRIVER_H10_5GB"
1668 memory=32 # always
1669 arm7tdmicc
1670 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1671 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1672 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1673 output="rockbox.mi4"
1674 appextra="recorder:gui:radio"
1675 plugins="yes"
1676 swcodec="yes"
1677 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1678 bootoutput="H10.mi4"
1679 # toolset is the tools within the tools directory that we build for
1680 # this particular target.
1681 toolset=$scramblebitmaptools
1682 # architecture, manufacturer and model for the target-tree build
1683 t_cpu="arm"
1684 t_soc="pp"
1685 t_manufacturer="iriver"
1686 t_model="h10"
1689 20|ipodcolor)
1690 target_id=13
1691 modelname="ipodcolor"
1692 target="IPOD_COLOR"
1693 memory=32 # always
1694 arm7tdmicc
1695 tool="$rootdir/tools/scramble -add=ipco"
1696 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1697 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1698 output="rockbox.ipod"
1699 appextra="recorder:gui:radio"
1700 plugins="yes"
1701 swcodec="yes"
1702 bootoutput="bootloader-$modelname.ipod"
1703 # toolset is the tools within the tools directory that we build for
1704 # this particular target.
1705 toolset=$ipodbitmaptools
1706 # architecture, manufacturer and model for the target-tree build
1707 t_cpu="arm"
1708 t_soc="pp"
1709 t_manufacturer="ipod"
1710 t_model="color"
1713 21|ipodnano1g)
1714 target_id=14
1715 modelname="ipodnano1g"
1716 target="IPOD_NANO"
1717 memory=32 # always
1718 arm7tdmicc
1719 tool="$rootdir/tools/scramble -add=nano"
1720 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1721 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1722 output="rockbox.ipod"
1723 appextra="recorder:gui:radio"
1724 plugins="yes"
1725 swcodec="yes"
1726 bootoutput="bootloader-$modelname.ipod"
1727 # toolset is the tools within the tools directory that we build for
1728 # this particular target.
1729 toolset=$ipodbitmaptools
1730 # architecture, manufacturer and model for the target-tree build
1731 t_cpu="arm"
1732 t_soc="pp"
1733 t_manufacturer="ipod"
1734 t_model="nano"
1737 22|ipodvideo)
1738 target_id=15
1739 modelname="ipodvideo"
1740 target="IPOD_VIDEO"
1741 memory=64 # always. This is reduced at runtime if needed
1742 arm7tdmicc
1743 tool="$rootdir/tools/scramble -add=ipvd"
1744 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1745 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1746 output="rockbox.ipod"
1747 appextra="recorder:gui:radio"
1748 plugins="yes"
1749 swcodec="yes"
1750 bootoutput="bootloader-$modelname.ipod"
1751 # toolset is the tools within the tools directory that we build for
1752 # this particular target.
1753 toolset=$ipodbitmaptools
1754 # architecture, manufacturer and model for the target-tree build
1755 t_cpu="arm"
1756 t_soc="pp"
1757 t_manufacturer="ipod"
1758 t_model="video"
1761 23|ipod3g)
1762 target_id=16
1763 modelname="ipod3g"
1764 target="IPOD_3G"
1765 memory=32 # always
1766 arm7tdmicc
1767 tool="$rootdir/tools/scramble -add=ip3g"
1768 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1769 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1770 output="rockbox.ipod"
1771 appextra="recorder:gui:radio"
1772 plugins="yes"
1773 swcodec="yes"
1774 bootoutput="bootloader-$modelname.ipod"
1775 # toolset is the tools within the tools directory that we build for
1776 # this particular target.
1777 toolset=$ipodbitmaptools
1778 # architecture, manufacturer and model for the target-tree build
1779 t_cpu="arm"
1780 t_soc="pp"
1781 t_manufacturer="ipod"
1782 t_model="3g"
1785 24|ipod4g)
1786 target_id=17
1787 modelname="ipod4g"
1788 target="IPOD_4G"
1789 memory=32 # always
1790 arm7tdmicc
1791 tool="$rootdir/tools/scramble -add=ip4g"
1792 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1793 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1794 output="rockbox.ipod"
1795 appextra="recorder:gui:radio"
1796 plugins="yes"
1797 swcodec="yes"
1798 bootoutput="bootloader-$modelname.ipod"
1799 # toolset is the tools within the tools directory that we build for
1800 # this particular target.
1801 toolset=$ipodbitmaptools
1802 # architecture, manufacturer and model for the target-tree build
1803 t_cpu="arm"
1804 t_soc="pp"
1805 t_manufacturer="ipod"
1806 t_model="4g"
1809 25|ipodmini1g)
1810 target_id=18
1811 modelname="ipodmini1g"
1812 target="IPOD_MINI"
1813 memory=32 # always
1814 arm7tdmicc
1815 tool="$rootdir/tools/scramble -add=mini"
1816 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1817 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1818 output="rockbox.ipod"
1819 appextra="recorder:gui:radio"
1820 plugins="yes"
1821 swcodec="yes"
1822 bootoutput="bootloader-$modelname.ipod"
1823 # toolset is the tools within the tools directory that we build for
1824 # this particular target.
1825 toolset=$ipodbitmaptools
1826 # architecture, manufacturer and model for the target-tree build
1827 t_cpu="arm"
1828 t_soc="pp"
1829 t_manufacturer="ipod"
1830 t_model="mini"
1833 26|ipodmini2g)
1834 target_id=21
1835 modelname="ipodmini2g"
1836 target="IPOD_MINI2G"
1837 memory=32 # always
1838 arm7tdmicc
1839 tool="$rootdir/tools/scramble -add=mn2g"
1840 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1841 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1842 output="rockbox.ipod"
1843 appextra="recorder:gui:radio"
1844 plugins="yes"
1845 swcodec="yes"
1846 bootoutput="bootloader-$modelname.ipod"
1847 # toolset is the tools within the tools directory that we build for
1848 # this particular target.
1849 toolset=$ipodbitmaptools
1850 # architecture, manufacturer and model for the target-tree build
1851 t_cpu="arm"
1852 t_soc="pp"
1853 t_manufacturer="ipod"
1854 t_model="mini2g"
1857 27|ipod1g2g)
1858 target_id=29
1859 modelname="ipod1g2g"
1860 target="IPOD_1G2G"
1861 memory=32 # always
1862 arm7tdmicc
1863 tool="$rootdir/tools/scramble -add=1g2g"
1864 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1865 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1866 output="rockbox.ipod"
1867 appextra="recorder:gui:radio"
1868 plugins="yes"
1869 swcodec="yes"
1870 bootoutput="bootloader-$modelname.ipod"
1871 # toolset is the tools within the tools directory that we build for
1872 # this particular target.
1873 toolset=$ipodbitmaptools
1874 # architecture, manufacturer and model for the target-tree build
1875 t_cpu="arm"
1876 t_soc="pp"
1877 t_manufacturer="ipod"
1878 t_model="1g2g"
1881 28|ipodnano2g)
1882 target_id=62
1883 modelname="ipodnano2g"
1884 target="IPOD_NANO2G"
1885 memory=32 # always
1886 arm940tcc
1887 tool="$rootdir/tools/scramble -add=nn2g"
1888 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1889 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1890 output="rockbox.ipod"
1891 appextra="recorder:gui:radio"
1892 plugins="yes"
1893 swcodec="yes"
1894 bootoutput="bootloader-$modelname.ipod"
1895 # toolset is the tools within the tools directory that we build for
1896 # this particular target.
1897 toolset=$ipodbitmaptools
1898 # architecture, manufacturer and model for the target-tree build
1899 t_cpu="arm"
1900 t_manufacturer="s5l8700"
1901 t_model="ipodnano2g"
1904 29|ipod6g)
1905 target_id=71
1906 modelname="ipod6g"
1907 target="IPOD_6G"
1908 memory=64 # always
1909 arm926ejscc
1910 tool="$rootdir/tools/scramble -add=ip6g"
1911 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1912 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1913 output="rockbox.ipod"
1914 appextra="recorder:gui:radio"
1915 plugins="yes"
1916 swcodec="yes"
1917 bootoutput="bootloader-$modelname.ipod"
1918 # toolset is the tools within the tools directory that we build for
1919 # this particular target.
1920 toolset=$ipodbitmaptools
1921 # architecture, manufacturer and model for the target-tree build
1922 t_cpu="arm"
1923 t_manufacturer="s5l8702"
1924 t_model="ipod6g"
1927 30|iaudiox5)
1928 target_id=12
1929 modelname="iaudiox5"
1930 target="IAUDIO_X5"
1931 memory=16 # always
1932 coldfirecc
1933 tool="$rootdir/tools/scramble -add=iax5"
1934 boottool="$rootdir/tools/scramble -iaudiox5"
1935 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1936 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1937 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1938 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1939 output="rockbox.iaudio"
1940 bootoutput="x5_fw.bin"
1941 appextra="recorder:gui:radio"
1942 plugins="yes"
1943 swcodec="yes"
1944 # toolset is the tools within the tools directory that we build for
1945 # this particular target.
1946 toolset="$iaudiobitmaptools"
1947 # architecture, manufacturer and model for the target-tree build
1948 t_cpu="coldfire"
1949 t_manufacturer="iaudio"
1950 t_model="x5"
1953 31|iaudiom5)
1954 target_id=28
1955 modelname="iaudiom5"
1956 target="IAUDIO_M5"
1957 memory=16 # always
1958 coldfirecc
1959 tool="$rootdir/tools/scramble -add=iam5"
1960 boottool="$rootdir/tools/scramble -iaudiom5"
1961 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1962 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1963 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1964 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1965 output="rockbox.iaudio"
1966 bootoutput="m5_fw.bin"
1967 appextra="recorder:gui:radio"
1968 plugins="yes"
1969 swcodec="yes"
1970 # toolset is the tools within the tools directory that we build for
1971 # this particular target.
1972 toolset="$iaudiobitmaptools"
1973 # architecture, manufacturer and model for the target-tree build
1974 t_cpu="coldfire"
1975 t_manufacturer="iaudio"
1976 t_model="m5"
1979 32|iaudio7)
1980 target_id=32
1981 modelname="iaudio7"
1982 target="IAUDIO_7"
1983 memory=16 # always
1984 arm946cc
1985 tool="$rootdir/tools/scramble -add=i7"
1986 boottool="$rootdir/tools/scramble -tcc=crc"
1987 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1988 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1989 output="rockbox.iaudio"
1990 appextra="recorder:gui:radio"
1991 plugins="yes"
1992 swcodec="yes"
1993 bootoutput="I7_FW.BIN"
1994 # toolset is the tools within the tools directory that we build for
1995 # this particular target.
1996 toolset="$tccbitmaptools"
1997 # architecture, manufacturer and model for the target-tree build
1998 t_cpu="arm"
1999 t_manufacturer="tcc77x"
2000 t_model="iaudio7"
2003 33|cowond2)
2004 target_id=34
2005 modelname="cowond2"
2006 target="COWON_D2"
2007 memory=32
2008 arm926ejscc
2009 tool="$rootdir/tools/scramble -add=d2"
2010 boottool="cp "
2011 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2012 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2013 output="rockbox.d2"
2014 bootoutput="bootloader-cowond2.bin"
2015 appextra="recorder:gui:radio"
2016 plugins="yes"
2017 swcodec="yes"
2018 toolset="$tccbitmaptools"
2019 # architecture, manufacturer and model for the target-tree build
2020 t_cpu="arm"
2021 t_manufacturer="tcc780x"
2022 t_model="cowond2"
2025 34|iaudiom3)
2026 target_id=37
2027 modelname="iaudiom3"
2028 target="IAUDIO_M3"
2029 memory=16 # always
2030 coldfirecc
2031 tool="$rootdir/tools/scramble -add=iam3"
2032 boottool="$rootdir/tools/scramble -iaudiom3"
2033 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2034 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2035 output="rockbox.iaudio"
2036 bootoutput="cowon_m3.bin"
2037 appextra="recorder:gui:radio"
2038 plugins="yes"
2039 swcodec="yes"
2040 # toolset is the tools within the tools directory that we build for
2041 # this particular target.
2042 toolset="$iaudiobitmaptools"
2043 # architecture, manufacturer and model for the target-tree build
2044 t_cpu="coldfire"
2045 t_manufacturer="iaudio"
2046 t_model="m3"
2049 40|gigabeatfx)
2050 target_id=20
2051 modelname="gigabeatfx"
2052 target="GIGABEAT_F"
2053 memory=32 # always
2054 arm9tdmicc
2055 tool="$rootdir/tools/scramble -add=giga"
2056 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2057 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2058 output="rockbox.gigabeat"
2059 appextra="recorder:gui:radio"
2060 plugins="yes"
2061 swcodec="yes"
2062 toolset=$gigabeatbitmaptools
2063 boottool="$rootdir/tools/scramble -gigabeat"
2064 bootoutput="FWIMG01.DAT"
2065 # architecture, manufacturer and model for the target-tree build
2066 t_cpu="arm"
2067 t_manufacturer="s3c2440"
2068 t_model="gigabeat-fx"
2071 41|gigabeats)
2072 target_id=26
2073 modelname="gigabeats"
2074 target="GIGABEAT_S"
2075 memory=64
2076 arm1136jfscc
2077 tool="$rootdir/tools/scramble -add=gigs"
2078 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2079 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2080 output="rockbox.gigabeat"
2081 appextra="recorder:gui:radio"
2082 plugins="yes"
2083 swcodec="yes"
2084 toolset="$gigabeatbitmaptools"
2085 boottool="$rootdir/tools/scramble -gigabeats"
2086 bootoutput="nk.bin"
2087 # architecture, manufacturer and model for the target-tree build
2088 t_cpu="arm"
2089 t_manufacturer="imx31"
2090 t_model="gigabeat-s"
2093 70|mrobe500)
2094 target_id=36
2095 modelname="mrobe500"
2096 target="MROBE_500"
2097 memory=64 # always
2098 arm926ejscc
2099 tool="$rootdir/tools/scramble -add=m500"
2100 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2101 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
2102 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2103 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2104 output="rockbox.mrobe500"
2105 appextra="recorder:gui:radio"
2106 plugins="yes"
2107 swcodec="yes"
2108 toolset=$gigabeatbitmaptools
2109 boottool="cp "
2110 bootoutput="rockbox.mrboot"
2111 # architecture, manufacturer and model for the target-tree build
2112 t_cpu="arm"
2113 t_manufacturer="tms320dm320"
2114 t_model="mrobe-500"
2117 71|mrobe100)
2118 target_id=33
2119 modelname="mrobe100"
2120 target="MROBE_100"
2121 memory=32 # always
2122 arm7tdmicc
2123 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2124 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2125 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2126 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2127 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2128 output="rockbox.mi4"
2129 appextra="recorder:gui:radio"
2130 plugins="yes"
2131 swcodec="yes"
2132 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2133 bootoutput="pp5020.mi4"
2134 # toolset is the tools within the tools directory that we build for
2135 # this particular target.
2136 toolset=$scramblebitmaptools
2137 # architecture, manufacturer and model for the target-tree build
2138 t_cpu="arm"
2139 t_soc="pp"
2140 t_manufacturer="olympus"
2141 t_model="mrobe-100"
2144 80|logikdax)
2145 target_id=31
2146 modelname="logikdax"
2147 target="LOGIK_DAX"
2148 memory=2 # always
2149 arm946cc
2150 tool="$rootdir/tools/scramble -add=ldax"
2151 boottool="$rootdir/tools/scramble -tcc=crc"
2152 bootoutput="player.rom"
2153 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2154 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2155 output="rockbox.logik"
2156 appextra="recorder:gui:radio"
2157 plugins=""
2158 swcodec="yes"
2159 # toolset is the tools within the tools directory that we build for
2160 # this particular target.
2161 toolset=$tccbitmaptools
2162 # architecture, manufacturer and model for the target-tree build
2163 t_cpu="arm"
2164 t_manufacturer="tcc77x"
2165 t_model="logikdax"
2168 90|zenvisionm30gb)
2169 target_id=35
2170 modelname="zenvisionm30gb"
2171 target="CREATIVE_ZVM"
2172 memory=64
2173 arm926ejscc
2174 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2175 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2176 tool="$rootdir/tools/scramble -creative=zvm"
2177 USE_ELF="yes"
2178 output="rockbox.zvm"
2179 appextra="recorder:gui:radio"
2180 plugins="yes"
2181 swcodec="yes"
2182 toolset=$ipodbitmaptools
2183 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
2184 bootoutput="rockbox.zvmboot"
2185 # architecture, manufacturer and model for the target-tree build
2186 t_cpu="arm"
2187 t_manufacturer="tms320dm320"
2188 t_model="creative-zvm"
2191 91|zenvisionm60gb)
2192 target_id=40
2193 modelname="zenvisionm60gb"
2194 target="CREATIVE_ZVM60GB"
2195 memory=64
2196 arm926ejscc
2197 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2198 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2199 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2200 USE_ELF="yes"
2201 output="rockbox.zvm60"
2202 appextra="recorder:gui:radio"
2203 plugins="yes"
2204 swcodec="yes"
2205 toolset=$ipodbitmaptools
2206 boottool="$rootdir/tools/scramble -creative=zvm60"
2207 bootoutput="rockbox.zvm60boot"
2208 # architecture, manufacturer and model for the target-tree build
2209 t_cpu="arm"
2210 t_manufacturer="tms320dm320"
2211 t_model="creative-zvm"
2214 92|zenvision)
2215 target_id=39
2216 modelname="zenvision"
2217 target="CREATIVE_ZV"
2218 memory=64
2219 arm926ejscc
2220 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2221 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2222 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2223 USE_ELF="yes"
2224 output="rockbox.zv"
2225 appextra="recorder:gui:radio"
2226 plugins=""
2227 swcodec="yes"
2228 toolset=$ipodbitmaptools
2229 boottool="$rootdir/tools/scramble -creative=zenvision"
2230 bootoutput="rockbox.zvboot"
2231 # architecture, manufacturer and model for the target-tree build
2232 t_cpu="arm"
2233 t_manufacturer="tms320dm320"
2234 t_model="creative-zvm"
2237 50|sansae200)
2238 target_id=23
2239 modelname="sansae200"
2240 target="SANSA_E200"
2241 memory=32 # supposedly
2242 arm7tdmicc
2243 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2244 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2245 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2246 output="rockbox.mi4"
2247 appextra="recorder:gui:radio"
2248 plugins="yes"
2249 swcodec="yes"
2250 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2251 bootoutput="PP5022.mi4"
2252 # toolset is the tools within the tools directory that we build for
2253 # this particular target.
2254 toolset=$scramblebitmaptools
2255 # architecture, manufacturer and model for the target-tree build
2256 t_cpu="arm"
2257 t_soc="pp"
2258 t_manufacturer="sandisk"
2259 t_model="sansa-e200"
2262 51|sansae200r)
2263 # the e200R model is pretty much identical to the e200, it only has a
2264 # different option to the scramble tool when building a bootloader and
2265 # makes the bootloader output file name in all lower case.
2266 target_id=27
2267 modelname="sansae200r"
2268 target="SANSA_E200"
2269 memory=32 # supposedly
2270 arm7tdmicc
2271 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2272 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2273 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2274 output="rockbox.mi4"
2275 appextra="recorder:gui:radio"
2276 plugins="yes"
2277 swcodec="yes"
2278 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2279 bootoutput="pp5022.mi4"
2280 # toolset is the tools within the tools directory that we build for
2281 # this particular target.
2282 toolset=$scramblebitmaptools
2283 # architecture, manufacturer and model for the target-tree build
2284 t_cpu="arm"
2285 t_soc="pp"
2286 t_manufacturer="sandisk"
2287 t_model="sansa-e200"
2290 52|sansac200)
2291 target_id=30
2292 modelname="sansac200"
2293 target="SANSA_C200"
2294 memory=32 # supposedly
2295 arm7tdmicc
2296 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2297 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2298 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2299 output="rockbox.mi4"
2300 appextra="recorder:gui:radio"
2301 plugins="yes"
2302 swcodec="yes"
2303 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2304 bootoutput="firmware.mi4"
2305 # toolset is the tools within the tools directory that we build for
2306 # this particular target.
2307 toolset=$scramblebitmaptools
2308 # architecture, manufacturer and model for the target-tree build
2309 t_cpu="arm"
2310 t_soc="pp"
2311 t_manufacturer="sandisk"
2312 t_model="sansa-c200"
2315 53|sansam200)
2316 target_id=48
2317 modelname="sansam200"
2318 target="SANSA_M200"
2319 memory=1 # always
2320 arm946cc
2321 tool="$rootdir/tools/scramble -add=m200"
2322 boottool="$rootdir/tools/scramble -tcc=crc"
2323 bootoutput="player.rom"
2324 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2325 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2326 output="rockbox.m200"
2327 appextra="recorder:gui:radio"
2328 plugins=""
2329 swcodec="yes"
2330 # toolset is the tools within the tools directory that we build for
2331 # this particular target.
2332 toolset=$tccbitmaptools
2333 # architecture, manufacturer and model for the target-tree build
2334 t_cpu="arm"
2335 t_manufacturer="tcc77x"
2336 t_model="m200"
2339 54|sansac100)
2340 target_id=42
2341 modelname="sansac100"
2342 target="SANSA_C100"
2343 memory=2
2344 arm946cc
2345 tool="$rootdir/tools/scramble -add=c100"
2346 boottool="$rootdir/tools/scramble -tcc=crc"
2347 bootoutput="player.rom"
2348 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2349 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2350 output="rockbox.c100"
2351 appextra="recorder:gui:radio"
2352 plugins=""
2353 swcodec="yes"
2354 # toolset is the tools within the tools directory that we build for
2355 # this particular target.
2356 toolset=$tccbitmaptools
2357 # architecture, manufacturer and model for the target-tree build
2358 t_cpu="arm"
2359 t_manufacturer="tcc77x"
2360 t_model="c100"
2363 55|sansaclip)
2364 target_id=50
2365 modelname="sansaclip"
2366 target="SANSA_CLIP"
2367 memory=2
2368 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2369 bmp2rb_native="$bmp2rb_mono"
2370 tool="$rootdir/tools/scramble -add=clip"
2371 output="rockbox.sansa"
2372 bootoutput="bootloader-clip.sansa"
2373 appextra="recorder:gui:radio"
2374 plugins="yes"
2375 swcodec="yes"
2376 toolset=$scramblebitmaptools
2377 t_cpu="arm"
2378 t_manufacturer="as3525"
2379 t_model="sansa-clip"
2380 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2381 arm9tdmicc
2382 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2386 56|sansae200v2)
2387 target_id=51
2388 modelname="sansae200v2"
2389 target="SANSA_E200V2"
2390 memory=8
2391 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2392 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2393 tool="$rootdir/tools/scramble -add=e2v2"
2394 output="rockbox.sansa"
2395 bootoutput="bootloader-e200v2.sansa"
2396 appextra="recorder:gui:radio"
2397 plugins="yes"
2398 swcodec="yes"
2399 toolset=$scramblebitmaptools
2400 t_cpu="arm"
2401 t_manufacturer="as3525"
2402 t_model="sansa-e200v2"
2403 arm9tdmicc
2407 57|sansam200v4)
2408 target_id=52
2409 modelname="sansam200v4"
2410 target="SANSA_M200V4"
2411 memory=2
2412 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2413 bmp2rb_native="$bmp2rb_mono"
2414 tool="$rootdir/tools/scramble -add=m2v4"
2415 output="rockbox.sansa"
2416 bootoutput="bootloader-m200v4.sansa"
2417 appextra="recorder:gui:radio"
2418 plugins="yes"
2419 swcodec="yes"
2420 toolset=$scramblebitmaptools
2421 t_cpu="arm"
2422 t_manufacturer="as3525"
2423 t_model="sansa-m200v4"
2424 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2425 arm9tdmicc
2426 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2430 58|sansafuze)
2431 target_id=53
2432 modelname="sansafuze"
2433 target="SANSA_FUZE"
2434 memory=8
2435 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2436 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2437 tool="$rootdir/tools/scramble -add=fuze"
2438 output="rockbox.sansa"
2439 bootoutput="bootloader-fuze.sansa"
2440 appextra="recorder:gui:radio"
2441 plugins="yes"
2442 swcodec="yes"
2443 toolset=$scramblebitmaptools
2444 t_cpu="arm"
2445 t_manufacturer="as3525"
2446 t_model="sansa-fuze"
2447 arm9tdmicc
2451 59|sansac200v2)
2452 target_id=55
2453 modelname="sansac200v2"
2454 target="SANSA_C200V2"
2455 memory=2 # as per OF diagnosis mode
2456 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2457 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2458 tool="$rootdir/tools/scramble -add=c2v2"
2459 output="rockbox.sansa"
2460 bootoutput="bootloader-c200v2.sansa"
2461 appextra="recorder:gui:radio"
2462 plugins="yes"
2463 swcodec="yes"
2464 # toolset is the tools within the tools directory that we build for
2465 # this particular target.
2466 toolset=$scramblebitmaptools
2467 # architecture, manufacturer and model for the target-tree build
2468 t_cpu="arm"
2469 t_manufacturer="as3525"
2470 t_model="sansa-c200v2"
2471 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2472 arm9tdmicc
2473 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2476 60|sansaclipv2)
2477 target_id=60
2478 modelname="sansaclipv2"
2479 target="SANSA_CLIPV2"
2480 memory=8
2481 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2482 bmp2rb_native="$bmp2rb_mono"
2483 tool="$rootdir/tools/scramble -add=clv2"
2484 output="rockbox.sansa"
2485 bootoutput="bootloader-clipv2.sansa"
2486 appextra="recorder:gui:radio"
2487 plugins="yes"
2488 swcodec="yes"
2489 toolset=$scramblebitmaptools
2490 t_cpu="arm"
2491 t_manufacturer="as3525"
2492 t_model="sansa-clipv2"
2493 arm926ejscc
2496 61|sansaview)
2497 echo "Sansa View is not yet supported!"
2498 exit 1
2499 target_id=63
2500 modelname="sansaview"
2501 target="SANSA_VIEW"
2502 memory=32
2503 arm1176jzscc
2504 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2505 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2506 output="rockbox.mi4"
2507 appextra="gui"
2508 plugins=""
2509 swcodec="yes"
2510 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2511 bootoutput="firmware.mi4"
2512 # toolset is the tools within the tools directory that we build for
2513 # this particular target.
2514 toolset=$scramblebitmaptools
2515 t_cpu="arm"
2516 t_soc="pp"
2517 t_manufacturer="sandisk"
2518 t_model="sansa-view"
2521 62|sansaclipplus)
2522 target_id=66
2523 modelname="sansaclipplus"
2524 target="SANSA_CLIPPLUS"
2525 memory=8
2526 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2527 bmp2rb_native="$bmp2rb_mono"
2528 tool="$rootdir/tools/scramble -add=cli+"
2529 output="rockbox.sansa"
2530 bootoutput="bootloader-clipplus.sansa"
2531 appextra="recorder:gui:radio"
2532 plugins="yes"
2533 swcodec="yes"
2534 toolset=$scramblebitmaptools
2535 t_cpu="arm"
2536 t_manufacturer="as3525"
2537 t_model="sansa-clipplus"
2538 arm926ejscc
2541 63|sansafuzev2)
2542 target_id=68
2543 modelname="sansafuzev2"
2544 target="SANSA_FUZEV2"
2545 memory=8 # not sure
2546 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2547 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2548 tool="$rootdir/tools/scramble -add=fuz2"
2549 output="rockbox.sansa"
2550 bootoutput="bootloader-fuzev2.sansa"
2551 appextra="recorder:gui:radio"
2552 plugins="yes"
2553 swcodec="yes"
2554 toolset=$scramblebitmaptools
2555 t_cpu="arm"
2556 t_manufacturer="as3525"
2557 t_model="sansa-fuzev2"
2558 arm926ejscc
2561 64|sansafuzeplus)
2562 target_id=80
2563 modelname="sansafuzeplus"
2564 target="SANSA_FUZEPLUS"
2565 memory=64
2566 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2567 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2568 tool="$rootdir/tools/scramble -add=fuz+"
2569 output="rockbox.sansa"
2570 bootoutput="bootloader-fuzeplus.sansa"
2571 appextra="gui:recorder:radio"
2572 plugins="yes"
2573 swcodec="yes"
2574 toolset=$scramblebitmaptools
2575 t_cpu="arm"
2576 t_manufacturer="imx233"
2577 t_model="sansa-fuzeplus"
2578 arm926ejscc
2581 65|sansaclipzip)
2582 target_id=68
2583 modelname="sansaclipzip"
2584 target="SANSA_CLIPZIP"
2585 memory=8 # not sure
2586 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2587 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2588 tool="$rootdir/tools/scramble -add=clzp"
2589 output="rockbox.sansa"
2590 bootoutput="bootloader-clipzip.sansa"
2591 appextra="recorder:gui:radio"
2592 plugins="yes"
2593 swcodec="yes"
2594 toolset=$scramblebitmaptools
2595 t_cpu="arm"
2596 t_manufacturer="as3525"
2597 t_model="sansa-clipzip"
2598 arm926ejscc
2601 66|sansaconnect)
2602 target_id=81
2603 modelname="sansaconnect"
2604 target="SANSA_CONNECT"
2605 memory=64
2606 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2607 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2608 tool="$rootdir/tools/scramble -add=conn"
2609 output="rockbox.sansa"
2610 bootoutput="bootloader-connect.sansa"
2611 appextra="recorder:gui"
2612 plugins="yes"
2613 swcodec="yes"
2614 toolset=$scramblebitmaptools
2615 t_cpu="arm"
2616 t_manufacturer="tms320dm320"
2617 t_model="sansa-connect"
2618 arm926ejscc
2621 150|tatungtpj1022)
2622 target_id=25
2623 modelname="tatungtpj1022"
2624 target="TATUNG_TPJ1022"
2625 memory=32 # always
2626 arm7tdmicc
2627 tool="$rootdir/tools/scramble -add tpj2"
2628 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2629 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2630 output="rockbox.elio"
2631 appextra="recorder:gui:radio"
2632 plugins="yes"
2633 swcodec="yes"
2634 boottool="$rootdir/tools/scramble -mi4v2"
2635 bootoutput="pp5020.mi4"
2636 # toolset is the tools within the tools directory that we build for
2637 # this particular target.
2638 toolset=$scramblebitmaptools
2639 # architecture, manufacturer and model for the target-tree build
2640 t_cpu="arm"
2641 t_soc="pp"
2642 t_manufacturer="tatung"
2643 t_model="tpj1022"
2646 100|gogearsa9200)
2647 target_id=41
2648 modelname="gogearsa9200"
2649 target="PHILIPS_SA9200"
2650 memory=32 # supposedly
2651 arm7tdmicc
2652 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2653 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2654 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2655 output="rockbox.mi4"
2656 appextra="recorder:gui:radio"
2657 plugins="yes"
2658 swcodec="yes"
2659 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2660 bootoutput="FWImage.ebn"
2661 # toolset is the tools within the tools directory that we build for
2662 # this particular target.
2663 toolset=$scramblebitmaptools
2664 # architecture, manufacturer and model for the target-tree build
2665 t_cpu="arm"
2666 t_soc="pp"
2667 t_manufacturer="philips"
2668 t_model="sa9200"
2671 101|gogearhdd1630)
2672 target_id=43
2673 modelname="gogearhdd1630"
2674 target="PHILIPS_HDD1630"
2675 memory=32 # supposedly
2676 arm7tdmicc
2677 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2678 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2679 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2680 output="rockbox.mi4"
2681 appextra="recorder:gui:radio"
2682 plugins="yes"
2683 swcodec="yes"
2684 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2685 bootoutput="FWImage.ebn"
2686 # toolset is the tools within the tools directory that we build for
2687 # this particular target.
2688 toolset=$scramblebitmaptools
2689 # architecture, manufacturer and model for the target-tree build
2690 t_cpu="arm"
2691 t_soc="pp"
2692 t_manufacturer="philips"
2693 t_model="hdd1630"
2696 102|gogearhdd6330)
2697 target_id=65
2698 modelname="gogearhdd6330"
2699 target="PHILIPS_HDD6330"
2700 memory=64 # always
2701 arm7tdmicc
2702 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2703 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2704 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2705 output="rockbox.mi4"
2706 appextra="recorder:gui:radio"
2707 plugins="yes"
2708 swcodec="yes"
2709 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2710 bootoutput="FWImage.ebn"
2711 # toolset is the tools within the tools directory that we build for
2712 # this particular target.
2713 toolset=$scramblebitmaptools
2714 # architecture, manufacturer and model for the target-tree build
2715 t_cpu="arm"
2716 t_soc="pp"
2717 t_manufacturer="philips"
2718 t_model="hdd6330"
2721 110|meizum6sl)
2722 target_id=49
2723 modelname="meizum6sl"
2724 target="MEIZU_M6SL"
2725 memory=16 # always
2726 arm940tbecc
2727 tool="cp"
2728 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2729 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2730 output="rockbox.meizu"
2731 appextra="recorder:gui:radio"
2732 plugins="no" #FIXME
2733 swcodec="yes"
2734 toolset=$genericbitmaptools
2735 boottool="cp"
2736 bootoutput="rockboot.ebn"
2737 # architecture, manufacturer and model for the target-tree build
2738 t_cpu="arm"
2739 t_manufacturer="s5l8700"
2740 t_model="meizu-m6sl"
2743 111|meizum6sp)
2744 target_id=46
2745 modelname="meizum6sp"
2746 target="MEIZU_M6SP"
2747 memory=16 # always
2748 arm940tbecc
2749 tool="cp"
2750 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2751 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2752 output="rockbox.meizu"
2753 appextra="recorder:gui:radio"
2754 plugins="no" #FIXME
2755 swcodec="yes"
2756 toolset=$genericbitmaptools
2757 boottool="cp"
2758 bootoutput="rockboot.ebn"
2759 # architecture, manufacturer and model for the target-tree build
2760 t_cpu="arm"
2761 t_manufacturer="s5l8700"
2762 t_model="meizu-m6sp"
2765 112|meizum3)
2766 target_id=47
2767 modelname="meizum3"
2768 target="MEIZU_M3"
2769 memory=16 # always
2770 arm940tbecc
2771 tool="cp"
2772 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2773 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2774 output="rockbox.meizu"
2775 appextra="recorder:gui:radio"
2776 plugins="no" #FIXME
2777 swcodec="yes"
2778 toolset=$genericbitmaptools
2779 boottool="cp"
2780 bootoutput="rockboot.ebn"
2781 # architecture, manufacturer and model for the target-tree build
2782 t_cpu="arm"
2783 t_manufacturer="s5l8700"
2784 t_model="meizu-m3"
2787 120|ondavx747)
2788 target_id=45
2789 modelname="ondavx747"
2790 target="ONDA_VX747"
2791 memory=16
2792 mipselcc
2793 tool="$rootdir/tools/scramble -add=x747"
2794 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2795 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2796 output="rockbox.vx747"
2797 appextra="recorder:gui:radio"
2798 plugins="yes"
2799 swcodec="yes"
2800 toolset=$genericbitmaptools
2801 boottool="$rootdir/tools/scramble -ccpmp"
2802 bootoutput="ccpmp.bin"
2803 # architecture, manufacturer and model for the target-tree build
2804 t_cpu="mips"
2805 t_manufacturer="ingenic_jz47xx"
2806 t_model="onda_vx747"
2809 121|ondavx767)
2810 target_id=64
2811 modelname="ondavx767"
2812 target="ONDA_VX767"
2813 memory=16 #FIXME
2814 mipselcc
2815 tool="cp"
2816 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2817 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2818 output="rockbox.vx767"
2819 appextra="recorder:gui:radio"
2820 plugins="" #FIXME
2821 swcodec="yes"
2822 toolset=$genericbitmaptools
2823 boottool="$rootdir/tools/scramble -ccpmp"
2824 bootoutput="ccpmp.bin"
2825 # architecture, manufacturer and model for the target-tree build
2826 t_cpu="mips"
2827 t_manufacturer="ingenic_jz47xx"
2828 t_model="onda_vx767"
2831 122|ondavx747p)
2832 target_id=54
2833 modelname="ondavx747p"
2834 target="ONDA_VX747P"
2835 memory=16
2836 mipselcc
2837 tool="$rootdir/tools/scramble -add=747p"
2838 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2839 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2840 output="rockbox.vx747p"
2841 appextra="recorder:gui:radio"
2842 plugins="yes"
2843 swcodec="yes"
2844 toolset=$genericbitmaptools
2845 boottool="$rootdir/tools/scramble -ccpmp"
2846 bootoutput="ccpmp.bin"
2847 # architecture, manufacturer and model for the target-tree build
2848 t_cpu="mips"
2849 t_manufacturer="ingenic_jz47xx"
2850 t_model="onda_vx747"
2853 123|ondavx777)
2854 target_id=61
2855 modelname="ondavx777"
2856 target="ONDA_VX777"
2857 memory=16
2858 mipselcc
2859 tool="$rootdir/tools/scramble -add=x777"
2860 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2861 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2862 output="rockbox.vx777"
2863 appextra="recorder:gui:radio"
2864 plugins="yes"
2865 swcodec="yes"
2866 toolset=$genericbitmaptools
2867 boottool="$rootdir/tools/scramble -ccpmp"
2868 bootoutput="ccpmp.bin"
2869 # architecture, manufacturer and model for the target-tree build
2870 t_cpu="mips"
2871 t_manufacturer="ingenic_jz47xx"
2872 t_model="onda_vx747"
2875 130|lyreproto1)
2876 target_id=56
2877 modelname="lyreproto1"
2878 target="LYRE_PROTO1"
2879 memory=64
2880 arm926ejscc
2881 tool="cp"
2882 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2883 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2884 output="rockbox.lyre"
2885 appextra="recorder:gui:radio"
2886 plugins=""
2887 swcodec="yes"
2888 toolset=$scramblebitmaptools
2889 boottool="cp"
2890 bootoutput="bootloader-proto1.lyre"
2891 # architecture, manufacturer and model for the target-tree build
2892 t_cpu="arm"
2893 t_manufacturer="at91sam"
2894 t_model="lyre_proto1"
2897 131|mini2440)
2898 target_id=99
2899 modelname="mini2440"
2900 target="MINI2440"
2901 memory=64
2902 arm9tdmicc
2903 tool="$rootdir/tools/scramble -add=m244"
2904 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2905 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2906 output="rockbox.mini2440"
2907 appextra="recorder:gui:radio"
2908 plugins=""
2909 swcodec="yes"
2910 toolset=$scramblebitmaptools
2911 boottool="cp"
2912 bootoutput="bootloader-mini2440.lyre"
2913 # architecture, manufacturer and model for the target-tree build
2914 t_cpu="arm"
2915 t_manufacturer="s3c2440"
2916 t_model="mini2440"
2919 140|samsungyh820)
2920 target_id=57
2921 modelname="samsungyh820"
2922 target="SAMSUNG_YH820"
2923 memory=32 # always
2924 arm7tdmicc
2925 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2926 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2927 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2928 output="rockbox.mi4"
2929 appextra="recorder:gui:radio"
2930 plugins="yes"
2931 swcodec="yes"
2932 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2933 bootoutput="FW_YH820.mi4"
2934 # toolset is the tools within the tools directory that we build for
2935 # this particular target.
2936 toolset=$scramblebitmaptools
2937 # architecture, manufacturer and model for the target-tree build
2938 t_cpu="arm"
2939 t_soc="pp"
2940 t_manufacturer="samsung"
2941 t_model="yh820"
2944 141|samsungyh920)
2945 target_id=58
2946 modelname="samsungyh920"
2947 target="SAMSUNG_YH920"
2948 memory=32 # always
2949 arm7tdmicc
2950 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2951 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2952 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2953 output="rockbox.mi4"
2954 appextra="recorder:gui:radio"
2955 plugins="yes"
2956 swcodec="yes"
2957 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2958 bootoutput="PP5020.mi4"
2959 # toolset is the tools within the tools directory that we build for
2960 # this particular target.
2961 toolset=$scramblebitmaptools
2962 # architecture, manufacturer and model for the target-tree build
2963 t_cpu="arm"
2964 t_soc="pp"
2965 t_manufacturer="samsung"
2966 t_model="yh920"
2969 142|samsungyh925)
2970 target_id=59
2971 modelname="samsungyh925"
2972 target="SAMSUNG_YH925"
2973 memory=32 # always
2974 arm7tdmicc
2975 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2976 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2977 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2978 output="rockbox.mi4"
2979 appextra="recorder:gui:radio"
2980 plugins="yes"
2981 swcodec="yes"
2982 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2983 bootoutput="FW_YH925.mi4"
2984 # toolset is the tools within the tools directory that we build for
2985 # this particular target.
2986 toolset=$scramblebitmaptools
2987 # architecture, manufacturer and model for the target-tree build
2988 t_cpu="arm"
2989 t_soc="pp"
2990 t_manufacturer="samsung"
2991 t_model="yh925"
2994 143|samsungyps3)
2995 target_id=72
2996 modelname="samsungyps3"
2997 target="SAMSUNG_YPS3"
2998 memory=16 # always
2999 arm940tbecc
3000 tool="cp"
3001 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3002 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3003 output="rockbox.yps3"
3004 appextra="recorder:gui:radio"
3005 plugins="no" #FIXME
3006 swcodec="yes"
3007 toolset=$genericbitmaptools
3008 boottool="cp"
3009 bootoutput="rockboot.ebn"
3010 # architecture, manufacturer and model for the target-tree build
3011 t_cpu="arm"
3012 t_manufacturer="s5l8700"
3013 t_model="yps3"
3016 160|vibe500)
3017 target_id=67
3018 modelname="vibe500"
3019 target="PBELL_VIBE500"
3020 memory=32 # always
3021 arm7tdmicc
3022 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
3023 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3024 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
3025 output="rockbox.mi4"
3026 appextra="recorder:gui:radio"
3027 plugins="yes"
3028 swcodec="yes"
3029 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
3030 bootoutput="jukebox.mi4"
3031 # toolset is the tools within the tools directory that we build for
3032 # this particular target.
3033 toolset=$scramblebitmaptools
3034 # architecture, manufacturer and model for the target-tree build
3035 t_cpu="arm"
3036 t_soc="pp"
3037 t_manufacturer="pbell"
3038 t_model="vibe500"
3041 170|mpiohd200)
3042 target_id=69
3043 modelname="mpiohd200"
3044 target="MPIO_HD200"
3045 memory=16 # always
3046 coldfirecc
3047 tool="$rootdir/tools/scramble -add=hd20"
3048 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3049 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
3050 output="rockbox.mpio"
3051 bootoutput="bootloader.mpio"
3052 appextra="recorder:gui:radio"
3053 plugins="yes"
3054 swcodec="yes"
3055 # toolset is the tools within the tools directory that we build for
3056 # this particular target.
3057 toolset="$genericbitmaptools"
3058 # architecture, manufacturer and model for the target-tree build
3059 t_cpu="coldfire"
3060 t_manufacturer="mpio"
3061 t_model="hd200"
3064 171|mpiohd300)
3065 target_id=70
3066 modelname="mpiohd300"
3067 target="MPIO_HD300"
3068 memory=16 # always
3069 coldfirecc
3070 tool="$rootdir/tools/scramble -add=hd30"
3071 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3072 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
3073 output="rockbox.mpio"
3074 bootoutput="bootloader.mpio"
3075 appextra="recorder:gui:radio"
3076 plugins="yes"
3077 swcodec="yes"
3078 # toolset is the tools within the tools directory that we build for
3079 # this particular target.
3080 toolset="$genericbitmaptools"
3081 # architecture, manufacturer and model for the target-tree build
3082 t_cpu="coldfire"
3083 t_manufacturer="mpio"
3084 t_model="hd300"
3087 180|rk27generic)
3088 target_id=78
3089 modelname="rk27generic"
3090 target="RK27_GENERIC"
3091 memory=16 # always
3092 arm7ejscc
3093 tool="$rootdir/tools/scramble -rkw -modelnum=73"
3094 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3095 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3096 output="rockbox.rkw"
3097 bootoutput="bootloader.rkw"
3098 appextra="recorder:gui:radio"
3099 plugins="yes"
3100 swcodec="yes"
3101 # toolset is the tools within the tools directory that we build for
3102 # this particular target.
3103 toolset="$genericbitmaptools"
3104 # architecture, manufacturer and model for the target-tree build
3105 t_cpu="arm"
3106 t_manufacturer="rk27xx"
3107 t_model="rk27generic"
3110 190|hifimanhm60x)
3111 target_id=79
3112 modelname="hifimanhm60x"
3113 target="HM60X"
3114 memory=16
3115 arm7ejscc
3116 tool="$rootdir/tools/scramble -rkw -modelnum=79"
3117 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3118 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3119 output="rockbox.rkw"
3120 bootoutput="bootloader.rkw"
3121 appextra="recorder:gui"
3122 plugins="yes"
3123 swcodec="yes"
3124 # toolset is the tools within the tools directory that we build for
3125 # this particular target.
3126 toolset="$genericbitmaptools"
3127 # architecture, manufacturer and model for the target-tree build
3128 t_cpu="arm"
3129 t_manufacturer="rk27xx"
3130 t_model="hm60x"
3133 191|hifimanhm801)
3134 target_id=82
3135 modelname="hifimanhm801"
3136 target="HM801"
3137 memory=16
3138 arm7ejscc
3139 tool="$rootdir/tools/scramble -rkw -modelnum=82"
3140 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3141 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3142 output="rockbox.rkw"
3143 bootoutput="bootloader.rkw"
3144 appextra="recorder:gui"
3145 plugins="yes"
3146 swcodec="yes"
3147 # toolset is the tools within the tools directory that we build for
3148 # this particular target.
3149 toolset="$genericbitmaptools"
3150 # architecture, manufacturer and model for the target-tree build
3151 t_cpu="arm"
3152 t_manufacturer="rk27xx"
3153 t_model="hm801"
3156 200|sdlapp)
3157 application="yes"
3158 target_id=73
3159 modelname="sdlapp"
3160 target="SDLAPP"
3161 app_set_paths
3162 app_set_lcd_size
3163 memory=8
3164 uname=`uname`
3165 simcc "sdl-app"
3166 tool="cp "
3167 boottool="cp "
3168 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3169 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3170 output="rockbox"
3171 bootoutput="rockbox"
3172 appextra="recorder:gui:radio"
3173 plugins="yes"
3174 swcodec="yes"
3175 # architecture, manufacturer and model for the target-tree build
3176 t_cpu="hosted"
3177 t_manufacturer="sdl"
3178 t_model="app"
3181 201|android)
3182 application="yes"
3183 target_id=74
3184 modelname="android"
3185 target="ANDROID"
3186 app_type="android"
3187 app_set_lcd_size
3188 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
3189 bindir="/data/data/org.rockbox/lib"
3190 libdir="/data/data/org.rockbox/app_rockbox"
3191 memory=8
3192 uname=`uname`
3193 androidcc
3194 tool="cp "
3195 boottool="cp "
3196 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3197 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3198 output="librockbox.so"
3199 bootoutput="librockbox.so"
3200 appextra="recorder:gui:radio:hosted/android"
3201 plugins="yes"
3202 swcodec="yes"
3203 # architecture, manufacturer and model for the target-tree build
3204 t_cpu="hosted"
3205 t_manufacturer="android"
3206 t_model="app"
3209 202|nokian8xx)
3210 application="yes"
3211 target_id=75
3212 modelname="nokian8xx"
3213 app_type="sdl-app"
3214 target="NOKIAN8XX"
3215 sharedir="/opt/rockbox/share/rockbox"
3216 bindir="/opt/rockbox/bin"
3217 libdir="/opt/rockbox/lib"
3218 memory=8
3219 uname=`uname`
3220 maemocc 4
3221 tool="cp "
3222 boottool="cp "
3223 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3224 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3225 output="rockbox"
3226 bootoutput="rockbox"
3227 appextra="recorder:gui:radio"
3228 plugins="yes"
3229 swcodec="yes"
3230 # architecture, manufacturer and model for the target-tree build
3231 t_cpu="hosted"
3232 t_manufacturer="maemo"
3233 t_model="app"
3236 203|nokian900)
3237 application="yes"
3238 target_id=76
3239 modelname="nokian900"
3240 app_type="sdl-app"
3241 target="NOKIAN900"
3242 sharedir="/opt/rockbox/share/rockbox"
3243 bindir="/opt/rockbox/bin"
3244 libdir="/opt/rockbox/lib"
3245 memory=8
3246 uname=`uname`
3247 maemocc 5
3248 tool="cp "
3249 boottool="cp "
3250 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3251 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3252 output="rockbox"
3253 bootoutput="rockbox"
3254 appextra="recorder:gui:radio"
3255 plugins="yes"
3256 swcodec="yes"
3257 # architecture, manufacturer and model for the target-tree build
3258 t_cpu="hosted"
3259 t_manufacturer="maemo"
3260 t_model="app"
3263 204|pandora)
3264 application="yes"
3265 target_id=77
3266 modelname="pandora"
3267 app_type="sdl-app"
3268 target="PANDORA"
3269 sharedir="rockbox/share/rockbox"
3270 bindir="rockbox/bin"
3271 libdir="rockbox/lib"
3272 memory=8
3273 uname=`uname`
3274 pandoracc
3275 tool="cp "
3276 boottool="cp "
3277 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3278 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3279 output="rockbox"
3280 bootoutput="rockbox"
3281 appextra="recorder:gui:radio"
3282 plugins="yes"
3283 swcodec="yes"
3284 # architecture, manufacturer and model for the target-tree build
3285 t_cpu="hosted"
3286 t_manufacturer="pandora"
3287 t_model="app"
3290 205|samsungypr0)
3291 application="yes"
3292 target_id=78
3293 modelname="samsungypr0"
3294 target="SAMSUNG_YPR0"
3295 memory=32
3296 uname=`uname`
3297 ypr0cc
3298 tool="cp "
3299 boottool="cp "
3300 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3301 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3302 output="rockbox"
3303 bootoutput="rockbox"
3304 appextra="recorder:gui:radio"
3305 plugins="yes"
3306 swcodec="yes"
3307 # architecture, manufacturer and model for the target-tree build
3308 t_cpu="hosted"
3309 t_manufacturer="ypr0"
3310 t_model="app"
3314 echo "Please select a supported target platform!"
3315 exit 7
3318 esac
3320 echo "Platform set to $modelname"
3323 #remove start
3324 ############################################################################
3325 # Amount of memory, for those that can differ. They have $memory unset at
3326 # this point.
3329 if [ -z "$memory" ]; then
3330 case $target_id in
3332 if [ "$ARG_RAM" ]; then
3333 size=$ARG_RAM
3334 else
3335 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3336 size=`input`;
3338 case $size in
3339 60|64)
3340 memory="64"
3343 memory="32"
3345 esac
3348 if [ "$ARG_RAM" ]; then
3349 size=$ARG_RAM
3350 else
3351 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3352 size=`input`;
3354 case $size in
3356 memory="8"
3359 memory="2"
3361 esac
3363 esac
3364 echo "Memory size selected: $memory MB"
3365 [ "$ARG_TYPE" ] || echo ""
3367 #remove end
3369 ##################################################################
3370 # Figure out build "type"
3373 # the ifp7x0 is the only platform that supports building a gdb stub like
3374 # this
3375 case $modelname in
3376 iriverifp7xx)
3377 gdbstub=", (G)DB stub"
3379 sansae200r|sansae200)
3380 gdbstub=", (I)nstaller"
3382 sansac200)
3383 gdbstub=", (E)raser"
3385 sansae200)
3386 gdbstub=", (E)raser"
3390 esac
3391 if [ "$ARG_TYPE" ]; then
3392 btype=$ARG_TYPE
3393 else
3394 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (W)arble codec tool$gdbstub: (Defaults to N)"
3395 btype=`input`;
3398 case $btype in
3399 [Ii])
3400 appsdir='$(ROOTDIR)/bootloader'
3401 apps="bootloader"
3402 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3403 bootloader="1"
3404 echo "e200R-installer build selected"
3406 [Ee])
3407 appsdir='$(ROOTDIR)/bootloader'
3408 apps="bootloader"
3409 extradefines="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3410 bootloader="1"
3411 echo "sansa eraser build selected"
3413 [Bb])
3414 if test $t_manufacturer = "archos"; then
3415 # Archos SH-based players do this somewhat differently for
3416 # some reason
3417 appsdir='$(ROOTDIR)/flash/bootbox'
3418 apps="bootbox"
3419 else
3420 appsdir='$(ROOTDIR)/bootloader'
3421 apps="bootloader"
3422 flash=""
3423 if test -n "$boottool"; then
3424 tool="$boottool"
3426 if test -n "$bootoutput"; then
3427 output=$bootoutput
3430 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3431 bootloader="1"
3432 echo "Bootloader build selected"
3434 [Ss])
3435 if [ "$modelname" = "sansae200r" ]; then
3436 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3437 exit 8
3439 debug="-DDEBUG"
3440 simulator="yes"
3441 extradefines="$extradefines -DSIMULATOR"
3442 archosrom=""
3443 flash=""
3444 echo "Simulator build selected"
3446 [Aa]*)
3447 echo "Advanced build selected"
3448 whichadvanced $btype
3450 [Gg])
3451 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3452 appsdir='$(ROOTDIR)/gdb'
3453 apps="stub"
3454 case $modelname in
3455 iriverifp7xx)
3456 output="stub.wma"
3460 esac
3461 echo "GDB stub build selected"
3463 [Cc])
3464 uname=`uname`
3465 simcc "checkwps"
3466 toolset='';
3467 t_cpu='';
3468 GCCOPTS='';
3469 extradefines="$extradefines -DDEBUG"
3470 appsdir='$(ROOTDIR)/tools/checkwps';
3471 output='checkwps.'${modelname};
3472 archosrom='';
3473 echo "CheckWPS build selected"
3475 [Dd])
3476 uname=`uname`
3477 simcc "database"
3478 toolset='';
3479 t_cpu='';
3480 GCCOPTS='';
3481 appsdir='$(ROOTDIR)/tools/database';
3482 archosrom='';
3484 case $uname in
3485 CYGWIN*|MINGW*)
3486 output="database_${modelname}.exe"
3489 output='database.'${modelname};
3491 esac
3493 echo "Database tool build selected"
3495 [Ww])
3496 uname=`uname`
3497 simcc "warble"
3498 toolset='';
3499 t_cpu='';
3500 GCCOPTS='';
3501 extradefines="$extradefines -DDEBUG"
3502 output='warble.'${modelname};
3503 archosrom='';
3504 echo "Warble build selected"
3507 if [ "$modelname" = "sansae200r" ]; then
3508 echo "Do not use the e200R target for regular builds. Use e200 instead."
3509 exit 8
3511 debug=""
3512 btype="N" # set it explicitly since RET only gets here as well
3513 echo "Normal build selected"
3516 esac
3517 # to be able running "make manual" from non-manual configuration
3518 case $modelname in
3519 archosrecorderv2)
3520 manualdev="archosfmrecorder"
3522 iriverh1??)
3523 manualdev="iriverh100"
3525 ipodmini2g)
3526 manualdev="ipodmini1g"
3529 manualdev=$modelname
3531 esac
3533 if [ -z "$debug" ]; then
3534 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3537 if [ "yes" = "$application" ]; then
3538 echo Building Rockbox as an Application
3539 extradefines="$extradefines -DAPPLICATION"
3542 echo "Using source code root directory: $rootdir"
3544 # this was once possible to change at build-time, but no more:
3545 language="english"
3547 uname=`uname`
3549 if [ "yes" = "$simulator" ]; then
3550 # setup compiler and things for simulator
3551 simcc "sdl-sim"
3553 if [ -d "simdisk" ]; then
3554 echo "Subdirectory 'simdisk' already present"
3555 else
3556 mkdir simdisk
3557 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3561 # Now, figure out version number of the (gcc) compiler we are about to use
3562 gccver=`$CC -dumpversion`;
3564 # figure out the binutil version too and display it, mostly for the build
3565 # system etc to be able to see it easier
3566 if [ $uname = "Darwin" ]; then
3567 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3568 else
3569 ldver=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
3572 if [ -z "$gccver" ]; then
3573 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3574 echo "[WARNING] this may cause your build to fail since we cannot do the"
3575 echo "[WARNING] checks we want now."
3576 else
3578 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3579 # DEPEND on it
3581 num1=`echo $gccver | cut -d . -f1`
3582 num2=`echo $gccver | cut -d . -f2`
3583 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3585 # This makes:
3586 # 3.3.X => 303
3587 # 3.4.X => 304
3588 # 2.95.3 => 295
3590 echo "Using $CC $gccver ($gccnum)"
3592 if test "$gccnum" -ge "400"; then
3593 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3594 # so we ignore that warnings for now
3595 # -Wno-pointer-sign
3596 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3599 if test "$gccnum" -ge "402"; then
3600 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3601 # and later would throw it for several valid cases
3602 GCCOPTS="$GCCOPTS -Wno-override-init"
3605 case $prefix in
3606 ""|"$CROSS_COMPILE")
3607 # simulator
3610 # Verify that the cross-compiler is of a recommended version!
3611 if test "$gccver" != "$gccchoice"; then
3612 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3613 echo "WARNING: version $gccchoice!"
3614 echo "WARNING: This may cause your build to fail since it may be a version"
3615 echo "WARNING: that isn't functional or known to not be the best choice."
3616 echo "WARNING: If you suffer from build problems, you know that this is"
3617 echo "WARNING: a likely source for them..."
3620 esac
3625 echo "Using $LD $ldver"
3627 # check the compiler for SH platforms
3628 if test "$CC" = "sh-elf-gcc"; then
3629 if test "$gccnum" -lt "400"; then
3630 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3631 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3632 else
3633 # figure out patch status
3634 gccpatch=`$CC --version`;
3636 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3637 echo "gcc $gccver is rockbox patched"
3638 # then convert -O to -Os to get smaller binaries!
3639 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3640 else
3641 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3642 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3647 if test "$CC" = "m68k-elf-gcc"; then
3648 # convert -O to -Os to get smaller binaries!
3649 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3652 if [ "$ARG_CCACHE" = "1" ]; then
3653 echo "Enable ccache for building"
3654 ccache="ccache"
3655 elif [ "$ARG_CCACHE" != "0" ]; then
3656 ccache=`findtool ccache`
3657 if test -n "$ccache"; then
3658 echo "Found and uses ccache ($ccache)"
3662 # figure out the full path to the various commands if possible
3663 HOSTCC=`findtool gcc --lit`
3664 HOSTAR=`findtool ar --lit`
3665 CC=`findtool ${CC} --lit`
3666 CPP=`findtool ${CPP} --lit`
3667 LD=`findtool ${LD} --lit`
3668 AR=`findtool ${AR} --lit`
3669 AS=`findtool ${AS} --lit`
3670 OC=`findtool ${OC} --lit`
3671 WINDRES=`findtool ${WINDRES} --lit`
3672 DLLTOOL=`findtool ${DLLTOOL} --lit`
3673 DLLWRAP=`findtool ${DLLWRAP} --lit`
3674 RANLIB=`findtool ${RANLIB} --lit`
3677 if [ -z "$arch" ]; then
3678 cpp_defines=$(echo "" | $CPP $GCCOPTS -dD)
3679 if [ -n "$(echo $cpp_defines | grep -w __sh__)" ]; then
3680 arch="sh"
3681 elif [ -n "$(echo $cpp_defines | grep -w __m68k__)" ]; then
3682 arch="m68k"
3683 elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then
3684 arch="arm"
3685 # cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4)
3686 arch_version="$(echo $cpp_defines | sed s,\ ,\\n,g | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,')"
3687 elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
3688 arch="mips" # FIXME: autodetect version (32 or 64)
3689 elif [ -n "$(echo $cpp_defines | grep -w __i386__)" ]; then
3690 arch="x86"
3691 elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
3692 arch="amd64"
3693 else
3694 arch="none"
3695 echo "Warning: Could not determine target arch"
3697 if [ "$arch" != "none" ]; then
3698 if [ -n "$arch_version" ]; then
3699 echo "Automatically selected arch: $arch (ver $arch_version)"
3700 else
3701 echo "Automatically selected arch: $arch"
3704 else
3705 if [ -n "$arch_version" ]; then
3706 echo "Manually selected arch: $arch (ver $arch_version)"
3707 else
3708 echo "Manually selected arch: $arch"
3712 arch="arch_$arch"
3713 if [ -n "$arch_version" ]; then
3714 Darch_version="#define ARCH_VERSION $arch_version"
3717 if test -n "$ccache"; then
3718 CC="$ccache $CC"
3721 if test "$ARG_ARM_THUMB" = "1"; then
3722 extradefines="$extradefines -DUSE_THUMB"
3723 CC="$toolsdir/thumb-cc.py $CC"
3726 if test "X$endian" = "Xbig"; then
3727 defendian="ROCKBOX_BIG_ENDIAN"
3728 else
3729 defendian="ROCKBOX_LITTLE_ENDIAN"
3732 if [ "$ARG_RBDIR" != "" ]; then
3733 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3734 rbdir="/"$ARG_RBDIR
3735 else
3736 rbdir=$ARG_RBDIR
3738 echo "Using alternate rockbox dir: ${rbdir}"
3741 cat > autoconf.h <<EOF
3742 /* This header was made by configure */
3743 #ifndef __BUILD_AUTOCONF_H
3744 #define __BUILD_AUTOCONF_H
3746 /* lower case names match the what's exported in the Makefile
3747 * upper case name looks nicer in the code */
3749 #define arch_none 0
3750 #define ARCH_NONE 0
3752 #define arch_sh 1
3753 #define ARCH_SH 1
3755 #define arch_m68k 2
3756 #define ARCH_M68K 2
3758 #define arch_arm 3
3759 #define ARCH_ARM 3
3761 #define arch_mips 4
3762 #define ARCH_MIPS 4
3764 #define arch_x86 5
3765 #define ARCH_X86 5
3767 #define arch_amd64 6
3768 #define ARCH_AMD64 6
3770 /* Define target machine architecture */
3771 #define ARCH ${arch}
3772 /* Optinally define architecture version */
3773 ${Darch_version}
3775 /* Define endianess for the target or simulator platform */
3776 #define ${defendian} 1
3778 /* Define this if you build rockbox to support the logf logging and display */
3779 ${use_logf}
3781 /* Define this if you want logf to output to the serial port */
3782 ${use_logf_serial}
3784 /* Define this to record a chart with timings for the stages of boot */
3785 ${use_bootchart}
3787 /* optional define for a backlight modded Ondio */
3788 ${have_backlight}
3790 /* optional define for FM radio mod for iAudio M5 */
3791 ${have_fmradio_in}
3793 /* optional define for ATA poweroff on Player */
3794 ${have_ata_poweroff}
3796 /* optional defines for RTC mod for h1x0 */
3797 ${config_rtc}
3798 ${have_rtc_alarm}
3800 /* the threading backend we use */
3801 #define ${thread_support}
3803 /* lcd dimensions for application builds from configure */
3804 ${app_lcd_width}
3805 ${app_lcd_height}
3807 /* root of Rockbox */
3808 #define ROCKBOX_DIR "${rbdir}"
3809 #define ROCKBOX_SHARE_PATH "${sharedir}"
3810 #define ROCKBOX_BINARY_PATH "${bindir}"
3811 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3813 #endif /* __BUILD_AUTOCONF_H */
3816 if test -n "$t_cpu"; then
3817 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3819 if [ "$application" = "yes" ] && [ "$t_manufacturer" = "maemo" ]; then
3820 # Maemo needs the SDL port, too
3821 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3822 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3823 elif [ "$application" = "yes" ] && [ "$t_manufacturer" = "pandora" ]; then
3824 # Pandora needs the SDL port, too
3825 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3826 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3827 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3828 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3829 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3832 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3833 test -n "$t_soc" && TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3834 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3835 GCCOPTS="$GCCOPTS"
3838 if test "$swcodec" = "yes"; then
3839 voicetoolset="rbspeexenc voicefont wavtrim"
3840 else
3841 voicetoolset="voicefont wavtrim"
3844 if test "$apps" = "apps"; then
3845 # only when we build "real" apps we build the .lng files
3846 buildlangs="langs"
3849 #### Fix the cmdline ###
3850 if [ -n "$ARG_PREFIX" ]; then
3851 cmdline="$cmdline --prefix=\$(PREFIX)"
3853 if [ -n "$ARG_LCDWIDTH" ]; then
3854 cmdline="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3857 # remove parts from the cmdline we're going to set unconditionally
3858 cmdline=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3859 -e s,--ram=[0-9]\*,,g \
3860 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3861 -e s,--type=[a-zA-Z]\*,,g`
3862 cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3864 ### end of cmdline
3866 cat > Makefile <<EOF
3867 ## Automatically generated. http://www.rockbox.org/
3869 export ROOTDIR=${rootdir}
3870 export FIRMDIR=\$(ROOTDIR)/firmware
3871 export APPSDIR=${appsdir}
3872 export TOOLSDIR=${toolsdir}
3873 export DOCSDIR=${rootdir}/docs
3874 export MANUALDIR=${rootdir}/manual
3875 export DEBUG=${debug}
3876 export MODELNAME=${modelname}
3877 export ARCHOSROM=${archosrom}
3878 export FLASHFILE=${flash}
3879 export TARGET_ID=${target_id}
3880 export TARGET=-D${target}
3881 export ARCH=${arch}
3882 export ARCH_VERSION=${arch_version}
3883 export CPU=${t_cpu}
3884 export MANUFACTURER=${t_manufacturer}
3885 export OBJDIR=${pwd}
3886 export BUILDDIR=${pwd}
3887 export LANGUAGE=${language}
3888 export VOICELANGUAGE=${voicelanguage}
3889 export MEMORYSIZE=${memory}
3890 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3891 export MKFIRMWARE=${tool}
3892 export BMP2RB_MONO=${bmp2rb_mono}
3893 export BMP2RB_NATIVE=${bmp2rb_native}
3894 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3895 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3896 export BINARY=${output}
3897 export APPEXTRA=${appextra}
3898 export ENABLEDPLUGINS=${plugins}
3899 export SOFTWARECODECS=${swcodec}
3900 export EXTRA_DEFINES=${extradefines}
3901 export HOSTCC=${HOSTCC}
3902 export HOSTAR=${HOSTAR}
3903 export CC=${CC}
3904 export CPP=${CPP}
3905 export LD=${LD}
3906 export AR=${AR}
3907 export AS=${AS}
3908 export OC=${OC}
3909 export WINDRES=${WINDRES}
3910 export DLLTOOL=${DLLTOOL}
3911 export DLLWRAP=${DLLWRAP}
3912 export RANLIB=${RANLIB}
3913 export PREFIX=${ARG_PREFIX}
3914 export PROFILE_OPTS=${PROFILE_OPTS}
3915 export APP_TYPE=${app_type}
3916 export APPLICATION=${application}
3917 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3918 export GCCOPTS=${GCCOPTS}
3919 export TARGET_INC=${TARGET_INC}
3920 export LOADADDRESS=${loadaddress}
3921 export SHARED_LDFLAG=${SHARED_LDFLAG}
3922 export SHARED_CFLAGS=${SHARED_CFLAGS}
3923 export LDOPTS=${LDOPTS}
3924 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3925 export GCCVER=${gccver}
3926 export GCCNUM=${gccnum}
3927 export UNAME=${uname}
3928 export MANUALDEV=${manualdev}
3929 export TTS_OPTS=${TTS_OPTS}
3930 export TTS_ENGINE=${TTS_ENGINE}
3931 export ENC_OPTS=${ENC_OPTS}
3932 export ENCODER=${ENCODER}
3933 export USE_ELF=${USE_ELF}
3934 export RBDIR=${rbdir}
3935 export ROCKBOX_SHARE_PATH=${sharedir}
3936 export ROCKBOX_BINARY_PATH=${bindir}
3937 export ROCKBOX_LIBRARY_PATH=${libdir}
3938 export SDLCONFIG=${sdl}
3939 export LCDORIENTATION=${lcd_orientation}
3941 CONFIGURE_OPTIONS=${cmdline}
3943 include \$(TOOLSDIR)/root.make
3946 echo "Created Makefile"