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