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 65) Sansa Clip Zip
1281 142) YH-925 ==Packard Bell== ==Logik==
1282 143) YP-S3 160) Vibe 500 80) DAX 1GB MP3/DAB
1284 ==Application== ==MPIO== ==Lyre project==
1285 200) SDL 170) HD200 130) Lyre proto 1
1286 201) Android 171) HD300 131) Mini2440
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
="sansaclipzip"
2531 target
="-DSANSA_CLIPZIP"
2533 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2534 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2535 tool
="$rootdir/tools/scramble -add=clzp"
2536 output
="rockbox.sansa"
2537 bootoutput
="bootloader-clipzip.sansa"
2538 appextra
="recorder:gui:radio"
2541 toolset
=$scramblebitmaptools
2543 t_manufacturer
="as3525"
2544 t_model
="sansa-clipzip"
2550 modelname
="tatungtpj1022"
2551 target
="-DTATUNG_TPJ1022"
2554 tool
="$rootdir/tools/scramble -add tpj2"
2555 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2556 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2557 output
="rockbox.elio"
2558 appextra
="recorder:gui:radio"
2561 boottool
="$rootdir/tools/scramble -mi4v2"
2562 bootoutput
="pp5020.mi4"
2563 # toolset is the tools within the tools directory that we build for
2564 # this particular target.
2565 toolset
=$scramblebitmaptools
2566 # architecture, manufacturer and model for the target-tree build
2568 t_manufacturer
="tatung"
2574 modelname
="gogearsa9200"
2575 target
="-DPHILIPS_SA9200"
2576 memory
=32 # supposedly
2578 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2579 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2580 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2581 output
="rockbox.mi4"
2582 appextra
="recorder:gui:radio"
2585 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2586 bootoutput
="FWImage.ebn"
2587 # toolset is the tools within the tools directory that we build for
2588 # this particular target.
2589 toolset
=$scramblebitmaptools
2590 # architecture, manufacturer and model for the target-tree build
2592 t_manufacturer
="philips"
2598 modelname
="gogearhdd1630"
2599 target
="-DPHILIPS_HDD1630"
2600 memory
=32 # supposedly
2602 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2603 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2604 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2605 output
="rockbox.mi4"
2606 appextra
="recorder:gui:radio"
2609 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2610 bootoutput
="FWImage.ebn"
2611 # toolset is the tools within the tools directory that we build for
2612 # this particular target.
2613 toolset
=$scramblebitmaptools
2614 # architecture, manufacturer and model for the target-tree build
2616 t_manufacturer
="philips"
2622 modelname
="gogearhdd6330"
2623 target
="-DPHILIPS_HDD6330"
2626 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2627 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2628 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2629 output
="rockbox.mi4"
2630 appextra
="recorder:gui:radio"
2633 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2634 bootoutput
="FWImage.ebn"
2635 # toolset is the tools within the tools directory that we build for
2636 # this particular target.
2637 toolset
=$scramblebitmaptools
2638 # architecture, manufacturer and model for the target-tree build
2640 t_manufacturer
="philips"
2646 modelname
="meizum6sl"
2647 target
="-DMEIZU_M6SL"
2651 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2652 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2653 output
="rockbox.meizu"
2654 appextra
="recorder:gui:radio"
2657 toolset
=$genericbitmaptools
2659 bootoutput
="rockboot.ebn"
2660 # architecture, manufacturer and model for the target-tree build
2662 t_manufacturer
="s5l8700"
2663 t_model
="meizu-m6sl"
2668 modelname
="meizum6sp"
2669 target
="-DMEIZU_M6SP"
2673 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2674 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2675 output
="rockbox.meizu"
2676 appextra
="recorder:gui:radio"
2679 toolset
=$genericbitmaptools
2681 bootoutput
="rockboot.ebn"
2682 # architecture, manufacturer and model for the target-tree build
2684 t_manufacturer
="s5l8700"
2685 t_model
="meizu-m6sp"
2695 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2696 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2697 output
="rockbox.meizu"
2698 appextra
="recorder:gui:radio"
2701 toolset
=$genericbitmaptools
2703 bootoutput
="rockboot.ebn"
2704 # architecture, manufacturer and model for the target-tree build
2706 t_manufacturer
="s5l8700"
2712 modelname
="ondavx747"
2713 target
="-DONDA_VX747"
2716 tool
="$rootdir/tools/scramble -add=x747"
2717 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2718 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2719 output
="rockbox.vx747"
2720 appextra
="recorder:gui:radio"
2723 toolset
=$genericbitmaptools
2724 boottool
="$rootdir/tools/scramble -ccpmp"
2725 bootoutput
="ccpmp.bin"
2726 # architecture, manufacturer and model for the target-tree build
2728 t_manufacturer
="ingenic_jz47xx"
2729 t_model
="onda_vx747"
2734 modelname
="ondavx767"
2735 target
="-DONDA_VX767"
2739 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2740 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2741 output
="rockbox.vx767"
2742 appextra
="recorder:gui:radio"
2745 toolset
=$genericbitmaptools
2746 boottool
="$rootdir/tools/scramble -ccpmp"
2747 bootoutput
="ccpmp.bin"
2748 # architecture, manufacturer and model for the target-tree build
2750 t_manufacturer
="ingenic_jz47xx"
2751 t_model
="onda_vx767"
2756 modelname
="ondavx747p"
2757 target
="-DONDA_VX747P"
2760 tool
="$rootdir/tools/scramble -add=747p"
2761 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2762 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2763 output
="rockbox.vx747p"
2764 appextra
="recorder:gui:radio"
2767 toolset
=$genericbitmaptools
2768 boottool
="$rootdir/tools/scramble -ccpmp"
2769 bootoutput
="ccpmp.bin"
2770 # architecture, manufacturer and model for the target-tree build
2772 t_manufacturer
="ingenic_jz47xx"
2773 t_model
="onda_vx747"
2778 modelname
="ondavx777"
2779 target
="-DONDA_VX777"
2782 tool
="$rootdir/tools/scramble -add=x777"
2783 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2784 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2785 output
="rockbox.vx777"
2786 appextra
="recorder:gui:radio"
2789 toolset
=$genericbitmaptools
2790 boottool
="$rootdir/tools/scramble -ccpmp"
2791 bootoutput
="ccpmp.bin"
2792 # architecture, manufacturer and model for the target-tree build
2794 t_manufacturer
="ingenic_jz47xx"
2795 t_model
="onda_vx747"
2800 modelname
="lyreproto1"
2801 target
="-DLYRE_PROTO1"
2805 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2806 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2807 output
="rockbox.lyre"
2808 appextra
="recorder:gui:radio"
2811 toolset
=$scramblebitmaptools
2813 bootoutput
="bootloader-proto1.lyre"
2814 # architecture, manufacturer and model for the target-tree build
2816 t_manufacturer
="at91sam"
2817 t_model
="lyre_proto1"
2822 modelname
="mini2440"
2826 tool
="$rootdir/tools/scramble -add=m244"
2827 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2828 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2829 output
="rockbox.mini2440"
2830 appextra
="recorder:gui:radio"
2833 toolset
=$scramblebitmaptools
2835 bootoutput
="bootloader-mini2440.lyre"
2836 # architecture, manufacturer and model for the target-tree build
2838 t_manufacturer
="s3c2440"
2844 modelname
="samsungyh820"
2845 target
="-DSAMSUNG_YH820"
2848 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2849 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2850 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2851 output
="rockbox.mi4"
2852 appextra
="recorder:gui:radio"
2855 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2856 bootoutput
="FW_YH820.mi4"
2857 # toolset is the tools within the tools directory that we build for
2858 # this particular target.
2859 toolset
=$scramblebitmaptools
2860 # architecture, manufacturer and model for the target-tree build
2862 t_manufacturer
="samsung"
2868 modelname
="samsungyh920"
2869 target
="-DSAMSUNG_YH920"
2872 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2873 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2874 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2875 output
="rockbox.mi4"
2876 appextra
="recorder:gui:radio"
2879 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2880 bootoutput
="PP5020.mi4"
2881 # toolset is the tools within the tools directory that we build for
2882 # this particular target.
2883 toolset
=$scramblebitmaptools
2884 # architecture, manufacturer and model for the target-tree build
2886 t_manufacturer
="samsung"
2892 modelname
="samsungyh925"
2893 target
="-DSAMSUNG_YH925"
2896 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2897 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2898 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2899 output
="rockbox.mi4"
2900 appextra
="recorder:gui:radio"
2903 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2904 bootoutput
="FW_YH925.mi4"
2905 # toolset is the tools within the tools directory that we build for
2906 # this particular target.
2907 toolset
=$scramblebitmaptools
2908 # architecture, manufacturer and model for the target-tree build
2910 t_manufacturer
="samsung"
2916 modelname
="samsungyps3"
2917 target
="-DSAMSUNG_YPS3"
2921 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2922 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2923 output
="rockbox.yps3"
2924 appextra
="recorder:gui:radio"
2927 toolset
=$genericbitmaptools
2929 bootoutput
="rockboot.ebn"
2930 # architecture, manufacturer and model for the target-tree build
2932 t_manufacturer
="s5l8700"
2939 target
="-DPBELL_VIBE500"
2942 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2943 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2944 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2945 output
="rockbox.mi4"
2946 appextra
="recorder:gui:radio"
2949 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2950 bootoutput
="jukebox.mi4"
2951 # toolset is the tools within the tools directory that we build for
2952 # this particular target.
2953 toolset
=$scramblebitmaptools
2954 # architecture, manufacturer and model for the target-tree build
2956 t_manufacturer
="pbell"
2962 modelname
="mpiohd200"
2963 target
="-DMPIO_HD200"
2966 tool
="$rootdir/tools/scramble -add=hd20"
2967 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2968 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2969 output
="rockbox.mpio"
2970 bootoutput
="bootloader.mpio"
2971 appextra
="recorder:gui:radio"
2974 # toolset is the tools within the tools directory that we build for
2975 # this particular target.
2976 toolset
="$genericbitmaptools"
2977 # architecture, manufacturer and model for the target-tree build
2979 t_manufacturer
="mpio"
2985 modelname
="mpiohd300"
2986 target
="-DMPIO_HD300"
2989 tool
="$rootdir/tools/scramble -add=hd30"
2990 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2991 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2992 output
="rockbox.mpio"
2993 bootoutput
="bootloader.mpio"
2994 appextra
="recorder:gui:radio"
2997 # toolset is the tools within the tools directory that we build for
2998 # this particular target.
2999 toolset
="$genericbitmaptools"
3000 # architecture, manufacturer and model for the target-tree build
3002 t_manufacturer
="mpio"
3008 modelname
="rk27generic"
3009 target
="-DRK27_GENERIC"
3012 tool
="$rootdir/tools/scramble -add=rk27"
3013 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3014 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3015 output
="rockbox.rk27"
3016 bootoutput
="bootloader.rk27"
3017 appextra
="recorder:gui:radio"
3020 # toolset is the tools within the tools directory that we build for
3021 # this particular target.
3022 toolset
="$genericbitmaptools"
3023 # architecture, manufacturer and model for the target-tree build
3025 t_manufacturer
="rk27xx"
3026 t_model
="rk27generic"
3041 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3042 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3044 bootoutput
="rockbox"
3045 appextra
="recorder:gui:radio"
3048 # architecture, manufacturer and model for the target-tree build
3050 t_manufacturer
="sdl"
3061 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3062 bindir
="/data/data/org.rockbox/lib"
3063 libdir
="/data/data/org.rockbox/app_rockbox"
3069 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3070 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3071 output
="librockbox.so"
3072 bootoutput
="librockbox.so"
3073 appextra
="recorder:gui:radio:hosted/android"
3076 # architecture, manufacturer and model for the target-tree build
3078 t_manufacturer
="android"
3085 modelname
="nokian8xx"
3087 target
="-DNOKIAN8XX"
3088 sharedir
="/opt/rockbox/share/rockbox"
3089 bindir
="/opt/rockbox/bin"
3090 libdir
="/opt/rockbox/lib"
3096 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3097 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3099 bootoutput
="rockbox"
3100 appextra
="recorder:gui:radio"
3103 # architecture, manufacturer and model for the target-tree build
3105 t_manufacturer
="maemo"
3112 modelname
="nokian900"
3114 target
="-DNOKIAN900"
3115 sharedir
="/opt/rockbox/share/rockbox"
3116 bindir
="/opt/rockbox/bin"
3117 libdir
="/opt/rockbox/lib"
3123 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3124 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3126 bootoutput
="rockbox"
3127 appextra
="recorder:gui:radio"
3130 # architecture, manufacturer and model for the target-tree build
3132 t_manufacturer
="maemo"
3142 sharedir
="rockbox/share/rockbox"
3143 bindir
="rockbox/bin"
3144 libdir
="rockbox/lib"
3150 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3151 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3153 bootoutput
="rockbox"
3154 appextra
="recorder:gui:radio"
3157 # architecture, manufacturer and model for the target-tree build
3159 t_manufacturer
="pandora"
3164 echo "Please select a supported target platform!"
3170 echo "Platform set to $modelname"
3174 ############################################################################
3175 # Amount of memory, for those that can differ. They have $memory unset at
3179 if [ -z "$memory" ]; then
3182 if [ "$ARG_RAM" ]; then
3185 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3198 if [ "$ARG_RAM" ]; then
3201 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3214 echo "Memory size selected: $memory MB"
3215 [ "$ARG_TYPE" ] ||
echo ""
3219 ##################################################################
3220 # Figure out build "type"
3223 # the ifp7x0 is the only platform that supports building a gdb stub like
3227 gdbstub
=", (G)DB stub"
3229 sansae200r|sansae200
)
3230 gdbstub
=", (I)nstaller"
3233 gdbstub
=", (E)raser"
3236 gdbstub
=", (E)raser"
3241 if [ "$ARG_TYPE" ]; then
3244 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool$gdbstub: (Defaults to N)"
3250 appsdir
='$(ROOTDIR)/bootloader'
3252 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3254 echo "e200R-installer build selected"
3257 appsdir
='$(ROOTDIR)/bootloader'
3259 extradefines
="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3261 echo "sansa eraser build selected"
3264 if test $t_manufacturer = "archos"; then
3265 # Archos SH-based players do this somewhat differently for
3267 appsdir
='$(ROOTDIR)/flash/bootbox'
3270 appsdir
='$(ROOTDIR)/bootloader'
3273 if test -n "$boottool"; then
3276 if test -n "$bootoutput"; then
3280 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3282 echo "Bootloader build selected"
3285 if [ "$modelname" = "sansae200r" ]; then
3286 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3291 extradefines
="$extradefines -DSIMULATOR"
3294 echo "Simulator build selected"
3297 echo "Advanced build selected"
3298 whichadvanced
$btype
3301 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3302 appsdir
='$(ROOTDIR)/gdb'
3311 echo "GDB stub build selected"
3319 extradefines
="$extradefines -DDEBUG"
3320 appsdir
='$(ROOTDIR)/tools/checkwps';
3321 output
='checkwps.'${modelname};
3323 echo "CheckWPS build selected"
3331 appsdir
='$(ROOTDIR)/tools/database';
3336 output
="database_${modelname}.exe"
3339 output
='database.'${modelname};
3343 echo "Database tool build selected"
3346 if [ "$modelname" = "sansae200r" ]; then
3347 echo "Do not use the e200R target for regular builds. Use e200 instead."
3351 btype
="N" # set it explicitly since RET only gets here as well
3352 echo "Normal build selected"
3356 # to be able running "make manual" from non-manual configuration
3359 manualdev
="archosfmrecorder"
3362 manualdev
="iriverh100"
3365 manualdev
="ipodmini1g"
3368 manualdev
=$modelname
3372 if [ -z "$debug" ]; then
3373 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3376 if [ "yes" = "$application" ]; then
3377 echo Building Rockbox as an Application
3378 extradefines
="$extradefines -DAPPLICATION"
3381 echo "Using source code root directory: $rootdir"
3383 # this was once possible to change at build-time, but no more:
3388 if [ "yes" = "$simulator" ]; then
3389 # setup compiler and things for simulator
3392 if [ -d "simdisk" ]; then
3393 echo "Subdirectory 'simdisk' already present"
3396 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3400 # Now, figure out version number of the (gcc) compiler we are about to use
3401 gccver
=`$CC -dumpversion`;
3403 # figure out the binutil version too and display it, mostly for the build
3404 # system etc to be able to see it easier
3405 if [ $uname = "Darwin" ]; then
3406 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3408 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3411 if [ -z "$gccver" ]; then
3412 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3413 echo "[WARNING] this may cause your build to fail since we cannot do the"
3414 echo "[WARNING] checks we want now."
3417 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3420 num1
=`echo $gccver | cut -d . -f1`
3421 num2
=`echo $gccver | cut -d . -f2`
3422 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3429 echo "Using $CC $gccver ($gccnum)"
3431 if test "$gccnum" -ge "400"; then
3432 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3433 # so we ignore that warnings for now
3435 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3438 if test "$gccnum" -ge "402"; then
3439 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3440 # and later would throw it for several valid cases
3441 GCCOPTS
="$GCCOPTS -Wno-override-init"
3445 ""|
"$CROSS_COMPILE")
3449 # cross-compile for win32
3452 # Verify that the cross-compiler is of a recommended version!
3453 if test "$gccver" != "$gccchoice"; then
3454 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3455 echo "WARNING: version $gccchoice!"
3456 echo "WARNING: This may cause your build to fail since it may be a version"
3457 echo "WARNING: that isn't functional or known to not be the best choice."
3458 echo "WARNING: If you suffer from build problems, you know that this is"
3459 echo "WARNING: a likely source for them..."
3467 echo "Using $LD $ldver"
3469 # check the compiler for SH platforms
3470 if test "$CC" = "sh-elf-gcc"; then
3471 if test "$gccnum" -lt "400"; then
3472 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3473 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3475 # figure out patch status
3476 gccpatch
=`$CC --version`;
3478 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3479 echo "gcc $gccver is rockbox patched"
3480 # then convert -O to -Os to get smaller binaries!
3481 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3483 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3484 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3489 if test "$CC" = "m68k-elf-gcc"; then
3490 # convert -O to -Os to get smaller binaries!
3491 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3494 if [ "$ARG_CCACHE" = "1" ]; then
3495 echo "Enable ccache for building"
3497 elif [ "$ARG_CCACHE" != "0" ]; then
3498 ccache
=`findtool ccache`
3499 if test -n "$ccache"; then
3500 echo "Found and uses ccache ($ccache)"
3504 # figure out the full path to the various commands if possible
3505 HOSTCC
=`findtool gcc --lit`
3506 HOSTAR
=`findtool ar --lit`
3507 CC
=`findtool ${CC} --lit`
3508 LD
=`findtool ${AR} --lit`
3509 AR
=`findtool ${AR} --lit`
3510 AS
=`findtool ${AS} --lit`
3511 OC
=`findtool ${OC} --lit`
3512 WINDRES
=`findtool ${WINDRES} --lit`
3513 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3514 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3515 RANLIB
=`findtool ${RANLIB} --lit`
3517 if test -n "$ccache"; then
3521 if test "$ARG_ARM_THUMB" = "1"; then
3522 extradefines
="$extradefines -DUSE_THUMB"
3523 CC
="$toolsdir/thumb-cc.py $CC"
3526 if test "X$endian" = "Xbig"; then
3527 defendian
="ROCKBOX_BIG_ENDIAN"
3529 defendian
="ROCKBOX_LITTLE_ENDIAN"
3532 if [ "$ARG_RBDIR" != "" ]; then
3533 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3538 echo "Using alternate rockbox dir: ${rbdir}"
3541 cat > autoconf.h
<<EOF
3542 /* This header was made by configure */
3543 #ifndef __BUILD_AUTOCONF_H
3544 #define __BUILD_AUTOCONF_H
3546 /* Define endianess for the target or simulator platform */
3547 #define ${defendian} 1
3549 /* Define this if you build rockbox to support the logf logging and display */
3552 /* Define this to record a chart with timings for the stages of boot */
3555 /* optional define for a backlight modded Ondio */
3558 /* optional define for FM radio mod for iAudio M5 */
3561 /* optional define for ATA poweroff on Player */
3562 ${have_ata_poweroff}
3564 /* optional defines for RTC mod for h1x0 */
3568 /* the threading backend we use */
3569 #define ${thread_support}
3571 /* lcd dimensions for application builds from configure */
3575 /* root of Rockbox */
3576 #define ROCKBOX_DIR "${rbdir}"
3577 #define ROCKBOX_SHARE_PATH "${sharedir}"
3578 #define ROCKBOX_BINARY_PATH "${bindir}"
3579 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3581 #endif /* __BUILD_AUTOCONF_H */
3584 if test -n "$t_cpu"; then
3585 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3587 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3588 # Maemo needs the SDL port, too
3589 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3590 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3591 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3592 # Pandora needs the SDL port, too
3593 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3594 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3595 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3596 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3597 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3600 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3601 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3605 if test "$swcodec" = "yes"; then
3606 voicetoolset
="rbspeexenc voicefont wavtrim"
3608 voicetoolset
="voicefont wavtrim"
3611 if test "$apps" = "apps"; then
3612 # only when we build "real" apps we build the .lng files
3616 #### Fix the cmdline ###
3617 if [ -n "$ARG_PREFIX" ]; then
3618 cmdline
="$cmdline --prefix=\$(PREFIX)"
3620 if [ -n "$ARG_LCDWIDTH" ]; then
3621 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3624 # remove parts from the cmdline we're going to set unconditionally
3625 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z0-9]\*,,g \
3626 -e s,--ram=[0-9]\*,,g \
3627 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3628 -e s,--type=[a-zA-Z]\*,,g`
3629 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3633 cat > Makefile
<<EOF
3634 ## Automatically generated. http://www.rockbox.org/
3636 export ROOTDIR=${rootdir}
3637 export FIRMDIR=\$(ROOTDIR)/firmware
3638 export APPSDIR=${appsdir}
3639 export TOOLSDIR=${toolsdir}
3640 export DOCSDIR=${rootdir}/docs
3641 export MANUALDIR=${rootdir}/manual
3642 export DEBUG=${debug}
3643 export MODELNAME=${modelname}
3644 export ARCHOSROM=${archosrom}
3645 export FLASHFILE=${flash}
3646 export TARGET_ID=${target_id}
3647 export TARGET=${target}
3649 export MANUFACTURER=${t_manufacturer}
3650 export OBJDIR=${pwd}
3651 export BUILDDIR=${pwd}
3652 export LANGUAGE=${language}
3653 export VOICELANGUAGE=${voicelanguage}
3654 export MEMORYSIZE=${memory}
3655 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3656 export MKFIRMWARE=${tool}
3657 export BMP2RB_MONO=${bmp2rb_mono}
3658 export BMP2RB_NATIVE=${bmp2rb_native}
3659 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3660 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3661 export BINARY=${output}
3662 export APPEXTRA=${appextra}
3663 export ENABLEDPLUGINS=${plugins}
3664 export SOFTWARECODECS=${swcodec}
3665 export EXTRA_DEFINES=${extradefines}
3666 export HOSTCC=${HOSTCC}
3667 export HOSTAR=${HOSTAR}
3673 export WINDRES=${WINDRES}
3674 export DLLTOOL=${DLLTOOL}
3675 export DLLWRAP=${DLLWRAP}
3676 export RANLIB=${RANLIB}
3677 export PREFIX=${ARG_PREFIX}
3678 export PROFILE_OPTS=${PROFILE_OPTS}
3679 export APP_TYPE=${app_type}
3680 export APPLICATION=${application}
3681 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3682 export GCCOPTS=${GCCOPTS}
3683 export TARGET_INC=${TARGET_INC}
3684 export LOADADDRESS=${loadaddress}
3685 export SHARED_LDFLAG=${SHARED_LDFLAG}
3686 export SHARED_CFLAGS=${SHARED_CFLAGS}
3687 export LDOPTS=${LDOPTS}
3688 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3689 export GCCVER=${gccver}
3690 export GCCNUM=${gccnum}
3691 export UNAME=${uname}
3692 export MANUALDEV=${manualdev}
3693 export TTS_OPTS=${TTS_OPTS}
3694 export TTS_ENGINE=${TTS_ENGINE}
3695 export ENC_OPTS=${ENC_OPTS}
3696 export ENCODER=${ENCODER}
3697 export USE_ELF=${USE_ELF}
3698 export RBDIR=${rbdir}
3699 export ROCKBOX_SHARE_PATH=${sharedir}
3700 export ROCKBOX_BINARY_PATH=${bindir}
3701 export ROCKBOX_LIBRARY_PATH=${libdir}
3702 export SDLCONFIG=${sdl}
3703 export LCDORIENTATION=${lcd_orientation}
3705 CONFIGURE_OPTIONS=${cmdline}
3707 include \$(TOOLSDIR)/root.make
3710 echo "Created Makefile"