3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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
18 use_logf
="#undef ROCKBOX_HAS_LOGF"
19 use_bootchart
="#undef DO_BOOTCHART"
21 scriptver
=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
28 thread_support
="ASSEMBLER_THREADS"
34 # Begin Function Definitions
44 WINDRES
=${prefix}windres
45 DLLTOOL
=${prefix}dlltool
46 DLLWRAP
=${prefix}dllwrap
47 RANLIB
=${prefix}ranlib
55 # setup files and paths depending on the platform
56 if [ -z "$ARG_PREFIX" ]; then
57 sharedir
="/usr/local/share/rockbox"
58 bindir
="/usr/local/bin"
59 libdir
="/usr/local/lib"
61 if [ -d "$ARG_PREFIX" ]; then
62 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
63 ARG_PREFIX
=`realpath $ARG_PREFIX`
64 if [ "0" != "$?" ]; then
65 echo "ERROR: Could not get prefix path (is realpath installed?)."
69 sharedir
="$ARG_PREFIX/share/rockbox"
70 bindir
="$ARG_PREFIX/bin"
71 libdir
="$ARG_PREFIX/lib"
73 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
79 # Set the application LCD size according to the following priorities:
80 # 1) If --lcdwidth and --lcdheight are set, use them
81 # 2) If a size is passed to the app_set_lcd_size() function, use that
82 # 3) Otherwise ask the user
84 if [ -z "$ARG_LCDWIDTH" ]; then
87 if [ -z "$ARG_LCDHEIGHT" ]; then
91 echo "Enter the LCD width (default: 320)"
92 if [ -z "$ARG_LCDWIDTH" ]; then
95 app_lcd_width
="$ARG_LCDWIDTH"
97 if [ -z "$app_lcd_width" ]; then app_lcd_width
="320"; fi
98 echo "Enter the LCD height (default: 480)"
99 if [ -z "$ARG_LCDHEIGHT" ]; then
100 app_lcd_height
=`input`
102 app_lcd_height
="$ARG_LCDHEIGHT"
104 if [ -z "$app_lcd_height" ]; then app_lcd_height
="480"; fi
105 if [ $app_lcd_width -gt $app_lcd_height ]; then
106 lcd_orientation
="landscape"
108 lcd_orientation
="portrait"
110 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
111 ARG_LCDWIDTH
=$app_lcd_width
112 ARG_LCDHEIGHT
=$app_lcd_height
114 app_lcd_width
="#define LCD_WIDTH $app_lcd_width"
115 app_lcd_height
="#define LCD_HEIGHT $app_lcd_height"
119 if [ "$ARG_ARM_EABI" != "0" ]; then
120 prefixtools arm-elf-eabi-
128 # scan the $PATH for the given command
135 # echo "checks for $file in $path" >&2
136 if test -f "$path/$file"; then
141 # check whether caller wants literal return value if not found
142 if [ "$2" = "--lit" ]; then
147 # scan the $PATH for sdl-config - check whether for a (cross-)win32
156 #echo "checks for $file in $path" >&2
157 if test -f "$path/$file"; then
158 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
159 if [ "yes" = "${winbuild}" ]; then
164 if [ "yes" != "${winbuild}" ]; then
173 # check for availability of sigaltstack to support our thread engine
174 check_sigaltstack
() {
175 cat >$tmpdir/check_threads.c
<<EOF
177 int main(int argc, char **argv)
180 #define NULL (void*)0
182 sigaltstack(NULL, NULL);
186 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
1> /dev
/null
188 rm -rf $tmpdir/check_threads
*
192 # check for availability of Fiber on Win32 to support our thread engine
194 cat >$tmpdir/check_threads.c
<<EOF
196 int main(int argc, char **argv)
198 ConvertThreadToFiber(NULL);
202 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
2>/dev
/null
204 rm -rf $tmpdir/check_threads
*
210 # default tool setup for native building
211 prefixtools
"$CROSS_COMPILE"
212 ARG_ARM_THUMB
=0 # can't use thumb in native builds
216 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef// -e s/-O//`
217 GCCOPTS
="$GCCOPTS -fno-builtin -g"
219 LDOPTS
='-lm' # button-sdl.c uses sqrt()
223 # default output binary name, don't override app_get_platform()
224 if [ "$app_type" != "sdl-app" ]; then
228 # default share option, override below if needed
229 SHARED_LDFLAG
="-shared"
230 SHARED_CFLAGS
="-fPIC -fvisibility=hidden"
232 if [ "$win32crosscompile" = "yes" ]; then
233 LDOPTS
="$LDOPTS -mconsole"
240 echo "Cygwin host detected"
243 LDOPTS
="$LDOPTS -mconsole"
250 echo "MinGW host detected"
253 LDOPTS
="$LDOPTS -mconsole"
259 sigaltstack
=`check_sigaltstack`
260 echo "Linux host detected"
261 LDOPTS
="$LDOPTS -ldl"
265 sigaltstack
=`check_sigaltstack`
266 echo "FreeBSD host detected"
267 LDOPTS
="$LDOPTS -ldl"
271 sigaltstack
=`check_sigaltstack`
272 echo "Darwin host detected"
273 LDOPTS
="$LDOPTS -ldl"
274 SHARED_LDFLAG
="-dynamiclib -Wl\,-single_module"
278 sigaltstack
=`check_sigaltstack`
279 echo "*Solaris host detected"
281 GCCOPTS
="$GCCOPTS -fPIC"
282 LDOPTS
="$LDOPTS -ldl"
286 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
292 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
293 sdl
=`findsdl $winbuild`
295 if [ -n `echo $app_type | grep "sdl"` ]; then
296 if [ -z "$sdl" ]; then
297 echo "configure didn't find sdl-config, which indicates that you"
298 echo "don't have SDL (properly) installed. Please correct and"
299 echo "re-run configure!"
302 # generic sdl-config checker
303 GCCOPTS
="$GCCOPTS `$sdl --cflags`"
304 LDOPTS
="$LDOPTS `$sdl --libs`"
309 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
311 if test "X$win32crosscompile" != "Xyes"; then
312 if test "`uname -m`" = "i686"; then
313 echo "Enabling MMX support"
314 GCCOPTS
="$GCCOPTS -mmmx"
316 # x86_64 supports MMX by default
319 cat >$tmpdir/conftest-
$id.c
<<EOF
321 int main(int argc, char **argv)
324 char *varp = (char *)&var;
332 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
334 # when cross compiling, the endianess cannot be detected because the above program doesn't run
335 # on the local machine. assume little endian but print a warning
336 endian
=`$tmpdir/conftest-$id 2> /dev/null`
337 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
345 if [ "$CROSS_COMPILE" != "" ]; then
346 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
349 if [ "$app_type" = "sdl-sim" ]; then
350 echo "Simulator environment deemed $endian endian"
351 elif [ "$app_type" = "sdl-app" ]; then
352 echo "Application environment deemed $endian endian"
353 elif [ "$app_type" = "checkwps" ]; then
354 echo "CheckWPS environment deemed $endian endian"
357 # use wildcard here to make it work even if it was named *.exe like
359 rm -f $tmpdir/conftest-
$id*
361 # We are crosscompiling
362 # add cross-compiler option(s)
363 prefixtools i586-mingw32msvc-
364 LDOPTS
="$LDOPTS -mconsole"
366 output
="rockboxui.exe"
367 endian
="little" # windows is little endian
368 echo "Enabling MMX support"
369 GCCOPTS
="$GCCOPTS -mmmx"
373 if [ -z "$ARG_THREAD_SUPPORT" ] ||
[ "$ARG_THREAD_SUPPORT" = "0" ]; then
374 if [ "$sigaltstack" = "0" ]; then
375 thread_support
="HAVE_SIGALTSTACK_THREADS"
376 LDOPTS
="$LDOPTS -lpthread" # pthread needed
377 echo "Selected sigaltstack threads"
378 elif [ "$fibers" = "0" ]; then
379 thread_support
="HAVE_WIN32_FIBER_THREADS"
380 echo "Selected Win32 Fiber threads"
384 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
385 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
386 thread_support
="HAVE_SDL_THREADS"
387 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
388 echo "Selected SDL threads"
390 echo "WARNING: Falling back to SDL threads"
396 # functions for setting up cross-compiler names and options
397 # also set endianess and what the exact recommended gcc version is
398 # the gcc version should most likely match what versions we build with
403 GCCOPTS
="$CCOPTS -m1"
404 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
410 prefixtools calmrisc16-unknown-elf-
411 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
412 GCCOPTIMIZE
="-fomit-frame-pointer"
417 prefixtools m68k-elf-
418 GCCOPTS
="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
419 GCCOPTIMIZE
="-fomit-frame-pointer"
426 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
427 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
428 GCCOPTS
="$GCCOPTS -mlong-calls"
430 GCCOPTIMIZE
="-fomit-frame-pointer"
436 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
437 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
438 GCCOPTS
="$GCCOPTS -mlong-calls"
440 GCCOPTIMIZE
="-fomit-frame-pointer"
446 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
447 if test "$ARG_ARM_EABI" = "0"; then
448 GCCOPTS
="$GCCOPTS -mlong-calls"
450 GCCOPTIMIZE
="-fomit-frame-pointer"
456 GCCOPTS
="$CCOPTS -mcpu=arm940t"
457 if test "$ARG_ARM_EABI" = "0"; then
458 GCCOPTS
="$GCCOPTS -mlong-calls"
460 GCCOPTIMIZE
="-fomit-frame-pointer"
466 GCCOPTS
="$CCOPTS -mcpu=arm9e"
467 if test "$ARG_ARM_EABI" = "0"; then
468 GCCOPTS
="$GCCOPTS -mlong-calls"
470 GCCOPTIMIZE
="-fomit-frame-pointer"
476 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
477 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
478 GCCOPTS
="$GCCOPTS -mlong-calls"
480 GCCOPTIMIZE
="-fomit-frame-pointer"
486 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
487 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
488 GCCOPTS
="$GCCOPTS -mlong-calls"
490 GCCOPTIMIZE
="-fomit-frame-pointer"
496 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
497 if test "$ARG_ARM_EABI" = "0"; then
498 GCCOPTS
="$GCCOPTS -mlong-calls"
500 GCCOPTIMIZE
="-fomit-frame-pointer"
506 GCCOPTS
="$CCOPTS -march=armv5te"
507 GCCOPTIMIZE
="-fomit-frame-pointer"
512 prefixtools mipsel-elf-
513 # mips is predefined, but we want it for paths. use __mips instead
514 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
515 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
516 GCCOPTIMIZE
="-fomit-frame-pointer"
522 # Scratchbox sets up "gcc" based on the active target
525 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
526 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
528 LDOPTS
="-lm -ldl $LDOPTS"
529 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
530 SHARED_LDFLAG
="-shared"
533 thread_support
="HAVE_SIGALTSTACK_THREADS"
536 # Determine maemo version
537 if pkg-config
--atleast-version=5 maemo-version
; then
538 if [ "$1" == "4" ]; then
539 echo "ERROR: Maemo 4 SDK required."
542 extradefines
="$extradefines -DMAEMO5"
543 echo "Found N900 maemo version"
545 elif pkg-config
--atleast-version=4 maemo-version
; then
546 if [ "$1" == "5" ]; then
547 echo "ERROR: Maemo 5 SDK required."
550 extradefines
="$extradefines -DMAEMO4"
551 echo "Found N8xx maemo version"
553 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
558 if [ $is_n900 -eq 1 ]; then
559 GCCOPTS
="$GCCOPTS `pkg-config --cflags sdl`"
560 LDOPTS
="$LDOPTS `pkg-config --libs sdl`"
562 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
563 LDOPTS
="$LDOPTS `sdl-config --libs`"
566 # glib and libosso support
567 GCCOPTS
="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
568 LDOPTS
="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
570 # libhal support: Battery monitoring
571 GCCOPTS
="$GCCOPTS `pkg-config --cflags hal`"
572 LDOPTS
="$LDOPTS `pkg-config --libs hal`"
574 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
575 if [ $is_n900 -eq 1 ]; then
576 # gstreamer support: Audio output.
577 GCCOPTS
="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
578 LDOPTS
="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
580 # N900 specific: libplayback support
581 GCCOPTS
="$GCCOPTS `pkg-config --cflags libplayback-1`"
582 LDOPTS
="$LDOPTS `pkg-config --libs libplayback-1`"
584 # N900 specific: Enable ARMv7 NEON support
585 if sb-conf show
-A |
grep -q -i arm
; then
586 echo "Detected ARM target"
587 GCCOPTS
="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
588 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
590 echo "Detected x86 target"
593 # N8xx specific: Enable armv5te instructions
594 if sb-conf show
-A |
grep -q -i arm
; then
595 echo "Detected ARM target"
596 GCCOPTS
="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
597 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
599 echo "Detected x86 target"
605 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
606 # You have to use the sebt3 toolchain:
607 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
609 PNDSDK
="/usr/local/angstrom/arm"
610 if [ ! -x $PNDSDK/bin
/arm-angstrom-linux-gnueabi-gcc
]; then
611 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
615 PATH
=$PNDSDK/bin
:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/bin
616 PKG_CONFIG_PATH
=$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/lib
/pkgconfig
617 LDOPTS
="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
618 PKG_CONFIG
="pkg-config"
620 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
621 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
623 LDOPTS
="-lm -ldl $LDOPTS"
624 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
625 SHARED_LDFLAG
="-shared"
628 thread_support
="HAVE_SIGALTSTACK_THREADS"
631 GCCOPTS
="-I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
635 prefixtools
"$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
638 GCCOPTS
="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
639 LDOPTS
="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
642 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
643 GCCOPTS
="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
644 GCCOPTS
="$GCCOPTS -ffast-math -fsingle-precision-constant"
648 if [ -z "$ANDROID_SDK_PATH" ]; then
649 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
650 echo "environment variable point to the root directory of the Android SDK."
653 if [ -z "$ANDROID_NDK_PATH" ]; then
654 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
655 echo "environment variable point to the root directory of the Android NDK."
658 buildhost
=`uname | tr [:upper:] [:lower:]`
660 gcctarget
="arm-linux-androideabi-"
661 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
662 PATH
=$PATH:$gccprefix/bin
663 prefixtools
$gcctarget
664 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
665 GCCOPTS
="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
666 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
667 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
668 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
669 LDOPTS
="$LDOPTS -shared -nostdlib -ldl -llog"
671 SHARED_LDFLAG
="-shared"
676 atype
=`echo "$1" | cut -c 2-`
677 ##################################################################
678 # Prompt for specific developer options
680 if [ "$atype" ]; then
685 printf "Enter your developer options (press only enter when done)\n\
686 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
687 (T)est plugins, S(m)all C lib:"
688 if [ "$memory" = "2" ]; then
691 if [ "$modelname" = "archosplayer" ]; then
692 printf ", Use (A)TA poweroff"
694 if [ "$t_model" = "ondio" ]; then
695 printf ", (B)acklight MOD"
697 if [ "$modelname" = "iaudiom5" ]; then
698 printf ", (F)M radio MOD"
700 if [ "$modelname" = "iriverh120" ]; then
707 while [ $cont = "1" ]; do
709 if [ "$interact" ]; then
712 option
=`echo "$atype" | cut -c 1`
717 if [ "yes" = "$profile" ]; then
718 echo "Debug is incompatible with profiling"
720 echo "DEBUG build enabled"
725 echo "logf() support enabled"
729 echo "Using Rockbox' small C library"
730 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
733 echo "Including test plugins"
734 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
737 echo "bootchart enabled (logf also enabled)"
742 echo "Simulator build enabled"
746 if [ "yes" = "$use_debug" ]; then
747 echo "Profiling is incompatible with debug"
749 echo "Profiling support is enabled"
754 echo "Voice build selected"
758 if [ "$memory" = "2" ]; then
760 echo "Memory size selected: 8MB"
764 if [ "$modelname" = "archosplayer" ]; then
765 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
766 echo "ATA power off enabled"
770 if [ "$t_model" = "ondio" ]; then
771 have_backlight
="#define HAVE_BACKLIGHT"
772 echo "Backlight functions enabled"
776 if [ "$modelname" = "iaudiom5" ]; then
777 have_fmradio_in
="#define HAVE_FMRADIO_IN"
778 echo "FM radio functions enabled"
782 if [ "$modelname" = "iriverh120" ]; then
783 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
784 have_rtc_alarm
="#define HAVE_RTC_ALARM"
785 echo "RTC functions enabled (DS1339/DS3231)"
789 echo "Enabling Windows 32 cross-compiling"
790 win32crosscompile
="yes"
792 "") # Match enter press when finished with advanced options
796 echo "[ERROR] Option $option unsupported"
799 if [ "$interact" ]; then
800 btype
="$btype$option"
802 atype
=`echo "$atype" | cut -c 2-`
803 [ "$atype" ] || cont
=0
808 if [ "yes" = "$voice" ]; then
809 # Ask about languages to build
811 voicelanguage
=`whichlang`
812 echo "Voice language set to $voicelanguage"
814 # Configure encoder and TTS engine for each language
815 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
816 voiceconfig
"$thislang"
819 if [ "yes" = "$use_debug" ]; then
821 GCCOPTS
="$GCCOPTS -g -DDEBUG"
823 if [ "yes" = "$logf" ]; then
824 use_logf
="#define ROCKBOX_HAS_LOGF 1"
826 if [ "yes" = "$bootchart" ]; then
827 use_bootchart
="#define DO_BOOTCHART 1"
829 if [ "yes" = "$simulator" ]; then
831 extradefines
="$extradefines -DSIMULATOR"
835 if [ "yes" = "$profile" ]; then
836 extradefines
="$extradefines -DRB_PROFILE"
837 PROFILE_OPTS
="-finstrument-functions"
841 # Configure voice settings
844 if [ ! "$ARG_TTS" ]; then
845 echo "Building $thislang voice for $modelname. Select options"
849 if [ -n "`findtool flite`" ]; then
853 DEFAULT_TTS_OPTS
=$FLITE_OPTS
854 DEFAULT_NOISEFLOOR
="500"
857 if [ -n "`findtool espeak`" ]; then
861 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
862 DEFAULT_NOISEFLOOR
="500"
865 if [ -n "`findtool festival`" ]; then
866 FESTIVAL
="(F)estival "
869 FESTIVAL_OPTS
="--language italian"
872 FESTIVAL_OPTS
="--language spanish"
875 FESTIVAL_OPTS
="--language finnish"
878 FESTIVAL_OPTS
="--language czech"
884 DEFAULT_TTS
="festival"
885 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
886 DEFAULT_NOISEFLOOR
="500"
889 if [ -n "`findtool swift`" ]; then
893 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
894 DEFAULT_NOISEFLOOR
="500"
897 # Allow SAPI if Windows is in use
898 if [ -n "`findtool winver`" ]; then
902 DEFAULT_TTS_OPTS
=$SAPI_OPTS
903 DEFAULT_NOISEFLOOR
="500"
907 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
908 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
912 if [ "$ARG_TTS" ]; then
915 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
918 advopts
="$advopts --tts=$option"
922 NOISEFLOOR
="500" # TODO: check this value
928 TTS_OPTS
=$ESPEAK_OPTS
931 TTS_ENGINE
="festival"
933 TTS_OPTS
=$FESTIVAL_OPTS
946 TTS_ENGINE
=$DEFAULT_TTS
947 TTS_OPTS
=$DEFAULT_TTS_OPTS
948 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
950 echo "Using $TTS_ENGINE for TTS"
952 # Select which voice to use for Festival
953 if [ "$TTS_ENGINE" = "festival" ]; then
954 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
955 for voice
in $voicelist; do
956 TTS_FESTIVAL_VOICE
="$voice" # Default choice
959 if [ "$ARG_VOICE" ]; then
963 for voice
in $voicelist; do
964 printf "%3d. %s\n" "$i" "$voice"
967 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
971 for voice
in $voicelist; do
972 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
973 TTS_FESTIVAL_VOICE
="$voice"
977 advopts
="$advopts --voice=$CHOICE"
978 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
979 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
982 # Read custom tts options from command line
983 if [ "$ARG_TTSOPTS" ]; then
984 TTS_OPTS
="$ARG_TTSOPTS"
985 advopts
="$advopts --ttsopts='$TTS_OPTS'"
986 echo "$TTS_ENGINE options set to $TTS_OPTS"
989 if [ "$swcodec" = "yes" ]; then
992 ENC_OPTS
="-q 4 -c 10"
994 if [ -n "`findtool lame`" ]; then
997 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
999 echo "You need LAME in the system path to build voice files for"
1000 echo "HWCODEC targets."
1005 echo "Using $ENCODER for encoding voice clips"
1007 # Read custom encoder options from command line
1008 if [ "$ARG_ENCOPTS" ]; then
1009 ENC_OPTS
="$ARG_ENCOPTS"
1010 advopts
="$advopts --encopts='$ENC_OPTS'"
1011 echo "$ENCODER options set to $ENC_OPTS"
1015 if [ -n "`findtool cygpath`" ]; then
1016 TEMPDIR
=`cygpath . -a -w`
1021 # figure out which languages that are around
1022 for file in $rootdir/apps
/lang
/*.lang
; do
1023 clean
=`basename $file .lang`
1024 langs
="$langs $clean"
1027 if [ "$ARG_LANG" ]; then
1030 echo "Select a number for the language to use (default is english)"
1031 # FIXME The multiple-language feature is currently broken
1032 # echo "You may enter a comma-separated list of languages to build"
1035 for one
in $langs; do
1041 advopts
="$advopts --language=$pick"
1046 # Allow the user to pass a comma-separated list of langauges
1047 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1049 for one
in $langs; do
1050 # Accept both the language number and name
1051 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1052 if [ "$output" = "" ]; then
1061 if [ -z "$output" ]; then
1069 echo "Rockbox configure script."
1070 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1071 echo "Do *NOT* run this within the tools directory!"
1074 Usage: configure [OPTION]...
1076 --target=TARGET Sets the target, TARGET can be either the target ID or
1077 corresponding string. Run without this option to see all
1080 --ram=RAM Sets the RAM for certain targets. Even though any number
1081 is accepted, not every number is correct. The default
1082 value will be applied, if you entered a wrong number
1083 (which depends on the target). Watch the output. Run
1084 without this option if you are not sure which the right
1087 --type=TYPE Sets the build type. Shortcuts are also valid.
1088 Run without this option to see all available types.
1089 Multiple values are allowed and managed in the input
1090 order. So --type=b stands for Bootloader build, while
1091 --type=ab stands for "Backlight MOD" build.
1093 --lcdwidth=X Sets the width of the LCD. Used only for application
1096 --lcdheight=Y Sets the height of the LCD. Used only for application
1099 --language=LANG Set the language used for voice generation (used only if
1102 --tts=ENGINE Set the TTS engine used for voice generation (used only
1105 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1108 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1110 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1112 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1113 This is useful for having multiple alternate builds on
1114 your device that you can load with ROLO. However as the
1115 bootloader looks for .rockbox you won't be able to boot
1118 --ccache Enable ccache use (done by default these days)
1119 --no-ccache Disable ccache use
1121 --eabi Make configure prefer toolchains that are able to compile
1122 for the new ARM standard abi EABI
1123 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1124 --thumb Build with -mthumb (for ARM builds)
1125 --no-thumb The opposite of --thumb (don't use thumb even for targets
1126 where this is the default
1127 --sdl-threads Force use of SDL threads. They have inferior performance,
1128 but are better debuggable with GDB
1129 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1130 behavior of falling back to them if no native thread
1132 --prefix Target installation directory
1133 --help Shows this message (must not be used with other options)
1152 ARG_PREFIX
="$PREFIX"
1157 --ccache) ARG_CCACHE
=1;;
1158 --no-ccache) ARG_CCACHE
=0;;
1159 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1160 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1161 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1162 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1163 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1164 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1165 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1166 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1167 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1168 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1169 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1170 --eabi) ARG_ARM_EABI
=1;;
1171 --no-eabi) ARG_ARM_EABI
=0;;
1172 --thumb) ARG_ARM_THUMB
=1;;
1173 --no-thumb) ARG_ARM_THUMB
=0;;
1174 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1176 ARG_THREAD_SUPPORT
=0;;
1177 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1179 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1182 [ "$err" ] && exit 1
1186 if [ "$TMPDIR" != "" ]; then
1191 echo Using temporary directory
$tmpdir
1193 if test -r "configure"; then
1194 # this is a check for a configure script in the current directory, it there
1195 # is one, try to figure out if it is this one!
1197 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1198 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1199 echo "It will only cause you pain and grief. Instead do this:"
1202 echo " mkdir build-dir"
1203 echo " cd build-dir"
1204 echo " ../tools/configure"
1206 echo "Much happiness will arise from this. Enjoy"
1211 # get our current directory
1214 if { echo $pwd |
grep " "; } then
1215 echo "You're running this script in a path that contains space. The build"
1216 echo "system is unfortunately not clever enough to deal with this. Please"
1217 echo "run the script from a different path, rename the path or fix the build"
1222 if [ -z "$rootdir" ]; then
1223 ##################################################################
1224 # Figure out where the source code root is!
1226 rootdir
=`dirname $0`/..
/
1228 #####################################################################
1229 # Convert the possibly relative directory name to an absolute version
1235 # cd back to the build dir
1240 appsdir
='\$(ROOTDIR)/apps'
1241 firmdir
='\$(ROOTDIR)/firmware'
1242 toolsdir
='\$(ROOTDIR)/tools'
1245 ##################################################################
1246 # Figure out target platform
1249 if [ "$ARG_TARGET" ]; then
1250 buildfor
=$ARG_TARGET
1252 echo "Enter target platform:"
1254 ==Archos== ==iriver== ==Apple iPod==
1255 0) Player/Studio 10) H120/H140 20) Color/Photo
1256 1) Recorder 11) H320/H340 21) Nano 1G
1257 2) FM Recorder 12) iHP-100/110/115 22) Video
1258 3) Recorder v2 13) iFP-790 23) 3G
1259 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1260 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1261 6) AV300 26) Mini 2G
1262 ==Toshiba== 27) 1G, 2G
1263 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1264 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1266 32) 7 ==Olympus= ==SanDisk==
1267 33) D2 70) M:Robe 500 50) Sansa e200
1268 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1270 ==Creative== ==Philips== 53) Sansa m200
1271 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1272 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1273 92) Zen Vision HDD1830 56) Sansa e200v2
1274 102) GoGear HDD6330 57) Sansa m200v4
1275 ==Onda== 58) Sansa Fuze
1276 120) VX747 ==Meizu== 59) Sansa c200v2
1277 121) VX767 110) M6SL 60) Sansa Clipv2
1278 122) VX747+ 111) M6SP 61) Sansa View
1279 123) VX777 112) M3 62) Sansa Clip+
1281 ==Samsung== ==Tatung== 64) Sansa Fuze+
1282 140) YH-820 150) Elio TPJ-1022
1283 141) YH-920 ==Logik==
1284 142) YH-925 ==Packard Bell== 80) DAX 1GB MP3/DAB
1285 143) YP-S3 160) Vibe 500
1287 ==Application== ==MPIO== 130) Lyre proto 1
1288 200) SDL 170) HD200 131) Mini2440
1289 201) Android 171) HD300
1291 203) Nokia N900 ==ROCKCHIP==
1292 204) Pandora 180) rk27xx generic
1299 # Set of tools built for all target platforms:
1300 toolset
="rdf2binary convbdf codepages"
1302 # Toolsets for some target families:
1303 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1304 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1305 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1306 ipodbitmaptools
="$toolset scramble bmp2rb"
1307 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1308 tccbitmaptools
="$toolset scramble bmp2rb"
1309 # generic is used by IFP, Meizu and Onda
1310 genericbitmaptools
="$toolset bmp2rb"
1311 # scramble is used by all other targets
1312 scramblebitmaptools
="$genericbitmaptools scramble"
1315 # ---- For each target ----
1318 # target_id: a unique number identifying this target, IS NOT the menu number.
1319 # Just use the currently highest number+1 when you add a new
1321 # modelname: short model name used all over to identify this target
1322 # memory: number of megabytes of RAM this target has. If the amount can
1323 # be selected by the size prompt, let memory be unset here
1324 # target: -Ddefine passed to the build commands to make the correct
1325 # config-*.h file get included etc
1326 # tool: the tool that takes a plain binary and converts that into a
1327 # working "firmware" file for your target
1328 # output: the final output file name
1329 # boottool: the tool that takes a plain binary and generates a bootloader
1330 # file for your target (or blank to use $tool)
1331 # bootoutput:the final output file name for the bootloader (or blank to use
1333 # appextra: passed to the APPEXTRA variable in the Makefiles.
1334 # TODO: add proper explanation
1335 # archosrom: used only for Archos targets that build a special flashable .ucl
1337 # flash: name of output for flashing, for targets where there's a special
1338 # file output for this.
1339 # plugins: set to 'yes' to build the plugins. Early development builds can
1340 # set this to no in the early stages to have an easier life for a
1342 # swcodec: set 'yes' on swcodec targets
1343 # toolset: lists what particular tools in the tools/ directory that this
1344 # target needs to have built prior to building Rockbox
1347 # *cc: sets up gcc and compiler options for your target builds. Note
1348 # that if you select a simulator build, the compiler selection is
1349 # overridden later in the script.
1355 modelname
="archosplayer"
1356 target
="-DARCHOS_PLAYER"
1358 tool
="$rootdir/tools/scramble"
1360 appextra
="player:gui"
1361 archosrom
="$pwd/rombox.ucl"
1362 flash
="$pwd/rockbox.ucl"
1366 # toolset is the tools within the tools directory that we build for
1367 # this particular target.
1368 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1370 # Note: the convbdf is present in the toolset just because: 1) the
1371 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1372 # build the player simulator
1375 t_manufacturer
="archos"
1381 modelname
="archosrecorder"
1382 target
="-DARCHOS_RECORDER"
1384 tool
="$rootdir/tools/scramble"
1385 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1386 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1388 appextra
="recorder:gui:radio"
1389 #archosrom="$pwd/rombox.ucl"
1390 flash
="$pwd/rockbox.ucl"
1393 # toolset is the tools within the tools directory that we build for
1394 # this particular target.
1395 toolset
=$archosbitmaptools
1397 t_manufacturer
="archos"
1403 modelname
="archosfmrecorder"
1404 target
="-DARCHOS_FMRECORDER"
1406 tool
="$rootdir/tools/scramble -fm"
1407 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1408 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1410 appextra
="recorder:gui:radio"
1411 #archosrom="$pwd/rombox.ucl"
1412 flash
="$pwd/rockbox.ucl"
1415 # toolset is the tools within the tools directory that we build for
1416 # this particular target.
1417 toolset
=$archosbitmaptools
1419 t_manufacturer
="archos"
1425 modelname
="archosrecorderv2"
1426 target
="-DARCHOS_RECORDERV2"
1428 tool
="$rootdir/tools/scramble -v2"
1429 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1430 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1432 appextra
="recorder:gui:radio"
1433 #archosrom="$pwd/rombox.ucl"
1434 flash
="$pwd/rockbox.ucl"
1437 # toolset is the tools within the tools directory that we build for
1438 # this particular target.
1439 toolset
=$archosbitmaptools
1441 t_manufacturer
="archos"
1447 modelname
="archosondiosp"
1448 target
="-DARCHOS_ONDIOSP"
1450 tool
="$rootdir/tools/scramble -osp"
1451 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1452 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1454 appextra
="recorder:gui:radio"
1455 #archosrom="$pwd/rombox.ucl"
1456 flash
="$pwd/rockbox.ucl"
1459 # toolset is the tools within the tools directory that we build for
1460 # this particular target.
1461 toolset
=$archosbitmaptools
1463 t_manufacturer
="archos"
1469 modelname
="archosondiofm"
1470 target
="-DARCHOS_ONDIOFM"
1472 tool
="$rootdir/tools/scramble -ofm"
1473 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1474 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1476 appextra
="recorder:gui:radio"
1477 #archosrom="$pwd/rombox.ucl"
1478 flash
="$pwd/rockbox.ucl"
1481 toolset
=$archosbitmaptools
1483 t_manufacturer
="archos"
1489 modelname
="archosav300"
1490 target
="-DARCHOS_AV300"
1493 tool
="$rootdir/tools/scramble -mm=C"
1494 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1495 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1497 appextra
="recorder:gui:radio"
1500 # toolset is the tools within the tools directory that we build for
1501 # this particular target.
1502 toolset
="$toolset scramble descramble bmp2rb"
1503 # architecture, manufacturer and model for the target-tree build
1505 t_manufacturer
="archos"
1511 modelname
="iriverh120"
1512 target
="-DIRIVER_H120"
1515 tool
="$rootdir/tools/scramble -add=h120"
1516 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1517 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1518 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1519 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1520 output
="rockbox.iriver"
1521 bootoutput
="bootloader.iriver"
1522 appextra
="recorder:gui:radio"
1523 flash
="$pwd/rombox.iriver"
1526 # toolset is the tools within the tools directory that we build for
1527 # this particular target.
1528 toolset
=$iriverbitmaptools
1530 t_manufacturer
="iriver"
1536 modelname
="iriverh300"
1537 target
="-DIRIVER_H300"
1540 tool
="$rootdir/tools/scramble -add=h300"
1541 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1542 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1543 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1544 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1545 output
="rockbox.iriver"
1546 appextra
="recorder:gui:radio"
1549 # toolset is the tools within the tools directory that we build for
1550 # this particular target.
1551 toolset
=$iriverbitmaptools
1553 t_manufacturer
="iriver"
1559 modelname
="iriverh100"
1560 target
="-DIRIVER_H100"
1563 tool
="$rootdir/tools/scramble -add=h100"
1564 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1565 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1566 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1567 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1568 output
="rockbox.iriver"
1569 bootoutput
="bootloader.iriver"
1570 appextra
="recorder:gui:radio"
1571 flash
="$pwd/rombox.iriver"
1574 # toolset is the tools within the tools directory that we build for
1575 # this particular target.
1576 toolset
=$iriverbitmaptools
1578 t_manufacturer
="iriver"
1584 modelname
="iriverifp7xx"
1585 target
="-DIRIVER_IFP7XX"
1589 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1590 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1591 output
="rockbox.wma"
1592 appextra
="recorder:gui:radio"
1595 # toolset is the tools within the tools directory that we build for
1596 # this particular target.
1597 toolset
=$genericbitmaptools
1599 t_manufacturer
="pnx0101"
1600 t_model
="iriver-ifp7xx"
1605 modelname
="iriverh10"
1606 target
="-DIRIVER_H10"
1609 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1610 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1611 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1612 output
="rockbox.mi4"
1613 appextra
="recorder:gui:radio"
1616 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1617 bootoutput
="H10_20GC.mi4"
1618 # toolset is the tools within the tools directory that we build for
1619 # this particular target.
1620 toolset
=$scramblebitmaptools
1621 # architecture, manufacturer and model for the target-tree build
1623 t_manufacturer
="iriver"
1629 modelname
="iriverh10_5gb"
1630 target
="-DIRIVER_H10_5GB"
1633 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1634 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1635 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1636 output
="rockbox.mi4"
1637 appextra
="recorder:gui:radio"
1640 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1641 bootoutput
="H10.mi4"
1642 # toolset is the tools within the tools directory that we build for
1643 # this particular target.
1644 toolset
=$scramblebitmaptools
1645 # architecture, manufacturer and model for the target-tree build
1647 t_manufacturer
="iriver"
1653 modelname
="ipodcolor"
1654 target
="-DIPOD_COLOR"
1657 tool
="$rootdir/tools/scramble -add=ipco"
1658 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1659 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1660 output
="rockbox.ipod"
1661 appextra
="recorder:gui:radio"
1664 bootoutput
="bootloader-$modelname.ipod"
1665 # toolset is the tools within the tools directory that we build for
1666 # this particular target.
1667 toolset
=$ipodbitmaptools
1668 # architecture, manufacturer and model for the target-tree build
1670 t_manufacturer
="ipod"
1676 modelname
="ipodnano1g"
1677 target
="-DIPOD_NANO"
1680 tool
="$rootdir/tools/scramble -add=nano"
1681 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1682 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1683 output
="rockbox.ipod"
1684 appextra
="recorder:gui:radio"
1687 bootoutput
="bootloader-$modelname.ipod"
1688 # toolset is the tools within the tools directory that we build for
1689 # this particular target.
1690 toolset
=$ipodbitmaptools
1691 # architecture, manufacturer and model for the target-tree build
1693 t_manufacturer
="ipod"
1699 modelname
="ipodvideo"
1700 target
="-DIPOD_VIDEO"
1701 memory
=64 # always. This is reduced at runtime if needed
1703 tool
="$rootdir/tools/scramble -add=ipvd"
1704 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1705 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1706 output
="rockbox.ipod"
1707 appextra
="recorder:gui:radio"
1710 bootoutput
="bootloader-$modelname.ipod"
1711 # toolset is the tools within the tools directory that we build for
1712 # this particular target.
1713 toolset
=$ipodbitmaptools
1714 # architecture, manufacturer and model for the target-tree build
1716 t_manufacturer
="ipod"
1726 tool
="$rootdir/tools/scramble -add=ip3g"
1727 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1728 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1729 output
="rockbox.ipod"
1730 appextra
="recorder:gui:radio"
1733 bootoutput
="bootloader-$modelname.ipod"
1734 # toolset is the tools within the tools directory that we build for
1735 # this particular target.
1736 toolset
=$ipodbitmaptools
1737 # architecture, manufacturer and model for the target-tree build
1739 t_manufacturer
="ipod"
1749 tool
="$rootdir/tools/scramble -add=ip4g"
1750 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1751 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1752 output
="rockbox.ipod"
1753 appextra
="recorder:gui:radio"
1756 bootoutput
="bootloader-$modelname.ipod"
1757 # toolset is the tools within the tools directory that we build for
1758 # this particular target.
1759 toolset
=$ipodbitmaptools
1760 # architecture, manufacturer and model for the target-tree build
1762 t_manufacturer
="ipod"
1768 modelname
="ipodmini1g"
1769 target
="-DIPOD_MINI"
1772 tool
="$rootdir/tools/scramble -add=mini"
1773 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1774 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1775 output
="rockbox.ipod"
1776 appextra
="recorder:gui:radio"
1779 bootoutput
="bootloader-$modelname.ipod"
1780 # toolset is the tools within the tools directory that we build for
1781 # this particular target.
1782 toolset
=$ipodbitmaptools
1783 # architecture, manufacturer and model for the target-tree build
1785 t_manufacturer
="ipod"
1791 modelname
="ipodmini2g"
1792 target
="-DIPOD_MINI2G"
1795 tool
="$rootdir/tools/scramble -add=mn2g"
1796 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1797 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1798 output
="rockbox.ipod"
1799 appextra
="recorder:gui:radio"
1802 bootoutput
="bootloader-$modelname.ipod"
1803 # toolset is the tools within the tools directory that we build for
1804 # this particular target.
1805 toolset
=$ipodbitmaptools
1806 # architecture, manufacturer and model for the target-tree build
1808 t_manufacturer
="ipod"
1814 modelname
="ipod1g2g"
1815 target
="-DIPOD_1G2G"
1818 tool
="$rootdir/tools/scramble -add=1g2g"
1819 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1820 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1821 output
="rockbox.ipod"
1822 appextra
="recorder:gui:radio"
1825 bootoutput
="bootloader-$modelname.ipod"
1826 # toolset is the tools within the tools directory that we build for
1827 # this particular target.
1828 toolset
=$ipodbitmaptools
1829 # architecture, manufacturer and model for the target-tree build
1831 t_manufacturer
="ipod"
1837 modelname
="ipodnano2g"
1838 target
="-DIPOD_NANO2G"
1841 tool
="$rootdir/tools/scramble -add=nn2g"
1842 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1843 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1844 output
="rockbox.ipod"
1845 appextra
="recorder:gui:radio"
1848 bootoutput
="bootloader-$modelname.ipod"
1849 # toolset is the tools within the tools directory that we build for
1850 # this particular target.
1851 toolset
=$ipodbitmaptools
1852 # architecture, manufacturer and model for the target-tree build
1854 t_manufacturer
="s5l8700"
1855 t_model
="ipodnano2g"
1864 tool
="$rootdir/tools/scramble -add=ip6g"
1865 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1866 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1867 output
="rockbox.ipod"
1868 appextra
="recorder:gui:radio"
1871 bootoutput
="bootloader-$modelname.ipod"
1872 # toolset is the tools within the tools directory that we build for
1873 # this particular target.
1874 toolset
=$ipodbitmaptools
1875 # architecture, manufacturer and model for the target-tree build
1877 t_manufacturer
="s5l8702"
1883 modelname
="iaudiox5"
1884 target
="-DIAUDIO_X5"
1887 tool
="$rootdir/tools/scramble -add=iax5"
1888 boottool
="$rootdir/tools/scramble -iaudiox5"
1889 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1890 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1891 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1892 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1893 output
="rockbox.iaudio"
1894 bootoutput
="x5_fw.bin"
1895 appextra
="recorder:gui:radio"
1898 # toolset is the tools within the tools directory that we build for
1899 # this particular target.
1900 toolset
="$iaudiobitmaptools"
1901 # architecture, manufacturer and model for the target-tree build
1903 t_manufacturer
="iaudio"
1909 modelname
="iaudiom5"
1910 target
="-DIAUDIO_M5"
1913 tool
="$rootdir/tools/scramble -add=iam5"
1914 boottool
="$rootdir/tools/scramble -iaudiom5"
1915 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1916 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1917 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1918 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1919 output
="rockbox.iaudio"
1920 bootoutput
="m5_fw.bin"
1921 appextra
="recorder:gui:radio"
1924 # toolset is the tools within the tools directory that we build for
1925 # this particular target.
1926 toolset
="$iaudiobitmaptools"
1927 # architecture, manufacturer and model for the target-tree build
1929 t_manufacturer
="iaudio"
1939 tool
="$rootdir/tools/scramble -add=i7"
1940 boottool
="$rootdir/tools/scramble -tcc=crc"
1941 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1942 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1943 output
="rockbox.iaudio"
1944 appextra
="recorder:gui:radio"
1947 bootoutput
="I7_FW.BIN"
1948 # toolset is the tools within the tools directory that we build for
1949 # this particular target.
1950 toolset
="$tccbitmaptools"
1951 # architecture, manufacturer and model for the target-tree build
1953 t_manufacturer
="tcc77x"
1963 tool
="$rootdir/tools/scramble -add=d2"
1965 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1966 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1968 bootoutput
="bootloader-cowond2.bin"
1969 appextra
="recorder:gui:radio"
1972 toolset
="$tccbitmaptools"
1973 # architecture, manufacturer and model for the target-tree build
1975 t_manufacturer
="tcc780x"
1981 modelname
="iaudiom3"
1982 target
="-DIAUDIO_M3"
1985 tool
="$rootdir/tools/scramble -add=iam3"
1986 boottool
="$rootdir/tools/scramble -iaudiom3"
1987 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1988 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
1989 output
="rockbox.iaudio"
1990 bootoutput
="cowon_m3.bin"
1991 appextra
="recorder:gui:radio"
1994 # toolset is the tools within the tools directory that we build for
1995 # this particular target.
1996 toolset
="$iaudiobitmaptools"
1997 # architecture, manufacturer and model for the target-tree build
1999 t_manufacturer
="iaudio"
2005 modelname
="gigabeatfx"
2006 target
="-DGIGABEAT_F"
2009 tool
="$rootdir/tools/scramble -add=giga"
2010 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2011 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2012 output
="rockbox.gigabeat"
2013 appextra
="recorder:gui:radio"
2016 toolset
=$gigabeatbitmaptools
2017 boottool
="$rootdir/tools/scramble -gigabeat"
2018 bootoutput
="FWIMG01.DAT"
2019 # architecture, manufacturer and model for the target-tree build
2021 t_manufacturer
="s3c2440"
2022 t_model
="gigabeat-fx"
2027 modelname
="gigabeats"
2028 target
="-DGIGABEAT_S"
2031 tool
="$rootdir/tools/scramble -add=gigs"
2032 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2033 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2034 output
="rockbox.gigabeat"
2035 appextra
="recorder:gui:radio"
2038 toolset
="$gigabeatbitmaptools"
2039 boottool
="$rootdir/tools/scramble -gigabeats"
2041 # architecture, manufacturer and model for the target-tree build
2043 t_manufacturer
="imx31"
2044 t_model
="gigabeat-s"
2049 modelname
="mrobe500"
2050 target
="-DMROBE_500"
2053 tool
="$rootdir/tools/scramble -add=m500"
2054 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2055 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2056 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2057 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2058 output
="rockbox.mrobe500"
2059 appextra
="recorder:gui:radio"
2062 toolset
=$gigabeatbitmaptools
2064 bootoutput
="rockbox.mrboot"
2065 # architecture, manufacturer and model for the target-tree build
2067 t_manufacturer
="tms320dm320"
2073 modelname
="mrobe100"
2074 target
="-DMROBE_100"
2077 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2078 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2079 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2080 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2081 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2082 output
="rockbox.mi4"
2083 appextra
="recorder:gui:radio"
2086 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2087 bootoutput
="pp5020.mi4"
2088 # toolset is the tools within the tools directory that we build for
2089 # this particular target.
2090 toolset
=$scramblebitmaptools
2091 # architecture, manufacturer and model for the target-tree build
2093 t_manufacturer
="olympus"
2099 modelname
="logikdax"
2100 target
="-DLOGIK_DAX"
2103 tool
="$rootdir/tools/scramble -add=ldax"
2104 boottool
="$rootdir/tools/scramble -tcc=crc"
2105 bootoutput
="player.rom"
2106 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2107 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2108 output
="rockbox.logik"
2109 appextra
="recorder:gui:radio"
2112 # toolset is the tools within the tools directory that we build for
2113 # this particular target.
2114 toolset
=$tccbitmaptools
2115 # architecture, manufacturer and model for the target-tree build
2117 t_manufacturer
="tcc77x"
2123 modelname
="zenvisionm30gb"
2124 target
="-DCREATIVE_ZVM"
2127 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2128 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2129 tool
="$rootdir/tools/scramble -creative=zvm"
2131 output
="rockbox.zvm"
2132 appextra
="recorder:gui:radio"
2135 toolset
=$ipodbitmaptools
2136 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2137 bootoutput
="rockbox.zvmboot"
2138 # architecture, manufacturer and model for the target-tree build
2140 t_manufacturer
="tms320dm320"
2141 t_model
="creative-zvm"
2146 modelname
="zenvisionm60gb"
2147 target
="-DCREATIVE_ZVM60GB"
2150 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2151 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2152 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2154 output
="rockbox.zvm60"
2155 appextra
="recorder:gui:radio"
2158 toolset
=$ipodbitmaptools
2159 boottool
="$rootdir/tools/scramble -creative=zvm60"
2160 bootoutput
="rockbox.zvm60boot"
2161 # architecture, manufacturer and model for the target-tree build
2163 t_manufacturer
="tms320dm320"
2164 t_model
="creative-zvm"
2169 modelname
="zenvision"
2170 target
="-DCREATIVE_ZV"
2173 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2174 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2175 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2178 appextra
="recorder:gui:radio"
2181 toolset
=$ipodbitmaptools
2182 boottool
="$rootdir/tools/scramble -creative=zenvision"
2183 bootoutput
="rockbox.zvboot"
2184 # architecture, manufacturer and model for the target-tree build
2186 t_manufacturer
="tms320dm320"
2187 t_model
="creative-zvm"
2192 modelname
="sansae200"
2193 target
="-DSANSA_E200"
2194 memory
=32 # supposedly
2196 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2197 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2198 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2199 output
="rockbox.mi4"
2200 appextra
="recorder:gui:radio"
2203 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2204 bootoutput
="PP5022.mi4"
2205 # toolset is the tools within the tools directory that we build for
2206 # this particular target.
2207 toolset
=$scramblebitmaptools
2208 # architecture, manufacturer and model for the target-tree build
2210 t_manufacturer
="sandisk"
2211 t_model
="sansa-e200"
2215 # the e200R model is pretty much identical to the e200, it only has a
2216 # different option to the scramble tool when building a bootloader and
2217 # makes the bootloader output file name in all lower case.
2219 modelname
="sansae200r"
2220 target
="-DSANSA_E200"
2221 memory
=32 # supposedly
2223 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2224 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2225 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2226 output
="rockbox.mi4"
2227 appextra
="recorder:gui:radio"
2230 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2231 bootoutput
="pp5022.mi4"
2232 # toolset is the tools within the tools directory that we build for
2233 # this particular target.
2234 toolset
=$scramblebitmaptools
2235 # architecture, manufacturer and model for the target-tree build
2237 t_manufacturer
="sandisk"
2238 t_model
="sansa-e200"
2243 modelname
="sansac200"
2244 target
="-DSANSA_C200"
2245 memory
=32 # supposedly
2247 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2248 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2249 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2250 output
="rockbox.mi4"
2251 appextra
="recorder:gui:radio"
2254 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2255 bootoutput
="firmware.mi4"
2256 # toolset is the tools within the tools directory that we build for
2257 # this particular target.
2258 toolset
=$scramblebitmaptools
2259 # architecture, manufacturer and model for the target-tree build
2261 t_manufacturer
="sandisk"
2262 t_model
="sansa-c200"
2267 modelname
="sansam200"
2268 target
="-DSANSA_M200"
2271 tool
="$rootdir/tools/scramble -add=m200"
2272 boottool
="$rootdir/tools/scramble -tcc=crc"
2273 bootoutput
="player.rom"
2274 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2275 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2276 output
="rockbox.m200"
2277 appextra
="recorder:gui:radio"
2280 # toolset is the tools within the tools directory that we build for
2281 # this particular target.
2282 toolset
=$tccbitmaptools
2283 # architecture, manufacturer and model for the target-tree build
2285 t_manufacturer
="tcc77x"
2291 modelname
="sansac100"
2292 target
="-DSANSA_C100"
2295 tool
="$rootdir/tools/scramble -add=c100"
2296 boottool
="$rootdir/tools/scramble -tcc=crc"
2297 bootoutput
="player.rom"
2298 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2299 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2300 output
="rockbox.c100"
2301 appextra
="recorder:gui:radio"
2304 # toolset is the tools within the tools directory that we build for
2305 # this particular target.
2306 toolset
=$tccbitmaptools
2307 # architecture, manufacturer and model for the target-tree build
2309 t_manufacturer
="tcc77x"
2315 modelname
="sansaclip"
2316 target
="-DSANSA_CLIP"
2318 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2319 bmp2rb_native
="$bmp2rb_mono"
2320 tool
="$rootdir/tools/scramble -add=clip"
2321 output
="rockbox.sansa"
2322 bootoutput
="bootloader-clip.sansa"
2323 appextra
="recorder:gui:radio"
2326 toolset
=$scramblebitmaptools
2328 t_manufacturer
="as3525"
2329 t_model
="sansa-clip"
2330 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2332 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2338 modelname
="sansae200v2"
2339 target
="-DSANSA_E200V2"
2341 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2342 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2343 tool
="$rootdir/tools/scramble -add=e2v2"
2344 output
="rockbox.sansa"
2345 bootoutput
="bootloader-e200v2.sansa"
2346 appextra
="recorder:gui:radio"
2349 toolset
=$scramblebitmaptools
2351 t_manufacturer
="as3525"
2352 t_model
="sansa-e200v2"
2359 modelname
="sansam200v4"
2360 target
="-DSANSA_M200V4"
2362 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2363 bmp2rb_native
="$bmp2rb_mono"
2364 tool
="$rootdir/tools/scramble -add=m2v4"
2365 output
="rockbox.sansa"
2366 bootoutput
="bootloader-m200v4.sansa"
2367 appextra
="recorder:gui:radio"
2370 toolset
=$scramblebitmaptools
2372 t_manufacturer
="as3525"
2373 t_model
="sansa-m200v4"
2374 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2376 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2382 modelname
="sansafuze"
2383 target
="-DSANSA_FUZE"
2385 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2386 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2387 tool
="$rootdir/tools/scramble -add=fuze"
2388 output
="rockbox.sansa"
2389 bootoutput
="bootloader-fuze.sansa"
2390 appextra
="recorder:gui:radio"
2393 toolset
=$scramblebitmaptools
2395 t_manufacturer
="as3525"
2396 t_model
="sansa-fuze"
2403 modelname
="sansac200v2"
2404 target
="-DSANSA_C200V2"
2405 memory
=2 # as per OF diagnosis mode
2406 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2407 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2408 tool
="$rootdir/tools/scramble -add=c2v2"
2409 output
="rockbox.sansa"
2410 bootoutput
="bootloader-c200v2.sansa"
2411 appextra
="recorder:gui:radio"
2414 # toolset is the tools within the tools directory that we build for
2415 # this particular target.
2416 toolset
=$scramblebitmaptools
2417 # architecture, manufacturer and model for the target-tree build
2419 t_manufacturer
="as3525"
2420 t_model
="sansa-c200v2"
2421 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2423 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2428 modelname
="sansaclipv2"
2429 target
="-DSANSA_CLIPV2"
2431 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2432 bmp2rb_native
="$bmp2rb_mono"
2433 tool
="$rootdir/tools/scramble -add=clv2"
2434 output
="rockbox.sansa"
2435 bootoutput
="bootloader-clipv2.sansa"
2436 appextra
="recorder:gui:radio"
2439 toolset
=$scramblebitmaptools
2441 t_manufacturer
="as3525"
2442 t_model
="sansa-clipv2"
2447 echo "Sansa View is not yet supported!"
2450 modelname
="sansaview"
2451 target
="-DSANSA_VIEW"
2454 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2455 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2456 output
="rockbox.mi4"
2460 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2461 bootoutput
="firmware.mi4"
2462 # toolset is the tools within the tools directory that we build for
2463 # this particular target.
2464 toolset
=$scramblebitmaptools
2466 t_manufacturer
="sandisk"
2467 t_model
="sansa-view"
2472 modelname
="sansaclipplus"
2473 target
="-DSANSA_CLIPPLUS"
2475 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2476 bmp2rb_native
="$bmp2rb_mono"
2477 tool
="$rootdir/tools/scramble -add=cli+"
2478 output
="rockbox.sansa"
2479 bootoutput
="bootloader-clipplus.sansa"
2480 appextra
="recorder:gui:radio"
2483 toolset
=$scramblebitmaptools
2485 t_manufacturer
="as3525"
2486 t_model
="sansa-clipplus"
2492 modelname
="sansafuzev2"
2493 target
="-DSANSA_FUZEV2"
2495 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2496 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2497 tool
="$rootdir/tools/scramble -add=fuz2"
2498 output
="rockbox.sansa"
2499 bootoutput
="bootloader-fuzev2.sansa"
2500 appextra
="recorder:gui:radio"
2503 toolset
=$scramblebitmaptools
2505 t_manufacturer
="as3525"
2506 t_model
="sansa-fuzev2"
2512 modelname
="sansafuzeplus"
2513 target
="-DSANSA_FUZEPLUS"
2515 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2516 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2517 tool
="$rootdir/tools/scramble -add=fuz+"
2518 output
="rockbox.sansa"
2521 appextra
="gui:recorder:radio"
2524 toolset
=$scramblebitmaptools
2526 t_manufacturer
="imx233"
2527 t_model
="sansa-fuzeplus"
2533 modelname
="tatungtpj1022"
2534 target
="-DTATUNG_TPJ1022"
2537 tool
="$rootdir/tools/scramble -add tpj2"
2538 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2539 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2540 output
="rockbox.elio"
2541 appextra
="recorder:gui:radio"
2544 boottool
="$rootdir/tools/scramble -mi4v2"
2545 bootoutput
="pp5020.mi4"
2546 # toolset is the tools within the tools directory that we build for
2547 # this particular target.
2548 toolset
=$scramblebitmaptools
2549 # architecture, manufacturer and model for the target-tree build
2551 t_manufacturer
="tatung"
2557 modelname
="gogearsa9200"
2558 target
="-DPHILIPS_SA9200"
2559 memory
=32 # supposedly
2561 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2562 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2563 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2564 output
="rockbox.mi4"
2565 appextra
="recorder:gui:radio"
2568 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2569 bootoutput
="FWImage.ebn"
2570 # toolset is the tools within the tools directory that we build for
2571 # this particular target.
2572 toolset
=$scramblebitmaptools
2573 # architecture, manufacturer and model for the target-tree build
2575 t_manufacturer
="philips"
2581 modelname
="gogearhdd1630"
2582 target
="-DPHILIPS_HDD1630"
2583 memory
=32 # supposedly
2585 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2586 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2587 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2588 output
="rockbox.mi4"
2589 appextra
="recorder:gui:radio"
2592 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2593 bootoutput
="FWImage.ebn"
2594 # toolset is the tools within the tools directory that we build for
2595 # this particular target.
2596 toolset
=$scramblebitmaptools
2597 # architecture, manufacturer and model for the target-tree build
2599 t_manufacturer
="philips"
2605 modelname
="gogearhdd6330"
2606 target
="-DPHILIPS_HDD6330"
2609 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2610 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2611 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2612 output
="rockbox.mi4"
2613 appextra
="recorder:gui:radio"
2616 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2617 bootoutput
="FWImage.ebn"
2618 # toolset is the tools within the tools directory that we build for
2619 # this particular target.
2620 toolset
=$scramblebitmaptools
2621 # architecture, manufacturer and model for the target-tree build
2623 t_manufacturer
="philips"
2629 modelname
="meizum6sl"
2630 target
="-DMEIZU_M6SL"
2634 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2635 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2636 output
="rockbox.meizu"
2637 appextra
="recorder:gui:radio"
2640 toolset
=$genericbitmaptools
2642 bootoutput
="rockboot.ebn"
2643 # architecture, manufacturer and model for the target-tree build
2645 t_manufacturer
="s5l8700"
2646 t_model
="meizu-m6sl"
2651 modelname
="meizum6sp"
2652 target
="-DMEIZU_M6SP"
2656 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2657 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2658 output
="rockbox.meizu"
2659 appextra
="recorder:gui:radio"
2662 toolset
=$genericbitmaptools
2664 bootoutput
="rockboot.ebn"
2665 # architecture, manufacturer and model for the target-tree build
2667 t_manufacturer
="s5l8700"
2668 t_model
="meizu-m6sp"
2678 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2679 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2680 output
="rockbox.meizu"
2681 appextra
="recorder:gui:radio"
2684 toolset
=$genericbitmaptools
2686 bootoutput
="rockboot.ebn"
2687 # architecture, manufacturer and model for the target-tree build
2689 t_manufacturer
="s5l8700"
2695 modelname
="ondavx747"
2696 target
="-DONDA_VX747"
2699 tool
="$rootdir/tools/scramble -add=x747"
2700 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2701 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2702 output
="rockbox.vx747"
2703 appextra
="recorder:gui:radio"
2706 toolset
=$genericbitmaptools
2707 boottool
="$rootdir/tools/scramble -ccpmp"
2708 bootoutput
="ccpmp.bin"
2709 # architecture, manufacturer and model for the target-tree build
2711 t_manufacturer
="ingenic_jz47xx"
2712 t_model
="onda_vx747"
2717 modelname
="ondavx767"
2718 target
="-DONDA_VX767"
2722 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2723 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2724 output
="rockbox.vx767"
2725 appextra
="recorder:gui:radio"
2728 toolset
=$genericbitmaptools
2729 boottool
="$rootdir/tools/scramble -ccpmp"
2730 bootoutput
="ccpmp.bin"
2731 # architecture, manufacturer and model for the target-tree build
2733 t_manufacturer
="ingenic_jz47xx"
2734 t_model
="onda_vx767"
2739 modelname
="ondavx747p"
2740 target
="-DONDA_VX747P"
2743 tool
="$rootdir/tools/scramble -add=747p"
2744 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2745 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2746 output
="rockbox.vx747p"
2747 appextra
="recorder:gui:radio"
2750 toolset
=$genericbitmaptools
2751 boottool
="$rootdir/tools/scramble -ccpmp"
2752 bootoutput
="ccpmp.bin"
2753 # architecture, manufacturer and model for the target-tree build
2755 t_manufacturer
="ingenic_jz47xx"
2756 t_model
="onda_vx747"
2761 modelname
="ondavx777"
2762 target
="-DONDA_VX777"
2765 tool
="$rootdir/tools/scramble -add=x777"
2766 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2767 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2768 output
="rockbox.vx777"
2769 appextra
="recorder:gui:radio"
2772 toolset
=$genericbitmaptools
2773 boottool
="$rootdir/tools/scramble -ccpmp"
2774 bootoutput
="ccpmp.bin"
2775 # architecture, manufacturer and model for the target-tree build
2777 t_manufacturer
="ingenic_jz47xx"
2778 t_model
="onda_vx747"
2783 modelname
="lyreproto1"
2784 target
="-DLYRE_PROTO1"
2788 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2789 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2790 output
="rockbox.lyre"
2791 appextra
="recorder:gui:radio"
2794 toolset
=$scramblebitmaptools
2796 bootoutput
="bootloader-proto1.lyre"
2797 # architecture, manufacturer and model for the target-tree build
2799 t_manufacturer
="at91sam"
2800 t_model
="lyre_proto1"
2805 modelname
="mini2440"
2809 tool
="$rootdir/tools/scramble -add=m244"
2810 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2811 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2812 output
="rockbox.mini2440"
2813 appextra
="recorder:gui:radio"
2816 toolset
=$scramblebitmaptools
2818 bootoutput
="bootloader-mini2440.lyre"
2819 # architecture, manufacturer and model for the target-tree build
2821 t_manufacturer
="s3c2440"
2827 modelname
="samsungyh820"
2828 target
="-DSAMSUNG_YH820"
2831 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2832 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2833 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2834 output
="rockbox.mi4"
2835 appextra
="recorder:gui:radio"
2838 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2839 bootoutput
="FW_YH820.mi4"
2840 # toolset is the tools within the tools directory that we build for
2841 # this particular target.
2842 toolset
=$scramblebitmaptools
2843 # architecture, manufacturer and model for the target-tree build
2845 t_manufacturer
="samsung"
2851 modelname
="samsungyh920"
2852 target
="-DSAMSUNG_YH920"
2855 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2856 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2857 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2858 output
="rockbox.mi4"
2859 appextra
="recorder:gui:radio"
2862 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2863 bootoutput
="PP5020.mi4"
2864 # toolset is the tools within the tools directory that we build for
2865 # this particular target.
2866 toolset
=$scramblebitmaptools
2867 # architecture, manufacturer and model for the target-tree build
2869 t_manufacturer
="samsung"
2875 modelname
="samsungyh925"
2876 target
="-DSAMSUNG_YH925"
2879 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2880 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2881 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2882 output
="rockbox.mi4"
2883 appextra
="recorder:gui:radio"
2886 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2887 bootoutput
="FW_YH925.mi4"
2888 # toolset is the tools within the tools directory that we build for
2889 # this particular target.
2890 toolset
=$scramblebitmaptools
2891 # architecture, manufacturer and model for the target-tree build
2893 t_manufacturer
="samsung"
2899 modelname
="samsungyps3"
2900 target
="-DSAMSUNG_YPS3"
2904 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2905 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2906 output
="rockbox.yps3"
2907 appextra
="recorder:gui:radio"
2910 toolset
=$genericbitmaptools
2912 bootoutput
="rockboot.ebn"
2913 # architecture, manufacturer and model for the target-tree build
2915 t_manufacturer
="s5l8700"
2922 target
="-DPBELL_VIBE500"
2925 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2926 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2927 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2928 output
="rockbox.mi4"
2929 appextra
="recorder:gui:radio"
2932 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2933 bootoutput
="jukebox.mi4"
2934 # toolset is the tools within the tools directory that we build for
2935 # this particular target.
2936 toolset
=$scramblebitmaptools
2937 # architecture, manufacturer and model for the target-tree build
2939 t_manufacturer
="pbell"
2945 modelname
="mpiohd200"
2946 target
="-DMPIO_HD200"
2949 tool
="$rootdir/tools/scramble -add=hd20"
2950 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2951 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2952 output
="rockbox.mpio"
2953 bootoutput
="bootloader.mpio"
2954 appextra
="recorder:gui:radio"
2957 # toolset is the tools within the tools directory that we build for
2958 # this particular target.
2959 toolset
="$genericbitmaptools"
2960 # architecture, manufacturer and model for the target-tree build
2962 t_manufacturer
="mpio"
2968 modelname
="mpiohd300"
2969 target
="-DMPIO_HD300"
2972 tool
="$rootdir/tools/scramble -add=hd30"
2973 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2974 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2975 output
="rockbox.mpio"
2976 bootoutput
="bootloader.mpio"
2977 appextra
="recorder:gui:radio"
2980 # toolset is the tools within the tools directory that we build for
2981 # this particular target.
2982 toolset
="$genericbitmaptools"
2983 # architecture, manufacturer and model for the target-tree build
2985 t_manufacturer
="mpio"
2991 modelname
="rk27generic"
2992 target
="-DRK27_GENERIC"
2995 tool
="$rootdir/tools/scramble -add=rk27"
2996 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2997 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2998 output
="rockbox.rk27"
2999 bootoutput
="bootloader.rk27"
3000 appextra
="recorder:gui:radio"
3003 # toolset is the tools within the tools directory that we build for
3004 # this particular target.
3005 toolset
="$genericbitmaptools"
3006 # architecture, manufacturer and model for the target-tree build
3008 t_manufacturer
="rk27xx"
3009 t_model
="rk27generic"
3024 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3025 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3027 bootoutput
="rockbox"
3028 appextra
="recorder:gui:radio"
3031 # architecture, manufacturer and model for the target-tree build
3033 t_manufacturer
="sdl"
3044 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3045 bindir
="/data/data/org.rockbox/lib"
3046 libdir
="/data/data/org.rockbox/app_rockbox"
3052 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3053 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3054 output
="librockbox.so"
3055 bootoutput
="librockbox.so"
3056 appextra
="recorder:gui:radio:hosted/android"
3059 # architecture, manufacturer and model for the target-tree build
3061 t_manufacturer
="android"
3068 modelname
="nokian8xx"
3070 target
="-DNOKIAN8XX"
3071 sharedir
="/opt/rockbox/share/rockbox"
3072 bindir
="/opt/rockbox/bin"
3073 libdir
="/opt/rockbox/lib"
3079 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3080 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3082 bootoutput
="rockbox"
3083 appextra
="recorder:gui:radio"
3086 # architecture, manufacturer and model for the target-tree build
3088 t_manufacturer
="maemo"
3095 modelname
="nokian900"
3097 target
="-DNOKIAN900"
3098 sharedir
="/opt/rockbox/share/rockbox"
3099 bindir
="/opt/rockbox/bin"
3100 libdir
="/opt/rockbox/lib"
3106 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3107 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3109 bootoutput
="rockbox"
3110 appextra
="recorder:gui:radio"
3113 # architecture, manufacturer and model for the target-tree build
3115 t_manufacturer
="maemo"
3125 sharedir
="rockbox/share/rockbox"
3126 bindir
="rockbox/bin"
3127 libdir
="rockbox/lib"
3133 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3134 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3136 bootoutput
="rockbox"
3137 appextra
="recorder:gui:radio"
3140 # architecture, manufacturer and model for the target-tree build
3142 t_manufacturer
="pandora"
3147 echo "Please select a supported target platform!"
3153 echo "Platform set to $modelname"
3157 ############################################################################
3158 # Amount of memory, for those that can differ. They have $memory unset at
3162 if [ -z "$memory" ]; then
3165 if [ "$ARG_RAM" ]; then
3168 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3181 if [ "$ARG_RAM" ]; then
3184 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3197 echo "Memory size selected: $memory MB"
3198 [ "$ARG_TYPE" ] ||
echo ""
3202 ##################################################################
3203 # Figure out build "type"
3206 # the ifp7x0 is the only platform that supports building a gdb stub like
3210 gdbstub
=", (G)DB stub"
3212 sansae200r|sansae200
)
3213 gdbstub
=", (I)nstaller"
3216 gdbstub
=", (E)raser"
3221 if [ "$ARG_TYPE" ]; then
3224 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool$gdbstub: (Defaults to N)"
3230 appsdir
='\$(ROOTDIR)/bootloader'
3232 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3234 echo "e200R-installer build selected"
3237 appsdir
='\$(ROOTDIR)/bootloader'
3239 echo "C2(4)0 or C2(5)0"
3243 extradefines
="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
3244 echo "c240 eraser build selected"
3247 extradefines
="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
3248 echo "c240 eraser build selected"
3252 echo "c200 eraser build selected"
3255 if test $t_manufacturer = "archos"; then
3256 # Archos SH-based players do this somewhat differently for
3258 appsdir
='\$(ROOTDIR)/flash/bootbox'
3261 appsdir
='\$(ROOTDIR)/bootloader'
3264 if test -n "$boottool"; then
3267 if test -n "$bootoutput"; then
3271 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3273 echo "Bootloader build selected"
3276 if [ "$modelname" = "sansae200r" ]; then
3277 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3282 extradefines
="$extradefines -DSIMULATOR"
3285 echo "Simulator build selected"
3288 echo "Advanced build selected"
3289 whichadvanced
$btype
3292 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3293 appsdir
='\$(ROOTDIR)/gdb'
3302 echo "GDB stub build selected"
3310 extradefines
="$extradefines -DDEBUG"
3311 appsdir
='\$(ROOTDIR)/tools/checkwps';
3312 output
='checkwps.'${modelname};
3314 echo "CheckWPS build selected"
3322 appsdir
='\$(ROOTDIR)/tools/database';
3327 output
="database_${modelname}.exe"
3330 output
='database.'${modelname};
3334 echo "Database tool build selected"
3337 if [ "$modelname" = "sansae200r" ]; then
3338 echo "Do not use the e200R target for regular builds. Use e200 instead."
3342 btype
="N" # set it explicitly since RET only gets here as well
3343 echo "Normal build selected"
3347 # to be able running "make manual" from non-manual configuration
3350 manualdev
="archosfmrecorder"
3353 manualdev
="iriverh100"
3356 manualdev
="ipodmini1g"
3359 manualdev
=$modelname
3363 if [ -z "$debug" ]; then
3364 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3367 if [ "yes" = "$application" ]; then
3368 echo Building Rockbox as an Application
3369 extradefines
="$extradefines -DAPPLICATION"
3372 echo "Using source code root directory: $rootdir"
3374 # this was once possible to change at build-time, but no more:
3379 if [ "yes" = "$simulator" ]; then
3380 # setup compiler and things for simulator
3383 if [ -d "simdisk" ]; then
3384 echo "Subdirectory 'simdisk' already present"
3387 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3391 # Now, figure out version number of the (gcc) compiler we are about to use
3392 gccver
=`$CC -dumpversion`;
3394 # figure out the binutil version too and display it, mostly for the build
3395 # system etc to be able to see it easier
3396 if [ $uname = "Darwin" ]; then
3397 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3399 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3402 if [ -z "$gccver" ]; then
3403 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3404 echo "[WARNING] this may cause your build to fail since we cannot do the"
3405 echo "[WARNING] checks we want now."
3408 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3411 num1
=`echo $gccver | cut -d . -f1`
3412 num2
=`echo $gccver | cut -d . -f2`
3413 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3420 echo "Using $CC $gccver ($gccnum)"
3422 if test "$gccnum" -ge "400"; then
3423 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3424 # so we ignore that warnings for now
3426 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3429 if test "$gccnum" -ge "402"; then
3430 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3431 # and later would throw it for several valid cases
3432 GCCOPTS
="$GCCOPTS -Wno-override-init"
3436 ""|
"$CROSS_COMPILE")
3440 # cross-compile for win32
3443 # Verify that the cross-compiler is of a recommended version!
3444 if test "$gccver" != "$gccchoice"; then
3445 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3446 echo "WARNING: version $gccchoice!"
3447 echo "WARNING: This may cause your build to fail since it may be a version"
3448 echo "WARNING: that isn't functional or known to not be the best choice."
3449 echo "WARNING: If you suffer from build problems, you know that this is"
3450 echo "WARNING: a likely source for them..."
3458 echo "Using $LD $ldver"
3460 # check the compiler for SH platforms
3461 if test "$CC" = "sh-elf-gcc"; then
3462 if test "$gccnum" -lt "400"; then
3463 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3464 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3466 # figure out patch status
3467 gccpatch
=`$CC --version`;
3469 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3470 echo "gcc $gccver is rockbox patched"
3471 # then convert -O to -Os to get smaller binaries!
3472 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3474 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3475 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3480 if test "$CC" = "m68k-elf-gcc"; then
3481 # convert -O to -Os to get smaller binaries!
3482 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3485 if [ "$ARG_CCACHE" = "1" ]; then
3486 echo "Enable ccache for building"
3488 elif [ "$ARG_CCACHE" != "0" ]; then
3489 ccache
=`findtool ccache`
3490 if test -n "$ccache"; then
3491 echo "Found and uses ccache ($ccache)"
3495 # figure out the full path to the various commands if possible
3496 HOSTCC
=`findtool gcc --lit`
3497 HOSTAR
=`findtool ar --lit`
3498 CC
=`findtool ${CC} --lit`
3499 LD
=`findtool ${AR} --lit`
3500 AR
=`findtool ${AR} --lit`
3501 AS
=`findtool ${AS} --lit`
3502 OC
=`findtool ${OC} --lit`
3503 WINDRES
=`findtool ${WINDRES} --lit`
3504 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3505 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3506 RANLIB
=`findtool ${RANLIB} --lit`
3508 if test -n "$ccache"; then
3512 if test "$ARG_ARM_THUMB" = "1"; then
3513 extradefines
="$extradefines -DUSE_THUMB"
3514 CC
="$toolsdir/thumb-cc.py $CC"
3517 if test "X$endian" = "Xbig"; then
3518 defendian
="ROCKBOX_BIG_ENDIAN"
3520 defendian
="ROCKBOX_LITTLE_ENDIAN"
3523 if [ "$ARG_RBDIR" != "" ]; then
3524 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3529 echo "Using alternate rockbox dir: ${rbdir}"
3533 -e "s<@ENDIAN@<${defendian}<g" \
3534 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3535 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3536 -e "s<@config_rtc@<$config_rtc<g" \
3537 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3538 -e "s<@thread_support@<$thread_support<g" \
3539 -e "s<@RBDIR@<${rbdir}<g" \
3540 -e "s<@sharepath@<${sharedir}<g" \
3541 -e "s<@binpath@<${bindir}<g" \
3542 -e "s<@libpath@<${libdir}<g" \
3543 -e "s<@have_backlight@<$have_backlight<g" \
3544 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3545 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3546 -e "s<@lcd_width@<$app_lcd_width<g" \
3547 -e "s<@lcd_height@<$app_lcd_height<g" \
3549 /* This header was made by configure */
3550 #ifndef __BUILD_AUTOCONF_H
3551 #define __BUILD_AUTOCONF_H
3553 /* Define endianess for the target or simulator platform */
3556 /* Define this if you build rockbox to support the logf logging and display */
3557 #undef ROCKBOX_HAS_LOGF
3559 /* Define this to record a chart with timings for the stages of boot */
3562 /* optional define for a backlight modded Ondio */
3565 /* optional define for FM radio mod for iAudio M5 */
3568 /* optional define for ATA poweroff on Player */
3571 /* optional defines for RTC mod for h1x0 */
3575 /* the threading backend we use */
3576 #define @thread_support@
3578 /* lcd dimensions for application builds from configure */
3582 /* root of Rockbox */
3583 #define ROCKBOX_DIR "@RBDIR@"
3584 #define ROCKBOX_SHARE_PATH "@sharepath@"
3585 #define ROCKBOX_BINARY_PATH "@binpath@"
3586 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3588 #endif /* __BUILD_AUTOCONF_H */
3591 if test -n "$t_cpu"; then
3592 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3594 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3595 # Maemo needs the SDL port, too
3596 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3597 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3598 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3599 # Pandora needs the SDL port, too
3600 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3601 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3602 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3603 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3604 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3607 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3608 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3612 if test "$simulator" = "yes"; then
3613 # add simul make stuff on the #SIMUL# line
3614 simmagic1
="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3615 simmagic2
="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3617 # delete the lines that match
3618 simmagic1
='/@SIMUL1@/D'
3619 simmagic2
='/@SIMUL2@/D'
3622 if test "$swcodec" = "yes"; then
3623 voicetoolset
="rbspeexenc voicefont wavtrim"
3625 voicetoolset
="voicefont wavtrim"
3628 if test "$apps" = "apps"; then
3629 # only when we build "real" apps we build the .lng files
3633 #### Fix the cmdline ###
3634 if [ -n "$ARG_PREFIX" ]; then
3635 cmdline
="$cmdline --prefix=\$(PREFIX)"
3637 if [ -n "$ARG_LCDWIDTH" ]; then
3638 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3641 # remove parts from the cmdline we're going to set unconditionally
3642 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z0-9]\*,,g \
3643 -e s,--ram=[0-9]\*,,g \
3644 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3645 -e s,--type=[a-zA-Z]\*,,g`
3646 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3651 -e "s<@ROOTDIR@<${rootdir}<g" \
3652 -e "s<@DEBUG@<${debug}<g" \
3653 -e "s<@MEMORY@<${memory}<g" \
3654 -e "s<@TARGET_ID@<${target_id}<g" \
3655 -e "s<@TARGET@<${target}<g" \
3656 -e "s<@CPU@<${t_cpu}<g" \
3657 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3658 -e "s<@MODELNAME@<${modelname}<g" \
3659 -e "s<@LANGUAGE@<${language}<g" \
3660 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3661 -e "s<@PWD@<${pwd}<g" \
3662 -e "s<@HOSTCC@<${HOSTCC}<g" \
3663 -e "s<@HOSTAR@<${HOSTAR}<g" \
3664 -e "s<@CC@<${CC}<g" \
3665 -e "s<@LD@<${LD}<g" \
3666 -e "s<@AR@<${AR}<g" \
3667 -e "s<@AS@<${AS}<g" \
3668 -e "s<@OC@<${OC}<g" \
3669 -e "s<@WINDRES@<${WINDRES}<g" \
3670 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3671 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3672 -e "s<@RANLIB@<${RANLIB}<g" \
3673 -e "s<@TOOL@<${tool}<g" \
3674 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3675 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3676 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3677 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3678 -e "s<@OUTPUT@<${output}<g" \
3679 -e "s<@APPEXTRA@<${appextra}<g" \
3680 -e "s<@ARCHOSROM@<${archosrom}<g" \
3681 -e "s<@FLASHFILE@<${flash}<g" \
3682 -e "s<@PLUGINS@<${plugins}<g" \
3683 -e "s<@CODECS@<${swcodec}<g" \
3684 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3685 -e "s<@SHARED_LDFLAG@<${SHARED_LDFLAG}<g" \
3686 -e "s<@SHARED_CFLAGS@<${SHARED_CFLAGS}<g" \
3687 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3688 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3689 -e "s<@LDOPTS@<${LDOPTS}<g" \
3690 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3691 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3692 -e "s<@EXTRADEF@<${extradefines}<g" \
3693 -e "s<@APPSDIR@<${appsdir}<g" \
3694 -e "s<@FIRMDIR@<${firmdir}<g" \
3695 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3696 -e "s<@APPS@<${apps}<g" \
3697 -e "s<@APP_TYPE@<${app_type}<g" \
3698 -e "s<@APPLICATION@<${application}<g" \
3699 -e "s<@GCCVER@<${gccver}<g" \
3700 -e "s<@GCCNUM@<${gccnum}<g" \
3701 -e "s<@UNAME@<${uname}<g" \
3702 -e "s<@ENDIAN@<${defendian}<g" \
3703 -e "s<@TOOLSET@<${toolset}<g" \
3706 -e "s<@MANUALDEV@<${manualdev}<g" \
3707 -e "s<@ENCODER@<${ENC_CMD}<g" \
3708 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3709 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3710 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3711 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3712 -e "s<@LANGS@<${buildlangs}<g" \
3713 -e "s<@USE_ELF@<${USE_ELF}<g" \
3714 -e "s<@RBDIR@<${rbdir}<g" \
3715 -e "s<@sharepath@<${sharedir}<g" \
3716 -e "s<@binpath@<${bindir}<g" \
3717 -e "s<@libpath@<${libdir}<g" \
3718 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3719 -e "s<@CMDLINE@<$cmdline<g" \
3720 -e "s<@SDLCONFIG@<$sdl<g" \
3721 -e "s<@LCDORIENTATION@<$lcd_orientation<g" \
3723 ## Automatically generated. http://www.rockbox.org/
3725 export ROOTDIR=@ROOTDIR@
3726 export FIRMDIR=@FIRMDIR@
3727 export APPSDIR=@APPSDIR@
3728 export TOOLSDIR=@TOOLSDIR@
3729 export DOCSDIR=\$(ROOTDIR)/docs
3730 export MANUALDIR=\${ROOTDIR}/manual
3731 export DEBUG=@DEBUG@
3732 export MODELNAME=@MODELNAME@
3733 export ARCHOSROM=@ARCHOSROM@
3734 export FLASHFILE=@FLASHFILE@
3735 export TARGET_ID=@TARGET_ID@
3736 export TARGET=@TARGET@
3738 export MANUFACTURER=@MANUFACTURER@
3740 export BUILDDIR=@PWD@
3741 export LANGUAGE=@LANGUAGE@
3742 export VOICELANGUAGE=@VOICELANGUAGE@
3743 export MEMORYSIZE=@MEMORY@
3744 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3745 export MKFIRMWARE=@TOOL@
3746 export BMP2RB_MONO=@BMP2RB_MONO@
3747 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3748 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3749 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3750 export BINARY=@OUTPUT@
3751 export APPEXTRA=@APPEXTRA@
3752 export ENABLEDPLUGINS=@PLUGINS@
3753 export SOFTWARECODECS=@CODECS@
3754 export EXTRA_DEFINES=@EXTRADEF@
3755 export HOSTCC=@HOSTCC@
3756 export HOSTAR=@HOSTAR@
3762 export WINDRES=@WINDRES@
3763 export DLLTOOL=@DLLTOOL@
3764 export DLLWRAP=@DLLWRAP@
3765 export RANLIB=@RANLIB@
3766 export PREFIX=@PREFIX@
3767 export PROFILE_OPTS=@PROFILE_OPTS@
3768 export APP_TYPE=@APP_TYPE@
3769 export APPLICATION=@APPLICATION@
3770 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3771 export GCCOPTS=@GCCOPTS@
3772 export TARGET_INC=@TARGET_INC@
3773 export LOADADDRESS=@LOADADDRESS@
3774 export SHARED_LDFLAG=@SHARED_LDFLAG@
3775 export SHARED_CFLAGS=@SHARED_CFLAGS@
3776 export LDOPTS=@LDOPTS@
3777 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3778 export GCCVER=@GCCVER@
3779 export GCCNUM=@GCCNUM@
3780 export UNAME=@UNAME@
3781 export MANUALDEV=@MANUALDEV@
3782 export TTS_OPTS=@TTS_OPTS@
3783 export TTS_ENGINE=@TTS_ENGINE@
3784 export ENC_OPTS=@ENC_OPTS@
3785 export ENCODER=@ENCODER@
3786 export USE_ELF=@USE_ELF@
3787 export RBDIR=@RBDIR@
3788 export ROCKBOX_SHARE_PATH=@sharepath@
3789 export ROCKBOX_BINARY_PATH=@binpath@
3790 export ROCKBOX_LIBRARY_PATH=@libpath@
3791 export SDLCONFIG=@SDLCONFIG@
3792 export LCDORIENTATION=@LCDORIENTATION@
3794 CONFIGURE_OPTIONS=@CMDLINE@
3796 include \$(TOOLSDIR)/root.make
3800 echo "Created Makefile"