Rockchip rk27xx port initial commit. This is still work in progress.
[kugel-rb.git] / tools / configure
blobd988e75d63072e612235fe8c475667678a3fc11b
1 #!/bin/sh
2 # __________ __ ___.
3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 # \/ \/ \/ \/ \/
8 # $Id$
11 # global CC options for all platforms
12 CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
14 # global LD options for all platforms
15 GLOBAL_LDOPTS=""
17 extradefines=""
18 use_logf="#undef ROCKBOX_HAS_LOGF"
19 use_bootchart="#undef DO_BOOTCHART"
21 scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
23 rbdir="/.rockbox"
24 bindir=
25 libdir=
26 sharedir=
28 thread_support="ASSEMBLER_THREADS"
29 app_lcd_width=
30 app_lcd_height=
32 # Begin Function Definitions
34 input() {
35 read response
36 echo $response
39 prefixtools () {
40 prefix="$1"
41 CC=${prefix}gcc
42 WINDRES=${prefix}windres
43 DLLTOOL=${prefix}dlltool
44 DLLWRAP=${prefix}dllwrap
45 RANLIB=${prefix}ranlib
46 LD=${prefix}ld
47 AR=${prefix}ar
48 AS=${prefix}as
49 OC=${prefix}objcopy
52 app_set_paths () {
53 # setup files and paths depending on the platform
54 if [ -z "$ARG_PREFIX" ]; then
55 sharedir="/usr/local/share/rockbox"
56 bindir="/usr/local/bin"
57 libdir="/usr/local/lib"
58 else
59 if [ -d "$ARG_PREFIX" ]; then
60 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
61 ARG_PREFIX=`realpath $ARG_PREFIX`
62 if [ "0" != "$?" ]; then
63 echo "ERROR: Could not get prefix path (is realpath installed?)."
64 exit
67 sharedir="$ARG_PREFIX/share/rockbox"
68 bindir="$ARG_PREFIX/bin"
69 libdir="$ARG_PREFIX/lib"
70 else
71 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
72 exit
77 # Set the application LCD size according to the following priorities:
78 # 1) If --lcdwidth and --lcdheight are set, use them
79 # 2) If a size is passed to the app_set_lcd_size() function, use that
80 # 3) Otherwise ask the user
81 app_set_lcd_size () {
82 if [ -z "$ARG_LCDWIDTH" ]; then
83 ARG_LCDWIDTH=$1
85 if [ -z "$ARG_LCDHEIGHT" ]; then
86 ARG_LCDHEIGHT=$2
89 echo "Enter the LCD width (default: 320)"
90 if [ -z "$ARG_LCDWIDTH" ]; then
91 app_lcd_width=`input`
92 else
93 app_lcd_width="$ARG_LCDWIDTH"
95 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
96 echo "Enter the LCD height (default: 480)"
97 if [ -z "$ARG_LCDHEIGHT" ]; then
98 app_lcd_height=`input`
99 else
100 app_lcd_height="$ARG_LCDHEIGHT"
102 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
103 echo "Selected $app_lcd_width x $app_lcd_height resolution"
104 ARG_LCDWIDTH=$app_lcd_width
105 ARG_LCDHEIGHT=$app_lcd_height
107 app_lcd_width="#define LCD_WIDTH $app_lcd_width"
108 app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
111 findarmgcc() {
112 if [ "$ARG_ARM_EABI" != "0" ]; then
113 prefixtools arm-elf-eabi-
114 gccchoice="4.4.4"
115 else
116 prefixtools arm-elf-
117 gccchoice="4.0.3"
121 # scan the $PATH for the given command
122 findtool(){
123 file="$1"
125 IFS=":"
126 for path in $PATH
128 # echo "checks for $file in $path" >&2
129 if test -f "$path/$file"; then
130 echo "$path/$file"
131 return
133 done
134 # check whether caller wants literal return value if not found
135 if [ "$2" = "--lit" ]; then
136 echo "$file"
140 # scan the $PATH for sdl-config - check whether for a (cross-)win32
141 # sdl as requested
142 findsdl(){
143 file="sdl-config"
144 winbuild="$1"
146 IFS=":"
147 for path in $PATH
149 #echo "checks for $file in $path" >&2
150 if test -f "$path/$file"; then
151 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
152 if [ "yes" = "${winbuild}" ]; then
153 echo "$path/$file"
154 return
156 else
157 if [ "yes" != "${winbuild}" ]; then
158 echo "$path/$file"
159 return
163 done
166 # check for availability of sigaltstack to support our thread engine
167 check_sigaltstack() {
168 cat >$tmpdir/check_threads.c <<EOF
169 #include <signal.h>
170 int main(int argc, char **argv)
172 #ifndef NULL
173 #define NULL (void*)0
174 #endif
175 sigaltstack(NULL, NULL);
176 return 0;
179 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 1> /dev/null
180 result=$?
181 rm -rf $tmpdir/check_threads*
182 echo $result
185 # check for availability of Fiber on Win32 to support our thread engine
186 check_fiber() {
187 cat >$tmpdir/check_threads.c <<EOF
188 #include <windows.h>
189 int main(int argc, char **argv)
191 ConvertThreadToFiber(NULL);
192 return 0;
195 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 2>/dev/null
196 result=$?
197 rm -rf $tmpdir/check_threads*
198 echo $result
201 simcc () {
203 # default tool setup for native building
204 prefixtools "$CROSS_COMPILE"
205 ARG_ARM_THUMB=0 # can't use thumb in native builds
207 app_type=$1
208 winbuild=""
209 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef// -e s/-O//`
210 GCCOPTS="$GCCOPTS -fno-builtin -g"
211 GCCOPTIMIZE=''
212 LDOPTS='-lm' # button-sdl.c uses sqrt()
213 sigaltstack=""
214 fibers=""
216 # default output binary name, don't override app_get_platform()
217 if [ "$app_type" != "sdl-app" ]; then
218 output="rockboxui"
221 # default share option, override below if needed
222 SHARED_FLAG="-shared"
224 if [ "$win32crosscompile" = "yes" ]; then
225 LDOPTS="$LDOPTS -mconsole"
226 output="$output.exe"
227 winbuild="yes"
228 else
229 case $uname in
230 CYGWIN*)
231 echo "Cygwin host detected"
233 fibers=`check_fiber`
234 LDOPTS="$LDOPTS -mconsole"
235 output="$output.exe"
236 winbuild="yes"
239 MINGW*)
240 echo "MinGW host detected"
242 fibers=`check_fiber`
243 LDOPTS="$LDOPTS -mconsole"
244 output="$output.exe"
245 winbuild="yes"
248 Linux)
249 sigaltstack=`check_sigaltstack`
250 echo "Linux host detected"
251 LDOPTS="$LDOPTS -ldl"
254 FreeBSD)
255 sigaltstack=`check_sigaltstack`
256 echo "FreeBSD host detected"
257 LDOPTS="$LDOPTS -ldl"
260 Darwin)
261 sigaltstack=`check_sigaltstack`
262 echo "Darwin host detected"
263 LDOPTS="$LDOPTS -ldl"
264 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
267 SunOS)
268 sigaltstack=`check_sigaltstack`
269 echo "*Solaris host detected"
271 GCCOPTS="$GCCOPTS -fPIC"
272 LDOPTS="$LDOPTS -ldl"
276 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
277 exit 1
279 esac
282 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
283 sdl=`findsdl $winbuild`
285 if [ -n `echo $app_type | grep "sdl"` ]; then
286 if [ -z "$sdl" ]; then
287 echo "configure didn't find sdl-config, which indicates that you"
288 echo "don't have SDL (properly) installed. Please correct and"
289 echo "re-run configure!"
290 exit 2
291 else
292 # generic sdl-config checker
293 GCCOPTS="$GCCOPTS `$sdl --cflags`"
294 LDOPTS="$LDOPTS `$sdl --libs`"
299 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
301 if test "X$win32crosscompile" != "Xyes"; then
302 case `uname -m` in
303 x86_64|amd64)
304 # fPIC is needed to make shared objects link
305 # setting visibility to hidden is necessary to avoid strange crashes
306 # due to symbol clashing
307 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
308 # x86_64 supports MMX by default
311 i686)
312 echo "Enabling MMX support"
313 GCCOPTS="$GCCOPTS -mmmx"
315 esac
317 id=$$
318 cat >$tmpdir/conftest-$id.c <<EOF
319 #include <stdio.h>
320 int main(int argc, char **argv)
322 int var=0;
323 char *varp = (char *)&var;
324 *varp=1;
326 printf("%d\n", var);
327 return 0;
331 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
333 # when cross compiling, the endianess cannot be detected because the above program doesn't run
334 # on the local machine. assume little endian but print a warning
335 endian=`$tmpdir/conftest-$id 2> /dev/null`
336 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
337 # big endian
338 endian="big"
339 else
340 # little endian
341 endian="little"
344 if [ "$CROSS_COMPILE" != "" ]; then
345 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
348 if [ "$app_type" = "sdl-sim" ]; then
349 echo "Simulator environment deemed $endian endian"
350 elif [ "$app_type" = "sdl-app" ]; then
351 echo "Application environment deemed $endian endian"
352 elif [ "$app_type" = "checkwps" ]; then
353 echo "CheckWPS environment deemed $endian endian"
356 # use wildcard here to make it work even if it was named *.exe like
357 # on cygwin
358 rm -f $tmpdir/conftest-$id*
359 else
360 # We are crosscompiling
361 # add cross-compiler option(s)
362 prefixtools i586-mingw32msvc-
363 LDOPTS="$LDOPTS -mconsole"
364 fibers=`check_fiber`
365 output="rockboxui.exe"
366 endian="little" # windows is little endian
367 echo "Enabling MMX support"
368 GCCOPTS="$GCCOPTS -mmmx"
371 thread_support=
372 if [ -z "$ARG_THREAD_SUPPORT" ] || [ "$ARG_THREAD_SUPPORT" = "0" ]; then
373 if [ "$sigaltstack" = "0" ]; then
374 thread_support="HAVE_SIGALTSTACK_THREADS"
375 LDOPTS="$LDOPTS -lpthread" # pthread needed
376 echo "Selected sigaltstack threads"
377 elif [ "$fibers" = "0" ]; then
378 thread_support="HAVE_WIN32_FIBER_THREADS"
379 echo "Selected Win32 Fiber threads"
383 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
384 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
385 thread_support="HAVE_SDL_THREADS"
386 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
387 echo "Selected SDL threads"
388 else
389 echo "WARNING: Falling back to SDL threads"
395 # functions for setting up cross-compiler names and options
396 # also set endianess and what the exact recommended gcc version is
397 # the gcc version should most likely match what versions we build with
398 # rockboxdev.sh
400 shcc () {
401 prefixtools sh-elf-
402 GCCOPTS="$CCOPTS -m1"
403 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
404 endian="big"
405 gccchoice="4.0.3"
408 calmrisccc () {
409 prefixtools calmrisc16-unknown-elf-
410 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
411 GCCOPTIMIZE="-fomit-frame-pointer"
412 endian="big"
415 coldfirecc () {
416 prefixtools m68k-elf-
417 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
418 GCCOPTIMIZE="-fomit-frame-pointer"
419 endian="big"
420 gccchoice="4.5.2"
423 arm7tdmicc () {
424 findarmgcc
425 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
426 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
427 GCCOPTS="$GCCOPTS -mlong-calls"
429 GCCOPTIMIZE="-fomit-frame-pointer"
430 endian="little"
433 arm9tdmicc () {
434 findarmgcc
435 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
436 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
437 GCCOPTS="$GCCOPTS -mlong-calls"
439 GCCOPTIMIZE="-fomit-frame-pointer"
440 endian="little"
443 arm940tbecc () {
444 findarmgcc
445 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
446 if test "$ARG_ARM_EABI" = "0"; then
447 GCCOPTS="$GCCOPTS -mlong-calls"
449 GCCOPTIMIZE="-fomit-frame-pointer"
450 endian="big"
453 arm940tcc () {
454 findarmgcc
455 GCCOPTS="$CCOPTS -mcpu=arm940t"
456 if test "$ARG_ARM_EABI" = "0"; then
457 GCCOPTS="$GCCOPTS -mlong-calls"
459 GCCOPTIMIZE="-fomit-frame-pointer"
460 endian="little"
463 arm946cc () {
464 findarmgcc
465 GCCOPTS="$CCOPTS -mcpu=arm9e"
466 if test "$ARG_ARM_EABI" = "0"; then
467 GCCOPTS="$GCCOPTS -mlong-calls"
469 GCCOPTIMIZE="-fomit-frame-pointer"
470 endian="little"
473 arm926ejscc () {
474 findarmgcc
475 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
476 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
477 GCCOPTS="$GCCOPTS -mlong-calls"
479 GCCOPTIMIZE="-fomit-frame-pointer"
480 endian="little"
483 arm1136jfscc () {
484 findarmgcc
485 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
486 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
487 GCCOPTS="$GCCOPTS -mlong-calls"
489 GCCOPTIMIZE="-fomit-frame-pointer"
490 endian="little"
493 arm1176jzscc () {
494 findarmgcc
495 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
496 if test "$ARG_ARM_EABI" = "0"; then
497 GCCOPTS="$GCCOPTS -mlong-calls"
499 GCCOPTIMIZE="-fomit-frame-pointer"
500 endian="little"
503 arm7ejscc () {
504 findarmgcc
505 GCCOPTS="$CCOPTS -march=armv5te"
506 GCCOPTIMIZE="-fomit-frame-pointer"
507 endian="little"
510 mipselcc () {
511 prefixtools mipsel-elf-
512 # mips is predefined, but we want it for paths. use __mips instead
513 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
514 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
515 GCCOPTIMIZE="-fomit-frame-pointer"
516 endian="little"
517 gccchoice="4.1.2"
520 maemocc () {
521 # Scratchbox sets up "gcc" based on the active target
522 prefixtools ""
524 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
525 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
526 GCCOPTIMIZE=''
527 LDOPTS="-lm -ldl $LDOPTS"
528 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
529 SHARED_FLAG="-shared"
530 endian="little"
531 thread_support="HAVE_SIGALTSTACK_THREADS"
533 is_n900=0
534 # Determine maemo version
535 if pkg-config --atleast-version=5 maemo-version; then
536 if [ "$1" == "4" ]; then
537 echo "ERROR: Maemo 4 SDK required."
538 exit 1
540 extradefines="$extradefines -DMAEMO5"
541 echo "Found N900 maemo version"
542 is_n900=1
543 elif pkg-config --atleast-version=4 maemo-version; then
544 if [ "$1" == "5" ]; then
545 echo "ERROR: Maemo 5 SDK required."
546 exit 1
548 extradefines="$extradefines -DMAEMO4"
549 echo "Found N8xx maemo version"
550 else
551 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
552 exit 1
555 # SDL
556 if [ $is_n900 -eq 1 ]; then
557 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
558 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
559 else
560 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
561 LDOPTS="$LDOPTS `sdl-config --libs`"
564 # glib and libosso support
565 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
566 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
568 # libhal support: Battery monitoring
569 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
570 LDOPTS="$LDOPTS `pkg-config --libs hal`"
572 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
573 if [ $is_n900 -eq 1 ]; then
574 # gstreamer support: Audio output.
575 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
576 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
578 # N900 specific: libplayback support
579 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
580 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
582 # N900 specific: Enable ARMv7 NEON support
583 if sb-conf show -A |grep -q -i arm; then
584 echo "Detected ARM target"
585 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
586 extradefines="$extradefines -DMAEMO_ARM_BUILD"
587 else
588 echo "Detected x86 target"
590 else
591 # N8xx specific: Enable armv5te instructions
592 if sb-conf show -A |grep -q -i arm; then
593 echo "Detected ARM target"
594 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
595 extradefines="$extradefines -DMAEMO_ARM_BUILD"
596 else
597 echo "Detected x86 target"
602 pandoracc () {
603 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
604 # You have to use the sebt3 toolchain:
605 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
607 PNDSDK="/usr/local/angstrom/arm"
608 if [ ! -x $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc ]; then
609 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
610 exit
613 PATH=$PNDSDK/bin:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi/usr/bin
614 PKG_CONFIG_PATH=$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib/pkgconfig
615 LDOPTS="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
616 PKG_CONFIG="pkg-config"
618 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
619 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
620 GCCOPTIMIZE=''
621 LDOPTS="-lm -ldl $LDOPTS"
622 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
623 SHARED_FLAG="-shared"
624 endian="little"
625 thread_support="HAVE_SIGALTSTACK_THREADS"
627 # Include path
628 GCCOPTS="-I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
630 # Set up compiler
631 gccchoice="4.3.3"
632 prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
634 # Detect SDL
635 GCCOPTS="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
636 LDOPTS="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
638 # Compiler options
639 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
640 GCCOPTS="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
641 GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant"
644 androidcc () {
645 if [ -z "$ANDROID_SDK_PATH" ]; then
646 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
647 echo "environment variable point to the root directory of the Android SDK."
648 exit
650 if [ -z "$ANDROID_NDK_PATH" ]; then
651 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
652 echo "environment variable point to the root directory of the Android NDK."
653 exit
655 buildhost=`uname | tr [:upper:] [:lower:]`
656 gccchoice="4.4.3"
657 gcctarget="arm-linux-androideabi-"
658 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
659 PATH=$PATH:$gccprefix/bin
660 prefixtools $gcctarget
661 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
662 GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
663 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
664 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
665 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
666 LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog"
667 endian="little"
668 SHARED_FLAG="-shared"
671 whichadvanced () {
672 atype=`echo "$1" | cut -c 2-`
673 ##################################################################
674 # Prompt for specific developer options
676 if [ "$atype" ]; then
677 interact=
678 else
679 interact=1
680 echo ""
681 printf "Enter your developer options (press only enter when done)\n\
682 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
683 (T)est plugins, S(m)all C lib:"
684 if [ "$memory" = "2" ]; then
685 printf ", (8)MB MOD"
687 if [ "$modelname" = "archosplayer" ]; then
688 printf ", Use (A)TA poweroff"
690 if [ "$t_model" = "ondio" ]; then
691 printf ", (B)acklight MOD"
693 if [ "$modelname" = "iaudiom5" ]; then
694 printf ", (F)M radio MOD"
696 if [ "$modelname" = "iriverh120" ]; then
697 printf ", (R)TC MOD"
699 echo ""
702 cont=1
703 while [ $cont = "1" ]; do
705 if [ "$interact" ]; then
706 option=`input`
707 else
708 option=`echo "$atype" | cut -c 1`
711 case $option in
712 [Dd])
713 if [ "yes" = "$profile" ]; then
714 echo "Debug is incompatible with profiling"
715 else
716 echo "DEBUG build enabled"
717 use_debug="yes"
720 [Ll])
721 echo "logf() support enabled"
722 logf="yes"
724 [Mm])
725 echo "Using Rockbox' small C library"
726 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
728 [Tt])
729 echo "Including test plugins"
730 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
732 [Cc])
733 echo "bootchart enabled (logf also enabled)"
734 bootchart="yes"
735 logf="yes"
737 [Ss])
738 echo "Simulator build enabled"
739 simulator="yes"
741 [Pp])
742 if [ "yes" = "$use_debug" ]; then
743 echo "Profiling is incompatible with debug"
744 else
745 echo "Profiling support is enabled"
746 profile="yes"
749 [Vv])
750 echo "Voice build selected"
751 voice="yes"
754 if [ "$memory" = "2" ]; then
755 memory="8"
756 echo "Memory size selected: 8MB"
759 [Aa])
760 if [ "$modelname" = "archosplayer" ]; then
761 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
762 echo "ATA power off enabled"
765 [Bb])
766 if [ "$t_model" = "ondio" ]; then
767 have_backlight="#define HAVE_BACKLIGHT"
768 echo "Backlight functions enabled"
771 [Ff])
772 if [ "$modelname" = "iaudiom5" ]; then
773 have_fmradio_in="#define HAVE_FMRADIO_IN"
774 echo "FM radio functions enabled"
777 [Rr])
778 if [ "$modelname" = "iriverh120" ]; then
779 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
780 have_rtc_alarm="#define HAVE_RTC_ALARM"
781 echo "RTC functions enabled (DS1339/DS3231)"
784 [Ww])
785 echo "Enabling Windows 32 cross-compiling"
786 win32crosscompile="yes"
788 "") # Match enter press when finished with advanced options
789 cont=0
792 echo "[ERROR] Option $option unsupported"
794 esac
795 if [ "$interact" ]; then
796 btype="$btype$option"
797 else
798 atype=`echo "$atype" | cut -c 2-`
799 [ "$atype" ] || cont=0
801 done
802 echo "done"
804 if [ "yes" = "$voice" ]; then
805 # Ask about languages to build
806 picklang
807 voicelanguage=`whichlang`
808 echo "Voice language set to $voicelanguage"
810 # Configure encoder and TTS engine for each language
811 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
812 voiceconfig "$thislang"
813 done
815 if [ "yes" = "$use_debug" ]; then
816 debug="-DDEBUG"
817 GCCOPTS="$GCCOPTS -g -DDEBUG"
819 if [ "yes" = "$logf" ]; then
820 use_logf="#define ROCKBOX_HAS_LOGF 1"
822 if [ "yes" = "$bootchart" ]; then
823 use_bootchart="#define DO_BOOTCHART 1"
825 if [ "yes" = "$simulator" ]; then
826 debug="-DDEBUG"
827 extradefines="$extradefines -DSIMULATOR"
828 archosrom=""
829 flash=""
831 if [ "yes" = "$profile" ]; then
832 extradefines="$extradefines -DRB_PROFILE"
833 PROFILE_OPTS="-finstrument-functions"
837 # Configure voice settings
838 voiceconfig () {
839 thislang=$1
840 if [ ! "$ARG_TTS" ]; then
841 echo "Building $thislang voice for $modelname. Select options"
842 echo ""
845 if [ -n "`findtool flite`" ]; then
846 FLITE="F(l)ite "
847 FLITE_OPTS=""
848 DEFAULT_TTS="flite"
849 DEFAULT_TTS_OPTS=$FLITE_OPTS
850 DEFAULT_NOISEFLOOR="500"
851 DEFAULT_CHOICE="L"
853 if [ -n "`findtool espeak`" ]; then
854 ESPEAK="(e)Speak "
855 ESPEAK_OPTS=""
856 DEFAULT_TTS="espeak"
857 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
858 DEFAULT_NOISEFLOOR="500"
859 DEFAULT_CHOICE="e"
861 if [ -n "`findtool festival`" ]; then
862 FESTIVAL="(F)estival "
863 case "$thislang" in
864 "italiano")
865 FESTIVAL_OPTS="--language italian"
867 "espanol")
868 FESTIVAL_OPTS="--language spanish"
870 "finnish")
871 FESTIVAL_OPTS="--language finnish"
873 "czech")
874 FESTIVAL_OPTS="--language czech"
877 FESTIVAL_OPTS=""
879 esac
880 DEFAULT_TTS="festival"
881 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
882 DEFAULT_NOISEFLOOR="500"
883 DEFAULT_CHOICE="F"
885 if [ -n "`findtool swift`" ]; then
886 SWIFT="S(w)ift "
887 SWIFT_OPTS=""
888 DEFAULT_TTS="swift"
889 DEFAULT_TTS_OPTS=$SWIFT_OPTS
890 DEFAULT_NOISEFLOOR="500"
891 DEFAULT_CHOICE="w"
893 # Allow SAPI if Windows is in use
894 if [ -n "`findtool winver`" ]; then
895 SAPI="(S)API "
896 SAPI_OPTS=""
897 DEFAULT_TTS="sapi"
898 DEFAULT_TTS_OPTS=$SAPI_OPTS
899 DEFAULT_NOISEFLOOR="500"
900 DEFAULT_CHOICE="S"
903 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
904 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
905 exit 3
908 if [ "$ARG_TTS" ]; then
909 option=$ARG_TTS
910 else
911 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
912 option=`input`
914 advopts="$advopts --tts=$option"
915 case "$option" in
916 [Ll])
917 TTS_ENGINE="flite"
918 NOISEFLOOR="500" # TODO: check this value
919 TTS_OPTS=$FLITE_OPTS
921 [Ee])
922 TTS_ENGINE="espeak"
923 NOISEFLOOR="500"
924 TTS_OPTS=$ESPEAK_OPTS
926 [Ff])
927 TTS_ENGINE="festival"
928 NOISEFLOOR="500"
929 TTS_OPTS=$FESTIVAL_OPTS
931 [Ss])
932 TTS_ENGINE="sapi"
933 NOISEFLOOR="500"
934 TTS_OPTS=$SAPI_OPTS
936 [Ww])
937 TTS_ENGINE="swift"
938 NOISEFLOOR="500"
939 TTS_OPTS=$SWIFT_OPTS
942 TTS_ENGINE=$DEFAULT_TTS
943 TTS_OPTS=$DEFAULT_TTS_OPTS
944 NOISEFLOOR=$DEFAULT_NOISEFLOOR
945 esac
946 echo "Using $TTS_ENGINE for TTS"
948 # Select which voice to use for Festival
949 if [ "$TTS_ENGINE" = "festival" ]; then
950 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
951 for voice in $voicelist; do
952 TTS_FESTIVAL_VOICE="$voice" # Default choice
953 break
954 done
955 if [ "$ARG_VOICE" ]; then
956 CHOICE=$ARG_VOICE
957 else
959 for voice in $voicelist; do
960 printf "%3d. %s\n" "$i" "$voice"
961 i=`expr $i + 1`
962 done
963 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
964 CHOICE=`input`
967 for voice in $voicelist; do
968 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
969 TTS_FESTIVAL_VOICE="$voice"
971 i=`expr $i + 1`
972 done
973 advopts="$advopts --voice=$CHOICE"
974 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
975 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
978 # Read custom tts options from command line
979 if [ "$ARG_TTSOPTS" ]; then
980 TTS_OPTS="$ARG_TTSOPTS"
981 advopts="$advopts --ttsopts='$TTS_OPTS'"
982 echo "$TTS_ENGINE options set to $TTS_OPTS"
985 if [ "$swcodec" = "yes" ]; then
986 ENCODER="rbspeexenc"
987 ENC_CMD="rbspeexenc"
988 ENC_OPTS="-q 4 -c 10"
989 else
990 if [ -n "`findtool lame`" ]; then
991 ENCODER="lame"
992 ENC_CMD="lame"
993 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
994 else
995 echo "You need LAME in the system path to build voice files for"
996 echo "HWCODEC targets."
997 exit 4
1001 echo "Using $ENCODER for encoding voice clips"
1003 # Read custom encoder options from command line
1004 if [ "$ARG_ENCOPTS" ]; then
1005 ENC_OPTS="$ARG_ENCOPTS"
1006 advopts="$advopts --encopts='$ENC_OPTS'"
1007 echo "$ENCODER options set to $ENC_OPTS"
1010 TEMPDIR="${pwd}"
1011 if [ -n "`findtool cygpath`" ]; then
1012 TEMPDIR=`cygpath . -a -w`
1016 picklang() {
1017 # figure out which languages that are around
1018 for file in $rootdir/apps/lang/*.lang; do
1019 clean=`basename $file .lang`
1020 langs="$langs $clean"
1021 done
1023 if [ "$ARG_LANG" ]; then
1024 pick=$ARG_LANG
1025 else
1026 echo "Select a number for the language to use (default is english)"
1027 # FIXME The multiple-language feature is currently broken
1028 # echo "You may enter a comma-separated list of languages to build"
1030 num=1
1031 for one in $langs; do
1032 echo "$num. $one"
1033 num=`expr $num + 1`
1034 done
1035 pick=`input`
1037 advopts="$advopts --language=$pick"
1040 whichlang() {
1041 output=""
1042 # Allow the user to pass a comma-separated list of langauges
1043 for thispick in `echo $pick | sed 's/,/ /g'`; do
1044 num=1
1045 for one in $langs; do
1046 # Accept both the language number and name
1047 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
1048 if [ "$output" = "" ]; then
1049 output=$one
1050 else
1051 output=$output,$one
1054 num=`expr $num + 1`
1055 done
1056 done
1057 if [ -z "$output" ]; then
1058 # pick a default
1059 output="english"
1061 echo $output
1064 help() {
1065 echo "Rockbox configure script."
1066 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1067 echo "Do *NOT* run this within the tools directory!"
1068 echo ""
1069 cat <<EOF
1070 Usage: configure [OPTION]...
1071 Options:
1072 --target=TARGET Sets the target, TARGET can be either the target ID or
1073 corresponding string. Run without this option to see all
1074 available targets.
1076 --ram=RAM Sets the RAM for certain targets. Even though any number
1077 is accepted, not every number is correct. The default
1078 value will be applied, if you entered a wrong number
1079 (which depends on the target). Watch the output. Run
1080 without this option if you are not sure which the right
1081 number is.
1083 --type=TYPE Sets the build type. Shortcuts are also valid.
1084 Run without this option to see all available types.
1085 Multiple values are allowed and managed in the input
1086 order. So --type=b stands for Bootloader build, while
1087 --type=ab stands for "Backlight MOD" build.
1089 --language=LANG Set the language used for voice generation (used only if
1090 TYPE is AV).
1092 --tts=ENGINE Set the TTS engine used for voice generation (used only
1093 if TYPE is AV).
1095 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1096 AV).
1098 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1100 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1102 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1103 This is useful for having multiple alternate builds on
1104 your device that you can load with ROLO. However as the
1105 bootloader looks for .rockbox you won't be able to boot
1106 into this build.
1108 --ccache Enable ccache use (done by default these days)
1109 --no-ccache Disable ccache use
1111 --eabi Make configure prefer toolchains that are able to compile
1112 for the new ARM standard abi EABI
1113 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1114 --thumb Build with -mthumb (for ARM builds)
1115 --no-thumb The opposite of --thumb (don't use thumb even for targets
1116 where this is the default
1117 --sdl-threads Force use of SDL threads. They have inferior performance,
1118 but are better debuggable with GDB
1119 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1120 behavior of falling back to them if no native thread
1121 support was found.
1122 --prefix Target installation directory
1123 --help Shows this message (must not be used with other options)
1127 exit
1130 ARG_CCACHE=
1131 ARG_ENCOPTS=
1132 ARG_LANG=
1133 ARG_RAM=
1134 ARG_RBDIR=
1135 ARG_TARGET=
1136 ARG_TTS=
1137 ARG_TTSOPTS=
1138 ARG_TYPE=
1139 ARG_VOICE=
1140 ARG_ARM_EABI=
1141 ARG_ARM_THUMB=
1142 ARG_PREFIX="$PREFIX"
1143 ARG_THREAD_SUPPORT=
1144 err=
1145 for arg in "$@"; do
1146 case "$arg" in
1147 --ccache) ARG_CCACHE=1;;
1148 --no-ccache) ARG_CCACHE=0;;
1149 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1150 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
1151 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1152 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
1153 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1154 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1155 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1156 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1157 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1158 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1159 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
1160 --eabi) ARG_ARM_EABI=1;;
1161 --no-eabi) ARG_ARM_EABI=0;;
1162 --thumb) ARG_ARM_THUMB=1;;
1163 --no-thumb) ARG_ARM_THUMB=0;;
1164 --sdl-threads)ARG_THREAD_SUPPORT=1;;
1165 --no-sdl-threads)
1166 ARG_THREAD_SUPPORT=0;;
1167 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
1168 --help) help;;
1169 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1170 esac
1171 done
1172 [ "$err" ] && exit 1
1174 advopts=
1176 if [ "$TMPDIR" != "" ]; then
1177 tmpdir=$TMPDIR
1178 else
1179 tmpdir=/tmp
1181 echo Using temporary directory $tmpdir
1183 if test -r "configure"; then
1184 # this is a check for a configure script in the current directory, it there
1185 # is one, try to figure out if it is this one!
1187 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1188 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1189 echo "It will only cause you pain and grief. Instead do this:"
1190 echo ""
1191 echo " cd .."
1192 echo " mkdir build-dir"
1193 echo " cd build-dir"
1194 echo " ../tools/configure"
1195 echo ""
1196 echo "Much happiness will arise from this. Enjoy"
1197 exit 5
1201 # get our current directory
1202 pwd=`pwd`;
1204 if { echo $pwd | grep " "; } then
1205 echo "You're running this script in a path that contains space. The build"
1206 echo "system is unfortunately not clever enough to deal with this. Please"
1207 echo "run the script from a different path, rename the path or fix the build"
1208 echo "system!"
1209 exit 6
1212 if [ -z "$rootdir" ]; then
1213 ##################################################################
1214 # Figure out where the source code root is!
1216 rootdir=`dirname $0`/../
1218 #####################################################################
1219 # Convert the possibly relative directory name to an absolute version
1221 now=`pwd`
1222 cd $rootdir
1223 rootdir=`pwd`
1225 # cd back to the build dir
1226 cd $now
1229 apps="apps"
1230 appsdir='\$(ROOTDIR)/apps'
1231 firmdir='\$(ROOTDIR)/firmware'
1232 toolsdir='\$(ROOTDIR)/tools'
1235 ##################################################################
1236 # Figure out target platform
1239 if [ "$ARG_TARGET" ]; then
1240 buildfor=$ARG_TARGET
1241 else
1242 echo "Enter target platform:"
1243 cat <<EOF
1244 ==Archos== ==iriver== ==Apple iPod==
1245 0) Player/Studio 10) H120/H140 20) Color/Photo
1246 1) Recorder 11) H320/H340 21) Nano 1G
1247 2) FM Recorder 12) iHP-100/110/115 22) Video
1248 3) Recorder v2 13) iFP-790 23) 3G
1249 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1250 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1251 6) AV300 26) Mini 2G
1252 ==Toshiba== 27) 1G, 2G
1253 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1254 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1255 31) M5/M5L
1256 32) 7 ==Olympus= ==SanDisk==
1257 33) D2 70) M:Robe 500 50) Sansa e200
1258 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1259 52) Sansa c200
1260 ==Creative== ==Philips== 53) Sansa m200
1261 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1262 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1263 92) Zen Vision HDD1830 56) Sansa e200v2
1264 102) GoGear HDD6330 57) Sansa m200v4
1265 ==Onda== 58) Sansa Fuze
1266 120) VX747 ==Meizu== 59) Sansa c200v2
1267 121) VX767 110) M6SL 60) Sansa Clipv2
1268 122) VX747+ 111) M6SP 61) Sansa View
1269 123) VX777 112) M3 62) Sansa Clip+
1270 63) Sansa Fuze v2
1271 ==Samsung== ==Tatung== 64) Sansa Fuze+
1272 140) YH-820 150) Elio TPJ-1022
1273 141) YH-920 ==Logik==
1274 142) YH-925 ==Packard Bell== 80) DAX 1GB MP3/DAB
1275 143) YP-S3 160) Vibe 500
1276 ==Lyre project==
1277 ==Application== ==MPIO== 130) Lyre proto 1
1278 200) SDL 170) HD200 131) Mini2440
1279 201) Android 171) HD300
1280 202) Nokia N8xx
1281 203) Nokia N900 ==ROCKCHIP==
1282 204) Pandora 180) rk27xx generic
1286 buildfor=`input`;
1289 # Set of tools built for all target platforms:
1290 toolset="rdf2binary convbdf codepages"
1292 # Toolsets for some target families:
1293 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1294 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1295 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1296 ipodbitmaptools="$toolset scramble bmp2rb"
1297 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1298 tccbitmaptools="$toolset scramble bmp2rb"
1299 # generic is used by IFP, Meizu and Onda
1300 genericbitmaptools="$toolset bmp2rb"
1301 # scramble is used by all other targets
1302 scramblebitmaptools="$genericbitmaptools scramble"
1305 # ---- For each target ----
1307 # *Variables*
1308 # target_id: a unique number identifying this target, IS NOT the menu number.
1309 # Just use the currently highest number+1 when you add a new
1310 # target.
1311 # modelname: short model name used all over to identify this target
1312 # memory: number of megabytes of RAM this target has. If the amount can
1313 # be selected by the size prompt, let memory be unset here
1314 # target: -Ddefine passed to the build commands to make the correct
1315 # config-*.h file get included etc
1316 # tool: the tool that takes a plain binary and converts that into a
1317 # working "firmware" file for your target
1318 # output: the final output file name
1319 # boottool: the tool that takes a plain binary and generates a bootloader
1320 # file for your target (or blank to use $tool)
1321 # bootoutput:the final output file name for the bootloader (or blank to use
1322 # $output)
1323 # appextra: passed to the APPEXTRA variable in the Makefiles.
1324 # TODO: add proper explanation
1325 # archosrom: used only for Archos targets that build a special flashable .ucl
1326 # image.
1327 # flash: name of output for flashing, for targets where there's a special
1328 # file output for this.
1329 # plugins: set to 'yes' to build the plugins. Early development builds can
1330 # set this to no in the early stages to have an easier life for a
1331 # while
1332 # swcodec: set 'yes' on swcodec targets
1333 # toolset: lists what particular tools in the tools/ directory that this
1334 # target needs to have built prior to building Rockbox
1336 # *Functions*
1337 # *cc: sets up gcc and compiler options for your target builds. Note
1338 # that if you select a simulator build, the compiler selection is
1339 # overridden later in the script.
1341 case $buildfor in
1343 0|archosplayer)
1344 target_id=1
1345 modelname="archosplayer"
1346 target="-DARCHOS_PLAYER"
1347 shcc
1348 tool="$rootdir/tools/scramble"
1349 output="archos.mod"
1350 appextra="player:gui"
1351 archosrom="$pwd/rombox.ucl"
1352 flash="$pwd/rockbox.ucl"
1353 plugins="yes"
1354 swcodec=""
1356 # toolset is the tools within the tools directory that we build for
1357 # this particular target.
1358 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1360 # Note: the convbdf is present in the toolset just because: 1) the
1361 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1362 # build the player simulator
1364 t_cpu="sh"
1365 t_manufacturer="archos"
1366 t_model="player"
1369 1|archosrecorder)
1370 target_id=2
1371 modelname="archosrecorder"
1372 target="-DARCHOS_RECORDER"
1373 shcc
1374 tool="$rootdir/tools/scramble"
1375 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1376 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1377 output="ajbrec.ajz"
1378 appextra="recorder:gui:radio"
1379 #archosrom="$pwd/rombox.ucl"
1380 flash="$pwd/rockbox.ucl"
1381 plugins="yes"
1382 swcodec=""
1383 # toolset is the tools within the tools directory that we build for
1384 # this particular target.
1385 toolset=$archosbitmaptools
1386 t_cpu="sh"
1387 t_manufacturer="archos"
1388 t_model="recorder"
1391 2|archosfmrecorder)
1392 target_id=3
1393 modelname="archosfmrecorder"
1394 target="-DARCHOS_FMRECORDER"
1395 shcc
1396 tool="$rootdir/tools/scramble -fm"
1397 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1398 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1399 output="ajbrec.ajz"
1400 appextra="recorder:gui:radio"
1401 #archosrom="$pwd/rombox.ucl"
1402 flash="$pwd/rockbox.ucl"
1403 plugins="yes"
1404 swcodec=""
1405 # toolset is the tools within the tools directory that we build for
1406 # this particular target.
1407 toolset=$archosbitmaptools
1408 t_cpu="sh"
1409 t_manufacturer="archos"
1410 t_model="fm_v2"
1413 3|archosrecorderv2)
1414 target_id=4
1415 modelname="archosrecorderv2"
1416 target="-DARCHOS_RECORDERV2"
1417 shcc
1418 tool="$rootdir/tools/scramble -v2"
1419 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1420 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1421 output="ajbrec.ajz"
1422 appextra="recorder:gui:radio"
1423 #archosrom="$pwd/rombox.ucl"
1424 flash="$pwd/rockbox.ucl"
1425 plugins="yes"
1426 swcodec=""
1427 # toolset is the tools within the tools directory that we build for
1428 # this particular target.
1429 toolset=$archosbitmaptools
1430 t_cpu="sh"
1431 t_manufacturer="archos"
1432 t_model="fm_v2"
1435 4|archosondiosp)
1436 target_id=7
1437 modelname="archosondiosp"
1438 target="-DARCHOS_ONDIOSP"
1439 shcc
1440 tool="$rootdir/tools/scramble -osp"
1441 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1442 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1443 output="ajbrec.ajz"
1444 appextra="recorder:gui:radio"
1445 #archosrom="$pwd/rombox.ucl"
1446 flash="$pwd/rockbox.ucl"
1447 plugins="yes"
1448 swcodec=""
1449 # toolset is the tools within the tools directory that we build for
1450 # this particular target.
1451 toolset=$archosbitmaptools
1452 t_cpu="sh"
1453 t_manufacturer="archos"
1454 t_model="ondio"
1457 5|archosondiofm)
1458 target_id=8
1459 modelname="archosondiofm"
1460 target="-DARCHOS_ONDIOFM"
1461 shcc
1462 tool="$rootdir/tools/scramble -ofm"
1463 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1464 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1465 output="ajbrec.ajz"
1466 appextra="recorder:gui:radio"
1467 #archosrom="$pwd/rombox.ucl"
1468 flash="$pwd/rockbox.ucl"
1469 plugins="yes"
1470 swcodec=""
1471 toolset=$archosbitmaptools
1472 t_cpu="sh"
1473 t_manufacturer="archos"
1474 t_model="ondio"
1477 6|archosav300)
1478 target_id=38
1479 modelname="archosav300"
1480 target="-DARCHOS_AV300"
1481 memory=16 # always
1482 arm7tdmicc
1483 tool="$rootdir/tools/scramble -mm=C"
1484 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1485 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1486 output="cjbm.ajz"
1487 appextra="recorder:gui:radio"
1488 plugins="yes"
1489 swcodec=""
1490 # toolset is the tools within the tools directory that we build for
1491 # this particular target.
1492 toolset="$toolset scramble descramble bmp2rb"
1493 # architecture, manufacturer and model for the target-tree build
1494 t_cpu="arm"
1495 t_manufacturer="archos"
1496 t_model="av300"
1499 10|iriverh120)
1500 target_id=9
1501 modelname="iriverh120"
1502 target="-DIRIVER_H120"
1503 memory=32 # always
1504 coldfirecc
1505 tool="$rootdir/tools/scramble -add=h120"
1506 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1507 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1508 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1509 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1510 output="rockbox.iriver"
1511 bootoutput="bootloader.iriver"
1512 appextra="recorder:gui:radio"
1513 flash="$pwd/rombox.iriver"
1514 plugins="yes"
1515 swcodec="yes"
1516 # toolset is the tools within the tools directory that we build for
1517 # this particular target.
1518 toolset=$iriverbitmaptools
1519 t_cpu="coldfire"
1520 t_manufacturer="iriver"
1521 t_model="h100"
1524 11|iriverh300)
1525 target_id=10
1526 modelname="iriverh300"
1527 target="-DIRIVER_H300"
1528 memory=32 # always
1529 coldfirecc
1530 tool="$rootdir/tools/scramble -add=h300"
1531 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1532 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1533 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1534 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1535 output="rockbox.iriver"
1536 appextra="recorder:gui:radio"
1537 plugins="yes"
1538 swcodec="yes"
1539 # toolset is the tools within the tools directory that we build for
1540 # this particular target.
1541 toolset=$iriverbitmaptools
1542 t_cpu="coldfire"
1543 t_manufacturer="iriver"
1544 t_model="h300"
1547 12|iriverh100)
1548 target_id=11
1549 modelname="iriverh100"
1550 target="-DIRIVER_H100"
1551 memory=16 # always
1552 coldfirecc
1553 tool="$rootdir/tools/scramble -add=h100"
1554 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1555 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1556 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1557 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1558 output="rockbox.iriver"
1559 bootoutput="bootloader.iriver"
1560 appextra="recorder:gui:radio"
1561 flash="$pwd/rombox.iriver"
1562 plugins="yes"
1563 swcodec="yes"
1564 # toolset is the tools within the tools directory that we build for
1565 # this particular target.
1566 toolset=$iriverbitmaptools
1567 t_cpu="coldfire"
1568 t_manufacturer="iriver"
1569 t_model="h100"
1572 13|iriverifp7xx)
1573 target_id=19
1574 modelname="iriverifp7xx"
1575 target="-DIRIVER_IFP7XX"
1576 memory=1
1577 arm7tdmicc short
1578 tool="cp"
1579 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1580 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1581 output="rockbox.wma"
1582 appextra="recorder:gui:radio"
1583 plugins="yes"
1584 swcodec="yes"
1585 # toolset is the tools within the tools directory that we build for
1586 # this particular target.
1587 toolset=$genericbitmaptools
1588 t_cpu="arm"
1589 t_manufacturer="pnx0101"
1590 t_model="iriver-ifp7xx"
1593 14|iriverh10)
1594 target_id=22
1595 modelname="iriverh10"
1596 target="-DIRIVER_H10"
1597 memory=32 # always
1598 arm7tdmicc
1599 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1600 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1601 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1602 output="rockbox.mi4"
1603 appextra="recorder:gui:radio"
1604 plugins="yes"
1605 swcodec="yes"
1606 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1607 bootoutput="H10_20GC.mi4"
1608 # toolset is the tools within the tools directory that we build for
1609 # this particular target.
1610 toolset=$scramblebitmaptools
1611 # architecture, manufacturer and model for the target-tree build
1612 t_cpu="arm"
1613 t_manufacturer="iriver"
1614 t_model="h10"
1617 15|iriverh10_5gb)
1618 target_id=24
1619 modelname="iriverh10_5gb"
1620 target="-DIRIVER_H10_5GB"
1621 memory=32 # always
1622 arm7tdmicc
1623 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1624 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1625 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1626 output="rockbox.mi4"
1627 appextra="recorder:gui:radio"
1628 plugins="yes"
1629 swcodec="yes"
1630 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1631 bootoutput="H10.mi4"
1632 # toolset is the tools within the tools directory that we build for
1633 # this particular target.
1634 toolset=$scramblebitmaptools
1635 # architecture, manufacturer and model for the target-tree build
1636 t_cpu="arm"
1637 t_manufacturer="iriver"
1638 t_model="h10"
1641 20|ipodcolor)
1642 target_id=13
1643 modelname="ipodcolor"
1644 target="-DIPOD_COLOR"
1645 memory=32 # always
1646 arm7tdmicc
1647 tool="$rootdir/tools/scramble -add=ipco"
1648 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1649 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1650 output="rockbox.ipod"
1651 appextra="recorder:gui:radio"
1652 plugins="yes"
1653 swcodec="yes"
1654 bootoutput="bootloader-$modelname.ipod"
1655 # toolset is the tools within the tools directory that we build for
1656 # this particular target.
1657 toolset=$ipodbitmaptools
1658 # architecture, manufacturer and model for the target-tree build
1659 t_cpu="arm"
1660 t_manufacturer="ipod"
1661 t_model="color"
1664 21|ipodnano1g)
1665 target_id=14
1666 modelname="ipodnano1g"
1667 target="-DIPOD_NANO"
1668 memory=32 # always
1669 arm7tdmicc
1670 tool="$rootdir/tools/scramble -add=nano"
1671 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1672 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1673 output="rockbox.ipod"
1674 appextra="recorder:gui:radio"
1675 plugins="yes"
1676 swcodec="yes"
1677 bootoutput="bootloader-$modelname.ipod"
1678 # toolset is the tools within the tools directory that we build for
1679 # this particular target.
1680 toolset=$ipodbitmaptools
1681 # architecture, manufacturer and model for the target-tree build
1682 t_cpu="arm"
1683 t_manufacturer="ipod"
1684 t_model="nano"
1687 22|ipodvideo)
1688 target_id=15
1689 modelname="ipodvideo"
1690 target="-DIPOD_VIDEO"
1691 memory=64 # always. This is reduced at runtime if needed
1692 arm7tdmicc
1693 tool="$rootdir/tools/scramble -add=ipvd"
1694 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1695 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1696 output="rockbox.ipod"
1697 appextra="recorder:gui:radio"
1698 plugins="yes"
1699 swcodec="yes"
1700 bootoutput="bootloader-$modelname.ipod"
1701 # toolset is the tools within the tools directory that we build for
1702 # this particular target.
1703 toolset=$ipodbitmaptools
1704 # architecture, manufacturer and model for the target-tree build
1705 t_cpu="arm"
1706 t_manufacturer="ipod"
1707 t_model="video"
1710 23|ipod3g)
1711 target_id=16
1712 modelname="ipod3g"
1713 target="-DIPOD_3G"
1714 memory=32 # always
1715 arm7tdmicc
1716 tool="$rootdir/tools/scramble -add=ip3g"
1717 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1718 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1719 output="rockbox.ipod"
1720 appextra="recorder:gui:radio"
1721 plugins="yes"
1722 swcodec="yes"
1723 bootoutput="bootloader-$modelname.ipod"
1724 # toolset is the tools within the tools directory that we build for
1725 # this particular target.
1726 toolset=$ipodbitmaptools
1727 # architecture, manufacturer and model for the target-tree build
1728 t_cpu="arm"
1729 t_manufacturer="ipod"
1730 t_model="3g"
1733 24|ipod4g)
1734 target_id=17
1735 modelname="ipod4g"
1736 target="-DIPOD_4G"
1737 memory=32 # always
1738 arm7tdmicc
1739 tool="$rootdir/tools/scramble -add=ip4g"
1740 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1741 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1742 output="rockbox.ipod"
1743 appextra="recorder:gui:radio"
1744 plugins="yes"
1745 swcodec="yes"
1746 bootoutput="bootloader-$modelname.ipod"
1747 # toolset is the tools within the tools directory that we build for
1748 # this particular target.
1749 toolset=$ipodbitmaptools
1750 # architecture, manufacturer and model for the target-tree build
1751 t_cpu="arm"
1752 t_manufacturer="ipod"
1753 t_model="4g"
1756 25|ipodmini1g)
1757 target_id=18
1758 modelname="ipodmini1g"
1759 target="-DIPOD_MINI"
1760 memory=32 # always
1761 arm7tdmicc
1762 tool="$rootdir/tools/scramble -add=mini"
1763 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1764 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1765 output="rockbox.ipod"
1766 appextra="recorder:gui:radio"
1767 plugins="yes"
1768 swcodec="yes"
1769 bootoutput="bootloader-$modelname.ipod"
1770 # toolset is the tools within the tools directory that we build for
1771 # this particular target.
1772 toolset=$ipodbitmaptools
1773 # architecture, manufacturer and model for the target-tree build
1774 t_cpu="arm"
1775 t_manufacturer="ipod"
1776 t_model="mini"
1779 26|ipodmini2g)
1780 target_id=21
1781 modelname="ipodmini2g"
1782 target="-DIPOD_MINI2G"
1783 memory=32 # always
1784 arm7tdmicc
1785 tool="$rootdir/tools/scramble -add=mn2g"
1786 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1787 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1788 output="rockbox.ipod"
1789 appextra="recorder:gui:radio"
1790 plugins="yes"
1791 swcodec="yes"
1792 bootoutput="bootloader-$modelname.ipod"
1793 # toolset is the tools within the tools directory that we build for
1794 # this particular target.
1795 toolset=$ipodbitmaptools
1796 # architecture, manufacturer and model for the target-tree build
1797 t_cpu="arm"
1798 t_manufacturer="ipod"
1799 t_model="mini2g"
1802 27|ipod1g2g)
1803 target_id=29
1804 modelname="ipod1g2g"
1805 target="-DIPOD_1G2G"
1806 memory=32 # always
1807 arm7tdmicc
1808 tool="$rootdir/tools/scramble -add=1g2g"
1809 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1810 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1811 output="rockbox.ipod"
1812 appextra="recorder:gui:radio"
1813 plugins="yes"
1814 swcodec="yes"
1815 bootoutput="bootloader-$modelname.ipod"
1816 # toolset is the tools within the tools directory that we build for
1817 # this particular target.
1818 toolset=$ipodbitmaptools
1819 # architecture, manufacturer and model for the target-tree build
1820 t_cpu="arm"
1821 t_manufacturer="ipod"
1822 t_model="1g2g"
1825 28|ipodnano2g)
1826 target_id=62
1827 modelname="ipodnano2g"
1828 target="-DIPOD_NANO2G"
1829 memory=32 # always
1830 arm940tcc
1831 tool="$rootdir/tools/scramble -add=nn2g"
1832 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1833 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1834 output="rockbox.ipod"
1835 appextra="recorder:gui:radio"
1836 plugins="yes"
1837 swcodec="yes"
1838 bootoutput="bootloader-$modelname.ipod"
1839 # toolset is the tools within the tools directory that we build for
1840 # this particular target.
1841 toolset=$ipodbitmaptools
1842 # architecture, manufacturer and model for the target-tree build
1843 t_cpu="arm"
1844 t_manufacturer="s5l8700"
1845 t_model="ipodnano2g"
1848 29|ipod6g)
1849 target_id=71
1850 modelname="ipod6g"
1851 target="-DIPOD_6G"
1852 memory=64 # always
1853 arm926ejscc
1854 tool="$rootdir/tools/scramble -add=ip6g"
1855 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1856 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1857 output="rockbox.ipod"
1858 appextra="recorder:gui:radio"
1859 plugins="yes"
1860 swcodec="yes"
1861 bootoutput="bootloader-$modelname.ipod"
1862 # toolset is the tools within the tools directory that we build for
1863 # this particular target.
1864 toolset=$ipodbitmaptools
1865 # architecture, manufacturer and model for the target-tree build
1866 t_cpu="arm"
1867 t_manufacturer="s5l8702"
1868 t_model="ipod6g"
1871 30|iaudiox5)
1872 target_id=12
1873 modelname="iaudiox5"
1874 target="-DIAUDIO_X5"
1875 memory=16 # always
1876 coldfirecc
1877 tool="$rootdir/tools/scramble -add=iax5"
1878 boottool="$rootdir/tools/scramble -iaudiox5"
1879 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1880 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1881 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1882 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1883 output="rockbox.iaudio"
1884 bootoutput="x5_fw.bin"
1885 appextra="recorder:gui:radio"
1886 plugins="yes"
1887 swcodec="yes"
1888 # toolset is the tools within the tools directory that we build for
1889 # this particular target.
1890 toolset="$iaudiobitmaptools"
1891 # architecture, manufacturer and model for the target-tree build
1892 t_cpu="coldfire"
1893 t_manufacturer="iaudio"
1894 t_model="x5"
1897 31|iaudiom5)
1898 target_id=28
1899 modelname="iaudiom5"
1900 target="-DIAUDIO_M5"
1901 memory=16 # always
1902 coldfirecc
1903 tool="$rootdir/tools/scramble -add=iam5"
1904 boottool="$rootdir/tools/scramble -iaudiom5"
1905 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1906 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1907 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1908 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1909 output="rockbox.iaudio"
1910 bootoutput="m5_fw.bin"
1911 appextra="recorder:gui:radio"
1912 plugins="yes"
1913 swcodec="yes"
1914 # toolset is the tools within the tools directory that we build for
1915 # this particular target.
1916 toolset="$iaudiobitmaptools"
1917 # architecture, manufacturer and model for the target-tree build
1918 t_cpu="coldfire"
1919 t_manufacturer="iaudio"
1920 t_model="m5"
1923 32|iaudio7)
1924 target_id=32
1925 modelname="iaudio7"
1926 target="-DIAUDIO_7"
1927 memory=16 # always
1928 arm946cc
1929 tool="$rootdir/tools/scramble -add=i7"
1930 boottool="$rootdir/tools/scramble -tcc=crc"
1931 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1932 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1933 output="rockbox.iaudio"
1934 appextra="recorder:gui:radio"
1935 plugins="yes"
1936 swcodec="yes"
1937 bootoutput="I7_FW.BIN"
1938 # toolset is the tools within the tools directory that we build for
1939 # this particular target.
1940 toolset="$tccbitmaptools"
1941 # architecture, manufacturer and model for the target-tree build
1942 t_cpu="arm"
1943 t_manufacturer="tcc77x"
1944 t_model="iaudio7"
1947 33|cowond2)
1948 target_id=34
1949 modelname="cowond2"
1950 target="-DCOWON_D2"
1951 memory=32
1952 arm926ejscc
1953 tool="$rootdir/tools/scramble -add=d2"
1954 boottool="cp "
1955 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1956 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1957 output="rockbox.d2"
1958 bootoutput="bootloader-cowond2.bin"
1959 appextra="recorder:gui:radio"
1960 plugins="yes"
1961 swcodec="yes"
1962 toolset="$tccbitmaptools"
1963 # architecture, manufacturer and model for the target-tree build
1964 t_cpu="arm"
1965 t_manufacturer="tcc780x"
1966 t_model="cowond2"
1969 34|iaudiom3)
1970 target_id=37
1971 modelname="iaudiom3"
1972 target="-DIAUDIO_M3"
1973 memory=16 # always
1974 coldfirecc
1975 tool="$rootdir/tools/scramble -add=iam3"
1976 boottool="$rootdir/tools/scramble -iaudiom3"
1977 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1978 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1979 output="rockbox.iaudio"
1980 bootoutput="cowon_m3.bin"
1981 appextra="recorder:gui:radio"
1982 plugins="yes"
1983 swcodec="yes"
1984 # toolset is the tools within the tools directory that we build for
1985 # this particular target.
1986 toolset="$iaudiobitmaptools"
1987 # architecture, manufacturer and model for the target-tree build
1988 t_cpu="coldfire"
1989 t_manufacturer="iaudio"
1990 t_model="m3"
1993 40|gigabeatfx)
1994 target_id=20
1995 modelname="gigabeatfx"
1996 target="-DGIGABEAT_F"
1997 memory=32 # always
1998 arm9tdmicc
1999 tool="$rootdir/tools/scramble -add=giga"
2000 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2001 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2002 output="rockbox.gigabeat"
2003 appextra="recorder:gui:radio"
2004 plugins="yes"
2005 swcodec="yes"
2006 toolset=$gigabeatbitmaptools
2007 boottool="$rootdir/tools/scramble -gigabeat"
2008 bootoutput="FWIMG01.DAT"
2009 # architecture, manufacturer and model for the target-tree build
2010 t_cpu="arm"
2011 t_manufacturer="s3c2440"
2012 t_model="gigabeat-fx"
2015 41|gigabeats)
2016 target_id=26
2017 modelname="gigabeats"
2018 target="-DGIGABEAT_S"
2019 memory=64
2020 arm1136jfscc
2021 tool="$rootdir/tools/scramble -add=gigs"
2022 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2023 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2024 output="rockbox.gigabeat"
2025 appextra="recorder:gui:radio"
2026 plugins="yes"
2027 swcodec="yes"
2028 toolset="$gigabeatbitmaptools"
2029 boottool="$rootdir/tools/scramble -gigabeats"
2030 bootoutput="nk.bin"
2031 # architecture, manufacturer and model for the target-tree build
2032 t_cpu="arm"
2033 t_manufacturer="imx31"
2034 t_model="gigabeat-s"
2037 70|mrobe500)
2038 target_id=36
2039 modelname="mrobe500"
2040 target="-DMROBE_500"
2041 memory=64 # always
2042 arm926ejscc
2043 tool="$rootdir/tools/scramble -add=m500"
2044 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2045 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
2046 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2047 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2048 output="rockbox.mrobe500"
2049 appextra="recorder:gui:radio"
2050 plugins="yes"
2051 swcodec="yes"
2052 toolset=$gigabeatbitmaptools
2053 boottool="cp "
2054 bootoutput="rockbox.mrboot"
2055 # architecture, manufacturer and model for the target-tree build
2056 t_cpu="arm"
2057 t_manufacturer="tms320dm320"
2058 t_model="mrobe-500"
2061 71|mrobe100)
2062 target_id=33
2063 modelname="mrobe100"
2064 target="-DMROBE_100"
2065 memory=32 # always
2066 arm7tdmicc
2067 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2068 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2069 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2070 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2071 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2072 output="rockbox.mi4"
2073 appextra="recorder:gui:radio"
2074 plugins="yes"
2075 swcodec="yes"
2076 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2077 bootoutput="pp5020.mi4"
2078 # toolset is the tools within the tools directory that we build for
2079 # this particular target.
2080 toolset=$scramblebitmaptools
2081 # architecture, manufacturer and model for the target-tree build
2082 t_cpu="arm"
2083 t_manufacturer="olympus"
2084 t_model="mrobe-100"
2087 80|logikdax)
2088 target_id=31
2089 modelname="logikdax"
2090 target="-DLOGIK_DAX"
2091 memory=2 # always
2092 arm946cc
2093 tool="$rootdir/tools/scramble -add=ldax"
2094 boottool="$rootdir/tools/scramble -tcc=crc"
2095 bootoutput="player.rom"
2096 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2097 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2098 output="rockbox.logik"
2099 appextra="recorder:gui:radio"
2100 plugins=""
2101 swcodec="yes"
2102 # toolset is the tools within the tools directory that we build for
2103 # this particular target.
2104 toolset=$tccbitmaptools
2105 # architecture, manufacturer and model for the target-tree build
2106 t_cpu="arm"
2107 t_manufacturer="tcc77x"
2108 t_model="logikdax"
2111 90|zenvisionm30gb)
2112 target_id=35
2113 modelname="zenvisionm30gb"
2114 target="-DCREATIVE_ZVM"
2115 memory=64
2116 arm926ejscc
2117 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2118 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2119 tool="$rootdir/tools/scramble -creative=zvm"
2120 USE_ELF="yes"
2121 output="rockbox.zvm"
2122 appextra="recorder:gui:radio"
2123 plugins="yes"
2124 swcodec="yes"
2125 toolset=$ipodbitmaptools
2126 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
2127 bootoutput="rockbox.zvmboot"
2128 # architecture, manufacturer and model for the target-tree build
2129 t_cpu="arm"
2130 t_manufacturer="tms320dm320"
2131 t_model="creative-zvm"
2134 91|zenvisionm60gb)
2135 target_id=40
2136 modelname="zenvisionm60gb"
2137 target="-DCREATIVE_ZVM60GB"
2138 memory=64
2139 arm926ejscc
2140 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2141 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2142 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2143 USE_ELF="yes"
2144 output="rockbox.zvm60"
2145 appextra="recorder:gui:radio"
2146 plugins="yes"
2147 swcodec="yes"
2148 toolset=$ipodbitmaptools
2149 boottool="$rootdir/tools/scramble -creative=zvm60"
2150 bootoutput="rockbox.zvm60boot"
2151 # architecture, manufacturer and model for the target-tree build
2152 t_cpu="arm"
2153 t_manufacturer="tms320dm320"
2154 t_model="creative-zvm"
2157 92|zenvision)
2158 target_id=39
2159 modelname="zenvision"
2160 target="-DCREATIVE_ZV"
2161 memory=64
2162 arm926ejscc
2163 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2164 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2165 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2166 USE_ELF="yes"
2167 output="rockbox.zv"
2168 appextra="recorder:gui:radio"
2169 plugins=""
2170 swcodec="yes"
2171 toolset=$ipodbitmaptools
2172 boottool="$rootdir/tools/scramble -creative=zenvision"
2173 bootoutput="rockbox.zvboot"
2174 # architecture, manufacturer and model for the target-tree build
2175 t_cpu="arm"
2176 t_manufacturer="tms320dm320"
2177 t_model="creative-zvm"
2180 50|sansae200)
2181 target_id=23
2182 modelname="sansae200"
2183 target="-DSANSA_E200"
2184 memory=32 # supposedly
2185 arm7tdmicc
2186 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2187 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2188 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2189 output="rockbox.mi4"
2190 appextra="recorder:gui:radio"
2191 plugins="yes"
2192 swcodec="yes"
2193 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2194 bootoutput="PP5022.mi4"
2195 # toolset is the tools within the tools directory that we build for
2196 # this particular target.
2197 toolset=$scramblebitmaptools
2198 # architecture, manufacturer and model for the target-tree build
2199 t_cpu="arm"
2200 t_manufacturer="sandisk"
2201 t_model="sansa-e200"
2204 51|sansae200r)
2205 # the e200R model is pretty much identical to the e200, it only has a
2206 # different option to the scramble tool when building a bootloader and
2207 # makes the bootloader output file name in all lower case.
2208 target_id=27
2209 modelname="sansae200r"
2210 target="-DSANSA_E200"
2211 memory=32 # supposedly
2212 arm7tdmicc
2213 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2214 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2215 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2216 output="rockbox.mi4"
2217 appextra="recorder:gui:radio"
2218 plugins="yes"
2219 swcodec="yes"
2220 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2221 bootoutput="pp5022.mi4"
2222 # toolset is the tools within the tools directory that we build for
2223 # this particular target.
2224 toolset=$scramblebitmaptools
2225 # architecture, manufacturer and model for the target-tree build
2226 t_cpu="arm"
2227 t_manufacturer="sandisk"
2228 t_model="sansa-e200"
2231 52|sansac200)
2232 target_id=30
2233 modelname="sansac200"
2234 target="-DSANSA_C200"
2235 memory=32 # supposedly
2236 arm7tdmicc
2237 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2238 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2239 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2240 output="rockbox.mi4"
2241 appextra="recorder:gui:radio"
2242 plugins="yes"
2243 swcodec="yes"
2244 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2245 bootoutput="firmware.mi4"
2246 # toolset is the tools within the tools directory that we build for
2247 # this particular target.
2248 toolset=$scramblebitmaptools
2249 # architecture, manufacturer and model for the target-tree build
2250 t_cpu="arm"
2251 t_manufacturer="sandisk"
2252 t_model="sansa-c200"
2255 53|sansam200)
2256 target_id=48
2257 modelname="sansam200"
2258 target="-DSANSA_M200"
2259 memory=1 # always
2260 arm946cc
2261 tool="$rootdir/tools/scramble -add=m200"
2262 boottool="$rootdir/tools/scramble -tcc=crc"
2263 bootoutput="player.rom"
2264 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2265 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2266 output="rockbox.m200"
2267 appextra="recorder:gui:radio"
2268 plugins=""
2269 swcodec="yes"
2270 # toolset is the tools within the tools directory that we build for
2271 # this particular target.
2272 toolset=$tccbitmaptools
2273 # architecture, manufacturer and model for the target-tree build
2274 t_cpu="arm"
2275 t_manufacturer="tcc77x"
2276 t_model="m200"
2279 54|sansac100)
2280 target_id=42
2281 modelname="sansac100"
2282 target="-DSANSA_C100"
2283 memory=2
2284 arm946cc
2285 tool="$rootdir/tools/scramble -add=c100"
2286 boottool="$rootdir/tools/scramble -tcc=crc"
2287 bootoutput="player.rom"
2288 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2289 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2290 output="rockbox.c100"
2291 appextra="recorder:gui:radio"
2292 plugins=""
2293 swcodec="yes"
2294 # toolset is the tools within the tools directory that we build for
2295 # this particular target.
2296 toolset=$tccbitmaptools
2297 # architecture, manufacturer and model for the target-tree build
2298 t_cpu="arm"
2299 t_manufacturer="tcc77x"
2300 t_model="c100"
2303 55|sansaclip)
2304 target_id=50
2305 modelname="sansaclip"
2306 target="-DSANSA_CLIP"
2307 memory=2
2308 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2309 bmp2rb_native="$bmp2rb_mono"
2310 tool="$rootdir/tools/scramble -add=clip"
2311 output="rockbox.sansa"
2312 bootoutput="bootloader-clip.sansa"
2313 appextra="recorder:gui:radio"
2314 plugins="yes"
2315 swcodec="yes"
2316 toolset=$scramblebitmaptools
2317 t_cpu="arm"
2318 t_manufacturer="as3525"
2319 t_model="sansa-clip"
2320 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2321 arm9tdmicc
2322 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2326 56|sansae200v2)
2327 target_id=51
2328 modelname="sansae200v2"
2329 target="-DSANSA_E200V2"
2330 memory=8
2331 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2332 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2333 tool="$rootdir/tools/scramble -add=e2v2"
2334 output="rockbox.sansa"
2335 bootoutput="bootloader-e200v2.sansa"
2336 appextra="recorder:gui:radio"
2337 plugins="yes"
2338 swcodec="yes"
2339 toolset=$scramblebitmaptools
2340 t_cpu="arm"
2341 t_manufacturer="as3525"
2342 t_model="sansa-e200v2"
2343 arm9tdmicc
2347 57|sansam200v4)
2348 target_id=52
2349 modelname="sansam200v4"
2350 target="-DSANSA_M200V4"
2351 memory=2
2352 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2353 bmp2rb_native="$bmp2rb_mono"
2354 tool="$rootdir/tools/scramble -add=m2v4"
2355 output="rockbox.sansa"
2356 bootoutput="bootloader-m200v4.sansa"
2357 appextra="recorder:gui:radio"
2358 plugins="yes"
2359 swcodec="yes"
2360 toolset=$scramblebitmaptools
2361 t_cpu="arm"
2362 t_manufacturer="as3525"
2363 t_model="sansa-m200v4"
2364 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2365 arm9tdmicc
2366 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2370 58|sansafuze)
2371 target_id=53
2372 modelname="sansafuze"
2373 target="-DSANSA_FUZE"
2374 memory=8
2375 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2376 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2377 tool="$rootdir/tools/scramble -add=fuze"
2378 output="rockbox.sansa"
2379 bootoutput="bootloader-fuze.sansa"
2380 appextra="recorder:gui:radio"
2381 plugins="yes"
2382 swcodec="yes"
2383 toolset=$scramblebitmaptools
2384 t_cpu="arm"
2385 t_manufacturer="as3525"
2386 t_model="sansa-fuze"
2387 arm9tdmicc
2391 59|sansac200v2)
2392 target_id=55
2393 modelname="sansac200v2"
2394 target="-DSANSA_C200V2"
2395 memory=2 # as per OF diagnosis mode
2396 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2397 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2398 tool="$rootdir/tools/scramble -add=c2v2"
2399 output="rockbox.sansa"
2400 bootoutput="bootloader-c200v2.sansa"
2401 appextra="recorder:gui:radio"
2402 plugins="yes"
2403 swcodec="yes"
2404 # toolset is the tools within the tools directory that we build for
2405 # this particular target.
2406 toolset=$scramblebitmaptools
2407 # architecture, manufacturer and model for the target-tree build
2408 t_cpu="arm"
2409 t_manufacturer="as3525"
2410 t_model="sansa-c200v2"
2411 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2412 arm9tdmicc
2413 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2416 60|sansaclipv2)
2417 target_id=60
2418 modelname="sansaclipv2"
2419 target="-DSANSA_CLIPV2"
2420 memory=8
2421 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2422 bmp2rb_native="$bmp2rb_mono"
2423 tool="$rootdir/tools/scramble -add=clv2"
2424 output="rockbox.sansa"
2425 bootoutput="bootloader-clipv2.sansa"
2426 appextra="recorder:gui:radio"
2427 plugins="yes"
2428 swcodec="yes"
2429 toolset=$scramblebitmaptools
2430 t_cpu="arm"
2431 t_manufacturer="as3525"
2432 t_model="sansa-clipv2"
2433 arm926ejscc
2436 61|sansaview)
2437 echo "Sansa View is not yet supported!"
2438 exit 1
2439 target_id=63
2440 modelname="sansaview"
2441 target="-DSANSA_VIEW"
2442 memory=32
2443 arm1176jzscc
2444 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2445 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2446 output="rockbox.mi4"
2447 appextra="gui"
2448 plugins=""
2449 swcodec="yes"
2450 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2451 bootoutput="firmware.mi4"
2452 # toolset is the tools within the tools directory that we build for
2453 # this particular target.
2454 toolset=$scramblebitmaptools
2455 t_cpu="arm"
2456 t_manufacturer="sandisk"
2457 t_model="sansa-view"
2460 62|sansaclipplus)
2461 target_id=66
2462 modelname="sansaclipplus"
2463 target="-DSANSA_CLIPPLUS"
2464 memory=8
2465 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2466 bmp2rb_native="$bmp2rb_mono"
2467 tool="$rootdir/tools/scramble -add=cli+"
2468 output="rockbox.sansa"
2469 bootoutput="bootloader-clipplus.sansa"
2470 appextra="recorder:gui:radio"
2471 plugins="yes"
2472 swcodec="yes"
2473 toolset=$scramblebitmaptools
2474 t_cpu="arm"
2475 t_manufacturer="as3525"
2476 t_model="sansa-clipplus"
2477 arm926ejscc
2480 63|sansafuzev2)
2481 target_id=68
2482 modelname="sansafuzev2"
2483 target="-DSANSA_FUZEV2"
2484 memory=8 # not sure
2485 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2486 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2487 tool="$rootdir/tools/scramble -add=fuz2"
2488 output="rockbox.sansa"
2489 bootoutput="bootloader-fuzev2.sansa"
2490 appextra="recorder:gui:radio"
2491 plugins="yes"
2492 swcodec="yes"
2493 toolset=$scramblebitmaptools
2494 t_cpu="arm"
2495 t_manufacturer="as3525"
2496 t_model="sansa-fuzev2"
2497 arm926ejscc
2500 64|sansafuzeplus)
2501 target_id=80
2502 modelname="sansafuzeplus"
2503 target="-DSANSA_FUZEPLUS"
2504 memory=128
2505 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2506 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2507 tool="$rootdir/tools/scramble -add=fuz+"
2508 output="rockbox.sansa"
2509 boottool="true"
2510 bootoutput=""
2511 appextra="gui"
2512 plugins="no"
2513 swcodec="yes"
2514 toolset=$scramblebitmaptools
2515 t_cpu="arm"
2516 t_manufacturer="imx233"
2517 t_model="sansa-fuzeplus"
2518 arm926ejscc
2521 150|tatungtpj1022)
2522 target_id=25
2523 modelname="tatungtpj1022"
2524 target="-DTATUNG_TPJ1022"
2525 memory=32 # always
2526 arm7tdmicc
2527 tool="$rootdir/tools/scramble -add tpj2"
2528 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2529 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2530 output="rockbox.elio"
2531 appextra="recorder:gui:radio"
2532 plugins="yes"
2533 swcodec="yes"
2534 boottool="$rootdir/tools/scramble -mi4v2"
2535 bootoutput="pp5020.mi4"
2536 # toolset is the tools within the tools directory that we build for
2537 # this particular target.
2538 toolset=$scramblebitmaptools
2539 # architecture, manufacturer and model for the target-tree build
2540 t_cpu="arm"
2541 t_manufacturer="tatung"
2542 t_model="tpj1022"
2545 100|gogearsa9200)
2546 target_id=41
2547 modelname="gogearsa9200"
2548 target="-DPHILIPS_SA9200"
2549 memory=32 # supposedly
2550 arm7tdmicc
2551 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2552 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2553 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2554 output="rockbox.mi4"
2555 appextra="recorder:gui:radio"
2556 plugins="yes"
2557 swcodec="yes"
2558 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2559 bootoutput="FWImage.ebn"
2560 # toolset is the tools within the tools directory that we build for
2561 # this particular target.
2562 toolset=$scramblebitmaptools
2563 # architecture, manufacturer and model for the target-tree build
2564 t_cpu="arm"
2565 t_manufacturer="philips"
2566 t_model="sa9200"
2569 101|gogearhdd1630)
2570 target_id=43
2571 modelname="gogearhdd1630"
2572 target="-DPHILIPS_HDD1630"
2573 memory=32 # supposedly
2574 arm7tdmicc
2575 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2576 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2577 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2578 output="rockbox.mi4"
2579 appextra="recorder:gui:radio"
2580 plugins="yes"
2581 swcodec="yes"
2582 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2583 bootoutput="FWImage.ebn"
2584 # toolset is the tools within the tools directory that we build for
2585 # this particular target.
2586 toolset=$scramblebitmaptools
2587 # architecture, manufacturer and model for the target-tree build
2588 t_cpu="arm"
2589 t_manufacturer="philips"
2590 t_model="hdd1630"
2593 102|gogearhdd6330)
2594 target_id=65
2595 modelname="gogearhdd6330"
2596 target="-DPHILIPS_HDD6330"
2597 memory=64 # always
2598 arm7tdmicc
2599 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2600 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2601 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2602 output="rockbox.mi4"
2603 appextra="recorder:gui:radio"
2604 plugins="yes"
2605 swcodec="yes"
2606 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2607 bootoutput="FWImage.ebn"
2608 # toolset is the tools within the tools directory that we build for
2609 # this particular target.
2610 toolset=$scramblebitmaptools
2611 # architecture, manufacturer and model for the target-tree build
2612 t_cpu="arm"
2613 t_manufacturer="philips"
2614 t_model="hdd6330"
2617 110|meizum6sl)
2618 target_id=49
2619 modelname="meizum6sl"
2620 target="-DMEIZU_M6SL"
2621 memory=16 # always
2622 arm940tbecc
2623 tool="cp"
2624 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2625 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2626 output="rockbox.meizu"
2627 appextra="recorder:gui:radio"
2628 plugins="no" #FIXME
2629 swcodec="yes"
2630 toolset=$genericbitmaptools
2631 boottool="cp"
2632 bootoutput="rockboot.ebn"
2633 # architecture, manufacturer and model for the target-tree build
2634 t_cpu="arm"
2635 t_manufacturer="s5l8700"
2636 t_model="meizu-m6sl"
2639 111|meizum6sp)
2640 target_id=46
2641 modelname="meizum6sp"
2642 target="-DMEIZU_M6SP"
2643 memory=16 # always
2644 arm940tbecc
2645 tool="cp"
2646 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2647 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2648 output="rockbox.meizu"
2649 appextra="recorder:gui:radio"
2650 plugins="no" #FIXME
2651 swcodec="yes"
2652 toolset=$genericbitmaptools
2653 boottool="cp"
2654 bootoutput="rockboot.ebn"
2655 # architecture, manufacturer and model for the target-tree build
2656 t_cpu="arm"
2657 t_manufacturer="s5l8700"
2658 t_model="meizu-m6sp"
2661 112|meizum3)
2662 target_id=47
2663 modelname="meizum3"
2664 target="-DMEIZU_M3"
2665 memory=16 # always
2666 arm940tbecc
2667 tool="cp"
2668 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2669 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2670 output="rockbox.meizu"
2671 appextra="recorder:gui:radio"
2672 plugins="no" #FIXME
2673 swcodec="yes"
2674 toolset=$genericbitmaptools
2675 boottool="cp"
2676 bootoutput="rockboot.ebn"
2677 # architecture, manufacturer and model for the target-tree build
2678 t_cpu="arm"
2679 t_manufacturer="s5l8700"
2680 t_model="meizu-m3"
2683 120|ondavx747)
2684 target_id=45
2685 modelname="ondavx747"
2686 target="-DONDA_VX747"
2687 memory=16
2688 mipselcc
2689 tool="$rootdir/tools/scramble -add=x747"
2690 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2691 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2692 output="rockbox.vx747"
2693 appextra="recorder:gui:radio"
2694 plugins="yes"
2695 swcodec="yes"
2696 toolset=$genericbitmaptools
2697 boottool="$rootdir/tools/scramble -ccpmp"
2698 bootoutput="ccpmp.bin"
2699 # architecture, manufacturer and model for the target-tree build
2700 t_cpu="mips"
2701 t_manufacturer="ingenic_jz47xx"
2702 t_model="onda_vx747"
2705 121|ondavx767)
2706 target_id=64
2707 modelname="ondavx767"
2708 target="-DONDA_VX767"
2709 memory=16 #FIXME
2710 mipselcc
2711 tool="cp"
2712 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2713 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2714 output="rockbox.vx767"
2715 appextra="recorder:gui:radio"
2716 plugins="" #FIXME
2717 swcodec="yes"
2718 toolset=$genericbitmaptools
2719 boottool="$rootdir/tools/scramble -ccpmp"
2720 bootoutput="ccpmp.bin"
2721 # architecture, manufacturer and model for the target-tree build
2722 t_cpu="mips"
2723 t_manufacturer="ingenic_jz47xx"
2724 t_model="onda_vx767"
2727 122|ondavx747p)
2728 target_id=54
2729 modelname="ondavx747p"
2730 target="-DONDA_VX747P"
2731 memory=16
2732 mipselcc
2733 tool="$rootdir/tools/scramble -add=747p"
2734 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2735 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2736 output="rockbox.vx747p"
2737 appextra="recorder:gui:radio"
2738 plugins="yes"
2739 swcodec="yes"
2740 toolset=$genericbitmaptools
2741 boottool="$rootdir/tools/scramble -ccpmp"
2742 bootoutput="ccpmp.bin"
2743 # architecture, manufacturer and model for the target-tree build
2744 t_cpu="mips"
2745 t_manufacturer="ingenic_jz47xx"
2746 t_model="onda_vx747"
2749 123|ondavx777)
2750 target_id=61
2751 modelname="ondavx777"
2752 target="-DONDA_VX777"
2753 memory=16
2754 mipselcc
2755 tool="$rootdir/tools/scramble -add=x777"
2756 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2757 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2758 output="rockbox.vx777"
2759 appextra="recorder:gui:radio"
2760 plugins="yes"
2761 swcodec="yes"
2762 toolset=$genericbitmaptools
2763 boottool="$rootdir/tools/scramble -ccpmp"
2764 bootoutput="ccpmp.bin"
2765 # architecture, manufacturer and model for the target-tree build
2766 t_cpu="mips"
2767 t_manufacturer="ingenic_jz47xx"
2768 t_model="onda_vx747"
2771 130|lyreproto1)
2772 target_id=56
2773 modelname="lyreproto1"
2774 target="-DLYRE_PROTO1"
2775 memory=64
2776 arm926ejscc
2777 tool="cp"
2778 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2779 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2780 output="rockbox.lyre"
2781 appextra="recorder:gui:radio"
2782 plugins=""
2783 swcodec="yes"
2784 toolset=$scramblebitmaptools
2785 boottool="cp"
2786 bootoutput="bootloader-proto1.lyre"
2787 # architecture, manufacturer and model for the target-tree build
2788 t_cpu="arm"
2789 t_manufacturer="at91sam"
2790 t_model="lyre_proto1"
2793 131|mini2440)
2794 target_id=99
2795 modelname="mini2440"
2796 target="-DMINI2440"
2797 memory=64
2798 arm9tdmicc
2799 tool="$rootdir/tools/scramble -add=m244"
2800 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2801 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2802 output="rockbox.mini2440"
2803 appextra="recorder:gui:radio"
2804 plugins=""
2805 swcodec="yes"
2806 toolset=$scramblebitmaptools
2807 boottool="cp"
2808 bootoutput="bootloader-mini2440.lyre"
2809 # architecture, manufacturer and model for the target-tree build
2810 t_cpu="arm"
2811 t_manufacturer="s3c2440"
2812 t_model="mini2440"
2815 140|samsungyh820)
2816 target_id=57
2817 modelname="samsungyh820"
2818 target="-DSAMSUNG_YH820"
2819 memory=32 # always
2820 arm7tdmicc
2821 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2822 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2823 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2824 output="rockbox.mi4"
2825 appextra="recorder:gui:radio"
2826 plugins="yes"
2827 swcodec="yes"
2828 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2829 bootoutput="FW_YH820.mi4"
2830 # toolset is the tools within the tools directory that we build for
2831 # this particular target.
2832 toolset=$scramblebitmaptools
2833 # architecture, manufacturer and model for the target-tree build
2834 t_cpu="arm"
2835 t_manufacturer="samsung"
2836 t_model="yh820"
2839 141|samsungyh920)
2840 target_id=58
2841 modelname="samsungyh920"
2842 target="-DSAMSUNG_YH920"
2843 memory=32 # always
2844 arm7tdmicc
2845 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2846 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2847 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2848 output="rockbox.mi4"
2849 appextra="recorder:gui:radio"
2850 plugins="yes"
2851 swcodec="yes"
2852 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2853 bootoutput="PP5020.mi4"
2854 # toolset is the tools within the tools directory that we build for
2855 # this particular target.
2856 toolset=$scramblebitmaptools
2857 # architecture, manufacturer and model for the target-tree build
2858 t_cpu="arm"
2859 t_manufacturer="samsung"
2860 t_model="yh920"
2863 142|samsungyh925)
2864 target_id=59
2865 modelname="samsungyh925"
2866 target="-DSAMSUNG_YH925"
2867 memory=32 # always
2868 arm7tdmicc
2869 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2870 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2871 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2872 output="rockbox.mi4"
2873 appextra="recorder:gui:radio"
2874 plugins="yes"
2875 swcodec="yes"
2876 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2877 bootoutput="FW_YH925.mi4"
2878 # toolset is the tools within the tools directory that we build for
2879 # this particular target.
2880 toolset=$scramblebitmaptools
2881 # architecture, manufacturer and model for the target-tree build
2882 t_cpu="arm"
2883 t_manufacturer="samsung"
2884 t_model="yh925"
2887 143|samsungyps3)
2888 target_id=72
2889 modelname="samsungyps3"
2890 target="-DSAMSUNG_YPS3"
2891 memory=16 # always
2892 arm940tbecc
2893 tool="cp"
2894 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2895 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2896 output="rockbox.yps3"
2897 appextra="recorder:gui:radio"
2898 plugins="no" #FIXME
2899 swcodec="yes"
2900 toolset=$genericbitmaptools
2901 boottool="cp"
2902 bootoutput="rockboot.ebn"
2903 # architecture, manufacturer and model for the target-tree build
2904 t_cpu="arm"
2905 t_manufacturer="s5l8700"
2906 t_model="yps3"
2909 160|vibe500)
2910 target_id=67
2911 modelname="vibe500"
2912 target="-DPBELL_VIBE500"
2913 memory=32 # always
2914 arm7tdmicc
2915 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2916 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2917 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2918 output="rockbox.mi4"
2919 appextra="recorder:gui:radio"
2920 plugins="yes"
2921 swcodec="yes"
2922 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2923 bootoutput="jukebox.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_manufacturer="pbell"
2930 t_model="vibe500"
2933 170|mpiohd200)
2934 target_id=69
2935 modelname="mpiohd200"
2936 target="-DMPIO_HD200"
2937 memory=16 # always
2938 coldfirecc
2939 tool="$rootdir/tools/scramble -add=hd20"
2940 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2941 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2942 output="rockbox.mpio"
2943 bootoutput="bootloader.mpio"
2944 appextra="recorder:gui:radio"
2945 plugins="yes"
2946 swcodec="yes"
2947 # toolset is the tools within the tools directory that we build for
2948 # this particular target.
2949 toolset="$genericbitmaptools"
2950 # architecture, manufacturer and model for the target-tree build
2951 t_cpu="coldfire"
2952 t_manufacturer="mpio"
2953 t_model="hd200"
2956 171|mpiohd300)
2957 target_id=70
2958 modelname="mpiohd300"
2959 target="-DMPIO_HD300"
2960 memory=16 # always
2961 coldfirecc
2962 tool="$rootdir/tools/scramble -add=hd30"
2963 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2964 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2965 output="rockbox.mpio"
2966 bootoutput="bootloader.mpio"
2967 appextra="recorder:gui:radio"
2968 plugins="yes"
2969 swcodec="yes"
2970 # toolset is the tools within the tools directory that we build for
2971 # this particular target.
2972 toolset="$genericbitmaptools"
2973 # architecture, manufacturer and model for the target-tree build
2974 t_cpu="coldfire"
2975 t_manufacturer="mpio"
2976 t_model="hd300"
2979 180|rk27generic)
2980 target_id=78
2981 modelname="rk27generic"
2982 target="-DRK27_GENERIC"
2983 memory=16 # always
2984 arm7ejscc
2985 tool="$rootdir/tools/scramble -add=rk27"
2986 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2987 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2988 output="rockbox.rk27"
2989 bootoutput="bootloader.rk27"
2990 appextra="recorder:gui:radio"
2991 plugins="yes"
2992 swcodec="yes"
2993 # toolset is the tools within the tools directory that we build for
2994 # this particular target.
2995 toolset="$genericbitmaptools"
2996 # architecture, manufacturer and model for the target-tree build
2997 t_cpu="arm"
2998 t_manufacturer="rk27xx"
2999 t_model="rk27generic"
3002 200|sdlapp)
3003 application="yes"
3004 target_id=73
3005 modelname="sdlapp"
3006 target="-DSDLAPP"
3007 app_set_paths
3008 app_set_lcd_size
3009 memory=8
3010 uname=`uname`
3011 simcc "sdl-app"
3012 tool="cp "
3013 boottool="cp "
3014 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3015 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3016 output="rockbox"
3017 bootoutput="rockbox"
3018 appextra="recorder:gui:radio"
3019 plugins="yes"
3020 swcodec="yes"
3021 # architecture, manufacturer and model for the target-tree build
3022 t_cpu="hosted"
3023 t_manufacturer="sdl"
3024 t_model="app"
3027 201|android)
3028 application="yes"
3029 target_id=74
3030 modelname="android"
3031 target="-DANDROID"
3032 app_type="android"
3033 app_set_lcd_size
3034 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
3035 bindir="/data/data/org.rockbox/lib"
3036 libdir="/data/data/org.rockbox/app_rockbox"
3037 memory=8
3038 uname=`uname`
3039 androidcc
3040 tool="cp "
3041 boottool="cp "
3042 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3043 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3044 output="librockbox.so"
3045 bootoutput="librockbox.so"
3046 appextra="recorder:gui:radio:hosted/android"
3047 plugins="yes"
3048 swcodec="yes"
3049 # architecture, manufacturer and model for the target-tree build
3050 t_cpu="hosted"
3051 t_manufacturer="android"
3052 t_model="app"
3055 202|nokian8xx)
3056 application="yes"
3057 target_id=75
3058 modelname="nokian8xx"
3059 app_type="sdl-app"
3060 target="-DNOKIAN8XX"
3061 sharedir="/opt/rockbox/share/rockbox"
3062 bindir="/opt/rockbox/bin"
3063 libdir="/opt/rockbox/lib"
3064 memory=8
3065 uname=`uname`
3066 maemocc 4
3067 tool="cp "
3068 boottool="cp "
3069 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3070 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3071 output="rockbox"
3072 bootoutput="rockbox"
3073 appextra="recorder:gui:radio"
3074 plugins="yes"
3075 swcodec="yes"
3076 # architecture, manufacturer and model for the target-tree build
3077 t_cpu="hosted"
3078 t_manufacturer="maemo"
3079 t_model="app"
3082 203|nokian900)
3083 application="yes"
3084 target_id=76
3085 modelname="nokian900"
3086 app_type="sdl-app"
3087 target="-DNOKIAN900"
3088 sharedir="/opt/rockbox/share/rockbox"
3089 bindir="/opt/rockbox/bin"
3090 libdir="/opt/rockbox/lib"
3091 memory=8
3092 uname=`uname`
3093 maemocc 5
3094 tool="cp "
3095 boottool="cp "
3096 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3097 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3098 output="rockbox"
3099 bootoutput="rockbox"
3100 appextra="recorder:gui:radio"
3101 plugins="yes"
3102 swcodec="yes"
3103 # architecture, manufacturer and model for the target-tree build
3104 t_cpu="hosted"
3105 t_manufacturer="maemo"
3106 t_model="app"
3109 204|pandora)
3110 application="yes"
3111 target_id=77
3112 modelname="pandora"
3113 app_type="sdl-app"
3114 target="-DPANDORA"
3115 sharedir="rockbox/share"
3116 bindir="rockbox/bin"
3117 libdir="rockbox/lib"
3118 memory=8
3119 uname=`uname`
3120 pandoracc
3121 tool="cp "
3122 boottool="cp "
3123 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3124 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3125 output="rockbox"
3126 bootoutput="rockbox"
3127 appextra="recorder:gui:radio"
3128 plugins="yes"
3129 swcodec="yes"
3130 # architecture, manufacturer and model for the target-tree build
3131 t_cpu="hosted"
3132 t_manufacturer="pandora"
3133 t_model="app"
3137 echo "Please select a supported target platform!"
3138 exit 7
3141 esac
3143 echo "Platform set to $modelname"
3146 #remove start
3147 ############################################################################
3148 # Amount of memory, for those that can differ. They have $memory unset at
3149 # this point.
3152 if [ -z "$memory" ]; then
3153 case $target_id in
3155 if [ "$ARG_RAM" ]; then
3156 size=$ARG_RAM
3157 else
3158 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3159 size=`input`;
3161 case $size in
3162 60|64)
3163 memory="64"
3166 memory="32"
3168 esac
3171 if [ "$ARG_RAM" ]; then
3172 size=$ARG_RAM
3173 else
3174 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3175 size=`input`;
3177 case $size in
3179 memory="8"
3182 memory="2"
3184 esac
3186 esac
3187 echo "Memory size selected: $memory MB"
3188 [ "$ARG_TYPE" ] || echo ""
3190 #remove end
3192 ##################################################################
3193 # Figure out build "type"
3196 # the ifp7x0 is the only platform that supports building a gdb stub like
3197 # this
3198 case $modelname in
3199 iriverifp7xx)
3200 gdbstub="(G)DB stub, "
3202 sansae200r|sansae200)
3203 gdbstub="(I)nstaller, "
3205 sansac200)
3206 gdbstub="(E)raser, "
3210 esac
3211 if [ "$ARG_TYPE" ]; then
3212 btype=$ARG_TYPE
3213 else
3214 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
3215 btype=`input`;
3218 case $btype in
3219 [Ii])
3220 appsdir='\$(ROOTDIR)/bootloader'
3221 apps="bootloader"
3222 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3223 bootloader="1"
3224 echo "e200R-installer build selected"
3226 [Ee])
3227 appsdir='\$(ROOTDIR)/bootloader'
3228 apps="bootloader"
3229 echo "C2(4)0 or C2(5)0"
3230 variant=`input`
3231 case $variant in
3233 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
3234 echo "c240 eraser build selected"
3237 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
3238 echo "c240 eraser build selected"
3240 esac
3241 bootloader="1"
3242 echo "c200 eraser build selected"
3244 [Bb])
3245 if test $t_manufacturer = "archos"; then
3246 # Archos SH-based players do this somewhat differently for
3247 # some reason
3248 appsdir='\$(ROOTDIR)/flash/bootbox'
3249 apps="bootbox"
3250 else
3251 appsdir='\$(ROOTDIR)/bootloader'
3252 apps="bootloader"
3253 flash=""
3254 if test -n "$boottool"; then
3255 tool="$boottool"
3257 if test -n "$bootoutput"; then
3258 output=$bootoutput
3261 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3262 bootloader="1"
3263 echo "Bootloader build selected"
3265 [Ss])
3266 if [ "$modelname" = "sansae200r" ]; then
3267 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3268 exit 8
3270 debug="-DDEBUG"
3271 simulator="yes"
3272 extradefines="$extradefines -DSIMULATOR"
3273 archosrom=""
3274 flash=""
3275 echo "Simulator build selected"
3277 [Aa]*)
3278 echo "Advanced build selected"
3279 whichadvanced $btype
3281 [Gg])
3282 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3283 appsdir='\$(ROOTDIR)/gdb'
3284 apps="stub"
3285 case $modelname in
3286 iriverifp7xx)
3287 output="stub.wma"
3291 esac
3292 echo "GDB stub build selected"
3294 [Mm])
3295 toolset='';
3296 apps="manual"
3297 echo "Manual build selected"
3299 [Cc])
3300 uname=`uname`
3301 simcc "checkwps"
3302 toolset='';
3303 t_cpu='';
3304 GCCOPTS='';
3305 extradefines="$extradefines -DDEBUG"
3306 appsdir='\$(ROOTDIR)/tools/checkwps';
3307 output='checkwps.'${modelname};
3308 archosrom='';
3309 echo "CheckWPS build selected"
3311 [Dd])
3312 uname=`uname`
3313 simcc "database"
3314 toolset='';
3315 t_cpu='';
3316 GCCOPTS='';
3317 appsdir='\$(ROOTDIR)/tools/database';
3318 archosrom='';
3320 case $uname in
3321 CYGWIN*|MINGW*)
3322 output="database_${modelname}.exe"
3325 output='database.'${modelname};
3327 esac
3329 echo "Database tool build selected"
3332 if [ "$modelname" = "sansae200r" ]; then
3333 echo "Do not use the e200R target for regular builds. Use e200 instead."
3334 exit 8
3336 debug=""
3337 btype="N" # set it explicitly since RET only gets here as well
3338 echo "Normal build selected"
3341 esac
3342 # to be able running "make manual" from non-manual configuration
3343 case $modelname in
3344 archosrecorderv2)
3345 manualdev="archosfmrecorder"
3347 iriverh1??)
3348 manualdev="iriverh100"
3350 ipodmini2g)
3351 manualdev="ipodmini1g"
3354 manualdev=$modelname
3356 esac
3358 if [ -z "$debug" ]; then
3359 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3362 if [ "yes" = "$application" ]; then
3363 echo Building Rockbox as an Application
3364 extradefines="$extradefines -DAPPLICATION"
3367 echo "Using source code root directory: $rootdir"
3369 # this was once possible to change at build-time, but no more:
3370 language="english"
3372 uname=`uname`
3374 if [ "yes" = "$simulator" ]; then
3375 # setup compiler and things for simulator
3376 simcc "sdl-sim"
3378 if [ -d "simdisk" ]; then
3379 echo "Subdirectory 'simdisk' already present"
3380 else
3381 mkdir simdisk
3382 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3386 # Now, figure out version number of the (gcc) compiler we are about to use
3387 gccver=`$CC -dumpversion`;
3389 # figure out the binutil version too and display it, mostly for the build
3390 # system etc to be able to see it easier
3391 if [ $uname = "Darwin" ]; then
3392 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3393 else
3394 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3397 if [ -z "$gccver" ]; then
3398 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3399 echo "[WARNING] this may cause your build to fail since we cannot do the"
3400 echo "[WARNING] checks we want now."
3401 else
3403 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3404 # DEPEND on it
3406 num1=`echo $gccver | cut -d . -f1`
3407 num2=`echo $gccver | cut -d . -f2`
3408 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3410 # This makes:
3411 # 3.3.X => 303
3412 # 3.4.X => 304
3413 # 2.95.3 => 295
3415 echo "Using $CC $gccver ($gccnum)"
3417 if test "$gccnum" -ge "400"; then
3418 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3419 # so we ignore that warnings for now
3420 # -Wno-pointer-sign
3421 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3424 if test "$gccnum" -ge "402"; then
3425 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3426 # and later would throw it for several valid cases
3427 GCCOPTS="$GCCOPTS -Wno-override-init"
3430 case $prefix in
3431 ""|"$CROSS_COMPILE")
3432 # simulator
3434 i586-mingw32msvc-)
3435 # cross-compile for win32
3438 # Verify that the cross-compiler is of a recommended version!
3439 if test "$gccver" != "$gccchoice"; then
3440 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3441 echo "WARNING: version $gccchoice!"
3442 echo "WARNING: This may cause your build to fail since it may be a version"
3443 echo "WARNING: that isn't functional or known to not be the best choice."
3444 echo "WARNING: If you suffer from build problems, you know that this is"
3445 echo "WARNING: a likely source for them..."
3448 esac
3453 echo "Using $LD $ldver"
3455 # check the compiler for SH platforms
3456 if test "$CC" = "sh-elf-gcc"; then
3457 if test "$gccnum" -lt "400"; then
3458 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3459 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3460 else
3461 # figure out patch status
3462 gccpatch=`$CC --version`;
3464 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3465 echo "gcc $gccver is rockbox patched"
3466 # then convert -O to -Os to get smaller binaries!
3467 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3468 else
3469 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3470 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3475 if test "$CC" = "m68k-elf-gcc"; then
3476 # convert -O to -Os to get smaller binaries!
3477 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3480 if [ "$ARG_CCACHE" = "1" ]; then
3481 echo "Enable ccache for building"
3482 ccache="ccache"
3483 elif [ "$ARG_CCACHE" != "0" ]; then
3484 ccache=`findtool ccache`
3485 if test -n "$ccache"; then
3486 echo "Found and uses ccache ($ccache)"
3490 # figure out the full path to the various commands if possible
3491 HOSTCC=`findtool gcc --lit`
3492 HOSTAR=`findtool ar --lit`
3493 CC=`findtool ${CC} --lit`
3494 LD=`findtool ${AR} --lit`
3495 AR=`findtool ${AR} --lit`
3496 AS=`findtool ${AS} --lit`
3497 OC=`findtool ${OC} --lit`
3498 WINDRES=`findtool ${WINDRES} --lit`
3499 DLLTOOL=`findtool ${DLLTOOL} --lit`
3500 DLLWRAP=`findtool ${DLLWRAP} --lit`
3501 RANLIB=`findtool ${RANLIB} --lit`
3503 if test -n "$ccache"; then
3504 CC="$ccache $CC"
3507 if test "$ARG_ARM_THUMB" = "1"; then
3508 extradefines="$extradefines -DUSE_THUMB"
3509 CC="$toolsdir/thumb-cc.py $CC"
3512 if test "X$endian" = "Xbig"; then
3513 defendian="ROCKBOX_BIG_ENDIAN"
3514 else
3515 defendian="ROCKBOX_LITTLE_ENDIAN"
3518 if [ "$ARG_RBDIR" != "" ]; then
3519 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3520 rbdir="/"$ARG_RBDIR
3521 else
3522 rbdir=$ARG_RBDIR
3524 echo "Using alternate rockbox dir: ${rbdir}"
3527 sed > autoconf.h \
3528 -e "s<@ENDIAN@<${defendian}<g" \
3529 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3530 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3531 -e "s<@config_rtc@<$config_rtc<g" \
3532 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3533 -e "s<@thread_support@<$thread_support<g" \
3534 -e "s<@RBDIR@<${rbdir}<g" \
3535 -e "s<@sharepath@<${sharedir}<g" \
3536 -e "s<@binpath@<${bindir}<g" \
3537 -e "s<@libpath@<${libdir}<g" \
3538 -e "s<@have_backlight@<$have_backlight<g" \
3539 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3540 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3541 -e "s<@lcd_width@<$app_lcd_width<g" \
3542 -e "s<@lcd_height@<$app_lcd_height<g" \
3543 <<EOF
3544 /* This header was made by configure */
3545 #ifndef __BUILD_AUTOCONF_H
3546 #define __BUILD_AUTOCONF_H
3548 /* Define endianess for the target or simulator platform */
3549 #define @ENDIAN@ 1
3551 /* Define this if you build rockbox to support the logf logging and display */
3552 #undef ROCKBOX_HAS_LOGF
3554 /* Define this to record a chart with timings for the stages of boot */
3555 #undef DO_BOOTCHART
3557 /* optional define for a backlight modded Ondio */
3558 @have_backlight@
3560 /* optional define for FM radio mod for iAudio M5 */
3561 @have_fmradio_in@
3563 /* optional define for ATA poweroff on Player */
3564 @have_ata_poweroff@
3566 /* optional defines for RTC mod for h1x0 */
3567 @config_rtc@
3568 @have_rtc_alarm@
3570 /* the threading backend we use */
3571 #define @thread_support@
3573 /* lcd dimensions for application builds from configure */
3574 @lcd_width@
3575 @lcd_height@
3577 /* root of Rockbox */
3578 #define ROCKBOX_DIR "@RBDIR@"
3579 #define ROCKBOX_SHARE_PATH "@sharepath@"
3580 #define ROCKBOX_BINARY_PATH "@binpath@"
3581 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3583 #endif /* __BUILD_AUTOCONF_H */
3586 if test -n "$t_cpu"; then
3587 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3589 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3590 # Maemo needs the SDL port, too
3591 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3592 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3593 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3594 # Pandora needs the SDL port, too
3595 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3596 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3597 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3598 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3599 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3602 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3603 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3604 GCCOPTS="$GCCOPTS"
3607 if test "$simulator" = "yes"; then
3608 # add simul make stuff on the #SIMUL# line
3609 simmagic1="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3610 simmagic2="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3611 else
3612 # delete the lines that match
3613 simmagic1='/@SIMUL1@/D'
3614 simmagic2='/@SIMUL2@/D'
3617 if test "$swcodec" = "yes"; then
3618 voicetoolset="rbspeexenc voicefont wavtrim"
3619 else
3620 voicetoolset="voicefont wavtrim"
3623 if test "$apps" = "apps"; then
3624 # only when we build "real" apps we build the .lng files
3625 buildlangs="langs"
3628 #### Fix the cmdline ###
3629 if [ "$ARG_CCACHE" = "1" ]; then
3630 cmdline="--ccache "
3631 elif [ "$ARG_CCACHE" = "0" ]; then
3632 cmdline="--no-ccache "
3634 if [ "$ARG_ARM_EABI" = "1" ]; then
3635 cmdline="$cmdline--eabi "
3637 if [ -n "$ARG_PREFIX" ]; then
3638 cmdline="$cmdline--prefix=\$(PREFIX) "
3640 if [ -n "$ARG_LCDWIDTH" ]; then
3641 cmdline="$cmdline--lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3644 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3646 ### end of cmdline
3648 sed > Makefile \
3649 -e "s<@ROOTDIR@<${rootdir}<g" \
3650 -e "s<@DEBUG@<${debug}<g" \
3651 -e "s<@MEMORY@<${memory}<g" \
3652 -e "s<@TARGET_ID@<${target_id}<g" \
3653 -e "s<@TARGET@<${target}<g" \
3654 -e "s<@CPU@<${t_cpu}<g" \
3655 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3656 -e "s<@MODELNAME@<${modelname}<g" \
3657 -e "s<@LANGUAGE@<${language}<g" \
3658 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3659 -e "s<@PWD@<${pwd}<g" \
3660 -e "s<@HOSTCC@<${HOSTCC}<g" \
3661 -e "s<@HOSTAR@<${HOSTAR}<g" \
3662 -e "s<@CC@<${CC}<g" \
3663 -e "s<@LD@<${LD}<g" \
3664 -e "s<@AR@<${AR}<g" \
3665 -e "s<@AS@<${AS}<g" \
3666 -e "s<@OC@<${OC}<g" \
3667 -e "s<@WINDRES@<${WINDRES}<g" \
3668 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3669 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3670 -e "s<@RANLIB@<${RANLIB}<g" \
3671 -e "s<@TOOL@<${tool}<g" \
3672 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3673 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3674 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3675 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3676 -e "s<@OUTPUT@<${output}<g" \
3677 -e "s<@APPEXTRA@<${appextra}<g" \
3678 -e "s<@ARCHOSROM@<${archosrom}<g" \
3679 -e "s<@FLASHFILE@<${flash}<g" \
3680 -e "s<@PLUGINS@<${plugins}<g" \
3681 -e "s<@CODECS@<${swcodec}<g" \
3682 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3683 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3684 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3685 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3686 -e "s<@LDOPTS@<${LDOPTS}<g" \
3687 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3688 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3689 -e "s<@EXTRADEF@<${extradefines}<g" \
3690 -e "s<@APPSDIR@<${appsdir}<g" \
3691 -e "s<@FIRMDIR@<${firmdir}<g" \
3692 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3693 -e "s<@APPS@<${apps}<g" \
3694 -e "s<@APP_TYPE@<${app_type}<g" \
3695 -e "s<@APPLICATION@<${application}<g" \
3696 -e "s<@GCCVER@<${gccver}<g" \
3697 -e "s<@GCCNUM@<${gccnum}<g" \
3698 -e "s<@UNAME@<${uname}<g" \
3699 -e "s<@ENDIAN@<${defendian}<g" \
3700 -e "s<@TOOLSET@<${toolset}<g" \
3701 -e "${simmagic1}" \
3702 -e "${simmagic2}" \
3703 -e "s<@MANUALDEV@<${manualdev}<g" \
3704 -e "s<@ENCODER@<${ENC_CMD}<g" \
3705 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3706 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3707 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3708 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3709 -e "s<@LANGS@<${buildlangs}<g" \
3710 -e "s<@USE_ELF@<${USE_ELF}<g" \
3711 -e "s<@RBDIR@<${rbdir}<g" \
3712 -e "s<@sharepath@<${sharedir}<g" \
3713 -e "s<@binpath@<${bindir}<g" \
3714 -e "s<@libpath@<${libdir}<g" \
3715 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3716 -e "s<@CMDLINE@<$cmdline<g" \
3717 -e "s<@SDLCONFIG@<$sdl<g" \
3718 <<EOF
3719 ## Automatically generated. http://www.rockbox.org/
3721 export ROOTDIR=@ROOTDIR@
3722 export FIRMDIR=@FIRMDIR@
3723 export APPSDIR=@APPSDIR@
3724 export TOOLSDIR=@TOOLSDIR@
3725 export DOCSDIR=\$(ROOTDIR)/docs
3726 export MANUALDIR=\${ROOTDIR}/manual
3727 export DEBUG=@DEBUG@
3728 export MODELNAME=@MODELNAME@
3729 export ARCHOSROM=@ARCHOSROM@
3730 export FLASHFILE=@FLASHFILE@
3731 export TARGET_ID=@TARGET_ID@
3732 export TARGET=@TARGET@
3733 export CPU=@CPU@
3734 export MANUFACTURER=@MANUFACTURER@
3735 export OBJDIR=@PWD@
3736 export BUILDDIR=@PWD@
3737 export LANGUAGE=@LANGUAGE@
3738 export VOICELANGUAGE=@VOICELANGUAGE@
3739 export MEMORYSIZE=@MEMORY@
3740 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3741 export MKFIRMWARE=@TOOL@
3742 export BMP2RB_MONO=@BMP2RB_MONO@
3743 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3744 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3745 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3746 export BINARY=@OUTPUT@
3747 export APPEXTRA=@APPEXTRA@
3748 export ENABLEDPLUGINS=@PLUGINS@
3749 export SOFTWARECODECS=@CODECS@
3750 export EXTRA_DEFINES=@EXTRADEF@
3751 export HOSTCC=@HOSTCC@
3752 export HOSTAR=@HOSTAR@
3753 export CC=@CC@
3754 export LD=@LD@
3755 export AR=@AR@
3756 export AS=@AS@
3757 export OC=@OC@
3758 export WINDRES=@WINDRES@
3759 export DLLTOOL=@DLLTOOL@
3760 export DLLWRAP=@DLLWRAP@
3761 export RANLIB=@RANLIB@
3762 export PREFIX=@PREFIX@
3763 export PROFILE_OPTS=@PROFILE_OPTS@
3764 export APP_TYPE=@APP_TYPE@
3765 export APPLICATION=@APPLICATION@
3766 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3767 export GCCOPTS=@GCCOPTS@
3768 export TARGET_INC=@TARGET_INC@
3769 export LOADADDRESS=@LOADADDRESS@
3770 export SHARED_FLAG=@SHARED_FLAG@
3771 export LDOPTS=@LDOPTS@
3772 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3773 export GCCVER=@GCCVER@
3774 export GCCNUM=@GCCNUM@
3775 export UNAME=@UNAME@
3776 export MANUALDEV=@MANUALDEV@
3777 export TTS_OPTS=@TTS_OPTS@
3778 export TTS_ENGINE=@TTS_ENGINE@
3779 export ENC_OPTS=@ENC_OPTS@
3780 export ENCODER=@ENCODER@
3781 export USE_ELF=@USE_ELF@
3782 export RBDIR=@RBDIR@
3783 export ROCKBOX_SHARE_PATH=@sharepath@
3784 export ROCKBOX_BINARY_PATH=@binpath@
3785 export ROCKBOX_LIBRARY_PATH=@libpath@
3786 export SDLCONFIG=@SDLCONFIG@
3788 CONFIGURE_OPTIONS=@CMDLINE@
3790 include \$(TOOLSDIR)/root.make
3794 echo "Created Makefile"