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"
32 # Begin Function Definitions
42 WINDRES
=${prefix}windres
43 DLLTOOL
=${prefix}dlltool
44 DLLWRAP
=${prefix}dllwrap
45 RANLIB
=${prefix}ranlib
53 # setup files and paths depending on the platform
54 if [ -z "$ARG_PREFIX" ]; then
55 sharedir
="/usr/local/share/rockbox"
56 bindir
="/usr/local/bin"
57 libdir
="/usr/local/lib"
59 if [ -d "$ARG_PREFIX" ]; then
60 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
61 ARG_PREFIX
=`realpath $ARG_PREFIX`
62 if [ "0" != "$?" ]; then
63 echo "ERROR: Could not get prefix path (is realpath installed?)."
67 sharedir
="$ARG_PREFIX/share/rockbox"
68 bindir
="$ARG_PREFIX/bin"
69 libdir
="$ARG_PREFIX/lib"
71 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
77 # Set the application LCD size according to the following priorities:
78 # 1) If --lcdwidth and --lcdheight are set, use them
79 # 2) If a size is passed to the app_set_lcd_size() function, use that
80 # 3) Otherwise ask the user
82 if [ -z "$ARG_LCDWIDTH" ]; then
85 if [ -z "$ARG_LCDHEIGHT" ]; then
89 echo "Enter the LCD width (default: 320)"
90 if [ -z "$ARG_LCDWIDTH" ]; then
93 app_lcd_width
="$ARG_LCDWIDTH"
95 if [ -z "$app_lcd_width" ]; then app_lcd_width
="320"; fi
96 echo "Enter the LCD height (default: 480)"
97 if [ -z "$ARG_LCDHEIGHT" ]; then
98 app_lcd_height
=`input`
100 app_lcd_height
="$ARG_LCDHEIGHT"
102 if [ -z "$app_lcd_height" ]; then app_lcd_height
="480"; fi
103 echo "Selected $app_lcd_width x $app_lcd_height resolution"
104 ARG_LCDWIDTH
=$app_lcd_width
105 ARG_LCDHEIGHT
=$app_lcd_height
107 app_lcd_width
="#define LCD_WIDTH $app_lcd_width"
108 app_lcd_height
="#define LCD_HEIGHT $app_lcd_height"
112 if [ "$ARG_ARM_EABI" != "0" ]; then
113 prefixtools arm-elf-eabi-
121 # scan the $PATH for the given command
128 # echo "checks for $file in $path" >&2
129 if test -f "$path/$file"; then
134 # check whether caller wants literal return value if not found
135 if [ "$2" = "--lit" ]; then
140 # scan the $PATH for sdl-config - check whether for a (cross-)win32
149 #echo "checks for $file in $path" >&2
150 if test -f "$path/$file"; then
151 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
152 if [ "yes" = "${winbuild}" ]; then
157 if [ "yes" != "${winbuild}" ]; then
166 # check for availability of sigaltstack to support our thread engine
167 check_sigaltstack
() {
168 cat >$tmpdir/check_threads.c
<<EOF
170 int main(int argc, char **argv)
173 #define NULL (void*)0
175 sigaltstack(NULL, NULL);
179 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
1> /dev
/null
181 rm -rf $tmpdir/check_threads
*
185 # check for availability of Fiber on Win32 to support our thread engine
187 cat >$tmpdir/check_threads.c
<<EOF
189 int main(int argc, char **argv)
191 ConvertThreadToFiber(NULL);
195 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
2>/dev
/null
197 rm -rf $tmpdir/check_threads
*
203 # default tool setup for native building
204 prefixtools
"$CROSS_COMPILE"
205 ARG_ARM_THUMB
=0 # can't use thumb in native builds
209 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef// -e s/-O//`
210 GCCOPTS
="$GCCOPTS -fno-builtin -g"
212 LDOPTS
='-lm' # button-sdl.c uses sqrt()
216 # default output binary name, don't override app_get_platform()
217 if [ "$app_type" != "sdl-app" ]; then
221 # default share option, override below if needed
222 SHARED_FLAG
="-shared"
224 if [ "$win32crosscompile" = "yes" ]; then
225 LDOPTS
="$LDOPTS -mconsole"
231 echo "Cygwin host detected"
234 LDOPTS
="$LDOPTS -mconsole"
240 echo "MinGW host detected"
243 LDOPTS
="$LDOPTS -mconsole"
249 sigaltstack
=`check_sigaltstack`
250 echo "Linux host detected"
251 LDOPTS
="$LDOPTS -ldl"
255 sigaltstack
=`check_sigaltstack`
256 echo "FreeBSD host detected"
257 LDOPTS
="$LDOPTS -ldl"
261 sigaltstack
=`check_sigaltstack`
262 echo "Darwin host detected"
263 LDOPTS
="$LDOPTS -ldl"
264 SHARED_FLAG
="-dynamiclib -Wl\,-single_module"
268 sigaltstack
=`check_sigaltstack`
269 echo "*Solaris host detected"
271 GCCOPTS
="$GCCOPTS -fPIC"
272 LDOPTS
="$LDOPTS -ldl"
276 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
282 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
283 sdl
=`findsdl $winbuild`
285 if [ -n `echo $app_type | grep "sdl"` ]; then
286 if [ -z "$sdl" ]; then
287 echo "configure didn't find sdl-config, which indicates that you"
288 echo "don't have SDL (properly) installed. Please correct and"
289 echo "re-run configure!"
292 # generic sdl-config checker
293 GCCOPTS
="$GCCOPTS `$sdl --cflags`"
294 LDOPTS
="$LDOPTS `$sdl --libs`"
299 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
301 if test "X$win32crosscompile" != "Xyes"; then
304 # fPIC is needed to make shared objects link
305 # setting visibility to hidden is necessary to avoid strange crashes
306 # due to symbol clashing
307 GCCOPTS
="$GCCOPTS -fPIC -fvisibility=hidden"
308 # x86_64 supports MMX by default
312 echo "Enabling MMX support"
313 GCCOPTS
="$GCCOPTS -mmmx"
318 cat >$tmpdir/conftest-
$id.c
<<EOF
320 int main(int argc, char **argv)
323 char *varp = (char *)&var;
331 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
333 # when cross compiling, the endianess cannot be detected because the above program doesn't run
334 # on the local machine. assume little endian but print a warning
335 endian
=`$tmpdir/conftest-$id 2> /dev/null`
336 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
344 if [ "$CROSS_COMPILE" != "" ]; then
345 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
348 if [ "$app_type" = "sdl-sim" ]; then
349 echo "Simulator environment deemed $endian endian"
350 elif [ "$app_type" = "sdl-app" ]; then
351 echo "Application environment deemed $endian endian"
352 elif [ "$app_type" = "checkwps" ]; then
353 echo "CheckWPS environment deemed $endian endian"
356 # use wildcard here to make it work even if it was named *.exe like
358 rm -f $tmpdir/conftest-
$id*
360 # We are crosscompiling
361 # add cross-compiler option(s)
362 prefixtools i586-mingw32msvc-
363 LDOPTS
="$LDOPTS -mconsole"
365 output
="rockboxui.exe"
366 endian
="little" # windows is little endian
367 echo "Enabling MMX support"
368 GCCOPTS
="$GCCOPTS -mmmx"
372 if [ -z "$ARG_THREAD_SUPPORT" ] ||
[ "$ARG_THREAD_SUPPORT" = "0" ]; then
373 if [ "$sigaltstack" = "0" ]; then
374 thread_support
="HAVE_SIGALTSTACK_THREADS"
375 LDOPTS
="$LDOPTS -lpthread" # pthread needed
376 echo "Selected sigaltstack threads"
377 elif [ "$fibers" = "0" ]; then
378 thread_support
="HAVE_WIN32_FIBER_THREADS"
379 echo "Selected Win32 Fiber threads"
383 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
384 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
385 thread_support
="HAVE_SDL_THREADS"
386 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
387 echo "Selected SDL threads"
389 echo "WARNING: Falling back to SDL threads"
395 # functions for setting up cross-compiler names and options
396 # also set endianess and what the exact recommended gcc version is
397 # the gcc version should most likely match what versions we build with
402 GCCOPTS
="$CCOPTS -m1"
403 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
409 prefixtools calmrisc16-unknown-elf-
410 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
411 GCCOPTIMIZE
="-fomit-frame-pointer"
416 prefixtools m68k-elf-
417 GCCOPTS
="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
418 GCCOPTIMIZE
="-fomit-frame-pointer"
425 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
426 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
427 GCCOPTS
="$GCCOPTS -mlong-calls"
429 GCCOPTIMIZE
="-fomit-frame-pointer"
435 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
436 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
437 GCCOPTS
="$GCCOPTS -mlong-calls"
439 GCCOPTIMIZE
="-fomit-frame-pointer"
445 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
446 if test "$ARG_ARM_EABI" = "0"; then
447 GCCOPTS
="$GCCOPTS -mlong-calls"
449 GCCOPTIMIZE
="-fomit-frame-pointer"
455 GCCOPTS
="$CCOPTS -mcpu=arm940t"
456 if test "$ARG_ARM_EABI" = "0"; then
457 GCCOPTS
="$GCCOPTS -mlong-calls"
459 GCCOPTIMIZE
="-fomit-frame-pointer"
465 GCCOPTS
="$CCOPTS -mcpu=arm9e"
466 if test "$ARG_ARM_EABI" = "0"; then
467 GCCOPTS
="$GCCOPTS -mlong-calls"
469 GCCOPTIMIZE
="-fomit-frame-pointer"
475 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
476 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
477 GCCOPTS
="$GCCOPTS -mlong-calls"
479 GCCOPTIMIZE
="-fomit-frame-pointer"
485 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
486 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
487 GCCOPTS
="$GCCOPTS -mlong-calls"
489 GCCOPTIMIZE
="-fomit-frame-pointer"
495 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
496 if test "$ARG_ARM_EABI" = "0"; then
497 GCCOPTS
="$GCCOPTS -mlong-calls"
499 GCCOPTIMIZE
="-fomit-frame-pointer"
504 prefixtools mipsel-elf-
505 # mips is predefined, but we want it for paths. use __mips instead
506 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
507 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
508 GCCOPTIMIZE
="-fomit-frame-pointer"
514 # Scratchbox sets up "gcc" based on the active target
517 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
518 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
520 LDOPTS
="-lm -ldl $LDOPTS"
521 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
522 SHARED_FLAG
="-shared"
524 thread_support
="HAVE_SIGALTSTACK_THREADS"
527 # Determine maemo version
528 if pkg-config
--atleast-version=5 maemo-version
; then
529 if [ "$1" == "4" ]; then
530 echo "ERROR: Maemo 4 SDK required."
533 extradefines
="$extradefines -DMAEMO5"
534 echo "Found N900 maemo version"
536 elif pkg-config
--atleast-version=4 maemo-version
; then
537 if [ "$1" == "5" ]; then
538 echo "ERROR: Maemo 5 SDK required."
541 extradefines
="$extradefines -DMAEMO4"
542 echo "Found N8xx maemo version"
544 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
549 if [ $is_n900 -eq 1 ]; then
550 GCCOPTS
="$GCCOPTS `pkg-config --cflags sdl`"
551 LDOPTS
="$LDOPTS `pkg-config --libs sdl`"
553 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
554 LDOPTS
="$LDOPTS `sdl-config --libs`"
557 # glib and libosso support
558 GCCOPTS
="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
559 LDOPTS
="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
561 # libhal support: Battery monitoring
562 GCCOPTS
="$GCCOPTS `pkg-config --cflags hal`"
563 LDOPTS
="$LDOPTS `pkg-config --libs hal`"
565 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
566 if [ $is_n900 -eq 1 ]; then
567 # gstreamer support: Audio output.
568 GCCOPTS
="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
569 LDOPTS
="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
571 # N900 specific: libplayback support
572 GCCOPTS
="$GCCOPTS `pkg-config --cflags libplayback-1`"
573 LDOPTS
="$LDOPTS `pkg-config --libs libplayback-1`"
575 # N900 specific: Enable ARMv7 NEON support
576 if sb-conf show
-A |
grep -q -i arm
; then
577 echo "Detected ARM target"
578 GCCOPTS
="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
579 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
581 echo "Detected x86 target"
584 # N8xx specific: Enable armv5te instructions
585 if sb-conf show
-A |
grep -q -i arm
; then
586 echo "Detected ARM target"
587 GCCOPTS
="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
588 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
590 echo "Detected x86 target"
596 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
597 # You have to use the sebt3 toolchain:
598 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
600 PNDSDK
="/usr/local/angstrom/arm"
601 if [ ! -x $PNDSDK/bin
/arm-angstrom-linux-gnueabi-gcc
]; then
602 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
606 PATH
=$PNDSDK/bin
:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/bin
607 PKG_CONFIG_PATH
=$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/lib
/pkgconfig
608 LDOPTS
="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
609 PKG_CONFIG
="pkg-config"
611 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
612 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
614 LDOPTS
="-lm -ldl $LDOPTS"
615 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
616 SHARED_FLAG
="-shared"
618 thread_support
="HAVE_SIGALTSTACK_THREADS"
621 GCCOPTS
="-I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
625 prefixtools
"$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
628 GCCOPTS
="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
629 LDOPTS
="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
632 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
633 GCCOPTS
="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
634 GCCOPTS
="$GCCOPTS -ffast-math -fsingle-precision-constant"
638 if [ -z "$ANDROID_SDK_PATH" ]; then
639 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
640 echo "environment variable point to the root directory of the Android SDK."
643 if [ -z "$ANDROID_NDK_PATH" ]; then
644 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
645 echo "environment variable point to the root directory of the Android NDK."
648 buildhost
=`uname | tr [:upper:] [:lower:]`
650 gcctarget
="arm-linux-androideabi-"
651 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
652 PATH
=$PATH:$gccprefix/bin
653 prefixtools
$gcctarget
654 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
655 GCCOPTS
="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
656 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
657 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
658 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
659 LDOPTS
="$LDOPTS -shared -nostdlib -ldl -llog"
661 SHARED_FLAG
="-shared"
665 atype
=`echo "$1" | cut -c 2-`
666 ##################################################################
667 # Prompt for specific developer options
669 if [ "$atype" ]; then
674 printf "Enter your developer options (press only enter when done)\n\
675 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
676 (T)est plugins, S(m)all C lib:"
677 if [ "$memory" = "2" ]; then
680 if [ "$modelname" = "archosplayer" ]; then
681 printf ", Use (A)TA poweroff"
683 if [ "$t_model" = "ondio" ]; then
684 printf ", (B)acklight MOD"
686 if [ "$modelname" = "iaudiom5" ]; then
687 printf ", (F)M radio MOD"
689 if [ "$modelname" = "iriverh120" ]; then
696 while [ $cont = "1" ]; do
698 if [ "$interact" ]; then
701 option
=`echo "$atype" | cut -c 1`
706 if [ "yes" = "$profile" ]; then
707 echo "Debug is incompatible with profiling"
709 echo "DEBUG build enabled"
714 echo "logf() support enabled"
718 echo "Using Rockbox' small C library"
719 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
722 echo "Including test plugins"
723 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
726 echo "bootchart enabled (logf also enabled)"
731 echo "Simulator build enabled"
735 if [ "yes" = "$use_debug" ]; then
736 echo "Profiling is incompatible with debug"
738 echo "Profiling support is enabled"
743 echo "Voice build selected"
747 if [ "$memory" = "2" ]; then
749 echo "Memory size selected: 8MB"
753 if [ "$modelname" = "archosplayer" ]; then
754 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
755 echo "ATA power off enabled"
759 if [ "$t_model" = "ondio" ]; then
760 have_backlight
="#define HAVE_BACKLIGHT"
761 echo "Backlight functions enabled"
765 if [ "$modelname" = "iaudiom5" ]; then
766 have_fmradio_in
="#define HAVE_FMRADIO_IN"
767 echo "FM radio functions enabled"
771 if [ "$modelname" = "iriverh120" ]; then
772 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
773 have_rtc_alarm
="#define HAVE_RTC_ALARM"
774 echo "RTC functions enabled (DS1339/DS3231)"
778 echo "Enabling Windows 32 cross-compiling"
779 win32crosscompile
="yes"
781 "") # Match enter press when finished with advanced options
785 echo "[ERROR] Option $option unsupported"
788 if [ "$interact" ]; then
789 btype
="$btype$option"
791 atype
=`echo "$atype" | cut -c 2-`
792 [ "$atype" ] || cont
=0
797 if [ "yes" = "$voice" ]; then
798 # Ask about languages to build
800 voicelanguage
=`whichlang`
801 echo "Voice language set to $voicelanguage"
803 # Configure encoder and TTS engine for each language
804 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
805 voiceconfig
"$thislang"
808 if [ "yes" = "$use_debug" ]; then
810 GCCOPTS
="$GCCOPTS -g -DDEBUG"
812 if [ "yes" = "$logf" ]; then
813 use_logf
="#define ROCKBOX_HAS_LOGF 1"
815 if [ "yes" = "$bootchart" ]; then
816 use_bootchart
="#define DO_BOOTCHART 1"
818 if [ "yes" = "$simulator" ]; then
820 extradefines
="$extradefines -DSIMULATOR"
824 if [ "yes" = "$profile" ]; then
825 extradefines
="$extradefines -DRB_PROFILE"
826 PROFILE_OPTS
="-finstrument-functions"
830 # Configure voice settings
833 if [ ! "$ARG_TTS" ]; then
834 echo "Building $thislang voice for $modelname. Select options"
838 if [ -n "`findtool flite`" ]; then
842 DEFAULT_TTS_OPTS
=$FLITE_OPTS
843 DEFAULT_NOISEFLOOR
="500"
846 if [ -n "`findtool espeak`" ]; then
850 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
851 DEFAULT_NOISEFLOOR
="500"
854 if [ -n "`findtool festival`" ]; then
855 FESTIVAL
="(F)estival "
858 FESTIVAL_OPTS
="--language italian"
861 FESTIVAL_OPTS
="--language spanish"
864 FESTIVAL_OPTS
="--language finnish"
867 FESTIVAL_OPTS
="--language czech"
873 DEFAULT_TTS
="festival"
874 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
875 DEFAULT_NOISEFLOOR
="500"
878 if [ -n "`findtool swift`" ]; then
882 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
883 DEFAULT_NOISEFLOOR
="500"
886 # Allow SAPI if Windows is in use
887 if [ -n "`findtool winver`" ]; then
891 DEFAULT_TTS_OPTS
=$SAPI_OPTS
892 DEFAULT_NOISEFLOOR
="500"
896 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
897 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
901 if [ "$ARG_TTS" ]; then
904 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
907 advopts
="$advopts --tts=$option"
911 NOISEFLOOR
="500" # TODO: check this value
917 TTS_OPTS
=$ESPEAK_OPTS
920 TTS_ENGINE
="festival"
922 TTS_OPTS
=$FESTIVAL_OPTS
935 TTS_ENGINE
=$DEFAULT_TTS
936 TTS_OPTS
=$DEFAULT_TTS_OPTS
937 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
939 echo "Using $TTS_ENGINE for TTS"
941 # Select which voice to use for Festival
942 if [ "$TTS_ENGINE" = "festival" ]; then
943 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
944 for voice
in $voicelist; do
945 TTS_FESTIVAL_VOICE
="$voice" # Default choice
948 if [ "$ARG_VOICE" ]; then
952 for voice
in $voicelist; do
953 printf "%3d. %s\n" "$i" "$voice"
956 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
960 for voice
in $voicelist; do
961 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
962 TTS_FESTIVAL_VOICE
="$voice"
966 advopts
="$advopts --voice=$CHOICE"
967 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
968 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
971 # Read custom tts options from command line
972 if [ "$ARG_TTSOPTS" ]; then
973 TTS_OPTS
="$ARG_TTSOPTS"
974 advopts
="$advopts --ttsopts='$TTS_OPTS'"
975 echo "$TTS_ENGINE options set to $TTS_OPTS"
978 if [ "$swcodec" = "yes" ]; then
981 ENC_OPTS
="-q 4 -c 10"
983 if [ -n "`findtool lame`" ]; then
986 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
988 echo "You need LAME in the system path to build voice files for"
989 echo "HWCODEC targets."
994 echo "Using $ENCODER for encoding voice clips"
996 # Read custom encoder options from command line
997 if [ "$ARG_ENCOPTS" ]; then
998 ENC_OPTS
="$ARG_ENCOPTS"
999 advopts
="$advopts --encopts='$ENC_OPTS'"
1000 echo "$ENCODER options set to $ENC_OPTS"
1004 if [ -n "`findtool cygpath`" ]; then
1005 TEMPDIR
=`cygpath . -a -w`
1010 # figure out which languages that are around
1011 for file in $rootdir/apps
/lang
/*.lang
; do
1012 clean
=`basename $file .lang`
1013 langs
="$langs $clean"
1016 if [ "$ARG_LANG" ]; then
1019 echo "Select a number for the language to use (default is english)"
1020 # FIXME The multiple-language feature is currently broken
1021 # echo "You may enter a comma-separated list of languages to build"
1024 for one
in $langs; do
1030 advopts
="$advopts --language=$pick"
1035 # Allow the user to pass a comma-separated list of langauges
1036 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1038 for one
in $langs; do
1039 # Accept both the language number and name
1040 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1041 if [ "$output" = "" ]; then
1050 if [ -z "$output" ]; then
1058 echo "Rockbox configure script."
1059 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1060 echo "Do *NOT* run this within the tools directory!"
1063 Usage: configure [OPTION]...
1065 --target=TARGET Sets the target, TARGET can be either the target ID or
1066 corresponding string. Run without this option to see all
1069 --ram=RAM Sets the RAM for certain targets. Even though any number
1070 is accepted, not every number is correct. The default
1071 value will be applied, if you entered a wrong number
1072 (which depends on the target). Watch the output. Run
1073 without this option if you are not sure which the right
1076 --type=TYPE Sets the build type. Shortcuts are also valid.
1077 Run without this option to see all available types.
1078 Multiple values are allowed and managed in the input
1079 order. So --type=b stands for Bootloader build, while
1080 --type=ab stands for "Backlight MOD" build.
1082 --language=LANG Set the language used for voice generation (used only if
1085 --tts=ENGINE Set the TTS engine used for voice generation (used only
1088 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1091 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1093 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1095 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1096 This is useful for having multiple alternate builds on
1097 your device that you can load with ROLO. However as the
1098 bootloader looks for .rockbox you won't be able to boot
1101 --ccache Enable ccache use (done by default these days)
1102 --no-ccache Disable ccache use
1104 --eabi Make configure prefer toolchains that are able to compile
1105 for the new ARM standard abi EABI
1106 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1107 --thumb Build with -mthumb (for ARM builds)
1108 --no-thumb The opposite of --thumb (don't use thumb even for targets
1109 where this is the default
1110 --sdl-threads Force use of SDL threads. They have inferior performance,
1111 but are better debuggable with GDB
1112 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1113 behavior of falling back to them if no native thread
1115 --prefix Target installation directory
1116 --help Shows this message (must not be used with other options)
1135 ARG_PREFIX
="$PREFIX"
1140 --ccache) ARG_CCACHE
=1;;
1141 --no-ccache) ARG_CCACHE
=0;;
1142 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1143 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1144 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1145 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1146 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1147 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1148 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1149 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1150 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1151 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1152 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1153 --eabi) ARG_ARM_EABI
=1;;
1154 --no-eabi) ARG_ARM_EABI
=0;;
1155 --thumb) ARG_ARM_THUMB
=1;;
1156 --no-thumb) ARG_ARM_THUMB
=0;;
1157 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1159 ARG_THREAD_SUPPORT
=0;;
1160 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1162 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1165 [ "$err" ] && exit 1
1169 if [ "$TMPDIR" != "" ]; then
1174 echo Using temporary directory
$tmpdir
1176 if test -r "configure"; then
1177 # this is a check for a configure script in the current directory, it there
1178 # is one, try to figure out if it is this one!
1180 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1181 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1182 echo "It will only cause you pain and grief. Instead do this:"
1185 echo " mkdir build-dir"
1186 echo " cd build-dir"
1187 echo " ../tools/configure"
1189 echo "Much happiness will arise from this. Enjoy"
1194 # get our current directory
1197 if { echo $pwd |
grep " "; } then
1198 echo "You're running this script in a path that contains space. The build"
1199 echo "system is unfortunately not clever enough to deal with this. Please"
1200 echo "run the script from a different path, rename the path or fix the build"
1205 if [ -z "$rootdir" ]; then
1206 ##################################################################
1207 # Figure out where the source code root is!
1209 rootdir
=`dirname $0`/..
/
1211 #####################################################################
1212 # Convert the possibly relative directory name to an absolute version
1218 # cd back to the build dir
1223 appsdir
='\$(ROOTDIR)/apps'
1224 firmdir
='\$(ROOTDIR)/firmware'
1225 toolsdir
='\$(ROOTDIR)/tools'
1228 ##################################################################
1229 # Figure out target platform
1232 if [ "$ARG_TARGET" ]; then
1233 buildfor
=$ARG_TARGET
1235 echo "Enter target platform:"
1237 ==Archos== ==iriver== ==Apple iPod==
1238 0) Player/Studio 10) H120/H140 20) Color/Photo
1239 1) Recorder 11) H320/H340 21) Nano 1G
1240 2) FM Recorder 12) iHP-100/110/115 22) Video
1241 3) Recorder v2 13) iFP-790 23) 3G
1242 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1243 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1244 6) AV300 26) Mini 2G
1245 ==Toshiba== 27) 1G, 2G
1246 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1247 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1249 32) 7 ==Olympus= ==SanDisk==
1250 33) D2 70) M:Robe 500 50) Sansa e200
1251 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1253 ==Creative== ==Philips== 53) Sansa m200
1254 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1255 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1256 92) Zen Vision HDD1830 56) Sansa e200v2
1257 102) GoGear HDD6330 57) Sansa m200v4
1258 ==Onda== 58) Sansa Fuze
1259 120) VX747 ==Meizu== 59) Sansa c200v2
1260 121) VX767 110) M6SL 60) Sansa Clipv2
1261 122) VX747+ 111) M6SP 61) Sansa View
1262 123) VX777 112) M3 62) Sansa Clip+
1264 ==Samsung== ==Tatung== 64) Sansa Fuze+
1265 140) YH-820 150) Elio TPJ-1022
1266 141) YH-920 ==Logik==
1267 142) YH-925 ==Packard Bell== 80) DAX 1GB MP3/DAB
1268 143) YP-S3 160) Vibe 500
1270 ==Application== ==MPIO== 130) Lyre proto 1
1271 200) SDL 170) HD200 131) Mini2440
1272 201) Android 171) HD300
1282 # Set of tools built for all target platforms:
1283 toolset
="rdf2binary convbdf codepages"
1285 # Toolsets for some target families:
1286 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1287 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1288 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1289 ipodbitmaptools
="$toolset scramble bmp2rb"
1290 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1291 tccbitmaptools
="$toolset scramble bmp2rb"
1292 # generic is used by IFP, Meizu and Onda
1293 genericbitmaptools
="$toolset bmp2rb"
1294 # scramble is used by all other targets
1295 scramblebitmaptools
="$genericbitmaptools scramble"
1298 # ---- For each target ----
1301 # target_id: a unique number identifying this target, IS NOT the menu number.
1302 # Just use the currently highest number+1 when you add a new
1304 # modelname: short model name used all over to identify this target
1305 # memory: number of megabytes of RAM this target has. If the amount can
1306 # be selected by the size prompt, let memory be unset here
1307 # target: -Ddefine passed to the build commands to make the correct
1308 # config-*.h file get included etc
1309 # tool: the tool that takes a plain binary and converts that into a
1310 # working "firmware" file for your target
1311 # output: the final output file name
1312 # boottool: the tool that takes a plain binary and generates a bootloader
1313 # file for your target (or blank to use $tool)
1314 # bootoutput:the final output file name for the bootloader (or blank to use
1316 # appextra: passed to the APPEXTRA variable in the Makefiles.
1317 # TODO: add proper explanation
1318 # archosrom: used only for Archos targets that build a special flashable .ucl
1320 # flash: name of output for flashing, for targets where there's a special
1321 # file output for this.
1322 # plugins: set to 'yes' to build the plugins. Early development builds can
1323 # set this to no in the early stages to have an easier life for a
1325 # swcodec: set 'yes' on swcodec targets
1326 # toolset: lists what particular tools in the tools/ directory that this
1327 # target needs to have built prior to building Rockbox
1330 # *cc: sets up gcc and compiler options for your target builds. Note
1331 # that if you select a simulator build, the compiler selection is
1332 # overridden later in the script.
1338 modelname
="archosplayer"
1339 target
="-DARCHOS_PLAYER"
1341 tool
="$rootdir/tools/scramble"
1343 appextra
="player:gui"
1344 archosrom
="$pwd/rombox.ucl"
1345 flash
="$pwd/rockbox.ucl"
1349 # toolset is the tools within the tools directory that we build for
1350 # this particular target.
1351 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1353 # Note: the convbdf is present in the toolset just because: 1) the
1354 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1355 # build the player simulator
1358 t_manufacturer
="archos"
1364 modelname
="archosrecorder"
1365 target
="-DARCHOS_RECORDER"
1367 tool
="$rootdir/tools/scramble"
1368 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1369 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1371 appextra
="recorder:gui:radio"
1372 #archosrom="$pwd/rombox.ucl"
1373 flash
="$pwd/rockbox.ucl"
1376 # toolset is the tools within the tools directory that we build for
1377 # this particular target.
1378 toolset
=$archosbitmaptools
1380 t_manufacturer
="archos"
1386 modelname
="archosfmrecorder"
1387 target
="-DARCHOS_FMRECORDER"
1389 tool
="$rootdir/tools/scramble -fm"
1390 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1391 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1393 appextra
="recorder:gui:radio"
1394 #archosrom="$pwd/rombox.ucl"
1395 flash
="$pwd/rockbox.ucl"
1398 # toolset is the tools within the tools directory that we build for
1399 # this particular target.
1400 toolset
=$archosbitmaptools
1402 t_manufacturer
="archos"
1408 modelname
="archosrecorderv2"
1409 target
="-DARCHOS_RECORDERV2"
1411 tool
="$rootdir/tools/scramble -v2"
1412 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1413 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1415 appextra
="recorder:gui:radio"
1416 #archosrom="$pwd/rombox.ucl"
1417 flash
="$pwd/rockbox.ucl"
1420 # toolset is the tools within the tools directory that we build for
1421 # this particular target.
1422 toolset
=$archosbitmaptools
1424 t_manufacturer
="archos"
1430 modelname
="archosondiosp"
1431 target
="-DARCHOS_ONDIOSP"
1433 tool
="$rootdir/tools/scramble -osp"
1434 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1435 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1437 appextra
="recorder:gui:radio"
1438 #archosrom="$pwd/rombox.ucl"
1439 flash
="$pwd/rockbox.ucl"
1442 # toolset is the tools within the tools directory that we build for
1443 # this particular target.
1444 toolset
=$archosbitmaptools
1446 t_manufacturer
="archos"
1452 modelname
="archosondiofm"
1453 target
="-DARCHOS_ONDIOFM"
1455 tool
="$rootdir/tools/scramble -ofm"
1456 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1457 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1459 appextra
="recorder:gui:radio"
1460 #archosrom="$pwd/rombox.ucl"
1461 flash
="$pwd/rockbox.ucl"
1464 toolset
=$archosbitmaptools
1466 t_manufacturer
="archos"
1472 modelname
="archosav300"
1473 target
="-DARCHOS_AV300"
1476 tool
="$rootdir/tools/scramble -mm=C"
1477 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1478 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1480 appextra
="recorder:gui:radio"
1483 # toolset is the tools within the tools directory that we build for
1484 # this particular target.
1485 toolset
="$toolset scramble descramble bmp2rb"
1486 # architecture, manufacturer and model for the target-tree build
1488 t_manufacturer
="archos"
1494 modelname
="iriverh120"
1495 target
="-DIRIVER_H120"
1498 tool
="$rootdir/tools/scramble -add=h120"
1499 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1500 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1501 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1502 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1503 output
="rockbox.iriver"
1504 bootoutput
="bootloader.iriver"
1505 appextra
="recorder:gui:radio"
1506 flash
="$pwd/rombox.iriver"
1509 # toolset is the tools within the tools directory that we build for
1510 # this particular target.
1511 toolset
=$iriverbitmaptools
1513 t_manufacturer
="iriver"
1519 modelname
="iriverh300"
1520 target
="-DIRIVER_H300"
1523 tool
="$rootdir/tools/scramble -add=h300"
1524 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1525 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1526 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1527 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1528 output
="rockbox.iriver"
1529 appextra
="recorder:gui:radio"
1532 # toolset is the tools within the tools directory that we build for
1533 # this particular target.
1534 toolset
=$iriverbitmaptools
1536 t_manufacturer
="iriver"
1542 modelname
="iriverh100"
1543 target
="-DIRIVER_H100"
1546 tool
="$rootdir/tools/scramble -add=h100"
1547 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1548 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1549 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1550 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1551 output
="rockbox.iriver"
1552 bootoutput
="bootloader.iriver"
1553 appextra
="recorder:gui:radio"
1554 flash
="$pwd/rombox.iriver"
1557 # toolset is the tools within the tools directory that we build for
1558 # this particular target.
1559 toolset
=$iriverbitmaptools
1561 t_manufacturer
="iriver"
1567 modelname
="iriverifp7xx"
1568 target
="-DIRIVER_IFP7XX"
1572 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1573 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1574 output
="rockbox.wma"
1575 appextra
="recorder:gui:radio"
1578 # toolset is the tools within the tools directory that we build for
1579 # this particular target.
1580 toolset
=$genericbitmaptools
1582 t_manufacturer
="pnx0101"
1583 t_model
="iriver-ifp7xx"
1588 modelname
="iriverh10"
1589 target
="-DIRIVER_H10"
1592 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1593 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1594 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1595 output
="rockbox.mi4"
1596 appextra
="recorder:gui:radio"
1599 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1600 bootoutput
="H10_20GC.mi4"
1601 # toolset is the tools within the tools directory that we build for
1602 # this particular target.
1603 toolset
=$scramblebitmaptools
1604 # architecture, manufacturer and model for the target-tree build
1606 t_manufacturer
="iriver"
1612 modelname
="iriverh10_5gb"
1613 target
="-DIRIVER_H10_5GB"
1616 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1617 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1618 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1619 output
="rockbox.mi4"
1620 appextra
="recorder:gui:radio"
1623 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1624 bootoutput
="H10.mi4"
1625 # toolset is the tools within the tools directory that we build for
1626 # this particular target.
1627 toolset
=$scramblebitmaptools
1628 # architecture, manufacturer and model for the target-tree build
1630 t_manufacturer
="iriver"
1636 modelname
="ipodcolor"
1637 target
="-DIPOD_COLOR"
1640 tool
="$rootdir/tools/scramble -add=ipco"
1641 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1642 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1643 output
="rockbox.ipod"
1644 appextra
="recorder:gui:radio"
1647 bootoutput
="bootloader-$modelname.ipod"
1648 # toolset is the tools within the tools directory that we build for
1649 # this particular target.
1650 toolset
=$ipodbitmaptools
1651 # architecture, manufacturer and model for the target-tree build
1653 t_manufacturer
="ipod"
1659 modelname
="ipodnano1g"
1660 target
="-DIPOD_NANO"
1663 tool
="$rootdir/tools/scramble -add=nano"
1664 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1665 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1666 output
="rockbox.ipod"
1667 appextra
="recorder:gui:radio"
1670 bootoutput
="bootloader-$modelname.ipod"
1671 # toolset is the tools within the tools directory that we build for
1672 # this particular target.
1673 toolset
=$ipodbitmaptools
1674 # architecture, manufacturer and model for the target-tree build
1676 t_manufacturer
="ipod"
1682 modelname
="ipodvideo"
1683 target
="-DIPOD_VIDEO"
1684 memory
=64 # always. This is reduced at runtime if needed
1686 tool
="$rootdir/tools/scramble -add=ipvd"
1687 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1688 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1689 output
="rockbox.ipod"
1690 appextra
="recorder:gui:radio"
1693 bootoutput
="bootloader-$modelname.ipod"
1694 # toolset is the tools within the tools directory that we build for
1695 # this particular target.
1696 toolset
=$ipodbitmaptools
1697 # architecture, manufacturer and model for the target-tree build
1699 t_manufacturer
="ipod"
1709 tool
="$rootdir/tools/scramble -add=ip3g"
1710 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1711 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1712 output
="rockbox.ipod"
1713 appextra
="recorder:gui:radio"
1716 bootoutput
="bootloader-$modelname.ipod"
1717 # toolset is the tools within the tools directory that we build for
1718 # this particular target.
1719 toolset
=$ipodbitmaptools
1720 # architecture, manufacturer and model for the target-tree build
1722 t_manufacturer
="ipod"
1732 tool
="$rootdir/tools/scramble -add=ip4g"
1733 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1734 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1735 output
="rockbox.ipod"
1736 appextra
="recorder:gui:radio"
1739 bootoutput
="bootloader-$modelname.ipod"
1740 # toolset is the tools within the tools directory that we build for
1741 # this particular target.
1742 toolset
=$ipodbitmaptools
1743 # architecture, manufacturer and model for the target-tree build
1745 t_manufacturer
="ipod"
1751 modelname
="ipodmini1g"
1752 target
="-DIPOD_MINI"
1755 tool
="$rootdir/tools/scramble -add=mini"
1756 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1757 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1758 output
="rockbox.ipod"
1759 appextra
="recorder:gui:radio"
1762 bootoutput
="bootloader-$modelname.ipod"
1763 # toolset is the tools within the tools directory that we build for
1764 # this particular target.
1765 toolset
=$ipodbitmaptools
1766 # architecture, manufacturer and model for the target-tree build
1768 t_manufacturer
="ipod"
1774 modelname
="ipodmini2g"
1775 target
="-DIPOD_MINI2G"
1778 tool
="$rootdir/tools/scramble -add=mn2g"
1779 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1780 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1781 output
="rockbox.ipod"
1782 appextra
="recorder:gui:radio"
1785 bootoutput
="bootloader-$modelname.ipod"
1786 # toolset is the tools within the tools directory that we build for
1787 # this particular target.
1788 toolset
=$ipodbitmaptools
1789 # architecture, manufacturer and model for the target-tree build
1791 t_manufacturer
="ipod"
1797 modelname
="ipod1g2g"
1798 target
="-DIPOD_1G2G"
1801 tool
="$rootdir/tools/scramble -add=1g2g"
1802 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1803 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1804 output
="rockbox.ipod"
1805 appextra
="recorder:gui:radio"
1808 bootoutput
="bootloader-$modelname.ipod"
1809 # toolset is the tools within the tools directory that we build for
1810 # this particular target.
1811 toolset
=$ipodbitmaptools
1812 # architecture, manufacturer and model for the target-tree build
1814 t_manufacturer
="ipod"
1820 modelname
="ipodnano2g"
1821 target
="-DIPOD_NANO2G"
1824 tool
="$rootdir/tools/scramble -add=nn2g"
1825 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1826 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1827 output
="rockbox.ipod"
1828 appextra
="recorder:gui:radio"
1831 bootoutput
="bootloader-$modelname.ipod"
1832 # toolset is the tools within the tools directory that we build for
1833 # this particular target.
1834 toolset
=$ipodbitmaptools
1835 # architecture, manufacturer and model for the target-tree build
1837 t_manufacturer
="s5l8700"
1838 t_model
="ipodnano2g"
1847 tool
="$rootdir/tools/scramble -add=ip6g"
1848 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1849 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1850 output
="rockbox.ipod"
1851 appextra
="recorder:gui:radio"
1854 bootoutput
="bootloader-$modelname.ipod"
1855 # toolset is the tools within the tools directory that we build for
1856 # this particular target.
1857 toolset
=$ipodbitmaptools
1858 # architecture, manufacturer and model for the target-tree build
1860 t_manufacturer
="s5l8702"
1866 modelname
="iaudiox5"
1867 target
="-DIAUDIO_X5"
1870 tool
="$rootdir/tools/scramble -add=iax5"
1871 boottool
="$rootdir/tools/scramble -iaudiox5"
1872 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1873 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1874 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1875 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1876 output
="rockbox.iaudio"
1877 bootoutput
="x5_fw.bin"
1878 appextra
="recorder:gui:radio"
1881 # toolset is the tools within the tools directory that we build for
1882 # this particular target.
1883 toolset
="$iaudiobitmaptools"
1884 # architecture, manufacturer and model for the target-tree build
1886 t_manufacturer
="iaudio"
1892 modelname
="iaudiom5"
1893 target
="-DIAUDIO_M5"
1896 tool
="$rootdir/tools/scramble -add=iam5"
1897 boottool
="$rootdir/tools/scramble -iaudiom5"
1898 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1899 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1900 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1901 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1902 output
="rockbox.iaudio"
1903 bootoutput
="m5_fw.bin"
1904 appextra
="recorder:gui:radio"
1907 # toolset is the tools within the tools directory that we build for
1908 # this particular target.
1909 toolset
="$iaudiobitmaptools"
1910 # architecture, manufacturer and model for the target-tree build
1912 t_manufacturer
="iaudio"
1922 tool
="$rootdir/tools/scramble -add=i7"
1923 boottool
="$rootdir/tools/scramble -tcc=crc"
1924 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1925 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1926 output
="rockbox.iaudio"
1927 appextra
="recorder:gui:radio"
1930 bootoutput
="I7_FW.BIN"
1931 # toolset is the tools within the tools directory that we build for
1932 # this particular target.
1933 toolset
="$tccbitmaptools"
1934 # architecture, manufacturer and model for the target-tree build
1936 t_manufacturer
="tcc77x"
1946 tool
="$rootdir/tools/scramble -add=d2"
1948 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1949 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1951 bootoutput
="bootloader-cowond2.bin"
1952 appextra
="recorder:gui:radio"
1955 toolset
="$tccbitmaptools"
1956 # architecture, manufacturer and model for the target-tree build
1958 t_manufacturer
="tcc780x"
1964 modelname
="iaudiom3"
1965 target
="-DIAUDIO_M3"
1968 tool
="$rootdir/tools/scramble -add=iam3"
1969 boottool
="$rootdir/tools/scramble -iaudiom3"
1970 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1971 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
1972 output
="rockbox.iaudio"
1973 bootoutput
="cowon_m3.bin"
1974 appextra
="recorder:gui:radio"
1977 # toolset is the tools within the tools directory that we build for
1978 # this particular target.
1979 toolset
="$iaudiobitmaptools"
1980 # architecture, manufacturer and model for the target-tree build
1982 t_manufacturer
="iaudio"
1988 modelname
="gigabeatfx"
1989 target
="-DGIGABEAT_F"
1992 tool
="$rootdir/tools/scramble -add=giga"
1993 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1994 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1995 output
="rockbox.gigabeat"
1996 appextra
="recorder:gui:radio"
1999 toolset
=$gigabeatbitmaptools
2000 boottool
="$rootdir/tools/scramble -gigabeat"
2001 bootoutput
="FWIMG01.DAT"
2002 # architecture, manufacturer and model for the target-tree build
2004 t_manufacturer
="s3c2440"
2005 t_model
="gigabeat-fx"
2010 modelname
="gigabeats"
2011 target
="-DGIGABEAT_S"
2014 tool
="$rootdir/tools/scramble -add=gigs"
2015 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2016 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2017 output
="rockbox.gigabeat"
2018 appextra
="recorder:gui:radio"
2021 toolset
="$gigabeatbitmaptools"
2022 boottool
="$rootdir/tools/scramble -gigabeats"
2024 # architecture, manufacturer and model for the target-tree build
2026 t_manufacturer
="imx31"
2027 t_model
="gigabeat-s"
2032 modelname
="mrobe500"
2033 target
="-DMROBE_500"
2036 tool
="$rootdir/tools/scramble -add=m500"
2037 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2038 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2039 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2040 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2041 output
="rockbox.mrobe500"
2042 appextra
="recorder:gui:radio"
2045 toolset
=$gigabeatbitmaptools
2047 bootoutput
="rockbox.mrboot"
2048 # architecture, manufacturer and model for the target-tree build
2050 t_manufacturer
="tms320dm320"
2056 modelname
="mrobe100"
2057 target
="-DMROBE_100"
2060 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2061 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2062 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2063 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2064 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2065 output
="rockbox.mi4"
2066 appextra
="recorder:gui:radio"
2069 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2070 bootoutput
="pp5020.mi4"
2071 # toolset is the tools within the tools directory that we build for
2072 # this particular target.
2073 toolset
=$scramblebitmaptools
2074 # architecture, manufacturer and model for the target-tree build
2076 t_manufacturer
="olympus"
2082 modelname
="logikdax"
2083 target
="-DLOGIK_DAX"
2086 tool
="$rootdir/tools/scramble -add=ldax"
2087 boottool
="$rootdir/tools/scramble -tcc=crc"
2088 bootoutput
="player.rom"
2089 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2090 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2091 output
="rockbox.logik"
2092 appextra
="recorder:gui:radio"
2095 # toolset is the tools within the tools directory that we build for
2096 # this particular target.
2097 toolset
=$tccbitmaptools
2098 # architecture, manufacturer and model for the target-tree build
2100 t_manufacturer
="tcc77x"
2106 modelname
="zenvisionm30gb"
2107 target
="-DCREATIVE_ZVM"
2110 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2111 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2112 tool
="$rootdir/tools/scramble -creative=zvm"
2114 output
="rockbox.zvm"
2115 appextra
="recorder:gui:radio"
2118 toolset
=$ipodbitmaptools
2119 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2120 bootoutput
="rockbox.zvmboot"
2121 # architecture, manufacturer and model for the target-tree build
2123 t_manufacturer
="tms320dm320"
2124 t_model
="creative-zvm"
2129 modelname
="zenvisionm60gb"
2130 target
="-DCREATIVE_ZVM60GB"
2133 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2134 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2135 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2137 output
="rockbox.zvm60"
2138 appextra
="recorder:gui:radio"
2141 toolset
=$ipodbitmaptools
2142 boottool
="$rootdir/tools/scramble -creative=zvm60"
2143 bootoutput
="rockbox.zvm60boot"
2144 # architecture, manufacturer and model for the target-tree build
2146 t_manufacturer
="tms320dm320"
2147 t_model
="creative-zvm"
2152 modelname
="zenvision"
2153 target
="-DCREATIVE_ZV"
2156 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2157 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2158 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2161 appextra
="recorder:gui:radio"
2164 toolset
=$ipodbitmaptools
2165 boottool
="$rootdir/tools/scramble -creative=zenvision"
2166 bootoutput
="rockbox.zvboot"
2167 # architecture, manufacturer and model for the target-tree build
2169 t_manufacturer
="tms320dm320"
2170 t_model
="creative-zvm"
2175 modelname
="sansae200"
2176 target
="-DSANSA_E200"
2177 memory
=32 # supposedly
2179 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2180 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2181 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2182 output
="rockbox.mi4"
2183 appextra
="recorder:gui:radio"
2186 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2187 bootoutput
="PP5022.mi4"
2188 # toolset is the tools within the tools directory that we build for
2189 # this particular target.
2190 toolset
=$scramblebitmaptools
2191 # architecture, manufacturer and model for the target-tree build
2193 t_manufacturer
="sandisk"
2194 t_model
="sansa-e200"
2198 # the e200R model is pretty much identical to the e200, it only has a
2199 # different option to the scramble tool when building a bootloader and
2200 # makes the bootloader output file name in all lower case.
2202 modelname
="sansae200r"
2203 target
="-DSANSA_E200"
2204 memory
=32 # supposedly
2206 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2207 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2208 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2209 output
="rockbox.mi4"
2210 appextra
="recorder:gui:radio"
2213 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2214 bootoutput
="pp5022.mi4"
2215 # toolset is the tools within the tools directory that we build for
2216 # this particular target.
2217 toolset
=$scramblebitmaptools
2218 # architecture, manufacturer and model for the target-tree build
2220 t_manufacturer
="sandisk"
2221 t_model
="sansa-e200"
2226 modelname
="sansac200"
2227 target
="-DSANSA_C200"
2228 memory
=32 # supposedly
2230 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2231 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2232 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2233 output
="rockbox.mi4"
2234 appextra
="recorder:gui:radio"
2237 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2238 bootoutput
="firmware.mi4"
2239 # toolset is the tools within the tools directory that we build for
2240 # this particular target.
2241 toolset
=$scramblebitmaptools
2242 # architecture, manufacturer and model for the target-tree build
2244 t_manufacturer
="sandisk"
2245 t_model
="sansa-c200"
2250 modelname
="sansam200"
2251 target
="-DSANSA_M200"
2254 tool
="$rootdir/tools/scramble -add=m200"
2255 boottool
="$rootdir/tools/scramble -tcc=crc"
2256 bootoutput
="player.rom"
2257 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2258 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2259 output
="rockbox.m200"
2260 appextra
="recorder:gui:radio"
2263 # toolset is the tools within the tools directory that we build for
2264 # this particular target.
2265 toolset
=$tccbitmaptools
2266 # architecture, manufacturer and model for the target-tree build
2268 t_manufacturer
="tcc77x"
2274 modelname
="sansac100"
2275 target
="-DSANSA_C100"
2278 tool
="$rootdir/tools/scramble -add=c100"
2279 boottool
="$rootdir/tools/scramble -tcc=crc"
2280 bootoutput
="player.rom"
2281 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2282 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2283 output
="rockbox.c100"
2284 appextra
="recorder:gui:radio"
2287 # toolset is the tools within the tools directory that we build for
2288 # this particular target.
2289 toolset
=$tccbitmaptools
2290 # architecture, manufacturer and model for the target-tree build
2292 t_manufacturer
="tcc77x"
2298 modelname
="sansaclip"
2299 target
="-DSANSA_CLIP"
2301 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2302 bmp2rb_native
="$bmp2rb_mono"
2303 tool
="$rootdir/tools/scramble -add=clip"
2304 output
="rockbox.sansa"
2305 bootoutput
="bootloader-clip.sansa"
2306 appextra
="recorder:gui:radio"
2309 toolset
=$scramblebitmaptools
2311 t_manufacturer
="as3525"
2312 t_model
="sansa-clip"
2313 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2315 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2321 modelname
="sansae200v2"
2322 target
="-DSANSA_E200V2"
2324 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2325 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2326 tool
="$rootdir/tools/scramble -add=e2v2"
2327 output
="rockbox.sansa"
2328 bootoutput
="bootloader-e200v2.sansa"
2329 appextra
="recorder:gui:radio"
2332 toolset
=$scramblebitmaptools
2334 t_manufacturer
="as3525"
2335 t_model
="sansa-e200v2"
2342 modelname
="sansam200v4"
2343 target
="-DSANSA_M200V4"
2345 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2346 bmp2rb_native
="$bmp2rb_mono"
2347 tool
="$rootdir/tools/scramble -add=m2v4"
2348 output
="rockbox.sansa"
2349 bootoutput
="bootloader-m200v4.sansa"
2350 appextra
="recorder:gui:radio"
2353 toolset
=$scramblebitmaptools
2355 t_manufacturer
="as3525"
2356 t_model
="sansa-m200v4"
2357 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2359 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2365 modelname
="sansafuze"
2366 target
="-DSANSA_FUZE"
2368 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2369 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2370 tool
="$rootdir/tools/scramble -add=fuze"
2371 output
="rockbox.sansa"
2372 bootoutput
="bootloader-fuze.sansa"
2373 appextra
="recorder:gui:radio"
2376 toolset
=$scramblebitmaptools
2378 t_manufacturer
="as3525"
2379 t_model
="sansa-fuze"
2386 modelname
="sansac200v2"
2387 target
="-DSANSA_C200V2"
2388 memory
=2 # as per OF diagnosis mode
2389 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2390 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2391 tool
="$rootdir/tools/scramble -add=c2v2"
2392 output
="rockbox.sansa"
2393 bootoutput
="bootloader-c200v2.sansa"
2394 appextra
="recorder:gui:radio"
2397 # toolset is the tools within the tools directory that we build for
2398 # this particular target.
2399 toolset
=$scramblebitmaptools
2400 # architecture, manufacturer and model for the target-tree build
2402 t_manufacturer
="as3525"
2403 t_model
="sansa-c200v2"
2404 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2406 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2411 modelname
="sansaclipv2"
2412 target
="-DSANSA_CLIPV2"
2414 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2415 bmp2rb_native
="$bmp2rb_mono"
2416 tool
="$rootdir/tools/scramble -add=clv2"
2417 output
="rockbox.sansa"
2418 bootoutput
="bootloader-clipv2.sansa"
2419 appextra
="recorder:gui:radio"
2422 toolset
=$scramblebitmaptools
2424 t_manufacturer
="as3525"
2425 t_model
="sansa-clipv2"
2430 echo "Sansa View is not yet supported!"
2433 modelname
="sansaview"
2434 target
="-DSANSA_VIEW"
2437 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2438 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2439 output
="rockbox.mi4"
2443 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2444 bootoutput
="firmware.mi4"
2445 # toolset is the tools within the tools directory that we build for
2446 # this particular target.
2447 toolset
=$scramblebitmaptools
2449 t_manufacturer
="sandisk"
2450 t_model
="sansa-view"
2455 modelname
="sansaclipplus"
2456 target
="-DSANSA_CLIPPLUS"
2458 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2459 bmp2rb_native
="$bmp2rb_mono"
2460 tool
="$rootdir/tools/scramble -add=cli+"
2461 output
="rockbox.sansa"
2462 bootoutput
="bootloader-clipplus.sansa"
2463 appextra
="recorder:gui:radio"
2466 toolset
=$scramblebitmaptools
2468 t_manufacturer
="as3525"
2469 t_model
="sansa-clipplus"
2475 modelname
="sansafuzev2"
2476 target
="-DSANSA_FUZEV2"
2478 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2479 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2480 tool
="$rootdir/tools/scramble -add=fuz2"
2481 output
="rockbox.sansa"
2482 bootoutput
="bootloader-fuzev2.sansa"
2483 appextra
="recorder:gui:radio"
2486 toolset
=$scramblebitmaptools
2488 t_manufacturer
="as3525"
2489 t_model
="sansa-fuzev2"
2495 modelname
="sansafuzeplus"
2496 target
="-DSANSA_FUZEPLUS"
2498 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2499 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2500 tool
="$rootdir/tools/scramble -add=fuz+"
2501 output
="rockbox.sansa"
2507 toolset
=$scramblebitmaptools
2509 t_manufacturer
="imx233"
2510 t_model
="sansa-fuzeplus"
2516 modelname
="tatungtpj1022"
2517 target
="-DTATUNG_TPJ1022"
2520 tool
="$rootdir/tools/scramble -add tpj2"
2521 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2522 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2523 output
="rockbox.elio"
2524 appextra
="recorder:gui:radio"
2527 boottool
="$rootdir/tools/scramble -mi4v2"
2528 bootoutput
="pp5020.mi4"
2529 # toolset is the tools within the tools directory that we build for
2530 # this particular target.
2531 toolset
=$scramblebitmaptools
2532 # architecture, manufacturer and model for the target-tree build
2534 t_manufacturer
="tatung"
2540 modelname
="gogearsa9200"
2541 target
="-DPHILIPS_SA9200"
2542 memory
=32 # supposedly
2544 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2545 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2546 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2547 output
="rockbox.mi4"
2548 appextra
="recorder:gui:radio"
2551 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2552 bootoutput
="FWImage.ebn"
2553 # toolset is the tools within the tools directory that we build for
2554 # this particular target.
2555 toolset
=$scramblebitmaptools
2556 # architecture, manufacturer and model for the target-tree build
2558 t_manufacturer
="philips"
2564 modelname
="gogearhdd1630"
2565 target
="-DPHILIPS_HDD1630"
2566 memory
=32 # supposedly
2568 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2569 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2570 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2571 output
="rockbox.mi4"
2572 appextra
="recorder:gui:radio"
2575 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2576 bootoutput
="FWImage.ebn"
2577 # toolset is the tools within the tools directory that we build for
2578 # this particular target.
2579 toolset
=$scramblebitmaptools
2580 # architecture, manufacturer and model for the target-tree build
2582 t_manufacturer
="philips"
2588 modelname
="gogearhdd6330"
2589 target
="-DPHILIPS_HDD6330"
2592 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2593 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2594 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2595 output
="rockbox.mi4"
2596 appextra
="recorder:gui:radio"
2599 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2600 bootoutput
="FWImage.ebn"
2601 # toolset is the tools within the tools directory that we build for
2602 # this particular target.
2603 toolset
=$scramblebitmaptools
2604 # architecture, manufacturer and model for the target-tree build
2606 t_manufacturer
="philips"
2612 modelname
="meizum6sl"
2613 target
="-DMEIZU_M6SL"
2617 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2618 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2619 output
="rockbox.meizu"
2620 appextra
="recorder:gui:radio"
2623 toolset
=$genericbitmaptools
2625 bootoutput
="rockboot.ebn"
2626 # architecture, manufacturer and model for the target-tree build
2628 t_manufacturer
="s5l8700"
2629 t_model
="meizu-m6sl"
2634 modelname
="meizum6sp"
2635 target
="-DMEIZU_M6SP"
2639 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2640 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2641 output
="rockbox.meizu"
2642 appextra
="recorder:gui:radio"
2645 toolset
=$genericbitmaptools
2647 bootoutput
="rockboot.ebn"
2648 # architecture, manufacturer and model for the target-tree build
2650 t_manufacturer
="s5l8700"
2651 t_model
="meizu-m6sp"
2661 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2662 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2663 output
="rockbox.meizu"
2664 appextra
="recorder:gui:radio"
2667 toolset
=$genericbitmaptools
2669 bootoutput
="rockboot.ebn"
2670 # architecture, manufacturer and model for the target-tree build
2672 t_manufacturer
="s5l8700"
2678 modelname
="ondavx747"
2679 target
="-DONDA_VX747"
2682 tool
="$rootdir/tools/scramble -add=x747"
2683 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2684 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2685 output
="rockbox.vx747"
2686 appextra
="recorder:gui:radio"
2689 toolset
=$genericbitmaptools
2690 boottool
="$rootdir/tools/scramble -ccpmp"
2691 bootoutput
="ccpmp.bin"
2692 # architecture, manufacturer and model for the target-tree build
2694 t_manufacturer
="ingenic_jz47xx"
2695 t_model
="onda_vx747"
2700 modelname
="ondavx767"
2701 target
="-DONDA_VX767"
2705 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2706 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2707 output
="rockbox.vx767"
2708 appextra
="recorder:gui:radio"
2711 toolset
=$genericbitmaptools
2712 boottool
="$rootdir/tools/scramble -ccpmp"
2713 bootoutput
="ccpmp.bin"
2714 # architecture, manufacturer and model for the target-tree build
2716 t_manufacturer
="ingenic_jz47xx"
2717 t_model
="onda_vx767"
2722 modelname
="ondavx747p"
2723 target
="-DONDA_VX747P"
2726 tool
="$rootdir/tools/scramble -add=747p"
2727 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2728 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2729 output
="rockbox.vx747p"
2730 appextra
="recorder:gui:radio"
2733 toolset
=$genericbitmaptools
2734 boottool
="$rootdir/tools/scramble -ccpmp"
2735 bootoutput
="ccpmp.bin"
2736 # architecture, manufacturer and model for the target-tree build
2738 t_manufacturer
="ingenic_jz47xx"
2739 t_model
="onda_vx747"
2744 modelname
="ondavx777"
2745 target
="-DONDA_VX777"
2748 tool
="$rootdir/tools/scramble -add=x777"
2749 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2750 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2751 output
="rockbox.vx777"
2752 appextra
="recorder:gui:radio"
2755 toolset
=$genericbitmaptools
2756 boottool
="$rootdir/tools/scramble -ccpmp"
2757 bootoutput
="ccpmp.bin"
2758 # architecture, manufacturer and model for the target-tree build
2760 t_manufacturer
="ingenic_jz47xx"
2761 t_model
="onda_vx747"
2766 modelname
="lyreproto1"
2767 target
="-DLYRE_PROTO1"
2771 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2772 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2773 output
="rockbox.lyre"
2774 appextra
="recorder:gui:radio"
2777 toolset
=$scramblebitmaptools
2779 bootoutput
="bootloader-proto1.lyre"
2780 # architecture, manufacturer and model for the target-tree build
2782 t_manufacturer
="at91sam"
2783 t_model
="lyre_proto1"
2788 modelname
="mini2440"
2792 tool
="$rootdir/tools/scramble -add=m244"
2793 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2794 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2795 output
="rockbox.mini2440"
2796 appextra
="recorder:gui:radio"
2799 toolset
=$scramblebitmaptools
2801 bootoutput
="bootloader-mini2440.lyre"
2802 # architecture, manufacturer and model for the target-tree build
2804 t_manufacturer
="s3c2440"
2810 modelname
="samsungyh820"
2811 target
="-DSAMSUNG_YH820"
2814 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2815 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2816 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2817 output
="rockbox.mi4"
2818 appextra
="recorder:gui:radio"
2821 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2822 bootoutput
="FW_YH820.mi4"
2823 # toolset is the tools within the tools directory that we build for
2824 # this particular target.
2825 toolset
=$scramblebitmaptools
2826 # architecture, manufacturer and model for the target-tree build
2828 t_manufacturer
="samsung"
2834 modelname
="samsungyh920"
2835 target
="-DSAMSUNG_YH920"
2838 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2839 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2840 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2841 output
="rockbox.mi4"
2842 appextra
="recorder:gui:radio"
2845 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2846 bootoutput
="PP5020.mi4"
2847 # toolset is the tools within the tools directory that we build for
2848 # this particular target.
2849 toolset
=$scramblebitmaptools
2850 # architecture, manufacturer and model for the target-tree build
2852 t_manufacturer
="samsung"
2858 modelname
="samsungyh925"
2859 target
="-DSAMSUNG_YH925"
2862 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2863 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2864 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2865 output
="rockbox.mi4"
2866 appextra
="recorder:gui:radio"
2869 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2870 bootoutput
="FW_YH925.mi4"
2871 # toolset is the tools within the tools directory that we build for
2872 # this particular target.
2873 toolset
=$scramblebitmaptools
2874 # architecture, manufacturer and model for the target-tree build
2876 t_manufacturer
="samsung"
2882 modelname
="samsungyps3"
2883 target
="-DSAMSUNG_YPS3"
2887 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2888 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2889 output
="rockbox.yps3"
2890 appextra
="recorder:gui:radio"
2893 toolset
=$genericbitmaptools
2895 bootoutput
="rockboot.ebn"
2896 # architecture, manufacturer and model for the target-tree build
2898 t_manufacturer
="s5l8700"
2905 target
="-DPBELL_VIBE500"
2908 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2909 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2910 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2911 output
="rockbox.mi4"
2912 appextra
="recorder:gui:radio"
2915 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2916 bootoutput
="jukebox.mi4"
2917 # toolset is the tools within the tools directory that we build for
2918 # this particular target.
2919 toolset
=$scramblebitmaptools
2920 # architecture, manufacturer and model for the target-tree build
2922 t_manufacturer
="pbell"
2928 modelname
="mpiohd200"
2929 target
="-DMPIO_HD200"
2932 tool
="$rootdir/tools/scramble -add=hd20"
2933 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2934 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2935 output
="rockbox.mpio"
2936 bootoutput
="bootloader.mpio"
2937 appextra
="recorder:gui:radio"
2940 # toolset is the tools within the tools directory that we build for
2941 # this particular target.
2942 toolset
="$genericbitmaptools"
2943 # architecture, manufacturer and model for the target-tree build
2945 t_manufacturer
="mpio"
2951 modelname
="mpiohd300"
2952 target
="-DMPIO_HD300"
2955 tool
="$rootdir/tools/scramble -add=hd30"
2956 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2957 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2958 output
="rockbox.mpio"
2959 bootoutput
="bootloader.mpio"
2960 appextra
="recorder:gui:radio"
2963 # toolset is the tools within the tools directory that we build for
2964 # this particular target.
2965 toolset
="$genericbitmaptools"
2966 # architecture, manufacturer and model for the target-tree build
2968 t_manufacturer
="mpio"
2984 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2985 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2987 bootoutput
="rockbox"
2988 appextra
="recorder:gui:radio"
2991 # architecture, manufacturer and model for the target-tree build
2993 t_manufacturer
="sdl"
3004 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3005 bindir
="/data/data/org.rockbox/lib"
3006 libdir
="/data/data/org.rockbox/app_rockbox"
3012 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3013 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3014 output
="librockbox.so"
3015 bootoutput
="librockbox.so"
3016 appextra
="recorder:gui:radio:hosted/android"
3019 # architecture, manufacturer and model for the target-tree build
3021 t_manufacturer
="android"
3028 modelname
="nokian8xx"
3030 target
="-DNOKIAN8XX"
3031 sharedir
="/opt/rockbox/share/rockbox"
3032 bindir
="/opt/rockbox/bin"
3033 libdir
="/opt/rockbox/lib"
3039 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3040 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3042 bootoutput
="rockbox"
3043 appextra
="recorder:gui:radio"
3046 # architecture, manufacturer and model for the target-tree build
3048 t_manufacturer
="maemo"
3055 modelname
="nokian900"
3057 target
="-DNOKIAN900"
3058 sharedir
="/opt/rockbox/share/rockbox"
3059 bindir
="/opt/rockbox/bin"
3060 libdir
="/opt/rockbox/lib"
3066 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3067 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3069 bootoutput
="rockbox"
3070 appextra
="recorder:gui:radio"
3073 # architecture, manufacturer and model for the target-tree build
3075 t_manufacturer
="maemo"
3085 sharedir
="rockbox/share"
3086 bindir
="rockbox/bin"
3087 libdir
="rockbox/lib"
3093 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3094 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3096 bootoutput
="rockbox"
3097 appextra
="recorder:gui:radio"
3100 # architecture, manufacturer and model for the target-tree build
3102 t_manufacturer
="pandora"
3107 echo "Please select a supported target platform!"
3113 echo "Platform set to $modelname"
3117 ############################################################################
3118 # Amount of memory, for those that can differ. They have $memory unset at
3122 if [ -z "$memory" ]; then
3125 if [ "$ARG_RAM" ]; then
3128 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3141 if [ "$ARG_RAM" ]; then
3144 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3157 echo "Memory size selected: $memory MB"
3158 [ "$ARG_TYPE" ] ||
echo ""
3162 ##################################################################
3163 # Figure out build "type"
3166 # the ifp7x0 is the only platform that supports building a gdb stub like
3170 gdbstub
="(G)DB stub, "
3172 sansae200r|sansae200
)
3173 gdbstub
="(I)nstaller, "
3176 gdbstub
="(E)raser, "
3181 if [ "$ARG_TYPE" ]; then
3184 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
3190 appsdir
='\$(ROOTDIR)/bootloader'
3192 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3194 echo "e200R-installer build selected"
3197 appsdir
='\$(ROOTDIR)/bootloader'
3199 echo "C2(4)0 or C2(5)0"
3203 extradefines
="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
3204 echo "c240 eraser build selected"
3207 extradefines
="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
3208 echo "c240 eraser build selected"
3212 echo "c200 eraser build selected"
3215 if test $t_manufacturer = "archos"; then
3216 # Archos SH-based players do this somewhat differently for
3218 appsdir
='\$(ROOTDIR)/flash/bootbox'
3221 appsdir
='\$(ROOTDIR)/bootloader'
3224 if test -n "$boottool"; then
3227 if test -n "$bootoutput"; then
3231 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3233 echo "Bootloader build selected"
3236 if [ "$modelname" = "sansae200r" ]; then
3237 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3242 extradefines
="$extradefines -DSIMULATOR"
3245 echo "Simulator build selected"
3248 echo "Advanced build selected"
3249 whichadvanced
$btype
3252 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3253 appsdir
='\$(ROOTDIR)/gdb'
3262 echo "GDB stub build selected"
3267 echo "Manual build selected"
3275 extradefines
="$extradefines -DDEBUG"
3276 appsdir
='\$(ROOTDIR)/tools/checkwps';
3277 output
='checkwps.'${modelname};
3279 echo "CheckWPS build selected"
3287 appsdir
='\$(ROOTDIR)/tools/database';
3292 output
="database_${modelname}.exe"
3295 output
='database.'${modelname};
3299 echo "Database tool build selected"
3302 if [ "$modelname" = "sansae200r" ]; then
3303 echo "Do not use the e200R target for regular builds. Use e200 instead."
3307 btype
="N" # set it explicitly since RET only gets here as well
3308 echo "Normal build selected"
3312 # to be able running "make manual" from non-manual configuration
3315 manualdev
="archosfmrecorder"
3318 manualdev
="iriverh100"
3321 manualdev
="ipodmini1g"
3324 manualdev
=$modelname
3328 if [ -z "$debug" ]; then
3329 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3332 if [ "yes" = "$application" ]; then
3333 echo Building Rockbox as an Application
3334 extradefines
="$extradefines -DAPPLICATION"
3337 echo "Using source code root directory: $rootdir"
3339 # this was once possible to change at build-time, but no more:
3344 if [ "yes" = "$simulator" ]; then
3345 # setup compiler and things for simulator
3348 if [ -d "simdisk" ]; then
3349 echo "Subdirectory 'simdisk' already present"
3352 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3356 # Now, figure out version number of the (gcc) compiler we are about to use
3357 gccver
=`$CC -dumpversion`;
3359 # figure out the binutil version too and display it, mostly for the build
3360 # system etc to be able to see it easier
3361 if [ $uname = "Darwin" ]; then
3362 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3364 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3367 if [ -z "$gccver" ]; then
3368 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3369 echo "[WARNING] this may cause your build to fail since we cannot do the"
3370 echo "[WARNING] checks we want now."
3373 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3376 num1
=`echo $gccver | cut -d . -f1`
3377 num2
=`echo $gccver | cut -d . -f2`
3378 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3385 echo "Using $CC $gccver ($gccnum)"
3387 if test "$gccnum" -ge "400"; then
3388 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3389 # so we ignore that warnings for now
3391 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3394 if test "$gccnum" -ge "402"; then
3395 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3396 # and later would throw it for several valid cases
3397 GCCOPTS
="$GCCOPTS -Wno-override-init"
3401 ""|
"$CROSS_COMPILE")
3405 # cross-compile for win32
3408 # Verify that the cross-compiler is of a recommended version!
3409 if test "$gccver" != "$gccchoice"; then
3410 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3411 echo "WARNING: version $gccchoice!"
3412 echo "WARNING: This may cause your build to fail since it may be a version"
3413 echo "WARNING: that isn't functional or known to not be the best choice."
3414 echo "WARNING: If you suffer from build problems, you know that this is"
3415 echo "WARNING: a likely source for them..."
3423 echo "Using $LD $ldver"
3425 # check the compiler for SH platforms
3426 if test "$CC" = "sh-elf-gcc"; then
3427 if test "$gccnum" -lt "400"; then
3428 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3429 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3431 # figure out patch status
3432 gccpatch
=`$CC --version`;
3434 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3435 echo "gcc $gccver is rockbox patched"
3436 # then convert -O to -Os to get smaller binaries!
3437 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3439 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3440 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3445 if test "$CC" = "m68k-elf-gcc"; then
3446 # convert -O to -Os to get smaller binaries!
3447 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3450 if [ "$ARG_CCACHE" = "1" ]; then
3451 echo "Enable ccache for building"
3453 elif [ "$ARG_CCACHE" != "0" ]; then
3454 ccache
=`findtool ccache`
3455 if test -n "$ccache"; then
3456 echo "Found and uses ccache ($ccache)"
3460 # figure out the full path to the various commands if possible
3461 HOSTCC
=`findtool gcc --lit`
3462 HOSTAR
=`findtool ar --lit`
3463 CC
=`findtool ${CC} --lit`
3464 LD
=`findtool ${AR} --lit`
3465 AR
=`findtool ${AR} --lit`
3466 AS
=`findtool ${AS} --lit`
3467 OC
=`findtool ${OC} --lit`
3468 WINDRES
=`findtool ${WINDRES} --lit`
3469 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3470 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3471 RANLIB
=`findtool ${RANLIB} --lit`
3473 if test -n "$ccache"; then
3477 if test "$ARG_ARM_THUMB" = "1"; then
3478 extradefines
="$extradefines -DUSE_THUMB"
3479 CC
="$toolsdir/thumb-cc.py $CC"
3482 if test "X$endian" = "Xbig"; then
3483 defendian
="ROCKBOX_BIG_ENDIAN"
3485 defendian
="ROCKBOX_LITTLE_ENDIAN"
3488 if [ "$ARG_RBDIR" != "" ]; then
3489 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3494 echo "Using alternate rockbox dir: ${rbdir}"
3498 -e "s<@ENDIAN@<${defendian}<g" \
3499 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3500 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3501 -e "s<@config_rtc@<$config_rtc<g" \
3502 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3503 -e "s<@thread_support@<$thread_support<g" \
3504 -e "s<@RBDIR@<${rbdir}<g" \
3505 -e "s<@sharepath@<${sharedir}<g" \
3506 -e "s<@binpath@<${bindir}<g" \
3507 -e "s<@libpath@<${libdir}<g" \
3508 -e "s<@have_backlight@<$have_backlight<g" \
3509 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3510 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3511 -e "s<@lcd_width@<$app_lcd_width<g" \
3512 -e "s<@lcd_height@<$app_lcd_height<g" \
3514 /* This header was made by configure */
3515 #ifndef __BUILD_AUTOCONF_H
3516 #define __BUILD_AUTOCONF_H
3518 /* Define endianess for the target or simulator platform */
3521 /* Define this if you build rockbox to support the logf logging and display */
3522 #undef ROCKBOX_HAS_LOGF
3524 /* Define this to record a chart with timings for the stages of boot */
3527 /* optional define for a backlight modded Ondio */
3530 /* optional define for FM radio mod for iAudio M5 */
3533 /* optional define for ATA poweroff on Player */
3536 /* optional defines for RTC mod for h1x0 */
3540 /* the threading backend we use */
3541 #define @thread_support@
3543 /* lcd dimensions for application builds from configure */
3547 /* root of Rockbox */
3548 #define ROCKBOX_DIR "@RBDIR@"
3549 #define ROCKBOX_SHARE_PATH "@sharepath@"
3550 #define ROCKBOX_BINARY_PATH "@binpath@"
3551 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3553 #endif /* __BUILD_AUTOCONF_H */
3556 if test -n "$t_cpu"; then
3557 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3559 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3560 # Maemo needs the SDL port, too
3561 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3562 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3563 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3564 # Pandora needs the SDL port, too
3565 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3566 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3567 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3568 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3569 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3572 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3573 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3577 if test "$simulator" = "yes"; then
3578 # add simul make stuff on the #SIMUL# line
3579 simmagic1
="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3580 simmagic2
="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3582 # delete the lines that match
3583 simmagic1
='/@SIMUL1@/D'
3584 simmagic2
='/@SIMUL2@/D'
3587 if test "$swcodec" = "yes"; then
3588 voicetoolset
="rbspeexenc voicefont wavtrim"
3590 voicetoolset
="voicefont wavtrim"
3593 if test "$apps" = "apps"; then
3594 # only when we build "real" apps we build the .lng files
3598 #### Fix the cmdline ###
3599 if [ "$ARG_CCACHE" = "1" ]; then
3601 elif [ "$ARG_CCACHE" = "0" ]; then
3602 cmdline
="--no-ccache "
3604 if [ "$ARG_ARM_EABI" = "1" ]; then
3605 cmdline
="$cmdline--eabi "
3607 if [ -n "$ARG_PREFIX" ]; then
3608 cmdline
="$cmdline--prefix=\$(PREFIX) "
3610 if [ -n "$ARG_LCDWIDTH" ]; then
3611 cmdline
="$cmdline--lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3614 cmdline
="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3619 -e "s<@ROOTDIR@<${rootdir}<g" \
3620 -e "s<@DEBUG@<${debug}<g" \
3621 -e "s<@MEMORY@<${memory}<g" \
3622 -e "s<@TARGET_ID@<${target_id}<g" \
3623 -e "s<@TARGET@<${target}<g" \
3624 -e "s<@CPU@<${t_cpu}<g" \
3625 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3626 -e "s<@MODELNAME@<${modelname}<g" \
3627 -e "s<@LANGUAGE@<${language}<g" \
3628 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3629 -e "s<@PWD@<${pwd}<g" \
3630 -e "s<@HOSTCC@<${HOSTCC}<g" \
3631 -e "s<@HOSTAR@<${HOSTAR}<g" \
3632 -e "s<@CC@<${CC}<g" \
3633 -e "s<@LD@<${LD}<g" \
3634 -e "s<@AR@<${AR}<g" \
3635 -e "s<@AS@<${AS}<g" \
3636 -e "s<@OC@<${OC}<g" \
3637 -e "s<@WINDRES@<${WINDRES}<g" \
3638 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3639 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3640 -e "s<@RANLIB@<${RANLIB}<g" \
3641 -e "s<@TOOL@<${tool}<g" \
3642 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3643 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3644 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3645 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3646 -e "s<@OUTPUT@<${output}<g" \
3647 -e "s<@APPEXTRA@<${appextra}<g" \
3648 -e "s<@ARCHOSROM@<${archosrom}<g" \
3649 -e "s<@FLASHFILE@<${flash}<g" \
3650 -e "s<@PLUGINS@<${plugins}<g" \
3651 -e "s<@CODECS@<${swcodec}<g" \
3652 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3653 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3654 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3655 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3656 -e "s<@LDOPTS@<${LDOPTS}<g" \
3657 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3658 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3659 -e "s<@EXTRADEF@<${extradefines}<g" \
3660 -e "s<@APPSDIR@<${appsdir}<g" \
3661 -e "s<@FIRMDIR@<${firmdir}<g" \
3662 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3663 -e "s<@APPS@<${apps}<g" \
3664 -e "s<@APP_TYPE@<${app_type}<g" \
3665 -e "s<@APPLICATION@<${application}<g" \
3666 -e "s<@GCCVER@<${gccver}<g" \
3667 -e "s<@GCCNUM@<${gccnum}<g" \
3668 -e "s<@UNAME@<${uname}<g" \
3669 -e "s<@ENDIAN@<${defendian}<g" \
3670 -e "s<@TOOLSET@<${toolset}<g" \
3673 -e "s<@MANUALDEV@<${manualdev}<g" \
3674 -e "s<@ENCODER@<${ENC_CMD}<g" \
3675 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3676 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3677 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3678 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3679 -e "s<@LANGS@<${buildlangs}<g" \
3680 -e "s<@USE_ELF@<${USE_ELF}<g" \
3681 -e "s<@RBDIR@<${rbdir}<g" \
3682 -e "s<@sharepath@<${sharedir}<g" \
3683 -e "s<@binpath@<${bindir}<g" \
3684 -e "s<@libpath@<${libdir}<g" \
3685 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3686 -e "s<@CMDLINE@<$cmdline<g" \
3687 -e "s<@SDLCONFIG@<$sdl<g" \
3689 ## Automatically generated. http://www.rockbox.org/
3691 export ROOTDIR=@ROOTDIR@
3692 export FIRMDIR=@FIRMDIR@
3693 export APPSDIR=@APPSDIR@
3694 export TOOLSDIR=@TOOLSDIR@
3695 export DOCSDIR=\$(ROOTDIR)/docs
3696 export MANUALDIR=\${ROOTDIR}/manual
3697 export DEBUG=@DEBUG@
3698 export MODELNAME=@MODELNAME@
3699 export ARCHOSROM=@ARCHOSROM@
3700 export FLASHFILE=@FLASHFILE@
3701 export TARGET_ID=@TARGET_ID@
3702 export TARGET=@TARGET@
3704 export MANUFACTURER=@MANUFACTURER@
3706 export BUILDDIR=@PWD@
3707 export LANGUAGE=@LANGUAGE@
3708 export VOICELANGUAGE=@VOICELANGUAGE@
3709 export MEMORYSIZE=@MEMORY@
3710 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3711 export MKFIRMWARE=@TOOL@
3712 export BMP2RB_MONO=@BMP2RB_MONO@
3713 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3714 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3715 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3716 export BINARY=@OUTPUT@
3717 export APPEXTRA=@APPEXTRA@
3718 export ENABLEDPLUGINS=@PLUGINS@
3719 export SOFTWARECODECS=@CODECS@
3720 export EXTRA_DEFINES=@EXTRADEF@
3721 export HOSTCC=@HOSTCC@
3722 export HOSTAR=@HOSTAR@
3728 export WINDRES=@WINDRES@
3729 export DLLTOOL=@DLLTOOL@
3730 export DLLWRAP=@DLLWRAP@
3731 export RANLIB=@RANLIB@
3732 export PREFIX=@PREFIX@
3733 export PROFILE_OPTS=@PROFILE_OPTS@
3734 export APP_TYPE=@APP_TYPE@
3735 export APPLICATION=@APPLICATION@
3736 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3737 export GCCOPTS=@GCCOPTS@
3738 export TARGET_INC=@TARGET_INC@
3739 export LOADADDRESS=@LOADADDRESS@
3740 export SHARED_FLAG=@SHARED_FLAG@
3741 export LDOPTS=@LDOPTS@
3742 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3743 export GCCVER=@GCCVER@
3744 export GCCNUM=@GCCNUM@
3745 export UNAME=@UNAME@
3746 export MANUALDEV=@MANUALDEV@
3747 export TTS_OPTS=@TTS_OPTS@
3748 export TTS_ENGINE=@TTS_ENGINE@
3749 export ENC_OPTS=@ENC_OPTS@
3750 export ENCODER=@ENCODER@
3751 export USE_ELF=@USE_ELF@
3752 export RBDIR=@RBDIR@
3753 export ROCKBOX_SHARE_PATH=@sharepath@
3754 export ROCKBOX_BINARY_PATH=@binpath@
3755 export ROCKBOX_LIBRARY_PATH=@libpath@
3756 export SDLCONFIG=@SDLCONFIG@
3758 CONFIGURE_OPTIONS=@CMDLINE@
3760 include \$(TOOLSDIR)/root.make
3764 echo "Created Makefile"