The last submit had one define too much. Nevertheless fix the IRAM configuration...
[kugel-rb.git] / tools / configure
blob96953c8b5097b24ebc7347df5d02dffa0e12de36
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 mipselcc () {
504 prefixtools mipsel-elf-
505 # mips is predefined, but we want it for paths. use __mips instead
506 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
507 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
508 GCCOPTIMIZE="-fomit-frame-pointer"
509 endian="little"
510 gccchoice="4.1.2"
513 maemocc () {
514 # Scratchbox sets up "gcc" based on the active target
515 prefixtools ""
517 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
518 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
519 GCCOPTIMIZE=''
520 LDOPTS="-lm -ldl $LDOPTS"
521 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
522 SHARED_FLAG="-shared"
523 endian="little"
524 thread_support="HAVE_SIGALTSTACK_THREADS"
526 is_n900=0
527 # Determine maemo version
528 if pkg-config --atleast-version=5 maemo-version; then
529 if [ "$1" == "4" ]; then
530 echo "ERROR: Maemo 4 SDK required."
531 exit 1
533 extradefines="$extradefines -DMAEMO5"
534 echo "Found N900 maemo version"
535 is_n900=1
536 elif pkg-config --atleast-version=4 maemo-version; then
537 if [ "$1" == "5" ]; then
538 echo "ERROR: Maemo 5 SDK required."
539 exit 1
541 extradefines="$extradefines -DMAEMO4"
542 echo "Found N8xx maemo version"
543 else
544 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
545 exit 1
548 # SDL
549 if [ $is_n900 -eq 1 ]; then
550 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
551 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
552 else
553 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
554 LDOPTS="$LDOPTS `sdl-config --libs`"
557 # glib and libosso support
558 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
559 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
561 # libhal support: Battery monitoring
562 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
563 LDOPTS="$LDOPTS `pkg-config --libs hal`"
565 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
566 if [ $is_n900 -eq 1 ]; then
567 # gstreamer support: Audio output.
568 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
569 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
571 # N900 specific: libplayback support
572 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
573 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
575 # N900 specific: Enable ARMv7 NEON support
576 if sb-conf show -A |grep -q -i arm; then
577 echo "Detected ARM target"
578 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
579 extradefines="$extradefines -DMAEMO_ARM_BUILD"
580 else
581 echo "Detected x86 target"
583 else
584 # N8xx specific: Enable armv5te instructions
585 if sb-conf show -A |grep -q -i arm; then
586 echo "Detected ARM target"
587 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
588 extradefines="$extradefines -DMAEMO_ARM_BUILD"
589 else
590 echo "Detected x86 target"
595 pandoracc () {
596 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
597 # You have to use the sebt3 toolchain:
598 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
600 PNDSDK="/usr/local/angstrom/arm"
601 if [ ! -x $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc ]; then
602 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
603 exit
606 PATH=$PNDSDK/bin:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi/usr/bin
607 PKG_CONFIG_PATH=$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib/pkgconfig
608 LDOPTS="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
609 PKG_CONFIG="pkg-config"
611 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
612 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
613 GCCOPTIMIZE=''
614 LDOPTS="-lm -ldl $LDOPTS"
615 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
616 SHARED_FLAG="-shared"
617 endian="little"
618 thread_support="HAVE_SIGALTSTACK_THREADS"
620 # Include path
621 GCCOPTS="-I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
623 # Set up compiler
624 gccchoice="4.3.3"
625 prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
627 # Detect SDL
628 GCCOPTS="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
629 LDOPTS="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
631 # Compiler options
632 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
633 GCCOPTS="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
634 GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant"
637 androidcc () {
638 if [ -z "$ANDROID_SDK_PATH" ]; then
639 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
640 echo "environment variable point to the root directory of the Android SDK."
641 exit
643 if [ -z "$ANDROID_NDK_PATH" ]; then
644 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
645 echo "environment variable point to the root directory of the Android NDK."
646 exit
648 buildhost=`uname | tr [:upper:] [:lower:]`
649 gccchoice="4.4.3"
650 gcctarget="arm-linux-androideabi-"
651 gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
652 PATH=$PATH:$gccprefix/bin
653 prefixtools $gcctarget
654 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
655 GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
656 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
657 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
658 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
659 LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog"
660 endian="little"
661 SHARED_FLAG="-shared"
664 whichadvanced () {
665 atype=`echo "$1" | cut -c 2-`
666 ##################################################################
667 # Prompt for specific developer options
669 if [ "$atype" ]; then
670 interact=
671 else
672 interact=1
673 echo ""
674 printf "Enter your developer options (press only enter when done)\n\
675 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
676 (T)est plugins, S(m)all C lib:"
677 if [ "$memory" = "2" ]; then
678 printf ", (8)MB MOD"
680 if [ "$modelname" = "archosplayer" ]; then
681 printf ", Use (A)TA poweroff"
683 if [ "$t_model" = "ondio" ]; then
684 printf ", (B)acklight MOD"
686 if [ "$modelname" = "iaudiom5" ]; then
687 printf ", (F)M radio MOD"
689 if [ "$modelname" = "iriverh120" ]; then
690 printf ", (R)TC MOD"
692 echo ""
695 cont=1
696 while [ $cont = "1" ]; do
698 if [ "$interact" ]; then
699 option=`input`
700 else
701 option=`echo "$atype" | cut -c 1`
704 case $option in
705 [Dd])
706 if [ "yes" = "$profile" ]; then
707 echo "Debug is incompatible with profiling"
708 else
709 echo "DEBUG build enabled"
710 use_debug="yes"
713 [Ll])
714 echo "logf() support enabled"
715 logf="yes"
717 [Mm])
718 echo "Using Rockbox' small C library"
719 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
721 [Tt])
722 echo "Including test plugins"
723 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
725 [Cc])
726 echo "bootchart enabled (logf also enabled)"
727 bootchart="yes"
728 logf="yes"
730 [Ss])
731 echo "Simulator build enabled"
732 simulator="yes"
734 [Pp])
735 if [ "yes" = "$use_debug" ]; then
736 echo "Profiling is incompatible with debug"
737 else
738 echo "Profiling support is enabled"
739 profile="yes"
742 [Vv])
743 echo "Voice build selected"
744 voice="yes"
747 if [ "$memory" = "2" ]; then
748 memory="8"
749 echo "Memory size selected: 8MB"
752 [Aa])
753 if [ "$modelname" = "archosplayer" ]; then
754 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
755 echo "ATA power off enabled"
758 [Bb])
759 if [ "$t_model" = "ondio" ]; then
760 have_backlight="#define HAVE_BACKLIGHT"
761 echo "Backlight functions enabled"
764 [Ff])
765 if [ "$modelname" = "iaudiom5" ]; then
766 have_fmradio_in="#define HAVE_FMRADIO_IN"
767 echo "FM radio functions enabled"
770 [Rr])
771 if [ "$modelname" = "iriverh120" ]; then
772 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
773 have_rtc_alarm="#define HAVE_RTC_ALARM"
774 echo "RTC functions enabled (DS1339/DS3231)"
777 [Ww])
778 echo "Enabling Windows 32 cross-compiling"
779 win32crosscompile="yes"
781 "") # Match enter press when finished with advanced options
782 cont=0
785 echo "[ERROR] Option $option unsupported"
787 esac
788 if [ "$interact" ]; then
789 btype="$btype$option"
790 else
791 atype=`echo "$atype" | cut -c 2-`
792 [ "$atype" ] || cont=0
794 done
795 echo "done"
797 if [ "yes" = "$voice" ]; then
798 # Ask about languages to build
799 picklang
800 voicelanguage=`whichlang`
801 echo "Voice language set to $voicelanguage"
803 # Configure encoder and TTS engine for each language
804 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
805 voiceconfig "$thislang"
806 done
808 if [ "yes" = "$use_debug" ]; then
809 debug="-DDEBUG"
810 GCCOPTS="$GCCOPTS -g -DDEBUG"
812 if [ "yes" = "$logf" ]; then
813 use_logf="#define ROCKBOX_HAS_LOGF 1"
815 if [ "yes" = "$bootchart" ]; then
816 use_bootchart="#define DO_BOOTCHART 1"
818 if [ "yes" = "$simulator" ]; then
819 debug="-DDEBUG"
820 extradefines="$extradefines -DSIMULATOR"
821 archosrom=""
822 flash=""
824 if [ "yes" = "$profile" ]; then
825 extradefines="$extradefines -DRB_PROFILE"
826 PROFILE_OPTS="-finstrument-functions"
830 # Configure voice settings
831 voiceconfig () {
832 thislang=$1
833 if [ ! "$ARG_TTS" ]; then
834 echo "Building $thislang voice for $modelname. Select options"
835 echo ""
838 if [ -n "`findtool flite`" ]; then
839 FLITE="F(l)ite "
840 FLITE_OPTS=""
841 DEFAULT_TTS="flite"
842 DEFAULT_TTS_OPTS=$FLITE_OPTS
843 DEFAULT_NOISEFLOOR="500"
844 DEFAULT_CHOICE="L"
846 if [ -n "`findtool espeak`" ]; then
847 ESPEAK="(e)Speak "
848 ESPEAK_OPTS=""
849 DEFAULT_TTS="espeak"
850 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
851 DEFAULT_NOISEFLOOR="500"
852 DEFAULT_CHOICE="e"
854 if [ -n "`findtool festival`" ]; then
855 FESTIVAL="(F)estival "
856 case "$thislang" in
857 "italiano")
858 FESTIVAL_OPTS="--language italian"
860 "espanol")
861 FESTIVAL_OPTS="--language spanish"
863 "finnish")
864 FESTIVAL_OPTS="--language finnish"
866 "czech")
867 FESTIVAL_OPTS="--language czech"
870 FESTIVAL_OPTS=""
872 esac
873 DEFAULT_TTS="festival"
874 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
875 DEFAULT_NOISEFLOOR="500"
876 DEFAULT_CHOICE="F"
878 if [ -n "`findtool swift`" ]; then
879 SWIFT="S(w)ift "
880 SWIFT_OPTS=""
881 DEFAULT_TTS="swift"
882 DEFAULT_TTS_OPTS=$SWIFT_OPTS
883 DEFAULT_NOISEFLOOR="500"
884 DEFAULT_CHOICE="w"
886 # Allow SAPI if Windows is in use
887 if [ -n "`findtool winver`" ]; then
888 SAPI="(S)API "
889 SAPI_OPTS=""
890 DEFAULT_TTS="sapi"
891 DEFAULT_TTS_OPTS=$SAPI_OPTS
892 DEFAULT_NOISEFLOOR="500"
893 DEFAULT_CHOICE="S"
896 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
897 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
898 exit 3
901 if [ "$ARG_TTS" ]; then
902 option=$ARG_TTS
903 else
904 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
905 option=`input`
907 advopts="$advopts --tts=$option"
908 case "$option" in
909 [Ll])
910 TTS_ENGINE="flite"
911 NOISEFLOOR="500" # TODO: check this value
912 TTS_OPTS=$FLITE_OPTS
914 [Ee])
915 TTS_ENGINE="espeak"
916 NOISEFLOOR="500"
917 TTS_OPTS=$ESPEAK_OPTS
919 [Ff])
920 TTS_ENGINE="festival"
921 NOISEFLOOR="500"
922 TTS_OPTS=$FESTIVAL_OPTS
924 [Ss])
925 TTS_ENGINE="sapi"
926 NOISEFLOOR="500"
927 TTS_OPTS=$SAPI_OPTS
929 [Ww])
930 TTS_ENGINE="swift"
931 NOISEFLOOR="500"
932 TTS_OPTS=$SWIFT_OPTS
935 TTS_ENGINE=$DEFAULT_TTS
936 TTS_OPTS=$DEFAULT_TTS_OPTS
937 NOISEFLOOR=$DEFAULT_NOISEFLOOR
938 esac
939 echo "Using $TTS_ENGINE for TTS"
941 # Select which voice to use for Festival
942 if [ "$TTS_ENGINE" = "festival" ]; then
943 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
944 for voice in $voicelist; do
945 TTS_FESTIVAL_VOICE="$voice" # Default choice
946 break
947 done
948 if [ "$ARG_VOICE" ]; then
949 CHOICE=$ARG_VOICE
950 else
952 for voice in $voicelist; do
953 printf "%3d. %s\n" "$i" "$voice"
954 i=`expr $i + 1`
955 done
956 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
957 CHOICE=`input`
960 for voice in $voicelist; do
961 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
962 TTS_FESTIVAL_VOICE="$voice"
964 i=`expr $i + 1`
965 done
966 advopts="$advopts --voice=$CHOICE"
967 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
968 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
971 # Read custom tts options from command line
972 if [ "$ARG_TTSOPTS" ]; then
973 TTS_OPTS="$ARG_TTSOPTS"
974 advopts="$advopts --ttsopts='$TTS_OPTS'"
975 echo "$TTS_ENGINE options set to $TTS_OPTS"
978 if [ "$swcodec" = "yes" ]; then
979 ENCODER="rbspeexenc"
980 ENC_CMD="rbspeexenc"
981 ENC_OPTS="-q 4 -c 10"
982 else
983 if [ -n "`findtool lame`" ]; then
984 ENCODER="lame"
985 ENC_CMD="lame"
986 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
987 else
988 echo "You need LAME in the system path to build voice files for"
989 echo "HWCODEC targets."
990 exit 4
994 echo "Using $ENCODER for encoding voice clips"
996 # Read custom encoder options from command line
997 if [ "$ARG_ENCOPTS" ]; then
998 ENC_OPTS="$ARG_ENCOPTS"
999 advopts="$advopts --encopts='$ENC_OPTS'"
1000 echo "$ENCODER options set to $ENC_OPTS"
1003 TEMPDIR="${pwd}"
1004 if [ -n "`findtool cygpath`" ]; then
1005 TEMPDIR=`cygpath . -a -w`
1009 picklang() {
1010 # figure out which languages that are around
1011 for file in $rootdir/apps/lang/*.lang; do
1012 clean=`basename $file .lang`
1013 langs="$langs $clean"
1014 done
1016 if [ "$ARG_LANG" ]; then
1017 pick=$ARG_LANG
1018 else
1019 echo "Select a number for the language to use (default is english)"
1020 # FIXME The multiple-language feature is currently broken
1021 # echo "You may enter a comma-separated list of languages to build"
1023 num=1
1024 for one in $langs; do
1025 echo "$num. $one"
1026 num=`expr $num + 1`
1027 done
1028 pick=`input`
1030 advopts="$advopts --language=$pick"
1033 whichlang() {
1034 output=""
1035 # Allow the user to pass a comma-separated list of langauges
1036 for thispick in `echo $pick | sed 's/,/ /g'`; do
1037 num=1
1038 for one in $langs; do
1039 # Accept both the language number and name
1040 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
1041 if [ "$output" = "" ]; then
1042 output=$one
1043 else
1044 output=$output,$one
1047 num=`expr $num + 1`
1048 done
1049 done
1050 if [ -z "$output" ]; then
1051 # pick a default
1052 output="english"
1054 echo $output
1057 help() {
1058 echo "Rockbox configure script."
1059 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1060 echo "Do *NOT* run this within the tools directory!"
1061 echo ""
1062 cat <<EOF
1063 Usage: configure [OPTION]...
1064 Options:
1065 --target=TARGET Sets the target, TARGET can be either the target ID or
1066 corresponding string. Run without this option to see all
1067 available targets.
1069 --ram=RAM Sets the RAM for certain targets. Even though any number
1070 is accepted, not every number is correct. The default
1071 value will be applied, if you entered a wrong number
1072 (which depends on the target). Watch the output. Run
1073 without this option if you are not sure which the right
1074 number is.
1076 --type=TYPE Sets the build type. Shortcuts are also valid.
1077 Run without this option to see all available types.
1078 Multiple values are allowed and managed in the input
1079 order. So --type=b stands for Bootloader build, while
1080 --type=ab stands for "Backlight MOD" build.
1082 --language=LANG Set the language used for voice generation (used only if
1083 TYPE is AV).
1085 --tts=ENGINE Set the TTS engine used for voice generation (used only
1086 if TYPE is AV).
1088 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1089 AV).
1091 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1093 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1095 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1096 This is useful for having multiple alternate builds on
1097 your device that you can load with ROLO. However as the
1098 bootloader looks for .rockbox you won't be able to boot
1099 into this build.
1101 --ccache Enable ccache use (done by default these days)
1102 --no-ccache Disable ccache use
1104 --eabi Make configure prefer toolchains that are able to compile
1105 for the new ARM standard abi EABI
1106 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1107 --thumb Build with -mthumb (for ARM builds)
1108 --no-thumb The opposite of --thumb (don't use thumb even for targets
1109 where this is the default
1110 --sdl-threads Force use of SDL threads. They have inferior performance,
1111 but are better debuggable with GDB
1112 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1113 behavior of falling back to them if no native thread
1114 support was found.
1115 --prefix Target installation directory
1116 --help Shows this message (must not be used with other options)
1120 exit
1123 ARG_CCACHE=
1124 ARG_ENCOPTS=
1125 ARG_LANG=
1126 ARG_RAM=
1127 ARG_RBDIR=
1128 ARG_TARGET=
1129 ARG_TTS=
1130 ARG_TTSOPTS=
1131 ARG_TYPE=
1132 ARG_VOICE=
1133 ARG_ARM_EABI=
1134 ARG_ARM_THUMB=
1135 ARG_PREFIX="$PREFIX"
1136 ARG_THREAD_SUPPORT=
1137 err=
1138 for arg in "$@"; do
1139 case "$arg" in
1140 --ccache) ARG_CCACHE=1;;
1141 --no-ccache) ARG_CCACHE=0;;
1142 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1143 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
1144 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1145 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
1146 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1147 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1148 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1149 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1150 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1151 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1152 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
1153 --eabi) ARG_ARM_EABI=1;;
1154 --no-eabi) ARG_ARM_EABI=0;;
1155 --thumb) ARG_ARM_THUMB=1;;
1156 --no-thumb) ARG_ARM_THUMB=0;;
1157 --sdl-threads)ARG_THREAD_SUPPORT=1;;
1158 --no-sdl-threads)
1159 ARG_THREAD_SUPPORT=0;;
1160 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
1161 --help) help;;
1162 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1163 esac
1164 done
1165 [ "$err" ] && exit 1
1167 advopts=
1169 if [ "$TMPDIR" != "" ]; then
1170 tmpdir=$TMPDIR
1171 else
1172 tmpdir=/tmp
1174 echo Using temporary directory $tmpdir
1176 if test -r "configure"; then
1177 # this is a check for a configure script in the current directory, it there
1178 # is one, try to figure out if it is this one!
1180 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1181 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1182 echo "It will only cause you pain and grief. Instead do this:"
1183 echo ""
1184 echo " cd .."
1185 echo " mkdir build-dir"
1186 echo " cd build-dir"
1187 echo " ../tools/configure"
1188 echo ""
1189 echo "Much happiness will arise from this. Enjoy"
1190 exit 5
1194 # get our current directory
1195 pwd=`pwd`;
1197 if { echo $pwd | grep " "; } then
1198 echo "You're running this script in a path that contains space. The build"
1199 echo "system is unfortunately not clever enough to deal with this. Please"
1200 echo "run the script from a different path, rename the path or fix the build"
1201 echo "system!"
1202 exit 6
1205 if [ -z "$rootdir" ]; then
1206 ##################################################################
1207 # Figure out where the source code root is!
1209 rootdir=`dirname $0`/../
1211 #####################################################################
1212 # Convert the possibly relative directory name to an absolute version
1214 now=`pwd`
1215 cd $rootdir
1216 rootdir=`pwd`
1218 # cd back to the build dir
1219 cd $now
1222 apps="apps"
1223 appsdir='\$(ROOTDIR)/apps'
1224 firmdir='\$(ROOTDIR)/firmware'
1225 toolsdir='\$(ROOTDIR)/tools'
1228 ##################################################################
1229 # Figure out target platform
1232 if [ "$ARG_TARGET" ]; then
1233 buildfor=$ARG_TARGET
1234 else
1235 echo "Enter target platform:"
1236 cat <<EOF
1237 ==Archos== ==iriver== ==Apple iPod==
1238 0) Player/Studio 10) H120/H140 20) Color/Photo
1239 1) Recorder 11) H320/H340 21) Nano 1G
1240 2) FM Recorder 12) iHP-100/110/115 22) Video
1241 3) Recorder v2 13) iFP-790 23) 3G
1242 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1243 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1244 6) AV300 26) Mini 2G
1245 ==Toshiba== 27) 1G, 2G
1246 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1247 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1248 31) M5/M5L
1249 32) 7 ==Olympus= ==SanDisk==
1250 33) D2 70) M:Robe 500 50) Sansa e200
1251 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1252 52) Sansa c200
1253 ==Creative== ==Philips== 53) Sansa m200
1254 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1255 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1256 92) Zen Vision HDD1830 56) Sansa e200v2
1257 102) GoGear HDD6330 57) Sansa m200v4
1258 ==Onda== 58) Sansa Fuze
1259 120) VX747 ==Meizu== 59) Sansa c200v2
1260 121) VX767 110) M6SL 60) Sansa Clipv2
1261 122) VX747+ 111) M6SP 61) Sansa View
1262 123) VX777 112) M3 62) Sansa Clip+
1263 63) Sansa Fuze v2
1264 ==Samsung== ==Tatung== 64) Sansa Fuze+
1265 140) YH-820 150) Elio TPJ-1022
1266 141) YH-920 ==Logik==
1267 142) YH-925 ==Packard Bell== 80) DAX 1GB MP3/DAB
1268 143) YP-S3 160) Vibe 500
1269 ==Lyre project==
1270 ==Application== ==MPIO== 130) Lyre proto 1
1271 200) SDL 170) HD200 131) Mini2440
1272 201) Android 171) HD300
1273 202) Nokia N8xx
1274 203) Nokia N900
1275 204) Pandora
1279 buildfor=`input`;
1282 # Set of tools built for all target platforms:
1283 toolset="rdf2binary convbdf codepages"
1285 # Toolsets for some target families:
1286 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1287 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1288 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
1289 ipodbitmaptools="$toolset scramble bmp2rb"
1290 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
1291 tccbitmaptools="$toolset scramble bmp2rb"
1292 # generic is used by IFP, Meizu and Onda
1293 genericbitmaptools="$toolset bmp2rb"
1294 # scramble is used by all other targets
1295 scramblebitmaptools="$genericbitmaptools scramble"
1298 # ---- For each target ----
1300 # *Variables*
1301 # target_id: a unique number identifying this target, IS NOT the menu number.
1302 # Just use the currently highest number+1 when you add a new
1303 # target.
1304 # modelname: short model name used all over to identify this target
1305 # memory: number of megabytes of RAM this target has. If the amount can
1306 # be selected by the size prompt, let memory be unset here
1307 # target: -Ddefine passed to the build commands to make the correct
1308 # config-*.h file get included etc
1309 # tool: the tool that takes a plain binary and converts that into a
1310 # working "firmware" file for your target
1311 # output: the final output file name
1312 # boottool: the tool that takes a plain binary and generates a bootloader
1313 # file for your target (or blank to use $tool)
1314 # bootoutput:the final output file name for the bootloader (or blank to use
1315 # $output)
1316 # appextra: passed to the APPEXTRA variable in the Makefiles.
1317 # TODO: add proper explanation
1318 # archosrom: used only for Archos targets that build a special flashable .ucl
1319 # image.
1320 # flash: name of output for flashing, for targets where there's a special
1321 # file output for this.
1322 # plugins: set to 'yes' to build the plugins. Early development builds can
1323 # set this to no in the early stages to have an easier life for a
1324 # while
1325 # swcodec: set 'yes' on swcodec targets
1326 # toolset: lists what particular tools in the tools/ directory that this
1327 # target needs to have built prior to building Rockbox
1329 # *Functions*
1330 # *cc: sets up gcc and compiler options for your target builds. Note
1331 # that if you select a simulator build, the compiler selection is
1332 # overridden later in the script.
1334 case $buildfor in
1336 0|archosplayer)
1337 target_id=1
1338 modelname="archosplayer"
1339 target="-DARCHOS_PLAYER"
1340 shcc
1341 tool="$rootdir/tools/scramble"
1342 output="archos.mod"
1343 appextra="player:gui"
1344 archosrom="$pwd/rombox.ucl"
1345 flash="$pwd/rockbox.ucl"
1346 plugins="yes"
1347 swcodec=""
1349 # toolset is the tools within the tools directory that we build for
1350 # this particular target.
1351 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
1353 # Note: the convbdf is present in the toolset just because: 1) the
1354 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1355 # build the player simulator
1357 t_cpu="sh"
1358 t_manufacturer="archos"
1359 t_model="player"
1362 1|archosrecorder)
1363 target_id=2
1364 modelname="archosrecorder"
1365 target="-DARCHOS_RECORDER"
1366 shcc
1367 tool="$rootdir/tools/scramble"
1368 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1369 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1370 output="ajbrec.ajz"
1371 appextra="recorder:gui:radio"
1372 #archosrom="$pwd/rombox.ucl"
1373 flash="$pwd/rockbox.ucl"
1374 plugins="yes"
1375 swcodec=""
1376 # toolset is the tools within the tools directory that we build for
1377 # this particular target.
1378 toolset=$archosbitmaptools
1379 t_cpu="sh"
1380 t_manufacturer="archos"
1381 t_model="recorder"
1384 2|archosfmrecorder)
1385 target_id=3
1386 modelname="archosfmrecorder"
1387 target="-DARCHOS_FMRECORDER"
1388 shcc
1389 tool="$rootdir/tools/scramble -fm"
1390 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1391 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1392 output="ajbrec.ajz"
1393 appextra="recorder:gui:radio"
1394 #archosrom="$pwd/rombox.ucl"
1395 flash="$pwd/rockbox.ucl"
1396 plugins="yes"
1397 swcodec=""
1398 # toolset is the tools within the tools directory that we build for
1399 # this particular target.
1400 toolset=$archosbitmaptools
1401 t_cpu="sh"
1402 t_manufacturer="archos"
1403 t_model="fm_v2"
1406 3|archosrecorderv2)
1407 target_id=4
1408 modelname="archosrecorderv2"
1409 target="-DARCHOS_RECORDERV2"
1410 shcc
1411 tool="$rootdir/tools/scramble -v2"
1412 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1413 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1414 output="ajbrec.ajz"
1415 appextra="recorder:gui:radio"
1416 #archosrom="$pwd/rombox.ucl"
1417 flash="$pwd/rockbox.ucl"
1418 plugins="yes"
1419 swcodec=""
1420 # toolset is the tools within the tools directory that we build for
1421 # this particular target.
1422 toolset=$archosbitmaptools
1423 t_cpu="sh"
1424 t_manufacturer="archos"
1425 t_model="fm_v2"
1428 4|archosondiosp)
1429 target_id=7
1430 modelname="archosondiosp"
1431 target="-DARCHOS_ONDIOSP"
1432 shcc
1433 tool="$rootdir/tools/scramble -osp"
1434 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1435 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1436 output="ajbrec.ajz"
1437 appextra="recorder:gui:radio"
1438 #archosrom="$pwd/rombox.ucl"
1439 flash="$pwd/rockbox.ucl"
1440 plugins="yes"
1441 swcodec=""
1442 # toolset is the tools within the tools directory that we build for
1443 # this particular target.
1444 toolset=$archosbitmaptools
1445 t_cpu="sh"
1446 t_manufacturer="archos"
1447 t_model="ondio"
1450 5|archosondiofm)
1451 target_id=8
1452 modelname="archosondiofm"
1453 target="-DARCHOS_ONDIOFM"
1454 shcc
1455 tool="$rootdir/tools/scramble -ofm"
1456 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1457 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1458 output="ajbrec.ajz"
1459 appextra="recorder:gui:radio"
1460 #archosrom="$pwd/rombox.ucl"
1461 flash="$pwd/rockbox.ucl"
1462 plugins="yes"
1463 swcodec=""
1464 toolset=$archosbitmaptools
1465 t_cpu="sh"
1466 t_manufacturer="archos"
1467 t_model="ondio"
1470 6|archosav300)
1471 target_id=38
1472 modelname="archosav300"
1473 target="-DARCHOS_AV300"
1474 memory=16 # always
1475 arm7tdmicc
1476 tool="$rootdir/tools/scramble -mm=C"
1477 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1478 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1479 output="cjbm.ajz"
1480 appextra="recorder:gui:radio"
1481 plugins="yes"
1482 swcodec=""
1483 # toolset is the tools within the tools directory that we build for
1484 # this particular target.
1485 toolset="$toolset scramble descramble bmp2rb"
1486 # architecture, manufacturer and model for the target-tree build
1487 t_cpu="arm"
1488 t_manufacturer="archos"
1489 t_model="av300"
1492 10|iriverh120)
1493 target_id=9
1494 modelname="iriverh120"
1495 target="-DIRIVER_H120"
1496 memory=32 # always
1497 coldfirecc
1498 tool="$rootdir/tools/scramble -add=h120"
1499 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1500 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1501 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1502 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1503 output="rockbox.iriver"
1504 bootoutput="bootloader.iriver"
1505 appextra="recorder:gui:radio"
1506 flash="$pwd/rombox.iriver"
1507 plugins="yes"
1508 swcodec="yes"
1509 # toolset is the tools within the tools directory that we build for
1510 # this particular target.
1511 toolset=$iriverbitmaptools
1512 t_cpu="coldfire"
1513 t_manufacturer="iriver"
1514 t_model="h100"
1517 11|iriverh300)
1518 target_id=10
1519 modelname="iriverh300"
1520 target="-DIRIVER_H300"
1521 memory=32 # always
1522 coldfirecc
1523 tool="$rootdir/tools/scramble -add=h300"
1524 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1525 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1526 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1527 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1528 output="rockbox.iriver"
1529 appextra="recorder:gui:radio"
1530 plugins="yes"
1531 swcodec="yes"
1532 # toolset is the tools within the tools directory that we build for
1533 # this particular target.
1534 toolset=$iriverbitmaptools
1535 t_cpu="coldfire"
1536 t_manufacturer="iriver"
1537 t_model="h300"
1540 12|iriverh100)
1541 target_id=11
1542 modelname="iriverh100"
1543 target="-DIRIVER_H100"
1544 memory=16 # always
1545 coldfirecc
1546 tool="$rootdir/tools/scramble -add=h100"
1547 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1548 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1549 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1550 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1551 output="rockbox.iriver"
1552 bootoutput="bootloader.iriver"
1553 appextra="recorder:gui:radio"
1554 flash="$pwd/rombox.iriver"
1555 plugins="yes"
1556 swcodec="yes"
1557 # toolset is the tools within the tools directory that we build for
1558 # this particular target.
1559 toolset=$iriverbitmaptools
1560 t_cpu="coldfire"
1561 t_manufacturer="iriver"
1562 t_model="h100"
1565 13|iriverifp7xx)
1566 target_id=19
1567 modelname="iriverifp7xx"
1568 target="-DIRIVER_IFP7XX"
1569 memory=1
1570 arm7tdmicc short
1571 tool="cp"
1572 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1573 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1574 output="rockbox.wma"
1575 appextra="recorder:gui:radio"
1576 plugins="yes"
1577 swcodec="yes"
1578 # toolset is the tools within the tools directory that we build for
1579 # this particular target.
1580 toolset=$genericbitmaptools
1581 t_cpu="arm"
1582 t_manufacturer="pnx0101"
1583 t_model="iriver-ifp7xx"
1586 14|iriverh10)
1587 target_id=22
1588 modelname="iriverh10"
1589 target="-DIRIVER_H10"
1590 memory=32 # always
1591 arm7tdmicc
1592 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1593 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1594 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1595 output="rockbox.mi4"
1596 appextra="recorder:gui:radio"
1597 plugins="yes"
1598 swcodec="yes"
1599 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1600 bootoutput="H10_20GC.mi4"
1601 # toolset is the tools within the tools directory that we build for
1602 # this particular target.
1603 toolset=$scramblebitmaptools
1604 # architecture, manufacturer and model for the target-tree build
1605 t_cpu="arm"
1606 t_manufacturer="iriver"
1607 t_model="h10"
1610 15|iriverh10_5gb)
1611 target_id=24
1612 modelname="iriverh10_5gb"
1613 target="-DIRIVER_H10_5GB"
1614 memory=32 # always
1615 arm7tdmicc
1616 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1617 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1618 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1619 output="rockbox.mi4"
1620 appextra="recorder:gui:radio"
1621 plugins="yes"
1622 swcodec="yes"
1623 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1624 bootoutput="H10.mi4"
1625 # toolset is the tools within the tools directory that we build for
1626 # this particular target.
1627 toolset=$scramblebitmaptools
1628 # architecture, manufacturer and model for the target-tree build
1629 t_cpu="arm"
1630 t_manufacturer="iriver"
1631 t_model="h10"
1634 20|ipodcolor)
1635 target_id=13
1636 modelname="ipodcolor"
1637 target="-DIPOD_COLOR"
1638 memory=32 # always
1639 arm7tdmicc
1640 tool="$rootdir/tools/scramble -add=ipco"
1641 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1642 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1643 output="rockbox.ipod"
1644 appextra="recorder:gui:radio"
1645 plugins="yes"
1646 swcodec="yes"
1647 bootoutput="bootloader-$modelname.ipod"
1648 # toolset is the tools within the tools directory that we build for
1649 # this particular target.
1650 toolset=$ipodbitmaptools
1651 # architecture, manufacturer and model for the target-tree build
1652 t_cpu="arm"
1653 t_manufacturer="ipod"
1654 t_model="color"
1657 21|ipodnano1g)
1658 target_id=14
1659 modelname="ipodnano1g"
1660 target="-DIPOD_NANO"
1661 memory=32 # always
1662 arm7tdmicc
1663 tool="$rootdir/tools/scramble -add=nano"
1664 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1665 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1666 output="rockbox.ipod"
1667 appextra="recorder:gui:radio"
1668 plugins="yes"
1669 swcodec="yes"
1670 bootoutput="bootloader-$modelname.ipod"
1671 # toolset is the tools within the tools directory that we build for
1672 # this particular target.
1673 toolset=$ipodbitmaptools
1674 # architecture, manufacturer and model for the target-tree build
1675 t_cpu="arm"
1676 t_manufacturer="ipod"
1677 t_model="nano"
1680 22|ipodvideo)
1681 target_id=15
1682 modelname="ipodvideo"
1683 target="-DIPOD_VIDEO"
1684 memory=64 # always. This is reduced at runtime if needed
1685 arm7tdmicc
1686 tool="$rootdir/tools/scramble -add=ipvd"
1687 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1688 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1689 output="rockbox.ipod"
1690 appextra="recorder:gui:radio"
1691 plugins="yes"
1692 swcodec="yes"
1693 bootoutput="bootloader-$modelname.ipod"
1694 # toolset is the tools within the tools directory that we build for
1695 # this particular target.
1696 toolset=$ipodbitmaptools
1697 # architecture, manufacturer and model for the target-tree build
1698 t_cpu="arm"
1699 t_manufacturer="ipod"
1700 t_model="video"
1703 23|ipod3g)
1704 target_id=16
1705 modelname="ipod3g"
1706 target="-DIPOD_3G"
1707 memory=32 # always
1708 arm7tdmicc
1709 tool="$rootdir/tools/scramble -add=ip3g"
1710 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1711 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1712 output="rockbox.ipod"
1713 appextra="recorder:gui:radio"
1714 plugins="yes"
1715 swcodec="yes"
1716 bootoutput="bootloader-$modelname.ipod"
1717 # toolset is the tools within the tools directory that we build for
1718 # this particular target.
1719 toolset=$ipodbitmaptools
1720 # architecture, manufacturer and model for the target-tree build
1721 t_cpu="arm"
1722 t_manufacturer="ipod"
1723 t_model="3g"
1726 24|ipod4g)
1727 target_id=17
1728 modelname="ipod4g"
1729 target="-DIPOD_4G"
1730 memory=32 # always
1731 arm7tdmicc
1732 tool="$rootdir/tools/scramble -add=ip4g"
1733 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1734 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1735 output="rockbox.ipod"
1736 appextra="recorder:gui:radio"
1737 plugins="yes"
1738 swcodec="yes"
1739 bootoutput="bootloader-$modelname.ipod"
1740 # toolset is the tools within the tools directory that we build for
1741 # this particular target.
1742 toolset=$ipodbitmaptools
1743 # architecture, manufacturer and model for the target-tree build
1744 t_cpu="arm"
1745 t_manufacturer="ipod"
1746 t_model="4g"
1749 25|ipodmini1g)
1750 target_id=18
1751 modelname="ipodmini1g"
1752 target="-DIPOD_MINI"
1753 memory=32 # always
1754 arm7tdmicc
1755 tool="$rootdir/tools/scramble -add=mini"
1756 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1757 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1758 output="rockbox.ipod"
1759 appextra="recorder:gui:radio"
1760 plugins="yes"
1761 swcodec="yes"
1762 bootoutput="bootloader-$modelname.ipod"
1763 # toolset is the tools within the tools directory that we build for
1764 # this particular target.
1765 toolset=$ipodbitmaptools
1766 # architecture, manufacturer and model for the target-tree build
1767 t_cpu="arm"
1768 t_manufacturer="ipod"
1769 t_model="mini"
1772 26|ipodmini2g)
1773 target_id=21
1774 modelname="ipodmini2g"
1775 target="-DIPOD_MINI2G"
1776 memory=32 # always
1777 arm7tdmicc
1778 tool="$rootdir/tools/scramble -add=mn2g"
1779 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1780 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1781 output="rockbox.ipod"
1782 appextra="recorder:gui:radio"
1783 plugins="yes"
1784 swcodec="yes"
1785 bootoutput="bootloader-$modelname.ipod"
1786 # toolset is the tools within the tools directory that we build for
1787 # this particular target.
1788 toolset=$ipodbitmaptools
1789 # architecture, manufacturer and model for the target-tree build
1790 t_cpu="arm"
1791 t_manufacturer="ipod"
1792 t_model="mini2g"
1795 27|ipod1g2g)
1796 target_id=29
1797 modelname="ipod1g2g"
1798 target="-DIPOD_1G2G"
1799 memory=32 # always
1800 arm7tdmicc
1801 tool="$rootdir/tools/scramble -add=1g2g"
1802 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1803 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1804 output="rockbox.ipod"
1805 appextra="recorder:gui:radio"
1806 plugins="yes"
1807 swcodec="yes"
1808 bootoutput="bootloader-$modelname.ipod"
1809 # toolset is the tools within the tools directory that we build for
1810 # this particular target.
1811 toolset=$ipodbitmaptools
1812 # architecture, manufacturer and model for the target-tree build
1813 t_cpu="arm"
1814 t_manufacturer="ipod"
1815 t_model="1g2g"
1818 28|ipodnano2g)
1819 target_id=62
1820 modelname="ipodnano2g"
1821 target="-DIPOD_NANO2G"
1822 memory=32 # always
1823 arm940tcc
1824 tool="$rootdir/tools/scramble -add=nn2g"
1825 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1826 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1827 output="rockbox.ipod"
1828 appextra="recorder:gui:radio"
1829 plugins="yes"
1830 swcodec="yes"
1831 bootoutput="bootloader-$modelname.ipod"
1832 # toolset is the tools within the tools directory that we build for
1833 # this particular target.
1834 toolset=$ipodbitmaptools
1835 # architecture, manufacturer and model for the target-tree build
1836 t_cpu="arm"
1837 t_manufacturer="s5l8700"
1838 t_model="ipodnano2g"
1841 29|ipod6g)
1842 target_id=71
1843 modelname="ipod6g"
1844 target="-DIPOD_6G"
1845 memory=64 # always
1846 arm926ejscc
1847 tool="$rootdir/tools/scramble -add=ip6g"
1848 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1849 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1850 output="rockbox.ipod"
1851 appextra="recorder:gui:radio"
1852 plugins="yes"
1853 swcodec="yes"
1854 bootoutput="bootloader-$modelname.ipod"
1855 # toolset is the tools within the tools directory that we build for
1856 # this particular target.
1857 toolset=$ipodbitmaptools
1858 # architecture, manufacturer and model for the target-tree build
1859 t_cpu="arm"
1860 t_manufacturer="s5l8702"
1861 t_model="ipod6g"
1864 30|iaudiox5)
1865 target_id=12
1866 modelname="iaudiox5"
1867 target="-DIAUDIO_X5"
1868 memory=16 # always
1869 coldfirecc
1870 tool="$rootdir/tools/scramble -add=iax5"
1871 boottool="$rootdir/tools/scramble -iaudiox5"
1872 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1873 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1874 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1875 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1876 output="rockbox.iaudio"
1877 bootoutput="x5_fw.bin"
1878 appextra="recorder:gui:radio"
1879 plugins="yes"
1880 swcodec="yes"
1881 # toolset is the tools within the tools directory that we build for
1882 # this particular target.
1883 toolset="$iaudiobitmaptools"
1884 # architecture, manufacturer and model for the target-tree build
1885 t_cpu="coldfire"
1886 t_manufacturer="iaudio"
1887 t_model="x5"
1890 31|iaudiom5)
1891 target_id=28
1892 modelname="iaudiom5"
1893 target="-DIAUDIO_M5"
1894 memory=16 # always
1895 coldfirecc
1896 tool="$rootdir/tools/scramble -add=iam5"
1897 boottool="$rootdir/tools/scramble -iaudiom5"
1898 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1899 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1900 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1901 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1902 output="rockbox.iaudio"
1903 bootoutput="m5_fw.bin"
1904 appextra="recorder:gui:radio"
1905 plugins="yes"
1906 swcodec="yes"
1907 # toolset is the tools within the tools directory that we build for
1908 # this particular target.
1909 toolset="$iaudiobitmaptools"
1910 # architecture, manufacturer and model for the target-tree build
1911 t_cpu="coldfire"
1912 t_manufacturer="iaudio"
1913 t_model="m5"
1916 32|iaudio7)
1917 target_id=32
1918 modelname="iaudio7"
1919 target="-DIAUDIO_7"
1920 memory=16 # always
1921 arm946cc
1922 tool="$rootdir/tools/scramble -add=i7"
1923 boottool="$rootdir/tools/scramble -tcc=crc"
1924 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1925 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1926 output="rockbox.iaudio"
1927 appextra="recorder:gui:radio"
1928 plugins="yes"
1929 swcodec="yes"
1930 bootoutput="I7_FW.BIN"
1931 # toolset is the tools within the tools directory that we build for
1932 # this particular target.
1933 toolset="$tccbitmaptools"
1934 # architecture, manufacturer and model for the target-tree build
1935 t_cpu="arm"
1936 t_manufacturer="tcc77x"
1937 t_model="iaudio7"
1940 33|cowond2)
1941 target_id=34
1942 modelname="cowond2"
1943 target="-DCOWON_D2"
1944 memory=32
1945 arm926ejscc
1946 tool="$rootdir/tools/scramble -add=d2"
1947 boottool="cp "
1948 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1949 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1950 output="rockbox.d2"
1951 bootoutput="bootloader-cowond2.bin"
1952 appextra="recorder:gui:radio"
1953 plugins="yes"
1954 swcodec="yes"
1955 toolset="$tccbitmaptools"
1956 # architecture, manufacturer and model for the target-tree build
1957 t_cpu="arm"
1958 t_manufacturer="tcc780x"
1959 t_model="cowond2"
1962 34|iaudiom3)
1963 target_id=37
1964 modelname="iaudiom3"
1965 target="-DIAUDIO_M3"
1966 memory=16 # always
1967 coldfirecc
1968 tool="$rootdir/tools/scramble -add=iam3"
1969 boottool="$rootdir/tools/scramble -iaudiom3"
1970 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1971 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1972 output="rockbox.iaudio"
1973 bootoutput="cowon_m3.bin"
1974 appextra="recorder:gui:radio"
1975 plugins="yes"
1976 swcodec="yes"
1977 # toolset is the tools within the tools directory that we build for
1978 # this particular target.
1979 toolset="$iaudiobitmaptools"
1980 # architecture, manufacturer and model for the target-tree build
1981 t_cpu="coldfire"
1982 t_manufacturer="iaudio"
1983 t_model="m3"
1986 40|gigabeatfx)
1987 target_id=20
1988 modelname="gigabeatfx"
1989 target="-DGIGABEAT_F"
1990 memory=32 # always
1991 arm9tdmicc
1992 tool="$rootdir/tools/scramble -add=giga"
1993 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1994 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1995 output="rockbox.gigabeat"
1996 appextra="recorder:gui:radio"
1997 plugins="yes"
1998 swcodec="yes"
1999 toolset=$gigabeatbitmaptools
2000 boottool="$rootdir/tools/scramble -gigabeat"
2001 bootoutput="FWIMG01.DAT"
2002 # architecture, manufacturer and model for the target-tree build
2003 t_cpu="arm"
2004 t_manufacturer="s3c2440"
2005 t_model="gigabeat-fx"
2008 41|gigabeats)
2009 target_id=26
2010 modelname="gigabeats"
2011 target="-DGIGABEAT_S"
2012 memory=64
2013 arm1136jfscc
2014 tool="$rootdir/tools/scramble -add=gigs"
2015 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2016 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2017 output="rockbox.gigabeat"
2018 appextra="recorder:gui:radio"
2019 plugins="yes"
2020 swcodec="yes"
2021 toolset="$gigabeatbitmaptools"
2022 boottool="$rootdir/tools/scramble -gigabeats"
2023 bootoutput="nk.bin"
2024 # architecture, manufacturer and model for the target-tree build
2025 t_cpu="arm"
2026 t_manufacturer="imx31"
2027 t_model="gigabeat-s"
2030 70|mrobe500)
2031 target_id=36
2032 modelname="mrobe500"
2033 target="-DMROBE_500"
2034 memory=64 # always
2035 arm926ejscc
2036 tool="$rootdir/tools/scramble -add=m500"
2037 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2038 bmp2rb_native="$rootdir/tools/bmp2rb -f 8"
2039 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2040 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2041 output="rockbox.mrobe500"
2042 appextra="recorder:gui:radio"
2043 plugins="yes"
2044 swcodec="yes"
2045 toolset=$gigabeatbitmaptools
2046 boottool="cp "
2047 bootoutput="rockbox.mrboot"
2048 # architecture, manufacturer and model for the target-tree build
2049 t_cpu="arm"
2050 t_manufacturer="tms320dm320"
2051 t_model="mrobe-500"
2054 71|mrobe100)
2055 target_id=33
2056 modelname="mrobe100"
2057 target="-DMROBE_100"
2058 memory=32 # always
2059 arm7tdmicc
2060 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2061 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2062 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2063 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
2064 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
2065 output="rockbox.mi4"
2066 appextra="recorder:gui:radio"
2067 plugins="yes"
2068 swcodec="yes"
2069 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2070 bootoutput="pp5020.mi4"
2071 # toolset is the tools within the tools directory that we build for
2072 # this particular target.
2073 toolset=$scramblebitmaptools
2074 # architecture, manufacturer and model for the target-tree build
2075 t_cpu="arm"
2076 t_manufacturer="olympus"
2077 t_model="mrobe-100"
2080 80|logikdax)
2081 target_id=31
2082 modelname="logikdax"
2083 target="-DLOGIK_DAX"
2084 memory=2 # always
2085 arm946cc
2086 tool="$rootdir/tools/scramble -add=ldax"
2087 boottool="$rootdir/tools/scramble -tcc=crc"
2088 bootoutput="player.rom"
2089 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2090 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2091 output="rockbox.logik"
2092 appextra="recorder:gui:radio"
2093 plugins=""
2094 swcodec="yes"
2095 # toolset is the tools within the tools directory that we build for
2096 # this particular target.
2097 toolset=$tccbitmaptools
2098 # architecture, manufacturer and model for the target-tree build
2099 t_cpu="arm"
2100 t_manufacturer="tcc77x"
2101 t_model="logikdax"
2104 90|zenvisionm30gb)
2105 target_id=35
2106 modelname="zenvisionm30gb"
2107 target="-DCREATIVE_ZVM"
2108 memory=64
2109 arm926ejscc
2110 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2111 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2112 tool="$rootdir/tools/scramble -creative=zvm"
2113 USE_ELF="yes"
2114 output="rockbox.zvm"
2115 appextra="recorder:gui:radio"
2116 plugins="yes"
2117 swcodec="yes"
2118 toolset=$ipodbitmaptools
2119 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
2120 bootoutput="rockbox.zvmboot"
2121 # architecture, manufacturer and model for the target-tree build
2122 t_cpu="arm"
2123 t_manufacturer="tms320dm320"
2124 t_model="creative-zvm"
2127 91|zenvisionm60gb)
2128 target_id=40
2129 modelname="zenvisionm60gb"
2130 target="-DCREATIVE_ZVM60GB"
2131 memory=64
2132 arm926ejscc
2133 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2134 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2135 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2136 USE_ELF="yes"
2137 output="rockbox.zvm60"
2138 appextra="recorder:gui:radio"
2139 plugins="yes"
2140 swcodec="yes"
2141 toolset=$ipodbitmaptools
2142 boottool="$rootdir/tools/scramble -creative=zvm60"
2143 bootoutput="rockbox.zvm60boot"
2144 # architecture, manufacturer and model for the target-tree build
2145 t_cpu="arm"
2146 t_manufacturer="tms320dm320"
2147 t_model="creative-zvm"
2150 92|zenvision)
2151 target_id=39
2152 modelname="zenvision"
2153 target="-DCREATIVE_ZV"
2154 memory=64
2155 arm926ejscc
2156 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2157 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2158 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2159 USE_ELF="yes"
2160 output="rockbox.zv"
2161 appextra="recorder:gui:radio"
2162 plugins=""
2163 swcodec="yes"
2164 toolset=$ipodbitmaptools
2165 boottool="$rootdir/tools/scramble -creative=zenvision"
2166 bootoutput="rockbox.zvboot"
2167 # architecture, manufacturer and model for the target-tree build
2168 t_cpu="arm"
2169 t_manufacturer="tms320dm320"
2170 t_model="creative-zvm"
2173 50|sansae200)
2174 target_id=23
2175 modelname="sansae200"
2176 target="-DSANSA_E200"
2177 memory=32 # supposedly
2178 arm7tdmicc
2179 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2180 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2181 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2182 output="rockbox.mi4"
2183 appextra="recorder:gui:radio"
2184 plugins="yes"
2185 swcodec="yes"
2186 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2187 bootoutput="PP5022.mi4"
2188 # toolset is the tools within the tools directory that we build for
2189 # this particular target.
2190 toolset=$scramblebitmaptools
2191 # architecture, manufacturer and model for the target-tree build
2192 t_cpu="arm"
2193 t_manufacturer="sandisk"
2194 t_model="sansa-e200"
2197 51|sansae200r)
2198 # the e200R model is pretty much identical to the e200, it only has a
2199 # different option to the scramble tool when building a bootloader and
2200 # makes the bootloader output file name in all lower case.
2201 target_id=27
2202 modelname="sansae200r"
2203 target="-DSANSA_E200"
2204 memory=32 # supposedly
2205 arm7tdmicc
2206 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2207 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2208 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2209 output="rockbox.mi4"
2210 appextra="recorder:gui:radio"
2211 plugins="yes"
2212 swcodec="yes"
2213 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2214 bootoutput="pp5022.mi4"
2215 # toolset is the tools within the tools directory that we build for
2216 # this particular target.
2217 toolset=$scramblebitmaptools
2218 # architecture, manufacturer and model for the target-tree build
2219 t_cpu="arm"
2220 t_manufacturer="sandisk"
2221 t_model="sansa-e200"
2224 52|sansac200)
2225 target_id=30
2226 modelname="sansac200"
2227 target="-DSANSA_C200"
2228 memory=32 # supposedly
2229 arm7tdmicc
2230 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2231 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2232 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2233 output="rockbox.mi4"
2234 appextra="recorder:gui:radio"
2235 plugins="yes"
2236 swcodec="yes"
2237 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2238 bootoutput="firmware.mi4"
2239 # toolset is the tools within the tools directory that we build for
2240 # this particular target.
2241 toolset=$scramblebitmaptools
2242 # architecture, manufacturer and model for the target-tree build
2243 t_cpu="arm"
2244 t_manufacturer="sandisk"
2245 t_model="sansa-c200"
2248 53|sansam200)
2249 target_id=48
2250 modelname="sansam200"
2251 target="-DSANSA_M200"
2252 memory=1 # always
2253 arm946cc
2254 tool="$rootdir/tools/scramble -add=m200"
2255 boottool="$rootdir/tools/scramble -tcc=crc"
2256 bootoutput="player.rom"
2257 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2258 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
2259 output="rockbox.m200"
2260 appextra="recorder:gui:radio"
2261 plugins=""
2262 swcodec="yes"
2263 # toolset is the tools within the tools directory that we build for
2264 # this particular target.
2265 toolset=$tccbitmaptools
2266 # architecture, manufacturer and model for the target-tree build
2267 t_cpu="arm"
2268 t_manufacturer="tcc77x"
2269 t_model="m200"
2272 54|sansac100)
2273 target_id=42
2274 modelname="sansac100"
2275 target="-DSANSA_C100"
2276 memory=2
2277 arm946cc
2278 tool="$rootdir/tools/scramble -add=c100"
2279 boottool="$rootdir/tools/scramble -tcc=crc"
2280 bootoutput="player.rom"
2281 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2282 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2283 output="rockbox.c100"
2284 appextra="recorder:gui:radio"
2285 plugins=""
2286 swcodec="yes"
2287 # toolset is the tools within the tools directory that we build for
2288 # this particular target.
2289 toolset=$tccbitmaptools
2290 # architecture, manufacturer and model for the target-tree build
2291 t_cpu="arm"
2292 t_manufacturer="tcc77x"
2293 t_model="c100"
2296 55|sansaclip)
2297 target_id=50
2298 modelname="sansaclip"
2299 target="-DSANSA_CLIP"
2300 memory=2
2301 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2302 bmp2rb_native="$bmp2rb_mono"
2303 tool="$rootdir/tools/scramble -add=clip"
2304 output="rockbox.sansa"
2305 bootoutput="bootloader-clip.sansa"
2306 appextra="recorder:gui:radio"
2307 plugins="yes"
2308 swcodec="yes"
2309 toolset=$scramblebitmaptools
2310 t_cpu="arm"
2311 t_manufacturer="as3525"
2312 t_model="sansa-clip"
2313 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2314 arm9tdmicc
2315 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2319 56|sansae200v2)
2320 target_id=51
2321 modelname="sansae200v2"
2322 target="-DSANSA_E200V2"
2323 memory=8
2324 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2325 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2326 tool="$rootdir/tools/scramble -add=e2v2"
2327 output="rockbox.sansa"
2328 bootoutput="bootloader-e200v2.sansa"
2329 appextra="recorder:gui:radio"
2330 plugins="yes"
2331 swcodec="yes"
2332 toolset=$scramblebitmaptools
2333 t_cpu="arm"
2334 t_manufacturer="as3525"
2335 t_model="sansa-e200v2"
2336 arm9tdmicc
2340 57|sansam200v4)
2341 target_id=52
2342 modelname="sansam200v4"
2343 target="-DSANSA_M200V4"
2344 memory=2
2345 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2346 bmp2rb_native="$bmp2rb_mono"
2347 tool="$rootdir/tools/scramble -add=m2v4"
2348 output="rockbox.sansa"
2349 bootoutput="bootloader-m200v4.sansa"
2350 appextra="recorder:gui:radio"
2351 plugins="yes"
2352 swcodec="yes"
2353 toolset=$scramblebitmaptools
2354 t_cpu="arm"
2355 t_manufacturer="as3525"
2356 t_model="sansa-m200v4"
2357 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2358 arm9tdmicc
2359 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2363 58|sansafuze)
2364 target_id=53
2365 modelname="sansafuze"
2366 target="-DSANSA_FUZE"
2367 memory=8
2368 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2369 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2370 tool="$rootdir/tools/scramble -add=fuze"
2371 output="rockbox.sansa"
2372 bootoutput="bootloader-fuze.sansa"
2373 appextra="recorder:gui:radio"
2374 plugins="yes"
2375 swcodec="yes"
2376 toolset=$scramblebitmaptools
2377 t_cpu="arm"
2378 t_manufacturer="as3525"
2379 t_model="sansa-fuze"
2380 arm9tdmicc
2384 59|sansac200v2)
2385 target_id=55
2386 modelname="sansac200v2"
2387 target="-DSANSA_C200V2"
2388 memory=2 # as per OF diagnosis mode
2389 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2390 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2391 tool="$rootdir/tools/scramble -add=c2v2"
2392 output="rockbox.sansa"
2393 bootoutput="bootloader-c200v2.sansa"
2394 appextra="recorder:gui:radio"
2395 plugins="yes"
2396 swcodec="yes"
2397 # toolset is the tools within the tools directory that we build for
2398 # this particular target.
2399 toolset=$scramblebitmaptools
2400 # architecture, manufacturer and model for the target-tree build
2401 t_cpu="arm"
2402 t_manufacturer="as3525"
2403 t_model="sansa-c200v2"
2404 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi
2405 arm9tdmicc
2406 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2409 60|sansaclipv2)
2410 target_id=60
2411 modelname="sansaclipv2"
2412 target="-DSANSA_CLIPV2"
2413 memory=8
2414 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2415 bmp2rb_native="$bmp2rb_mono"
2416 tool="$rootdir/tools/scramble -add=clv2"
2417 output="rockbox.sansa"
2418 bootoutput="bootloader-clipv2.sansa"
2419 appextra="recorder:gui:radio"
2420 plugins="yes"
2421 swcodec="yes"
2422 toolset=$scramblebitmaptools
2423 t_cpu="arm"
2424 t_manufacturer="as3525"
2425 t_model="sansa-clipv2"
2426 arm926ejscc
2429 61|sansaview)
2430 echo "Sansa View is not yet supported!"
2431 exit 1
2432 target_id=63
2433 modelname="sansaview"
2434 target="-DSANSA_VIEW"
2435 memory=32
2436 arm1176jzscc
2437 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2438 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2439 output="rockbox.mi4"
2440 appextra="gui"
2441 plugins=""
2442 swcodec="yes"
2443 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2444 bootoutput="firmware.mi4"
2445 # toolset is the tools within the tools directory that we build for
2446 # this particular target.
2447 toolset=$scramblebitmaptools
2448 t_cpu="arm"
2449 t_manufacturer="sandisk"
2450 t_model="sansa-view"
2453 62|sansaclipplus)
2454 target_id=66
2455 modelname="sansaclipplus"
2456 target="-DSANSA_CLIPPLUS"
2457 memory=8
2458 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2459 bmp2rb_native="$bmp2rb_mono"
2460 tool="$rootdir/tools/scramble -add=cli+"
2461 output="rockbox.sansa"
2462 bootoutput="bootloader-clipplus.sansa"
2463 appextra="recorder:gui:radio"
2464 plugins="yes"
2465 swcodec="yes"
2466 toolset=$scramblebitmaptools
2467 t_cpu="arm"
2468 t_manufacturer="as3525"
2469 t_model="sansa-clipplus"
2470 arm926ejscc
2473 63|sansafuzev2)
2474 target_id=68
2475 modelname="sansafuzev2"
2476 target="-DSANSA_FUZEV2"
2477 memory=8 # not sure
2478 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2479 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2480 tool="$rootdir/tools/scramble -add=fuz2"
2481 output="rockbox.sansa"
2482 bootoutput="bootloader-fuzev2.sansa"
2483 appextra="recorder:gui:radio"
2484 plugins="yes"
2485 swcodec="yes"
2486 toolset=$scramblebitmaptools
2487 t_cpu="arm"
2488 t_manufacturer="as3525"
2489 t_model="sansa-fuzev2"
2490 arm926ejscc
2493 64|sansafuzeplus)
2494 target_id=80
2495 modelname="sansafuzeplus"
2496 target="-DSANSA_FUZEPLUS"
2497 memory=128
2498 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2499 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2500 tool="$rootdir/tools/scramble -add=fuz+"
2501 output="rockbox.sansa"
2502 boottool="true"
2503 bootoutput=""
2504 appextra="gui"
2505 plugins="no"
2506 swcodec="yes"
2507 toolset=$scramblebitmaptools
2508 t_cpu="arm"
2509 t_manufacturer="imx233"
2510 t_model="sansa-fuzeplus"
2511 arm926ejscc
2514 150|tatungtpj1022)
2515 target_id=25
2516 modelname="tatungtpj1022"
2517 target="-DTATUNG_TPJ1022"
2518 memory=32 # always
2519 arm7tdmicc
2520 tool="$rootdir/tools/scramble -add tpj2"
2521 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2522 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2523 output="rockbox.elio"
2524 appextra="recorder:gui:radio"
2525 plugins="yes"
2526 swcodec="yes"
2527 boottool="$rootdir/tools/scramble -mi4v2"
2528 bootoutput="pp5020.mi4"
2529 # toolset is the tools within the tools directory that we build for
2530 # this particular target.
2531 toolset=$scramblebitmaptools
2532 # architecture, manufacturer and model for the target-tree build
2533 t_cpu="arm"
2534 t_manufacturer="tatung"
2535 t_model="tpj1022"
2538 100|gogearsa9200)
2539 target_id=41
2540 modelname="gogearsa9200"
2541 target="-DPHILIPS_SA9200"
2542 memory=32 # supposedly
2543 arm7tdmicc
2544 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2545 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2546 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2547 output="rockbox.mi4"
2548 appextra="recorder:gui:radio"
2549 plugins="yes"
2550 swcodec="yes"
2551 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2552 bootoutput="FWImage.ebn"
2553 # toolset is the tools within the tools directory that we build for
2554 # this particular target.
2555 toolset=$scramblebitmaptools
2556 # architecture, manufacturer and model for the target-tree build
2557 t_cpu="arm"
2558 t_manufacturer="philips"
2559 t_model="sa9200"
2562 101|gogearhdd1630)
2563 target_id=43
2564 modelname="gogearhdd1630"
2565 target="-DPHILIPS_HDD1630"
2566 memory=32 # supposedly
2567 arm7tdmicc
2568 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2569 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2570 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2571 output="rockbox.mi4"
2572 appextra="recorder:gui:radio"
2573 plugins="yes"
2574 swcodec="yes"
2575 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2576 bootoutput="FWImage.ebn"
2577 # toolset is the tools within the tools directory that we build for
2578 # this particular target.
2579 toolset=$scramblebitmaptools
2580 # architecture, manufacturer and model for the target-tree build
2581 t_cpu="arm"
2582 t_manufacturer="philips"
2583 t_model="hdd1630"
2586 102|gogearhdd6330)
2587 target_id=65
2588 modelname="gogearhdd6330"
2589 target="-DPHILIPS_HDD6330"
2590 memory=64 # always
2591 arm7tdmicc
2592 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2593 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2594 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2595 output="rockbox.mi4"
2596 appextra="recorder:gui:radio"
2597 plugins="yes"
2598 swcodec="yes"
2599 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2600 bootoutput="FWImage.ebn"
2601 # toolset is the tools within the tools directory that we build for
2602 # this particular target.
2603 toolset=$scramblebitmaptools
2604 # architecture, manufacturer and model for the target-tree build
2605 t_cpu="arm"
2606 t_manufacturer="philips"
2607 t_model="hdd6330"
2610 110|meizum6sl)
2611 target_id=49
2612 modelname="meizum6sl"
2613 target="-DMEIZU_M6SL"
2614 memory=16 # always
2615 arm940tbecc
2616 tool="cp"
2617 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2618 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2619 output="rockbox.meizu"
2620 appextra="recorder:gui:radio"
2621 plugins="no" #FIXME
2622 swcodec="yes"
2623 toolset=$genericbitmaptools
2624 boottool="cp"
2625 bootoutput="rockboot.ebn"
2626 # architecture, manufacturer and model for the target-tree build
2627 t_cpu="arm"
2628 t_manufacturer="s5l8700"
2629 t_model="meizu-m6sl"
2632 111|meizum6sp)
2633 target_id=46
2634 modelname="meizum6sp"
2635 target="-DMEIZU_M6SP"
2636 memory=16 # always
2637 arm940tbecc
2638 tool="cp"
2639 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2640 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2641 output="rockbox.meizu"
2642 appextra="recorder:gui:radio"
2643 plugins="no" #FIXME
2644 swcodec="yes"
2645 toolset=$genericbitmaptools
2646 boottool="cp"
2647 bootoutput="rockboot.ebn"
2648 # architecture, manufacturer and model for the target-tree build
2649 t_cpu="arm"
2650 t_manufacturer="s5l8700"
2651 t_model="meizu-m6sp"
2654 112|meizum3)
2655 target_id=47
2656 modelname="meizum3"
2657 target="-DMEIZU_M3"
2658 memory=16 # always
2659 arm940tbecc
2660 tool="cp"
2661 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2662 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2663 output="rockbox.meizu"
2664 appextra="recorder:gui:radio"
2665 plugins="no" #FIXME
2666 swcodec="yes"
2667 toolset=$genericbitmaptools
2668 boottool="cp"
2669 bootoutput="rockboot.ebn"
2670 # architecture, manufacturer and model for the target-tree build
2671 t_cpu="arm"
2672 t_manufacturer="s5l8700"
2673 t_model="meizu-m3"
2676 120|ondavx747)
2677 target_id=45
2678 modelname="ondavx747"
2679 target="-DONDA_VX747"
2680 memory=16
2681 mipselcc
2682 tool="$rootdir/tools/scramble -add=x747"
2683 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2684 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2685 output="rockbox.vx747"
2686 appextra="recorder:gui:radio"
2687 plugins="yes"
2688 swcodec="yes"
2689 toolset=$genericbitmaptools
2690 boottool="$rootdir/tools/scramble -ccpmp"
2691 bootoutput="ccpmp.bin"
2692 # architecture, manufacturer and model for the target-tree build
2693 t_cpu="mips"
2694 t_manufacturer="ingenic_jz47xx"
2695 t_model="onda_vx747"
2698 121|ondavx767)
2699 target_id=64
2700 modelname="ondavx767"
2701 target="-DONDA_VX767"
2702 memory=16 #FIXME
2703 mipselcc
2704 tool="cp"
2705 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2706 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2707 output="rockbox.vx767"
2708 appextra="recorder:gui:radio"
2709 plugins="" #FIXME
2710 swcodec="yes"
2711 toolset=$genericbitmaptools
2712 boottool="$rootdir/tools/scramble -ccpmp"
2713 bootoutput="ccpmp.bin"
2714 # architecture, manufacturer and model for the target-tree build
2715 t_cpu="mips"
2716 t_manufacturer="ingenic_jz47xx"
2717 t_model="onda_vx767"
2720 122|ondavx747p)
2721 target_id=54
2722 modelname="ondavx747p"
2723 target="-DONDA_VX747P"
2724 memory=16
2725 mipselcc
2726 tool="$rootdir/tools/scramble -add=747p"
2727 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2728 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2729 output="rockbox.vx747p"
2730 appextra="recorder:gui:radio"
2731 plugins="yes"
2732 swcodec="yes"
2733 toolset=$genericbitmaptools
2734 boottool="$rootdir/tools/scramble -ccpmp"
2735 bootoutput="ccpmp.bin"
2736 # architecture, manufacturer and model for the target-tree build
2737 t_cpu="mips"
2738 t_manufacturer="ingenic_jz47xx"
2739 t_model="onda_vx747"
2742 123|ondavx777)
2743 target_id=61
2744 modelname="ondavx777"
2745 target="-DONDA_VX777"
2746 memory=16
2747 mipselcc
2748 tool="$rootdir/tools/scramble -add=x777"
2749 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2750 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2751 output="rockbox.vx777"
2752 appextra="recorder:gui:radio"
2753 plugins="yes"
2754 swcodec="yes"
2755 toolset=$genericbitmaptools
2756 boottool="$rootdir/tools/scramble -ccpmp"
2757 bootoutput="ccpmp.bin"
2758 # architecture, manufacturer and model for the target-tree build
2759 t_cpu="mips"
2760 t_manufacturer="ingenic_jz47xx"
2761 t_model="onda_vx747"
2764 130|lyreproto1)
2765 target_id=56
2766 modelname="lyreproto1"
2767 target="-DLYRE_PROTO1"
2768 memory=64
2769 arm926ejscc
2770 tool="cp"
2771 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2772 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2773 output="rockbox.lyre"
2774 appextra="recorder:gui:radio"
2775 plugins=""
2776 swcodec="yes"
2777 toolset=$scramblebitmaptools
2778 boottool="cp"
2779 bootoutput="bootloader-proto1.lyre"
2780 # architecture, manufacturer and model for the target-tree build
2781 t_cpu="arm"
2782 t_manufacturer="at91sam"
2783 t_model="lyre_proto1"
2786 131|mini2440)
2787 target_id=99
2788 modelname="mini2440"
2789 target="-DMINI2440"
2790 memory=64
2791 arm9tdmicc
2792 tool="$rootdir/tools/scramble -add=m244"
2793 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2794 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2795 output="rockbox.mini2440"
2796 appextra="recorder:gui:radio"
2797 plugins=""
2798 swcodec="yes"
2799 toolset=$scramblebitmaptools
2800 boottool="cp"
2801 bootoutput="bootloader-mini2440.lyre"
2802 # architecture, manufacturer and model for the target-tree build
2803 t_cpu="arm"
2804 t_manufacturer="s3c2440"
2805 t_model="mini2440"
2808 140|samsungyh820)
2809 target_id=57
2810 modelname="samsungyh820"
2811 target="-DSAMSUNG_YH820"
2812 memory=32 # always
2813 arm7tdmicc
2814 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2815 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2816 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2817 output="rockbox.mi4"
2818 appextra="recorder:gui:radio"
2819 plugins="yes"
2820 swcodec="yes"
2821 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2822 bootoutput="FW_YH820.mi4"
2823 # toolset is the tools within the tools directory that we build for
2824 # this particular target.
2825 toolset=$scramblebitmaptools
2826 # architecture, manufacturer and model for the target-tree build
2827 t_cpu="arm"
2828 t_manufacturer="samsung"
2829 t_model="yh820"
2832 141|samsungyh920)
2833 target_id=58
2834 modelname="samsungyh920"
2835 target="-DSAMSUNG_YH920"
2836 memory=32 # always
2837 arm7tdmicc
2838 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2839 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2840 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2841 output="rockbox.mi4"
2842 appextra="recorder:gui:radio"
2843 plugins="yes"
2844 swcodec="yes"
2845 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2846 bootoutput="PP5020.mi4"
2847 # toolset is the tools within the tools directory that we build for
2848 # this particular target.
2849 toolset=$scramblebitmaptools
2850 # architecture, manufacturer and model for the target-tree build
2851 t_cpu="arm"
2852 t_manufacturer="samsung"
2853 t_model="yh920"
2856 142|samsungyh925)
2857 target_id=59
2858 modelname="samsungyh925"
2859 target="-DSAMSUNG_YH925"
2860 memory=32 # always
2861 arm7tdmicc
2862 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2863 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2864 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2865 output="rockbox.mi4"
2866 appextra="recorder:gui:radio"
2867 plugins="yes"
2868 swcodec="yes"
2869 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2870 bootoutput="FW_YH925.mi4"
2871 # toolset is the tools within the tools directory that we build for
2872 # this particular target.
2873 toolset=$scramblebitmaptools
2874 # architecture, manufacturer and model for the target-tree build
2875 t_cpu="arm"
2876 t_manufacturer="samsung"
2877 t_model="yh925"
2880 143|samsungyps3)
2881 target_id=72
2882 modelname="samsungyps3"
2883 target="-DSAMSUNG_YPS3"
2884 memory=16 # always
2885 arm940tbecc
2886 tool="cp"
2887 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2888 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2889 output="rockbox.yps3"
2890 appextra="recorder:gui:radio"
2891 plugins="no" #FIXME
2892 swcodec="yes"
2893 toolset=$genericbitmaptools
2894 boottool="cp"
2895 bootoutput="rockboot.ebn"
2896 # architecture, manufacturer and model for the target-tree build
2897 t_cpu="arm"
2898 t_manufacturer="s5l8700"
2899 t_model="yps3"
2902 160|vibe500)
2903 target_id=67
2904 modelname="vibe500"
2905 target="-DPBELL_VIBE500"
2906 memory=32 # always
2907 arm7tdmicc
2908 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2909 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2910 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2911 output="rockbox.mi4"
2912 appextra="recorder:gui:radio"
2913 plugins="yes"
2914 swcodec="yes"
2915 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2916 bootoutput="jukebox.mi4"
2917 # toolset is the tools within the tools directory that we build for
2918 # this particular target.
2919 toolset=$scramblebitmaptools
2920 # architecture, manufacturer and model for the target-tree build
2921 t_cpu="arm"
2922 t_manufacturer="pbell"
2923 t_model="vibe500"
2926 170|mpiohd200)
2927 target_id=69
2928 modelname="mpiohd200"
2929 target="-DMPIO_HD200"
2930 memory=16 # always
2931 coldfirecc
2932 tool="$rootdir/tools/scramble -add=hd20"
2933 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2934 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2935 output="rockbox.mpio"
2936 bootoutput="bootloader.mpio"
2937 appextra="recorder:gui:radio"
2938 plugins="yes"
2939 swcodec="yes"
2940 # toolset is the tools within the tools directory that we build for
2941 # this particular target.
2942 toolset="$genericbitmaptools"
2943 # architecture, manufacturer and model for the target-tree build
2944 t_cpu="coldfire"
2945 t_manufacturer="mpio"
2946 t_model="hd200"
2949 171|mpiohd300)
2950 target_id=70
2951 modelname="mpiohd300"
2952 target="-DMPIO_HD300"
2953 memory=16 # always
2954 coldfirecc
2955 tool="$rootdir/tools/scramble -add=hd30"
2956 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2957 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
2958 output="rockbox.mpio"
2959 bootoutput="bootloader.mpio"
2960 appextra="recorder:gui:radio"
2961 plugins="yes"
2962 swcodec="yes"
2963 # toolset is the tools within the tools directory that we build for
2964 # this particular target.
2965 toolset="$genericbitmaptools"
2966 # architecture, manufacturer and model for the target-tree build
2967 t_cpu="coldfire"
2968 t_manufacturer="mpio"
2969 t_model="hd300"
2972 200|sdlapp)
2973 application="yes"
2974 target_id=73
2975 modelname="sdlapp"
2976 target="-DSDLAPP"
2977 app_set_paths
2978 app_set_lcd_size
2979 memory=8
2980 uname=`uname`
2981 simcc "sdl-app"
2982 tool="cp "
2983 boottool="cp "
2984 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2985 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2986 output="rockbox"
2987 bootoutput="rockbox"
2988 appextra="recorder:gui:radio"
2989 plugins="yes"
2990 swcodec="yes"
2991 # architecture, manufacturer and model for the target-tree build
2992 t_cpu="hosted"
2993 t_manufacturer="sdl"
2994 t_model="app"
2997 201|android)
2998 application="yes"
2999 target_id=74
3000 modelname="android"
3001 target="-DANDROID"
3002 app_type="android"
3003 app_set_lcd_size
3004 sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
3005 bindir="/data/data/org.rockbox/lib"
3006 libdir="/data/data/org.rockbox/app_rockbox"
3007 memory=8
3008 uname=`uname`
3009 androidcc
3010 tool="cp "
3011 boottool="cp "
3012 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3013 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3014 output="librockbox.so"
3015 bootoutput="librockbox.so"
3016 appextra="recorder:gui:radio:hosted/android"
3017 plugins="yes"
3018 swcodec="yes"
3019 # architecture, manufacturer and model for the target-tree build
3020 t_cpu="hosted"
3021 t_manufacturer="android"
3022 t_model="app"
3025 202|nokian8xx)
3026 application="yes"
3027 target_id=75
3028 modelname="nokian8xx"
3029 app_type="sdl-app"
3030 target="-DNOKIAN8XX"
3031 sharedir="/opt/rockbox/share/rockbox"
3032 bindir="/opt/rockbox/bin"
3033 libdir="/opt/rockbox/lib"
3034 memory=8
3035 uname=`uname`
3036 maemocc 4
3037 tool="cp "
3038 boottool="cp "
3039 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3040 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3041 output="rockbox"
3042 bootoutput="rockbox"
3043 appextra="recorder:gui:radio"
3044 plugins="yes"
3045 swcodec="yes"
3046 # architecture, manufacturer and model for the target-tree build
3047 t_cpu="hosted"
3048 t_manufacturer="maemo"
3049 t_model="app"
3052 203|nokian900)
3053 application="yes"
3054 target_id=76
3055 modelname="nokian900"
3056 app_type="sdl-app"
3057 target="-DNOKIAN900"
3058 sharedir="/opt/rockbox/share/rockbox"
3059 bindir="/opt/rockbox/bin"
3060 libdir="/opt/rockbox/lib"
3061 memory=8
3062 uname=`uname`
3063 maemocc 5
3064 tool="cp "
3065 boottool="cp "
3066 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3067 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3068 output="rockbox"
3069 bootoutput="rockbox"
3070 appextra="recorder:gui:radio"
3071 plugins="yes"
3072 swcodec="yes"
3073 # architecture, manufacturer and model for the target-tree build
3074 t_cpu="hosted"
3075 t_manufacturer="maemo"
3076 t_model="app"
3079 204|pandora)
3080 application="yes"
3081 target_id=77
3082 modelname="pandora"
3083 app_type="sdl-app"
3084 target="-DPANDORA"
3085 sharedir="rockbox/share"
3086 bindir="rockbox/bin"
3087 libdir="rockbox/lib"
3088 memory=8
3089 uname=`uname`
3090 pandoracc
3091 tool="cp "
3092 boottool="cp "
3093 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3094 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3095 output="rockbox"
3096 bootoutput="rockbox"
3097 appextra="recorder:gui:radio"
3098 plugins="yes"
3099 swcodec="yes"
3100 # architecture, manufacturer and model for the target-tree build
3101 t_cpu="hosted"
3102 t_manufacturer="pandora"
3103 t_model="app"
3107 echo "Please select a supported target platform!"
3108 exit 7
3111 esac
3113 echo "Platform set to $modelname"
3116 #remove start
3117 ############################################################################
3118 # Amount of memory, for those that can differ. They have $memory unset at
3119 # this point.
3122 if [ -z "$memory" ]; then
3123 case $target_id in
3125 if [ "$ARG_RAM" ]; then
3126 size=$ARG_RAM
3127 else
3128 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3129 size=`input`;
3131 case $size in
3132 60|64)
3133 memory="64"
3136 memory="32"
3138 esac
3141 if [ "$ARG_RAM" ]; then
3142 size=$ARG_RAM
3143 else
3144 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3145 size=`input`;
3147 case $size in
3149 memory="8"
3152 memory="2"
3154 esac
3156 esac
3157 echo "Memory size selected: $memory MB"
3158 [ "$ARG_TYPE" ] || echo ""
3160 #remove end
3162 ##################################################################
3163 # Figure out build "type"
3166 # the ifp7x0 is the only platform that supports building a gdb stub like
3167 # this
3168 case $modelname in
3169 iriverifp7xx)
3170 gdbstub="(G)DB stub, "
3172 sansae200r|sansae200)
3173 gdbstub="(I)nstaller, "
3175 sansac200)
3176 gdbstub="(E)raser, "
3180 esac
3181 if [ "$ARG_TYPE" ]; then
3182 btype=$ARG_TYPE
3183 else
3184 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
3185 btype=`input`;
3188 case $btype in
3189 [Ii])
3190 appsdir='\$(ROOTDIR)/bootloader'
3191 apps="bootloader"
3192 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3193 bootloader="1"
3194 echo "e200R-installer build selected"
3196 [Ee])
3197 appsdir='\$(ROOTDIR)/bootloader'
3198 apps="bootloader"
3199 echo "C2(4)0 or C2(5)0"
3200 variant=`input`
3201 case $variant in
3203 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
3204 echo "c240 eraser build selected"
3207 extradefines="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
3208 echo "c240 eraser build selected"
3210 esac
3211 bootloader="1"
3212 echo "c200 eraser build selected"
3214 [Bb])
3215 if test $t_manufacturer = "archos"; then
3216 # Archos SH-based players do this somewhat differently for
3217 # some reason
3218 appsdir='\$(ROOTDIR)/flash/bootbox'
3219 apps="bootbox"
3220 else
3221 appsdir='\$(ROOTDIR)/bootloader'
3222 apps="bootloader"
3223 flash=""
3224 if test -n "$boottool"; then
3225 tool="$boottool"
3227 if test -n "$bootoutput"; then
3228 output=$bootoutput
3231 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3232 bootloader="1"
3233 echo "Bootloader build selected"
3235 [Ss])
3236 if [ "$modelname" = "sansae200r" ]; then
3237 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3238 exit 8
3240 debug="-DDEBUG"
3241 simulator="yes"
3242 extradefines="$extradefines -DSIMULATOR"
3243 archosrom=""
3244 flash=""
3245 echo "Simulator build selected"
3247 [Aa]*)
3248 echo "Advanced build selected"
3249 whichadvanced $btype
3251 [Gg])
3252 extradefines="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3253 appsdir='\$(ROOTDIR)/gdb'
3254 apps="stub"
3255 case $modelname in
3256 iriverifp7xx)
3257 output="stub.wma"
3261 esac
3262 echo "GDB stub build selected"
3264 [Mm])
3265 toolset='';
3266 apps="manual"
3267 echo "Manual build selected"
3269 [Cc])
3270 uname=`uname`
3271 simcc "checkwps"
3272 toolset='';
3273 t_cpu='';
3274 GCCOPTS='';
3275 extradefines="$extradefines -DDEBUG"
3276 appsdir='\$(ROOTDIR)/tools/checkwps';
3277 output='checkwps.'${modelname};
3278 archosrom='';
3279 echo "CheckWPS build selected"
3281 [Dd])
3282 uname=`uname`
3283 simcc "database"
3284 toolset='';
3285 t_cpu='';
3286 GCCOPTS='';
3287 appsdir='\$(ROOTDIR)/tools/database';
3288 archosrom='';
3290 case $uname in
3291 CYGWIN*|MINGW*)
3292 output="database_${modelname}.exe"
3295 output='database.'${modelname};
3297 esac
3299 echo "Database tool build selected"
3302 if [ "$modelname" = "sansae200r" ]; then
3303 echo "Do not use the e200R target for regular builds. Use e200 instead."
3304 exit 8
3306 debug=""
3307 btype="N" # set it explicitly since RET only gets here as well
3308 echo "Normal build selected"
3311 esac
3312 # to be able running "make manual" from non-manual configuration
3313 case $modelname in
3314 archosrecorderv2)
3315 manualdev="archosfmrecorder"
3317 iriverh1??)
3318 manualdev="iriverh100"
3320 ipodmini2g)
3321 manualdev="ipodmini1g"
3324 manualdev=$modelname
3326 esac
3328 if [ -z "$debug" ]; then
3329 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
3332 if [ "yes" = "$application" ]; then
3333 echo Building Rockbox as an Application
3334 extradefines="$extradefines -DAPPLICATION"
3337 echo "Using source code root directory: $rootdir"
3339 # this was once possible to change at build-time, but no more:
3340 language="english"
3342 uname=`uname`
3344 if [ "yes" = "$simulator" ]; then
3345 # setup compiler and things for simulator
3346 simcc "sdl-sim"
3348 if [ -d "simdisk" ]; then
3349 echo "Subdirectory 'simdisk' already present"
3350 else
3351 mkdir simdisk
3352 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3356 # Now, figure out version number of the (gcc) compiler we are about to use
3357 gccver=`$CC -dumpversion`;
3359 # figure out the binutil version too and display it, mostly for the build
3360 # system etc to be able to see it easier
3361 if [ $uname = "Darwin" ]; then
3362 ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3363 else
3364 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3367 if [ -z "$gccver" ]; then
3368 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3369 echo "[WARNING] this may cause your build to fail since we cannot do the"
3370 echo "[WARNING] checks we want now."
3371 else
3373 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3374 # DEPEND on it
3376 num1=`echo $gccver | cut -d . -f1`
3377 num2=`echo $gccver | cut -d . -f2`
3378 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3380 # This makes:
3381 # 3.3.X => 303
3382 # 3.4.X => 304
3383 # 2.95.3 => 295
3385 echo "Using $CC $gccver ($gccnum)"
3387 if test "$gccnum" -ge "400"; then
3388 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3389 # so we ignore that warnings for now
3390 # -Wno-pointer-sign
3391 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
3394 if test "$gccnum" -ge "402"; then
3395 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3396 # and later would throw it for several valid cases
3397 GCCOPTS="$GCCOPTS -Wno-override-init"
3400 case $prefix in
3401 ""|"$CROSS_COMPILE")
3402 # simulator
3404 i586-mingw32msvc-)
3405 # cross-compile for win32
3408 # Verify that the cross-compiler is of a recommended version!
3409 if test "$gccver" != "$gccchoice"; then
3410 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3411 echo "WARNING: version $gccchoice!"
3412 echo "WARNING: This may cause your build to fail since it may be a version"
3413 echo "WARNING: that isn't functional or known to not be the best choice."
3414 echo "WARNING: If you suffer from build problems, you know that this is"
3415 echo "WARNING: a likely source for them..."
3418 esac
3423 echo "Using $LD $ldver"
3425 # check the compiler for SH platforms
3426 if test "$CC" = "sh-elf-gcc"; then
3427 if test "$gccnum" -lt "400"; then
3428 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3429 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3430 else
3431 # figure out patch status
3432 gccpatch=`$CC --version`;
3434 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
3435 echo "gcc $gccver is rockbox patched"
3436 # then convert -O to -Os to get smaller binaries!
3437 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3438 else
3439 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3440 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3445 if test "$CC" = "m68k-elf-gcc"; then
3446 # convert -O to -Os to get smaller binaries!
3447 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3450 if [ "$ARG_CCACHE" = "1" ]; then
3451 echo "Enable ccache for building"
3452 ccache="ccache"
3453 elif [ "$ARG_CCACHE" != "0" ]; then
3454 ccache=`findtool ccache`
3455 if test -n "$ccache"; then
3456 echo "Found and uses ccache ($ccache)"
3460 # figure out the full path to the various commands if possible
3461 HOSTCC=`findtool gcc --lit`
3462 HOSTAR=`findtool ar --lit`
3463 CC=`findtool ${CC} --lit`
3464 LD=`findtool ${AR} --lit`
3465 AR=`findtool ${AR} --lit`
3466 AS=`findtool ${AS} --lit`
3467 OC=`findtool ${OC} --lit`
3468 WINDRES=`findtool ${WINDRES} --lit`
3469 DLLTOOL=`findtool ${DLLTOOL} --lit`
3470 DLLWRAP=`findtool ${DLLWRAP} --lit`
3471 RANLIB=`findtool ${RANLIB} --lit`
3473 if test -n "$ccache"; then
3474 CC="$ccache $CC"
3477 if test "$ARG_ARM_THUMB" = "1"; then
3478 extradefines="$extradefines -DUSE_THUMB"
3479 CC="$toolsdir/thumb-cc.py $CC"
3482 if test "X$endian" = "Xbig"; then
3483 defendian="ROCKBOX_BIG_ENDIAN"
3484 else
3485 defendian="ROCKBOX_LITTLE_ENDIAN"
3488 if [ "$ARG_RBDIR" != "" ]; then
3489 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3490 rbdir="/"$ARG_RBDIR
3491 else
3492 rbdir=$ARG_RBDIR
3494 echo "Using alternate rockbox dir: ${rbdir}"
3497 sed > autoconf.h \
3498 -e "s<@ENDIAN@<${defendian}<g" \
3499 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3500 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3501 -e "s<@config_rtc@<$config_rtc<g" \
3502 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3503 -e "s<@thread_support@<$thread_support<g" \
3504 -e "s<@RBDIR@<${rbdir}<g" \
3505 -e "s<@sharepath@<${sharedir}<g" \
3506 -e "s<@binpath@<${bindir}<g" \
3507 -e "s<@libpath@<${libdir}<g" \
3508 -e "s<@have_backlight@<$have_backlight<g" \
3509 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3510 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3511 -e "s<@lcd_width@<$app_lcd_width<g" \
3512 -e "s<@lcd_height@<$app_lcd_height<g" \
3513 <<EOF
3514 /* This header was made by configure */
3515 #ifndef __BUILD_AUTOCONF_H
3516 #define __BUILD_AUTOCONF_H
3518 /* Define endianess for the target or simulator platform */
3519 #define @ENDIAN@ 1
3521 /* Define this if you build rockbox to support the logf logging and display */
3522 #undef ROCKBOX_HAS_LOGF
3524 /* Define this to record a chart with timings for the stages of boot */
3525 #undef DO_BOOTCHART
3527 /* optional define for a backlight modded Ondio */
3528 @have_backlight@
3530 /* optional define for FM radio mod for iAudio M5 */
3531 @have_fmradio_in@
3533 /* optional define for ATA poweroff on Player */
3534 @have_ata_poweroff@
3536 /* optional defines for RTC mod for h1x0 */
3537 @config_rtc@
3538 @have_rtc_alarm@
3540 /* the threading backend we use */
3541 #define @thread_support@
3543 /* lcd dimensions for application builds from configure */
3544 @lcd_width@
3545 @lcd_height@
3547 /* root of Rockbox */
3548 #define ROCKBOX_DIR "@RBDIR@"
3549 #define ROCKBOX_SHARE_PATH "@sharepath@"
3550 #define ROCKBOX_BINARY_PATH "@binpath@"
3551 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3553 #endif /* __BUILD_AUTOCONF_H */
3556 if test -n "$t_cpu"; then
3557 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3559 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3560 # Maemo needs the SDL port, too
3561 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3562 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3563 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3564 # Pandora needs the SDL port, too
3565 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3566 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3567 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3568 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3569 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3572 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3573 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3574 GCCOPTS="$GCCOPTS"
3577 if test "$simulator" = "yes"; then
3578 # add simul make stuff on the #SIMUL# line
3579 simmagic1="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3580 simmagic2="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3581 else
3582 # delete the lines that match
3583 simmagic1='/@SIMUL1@/D'
3584 simmagic2='/@SIMUL2@/D'
3587 if test "$swcodec" = "yes"; then
3588 voicetoolset="rbspeexenc voicefont wavtrim"
3589 else
3590 voicetoolset="voicefont wavtrim"
3593 if test "$apps" = "apps"; then
3594 # only when we build "real" apps we build the .lng files
3595 buildlangs="langs"
3598 #### Fix the cmdline ###
3599 if [ "$ARG_CCACHE" = "1" ]; then
3600 cmdline="--ccache "
3601 elif [ "$ARG_CCACHE" = "0" ]; then
3602 cmdline="--no-ccache "
3604 if [ "$ARG_ARM_EABI" = "1" ]; then
3605 cmdline="$cmdline--eabi "
3607 if [ -n "$ARG_PREFIX" ]; then
3608 cmdline="$cmdline--prefix=\$(PREFIX) "
3610 if [ -n "$ARG_LCDWIDTH" ]; then
3611 cmdline="$cmdline--lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3614 cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3616 ### end of cmdline
3618 sed > Makefile \
3619 -e "s<@ROOTDIR@<${rootdir}<g" \
3620 -e "s<@DEBUG@<${debug}<g" \
3621 -e "s<@MEMORY@<${memory}<g" \
3622 -e "s<@TARGET_ID@<${target_id}<g" \
3623 -e "s<@TARGET@<${target}<g" \
3624 -e "s<@CPU@<${t_cpu}<g" \
3625 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3626 -e "s<@MODELNAME@<${modelname}<g" \
3627 -e "s<@LANGUAGE@<${language}<g" \
3628 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3629 -e "s<@PWD@<${pwd}<g" \
3630 -e "s<@HOSTCC@<${HOSTCC}<g" \
3631 -e "s<@HOSTAR@<${HOSTAR}<g" \
3632 -e "s<@CC@<${CC}<g" \
3633 -e "s<@LD@<${LD}<g" \
3634 -e "s<@AR@<${AR}<g" \
3635 -e "s<@AS@<${AS}<g" \
3636 -e "s<@OC@<${OC}<g" \
3637 -e "s<@WINDRES@<${WINDRES}<g" \
3638 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3639 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3640 -e "s<@RANLIB@<${RANLIB}<g" \
3641 -e "s<@TOOL@<${tool}<g" \
3642 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3643 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3644 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3645 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3646 -e "s<@OUTPUT@<${output}<g" \
3647 -e "s<@APPEXTRA@<${appextra}<g" \
3648 -e "s<@ARCHOSROM@<${archosrom}<g" \
3649 -e "s<@FLASHFILE@<${flash}<g" \
3650 -e "s<@PLUGINS@<${plugins}<g" \
3651 -e "s<@CODECS@<${swcodec}<g" \
3652 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3653 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3654 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3655 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3656 -e "s<@LDOPTS@<${LDOPTS}<g" \
3657 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3658 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3659 -e "s<@EXTRADEF@<${extradefines}<g" \
3660 -e "s<@APPSDIR@<${appsdir}<g" \
3661 -e "s<@FIRMDIR@<${firmdir}<g" \
3662 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3663 -e "s<@APPS@<${apps}<g" \
3664 -e "s<@APP_TYPE@<${app_type}<g" \
3665 -e "s<@APPLICATION@<${application}<g" \
3666 -e "s<@GCCVER@<${gccver}<g" \
3667 -e "s<@GCCNUM@<${gccnum}<g" \
3668 -e "s<@UNAME@<${uname}<g" \
3669 -e "s<@ENDIAN@<${defendian}<g" \
3670 -e "s<@TOOLSET@<${toolset}<g" \
3671 -e "${simmagic1}" \
3672 -e "${simmagic2}" \
3673 -e "s<@MANUALDEV@<${manualdev}<g" \
3674 -e "s<@ENCODER@<${ENC_CMD}<g" \
3675 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3676 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3677 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3678 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3679 -e "s<@LANGS@<${buildlangs}<g" \
3680 -e "s<@USE_ELF@<${USE_ELF}<g" \
3681 -e "s<@RBDIR@<${rbdir}<g" \
3682 -e "s<@sharepath@<${sharedir}<g" \
3683 -e "s<@binpath@<${bindir}<g" \
3684 -e "s<@libpath@<${libdir}<g" \
3685 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3686 -e "s<@CMDLINE@<$cmdline<g" \
3687 -e "s<@SDLCONFIG@<$sdl<g" \
3688 <<EOF
3689 ## Automatically generated. http://www.rockbox.org/
3691 export ROOTDIR=@ROOTDIR@
3692 export FIRMDIR=@FIRMDIR@
3693 export APPSDIR=@APPSDIR@
3694 export TOOLSDIR=@TOOLSDIR@
3695 export DOCSDIR=\$(ROOTDIR)/docs
3696 export MANUALDIR=\${ROOTDIR}/manual
3697 export DEBUG=@DEBUG@
3698 export MODELNAME=@MODELNAME@
3699 export ARCHOSROM=@ARCHOSROM@
3700 export FLASHFILE=@FLASHFILE@
3701 export TARGET_ID=@TARGET_ID@
3702 export TARGET=@TARGET@
3703 export CPU=@CPU@
3704 export MANUFACTURER=@MANUFACTURER@
3705 export OBJDIR=@PWD@
3706 export BUILDDIR=@PWD@
3707 export LANGUAGE=@LANGUAGE@
3708 export VOICELANGUAGE=@VOICELANGUAGE@
3709 export MEMORYSIZE=@MEMORY@
3710 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3711 export MKFIRMWARE=@TOOL@
3712 export BMP2RB_MONO=@BMP2RB_MONO@
3713 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3714 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3715 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3716 export BINARY=@OUTPUT@
3717 export APPEXTRA=@APPEXTRA@
3718 export ENABLEDPLUGINS=@PLUGINS@
3719 export SOFTWARECODECS=@CODECS@
3720 export EXTRA_DEFINES=@EXTRADEF@
3721 export HOSTCC=@HOSTCC@
3722 export HOSTAR=@HOSTAR@
3723 export CC=@CC@
3724 export LD=@LD@
3725 export AR=@AR@
3726 export AS=@AS@
3727 export OC=@OC@
3728 export WINDRES=@WINDRES@
3729 export DLLTOOL=@DLLTOOL@
3730 export DLLWRAP=@DLLWRAP@
3731 export RANLIB=@RANLIB@
3732 export PREFIX=@PREFIX@
3733 export PROFILE_OPTS=@PROFILE_OPTS@
3734 export APP_TYPE=@APP_TYPE@
3735 export APPLICATION=@APPLICATION@
3736 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3737 export GCCOPTS=@GCCOPTS@
3738 export TARGET_INC=@TARGET_INC@
3739 export LOADADDRESS=@LOADADDRESS@
3740 export SHARED_FLAG=@SHARED_FLAG@
3741 export LDOPTS=@LDOPTS@
3742 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3743 export GCCVER=@GCCVER@
3744 export GCCNUM=@GCCNUM@
3745 export UNAME=@UNAME@
3746 export MANUALDEV=@MANUALDEV@
3747 export TTS_OPTS=@TTS_OPTS@
3748 export TTS_ENGINE=@TTS_ENGINE@
3749 export ENC_OPTS=@ENC_OPTS@
3750 export ENCODER=@ENCODER@
3751 export USE_ELF=@USE_ELF@
3752 export RBDIR=@RBDIR@
3753 export ROCKBOX_SHARE_PATH=@sharepath@
3754 export ROCKBOX_BINARY_PATH=@binpath@
3755 export ROCKBOX_LIBRARY_PATH=@libpath@
3756 export SDLCONFIG=@SDLCONFIG@
3758 CONFIGURE_OPTIONS=@CMDLINE@
3760 include \$(TOOLSDIR)/root.make
3764 echo "Created Makefile"