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-5/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-5/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
991 ENC_OPTS
="-q 4 -c 10"
993 if [ -n "`findtool lame`" ]; then
995 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
997 echo "You need LAME in the system path to build voice files for"
998 echo "HWCODEC targets."
1003 echo "Using $ENCODER for encoding voice clips"
1005 # Read custom encoder options from command line
1006 if [ "$ARG_ENCOPTS" ]; then
1007 ENC_OPTS
="$ARG_ENCOPTS"
1008 advopts
="$advopts --encopts='$ENC_OPTS'"
1009 echo "$ENCODER options set to $ENC_OPTS"
1013 if [ -n "`findtool cygpath`" ]; then
1014 TEMPDIR
=`cygpath . -a -w`
1019 # figure out which languages that are around
1020 for file in $rootdir/apps
/lang
/*.lang
; do
1021 clean
=`basename $file .lang`
1022 langs
="$langs $clean"
1025 if [ "$ARG_LANG" ]; then
1028 echo "Select a number for the language to use (default is english)"
1029 # FIXME The multiple-language feature is currently broken
1030 # echo "You may enter a comma-separated list of languages to build"
1033 for one
in $langs; do
1039 advopts
="$advopts --language=$pick"
1044 # Allow the user to pass a comma-separated list of langauges
1045 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1047 for one
in $langs; do
1048 # Accept both the language number and name
1049 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1050 if [ "$output" = "" ]; then
1059 if [ -z "$output" ]; then
1067 echo "Rockbox configure script."
1068 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1069 echo "Do *NOT* run this within the tools directory!"
1072 Usage: configure [OPTION]...
1074 --target=TARGET Sets the target, TARGET can be either the target ID or
1075 corresponding string. Run without this option to see all
1078 --ram=RAM Sets the RAM for certain targets. Even though any number
1079 is accepted, not every number is correct. The default
1080 value will be applied, if you entered a wrong number
1081 (which depends on the target). Watch the output. Run
1082 without this option if you are not sure which the right
1085 --type=TYPE Sets the build type. Shortcuts are also valid.
1086 Run without this option to see all available types.
1087 Multiple values are allowed and managed in the input
1088 order. So --type=b stands for Bootloader build, while
1089 --type=ab stands for "Backlight MOD" build.
1091 --lcdwidth=X Sets the width of the LCD. Used only for application
1094 --lcdheight=Y Sets the height of the LCD. Used only for application
1097 --language=LANG Set the language used for voice generation (used only if
1100 --tts=ENGINE Set the TTS engine used for voice generation (used only
1103 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1106 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1108 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1110 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1111 This is useful for having multiple alternate builds on
1112 your device that you can load with ROLO. However as the
1113 bootloader looks for .rockbox you won't be able to boot
1116 --ccache Enable ccache use (done by default these days)
1117 --no-ccache Disable ccache use
1119 --eabi Make configure prefer toolchains that are able to compile
1120 for the new ARM standard abi EABI
1121 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1122 --thumb Build with -mthumb (for ARM builds)
1123 --no-thumb The opposite of --thumb (don't use thumb even for targets
1124 where this is the default
1125 --sdl-threads Force use of SDL threads. They have inferior performance,
1126 but are better debuggable with GDB
1127 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1128 behavior of falling back to them if no native thread
1130 --prefix Target installation directory
1131 --help Shows this message (must not be used with other options)
1150 ARG_PREFIX
="$PREFIX"
1155 --ccache) ARG_CCACHE
=1;;
1156 --no-ccache) ARG_CCACHE
=0;;
1157 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1158 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1159 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1160 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1161 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1162 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1163 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1164 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1165 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1166 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1167 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1168 --eabi) ARG_ARM_EABI
=1;;
1169 --no-eabi) ARG_ARM_EABI
=0;;
1170 --thumb) ARG_ARM_THUMB
=1;;
1171 --no-thumb) ARG_ARM_THUMB
=0;;
1172 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1174 ARG_THREAD_SUPPORT
=0;;
1175 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1177 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1180 [ "$err" ] && exit 1
1184 if [ "$TMPDIR" != "" ]; then
1189 echo Using temporary directory
$tmpdir
1191 if test -r "configure"; then
1192 # this is a check for a configure script in the current directory, it there
1193 # is one, try to figure out if it is this one!
1195 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1196 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1197 echo "It will only cause you pain and grief. Instead do this:"
1200 echo " mkdir build-dir"
1201 echo " cd build-dir"
1202 echo " ../tools/configure"
1204 echo "Much happiness will arise from this. Enjoy"
1209 # get our current directory
1212 if { echo $pwd |
grep " "; } then
1213 echo "You're running this script in a path that contains space. The build"
1214 echo "system is unfortunately not clever enough to deal with this. Please"
1215 echo "run the script from a different path, rename the path or fix the build"
1220 if [ -z "$rootdir" ]; then
1221 ##################################################################
1222 # Figure out where the source code root is!
1224 rootdir
=`dirname $0`/..
/
1226 #####################################################################
1227 # Convert the possibly relative directory name to an absolute version
1233 # cd back to the build dir
1238 appsdir
='$(ROOTDIR)/apps'
1239 toolsdir
='$(ROOTDIR)/tools'
1242 ##################################################################
1243 # Figure out target platform
1246 if [ "$ARG_TARGET" ]; then
1247 buildfor
=$ARG_TARGET
1249 echo "Enter target platform:"
1251 ==Archos== ==iriver== ==Apple iPod==
1252 0) Player/Studio 10) H120/H140 20) Color/Photo
1253 1) Recorder 11) H320/H340 21) Nano 1G
1254 2) FM Recorder 12) iHP-100/110/115 22) Video
1255 3) Recorder v2 13) iFP-790 23) 3G
1256 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1257 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1258 6) AV300 26) Mini 2G
1259 ==Toshiba== 27) 1G, 2G
1260 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1261 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1263 32) 7 ==Olympus= ==SanDisk==
1264 33) D2 70) M:Robe 500 50) Sansa e200
1265 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1267 ==Creative== ==Philips== 53) Sansa m200
1268 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1269 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1270 92) Zen Vision HDD1830 56) Sansa e200v2
1271 102) GoGear HDD6330 57) Sansa m200v4
1272 ==Onda== 58) Sansa Fuze
1273 120) VX747 ==Meizu== 59) Sansa c200v2
1274 121) VX767 110) M6SL 60) Sansa Clipv2
1275 122) VX747+ 111) M6SP 61) Sansa View
1276 123) VX777 112) M3 62) Sansa Clip+
1278 ==Samsung== ==Tatung== 64) Sansa Fuze+
1279 140) YH-820 150) Elio TPJ-1022
1280 141) YH-920 ==Logik==
1281 142) YH-925 ==Packard Bell== 80) DAX 1GB MP3/DAB
1282 143) YP-S3 160) Vibe 500
1284 ==Application== ==MPIO== 130) Lyre proto 1
1285 200) SDL 170) HD200 131) Mini2440
1286 201) Android 171) HD300
1288 203) Nokia N900 ==ROCKCHIP==
1289 204) Pandora 180) rk27xx generic
1296 # Set of tools built for all target platforms:
1297 toolset
="rdf2binary convbdf codepages"
1299 # Toolsets for some target families:
1300 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1301 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1302 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1303 ipodbitmaptools
="$toolset scramble bmp2rb"
1304 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1305 tccbitmaptools
="$toolset scramble bmp2rb"
1306 # generic is used by IFP, Meizu and Onda
1307 genericbitmaptools
="$toolset bmp2rb"
1308 # scramble is used by all other targets
1309 scramblebitmaptools
="$genericbitmaptools scramble"
1312 # ---- For each target ----
1315 # target_id: a unique number identifying this target, IS NOT the menu number.
1316 # Just use the currently highest number+1 when you add a new
1318 # modelname: short model name used all over to identify this target
1319 # memory: number of megabytes of RAM this target has. If the amount can
1320 # be selected by the size prompt, let memory be unset here
1321 # target: -Ddefine passed to the build commands to make the correct
1322 # config-*.h file get included etc
1323 # tool: the tool that takes a plain binary and converts that into a
1324 # working "firmware" file for your target
1325 # output: the final output file name
1326 # boottool: the tool that takes a plain binary and generates a bootloader
1327 # file for your target (or blank to use $tool)
1328 # bootoutput:the final output file name for the bootloader (or blank to use
1330 # appextra: passed to the APPEXTRA variable in the Makefiles.
1331 # TODO: add proper explanation
1332 # archosrom: used only for Archos targets that build a special flashable .ucl
1334 # flash: name of output for flashing, for targets where there's a special
1335 # file output for this.
1336 # plugins: set to 'yes' to build the plugins. Early development builds can
1337 # set this to no in the early stages to have an easier life for a
1339 # swcodec: set 'yes' on swcodec targets
1340 # toolset: lists what particular tools in the tools/ directory that this
1341 # target needs to have built prior to building Rockbox
1344 # *cc: sets up gcc and compiler options for your target builds. Note
1345 # that if you select a simulator build, the compiler selection is
1346 # overridden later in the script.
1352 modelname
="archosplayer"
1353 target
="-DARCHOS_PLAYER"
1355 tool
="$rootdir/tools/scramble"
1357 appextra
="player:gui"
1358 archosrom
="$pwd/rombox.ucl"
1359 flash
="$pwd/rockbox.ucl"
1363 # toolset is the tools within the tools directory that we build for
1364 # this particular target.
1365 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1367 # Note: the convbdf is present in the toolset just because: 1) the
1368 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1369 # build the player simulator
1372 t_manufacturer
="archos"
1378 modelname
="archosrecorder"
1379 target
="-DARCHOS_RECORDER"
1381 tool
="$rootdir/tools/scramble"
1382 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1383 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1385 appextra
="recorder:gui:radio"
1386 #archosrom="$pwd/rombox.ucl"
1387 flash
="$pwd/rockbox.ucl"
1390 # toolset is the tools within the tools directory that we build for
1391 # this particular target.
1392 toolset
=$archosbitmaptools
1394 t_manufacturer
="archos"
1400 modelname
="archosfmrecorder"
1401 target
="-DARCHOS_FMRECORDER"
1403 tool
="$rootdir/tools/scramble -fm"
1404 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1405 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1407 appextra
="recorder:gui:radio"
1408 #archosrom="$pwd/rombox.ucl"
1409 flash
="$pwd/rockbox.ucl"
1412 # toolset is the tools within the tools directory that we build for
1413 # this particular target.
1414 toolset
=$archosbitmaptools
1416 t_manufacturer
="archos"
1422 modelname
="archosrecorderv2"
1423 target
="-DARCHOS_RECORDERV2"
1425 tool
="$rootdir/tools/scramble -v2"
1426 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1427 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1429 appextra
="recorder:gui:radio"
1430 #archosrom="$pwd/rombox.ucl"
1431 flash
="$pwd/rockbox.ucl"
1434 # toolset is the tools within the tools directory that we build for
1435 # this particular target.
1436 toolset
=$archosbitmaptools
1438 t_manufacturer
="archos"
1444 modelname
="archosondiosp"
1445 target
="-DARCHOS_ONDIOSP"
1447 tool
="$rootdir/tools/scramble -osp"
1448 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1449 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1451 appextra
="recorder:gui:radio"
1452 #archosrom="$pwd/rombox.ucl"
1453 flash
="$pwd/rockbox.ucl"
1456 # toolset is the tools within the tools directory that we build for
1457 # this particular target.
1458 toolset
=$archosbitmaptools
1460 t_manufacturer
="archos"
1466 modelname
="archosondiofm"
1467 target
="-DARCHOS_ONDIOFM"
1469 tool
="$rootdir/tools/scramble -ofm"
1470 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1471 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1473 appextra
="recorder:gui:radio"
1474 #archosrom="$pwd/rombox.ucl"
1475 flash
="$pwd/rockbox.ucl"
1478 toolset
=$archosbitmaptools
1480 t_manufacturer
="archos"
1486 modelname
="archosav300"
1487 target
="-DARCHOS_AV300"
1490 tool
="$rootdir/tools/scramble -mm=C"
1491 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1492 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1494 appextra
="recorder:gui:radio"
1497 # toolset is the tools within the tools directory that we build for
1498 # this particular target.
1499 toolset
="$toolset scramble descramble bmp2rb"
1500 # architecture, manufacturer and model for the target-tree build
1502 t_manufacturer
="archos"
1508 modelname
="iriverh120"
1509 target
="-DIRIVER_H120"
1512 tool
="$rootdir/tools/scramble -add=h120"
1513 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1514 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1515 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1516 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1517 output
="rockbox.iriver"
1518 bootoutput
="bootloader.iriver"
1519 appextra
="recorder:gui:radio"
1520 flash
="$pwd/rombox.iriver"
1523 # toolset is the tools within the tools directory that we build for
1524 # this particular target.
1525 toolset
=$iriverbitmaptools
1527 t_manufacturer
="iriver"
1533 modelname
="iriverh300"
1534 target
="-DIRIVER_H300"
1537 tool
="$rootdir/tools/scramble -add=h300"
1538 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1539 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1540 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1541 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1542 output
="rockbox.iriver"
1543 appextra
="recorder:gui:radio"
1546 # toolset is the tools within the tools directory that we build for
1547 # this particular target.
1548 toolset
=$iriverbitmaptools
1550 t_manufacturer
="iriver"
1556 modelname
="iriverh100"
1557 target
="-DIRIVER_H100"
1560 tool
="$rootdir/tools/scramble -add=h100"
1561 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1562 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1563 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1564 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1565 output
="rockbox.iriver"
1566 bootoutput
="bootloader.iriver"
1567 appextra
="recorder:gui:radio"
1568 flash
="$pwd/rombox.iriver"
1571 # toolset is the tools within the tools directory that we build for
1572 # this particular target.
1573 toolset
=$iriverbitmaptools
1575 t_manufacturer
="iriver"
1581 modelname
="iriverifp7xx"
1582 target
="-DIRIVER_IFP7XX"
1586 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1587 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1588 output
="rockbox.wma"
1589 appextra
="recorder:gui:radio"
1592 # toolset is the tools within the tools directory that we build for
1593 # this particular target.
1594 toolset
=$genericbitmaptools
1596 t_manufacturer
="pnx0101"
1597 t_model
="iriver-ifp7xx"
1602 modelname
="iriverh10"
1603 target
="-DIRIVER_H10"
1606 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1607 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1608 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1609 output
="rockbox.mi4"
1610 appextra
="recorder:gui:radio"
1613 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1614 bootoutput
="H10_20GC.mi4"
1615 # toolset is the tools within the tools directory that we build for
1616 # this particular target.
1617 toolset
=$scramblebitmaptools
1618 # architecture, manufacturer and model for the target-tree build
1620 t_manufacturer
="iriver"
1626 modelname
="iriverh10_5gb"
1627 target
="-DIRIVER_H10_5GB"
1630 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1631 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1632 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1633 output
="rockbox.mi4"
1634 appextra
="recorder:gui:radio"
1637 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1638 bootoutput
="H10.mi4"
1639 # toolset is the tools within the tools directory that we build for
1640 # this particular target.
1641 toolset
=$scramblebitmaptools
1642 # architecture, manufacturer and model for the target-tree build
1644 t_manufacturer
="iriver"
1650 modelname
="ipodcolor"
1651 target
="-DIPOD_COLOR"
1654 tool
="$rootdir/tools/scramble -add=ipco"
1655 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1656 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1657 output
="rockbox.ipod"
1658 appextra
="recorder:gui:radio"
1661 bootoutput
="bootloader-$modelname.ipod"
1662 # toolset is the tools within the tools directory that we build for
1663 # this particular target.
1664 toolset
=$ipodbitmaptools
1665 # architecture, manufacturer and model for the target-tree build
1667 t_manufacturer
="ipod"
1673 modelname
="ipodnano1g"
1674 target
="-DIPOD_NANO"
1677 tool
="$rootdir/tools/scramble -add=nano"
1678 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1679 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1680 output
="rockbox.ipod"
1681 appextra
="recorder:gui:radio"
1684 bootoutput
="bootloader-$modelname.ipod"
1685 # toolset is the tools within the tools directory that we build for
1686 # this particular target.
1687 toolset
=$ipodbitmaptools
1688 # architecture, manufacturer and model for the target-tree build
1690 t_manufacturer
="ipod"
1696 modelname
="ipodvideo"
1697 target
="-DIPOD_VIDEO"
1698 memory
=64 # always. This is reduced at runtime if needed
1700 tool
="$rootdir/tools/scramble -add=ipvd"
1701 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1702 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1703 output
="rockbox.ipod"
1704 appextra
="recorder:gui:radio"
1707 bootoutput
="bootloader-$modelname.ipod"
1708 # toolset is the tools within the tools directory that we build for
1709 # this particular target.
1710 toolset
=$ipodbitmaptools
1711 # architecture, manufacturer and model for the target-tree build
1713 t_manufacturer
="ipod"
1723 tool
="$rootdir/tools/scramble -add=ip3g"
1724 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1725 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1726 output
="rockbox.ipod"
1727 appextra
="recorder:gui:radio"
1730 bootoutput
="bootloader-$modelname.ipod"
1731 # toolset is the tools within the tools directory that we build for
1732 # this particular target.
1733 toolset
=$ipodbitmaptools
1734 # architecture, manufacturer and model for the target-tree build
1736 t_manufacturer
="ipod"
1746 tool
="$rootdir/tools/scramble -add=ip4g"
1747 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1748 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1749 output
="rockbox.ipod"
1750 appextra
="recorder:gui:radio"
1753 bootoutput
="bootloader-$modelname.ipod"
1754 # toolset is the tools within the tools directory that we build for
1755 # this particular target.
1756 toolset
=$ipodbitmaptools
1757 # architecture, manufacturer and model for the target-tree build
1759 t_manufacturer
="ipod"
1765 modelname
="ipodmini1g"
1766 target
="-DIPOD_MINI"
1769 tool
="$rootdir/tools/scramble -add=mini"
1770 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1771 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1772 output
="rockbox.ipod"
1773 appextra
="recorder:gui:radio"
1776 bootoutput
="bootloader-$modelname.ipod"
1777 # toolset is the tools within the tools directory that we build for
1778 # this particular target.
1779 toolset
=$ipodbitmaptools
1780 # architecture, manufacturer and model for the target-tree build
1782 t_manufacturer
="ipod"
1788 modelname
="ipodmini2g"
1789 target
="-DIPOD_MINI2G"
1792 tool
="$rootdir/tools/scramble -add=mn2g"
1793 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1794 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1795 output
="rockbox.ipod"
1796 appextra
="recorder:gui:radio"
1799 bootoutput
="bootloader-$modelname.ipod"
1800 # toolset is the tools within the tools directory that we build for
1801 # this particular target.
1802 toolset
=$ipodbitmaptools
1803 # architecture, manufacturer and model for the target-tree build
1805 t_manufacturer
="ipod"
1811 modelname
="ipod1g2g"
1812 target
="-DIPOD_1G2G"
1815 tool
="$rootdir/tools/scramble -add=1g2g"
1816 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1817 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1818 output
="rockbox.ipod"
1819 appextra
="recorder:gui:radio"
1822 bootoutput
="bootloader-$modelname.ipod"
1823 # toolset is the tools within the tools directory that we build for
1824 # this particular target.
1825 toolset
=$ipodbitmaptools
1826 # architecture, manufacturer and model for the target-tree build
1828 t_manufacturer
="ipod"
1834 modelname
="ipodnano2g"
1835 target
="-DIPOD_NANO2G"
1838 tool
="$rootdir/tools/scramble -add=nn2g"
1839 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1840 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1841 output
="rockbox.ipod"
1842 appextra
="recorder:gui:radio"
1845 bootoutput
="bootloader-$modelname.ipod"
1846 # toolset is the tools within the tools directory that we build for
1847 # this particular target.
1848 toolset
=$ipodbitmaptools
1849 # architecture, manufacturer and model for the target-tree build
1851 t_manufacturer
="s5l8700"
1852 t_model
="ipodnano2g"
1861 tool
="$rootdir/tools/scramble -add=ip6g"
1862 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1863 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1864 output
="rockbox.ipod"
1865 appextra
="recorder:gui:radio"
1868 bootoutput
="bootloader-$modelname.ipod"
1869 # toolset is the tools within the tools directory that we build for
1870 # this particular target.
1871 toolset
=$ipodbitmaptools
1872 # architecture, manufacturer and model for the target-tree build
1874 t_manufacturer
="s5l8702"
1880 modelname
="iaudiox5"
1881 target
="-DIAUDIO_X5"
1884 tool
="$rootdir/tools/scramble -add=iax5"
1885 boottool
="$rootdir/tools/scramble -iaudiox5"
1886 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1887 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1888 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1889 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1890 output
="rockbox.iaudio"
1891 bootoutput
="x5_fw.bin"
1892 appextra
="recorder:gui:radio"
1895 # toolset is the tools within the tools directory that we build for
1896 # this particular target.
1897 toolset
="$iaudiobitmaptools"
1898 # architecture, manufacturer and model for the target-tree build
1900 t_manufacturer
="iaudio"
1906 modelname
="iaudiom5"
1907 target
="-DIAUDIO_M5"
1910 tool
="$rootdir/tools/scramble -add=iam5"
1911 boottool
="$rootdir/tools/scramble -iaudiom5"
1912 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1913 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1914 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1915 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1916 output
="rockbox.iaudio"
1917 bootoutput
="m5_fw.bin"
1918 appextra
="recorder:gui:radio"
1921 # toolset is the tools within the tools directory that we build for
1922 # this particular target.
1923 toolset
="$iaudiobitmaptools"
1924 # architecture, manufacturer and model for the target-tree build
1926 t_manufacturer
="iaudio"
1936 tool
="$rootdir/tools/scramble -add=i7"
1937 boottool
="$rootdir/tools/scramble -tcc=crc"
1938 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1939 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1940 output
="rockbox.iaudio"
1941 appextra
="recorder:gui:radio"
1944 bootoutput
="I7_FW.BIN"
1945 # toolset is the tools within the tools directory that we build for
1946 # this particular target.
1947 toolset
="$tccbitmaptools"
1948 # architecture, manufacturer and model for the target-tree build
1950 t_manufacturer
="tcc77x"
1960 tool
="$rootdir/tools/scramble -add=d2"
1962 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1963 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1965 bootoutput
="bootloader-cowond2.bin"
1966 appextra
="recorder:gui:radio"
1969 toolset
="$tccbitmaptools"
1970 # architecture, manufacturer and model for the target-tree build
1972 t_manufacturer
="tcc780x"
1978 modelname
="iaudiom3"
1979 target
="-DIAUDIO_M3"
1982 tool
="$rootdir/tools/scramble -add=iam3"
1983 boottool
="$rootdir/tools/scramble -iaudiom3"
1984 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1985 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
1986 output
="rockbox.iaudio"
1987 bootoutput
="cowon_m3.bin"
1988 appextra
="recorder:gui:radio"
1991 # toolset is the tools within the tools directory that we build for
1992 # this particular target.
1993 toolset
="$iaudiobitmaptools"
1994 # architecture, manufacturer and model for the target-tree build
1996 t_manufacturer
="iaudio"
2002 modelname
="gigabeatfx"
2003 target
="-DGIGABEAT_F"
2006 tool
="$rootdir/tools/scramble -add=giga"
2007 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2008 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2009 output
="rockbox.gigabeat"
2010 appextra
="recorder:gui:radio"
2013 toolset
=$gigabeatbitmaptools
2014 boottool
="$rootdir/tools/scramble -gigabeat"
2015 bootoutput
="FWIMG01.DAT"
2016 # architecture, manufacturer and model for the target-tree build
2018 t_manufacturer
="s3c2440"
2019 t_model
="gigabeat-fx"
2024 modelname
="gigabeats"
2025 target
="-DGIGABEAT_S"
2028 tool
="$rootdir/tools/scramble -add=gigs"
2029 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2030 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2031 output
="rockbox.gigabeat"
2032 appextra
="recorder:gui:radio"
2035 toolset
="$gigabeatbitmaptools"
2036 boottool
="$rootdir/tools/scramble -gigabeats"
2038 # architecture, manufacturer and model for the target-tree build
2040 t_manufacturer
="imx31"
2041 t_model
="gigabeat-s"
2046 modelname
="mrobe500"
2047 target
="-DMROBE_500"
2050 tool
="$rootdir/tools/scramble -add=m500"
2051 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2052 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2053 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2054 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2055 output
="rockbox.mrobe500"
2056 appextra
="recorder:gui:radio"
2059 toolset
=$gigabeatbitmaptools
2061 bootoutput
="rockbox.mrboot"
2062 # architecture, manufacturer and model for the target-tree build
2064 t_manufacturer
="tms320dm320"
2070 modelname
="mrobe100"
2071 target
="-DMROBE_100"
2074 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2075 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2076 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2077 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2078 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2079 output
="rockbox.mi4"
2080 appextra
="recorder:gui:radio"
2083 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2084 bootoutput
="pp5020.mi4"
2085 # toolset is the tools within the tools directory that we build for
2086 # this particular target.
2087 toolset
=$scramblebitmaptools
2088 # architecture, manufacturer and model for the target-tree build
2090 t_manufacturer
="olympus"
2096 modelname
="logikdax"
2097 target
="-DLOGIK_DAX"
2100 tool
="$rootdir/tools/scramble -add=ldax"
2101 boottool
="$rootdir/tools/scramble -tcc=crc"
2102 bootoutput
="player.rom"
2103 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2104 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2105 output
="rockbox.logik"
2106 appextra
="recorder:gui:radio"
2109 # toolset is the tools within the tools directory that we build for
2110 # this particular target.
2111 toolset
=$tccbitmaptools
2112 # architecture, manufacturer and model for the target-tree build
2114 t_manufacturer
="tcc77x"
2120 modelname
="zenvisionm30gb"
2121 target
="-DCREATIVE_ZVM"
2124 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2125 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2126 tool
="$rootdir/tools/scramble -creative=zvm"
2128 output
="rockbox.zvm"
2129 appextra
="recorder:gui:radio"
2132 toolset
=$ipodbitmaptools
2133 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2134 bootoutput
="rockbox.zvmboot"
2135 # architecture, manufacturer and model for the target-tree build
2137 t_manufacturer
="tms320dm320"
2138 t_model
="creative-zvm"
2143 modelname
="zenvisionm60gb"
2144 target
="-DCREATIVE_ZVM60GB"
2147 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2148 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2149 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2151 output
="rockbox.zvm60"
2152 appextra
="recorder:gui:radio"
2155 toolset
=$ipodbitmaptools
2156 boottool
="$rootdir/tools/scramble -creative=zvm60"
2157 bootoutput
="rockbox.zvm60boot"
2158 # architecture, manufacturer and model for the target-tree build
2160 t_manufacturer
="tms320dm320"
2161 t_model
="creative-zvm"
2166 modelname
="zenvision"
2167 target
="-DCREATIVE_ZV"
2170 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2171 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2172 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2175 appextra
="recorder:gui:radio"
2178 toolset
=$ipodbitmaptools
2179 boottool
="$rootdir/tools/scramble -creative=zenvision"
2180 bootoutput
="rockbox.zvboot"
2181 # architecture, manufacturer and model for the target-tree build
2183 t_manufacturer
="tms320dm320"
2184 t_model
="creative-zvm"
2189 modelname
="sansae200"
2190 target
="-DSANSA_E200"
2191 memory
=32 # supposedly
2193 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2194 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2195 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2196 output
="rockbox.mi4"
2197 appextra
="recorder:gui:radio"
2200 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2201 bootoutput
="PP5022.mi4"
2202 # toolset is the tools within the tools directory that we build for
2203 # this particular target.
2204 toolset
=$scramblebitmaptools
2205 # architecture, manufacturer and model for the target-tree build
2207 t_manufacturer
="sandisk"
2208 t_model
="sansa-e200"
2212 # the e200R model is pretty much identical to the e200, it only has a
2213 # different option to the scramble tool when building a bootloader and
2214 # makes the bootloader output file name in all lower case.
2216 modelname
="sansae200r"
2217 target
="-DSANSA_E200"
2218 memory
=32 # supposedly
2220 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2221 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2222 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2223 output
="rockbox.mi4"
2224 appextra
="recorder:gui:radio"
2227 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2228 bootoutput
="pp5022.mi4"
2229 # toolset is the tools within the tools directory that we build for
2230 # this particular target.
2231 toolset
=$scramblebitmaptools
2232 # architecture, manufacturer and model for the target-tree build
2234 t_manufacturer
="sandisk"
2235 t_model
="sansa-e200"
2240 modelname
="sansac200"
2241 target
="-DSANSA_C200"
2242 memory
=32 # supposedly
2244 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2245 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2246 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2247 output
="rockbox.mi4"
2248 appextra
="recorder:gui:radio"
2251 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2252 bootoutput
="firmware.mi4"
2253 # toolset is the tools within the tools directory that we build for
2254 # this particular target.
2255 toolset
=$scramblebitmaptools
2256 # architecture, manufacturer and model for the target-tree build
2258 t_manufacturer
="sandisk"
2259 t_model
="sansa-c200"
2264 modelname
="sansam200"
2265 target
="-DSANSA_M200"
2268 tool
="$rootdir/tools/scramble -add=m200"
2269 boottool
="$rootdir/tools/scramble -tcc=crc"
2270 bootoutput
="player.rom"
2271 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2272 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2273 output
="rockbox.m200"
2274 appextra
="recorder:gui:radio"
2277 # toolset is the tools within the tools directory that we build for
2278 # this particular target.
2279 toolset
=$tccbitmaptools
2280 # architecture, manufacturer and model for the target-tree build
2282 t_manufacturer
="tcc77x"
2288 modelname
="sansac100"
2289 target
="-DSANSA_C100"
2292 tool
="$rootdir/tools/scramble -add=c100"
2293 boottool
="$rootdir/tools/scramble -tcc=crc"
2294 bootoutput
="player.rom"
2295 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2296 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2297 output
="rockbox.c100"
2298 appextra
="recorder:gui:radio"
2301 # toolset is the tools within the tools directory that we build for
2302 # this particular target.
2303 toolset
=$tccbitmaptools
2304 # architecture, manufacturer and model for the target-tree build
2306 t_manufacturer
="tcc77x"
2312 modelname
="sansaclip"
2313 target
="-DSANSA_CLIP"
2315 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2316 bmp2rb_native
="$bmp2rb_mono"
2317 tool
="$rootdir/tools/scramble -add=clip"
2318 output
="rockbox.sansa"
2319 bootoutput
="bootloader-clip.sansa"
2320 appextra
="recorder:gui:radio"
2323 toolset
=$scramblebitmaptools
2325 t_manufacturer
="as3525"
2326 t_model
="sansa-clip"
2327 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2329 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2335 modelname
="sansae200v2"
2336 target
="-DSANSA_E200V2"
2338 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2339 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2340 tool
="$rootdir/tools/scramble -add=e2v2"
2341 output
="rockbox.sansa"
2342 bootoutput
="bootloader-e200v2.sansa"
2343 appextra
="recorder:gui:radio"
2346 toolset
=$scramblebitmaptools
2348 t_manufacturer
="as3525"
2349 t_model
="sansa-e200v2"
2356 modelname
="sansam200v4"
2357 target
="-DSANSA_M200V4"
2359 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2360 bmp2rb_native
="$bmp2rb_mono"
2361 tool
="$rootdir/tools/scramble -add=m2v4"
2362 output
="rockbox.sansa"
2363 bootoutput
="bootloader-m200v4.sansa"
2364 appextra
="recorder:gui:radio"
2367 toolset
=$scramblebitmaptools
2369 t_manufacturer
="as3525"
2370 t_model
="sansa-m200v4"
2371 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2373 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2379 modelname
="sansafuze"
2380 target
="-DSANSA_FUZE"
2382 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2383 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2384 tool
="$rootdir/tools/scramble -add=fuze"
2385 output
="rockbox.sansa"
2386 bootoutput
="bootloader-fuze.sansa"
2387 appextra
="recorder:gui:radio"
2390 toolset
=$scramblebitmaptools
2392 t_manufacturer
="as3525"
2393 t_model
="sansa-fuze"
2400 modelname
="sansac200v2"
2401 target
="-DSANSA_C200V2"
2402 memory
=2 # as per OF diagnosis mode
2403 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2404 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2405 tool
="$rootdir/tools/scramble -add=c2v2"
2406 output
="rockbox.sansa"
2407 bootoutput
="bootloader-c200v2.sansa"
2408 appextra
="recorder:gui:radio"
2411 # toolset is the tools within the tools directory that we build for
2412 # this particular target.
2413 toolset
=$scramblebitmaptools
2414 # architecture, manufacturer and model for the target-tree build
2416 t_manufacturer
="as3525"
2417 t_model
="sansa-c200v2"
2418 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2420 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2425 modelname
="sansaclipv2"
2426 target
="-DSANSA_CLIPV2"
2428 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2429 bmp2rb_native
="$bmp2rb_mono"
2430 tool
="$rootdir/tools/scramble -add=clv2"
2431 output
="rockbox.sansa"
2432 bootoutput
="bootloader-clipv2.sansa"
2433 appextra
="recorder:gui:radio"
2436 toolset
=$scramblebitmaptools
2438 t_manufacturer
="as3525"
2439 t_model
="sansa-clipv2"
2444 echo "Sansa View is not yet supported!"
2447 modelname
="sansaview"
2448 target
="-DSANSA_VIEW"
2451 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2452 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2453 output
="rockbox.mi4"
2457 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2458 bootoutput
="firmware.mi4"
2459 # toolset is the tools within the tools directory that we build for
2460 # this particular target.
2461 toolset
=$scramblebitmaptools
2463 t_manufacturer
="sandisk"
2464 t_model
="sansa-view"
2469 modelname
="sansaclipplus"
2470 target
="-DSANSA_CLIPPLUS"
2472 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2473 bmp2rb_native
="$bmp2rb_mono"
2474 tool
="$rootdir/tools/scramble -add=cli+"
2475 output
="rockbox.sansa"
2476 bootoutput
="bootloader-clipplus.sansa"
2477 appextra
="recorder:gui:radio"
2480 toolset
=$scramblebitmaptools
2482 t_manufacturer
="as3525"
2483 t_model
="sansa-clipplus"
2489 modelname
="sansafuzev2"
2490 target
="-DSANSA_FUZEV2"
2492 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2493 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2494 tool
="$rootdir/tools/scramble -add=fuz2"
2495 output
="rockbox.sansa"
2496 bootoutput
="bootloader-fuzev2.sansa"
2497 appextra
="recorder:gui:radio"
2500 toolset
=$scramblebitmaptools
2502 t_manufacturer
="as3525"
2503 t_model
="sansa-fuzev2"
2509 modelname
="sansafuzeplus"
2510 target
="-DSANSA_FUZEPLUS"
2512 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2513 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2514 tool
="$rootdir/tools/scramble -add=fuz+"
2515 output
="rockbox.sansa"
2518 appextra
="gui:recorder:radio"
2521 toolset
=$scramblebitmaptools
2523 t_manufacturer
="imx233"
2524 t_model
="sansa-fuzeplus"
2530 modelname
="tatungtpj1022"
2531 target
="-DTATUNG_TPJ1022"
2534 tool
="$rootdir/tools/scramble -add tpj2"
2535 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2536 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2537 output
="rockbox.elio"
2538 appextra
="recorder:gui:radio"
2541 boottool
="$rootdir/tools/scramble -mi4v2"
2542 bootoutput
="pp5020.mi4"
2543 # toolset is the tools within the tools directory that we build for
2544 # this particular target.
2545 toolset
=$scramblebitmaptools
2546 # architecture, manufacturer and model for the target-tree build
2548 t_manufacturer
="tatung"
2554 modelname
="gogearsa9200"
2555 target
="-DPHILIPS_SA9200"
2556 memory
=32 # supposedly
2558 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2559 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2560 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2561 output
="rockbox.mi4"
2562 appextra
="recorder:gui:radio"
2565 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2566 bootoutput
="FWImage.ebn"
2567 # toolset is the tools within the tools directory that we build for
2568 # this particular target.
2569 toolset
=$scramblebitmaptools
2570 # architecture, manufacturer and model for the target-tree build
2572 t_manufacturer
="philips"
2578 modelname
="gogearhdd1630"
2579 target
="-DPHILIPS_HDD1630"
2580 memory
=32 # supposedly
2582 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2583 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2584 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2585 output
="rockbox.mi4"
2586 appextra
="recorder:gui:radio"
2589 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2590 bootoutput
="FWImage.ebn"
2591 # toolset is the tools within the tools directory that we build for
2592 # this particular target.
2593 toolset
=$scramblebitmaptools
2594 # architecture, manufacturer and model for the target-tree build
2596 t_manufacturer
="philips"
2602 modelname
="gogearhdd6330"
2603 target
="-DPHILIPS_HDD6330"
2606 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2607 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2608 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2609 output
="rockbox.mi4"
2610 appextra
="recorder:gui:radio"
2613 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2614 bootoutput
="FWImage.ebn"
2615 # toolset is the tools within the tools directory that we build for
2616 # this particular target.
2617 toolset
=$scramblebitmaptools
2618 # architecture, manufacturer and model for the target-tree build
2620 t_manufacturer
="philips"
2626 modelname
="meizum6sl"
2627 target
="-DMEIZU_M6SL"
2631 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2632 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2633 output
="rockbox.meizu"
2634 appextra
="recorder:gui:radio"
2637 toolset
=$genericbitmaptools
2639 bootoutput
="rockboot.ebn"
2640 # architecture, manufacturer and model for the target-tree build
2642 t_manufacturer
="s5l8700"
2643 t_model
="meizu-m6sl"
2648 modelname
="meizum6sp"
2649 target
="-DMEIZU_M6SP"
2653 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2654 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2655 output
="rockbox.meizu"
2656 appextra
="recorder:gui:radio"
2659 toolset
=$genericbitmaptools
2661 bootoutput
="rockboot.ebn"
2662 # architecture, manufacturer and model for the target-tree build
2664 t_manufacturer
="s5l8700"
2665 t_model
="meizu-m6sp"
2675 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2676 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2677 output
="rockbox.meizu"
2678 appextra
="recorder:gui:radio"
2681 toolset
=$genericbitmaptools
2683 bootoutput
="rockboot.ebn"
2684 # architecture, manufacturer and model for the target-tree build
2686 t_manufacturer
="s5l8700"
2692 modelname
="ondavx747"
2693 target
="-DONDA_VX747"
2696 tool
="$rootdir/tools/scramble -add=x747"
2697 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2698 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2699 output
="rockbox.vx747"
2700 appextra
="recorder:gui:radio"
2703 toolset
=$genericbitmaptools
2704 boottool
="$rootdir/tools/scramble -ccpmp"
2705 bootoutput
="ccpmp.bin"
2706 # architecture, manufacturer and model for the target-tree build
2708 t_manufacturer
="ingenic_jz47xx"
2709 t_model
="onda_vx747"
2714 modelname
="ondavx767"
2715 target
="-DONDA_VX767"
2719 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2720 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2721 output
="rockbox.vx767"
2722 appextra
="recorder:gui:radio"
2725 toolset
=$genericbitmaptools
2726 boottool
="$rootdir/tools/scramble -ccpmp"
2727 bootoutput
="ccpmp.bin"
2728 # architecture, manufacturer and model for the target-tree build
2730 t_manufacturer
="ingenic_jz47xx"
2731 t_model
="onda_vx767"
2736 modelname
="ondavx747p"
2737 target
="-DONDA_VX747P"
2740 tool
="$rootdir/tools/scramble -add=747p"
2741 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2742 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2743 output
="rockbox.vx747p"
2744 appextra
="recorder:gui:radio"
2747 toolset
=$genericbitmaptools
2748 boottool
="$rootdir/tools/scramble -ccpmp"
2749 bootoutput
="ccpmp.bin"
2750 # architecture, manufacturer and model for the target-tree build
2752 t_manufacturer
="ingenic_jz47xx"
2753 t_model
="onda_vx747"
2758 modelname
="ondavx777"
2759 target
="-DONDA_VX777"
2762 tool
="$rootdir/tools/scramble -add=x777"
2763 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2764 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2765 output
="rockbox.vx777"
2766 appextra
="recorder:gui:radio"
2769 toolset
=$genericbitmaptools
2770 boottool
="$rootdir/tools/scramble -ccpmp"
2771 bootoutput
="ccpmp.bin"
2772 # architecture, manufacturer and model for the target-tree build
2774 t_manufacturer
="ingenic_jz47xx"
2775 t_model
="onda_vx747"
2780 modelname
="lyreproto1"
2781 target
="-DLYRE_PROTO1"
2785 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2786 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2787 output
="rockbox.lyre"
2788 appextra
="recorder:gui:radio"
2791 toolset
=$scramblebitmaptools
2793 bootoutput
="bootloader-proto1.lyre"
2794 # architecture, manufacturer and model for the target-tree build
2796 t_manufacturer
="at91sam"
2797 t_model
="lyre_proto1"
2802 modelname
="mini2440"
2806 tool
="$rootdir/tools/scramble -add=m244"
2807 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2808 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2809 output
="rockbox.mini2440"
2810 appextra
="recorder:gui:radio"
2813 toolset
=$scramblebitmaptools
2815 bootoutput
="bootloader-mini2440.lyre"
2816 # architecture, manufacturer and model for the target-tree build
2818 t_manufacturer
="s3c2440"
2824 modelname
="samsungyh820"
2825 target
="-DSAMSUNG_YH820"
2828 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2829 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2830 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2831 output
="rockbox.mi4"
2832 appextra
="recorder:gui:radio"
2835 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2836 bootoutput
="FW_YH820.mi4"
2837 # toolset is the tools within the tools directory that we build for
2838 # this particular target.
2839 toolset
=$scramblebitmaptools
2840 # architecture, manufacturer and model for the target-tree build
2842 t_manufacturer
="samsung"
2848 modelname
="samsungyh920"
2849 target
="-DSAMSUNG_YH920"
2852 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2853 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2854 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2855 output
="rockbox.mi4"
2856 appextra
="recorder:gui:radio"
2859 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2860 bootoutput
="PP5020.mi4"
2861 # toolset is the tools within the tools directory that we build for
2862 # this particular target.
2863 toolset
=$scramblebitmaptools
2864 # architecture, manufacturer and model for the target-tree build
2866 t_manufacturer
="samsung"
2872 modelname
="samsungyh925"
2873 target
="-DSAMSUNG_YH925"
2876 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2877 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2878 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2879 output
="rockbox.mi4"
2880 appextra
="recorder:gui:radio"
2883 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2884 bootoutput
="FW_YH925.mi4"
2885 # toolset is the tools within the tools directory that we build for
2886 # this particular target.
2887 toolset
=$scramblebitmaptools
2888 # architecture, manufacturer and model for the target-tree build
2890 t_manufacturer
="samsung"
2896 modelname
="samsungyps3"
2897 target
="-DSAMSUNG_YPS3"
2901 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2902 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2903 output
="rockbox.yps3"
2904 appextra
="recorder:gui:radio"
2907 toolset
=$genericbitmaptools
2909 bootoutput
="rockboot.ebn"
2910 # architecture, manufacturer and model for the target-tree build
2912 t_manufacturer
="s5l8700"
2919 target
="-DPBELL_VIBE500"
2922 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2923 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2924 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2925 output
="rockbox.mi4"
2926 appextra
="recorder:gui:radio"
2929 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2930 bootoutput
="jukebox.mi4"
2931 # toolset is the tools within the tools directory that we build for
2932 # this particular target.
2933 toolset
=$scramblebitmaptools
2934 # architecture, manufacturer and model for the target-tree build
2936 t_manufacturer
="pbell"
2942 modelname
="mpiohd200"
2943 target
="-DMPIO_HD200"
2946 tool
="$rootdir/tools/scramble -add=hd20"
2947 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2948 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2949 output
="rockbox.mpio"
2950 bootoutput
="bootloader.mpio"
2951 appextra
="recorder:gui:radio"
2954 # toolset is the tools within the tools directory that we build for
2955 # this particular target.
2956 toolset
="$genericbitmaptools"
2957 # architecture, manufacturer and model for the target-tree build
2959 t_manufacturer
="mpio"
2965 modelname
="mpiohd300"
2966 target
="-DMPIO_HD300"
2969 tool
="$rootdir/tools/scramble -add=hd30"
2970 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2971 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2972 output
="rockbox.mpio"
2973 bootoutput
="bootloader.mpio"
2974 appextra
="recorder:gui:radio"
2977 # toolset is the tools within the tools directory that we build for
2978 # this particular target.
2979 toolset
="$genericbitmaptools"
2980 # architecture, manufacturer and model for the target-tree build
2982 t_manufacturer
="mpio"
2988 modelname
="rk27generic"
2989 target
="-DRK27_GENERIC"
2992 tool
="$rootdir/tools/scramble -add=rk27"
2993 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2994 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2995 output
="rockbox.rk27"
2996 bootoutput
="bootloader.rk27"
2997 appextra
="recorder:gui:radio"
3000 # toolset is the tools within the tools directory that we build for
3001 # this particular target.
3002 toolset
="$genericbitmaptools"
3003 # architecture, manufacturer and model for the target-tree build
3005 t_manufacturer
="rk27xx"
3006 t_model
="rk27generic"
3021 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3022 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3024 bootoutput
="rockbox"
3025 appextra
="recorder:gui:radio"
3028 # architecture, manufacturer and model for the target-tree build
3030 t_manufacturer
="sdl"
3041 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3042 bindir
="/data/data/org.rockbox/lib"
3043 libdir
="/data/data/org.rockbox/app_rockbox"
3049 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3050 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3051 output
="librockbox.so"
3052 bootoutput
="librockbox.so"
3053 appextra
="recorder:gui:radio:hosted/android"
3056 # architecture, manufacturer and model for the target-tree build
3058 t_manufacturer
="android"
3065 modelname
="nokian8xx"
3067 target
="-DNOKIAN8XX"
3068 sharedir
="/opt/rockbox/share/rockbox"
3069 bindir
="/opt/rockbox/bin"
3070 libdir
="/opt/rockbox/lib"
3076 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3077 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3079 bootoutput
="rockbox"
3080 appextra
="recorder:gui:radio"
3083 # architecture, manufacturer and model for the target-tree build
3085 t_manufacturer
="maemo"
3092 modelname
="nokian900"
3094 target
="-DNOKIAN900"
3095 sharedir
="/opt/rockbox/share/rockbox"
3096 bindir
="/opt/rockbox/bin"
3097 libdir
="/opt/rockbox/lib"
3103 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3104 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3106 bootoutput
="rockbox"
3107 appextra
="recorder:gui:radio"
3110 # architecture, manufacturer and model for the target-tree build
3112 t_manufacturer
="maemo"
3122 sharedir
="rockbox/share/rockbox"
3123 bindir
="rockbox/bin"
3124 libdir
="rockbox/lib"
3130 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3131 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3133 bootoutput
="rockbox"
3134 appextra
="recorder:gui:radio"
3137 # architecture, manufacturer and model for the target-tree build
3139 t_manufacturer
="pandora"
3144 echo "Please select a supported target platform!"
3150 echo "Platform set to $modelname"
3154 ############################################################################
3155 # Amount of memory, for those that can differ. They have $memory unset at
3159 if [ -z "$memory" ]; then
3162 if [ "$ARG_RAM" ]; then
3165 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3178 if [ "$ARG_RAM" ]; then
3181 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3194 echo "Memory size selected: $memory MB"
3195 [ "$ARG_TYPE" ] ||
echo ""
3199 ##################################################################
3200 # Figure out build "type"
3203 # the ifp7x0 is the only platform that supports building a gdb stub like
3207 gdbstub
=", (G)DB stub"
3209 sansae200r|sansae200
)
3210 gdbstub
=", (I)nstaller"
3213 gdbstub
=", (E)raser"
3218 if [ "$ARG_TYPE" ]; then
3221 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool$gdbstub: (Defaults to N)"
3227 appsdir
='$(ROOTDIR)/bootloader'
3229 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3231 echo "e200R-installer build selected"
3234 appsdir
='$(ROOTDIR)/bootloader'
3236 echo "C2(4)0 or C2(5)0"
3240 extradefines
="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
3241 echo "c240 eraser build selected"
3244 extradefines
="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
3245 echo "c240 eraser build selected"
3249 echo "c200 eraser build selected"
3252 if test $t_manufacturer = "archos"; then
3253 # Archos SH-based players do this somewhat differently for
3255 appsdir
='$(ROOTDIR)/flash/bootbox'
3258 appsdir
='$(ROOTDIR)/bootloader'
3261 if test -n "$boottool"; then
3264 if test -n "$bootoutput"; then
3268 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3270 echo "Bootloader build selected"
3273 if [ "$modelname" = "sansae200r" ]; then
3274 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3279 extradefines
="$extradefines -DSIMULATOR"
3282 echo "Simulator build selected"
3285 echo "Advanced build selected"
3286 whichadvanced
$btype
3289 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3290 appsdir
='$(ROOTDIR)/gdb'
3299 echo "GDB stub build selected"
3307 extradefines
="$extradefines -DDEBUG"
3308 appsdir
='$(ROOTDIR)/tools/checkwps';
3309 output
='checkwps.'${modelname};
3311 echo "CheckWPS build selected"
3319 appsdir
='$(ROOTDIR)/tools/database';
3324 output
="database_${modelname}.exe"
3327 output
='database.'${modelname};
3331 echo "Database tool build selected"
3334 if [ "$modelname" = "sansae200r" ]; then
3335 echo "Do not use the e200R target for regular builds. Use e200 instead."
3339 btype
="N" # set it explicitly since RET only gets here as well
3340 echo "Normal build selected"
3344 # to be able running "make manual" from non-manual configuration
3347 manualdev
="archosfmrecorder"
3350 manualdev
="iriverh100"
3353 manualdev
="ipodmini1g"
3356 manualdev
=$modelname
3360 if [ -z "$debug" ]; then
3361 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3364 if [ "yes" = "$application" ]; then
3365 echo Building Rockbox as an Application
3366 extradefines
="$extradefines -DAPPLICATION"
3369 echo "Using source code root directory: $rootdir"
3371 # this was once possible to change at build-time, but no more:
3376 if [ "yes" = "$simulator" ]; then
3377 # setup compiler and things for simulator
3380 if [ -d "simdisk" ]; then
3381 echo "Subdirectory 'simdisk' already present"
3384 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3388 # Now, figure out version number of the (gcc) compiler we are about to use
3389 gccver
=`$CC -dumpversion`;
3391 # figure out the binutil version too and display it, mostly for the build
3392 # system etc to be able to see it easier
3393 if [ $uname = "Darwin" ]; then
3394 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3396 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3399 if [ -z "$gccver" ]; then
3400 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3401 echo "[WARNING] this may cause your build to fail since we cannot do the"
3402 echo "[WARNING] checks we want now."
3405 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3408 num1
=`echo $gccver | cut -d . -f1`
3409 num2
=`echo $gccver | cut -d . -f2`
3410 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3417 echo "Using $CC $gccver ($gccnum)"
3419 if test "$gccnum" -ge "400"; then
3420 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3421 # so we ignore that warnings for now
3423 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3426 if test "$gccnum" -ge "402"; then
3427 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3428 # and later would throw it for several valid cases
3429 GCCOPTS
="$GCCOPTS -Wno-override-init"
3433 ""|
"$CROSS_COMPILE")
3437 # cross-compile for win32
3440 # Verify that the cross-compiler is of a recommended version!
3441 if test "$gccver" != "$gccchoice"; then
3442 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3443 echo "WARNING: version $gccchoice!"
3444 echo "WARNING: This may cause your build to fail since it may be a version"
3445 echo "WARNING: that isn't functional or known to not be the best choice."
3446 echo "WARNING: If you suffer from build problems, you know that this is"
3447 echo "WARNING: a likely source for them..."
3455 echo "Using $LD $ldver"
3457 # check the compiler for SH platforms
3458 if test "$CC" = "sh-elf-gcc"; then
3459 if test "$gccnum" -lt "400"; then
3460 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3461 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3463 # figure out patch status
3464 gccpatch
=`$CC --version`;
3466 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3467 echo "gcc $gccver is rockbox patched"
3468 # then convert -O to -Os to get smaller binaries!
3469 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3471 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3472 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3477 if test "$CC" = "m68k-elf-gcc"; then
3478 # convert -O to -Os to get smaller binaries!
3479 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3482 if [ "$ARG_CCACHE" = "1" ]; then
3483 echo "Enable ccache for building"
3485 elif [ "$ARG_CCACHE" != "0" ]; then
3486 ccache
=`findtool ccache`
3487 if test -n "$ccache"; then
3488 echo "Found and uses ccache ($ccache)"
3492 # figure out the full path to the various commands if possible
3493 HOSTCC
=`findtool gcc --lit`
3494 HOSTAR
=`findtool ar --lit`
3495 CC
=`findtool ${CC} --lit`
3496 LD
=`findtool ${AR} --lit`
3497 AR
=`findtool ${AR} --lit`
3498 AS
=`findtool ${AS} --lit`
3499 OC
=`findtool ${OC} --lit`
3500 WINDRES
=`findtool ${WINDRES} --lit`
3501 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3502 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3503 RANLIB
=`findtool ${RANLIB} --lit`
3505 if test -n "$ccache"; then
3509 if test "$ARG_ARM_THUMB" = "1"; then
3510 extradefines
="$extradefines -DUSE_THUMB"
3511 CC
="$toolsdir/thumb-cc.py $CC"
3514 if test "X$endian" = "Xbig"; then
3515 defendian
="ROCKBOX_BIG_ENDIAN"
3517 defendian
="ROCKBOX_LITTLE_ENDIAN"
3520 if [ "$ARG_RBDIR" != "" ]; then
3521 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3526 echo "Using alternate rockbox dir: ${rbdir}"
3529 cat > autoconf.h
<<EOF
3530 /* This header was made by configure */
3531 #ifndef __BUILD_AUTOCONF_H
3532 #define __BUILD_AUTOCONF_H
3534 /* Define endianess for the target or simulator platform */
3535 #define ${defendian} 1
3537 /* Define this if you build rockbox to support the logf logging and display */
3540 /* Define this to record a chart with timings for the stages of boot */
3543 /* optional define for a backlight modded Ondio */
3546 /* optional define for FM radio mod for iAudio M5 */
3549 /* optional define for ATA poweroff on Player */
3550 ${have_ata_poweroff}
3552 /* optional defines for RTC mod for h1x0 */
3556 /* the threading backend we use */
3557 #define ${thread_support}
3559 /* lcd dimensions for application builds from configure */
3563 /* root of Rockbox */
3564 #define ROCKBOX_DIR "${rbdir}"
3565 #define ROCKBOX_SHARE_PATH "${sharedir}"
3566 #define ROCKBOX_BINARY_PATH "${bindir}"
3567 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3569 #endif /* __BUILD_AUTOCONF_H */
3572 if test -n "$t_cpu"; then
3573 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3575 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3576 # Maemo needs the SDL port, too
3577 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3578 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3579 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3580 # Pandora needs the SDL port, too
3581 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3582 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3583 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3584 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3585 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3588 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3589 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3593 if test "$swcodec" = "yes"; then
3594 voicetoolset
="rbspeexenc voicefont wavtrim"
3596 voicetoolset
="voicefont wavtrim"
3599 if test "$apps" = "apps"; then
3600 # only when we build "real" apps we build the .lng files
3604 #### Fix the cmdline ###
3605 if [ -n "$ARG_PREFIX" ]; then
3606 cmdline
="$cmdline --prefix=\$(PREFIX)"
3608 if [ -n "$ARG_LCDWIDTH" ]; then
3609 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3612 # remove parts from the cmdline we're going to set unconditionally
3613 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z0-9]\*,,g \
3614 -e s,--ram=[0-9]\*,,g \
3615 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3616 -e s,--type=[a-zA-Z]\*,,g`
3617 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3621 cat > Makefile
<<EOF
3622 ## Automatically generated. http://www.rockbox.org/
3624 export ROOTDIR=${rootdir}
3625 export FIRMDIR=\$(ROOTDIR)/firmware
3626 export APPSDIR=${appsdir}
3627 export TOOLSDIR=${toolsdir}
3628 export DOCSDIR=${rootdir}/docs
3629 export MANUALDIR=${rootdir}/manual
3630 export DEBUG=${debug}
3631 export MODELNAME=${modelname}
3632 export ARCHOSROM=${archosrom}
3633 export FLASHFILE=${flash}
3634 export TARGET_ID=${target_id}
3635 export TARGET=${target}
3637 export MANUFACTURER=${t_manufacturer}
3638 export OBJDIR=${pwd}
3639 export BUILDDIR=${pwd}
3640 export LANGUAGE=${language}
3641 export VOICELANGUAGE=${voicelanguage}
3642 export MEMORYSIZE=${memory}
3643 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3644 export MKFIRMWARE=${tool}
3645 export BMP2RB_MONO=${bmp2rb_mono}
3646 export BMP2RB_NATIVE=${bmp2rb_native}
3647 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3648 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3649 export BINARY=${output}
3650 export APPEXTRA=${appextra}
3651 export ENABLEDPLUGINS=${plugins}
3652 export SOFTWARECODECS=${swcodec}
3653 export EXTRA_DEFINES=${extradefines}
3654 export HOSTCC=${HOSTCC}
3655 export HOSTAR=${HOSTAR}
3661 export WINDRES=${WINDRES}
3662 export DLLTOOL=${DLLTOOL}
3663 export DLLWRAP=${DLLWRAP}
3664 export RANLIB=${RANLIB}
3665 export PREFIX=${ARG_PREFIX}
3666 export PROFILE_OPTS=${PROFILE_OPTS}
3667 export APP_TYPE=${app_type}
3668 export APPLICATION=${application}
3669 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3670 export GCCOPTS=${GCCOPTS}
3671 export TARGET_INC=${TARGET_INC}
3672 export LOADADDRESS=${loadaddress}
3673 export SHARED_LDFLAG=${SHARED_LDFLAG}
3674 export SHARED_CFLAGS=${SHARED_CFLAGS}
3675 export LDOPTS=${LDOPTS}
3676 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3677 export GCCVER=${gccver}
3678 export GCCNUM=${gccnum}
3679 export UNAME=${uname}
3680 export MANUALDEV=${manualdev}
3681 export TTS_OPTS=${TTS_OPTS}
3682 export TTS_ENGINE=${TTS_ENGINE}
3683 export ENC_OPTS=${ENC_OPTS}
3684 export ENCODER=${ENCODER}
3685 export USE_ELF=${USE_ELF}
3686 export RBDIR=${rbdir}
3687 export ROCKBOX_SHARE_PATH=${sharedir}
3688 export ROCKBOX_BINARY_PATH=${bindir}
3689 export ROCKBOX_LIBRARY_PATH=${libdir}
3690 export SDLCONFIG=${sdl}
3691 export LCDORIENTATION=${lcd_orientation}
3693 CONFIGURE_OPTIONS=${cmdline}
3695 include \$(TOOLSDIR)/root.make
3698 echo "Created Makefile"