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