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