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