Rockbox Utility: add missing folder to deployment script.
[maemo-rb.git] / tools / configure
blob2e2cf2cdb0794a3a16094406c0536a5e09cd3dcb
1 #!/bin/sh
2 # __________ __ ___.
3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 # \/ \/ \/ \/ \/
8 # $Id$
11 # global CC options for all platforms
12 CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
14 # global LD options for all platforms
15 GLOBAL_LDOPTS=""
17 extradefines=""
18 use_logf="#undef ROCKBOX_HAS_LOGF"
19 use_bootchart="#undef DO_BOOTCHART"
21 scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
23 rbdir="/.rockbox"
24 bindir=
25 libdir=
26 sharedir=
28 thread_support="ASSEMBLER_THREADS"
29 app_lcd_width=
30 app_lcd_height=
31 app_lcd_orientation=
32 cmdline="$@"
34 # Begin Function Definitions
36 input() {
37 read response
38 echo $response
41 prefixtools () {
42 prefix="$1"
43 CC=${prefix}gcc
44 WINDRES=${prefix}windres
45 DLLTOOL=${prefix}dlltool
46 DLLWRAP=${prefix}dllwrap
47 RANLIB=${prefix}ranlib
48 LD=${prefix}ld
49 AR=${prefix}ar
50 AS=${prefix}as
51 OC=${prefix}objcopy
54 app_set_paths () {
55 # setup files and paths depending on the platform
56 if [ -z "$ARG_PREFIX" ]; then
57 sharedir="/usr/local/share/rockbox"
58 bindir="/usr/local/bin"
59 libdir="/usr/local/lib"
60 else
61 if [ -d "$ARG_PREFIX" ]; then
62 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
63 ARG_PREFIX=`realpath $ARG_PREFIX`
64 if [ "0" != "$?" ]; then
65 echo "ERROR: Could not get prefix path (is realpath installed?)."
66 exit
69 sharedir="$ARG_PREFIX/share/rockbox"
70 bindir="$ARG_PREFIX/bin"
71 libdir="$ARG_PREFIX/lib"
72 else
73 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
74 exit
79 # Set the application LCD size according to the following priorities:
80 # 1) If --lcdwidth and --lcdheight are set, use them
81 # 2) If a size is passed to the app_set_lcd_size() function, use that
82 # 3) Otherwise ask the user
83 app_set_lcd_size () {
84 if [ -z "$ARG_LCDWIDTH" ]; then
85 ARG_LCDWIDTH=$1
87 if [ -z "$ARG_LCDHEIGHT" ]; then
88 ARG_LCDHEIGHT=$2
91 echo "Enter the LCD width (default: 320)"
92 if [ -z "$ARG_LCDWIDTH" ]; then
93 app_lcd_width=`input`
94 else
95 app_lcd_width="$ARG_LCDWIDTH"
97 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
98 echo "Enter the LCD height (default: 480)"
99 if [ -z "$ARG_LCDHEIGHT" ]; then
100 app_lcd_height=`input`
101 else
102 app_lcd_height="$ARG_LCDHEIGHT"
104 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
105 if [ $app_lcd_width -gt $app_lcd_height ]; then
106 lcd_orientation="landscape"
107 else
108 lcd_orientation="portrait"
110 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
111 ARG_LCDWIDTH=$app_lcd_width
112 ARG_LCDHEIGHT=$app_lcd_height
114 app_lcd_width="#define LCD_WIDTH $app_lcd_width"
115 app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
118 findarmgcc() {
119 if [ "$ARG_ARM_EABI" != "0" ]; then
120 prefixtools arm-elf-eabi-
121 gccchoice="4.4.4"
122 else
123 prefixtools arm-elf-
124 gccchoice="4.0.3"
128 # scan the $PATH for the given command
129 findtool(){
130 file="$1"
132 IFS=":"
133 for path in $PATH
135 # echo "checks for $file in $path" >&2
136 if test -f "$path/$file"; then
137 echo "$path/$file"
138 return
140 done
141 # check whether caller wants literal return value if not found
142 if [ "$2" = "--lit" ]; then
143 echo "$file"
147 # scan the $PATH for sdl-config - check whether for a (cross-)win32
148 # sdl as requested
149 findsdl(){
150 # sdl-config might (not) be prefixed for cross compiles so try both.
151 files="${CROSS_COMPILE}sdl-config:sdl-config"
152 winbuild="$1"
154 IFS=":"
155 for file in $files
157 for path in $PATH
159 #echo "checks for $file in $path" >&2
160 if test -f "$path/$file"; then
161 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
162 if [ "yes" = "${winbuild}" ]; then
163 echo "$path/$file"
164 return
166 else
167 if [ "yes" != "${winbuild}" ]; then
168 echo "$path/$file"
169 return
173 done
174 done
177 # check for availability of sigaltstack to support our thread engine
178 check_sigaltstack() {
179 cat >$tmpdir/check_threads.c <<EOF
180 #include <signal.h>
181 int main(int argc, char **argv)
183 #ifndef NULL
184 #define NULL (void*)0
185 #endif
186 sigaltstack(NULL, NULL);
187 return 0;
190 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 1> /dev/null
191 result=$?
192 rm -rf $tmpdir/check_threads*
193 echo $result
196 # check for availability of Fiber on Win32 to support our thread engine
197 check_fiber() {
198 cat >$tmpdir/check_threads.c <<EOF
199 #include <windows.h>
200 int main(int argc, char **argv)
202 ConvertThreadToFiber(NULL);
203 return 0;
206 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 2>/dev/null
207 result=$?
208 rm -rf $tmpdir/check_threads*
209 echo $result
212 simcc () {
214 # default tool setup for native building
215 prefixtools "$CROSS_COMPILE"
216 ARG_ARM_THUMB=0 # can't use thumb in native builds
218 app_type=$1
219 winbuild=""
220 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
221 if [ "$app_type" != "sdl-app" ]; then
222 # Disable optimizations for non-app builds
223 GCCOPTS=`echo $GCCOPTS | sed -e s/-O//`
226 GCCOPTS="$GCCOPTS -fno-builtin -g"
227 GCCOPTIMIZE=''
228 LDOPTS='-lm' # button-sdl.c uses sqrt()
229 sigaltstack=""
230 fibers=""
231 endian="" # endianess of the dap doesnt matter here
233 # default output binary name, don't override app_get_platform()
234 if [ "$app_type" != "sdl-app" ]; then
235 output="rockboxui"
238 # default share option, override below if needed
239 SHARED_LDFLAG="-shared"
240 SHARED_CFLAGS="-fPIC -fvisibility=hidden"
242 if [ "$win32crosscompile" = "yes" ]; then
243 # We are crosscompiling
244 # add cross-compiler option(s)
245 LDOPTS="$LDOPTS -mconsole"
246 output="$output.exe"
247 winbuild="yes"
248 CROSS_COMPILE=${CROSS_COMPILE:-"i586-mingw32msvc-"}
249 SHARED_CFLAGS=''
250 prefixtools "$CROSS_COMPILE"
251 fibers=`check_fiber`
252 endian="little" # windows is little endian
253 echo "Enabling MMX support"
254 GCCOPTS="$GCCOPTS -mmmx"
255 else
256 case $uname in
257 CYGWIN*)
258 echo "Cygwin host detected"
260 fibers=`check_fiber`
261 LDOPTS="$LDOPTS -mconsole"
262 output="$output.exe"
263 winbuild="yes"
264 SHARED_CFLAGS=''
267 MINGW*)
268 echo "MinGW host detected"
270 fibers=`check_fiber`
271 LDOPTS="$LDOPTS -mconsole"
272 output="$output.exe"
273 winbuild="yes"
276 Linux)
277 sigaltstack=`check_sigaltstack`
278 echo "Linux host detected"
279 LDOPTS="$LDOPTS -ldl"
282 FreeBSD)
283 sigaltstack=`check_sigaltstack`
284 echo "FreeBSD host detected"
285 LDOPTS="$LDOPTS -ldl"
288 Darwin)
289 sigaltstack=`check_sigaltstack`
290 echo "Darwin host detected"
291 LDOPTS="$LDOPTS -ldl"
292 SHARED_LDFLAG="-dynamiclib -Wl\,-single_module"
295 SunOS)
296 sigaltstack=`check_sigaltstack`
297 echo "*Solaris host detected"
299 GCCOPTS="$GCCOPTS -fPIC"
300 LDOPTS="$LDOPTS -ldl"
304 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
305 exit 1
307 esac
310 if [ "$winbuild" != "yes" ]; then
311 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
312 if [ "`uname -m`" = "i686" ]; then
313 echo "Enabling MMX support"
314 GCCOPTS="$GCCOPTS -mmmx"
318 sdl=`findsdl $winbuild`
320 if [ -n `echo $app_type | grep "sdl"` ]; then
321 if [ -z "$sdl" ]; then
322 echo "configure didn't find sdl-config, which indicates that you"
323 echo "don't have SDL (properly) installed. Please correct and"
324 echo "re-run configure!"
325 exit 2
326 else
327 # generic sdl-config checker
328 GCCOPTS="$GCCOPTS `$sdl --cflags`"
329 LDOPTS="$LDOPTS `$sdl --libs`"
334 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
335 # x86_64 supports MMX by default
337 if [ "$endian" = "" ]; then
338 id=$$
339 cat >$tmpdir/conftest-$id.c <<EOF
340 #include <stdio.h>
341 int main(int argc, char **argv)
343 int var=0;
344 char *varp = (char *)&var;
345 *varp=1;
347 printf("%d\n", var);
348 return 0;
351 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
352 # when cross compiling, the endianess cannot be detected because the above program doesn't run
353 # on the local machine. assume little endian but print a warning
354 endian=`$tmpdir/conftest-$id 2> /dev/null`
355 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
356 # big endian
357 endian="big"
358 else
359 # little endian
360 endian="little"
364 if [ "$CROSS_COMPILE" != "" ]; then
365 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
368 if [ "$app_type" = "sdl-sim" ]; then
369 echo "Simulator environment deemed $endian endian"
370 elif [ "$app_type" = "sdl-app" ]; then
371 echo "Application environment deemed $endian endian"
372 elif [ "$app_type" = "checkwps" ]; then
373 echo "CheckWPS environment deemed $endian endian"
376 # use wildcard here to make it work even if it was named *.exe like
377 # on cygwin
378 rm -f $tmpdir/conftest-$id*
380 thread_support=
381 if [ -z "$ARG_THREAD_SUPPORT" ] || [ "$ARG_THREAD_SUPPORT" = "0" ]; then
382 if [ "$sigaltstack" = "0" ]; then
383 thread_support="HAVE_SIGALTSTACK_THREADS"
384 LDOPTS="$LDOPTS -lpthread" # pthread needed
385 echo "Selected sigaltstack threads"
386 elif [ "$fibers" = "0" ]; then
387 thread_support="HAVE_WIN32_FIBER_THREADS"
388 echo "Selected Win32 Fiber threads"
392 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
393 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
394 thread_support="HAVE_SDL_THREADS"
395 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
396 echo "Selected SDL threads"
397 else
398 echo "WARNING: Falling back to SDL threads"
404 # functions for setting up cross-compiler names and options
405 # also set endianess and what the exact recommended gcc version is
406 # the gcc version should most likely match what versions we build with
407 # rockboxdev.sh
409 shcc () {
410 prefixtools sh-elf-
411 GCCOPTS="$CCOPTS -m1"
412 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
413 endian="big"
414 gccchoice="4.0.3"
417 calmrisccc () {
418 prefixtools calmrisc16-unknown-elf-
419 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
420 GCCOPTIMIZE="-fomit-frame-pointer"
421 endian="big"
424 coldfirecc () {
425 prefixtools m68k-elf-
426 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
427 GCCOPTIMIZE="-fomit-frame-pointer"
428 endian="big"
429 gccchoice="4.5.2"
432 arm7tdmicc () {
433 findarmgcc
434 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
435 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
436 GCCOPTS="$GCCOPTS -mlong-calls"
438 GCCOPTIMIZE="-fomit-frame-pointer"
439 endian="little"
442 arm9tdmicc () {
443 findarmgcc
444 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
445 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
446 GCCOPTS="$GCCOPTS -mlong-calls"
448 GCCOPTIMIZE="-fomit-frame-pointer"
449 endian="little"
452 arm940tbecc () {
453 findarmgcc
454 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
455 if test "$ARG_ARM_EABI" = "0"; then
456 GCCOPTS="$GCCOPTS -mlong-calls"
458 GCCOPTIMIZE="-fomit-frame-pointer"
459 endian="big"
462 arm940tcc () {
463 findarmgcc
464 GCCOPTS="$CCOPTS -mcpu=arm940t"
465 if test "$ARG_ARM_EABI" = "0"; then
466 GCCOPTS="$GCCOPTS -mlong-calls"
468 GCCOPTIMIZE="-fomit-frame-pointer"
469 endian="little"
472 arm946cc () {
473 findarmgcc
474 GCCOPTS="$CCOPTS -mcpu=arm9e"
475 if test "$ARG_ARM_EABI" = "0"; then
476 GCCOPTS="$GCCOPTS -mlong-calls"
478 GCCOPTIMIZE="-fomit-frame-pointer"
479 endian="little"
482 arm926ejscc () {
483 findarmgcc
484 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
485 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
486 GCCOPTS="$GCCOPTS -mlong-calls"
488 GCCOPTIMIZE="-fomit-frame-pointer"
489 endian="little"
492 arm1136jfscc () {
493 findarmgcc
494 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
495 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
496 GCCOPTS="$GCCOPTS -mlong-calls"
498 GCCOPTIMIZE="-fomit-frame-pointer"
499 endian="little"
502 arm1176jzscc () {
503 findarmgcc
504 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
505 if test "$ARG_ARM_EABI" = "0"; then
506 GCCOPTS="$GCCOPTS -mlong-calls"
508 GCCOPTIMIZE="-fomit-frame-pointer"
509 endian="little"
512 arm7ejscc () {
513 findarmgcc
514 GCCOPTS="$CCOPTS -march=armv5te"
515 GCCOPTIMIZE="-fomit-frame-pointer"
516 endian="little"
519 mipselcc () {
520 prefixtools mipsel-elf-
521 # mips is predefined, but we want it for paths. use __mips instead
522 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
523 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
524 GCCOPTIMIZE="-fomit-frame-pointer"
525 endian="little"
526 gccchoice="4.1.2"
529 maemocc () {
530 # Scratchbox sets up "gcc" based on the active target
531 prefixtools ""
533 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
534 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
535 GCCOPTIMIZE=''
536 LDOPTS="-lm -ldl $LDOPTS"
537 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
538 SHARED_LDFLAG="-shared"
539 SHARED_CFLAGS=''
540 endian="little"
541 thread_support="HAVE_SIGALTSTACK_THREADS"
543 is_n900=0
544 # Determine maemo version
545 if pkg-config --atleast-version=5 maemo-version; then
546 if [ "$1" == "4" ]; then
547 echo "ERROR: Maemo 4 SDK required."
548 exit 1
550 extradefines="$extradefines -DMAEMO5"
551 echo "Found N900 maemo version"
552 is_n900=1
553 elif pkg-config --atleast-version=4 maemo-version; then
554 if [ "$1" == "5" ]; then
555 echo "ERROR: Maemo 5 SDK required."
556 exit 1
558 extradefines="$extradefines -DMAEMO4"
559 echo "Found N8xx maemo version"
560 else
561 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
562 exit 1
565 # SDL
566 if [ $is_n900 -eq 1 ]; then
567 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
568 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
569 else
570 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
571 LDOPTS="$LDOPTS `sdl-config --libs`"
574 # glib and libosso support
575 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
576 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
578 # libhal support: Battery monitoring
579 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
580 LDOPTS="$LDOPTS `pkg-config --libs hal`"
582 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
583 if [ $is_n900 -eq 1 ]; then
584 # gstreamer support: Audio output.
585 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
586 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
588 # N900 specific: libplayback support
589 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
590 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
592 # N900 specific: Enable ARMv7 NEON support
593 if sb-conf show -A |grep -q -i arm; then
594 echo "Detected ARM target"
595 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
596 extradefines="$extradefines -DMAEMO_ARM_BUILD"
597 else
598 echo "Detected x86 target"
600 else
601 # N8xx specific: Enable armv5te instructions
602 if sb-conf show -A |grep -q -i arm; then
603 echo "Detected ARM target"
604 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
605 extradefines="$extradefines -DMAEMO_ARM_BUILD"
606 else
607 echo "Detected x86 target"
612 pandoracc () {
613 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
614 # You have to use the sebt3 toolchain:
615 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
617 PNDSDK="/usr/local/angstrom/arm"
618 if [ ! -x $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc ]; then
619 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
620 exit
623 PATH=$PNDSDK/bin:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi/usr/bin
624 PKG_CONFIG_PATH=$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib/pkgconfig
625 LDOPTS="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
626 PKG_CONFIG="pkg-config"
628 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
629 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
630 GCCOPTIMIZE=''
631 LDOPTS="-lm -ldl $LDOPTS"
632 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
633 SHARED_LDFLAG="-shared"
634 SHARED_CFLAGS=''
635 endian="little"
636 thread_support="HAVE_SIGALTSTACK_THREADS"
638 # Include path
639 GCCOPTS="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
641 # Set up compiler
642 gccchoice="4.3.3"
643 prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
645 # Detect SDL
646 GCCOPTS="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
647 LDOPTS="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
649 # Compiler options
650 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
651 GCCOPTS="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
652 GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant"
655 ypr0cc () {
657 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
658 GCCOPTIMIZE=''
659 LDOPTS="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
660 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
661 SHARED_LDFLAG="-shared"
662 SHARED_CFLAGS=''
663 endian="little"
664 thread_support="HAVE_SIGALTSTACK_THREADS"
665 app_type="ypr0"
667 # Include path
668 GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
670 # Set up compiler
671 gccchoice="4.4.6"
672 prefixtools "arm-ypr0-linux-gnueabi-"
675 androidcc () {
676 if [ -z "$ANDROID_SDK_PATH" ]; then
677 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
678 echo "environment variable point to the root directory of the Android SDK."
679 exit
681 if [ -z "$ANDROID_NDK_PATH" ]; then
682 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
683 echo "environment variable point to the root directory of the Android NDK."
684 exit
686 buildhost=$(uname | tr "[:upper:]" "[:lower:]")
687 gccchoice="4.4.3"
688 gcctarget="arm-linux-androideabi-"
689 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
690 PATH=$PATH:$gccprefix/bin
691 prefixtools $gcctarget
692 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
693 GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
694 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
695 GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack"
696 LDOPTS="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
697 endian="little"
698 SHARED_LDFLAG="-shared"
701 whichadvanced () {
702 atype=`echo "$1" | cut -c 2-`
703 ##################################################################
704 # Prompt for specific developer options
706 if [ "$atype" ]; then
707 interact=
708 else
709 interact=1
710 echo ""
711 printf "Enter your developer options (press only enter when done)\n\
712 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
713 (T)est plugins, S(m)all C lib:"
714 if [ "$memory" = "2" ]; then
715 printf ", (8)MB MOD"
717 if [ "$modelname" = "archosplayer" ]; then
718 printf ", Use (A)TA poweroff"
720 if [ "$t_model" = "ondio" ]; then
721 printf ", (B)acklight MOD"
723 if [ "$modelname" = "iaudiom5" ]; then
724 printf ", (F)M radio MOD"
726 if [ "$modelname" = "iriverh120" ]; then
727 printf ", (R)TC MOD"
729 echo ""
732 cont=1
733 while [ $cont = "1" ]; do
735 if [ "$interact" ]; then
736 option=`input`
737 else
738 option=`echo "$atype" | cut -c 1`
741 case $option in
742 [Dd])
743 if [ "yes" = "$profile" ]; then
744 echo "Debug is incompatible with profiling"
745 else
746 echo "DEBUG build enabled"
747 use_debug="yes"
750 [Ll])
751 echo "logf() support enabled"
752 logf="yes"
754 [Mm])
755 echo "Using Rockbox' small C library"
756 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
758 [Tt])
759 echo "Including test plugins"
760 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
762 [Cc])
763 echo "bootchart enabled (logf also enabled)"
764 bootchart="yes"
765 logf="yes"
767 [Ss])
768 echo "Simulator build enabled"
769 simulator="yes"
771 [Pp])
772 if [ "yes" = "$use_debug" ]; then
773 echo "Profiling is incompatible with debug"
774 else
775 echo "Profiling support is enabled"
776 profile="yes"
779 [Vv])
780 echo "Voice build selected"
781 voice="yes"
784 if [ "$memory" = "2" ]; then
785 memory="8"
786 echo "Memory size selected: 8MB"
789 [Aa])
790 if [ "$modelname" = "archosplayer" ]; then
791 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
792 echo "ATA power off enabled"
795 [Bb])
796 if [ "$t_model" = "ondio" ]; then
797 have_backlight="#define HAVE_BACKLIGHT"
798 echo "Backlight functions enabled"
801 [Ff])
802 if [ "$modelname" = "iaudiom5" ]; then
803 have_fmradio_in="#define HAVE_FMRADIO_IN"
804 echo "FM radio functions enabled"
807 [Rr])
808 if [ "$modelname" = "iriverh120" ]; then
809 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
810 have_rtc_alarm="#define HAVE_RTC_ALARM"
811 echo "RTC functions enabled (DS1339/DS3231)"
814 [Ww])
815 echo "Enabling Windows 32 cross-compiling"
816 win32crosscompile="yes"
818 "") # Match enter press when finished with advanced options
819 cont=0
822 echo "[ERROR] Option $option unsupported"
824 esac
825 if [ "$interact" ]; then
826 btype="$btype$option"
827 else
828 atype=`echo "$atype" | cut -c 2-`
829 [ "$atype" ] || cont=0
831 done
832 echo "done"
834 if [ "yes" = "$voice" ]; then
835 # Ask about languages to build
836 picklang
837 voicelanguage=`whichlang`
838 echo "Voice language set to $voicelanguage"
840 # Configure encoder and TTS engine for each language
841 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
842 voiceconfig "$thislang"
843 done
845 if [ "yes" = "$use_debug" ]; then
846 debug="-DDEBUG"
847 GCCOPTS="$GCCOPTS -g -DDEBUG"
849 if [ "yes" = "$logf" ]; then
850 use_logf="#define ROCKBOX_HAS_LOGF 1"
852 if [ "yes" = "$bootchart" ]; then
853 use_bootchart="#define DO_BOOTCHART 1"
855 if [ "yes" = "$simulator" ]; then
856 debug="-DDEBUG"
857 extradefines="$extradefines -DSIMULATOR"
858 archosrom=""
859 flash=""
861 if [ "yes" = "$profile" ]; then
862 extradefines="$extradefines -DRB_PROFILE"
863 PROFILE_OPTS="-finstrument-functions"
867 # Configure voice settings
868 voiceconfig () {
869 thislang=$1
870 if [ ! "$ARG_TTS" ]; then
871 echo "Building $thislang voice for $modelname. Select options"
872 echo ""
875 if [ -n "`findtool flite`" ]; then
876 FLITE="F(l)ite "
877 FLITE_OPTS=""
878 DEFAULT_TTS="flite"
879 DEFAULT_TTS_OPTS=$FLITE_OPTS
880 DEFAULT_NOISEFLOOR="500"
881 DEFAULT_CHOICE="L"
883 if [ -n "`findtool espeak`" ]; then
884 ESPEAK="(e)Speak "
885 ESPEAK_OPTS=""
886 DEFAULT_TTS="espeak"
887 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
888 DEFAULT_NOISEFLOOR="500"
889 DEFAULT_CHOICE="e"
891 if [ -n "`findtool festival`" ]; then
892 FESTIVAL="(F)estival "
893 case "$thislang" in
894 "italiano")
895 FESTIVAL_OPTS="--language italian"
897 "espanol")
898 FESTIVAL_OPTS="--language spanish"
900 "finnish")
901 FESTIVAL_OPTS="--language finnish"
903 "czech")
904 FESTIVAL_OPTS="--language czech"
907 FESTIVAL_OPTS=""
909 esac
910 DEFAULT_TTS="festival"
911 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
912 DEFAULT_NOISEFLOOR="500"
913 DEFAULT_CHOICE="F"
915 if [ -n "`findtool swift`" ]; then
916 SWIFT="S(w)ift "
917 SWIFT_OPTS=""
918 DEFAULT_TTS="swift"
919 DEFAULT_TTS_OPTS=$SWIFT_OPTS
920 DEFAULT_NOISEFLOOR="500"
921 DEFAULT_CHOICE="w"
923 # Allow SAPI if Windows is in use
924 if [ -n "`findtool winver`" ]; then
925 SAPI="(S)API "
926 SAPI_OPTS=""
927 DEFAULT_TTS="sapi"
928 DEFAULT_TTS_OPTS=$SAPI_OPTS
929 DEFAULT_NOISEFLOOR="500"
930 DEFAULT_CHOICE="S"
933 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
934 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
935 exit 3
938 if [ "$ARG_TTS" ]; then
939 option=$ARG_TTS
940 else
941 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
942 option=`input`
944 advopts="$advopts --tts=$option"
945 case "$option" in
946 [Ll])
947 TTS_ENGINE="flite"
948 NOISEFLOOR="500" # TODO: check this value
949 TTS_OPTS=$FLITE_OPTS
951 [Ee])
952 TTS_ENGINE="espeak"
953 NOISEFLOOR="500"
954 TTS_OPTS=$ESPEAK_OPTS
956 [Ff])
957 TTS_ENGINE="festival"
958 NOISEFLOOR="500"
959 TTS_OPTS=$FESTIVAL_OPTS
961 [Ss])
962 TTS_ENGINE="sapi"
963 NOISEFLOOR="500"
964 TTS_OPTS=$SAPI_OPTS
966 [Ww])
967 TTS_ENGINE="swift"
968 NOISEFLOOR="500"
969 TTS_OPTS=$SWIFT_OPTS
972 TTS_ENGINE=$DEFAULT_TTS
973 TTS_OPTS=$DEFAULT_TTS_OPTS
974 NOISEFLOOR=$DEFAULT_NOISEFLOOR
975 esac
976 echo "Using $TTS_ENGINE for TTS"
978 # Select which voice to use for Festival
979 if [ "$TTS_ENGINE" = "festival" ]; then
980 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
981 for voice in $voicelist; do
982 TTS_FESTIVAL_VOICE="$voice" # Default choice
983 break
984 done
985 if [ "$ARG_VOICE" ]; then
986 CHOICE=$ARG_VOICE
987 else
989 for voice in $voicelist; do
990 printf "%3d. %s\n" "$i" "$voice"
991 i=`expr $i + 1`
992 done
993 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
994 CHOICE=`input`
997 for voice in $voicelist; do
998 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
999 TTS_FESTIVAL_VOICE="$voice"
1001 i=`expr $i + 1`
1002 done
1003 advopts="$advopts --voice=$CHOICE"
1004 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1005 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1008 # Read custom tts options from command line
1009 if [ "$ARG_TTSOPTS" ]; then
1010 TTS_OPTS="$ARG_TTSOPTS"
1011 advopts="$advopts --ttsopts='$TTS_OPTS'"
1012 echo "$TTS_ENGINE options set to $TTS_OPTS"
1015 if [ "$swcodec" = "yes" ]; then
1016 ENCODER="rbspeexenc"
1017 ENC_OPTS="-q 4 -c 10"
1018 else
1019 if [ -n "`findtool lame`" ]; then
1020 ENCODER="lame"
1021 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1022 else
1023 echo "You need LAME in the system path to build voice files for"
1024 echo "HWCODEC targets."
1025 exit 4
1029 echo "Using $ENCODER for encoding voice clips"
1031 # Read custom encoder options from command line
1032 if [ "$ARG_ENCOPTS" ]; then
1033 ENC_OPTS="$ARG_ENCOPTS"
1034 advopts="$advopts --encopts='$ENC_OPTS'"
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`
1065 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 LD=`findtool ${AR} --lit`
3645 AR=`findtool ${AR} --lit`
3646 AS=`findtool ${AS} --lit`
3647 OC=`findtool ${OC} --lit`
3648 WINDRES=`findtool ${WINDRES} --lit`
3649 DLLTOOL=`findtool ${DLLTOOL} --lit`
3650 DLLWRAP=`findtool ${DLLWRAP} --lit`
3651 RANLIB=`findtool ${RANLIB} --lit`
3653 if test -n "$ccache"; then
3654 CC="$ccache $CC"
3657 if test "$ARG_ARM_THUMB" = "1"; then
3658 extradefines="$extradefines -DUSE_THUMB"
3659 CC="$toolsdir/thumb-cc.py $CC"
3662 if test "X$endian" = "Xbig"; then
3663 defendian="ROCKBOX_BIG_ENDIAN"
3664 else
3665 defendian="ROCKBOX_LITTLE_ENDIAN"
3668 if [ "$ARG_RBDIR" != "" ]; then
3669 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3670 rbdir="/"$ARG_RBDIR
3671 else
3672 rbdir=$ARG_RBDIR
3674 echo "Using alternate rockbox dir: ${rbdir}"
3677 cat > autoconf.h <<EOF
3678 /* This header was made by configure */
3679 #ifndef __BUILD_AUTOCONF_H
3680 #define __BUILD_AUTOCONF_H
3682 /* Define endianess for the target or simulator platform */
3683 #define ${defendian} 1
3685 /* Define this if you build rockbox to support the logf logging and display */
3686 ${use_logf}
3688 /* Define this to record a chart with timings for the stages of boot */
3689 ${use_bootchart}
3691 /* optional define for a backlight modded Ondio */
3692 ${have_backlight}
3694 /* optional define for FM radio mod for iAudio M5 */
3695 ${have_fmradio_in}
3697 /* optional define for ATA poweroff on Player */
3698 ${have_ata_poweroff}
3700 /* optional defines for RTC mod for h1x0 */
3701 ${config_rtc}
3702 ${have_rtc_alarm}
3704 /* the threading backend we use */
3705 #define ${thread_support}
3707 /* lcd dimensions for application builds from configure */
3708 ${app_lcd_width}
3709 ${app_lcd_height}
3711 /* root of Rockbox */
3712 #define ROCKBOX_DIR "${rbdir}"
3713 #define ROCKBOX_SHARE_PATH "${sharedir}"
3714 #define ROCKBOX_BINARY_PATH "${bindir}"
3715 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3717 #endif /* __BUILD_AUTOCONF_H */
3720 if test -n "$t_cpu"; then
3721 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3723 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3724 # Maemo needs the SDL port, too
3725 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3726 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3727 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3728 # Pandora needs the SDL port, too
3729 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3730 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3731 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3732 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3733 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3736 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3737 test -n "$t_soc" && TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3738 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3739 GCCOPTS="$GCCOPTS"
3742 if test "$swcodec" = "yes"; then
3743 voicetoolset="rbspeexenc voicefont wavtrim"
3744 else
3745 voicetoolset="voicefont wavtrim"
3748 if test "$apps" = "apps"; then
3749 # only when we build "real" apps we build the .lng files
3750 buildlangs="langs"
3753 #### Fix the cmdline ###
3754 if [ -n "$ARG_PREFIX" ]; then
3755 cmdline="$cmdline --prefix=\$(PREFIX)"
3757 if [ -n "$ARG_LCDWIDTH" ]; then
3758 cmdline="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3761 # remove parts from the cmdline we're going to set unconditionally
3762 cmdline=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3763 -e s,--ram=[0-9]\*,,g \
3764 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3765 -e s,--type=[a-zA-Z]\*,,g`
3766 cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3768 ### end of cmdline
3770 cat > Makefile <<EOF
3771 ## Automatically generated. http://www.rockbox.org/
3773 export ROOTDIR=${rootdir}
3774 export FIRMDIR=\$(ROOTDIR)/firmware
3775 export APPSDIR=${appsdir}
3776 export TOOLSDIR=${toolsdir}
3777 export DOCSDIR=${rootdir}/docs
3778 export MANUALDIR=${rootdir}/manual
3779 export DEBUG=${debug}
3780 export MODELNAME=${modelname}
3781 export ARCHOSROM=${archosrom}
3782 export FLASHFILE=${flash}
3783 export TARGET_ID=${target_id}
3784 export TARGET=-D${target}
3785 export CPU=${t_cpu}
3786 export MANUFACTURER=${t_manufacturer}
3787 export OBJDIR=${pwd}
3788 export BUILDDIR=${pwd}
3789 export LANGUAGE=${language}
3790 export VOICELANGUAGE=${voicelanguage}
3791 export MEMORYSIZE=${memory}
3792 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3793 export MKFIRMWARE=${tool}
3794 export BMP2RB_MONO=${bmp2rb_mono}
3795 export BMP2RB_NATIVE=${bmp2rb_native}
3796 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3797 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3798 export BINARY=${output}
3799 export APPEXTRA=${appextra}
3800 export ENABLEDPLUGINS=${plugins}
3801 export SOFTWARECODECS=${swcodec}
3802 export EXTRA_DEFINES=${extradefines}
3803 export HOSTCC=${HOSTCC}
3804 export HOSTAR=${HOSTAR}
3805 export CC=${CC}
3806 export LD=${LD}
3807 export AR=${AR}
3808 export AS=${AS}
3809 export OC=${OC}
3810 export WINDRES=${WINDRES}
3811 export DLLTOOL=${DLLTOOL}
3812 export DLLWRAP=${DLLWRAP}
3813 export RANLIB=${RANLIB}
3814 export PREFIX=${ARG_PREFIX}
3815 export PROFILE_OPTS=${PROFILE_OPTS}
3816 export APP_TYPE=${app_type}
3817 export APPLICATION=${application}
3818 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3819 export GCCOPTS=${GCCOPTS}
3820 export TARGET_INC=${TARGET_INC}
3821 export LOADADDRESS=${loadaddress}
3822 export SHARED_LDFLAG=${SHARED_LDFLAG}
3823 export SHARED_CFLAGS=${SHARED_CFLAGS}
3824 export LDOPTS=${LDOPTS}
3825 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3826 export GCCVER=${gccver}
3827 export GCCNUM=${gccnum}
3828 export UNAME=${uname}
3829 export MANUALDEV=${manualdev}
3830 export TTS_OPTS=${TTS_OPTS}
3831 export TTS_ENGINE=${TTS_ENGINE}
3832 export ENC_OPTS=${ENC_OPTS}
3833 export ENCODER=${ENCODER}
3834 export USE_ELF=${USE_ELF}
3835 export RBDIR=${rbdir}
3836 export ROCKBOX_SHARE_PATH=${sharedir}
3837 export ROCKBOX_BINARY_PATH=${bindir}
3838 export ROCKBOX_LIBRARY_PATH=${libdir}
3839 export SDLCONFIG=${sdl}
3840 export LCDORIENTATION=${lcd_orientation}
3842 CONFIGURE_OPTIONS=${cmdline}
3844 include \$(TOOLSDIR)/root.make
3847 echo "Created Makefile"