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==
1265 140) YH-820 150) Elio TPJ-1022 ==Logik==
1266 141) YH-920 80) DAX 1GB MP3/DAB
1267 142) YH-925 ==Packard Bell==
1268 143) YP-S3 160) Vibe 500 ==Lyre project==
1270 ==Application== ==MPIO== 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
="tatungtpj1022"
2496 target
="-DTATUNG_TPJ1022"
2499 tool
="$rootdir/tools/scramble -add tpj2"
2500 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2501 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2502 output
="rockbox.elio"
2503 appextra
="recorder:gui:radio"
2506 boottool
="$rootdir/tools/scramble -mi4v2"
2507 bootoutput
="pp5020.mi4"
2508 # toolset is the tools within the tools directory that we build for
2509 # this particular target.
2510 toolset
=$scramblebitmaptools
2511 # architecture, manufacturer and model for the target-tree build
2513 t_manufacturer
="tatung"
2519 modelname
="gogearsa9200"
2520 target
="-DPHILIPS_SA9200"
2521 memory
=32 # supposedly
2523 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2524 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2525 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2526 output
="rockbox.mi4"
2527 appextra
="recorder:gui:radio"
2530 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2531 bootoutput
="FWImage.ebn"
2532 # toolset is the tools within the tools directory that we build for
2533 # this particular target.
2534 toolset
=$scramblebitmaptools
2535 # architecture, manufacturer and model for the target-tree build
2537 t_manufacturer
="philips"
2543 modelname
="gogearhdd1630"
2544 target
="-DPHILIPS_HDD1630"
2545 memory
=32 # supposedly
2547 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2548 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2549 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2550 output
="rockbox.mi4"
2551 appextra
="recorder:gui:radio"
2554 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2555 bootoutput
="FWImage.ebn"
2556 # toolset is the tools within the tools directory that we build for
2557 # this particular target.
2558 toolset
=$scramblebitmaptools
2559 # architecture, manufacturer and model for the target-tree build
2561 t_manufacturer
="philips"
2567 modelname
="gogearhdd6330"
2568 target
="-DPHILIPS_HDD6330"
2571 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2572 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2573 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2574 output
="rockbox.mi4"
2575 appextra
="recorder:gui:radio"
2578 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2579 bootoutput
="FWImage.ebn"
2580 # toolset is the tools within the tools directory that we build for
2581 # this particular target.
2582 toolset
=$scramblebitmaptools
2583 # architecture, manufacturer and model for the target-tree build
2585 t_manufacturer
="philips"
2591 modelname
="meizum6sl"
2592 target
="-DMEIZU_M6SL"
2596 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2597 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2598 output
="rockbox.meizu"
2599 appextra
="recorder:gui:radio"
2602 toolset
=$genericbitmaptools
2604 bootoutput
="rockboot.ebn"
2605 # architecture, manufacturer and model for the target-tree build
2607 t_manufacturer
="s5l8700"
2608 t_model
="meizu-m6sl"
2613 modelname
="meizum6sp"
2614 target
="-DMEIZU_M6SP"
2618 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2619 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2620 output
="rockbox.meizu"
2621 appextra
="recorder:gui:radio"
2624 toolset
=$genericbitmaptools
2626 bootoutput
="rockboot.ebn"
2627 # architecture, manufacturer and model for the target-tree build
2629 t_manufacturer
="s5l8700"
2630 t_model
="meizu-m6sp"
2640 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2641 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2642 output
="rockbox.meizu"
2643 appextra
="recorder:gui:radio"
2646 toolset
=$genericbitmaptools
2648 bootoutput
="rockboot.ebn"
2649 # architecture, manufacturer and model for the target-tree build
2651 t_manufacturer
="s5l8700"
2657 modelname
="ondavx747"
2658 target
="-DONDA_VX747"
2661 tool
="$rootdir/tools/scramble -add=x747"
2662 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2663 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2664 output
="rockbox.vx747"
2665 appextra
="recorder:gui:radio"
2668 toolset
=$genericbitmaptools
2669 boottool
="$rootdir/tools/scramble -ccpmp"
2670 bootoutput
="ccpmp.bin"
2671 # architecture, manufacturer and model for the target-tree build
2673 t_manufacturer
="ingenic_jz47xx"
2674 t_model
="onda_vx747"
2679 modelname
="ondavx767"
2680 target
="-DONDA_VX767"
2684 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2685 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2686 output
="rockbox.vx767"
2687 appextra
="recorder:gui:radio"
2690 toolset
=$genericbitmaptools
2691 boottool
="$rootdir/tools/scramble -ccpmp"
2692 bootoutput
="ccpmp.bin"
2693 # architecture, manufacturer and model for the target-tree build
2695 t_manufacturer
="ingenic_jz47xx"
2696 t_model
="onda_vx767"
2701 modelname
="ondavx747p"
2702 target
="-DONDA_VX747P"
2705 tool
="$rootdir/tools/scramble -add=747p"
2706 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2707 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2708 output
="rockbox.vx747p"
2709 appextra
="recorder:gui:radio"
2712 toolset
=$genericbitmaptools
2713 boottool
="$rootdir/tools/scramble -ccpmp"
2714 bootoutput
="ccpmp.bin"
2715 # architecture, manufacturer and model for the target-tree build
2717 t_manufacturer
="ingenic_jz47xx"
2718 t_model
="onda_vx747"
2723 modelname
="ondavx777"
2724 target
="-DONDA_VX777"
2727 tool
="$rootdir/tools/scramble -add=x777"
2728 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2729 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2730 output
="rockbox.vx777"
2731 appextra
="recorder:gui:radio"
2734 toolset
=$genericbitmaptools
2735 boottool
="$rootdir/tools/scramble -ccpmp"
2736 bootoutput
="ccpmp.bin"
2737 # architecture, manufacturer and model for the target-tree build
2739 t_manufacturer
="ingenic_jz47xx"
2740 t_model
="onda_vx747"
2745 modelname
="lyreproto1"
2746 target
="-DLYRE_PROTO1"
2750 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2751 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2752 output
="rockbox.lyre"
2753 appextra
="recorder:gui:radio"
2756 toolset
=$scramblebitmaptools
2758 bootoutput
="bootloader-proto1.lyre"
2759 # architecture, manufacturer and model for the target-tree build
2761 t_manufacturer
="at91sam"
2762 t_model
="lyre_proto1"
2767 modelname
="mini2440"
2771 tool
="$rootdir/tools/scramble -add=m244"
2772 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2773 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2774 output
="rockbox.mini2440"
2775 appextra
="recorder:gui:radio"
2778 toolset
=$scramblebitmaptools
2780 bootoutput
="bootloader-mini2440.lyre"
2781 # architecture, manufacturer and model for the target-tree build
2783 t_manufacturer
="s3c2440"
2789 modelname
="samsungyh820"
2790 target
="-DSAMSUNG_YH820"
2793 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2794 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2795 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2796 output
="rockbox.mi4"
2797 appextra
="recorder:gui:radio"
2800 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2801 bootoutput
="FW_YH820.mi4"
2802 # toolset is the tools within the tools directory that we build for
2803 # this particular target.
2804 toolset
=$scramblebitmaptools
2805 # architecture, manufacturer and model for the target-tree build
2807 t_manufacturer
="samsung"
2813 modelname
="samsungyh920"
2814 target
="-DSAMSUNG_YH920"
2817 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2818 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2819 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2820 output
="rockbox.mi4"
2821 appextra
="recorder:gui:radio"
2824 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2825 bootoutput
="PP5020.mi4"
2826 # toolset is the tools within the tools directory that we build for
2827 # this particular target.
2828 toolset
=$scramblebitmaptools
2829 # architecture, manufacturer and model for the target-tree build
2831 t_manufacturer
="samsung"
2837 modelname
="samsungyh925"
2838 target
="-DSAMSUNG_YH925"
2841 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2842 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2843 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2844 output
="rockbox.mi4"
2845 appextra
="recorder:gui:radio"
2848 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2849 bootoutput
="FW_YH925.mi4"
2850 # toolset is the tools within the tools directory that we build for
2851 # this particular target.
2852 toolset
=$scramblebitmaptools
2853 # architecture, manufacturer and model for the target-tree build
2855 t_manufacturer
="samsung"
2861 modelname
="samsungyps3"
2862 target
="-DSAMSUNG_YPS3"
2866 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2867 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2868 output
="rockbox.yps3"
2869 appextra
="recorder:gui:radio"
2872 toolset
=$genericbitmaptools
2874 bootoutput
="rockboot.ebn"
2875 # architecture, manufacturer and model for the target-tree build
2877 t_manufacturer
="s5l8700"
2884 target
="-DPBELL_VIBE500"
2887 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2888 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2889 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2890 output
="rockbox.mi4"
2891 appextra
="recorder:gui:radio"
2894 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2895 bootoutput
="jukebox.mi4"
2896 # toolset is the tools within the tools directory that we build for
2897 # this particular target.
2898 toolset
=$scramblebitmaptools
2899 # architecture, manufacturer and model for the target-tree build
2901 t_manufacturer
="pbell"
2907 modelname
="mpiohd200"
2908 target
="-DMPIO_HD200"
2911 tool
="$rootdir/tools/scramble -add=hd20"
2912 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2913 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2914 output
="rockbox.mpio"
2915 bootoutput
="bootloader.mpio"
2916 appextra
="recorder:gui:radio"
2919 # toolset is the tools within the tools directory that we build for
2920 # this particular target.
2921 toolset
="$genericbitmaptools"
2922 # architecture, manufacturer and model for the target-tree build
2924 t_manufacturer
="mpio"
2930 modelname
="mpiohd300"
2931 target
="-DMPIO_HD300"
2934 tool
="$rootdir/tools/scramble -add=hd30"
2935 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2936 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2937 output
="rockbox.mpio"
2938 bootoutput
="bootloader.mpio"
2939 appextra
="recorder:gui:radio"
2942 # toolset is the tools within the tools directory that we build for
2943 # this particular target.
2944 toolset
="$genericbitmaptools"
2945 # architecture, manufacturer and model for the target-tree build
2947 t_manufacturer
="mpio"
2963 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2964 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2966 bootoutput
="rockbox"
2967 appextra
="recorder:gui:radio"
2970 # architecture, manufacturer and model for the target-tree build
2972 t_manufacturer
="sdl"
2983 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
2984 bindir
="/data/data/org.rockbox/lib"
2985 libdir
="/data/data/org.rockbox/app_rockbox"
2991 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2992 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2993 output
="librockbox.so"
2994 bootoutput
="librockbox.so"
2995 appextra
="recorder:gui:radio:hosted/android"
2998 # architecture, manufacturer and model for the target-tree build
3000 t_manufacturer
="android"
3007 modelname
="nokian8xx"
3009 target
="-DNOKIAN8XX"
3010 sharedir
="/opt/rockbox/share/rockbox"
3011 bindir
="/opt/rockbox/bin"
3012 libdir
="/opt/rockbox/lib"
3018 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3019 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3021 bootoutput
="rockbox"
3022 appextra
="recorder:gui:radio"
3025 # architecture, manufacturer and model for the target-tree build
3027 t_manufacturer
="maemo"
3034 modelname
="nokian900"
3036 target
="-DNOKIAN900"
3037 sharedir
="/opt/rockbox/share/rockbox"
3038 bindir
="/opt/rockbox/bin"
3039 libdir
="/opt/rockbox/lib"
3045 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3046 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3048 bootoutput
="rockbox"
3049 appextra
="recorder:gui:radio"
3052 # architecture, manufacturer and model for the target-tree build
3054 t_manufacturer
="maemo"
3064 sharedir
="rockbox/share"
3065 bindir
="rockbox/bin"
3066 libdir
="rockbox/lib"
3072 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3073 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3075 bootoutput
="rockbox"
3076 appextra
="recorder:gui:radio"
3079 # architecture, manufacturer and model for the target-tree build
3081 t_manufacturer
="pandora"
3086 echo "Please select a supported target platform!"
3092 echo "Platform set to $modelname"
3096 ############################################################################
3097 # Amount of memory, for those that can differ. They have $memory unset at
3101 if [ -z "$memory" ]; then
3104 if [ "$ARG_RAM" ]; then
3107 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3120 if [ "$ARG_RAM" ]; then
3123 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3136 echo "Memory size selected: $memory MB"
3137 [ "$ARG_TYPE" ] ||
echo ""
3141 ##################################################################
3142 # Figure out build "type"
3145 # the ifp7x0 is the only platform that supports building a gdb stub like
3149 gdbstub
="(G)DB stub, "
3151 sansae200r|sansae200
)
3152 gdbstub
="(I)nstaller, "
3155 gdbstub
="(E)raser, "
3160 if [ "$ARG_TYPE" ]; then
3163 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
3169 appsdir
='\$(ROOTDIR)/bootloader'
3171 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3173 echo "e200R-installer build selected"
3176 appsdir
='\$(ROOTDIR)/bootloader'
3178 echo "C2(4)0 or C2(5)0"
3182 extradefines
="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
3183 echo "c240 eraser build selected"
3186 extradefines
="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
3187 echo "c240 eraser build selected"
3191 echo "c200 eraser build selected"
3194 if test $t_manufacturer = "archos"; then
3195 # Archos SH-based players do this somewhat differently for
3197 appsdir
='\$(ROOTDIR)/flash/bootbox'
3200 appsdir
='\$(ROOTDIR)/bootloader'
3203 if test -n "$boottool"; then
3206 if test -n "$bootoutput"; then
3210 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3212 echo "Bootloader build selected"
3215 if [ "$modelname" = "sansae200r" ]; then
3216 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3221 extradefines
="$extradefines -DSIMULATOR"
3224 echo "Simulator build selected"
3227 echo "Advanced build selected"
3228 whichadvanced
$btype
3231 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3232 appsdir
='\$(ROOTDIR)/gdb'
3241 echo "GDB stub build selected"
3246 echo "Manual build selected"
3254 extradefines
="$extradefines -DDEBUG"
3255 appsdir
='\$(ROOTDIR)/tools/checkwps';
3256 output
='checkwps.'${modelname};
3258 echo "CheckWPS build selected"
3266 appsdir
='\$(ROOTDIR)/tools/database';
3271 output
="database_${modelname}.exe"
3274 output
='database.'${modelname};
3278 echo "Database tool build selected"
3281 if [ "$modelname" = "sansae200r" ]; then
3282 echo "Do not use the e200R target for regular builds. Use e200 instead."
3286 btype
="N" # set it explicitly since RET only gets here as well
3287 echo "Normal build selected"
3291 # to be able running "make manual" from non-manual configuration
3294 manualdev
="archosfmrecorder"
3297 manualdev
="iriverh100"
3300 manualdev
="ipodmini1g"
3303 manualdev
=$modelname
3307 if [ -z "$debug" ]; then
3308 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3311 if [ "yes" = "$application" ]; then
3312 echo Building Rockbox as an Application
3313 extradefines
="$extradefines -DAPPLICATION"
3316 echo "Using source code root directory: $rootdir"
3318 # this was once possible to change at build-time, but no more:
3323 if [ "yes" = "$simulator" ]; then
3324 # setup compiler and things for simulator
3327 if [ -d "simdisk" ]; then
3328 echo "Subdirectory 'simdisk' already present"
3331 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3335 # Now, figure out version number of the (gcc) compiler we are about to use
3336 gccver
=`$CC -dumpversion`;
3338 # figure out the binutil version too and display it, mostly for the build
3339 # system etc to be able to see it easier
3340 if [ $uname = "Darwin" ]; then
3341 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3343 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3346 if [ -z "$gccver" ]; then
3347 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3348 echo "[WARNING] this may cause your build to fail since we cannot do the"
3349 echo "[WARNING] checks we want now."
3352 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3355 num1
=`echo $gccver | cut -d . -f1`
3356 num2
=`echo $gccver | cut -d . -f2`
3357 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3364 echo "Using $CC $gccver ($gccnum)"
3366 if test "$gccnum" -ge "400"; then
3367 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3368 # so we ignore that warnings for now
3370 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3373 if test "$gccnum" -ge "402"; then
3374 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3375 # and later would throw it for several valid cases
3376 GCCOPTS
="$GCCOPTS -Wno-override-init"
3380 ""|
"$CROSS_COMPILE")
3384 # cross-compile for win32
3387 # Verify that the cross-compiler is of a recommended version!
3388 if test "$gccver" != "$gccchoice"; then
3389 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3390 echo "WARNING: version $gccchoice!"
3391 echo "WARNING: This may cause your build to fail since it may be a version"
3392 echo "WARNING: that isn't functional or known to not be the best choice."
3393 echo "WARNING: If you suffer from build problems, you know that this is"
3394 echo "WARNING: a likely source for them..."
3402 echo "Using $LD $ldver"
3404 # check the compiler for SH platforms
3405 if test "$CC" = "sh-elf-gcc"; then
3406 if test "$gccnum" -lt "400"; then
3407 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3408 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3410 # figure out patch status
3411 gccpatch
=`$CC --version`;
3413 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3414 echo "gcc $gccver is rockbox patched"
3415 # then convert -O to -Os to get smaller binaries!
3416 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3418 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3419 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3424 if test "$CC" = "m68k-elf-gcc"; then
3425 # convert -O to -Os to get smaller binaries!
3426 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3429 if [ "$ARG_CCACHE" = "1" ]; then
3430 echo "Enable ccache for building"
3432 elif [ "$ARG_CCACHE" != "0" ]; then
3433 ccache
=`findtool ccache`
3434 if test -n "$ccache"; then
3435 echo "Found and uses ccache ($ccache)"
3439 # figure out the full path to the various commands if possible
3440 HOSTCC
=`findtool gcc --lit`
3441 HOSTAR
=`findtool ar --lit`
3442 CC
=`findtool ${CC} --lit`
3443 LD
=`findtool ${AR} --lit`
3444 AR
=`findtool ${AR} --lit`
3445 AS
=`findtool ${AS} --lit`
3446 OC
=`findtool ${OC} --lit`
3447 WINDRES
=`findtool ${WINDRES} --lit`
3448 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3449 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3450 RANLIB
=`findtool ${RANLIB} --lit`
3452 if test -n "$ccache"; then
3456 if test "$ARG_ARM_THUMB" = "1"; then
3457 extradefines
="$extradefines -DUSE_THUMB"
3458 CC
="$toolsdir/thumb-cc.py $CC"
3461 if test "X$endian" = "Xbig"; then
3462 defendian
="ROCKBOX_BIG_ENDIAN"
3464 defendian
="ROCKBOX_LITTLE_ENDIAN"
3467 if [ "$ARG_RBDIR" != "" ]; then
3468 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3473 echo "Using alternate rockbox dir: ${rbdir}"
3477 -e "s<@ENDIAN@<${defendian}<g" \
3478 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3479 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3480 -e "s<@config_rtc@<$config_rtc<g" \
3481 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3482 -e "s<@thread_support@<$thread_support<g" \
3483 -e "s<@RBDIR@<${rbdir}<g" \
3484 -e "s<@sharepath@<${sharedir}<g" \
3485 -e "s<@binpath@<${bindir}<g" \
3486 -e "s<@libpath@<${libdir}<g" \
3487 -e "s<@have_backlight@<$have_backlight<g" \
3488 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3489 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3490 -e "s<@lcd_width@<$app_lcd_width<g" \
3491 -e "s<@lcd_height@<$app_lcd_height<g" \
3493 /* This header was made by configure */
3494 #ifndef __BUILD_AUTOCONF_H
3495 #define __BUILD_AUTOCONF_H
3497 /* Define endianess for the target or simulator platform */
3500 /* Define this if you build rockbox to support the logf logging and display */
3501 #undef ROCKBOX_HAS_LOGF
3503 /* Define this to record a chart with timings for the stages of boot */
3506 /* optional define for a backlight modded Ondio */
3509 /* optional define for FM radio mod for iAudio M5 */
3512 /* optional define for ATA poweroff on Player */
3515 /* optional defines for RTC mod for h1x0 */
3519 /* the threading backend we use */
3520 #define @thread_support@
3522 /* lcd dimensions for application builds from configure */
3526 /* root of Rockbox */
3527 #define ROCKBOX_DIR "@RBDIR@"
3528 #define ROCKBOX_SHARE_PATH "@sharepath@"
3529 #define ROCKBOX_BINARY_PATH "@binpath@"
3530 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3532 #endif /* __BUILD_AUTOCONF_H */
3535 if test -n "$t_cpu"; then
3536 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3538 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3539 # Maemo needs the SDL port, too
3540 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3541 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3542 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3543 # Pandora needs the SDL port, too
3544 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3545 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3546 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3547 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3548 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3551 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3552 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3556 if test "$simulator" = "yes"; then
3557 # add simul make stuff on the #SIMUL# line
3558 simmagic1
="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3559 simmagic2
="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3561 # delete the lines that match
3562 simmagic1
='/@SIMUL1@/D'
3563 simmagic2
='/@SIMUL2@/D'
3566 if test "$swcodec" = "yes"; then
3567 voicetoolset
="rbspeexenc voicefont wavtrim"
3569 voicetoolset
="voicefont wavtrim"
3572 if test "$apps" = "apps"; then
3573 # only when we build "real" apps we build the .lng files
3577 #### Fix the cmdline ###
3578 if [ "$ARG_CCACHE" = "1" ]; then
3580 elif [ "$ARG_CCACHE" = "0" ]; then
3581 cmdline
="--no-ccache "
3583 if [ "$ARG_ARM_EABI" = "1" ]; then
3584 cmdline
="$cmdline--eabi "
3586 if [ -n "$ARG_PREFIX" ]; then
3587 cmdline
="$cmdline--prefix=\$(PREFIX) "
3589 if [ -n "$ARG_LCDWIDTH" ]; then
3590 cmdline
="$cmdline--lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3593 cmdline
="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3598 -e "s<@ROOTDIR@<${rootdir}<g" \
3599 -e "s<@DEBUG@<${debug}<g" \
3600 -e "s<@MEMORY@<${memory}<g" \
3601 -e "s<@TARGET_ID@<${target_id}<g" \
3602 -e "s<@TARGET@<${target}<g" \
3603 -e "s<@CPU@<${t_cpu}<g" \
3604 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3605 -e "s<@MODELNAME@<${modelname}<g" \
3606 -e "s<@LANGUAGE@<${language}<g" \
3607 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3608 -e "s<@PWD@<${pwd}<g" \
3609 -e "s<@HOSTCC@<${HOSTCC}<g" \
3610 -e "s<@HOSTAR@<${HOSTAR}<g" \
3611 -e "s<@CC@<${CC}<g" \
3612 -e "s<@LD@<${LD}<g" \
3613 -e "s<@AR@<${AR}<g" \
3614 -e "s<@AS@<${AS}<g" \
3615 -e "s<@OC@<${OC}<g" \
3616 -e "s<@WINDRES@<${WINDRES}<g" \
3617 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3618 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3619 -e "s<@RANLIB@<${RANLIB}<g" \
3620 -e "s<@TOOL@<${tool}<g" \
3621 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3622 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3623 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3624 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3625 -e "s<@OUTPUT@<${output}<g" \
3626 -e "s<@APPEXTRA@<${appextra}<g" \
3627 -e "s<@ARCHOSROM@<${archosrom}<g" \
3628 -e "s<@FLASHFILE@<${flash}<g" \
3629 -e "s<@PLUGINS@<${plugins}<g" \
3630 -e "s<@CODECS@<${swcodec}<g" \
3631 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3632 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3633 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3634 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3635 -e "s<@LDOPTS@<${LDOPTS}<g" \
3636 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3637 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3638 -e "s<@EXTRADEF@<${extradefines}<g" \
3639 -e "s<@APPSDIR@<${appsdir}<g" \
3640 -e "s<@FIRMDIR@<${firmdir}<g" \
3641 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3642 -e "s<@APPS@<${apps}<g" \
3643 -e "s<@APP_TYPE@<${app_type}<g" \
3644 -e "s<@APPLICATION@<${application}<g" \
3645 -e "s<@GCCVER@<${gccver}<g" \
3646 -e "s<@GCCNUM@<${gccnum}<g" \
3647 -e "s<@UNAME@<${uname}<g" \
3648 -e "s<@ENDIAN@<${defendian}<g" \
3649 -e "s<@TOOLSET@<${toolset}<g" \
3652 -e "s<@MANUALDEV@<${manualdev}<g" \
3653 -e "s<@ENCODER@<${ENC_CMD}<g" \
3654 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3655 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3656 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3657 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3658 -e "s<@LANGS@<${buildlangs}<g" \
3659 -e "s<@USE_ELF@<${USE_ELF}<g" \
3660 -e "s<@RBDIR@<${rbdir}<g" \
3661 -e "s<@sharepath@<${sharedir}<g" \
3662 -e "s<@binpath@<${bindir}<g" \
3663 -e "s<@libpath@<${libdir}<g" \
3664 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3665 -e "s<@CMDLINE@<$cmdline<g" \
3666 -e "s<@SDLCONFIG@<$sdl<g" \
3668 ## Automatically generated. http://www.rockbox.org/
3670 export ROOTDIR=@ROOTDIR@
3671 export FIRMDIR=@FIRMDIR@
3672 export APPSDIR=@APPSDIR@
3673 export TOOLSDIR=@TOOLSDIR@
3674 export DOCSDIR=\$(ROOTDIR)/docs
3675 export MANUALDIR=\${ROOTDIR}/manual
3676 export DEBUG=@DEBUG@
3677 export MODELNAME=@MODELNAME@
3678 export ARCHOSROM=@ARCHOSROM@
3679 export FLASHFILE=@FLASHFILE@
3680 export TARGET_ID=@TARGET_ID@
3681 export TARGET=@TARGET@
3683 export MANUFACTURER=@MANUFACTURER@
3685 export BUILDDIR=@PWD@
3686 export LANGUAGE=@LANGUAGE@
3687 export VOICELANGUAGE=@VOICELANGUAGE@
3688 export MEMORYSIZE=@MEMORY@
3689 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3690 export MKFIRMWARE=@TOOL@
3691 export BMP2RB_MONO=@BMP2RB_MONO@
3692 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3693 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3694 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3695 export BINARY=@OUTPUT@
3696 export APPEXTRA=@APPEXTRA@
3697 export ENABLEDPLUGINS=@PLUGINS@
3698 export SOFTWARECODECS=@CODECS@
3699 export EXTRA_DEFINES=@EXTRADEF@
3700 export HOSTCC=@HOSTCC@
3701 export HOSTAR=@HOSTAR@
3707 export WINDRES=@WINDRES@
3708 export DLLTOOL=@DLLTOOL@
3709 export DLLWRAP=@DLLWRAP@
3710 export RANLIB=@RANLIB@
3711 export PREFIX=@PREFIX@
3712 export PROFILE_OPTS=@PROFILE_OPTS@
3713 export APP_TYPE=@APP_TYPE@
3714 export APPLICATION=@APPLICATION@
3715 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3716 export GCCOPTS=@GCCOPTS@
3717 export TARGET_INC=@TARGET_INC@
3718 export LOADADDRESS=@LOADADDRESS@
3719 export SHARED_FLAG=@SHARED_FLAG@
3720 export LDOPTS=@LDOPTS@
3721 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3722 export GCCVER=@GCCVER@
3723 export GCCNUM=@GCCNUM@
3724 export UNAME=@UNAME@
3725 export MANUALDEV=@MANUALDEV@
3726 export TTS_OPTS=@TTS_OPTS@
3727 export TTS_ENGINE=@TTS_ENGINE@
3728 export ENC_OPTS=@ENC_OPTS@
3729 export ENCODER=@ENCODER@
3730 export USE_ELF=@USE_ELF@
3731 export RBDIR=@RBDIR@
3732 export ROCKBOX_SHARE_PATH=@sharepath@
3733 export ROCKBOX_BINARY_PATH=@binpath@
3734 export ROCKBOX_LIBRARY_PATH=@libpath@
3735 export SDLCONFIG=@SDLCONFIG@
3737 CONFIGURE_OPTIONS=@CMDLINE@
3739 include \$(TOOLSDIR)/root.make
3743 echo "Created Makefile"