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