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