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"
33 # Begin Function Definitions
43 WINDRES
=${prefix}windres
44 DLLTOOL
=${prefix}dlltool
45 DLLWRAP
=${prefix}dllwrap
46 RANLIB
=${prefix}ranlib
54 # setup files and paths depending on the platform
55 if [ -z "$ARG_PREFIX" ]; then
56 sharedir
="/usr/local/share/rockbox"
57 bindir
="/usr/local/bin"
58 libdir
="/usr/local/lib"
60 if [ -d "$ARG_PREFIX" ]; then
61 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
62 ARG_PREFIX
=`realpath $ARG_PREFIX`
63 if [ "0" != "$?" ]; then
64 echo "ERROR: Could not get prefix path (is realpath installed?)."
68 sharedir
="$ARG_PREFIX/share/rockbox"
69 bindir
="$ARG_PREFIX/bin"
70 libdir
="$ARG_PREFIX/lib"
72 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
78 # Set the application LCD size according to the following priorities:
79 # 1) If --lcdwidth and --lcdheight are set, use them
80 # 2) If a size is passed to the app_set_lcd_size() function, use that
81 # 3) Otherwise ask the user
83 if [ -z "$ARG_LCDWIDTH" ]; then
86 if [ -z "$ARG_LCDHEIGHT" ]; then
90 echo "Enter the LCD width (default: 320)"
91 if [ -z "$ARG_LCDWIDTH" ]; then
94 app_lcd_width
="$ARG_LCDWIDTH"
96 if [ -z "$app_lcd_width" ]; then app_lcd_width
="320"; fi
97 echo "Enter the LCD height (default: 480)"
98 if [ -z "$ARG_LCDHEIGHT" ]; then
99 app_lcd_height
=`input`
101 app_lcd_height
="$ARG_LCDHEIGHT"
103 if [ -z "$app_lcd_height" ]; then app_lcd_height
="480"; fi
104 echo "Selected $app_lcd_width x $app_lcd_height resolution"
105 ARG_LCDWIDTH
=$app_lcd_width
106 ARG_LCDHEIGHT
=$app_lcd_height
108 app_lcd_width
="#define LCD_WIDTH $app_lcd_width"
109 app_lcd_height
="#define LCD_HEIGHT $app_lcd_height"
113 if [ "$ARG_ARM_EABI" != "0" ]; then
114 prefixtools arm-elf-eabi-
122 # scan the $PATH for the given command
129 # echo "checks for $file in $path" >&2
130 if test -f "$path/$file"; then
135 # check whether caller wants literal return value if not found
136 if [ "$2" = "--lit" ]; then
141 # scan the $PATH for sdl-config - check whether for a (cross-)win32
150 #echo "checks for $file in $path" >&2
151 if test -f "$path/$file"; then
152 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
153 if [ "yes" = "${winbuild}" ]; then
158 if [ "yes" != "${winbuild}" ]; then
167 # check for availability of sigaltstack to support our thread engine
168 check_sigaltstack
() {
169 cat >$tmpdir/check_threads.c
<<EOF
171 int main(int argc, char **argv)
174 #define NULL (void*)0
176 sigaltstack(NULL, NULL);
180 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
1> /dev
/null
182 rm -rf $tmpdir/check_threads
*
186 # check for availability of Fiber on Win32 to support our thread engine
188 cat >$tmpdir/check_threads.c
<<EOF
190 int main(int argc, char **argv)
192 ConvertThreadToFiber(NULL);
196 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
2>/dev
/null
198 rm -rf $tmpdir/check_threads
*
204 # default tool setup for native building
205 prefixtools
"$CROSS_COMPILE"
206 ARG_ARM_THUMB
=0 # can't use thumb in native builds
210 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef// -e s/-O//`
211 GCCOPTS
="$GCCOPTS -fno-builtin -g"
213 LDOPTS
='-lm' # button-sdl.c uses sqrt()
217 # default output binary name, don't override app_get_platform()
218 if [ "$app_type" != "sdl-app" ]; then
222 # default share option, override below if needed
223 SHARED_FLAG
="-shared"
225 if [ "$win32crosscompile" = "yes" ]; then
226 LDOPTS
="$LDOPTS -mconsole"
232 echo "Cygwin host detected"
235 LDOPTS
="$LDOPTS -mconsole"
241 echo "MinGW host detected"
244 LDOPTS
="$LDOPTS -mconsole"
250 sigaltstack
=`check_sigaltstack`
251 echo "Linux host detected"
252 LDOPTS
="$LDOPTS -ldl"
256 sigaltstack
=`check_sigaltstack`
257 echo "FreeBSD host detected"
258 LDOPTS
="$LDOPTS -ldl"
262 sigaltstack
=`check_sigaltstack`
263 echo "Darwin host detected"
264 LDOPTS
="$LDOPTS -ldl"
265 SHARED_FLAG
="-dynamiclib -Wl\,-single_module"
269 sigaltstack
=`check_sigaltstack`
270 echo "*Solaris host detected"
272 GCCOPTS
="$GCCOPTS -fPIC"
273 LDOPTS
="$LDOPTS -ldl"
277 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
283 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
284 sdl
=`findsdl $winbuild`
286 if [ -n `echo $app_type | grep "sdl"` ]; then
287 if [ -z "$sdl" ]; then
288 echo "configure didn't find sdl-config, which indicates that you"
289 echo "don't have SDL (properly) installed. Please correct and"
290 echo "re-run configure!"
293 # generic sdl-config checker
294 GCCOPTS
="$GCCOPTS `$sdl --cflags`"
295 LDOPTS
="$LDOPTS `$sdl --libs`"
300 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
302 if test "X$win32crosscompile" != "Xyes"; then
305 # fPIC is needed to make shared objects link
306 # setting visibility to hidden is necessary to avoid strange crashes
307 # due to symbol clashing
308 GCCOPTS
="$GCCOPTS -fPIC -fvisibility=hidden"
309 # x86_64 supports MMX by default
313 echo "Enabling MMX support"
314 GCCOPTS
="$GCCOPTS -mmmx"
319 cat >$tmpdir/conftest-
$id.c
<<EOF
321 int main(int argc, char **argv)
324 char *varp = (char *)&var;
332 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
334 # when cross compiling, the endianess cannot be detected because the above program doesn't run
335 # on the local machine. assume little endian but print a warning
336 endian
=`$tmpdir/conftest-$id 2> /dev/null`
337 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
345 if [ "$CROSS_COMPILE" != "" ]; then
346 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
349 if [ "$app_type" = "sdl-sim" ]; then
350 echo "Simulator environment deemed $endian endian"
351 elif [ "$app_type" = "sdl-app" ]; then
352 echo "Application environment deemed $endian endian"
353 elif [ "$app_type" = "checkwps" ]; then
354 echo "CheckWPS environment deemed $endian endian"
357 # use wildcard here to make it work even if it was named *.exe like
359 rm -f $tmpdir/conftest-
$id*
361 # We are crosscompiling
362 # add cross-compiler option(s)
363 prefixtools i586-mingw32msvc-
364 LDOPTS
="$LDOPTS -mconsole"
366 output
="rockboxui.exe"
367 endian
="little" # windows is little endian
368 echo "Enabling MMX support"
369 GCCOPTS
="$GCCOPTS -mmmx"
373 if [ -z "$ARG_THREAD_SUPPORT" ] ||
[ "$ARG_THREAD_SUPPORT" = "0" ]; then
374 if [ "$sigaltstack" = "0" ]; then
375 thread_support
="HAVE_SIGALTSTACK_THREADS"
376 LDOPTS
="$LDOPTS -lpthread" # pthread needed
377 echo "Selected sigaltstack threads"
378 elif [ "$fibers" = "0" ]; then
379 thread_support
="HAVE_WIN32_FIBER_THREADS"
380 echo "Selected Win32 Fiber threads"
384 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
385 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
386 thread_support
="HAVE_SDL_THREADS"
387 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
388 echo "Selected SDL threads"
390 echo "WARNING: Falling back to SDL threads"
396 # functions for setting up cross-compiler names and options
397 # also set endianess and what the exact recommended gcc version is
398 # the gcc version should most likely match what versions we build with
403 GCCOPTS
="$CCOPTS -m1"
404 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
410 prefixtools calmrisc16-unknown-elf-
411 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
412 GCCOPTIMIZE
="-fomit-frame-pointer"
417 prefixtools m68k-elf-
418 GCCOPTS
="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
419 GCCOPTIMIZE
="-fomit-frame-pointer"
426 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
427 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
428 GCCOPTS
="$GCCOPTS -mlong-calls"
430 GCCOPTIMIZE
="-fomit-frame-pointer"
436 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
437 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
438 GCCOPTS
="$GCCOPTS -mlong-calls"
440 GCCOPTIMIZE
="-fomit-frame-pointer"
446 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
447 if test "$ARG_ARM_EABI" = "0"; then
448 GCCOPTS
="$GCCOPTS -mlong-calls"
450 GCCOPTIMIZE
="-fomit-frame-pointer"
456 GCCOPTS
="$CCOPTS -mcpu=arm940t"
457 if test "$ARG_ARM_EABI" = "0"; then
458 GCCOPTS
="$GCCOPTS -mlong-calls"
460 GCCOPTIMIZE
="-fomit-frame-pointer"
466 GCCOPTS
="$CCOPTS -mcpu=arm9e"
467 if test "$ARG_ARM_EABI" = "0"; then
468 GCCOPTS
="$GCCOPTS -mlong-calls"
470 GCCOPTIMIZE
="-fomit-frame-pointer"
476 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
477 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
478 GCCOPTS
="$GCCOPTS -mlong-calls"
480 GCCOPTIMIZE
="-fomit-frame-pointer"
486 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
487 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
488 GCCOPTS
="$GCCOPTS -mlong-calls"
490 GCCOPTIMIZE
="-fomit-frame-pointer"
496 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
497 if test "$ARG_ARM_EABI" = "0"; then
498 GCCOPTS
="$GCCOPTS -mlong-calls"
500 GCCOPTIMIZE
="-fomit-frame-pointer"
505 prefixtools mipsel-elf-
506 # mips is predefined, but we want it for paths. use __mips instead
507 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
508 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
509 GCCOPTIMIZE
="-fomit-frame-pointer"
515 # Scratchbox sets up "gcc" based on the active target
518 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
519 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
521 LDOPTS
="-lm -ldl $LDOPTS"
522 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
523 SHARED_FLAG
="-shared"
525 thread_support
="HAVE_SIGALTSTACK_THREADS"
528 # Determine maemo version
529 if pkg-config
--atleast-version=5 maemo-version
; then
530 if [ "$1" == "4" ]; then
531 echo "ERROR: Maemo 4 SDK required."
534 extradefines
="$extradefines -DMAEMO5"
535 echo "Found N900 maemo version"
537 elif pkg-config
--atleast-version=4 maemo-version
; then
538 if [ "$1" == "5" ]; then
539 echo "ERROR: Maemo 5 SDK required."
542 extradefines
="$extradefines -DMAEMO4"
543 echo "Found N8xx maemo version"
545 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
550 if [ $is_n900 -eq 1 ]; then
551 GCCOPTS
="$GCCOPTS `pkg-config --cflags sdl`"
552 LDOPTS
="$LDOPTS `pkg-config --libs sdl`"
554 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
555 LDOPTS
="$LDOPTS `sdl-config --libs`"
558 # glib and libosso support
559 GCCOPTS
="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
560 LDOPTS
="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
562 # libhal support: Battery monitoring
563 GCCOPTS
="$GCCOPTS `pkg-config --cflags hal`"
564 LDOPTS
="$LDOPTS `pkg-config --libs hal`"
566 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
567 if [ $is_n900 -eq 1 ]; then
568 # gstreamer support: Audio output.
569 GCCOPTS
="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
570 LDOPTS
="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
572 # N900 specific: libplayback support
573 GCCOPTS
="$GCCOPTS `pkg-config --cflags libplayback-1`"
574 LDOPTS
="$LDOPTS `pkg-config --libs libplayback-1`"
576 # N900 specific: Enable ARMv7 NEON support
577 if sb-conf current |
grep ARMEL
; then
578 GCCOPTS
="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
579 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
582 # N8xx specific: Enable armv5te instructions
583 if sb-conf current |
grep ARMEL
; then
584 GCCOPTS
="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
585 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
591 # Note: The "official" Ivanovic pandora toolchain is not able
592 # to compile rockbox as of 24-02-2011.
593 # Use scratchbox from maemo 5 for compilation.
596 # if [ ! -d "$PNDSDK" ]; then
597 # echo "ERROR: Pandora SDK not found in $PNDSDK. Please set PNDSDK environment variable"
600 # if [ ! -x $PNDSDK/bin/arm-none-linux-gnueabi-gcc ]; then
601 # echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-none-linux-gnueabi-gcc"
605 # PATH=$PNDSDK/bin:$PNDSDK/usr/bin:$PATH
606 # PKG_CONFIG_PATH=$PNDSDK/usr/lib/pkgconfig
607 # PKG_CONFIG=$PNDSDK/bin/arm-none-linux-gnueabi-pkg-config
608 # LDOPTS="-rpath,$PNDSDK/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"
619 extradefines
="$extradefines -DPANDORA"
621 # Set paths to PNDSDK root
622 # GCCOPTS="$GCCOPTS -I$PNDSDK/usr/include -L$PNDSDK/usr/lib -Wl,-rpath,$PNDSDK/usr/lib"
627 # prefixtools "$PNDSDK/bin/arm-none-linux-gnueabi-"
631 GCCOPTS
="$GCCOPTS `$PKG_CONFIG --cflags sdl`"
632 LDOPTS
="$LDOPTS `$PKG_CONFIG --libs sdl`"
635 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
636 GCCOPTS
="$GCCOPTS -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
638 # GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant"
642 if [ -z "$ANDROID_SDK_PATH" ]; then
643 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
644 echo "environment variable point to the root directory of the Android SDK."
647 if [ -z "$ANDROID_NDK_PATH" ]; then
648 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
649 echo "environment variable point to the root directory of the Android NDK."
652 buildhost
=`uname | tr [:upper:] [:lower:]`
654 gcctarget
="arm-linux-androideabi-"
655 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
656 PATH
=$PATH:$gccprefix/bin
657 prefixtools
$gcctarget
658 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
659 GCCOPTS
="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
660 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
661 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
662 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
663 LDOPTS
="$LDOPTS -shared -nostdlib -ldl -llog"
664 extradefines
="$extradefines -DANDROID"
666 SHARED_FLAG
="-shared"
670 atype
=`echo "$1" | cut -c 2-`
671 ##################################################################
672 # Prompt for specific developer options
674 if [ "$atype" ]; then
679 printf "Enter your developer options (press only enter when done)\n\
680 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
681 (T)est plugins, S(m)all C lib:"
682 if [ "$memory" = "2" ]; then
685 if [ "$modelname" = "archosplayer" ]; then
686 printf ", Use (A)TA poweroff"
688 if [ "$t_model" = "ondio" ]; then
689 printf ", (B)acklight MOD"
691 if [ "$modelname" = "iaudiom5" ]; then
692 printf ", (F)M radio MOD"
694 if [ "$modelname" = "iriverh120" ]; then
701 while [ $cont = "1" ]; do
703 if [ "$interact" ]; then
706 option
=`echo "$atype" | cut -c 1`
711 if [ "yes" = "$profile" ]; then
712 echo "Debug is incompatible with profiling"
714 echo "DEBUG build enabled"
719 echo "logf() support enabled"
723 echo "Using Rockbox' small C library"
724 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
727 echo "Including test plugins"
728 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
731 echo "bootchart enabled (logf also enabled)"
736 echo "Simulator build enabled"
740 if [ "yes" = "$use_debug" ]; then
741 echo "Profiling is incompatible with debug"
743 echo "Profiling support is enabled"
748 echo "Voice build selected"
752 if [ "$memory" = "2" ]; then
754 echo "Memory size selected: 8MB"
758 if [ "$modelname" = "archosplayer" ]; then
759 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
760 echo "ATA power off enabled"
764 if [ "$t_model" = "ondio" ]; then
765 have_backlight
="#define HAVE_BACKLIGHT"
766 echo "Backlight functions enabled"
770 if [ "$modelname" = "iaudiom5" ]; then
771 have_fmradio_in
="#define HAVE_FMRADIO_IN"
772 echo "FM radio functions enabled"
776 if [ "$modelname" = "iriverh120" ]; then
777 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
778 have_rtc_alarm
="#define HAVE_RTC_ALARM"
779 echo "RTC functions enabled (DS1339/DS3231)"
783 echo "Enabling Windows 32 cross-compiling"
784 win32crosscompile
="yes"
786 "") # Match enter press when finished with advanced options
790 echo "[ERROR] Option $option unsupported"
793 if [ "$interact" ]; then
794 btype
="$btype$option"
796 atype
=`echo "$atype" | cut -c 2-`
797 [ "$atype" ] || cont
=0
802 if [ "yes" = "$voice" ]; then
803 # Ask about languages to build
805 voicelanguage
=`whichlang`
806 echo "Voice language set to $voicelanguage"
808 # Configure encoder and TTS engine for each language
809 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
810 voiceconfig
"$thislang"
813 if [ "yes" = "$use_debug" ]; then
815 GCCOPTS
="$GCCOPTS -g -DDEBUG"
817 if [ "yes" = "$logf" ]; then
818 use_logf
="#define ROCKBOX_HAS_LOGF 1"
820 if [ "yes" = "$bootchart" ]; then
821 use_bootchart
="#define DO_BOOTCHART 1"
823 if [ "yes" = "$simulator" ]; then
825 extradefines
="$extradefines -DSIMULATOR"
829 if [ "yes" = "$profile" ]; then
830 extradefines
="$extradefines -DRB_PROFILE"
831 PROFILE_OPTS
="-finstrument-functions"
835 # Configure voice settings
838 if [ ! "$ARG_TTS" ]; then
839 echo "Building $thislang voice for $modelname. Select options"
843 if [ -n "`findtool flite`" ]; then
847 DEFAULT_TTS_OPTS
=$FLITE_OPTS
848 DEFAULT_NOISEFLOOR
="500"
851 if [ -n "`findtool espeak`" ]; then
855 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
856 DEFAULT_NOISEFLOOR
="500"
859 if [ -n "`findtool festival`" ]; then
860 FESTIVAL
="(F)estival "
863 FESTIVAL_OPTS
="--language italian"
866 FESTIVAL_OPTS
="--language spanish"
869 FESTIVAL_OPTS
="--language finnish"
872 FESTIVAL_OPTS
="--language czech"
878 DEFAULT_TTS
="festival"
879 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
880 DEFAULT_NOISEFLOOR
="500"
883 if [ -n "`findtool swift`" ]; then
887 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
888 DEFAULT_NOISEFLOOR
="500"
891 # Allow SAPI if Windows is in use
892 if [ -n "`findtool winver`" ]; then
896 DEFAULT_TTS_OPTS
=$SAPI_OPTS
897 DEFAULT_NOISEFLOOR
="500"
901 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
902 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
906 if [ "$ARG_TTS" ]; then
909 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
912 advopts
="$advopts --tts=$option"
916 NOISEFLOOR
="500" # TODO: check this value
922 TTS_OPTS
=$ESPEAK_OPTS
925 TTS_ENGINE
="festival"
927 TTS_OPTS
=$FESTIVAL_OPTS
940 TTS_ENGINE
=$DEFAULT_TTS
941 TTS_OPTS
=$DEFAULT_TTS_OPTS
942 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
944 echo "Using $TTS_ENGINE for TTS"
946 # Select which voice to use for Festival
947 if [ "$TTS_ENGINE" = "festival" ]; then
948 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
949 for voice
in $voicelist; do
950 TTS_FESTIVAL_VOICE
="$voice" # Default choice
953 if [ "$ARG_VOICE" ]; then
957 for voice
in $voicelist; do
958 printf "%3d. %s\n" "$i" "$voice"
961 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
965 for voice
in $voicelist; do
966 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
967 TTS_FESTIVAL_VOICE
="$voice"
971 advopts
="$advopts --voice=$CHOICE"
972 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
973 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
976 # Read custom tts options from command line
977 if [ "$ARG_TTSOPTS" ]; then
978 TTS_OPTS
="$ARG_TTSOPTS"
979 advopts
="$advopts --ttsopts='$TTS_OPTS'"
980 echo "$TTS_ENGINE options set to $TTS_OPTS"
983 if [ "$swcodec" = "yes" ]; then
986 ENC_OPTS
="-q 4 -c 10"
988 if [ -n "`findtool lame`" ]; then
991 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
993 echo "You need LAME in the system path to build voice files for"
994 echo "HWCODEC targets."
999 echo "Using $ENCODER for encoding voice clips"
1001 # Read custom encoder options from command line
1002 if [ "$ARG_ENCOPTS" ]; then
1003 ENC_OPTS
="$ARG_ENCOPTS"
1004 advopts
="$advopts --encopts='$ENC_OPTS'"
1005 echo "$ENCODER options set to $ENC_OPTS"
1009 if [ -n "`findtool cygpath`" ]; then
1010 TEMPDIR
=`cygpath . -a -w`
1015 # figure out which languages that are around
1016 for file in $rootdir/apps
/lang
/*.lang
; do
1017 clean
=`basename $file .lang`
1018 langs
="$langs $clean"
1021 if [ "$ARG_LANG" ]; then
1024 echo "Select a number for the language to use (default is english)"
1025 # FIXME The multiple-language feature is currently broken
1026 # echo "You may enter a comma-separated list of languages to build"
1029 for one
in $langs; do
1035 advopts
="$advopts --language=$pick"
1040 # Allow the user to pass a comma-separated list of langauges
1041 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1043 for one
in $langs; do
1044 # Accept both the language number and name
1045 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1046 if [ "$output" = "" ]; then
1055 if [ -z "$output" ]; then
1063 echo "Rockbox configure script."
1064 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1065 echo "Do *NOT* run this within the tools directory!"
1068 Usage: configure [OPTION]...
1070 --target=TARGET Sets the target, TARGET can be either the target ID or
1071 corresponding string. Run without this option to see all
1074 --ram=RAM Sets the RAM for certain targets. Even though any number
1075 is accepted, not every number is correct. The default
1076 value will be applied, if you entered a wrong number
1077 (which depends on the target). Watch the output. Run
1078 without this option if you are not sure which the right
1081 --type=TYPE Sets the build type. Shortcuts are also valid.
1082 Run without this option to see all available types.
1083 Multiple values are allowed and managed in the input
1084 order. So --type=b stands for Bootloader build, while
1085 --type=ab stands for "Backlight MOD" build.
1087 --language=LANG Set the language used for voice generation (used only if
1090 --tts=ENGINE Set the TTS engine used for voice generation (used only
1093 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1096 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1098 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1100 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1101 This is useful for having multiple alternate builds on
1102 your device that you can load with ROLO. However as the
1103 bootloader looks for .rockbox you won't be able to boot
1106 --ccache Enable ccache use (done by default these days)
1107 --no-ccache Disable ccache use
1109 --eabi Make configure prefer toolchains that are able to compile
1110 for the new ARM standard abi EABI
1111 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1112 --thumb Build with -mthumb (for ARM builds)
1113 --no-thumb The opposite of --thumb (don't use thumb even for targets
1114 where this is the default
1115 --sdl-threads Force use of SDL threads. They have inferior performance,
1116 but are better debuggable with GDB
1117 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1118 behavior of falling back to them if no native thread
1120 --prefix Target installation directory
1121 --help Shows this message (must not be used with other options)
1140 ARG_PREFIX
="$PREFIX"
1145 --ccache) ARG_CCACHE
=1;;
1146 --no-ccache) ARG_CCACHE
=0;;
1147 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1148 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1149 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1150 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1151 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1152 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1153 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1154 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1155 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1156 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1157 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1158 --eabi) ARG_ARM_EABI
=1;;
1159 --no-eabi) ARG_ARM_EABI
=0;;
1160 --thumb) ARG_ARM_THUMB
=1;;
1161 --no-thumb) ARG_ARM_THUMB
=0;;
1162 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1164 ARG_THREAD_SUPPORT
=0;;
1165 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1167 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1170 [ "$err" ] && exit 1
1174 if [ "$TMPDIR" != "" ]; then
1179 echo Using temporary directory
$tmpdir
1181 if test -r "configure"; then
1182 # this is a check for a configure script in the current directory, it there
1183 # is one, try to figure out if it is this one!
1185 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1186 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1187 echo "It will only cause you pain and grief. Instead do this:"
1190 echo " mkdir build-dir"
1191 echo " cd build-dir"
1192 echo " ../tools/configure"
1194 echo "Much happiness will arise from this. Enjoy"
1199 # get our current directory
1202 if { echo $pwd |
grep " "; } then
1203 echo "You're running this script in a path that contains space. The build"
1204 echo "system is unfortunately not clever enough to deal with this. Please"
1205 echo "run the script from a different path, rename the path or fix the build"
1210 if [ -z "$rootdir" ]; then
1211 ##################################################################
1212 # Figure out where the source code root is!
1214 rootdir
=`dirname $0`/..
/
1216 #####################################################################
1217 # Convert the possibly relative directory name to an absolute version
1223 # cd back to the build dir
1228 appsdir
='\$(ROOTDIR)/apps'
1229 firmdir
='\$(ROOTDIR)/firmware'
1230 toolsdir
='\$(ROOTDIR)/tools'
1233 ##################################################################
1234 # Figure out target platform
1237 if [ "$ARG_TARGET" ]; then
1238 buildfor
=$ARG_TARGET
1240 echo "Enter target platform:"
1242 ==Archos== ==iriver== ==Apple iPod==
1243 0) Player/Studio 10) H120/H140 20) Color/Photo
1244 1) Recorder 11) H320/H340 21) Nano 1G
1245 2) FM Recorder 12) iHP-100/110/115 22) Video
1246 3) Recorder v2 13) iFP-790 23) 3G
1247 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1248 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1249 6) AV300 26) Mini 2G
1250 ==Toshiba== 27) 1G, 2G
1251 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1252 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1254 32) 7 ==Olympus= ==SanDisk==
1255 33) D2 70) M:Robe 500 50) Sansa e200
1256 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1258 ==Creative== ==Philips== 53) Sansa m200
1259 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1260 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1261 92) Zen Vision HDD1830 56) Sansa e200v2
1262 102) GoGear HDD6330 57) Sansa m200v4
1263 ==Onda== 58) Sansa Fuze
1264 120) VX747 ==Meizu== 59) Sansa c200v2
1265 121) VX767 110) M6SL 60) Sansa Clipv2
1266 122) VX747+ 111) M6SP 61) Sansa View
1267 123) VX777 112) M3 62) Sansa Clip+
1269 ==Samsung== ==Tatung==
1270 140) YH-820 150) Elio TPJ-1022 ==Logik==
1271 141) YH-920 80) DAX 1GB MP3/DAB
1272 142) YH-925 ==Packard Bell==
1273 143) YP-S3 160) Vibe 500 ==Lyre project==
1275 ==Application== ==MPIO== 131) Mini2440
1277 201) Android 171) HD300
1287 # Set of tools built for all target platforms:
1288 toolset
="rdf2binary convbdf codepages"
1290 # Toolsets for some target families:
1291 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1292 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1293 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1294 ipodbitmaptools
="$toolset scramble bmp2rb"
1295 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1296 tccbitmaptools
="$toolset scramble bmp2rb"
1297 # generic is used by IFP, Meizu and Onda
1298 genericbitmaptools
="$toolset bmp2rb"
1299 # scramble is used by all other targets
1300 scramblebitmaptools
="$genericbitmaptools scramble"
1303 # ---- For each target ----
1306 # target_id: a unique number identifying this target, IS NOT the menu number.
1307 # Just use the currently highest number+1 when you add a new
1309 # modelname: short model name used all over to identify this target
1310 # memory: number of megabytes of RAM this target has. If the amount can
1311 # be selected by the size prompt, let memory be unset here
1312 # target: -Ddefine passed to the build commands to make the correct
1313 # config-*.h file get included etc
1314 # tool: the tool that takes a plain binary and converts that into a
1315 # working "firmware" file for your target
1316 # output: the final output file name
1317 # boottool: the tool that takes a plain binary and generates a bootloader
1318 # file for your target (or blank to use $tool)
1319 # bootoutput:the final output file name for the bootloader (or blank to use
1321 # appextra: passed to the APPEXTRA variable in the Makefiles.
1322 # TODO: add proper explanation
1323 # archosrom: used only for Archos targets that build a special flashable .ucl
1325 # flash: name of output for flashing, for targets where there's a special
1326 # file output for this.
1327 # plugins: set to 'yes' to build the plugins. Early development builds can
1328 # set this to no in the early stages to have an easier life for a
1330 # swcodec: set 'yes' on swcodec targets
1331 # toolset: lists what particular tools in the tools/ directory that this
1332 # target needs to have built prior to building Rockbox
1335 # *cc: sets up gcc and compiler options for your target builds. Note
1336 # that if you select a simulator build, the compiler selection is
1337 # overridden later in the script.
1343 modelname
="archosplayer"
1344 target
="-DARCHOS_PLAYER"
1346 tool
="$rootdir/tools/scramble"
1348 appextra
="player:gui"
1349 archosrom
="$pwd/rombox.ucl"
1350 flash
="$pwd/rockbox.ucl"
1354 # toolset is the tools within the tools directory that we build for
1355 # this particular target.
1356 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1358 # Note: the convbdf is present in the toolset just because: 1) the
1359 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1360 # build the player simulator
1363 t_manufacturer
="archos"
1369 modelname
="archosrecorder"
1370 target
="-DARCHOS_RECORDER"
1372 tool
="$rootdir/tools/scramble"
1373 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1374 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1376 appextra
="recorder:gui:radio"
1377 #archosrom="$pwd/rombox.ucl"
1378 flash
="$pwd/rockbox.ucl"
1381 # toolset is the tools within the tools directory that we build for
1382 # this particular target.
1383 toolset
=$archosbitmaptools
1385 t_manufacturer
="archos"
1391 modelname
="archosfmrecorder"
1392 target
="-DARCHOS_FMRECORDER"
1394 tool
="$rootdir/tools/scramble -fm"
1395 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1396 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1398 appextra
="recorder:gui:radio"
1399 #archosrom="$pwd/rombox.ucl"
1400 flash
="$pwd/rockbox.ucl"
1403 # toolset is the tools within the tools directory that we build for
1404 # this particular target.
1405 toolset
=$archosbitmaptools
1407 t_manufacturer
="archos"
1413 modelname
="archosrecorderv2"
1414 target
="-DARCHOS_RECORDERV2"
1416 tool
="$rootdir/tools/scramble -v2"
1417 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1418 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1420 appextra
="recorder:gui:radio"
1421 #archosrom="$pwd/rombox.ucl"
1422 flash
="$pwd/rockbox.ucl"
1425 # toolset is the tools within the tools directory that we build for
1426 # this particular target.
1427 toolset
=$archosbitmaptools
1429 t_manufacturer
="archos"
1435 modelname
="archosondiosp"
1436 target
="-DARCHOS_ONDIOSP"
1438 tool
="$rootdir/tools/scramble -osp"
1439 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1440 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1442 appextra
="recorder:gui:radio"
1443 #archosrom="$pwd/rombox.ucl"
1444 flash
="$pwd/rockbox.ucl"
1447 # toolset is the tools within the tools directory that we build for
1448 # this particular target.
1449 toolset
=$archosbitmaptools
1451 t_manufacturer
="archos"
1457 modelname
="archosondiofm"
1458 target
="-DARCHOS_ONDIOFM"
1460 tool
="$rootdir/tools/scramble -ofm"
1461 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1462 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1464 appextra
="recorder:gui:radio"
1465 #archosrom="$pwd/rombox.ucl"
1466 flash
="$pwd/rockbox.ucl"
1469 toolset
=$archosbitmaptools
1471 t_manufacturer
="archos"
1477 modelname
="archosav300"
1478 target
="-DARCHOS_AV300"
1481 tool
="$rootdir/tools/scramble -mm=C"
1482 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1483 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1485 appextra
="recorder:gui:radio"
1488 # toolset is the tools within the tools directory that we build for
1489 # this particular target.
1490 toolset
="$toolset scramble descramble bmp2rb"
1491 # architecture, manufacturer and model for the target-tree build
1493 t_manufacturer
="archos"
1499 modelname
="iriverh120"
1500 target
="-DIRIVER_H120"
1503 tool
="$rootdir/tools/scramble -add=h120"
1504 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1505 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1506 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1507 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1508 output
="rockbox.iriver"
1509 bootoutput
="bootloader.iriver"
1510 appextra
="recorder:gui:radio"
1511 flash
="$pwd/rombox.iriver"
1514 # toolset is the tools within the tools directory that we build for
1515 # this particular target.
1516 toolset
=$iriverbitmaptools
1518 t_manufacturer
="iriver"
1524 modelname
="iriverh300"
1525 target
="-DIRIVER_H300"
1528 tool
="$rootdir/tools/scramble -add=h300"
1529 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1530 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1531 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1532 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1533 output
="rockbox.iriver"
1534 appextra
="recorder:gui:radio"
1537 # toolset is the tools within the tools directory that we build for
1538 # this particular target.
1539 toolset
=$iriverbitmaptools
1541 t_manufacturer
="iriver"
1547 modelname
="iriverh100"
1548 target
="-DIRIVER_H100"
1551 tool
="$rootdir/tools/scramble -add=h100"
1552 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1553 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1554 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1555 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1556 output
="rockbox.iriver"
1557 bootoutput
="bootloader.iriver"
1558 appextra
="recorder:gui:radio"
1559 flash
="$pwd/rombox.iriver"
1562 # toolset is the tools within the tools directory that we build for
1563 # this particular target.
1564 toolset
=$iriverbitmaptools
1566 t_manufacturer
="iriver"
1572 modelname
="iriverifp7xx"
1573 target
="-DIRIVER_IFP7XX"
1577 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1578 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1579 output
="rockbox.wma"
1580 appextra
="recorder:gui:radio"
1583 # toolset is the tools within the tools directory that we build for
1584 # this particular target.
1585 toolset
=$genericbitmaptools
1587 t_manufacturer
="pnx0101"
1588 t_model
="iriver-ifp7xx"
1593 modelname
="iriverh10"
1594 target
="-DIRIVER_H10"
1597 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1598 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1599 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1600 output
="rockbox.mi4"
1601 appextra
="recorder:gui:radio"
1604 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1605 bootoutput
="H10_20GC.mi4"
1606 # toolset is the tools within the tools directory that we build for
1607 # this particular target.
1608 toolset
=$scramblebitmaptools
1609 # architecture, manufacturer and model for the target-tree build
1611 t_manufacturer
="iriver"
1617 modelname
="iriverh10_5gb"
1618 target
="-DIRIVER_H10_5GB"
1621 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1622 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1623 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1624 output
="rockbox.mi4"
1625 appextra
="recorder:gui:radio"
1628 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1629 bootoutput
="H10.mi4"
1630 # toolset is the tools within the tools directory that we build for
1631 # this particular target.
1632 toolset
=$scramblebitmaptools
1633 # architecture, manufacturer and model for the target-tree build
1635 t_manufacturer
="iriver"
1641 modelname
="ipodcolor"
1642 target
="-DIPOD_COLOR"
1645 tool
="$rootdir/tools/scramble -add=ipco"
1646 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1647 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1648 output
="rockbox.ipod"
1649 appextra
="recorder:gui:radio"
1652 bootoutput
="bootloader-$modelname.ipod"
1653 # toolset is the tools within the tools directory that we build for
1654 # this particular target.
1655 toolset
=$ipodbitmaptools
1656 # architecture, manufacturer and model for the target-tree build
1658 t_manufacturer
="ipod"
1664 modelname
="ipodnano1g"
1665 target
="-DIPOD_NANO"
1668 tool
="$rootdir/tools/scramble -add=nano"
1669 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1670 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1671 output
="rockbox.ipod"
1672 appextra
="recorder:gui:radio"
1675 bootoutput
="bootloader-$modelname.ipod"
1676 # toolset is the tools within the tools directory that we build for
1677 # this particular target.
1678 toolset
=$ipodbitmaptools
1679 # architecture, manufacturer and model for the target-tree build
1681 t_manufacturer
="ipod"
1687 modelname
="ipodvideo"
1688 target
="-DIPOD_VIDEO"
1689 memory
=64 # always. This is reduced at runtime if needed
1691 tool
="$rootdir/tools/scramble -add=ipvd"
1692 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1693 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1694 output
="rockbox.ipod"
1695 appextra
="recorder:gui:radio"
1698 bootoutput
="bootloader-$modelname.ipod"
1699 # toolset is the tools within the tools directory that we build for
1700 # this particular target.
1701 toolset
=$ipodbitmaptools
1702 # architecture, manufacturer and model for the target-tree build
1704 t_manufacturer
="ipod"
1714 tool
="$rootdir/tools/scramble -add=ip3g"
1715 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1716 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1717 output
="rockbox.ipod"
1718 appextra
="recorder:gui:radio"
1721 bootoutput
="bootloader-$modelname.ipod"
1722 # toolset is the tools within the tools directory that we build for
1723 # this particular target.
1724 toolset
=$ipodbitmaptools
1725 # architecture, manufacturer and model for the target-tree build
1727 t_manufacturer
="ipod"
1737 tool
="$rootdir/tools/scramble -add=ip4g"
1738 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1739 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1740 output
="rockbox.ipod"
1741 appextra
="recorder:gui:radio"
1744 bootoutput
="bootloader-$modelname.ipod"
1745 # toolset is the tools within the tools directory that we build for
1746 # this particular target.
1747 toolset
=$ipodbitmaptools
1748 # architecture, manufacturer and model for the target-tree build
1750 t_manufacturer
="ipod"
1756 modelname
="ipodmini1g"
1757 target
="-DIPOD_MINI"
1760 tool
="$rootdir/tools/scramble -add=mini"
1761 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1762 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1763 output
="rockbox.ipod"
1764 appextra
="recorder:gui:radio"
1767 bootoutput
="bootloader-$modelname.ipod"
1768 # toolset is the tools within the tools directory that we build for
1769 # this particular target.
1770 toolset
=$ipodbitmaptools
1771 # architecture, manufacturer and model for the target-tree build
1773 t_manufacturer
="ipod"
1779 modelname
="ipodmini2g"
1780 target
="-DIPOD_MINI2G"
1783 tool
="$rootdir/tools/scramble -add=mn2g"
1784 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1785 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1786 output
="rockbox.ipod"
1787 appextra
="recorder:gui:radio"
1790 bootoutput
="bootloader-$modelname.ipod"
1791 # toolset is the tools within the tools directory that we build for
1792 # this particular target.
1793 toolset
=$ipodbitmaptools
1794 # architecture, manufacturer and model for the target-tree build
1796 t_manufacturer
="ipod"
1802 modelname
="ipod1g2g"
1803 target
="-DIPOD_1G2G"
1806 tool
="$rootdir/tools/scramble -add=1g2g"
1807 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1808 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1809 output
="rockbox.ipod"
1810 appextra
="recorder:gui:radio"
1813 bootoutput
="bootloader-$modelname.ipod"
1814 # toolset is the tools within the tools directory that we build for
1815 # this particular target.
1816 toolset
=$ipodbitmaptools
1817 # architecture, manufacturer and model for the target-tree build
1819 t_manufacturer
="ipod"
1825 modelname
="ipodnano2g"
1826 target
="-DIPOD_NANO2G"
1829 tool
="$rootdir/tools/scramble -add=nn2g"
1830 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1831 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1832 output
="rockbox.ipod"
1833 appextra
="recorder:gui:radio"
1836 bootoutput
="bootloader-$modelname.ipod"
1837 # toolset is the tools within the tools directory that we build for
1838 # this particular target.
1839 toolset
=$ipodbitmaptools
1840 # architecture, manufacturer and model for the target-tree build
1842 t_manufacturer
="s5l8700"
1843 t_model
="ipodnano2g"
1852 tool
="$rootdir/tools/scramble -add=ip6g"
1853 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1854 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1855 output
="rockbox.ipod"
1856 appextra
="recorder:gui:radio"
1859 bootoutput
="bootloader-$modelname.ipod"
1860 # toolset is the tools within the tools directory that we build for
1861 # this particular target.
1862 toolset
=$ipodbitmaptools
1863 # architecture, manufacturer and model for the target-tree build
1865 t_manufacturer
="s5l8702"
1871 modelname
="iaudiox5"
1872 target
="-DIAUDIO_X5"
1875 tool
="$rootdir/tools/scramble -add=iax5"
1876 boottool
="$rootdir/tools/scramble -iaudiox5"
1877 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1878 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1879 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1880 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1881 output
="rockbox.iaudio"
1882 bootoutput
="x5_fw.bin"
1883 appextra
="recorder:gui:radio"
1886 # toolset is the tools within the tools directory that we build for
1887 # this particular target.
1888 toolset
="$iaudiobitmaptools"
1889 # architecture, manufacturer and model for the target-tree build
1891 t_manufacturer
="iaudio"
1897 modelname
="iaudiom5"
1898 target
="-DIAUDIO_M5"
1901 tool
="$rootdir/tools/scramble -add=iam5"
1902 boottool
="$rootdir/tools/scramble -iaudiom5"
1903 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1904 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1905 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1906 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1907 output
="rockbox.iaudio"
1908 bootoutput
="m5_fw.bin"
1909 appextra
="recorder:gui:radio"
1912 # toolset is the tools within the tools directory that we build for
1913 # this particular target.
1914 toolset
="$iaudiobitmaptools"
1915 # architecture, manufacturer and model for the target-tree build
1917 t_manufacturer
="iaudio"
1927 tool
="$rootdir/tools/scramble -add=i7"
1928 boottool
="$rootdir/tools/scramble -tcc=crc"
1929 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1930 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1931 output
="rockbox.iaudio"
1932 appextra
="recorder:gui:radio"
1935 bootoutput
="I7_FW.BIN"
1936 # toolset is the tools within the tools directory that we build for
1937 # this particular target.
1938 toolset
="$tccbitmaptools"
1939 # architecture, manufacturer and model for the target-tree build
1941 t_manufacturer
="tcc77x"
1951 tool
="$rootdir/tools/scramble -add=d2"
1953 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1954 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1956 bootoutput
="bootloader-cowond2.bin"
1957 appextra
="recorder:gui:radio"
1960 toolset
="$tccbitmaptools"
1961 # architecture, manufacturer and model for the target-tree build
1963 t_manufacturer
="tcc780x"
1969 modelname
="iaudiom3"
1970 target
="-DIAUDIO_M3"
1973 tool
="$rootdir/tools/scramble -add=iam3"
1974 boottool
="$rootdir/tools/scramble -iaudiom3"
1975 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1976 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
1977 output
="rockbox.iaudio"
1978 bootoutput
="cowon_m3.bin"
1979 appextra
="recorder:gui:radio"
1982 # toolset is the tools within the tools directory that we build for
1983 # this particular target.
1984 toolset
="$iaudiobitmaptools"
1985 # architecture, manufacturer and model for the target-tree build
1987 t_manufacturer
="iaudio"
1993 modelname
="gigabeatfx"
1994 target
="-DGIGABEAT_F"
1997 tool
="$rootdir/tools/scramble -add=giga"
1998 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1999 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2000 output
="rockbox.gigabeat"
2001 appextra
="recorder:gui:radio"
2004 toolset
=$gigabeatbitmaptools
2005 boottool
="$rootdir/tools/scramble -gigabeat"
2006 bootoutput
="FWIMG01.DAT"
2007 # architecture, manufacturer and model for the target-tree build
2009 t_manufacturer
="s3c2440"
2010 t_model
="gigabeat-fx"
2015 modelname
="gigabeats"
2016 target
="-DGIGABEAT_S"
2019 tool
="$rootdir/tools/scramble -add=gigs"
2020 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2021 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2022 output
="rockbox.gigabeat"
2023 appextra
="recorder:gui:radio"
2026 toolset
="$gigabeatbitmaptools"
2027 boottool
="$rootdir/tools/scramble -gigabeats"
2029 # architecture, manufacturer and model for the target-tree build
2031 t_manufacturer
="imx31"
2032 t_model
="gigabeat-s"
2037 modelname
="mrobe500"
2038 target
="-DMROBE_500"
2041 tool
="$rootdir/tools/scramble -add=m500"
2042 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2043 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2044 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2045 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2046 output
="rockbox.mrobe500"
2047 appextra
="recorder:gui:radio"
2050 toolset
=$gigabeatbitmaptools
2052 bootoutput
="rockbox.mrboot"
2053 # architecture, manufacturer and model for the target-tree build
2055 t_manufacturer
="tms320dm320"
2061 modelname
="mrobe100"
2062 target
="-DMROBE_100"
2065 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2066 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2067 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2068 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2069 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2070 output
="rockbox.mi4"
2071 appextra
="recorder:gui:radio"
2074 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2075 bootoutput
="pp5020.mi4"
2076 # toolset is the tools within the tools directory that we build for
2077 # this particular target.
2078 toolset
=$scramblebitmaptools
2079 # architecture, manufacturer and model for the target-tree build
2081 t_manufacturer
="olympus"
2087 modelname
="logikdax"
2088 target
="-DLOGIK_DAX"
2091 tool
="$rootdir/tools/scramble -add=ldax"
2092 boottool
="$rootdir/tools/scramble -tcc=crc"
2093 bootoutput
="player.rom"
2094 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2095 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2096 output
="rockbox.logik"
2097 appextra
="recorder:gui:radio"
2100 # toolset is the tools within the tools directory that we build for
2101 # this particular target.
2102 toolset
=$tccbitmaptools
2103 # architecture, manufacturer and model for the target-tree build
2105 t_manufacturer
="tcc77x"
2111 modelname
="zenvisionm30gb"
2112 target
="-DCREATIVE_ZVM"
2115 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2116 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2117 tool
="$rootdir/tools/scramble -creative=zvm"
2119 output
="rockbox.zvm"
2120 appextra
="recorder:gui:radio"
2123 toolset
=$ipodbitmaptools
2124 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2125 bootoutput
="rockbox.zvmboot"
2126 # architecture, manufacturer and model for the target-tree build
2128 t_manufacturer
="tms320dm320"
2129 t_model
="creative-zvm"
2134 modelname
="zenvisionm60gb"
2135 target
="-DCREATIVE_ZVM60GB"
2138 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2139 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2140 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2142 output
="rockbox.zvm60"
2143 appextra
="recorder:gui:radio"
2146 toolset
=$ipodbitmaptools
2147 boottool
="$rootdir/tools/scramble -creative=zvm60"
2148 bootoutput
="rockbox.zvm60boot"
2149 # architecture, manufacturer and model for the target-tree build
2151 t_manufacturer
="tms320dm320"
2152 t_model
="creative-zvm"
2157 modelname
="zenvision"
2158 target
="-DCREATIVE_ZV"
2161 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2162 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2163 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2166 appextra
="recorder:gui:radio"
2169 toolset
=$ipodbitmaptools
2170 boottool
="$rootdir/tools/scramble -creative=zenvision"
2171 bootoutput
="rockbox.zvboot"
2172 # architecture, manufacturer and model for the target-tree build
2174 t_manufacturer
="tms320dm320"
2175 t_model
="creative-zvm"
2180 modelname
="sansae200"
2181 target
="-DSANSA_E200"
2182 memory
=32 # supposedly
2184 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2185 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2186 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2187 output
="rockbox.mi4"
2188 appextra
="recorder:gui:radio"
2191 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2192 bootoutput
="PP5022.mi4"
2193 # toolset is the tools within the tools directory that we build for
2194 # this particular target.
2195 toolset
=$scramblebitmaptools
2196 # architecture, manufacturer and model for the target-tree build
2198 t_manufacturer
="sandisk"
2199 t_model
="sansa-e200"
2203 # the e200R model is pretty much identical to the e200, it only has a
2204 # different option to the scramble tool when building a bootloader and
2205 # makes the bootloader output file name in all lower case.
2207 modelname
="sansae200r"
2208 target
="-DSANSA_E200"
2209 memory
=32 # supposedly
2211 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2212 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2213 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2214 output
="rockbox.mi4"
2215 appextra
="recorder:gui:radio"
2218 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2219 bootoutput
="pp5022.mi4"
2220 # toolset is the tools within the tools directory that we build for
2221 # this particular target.
2222 toolset
=$scramblebitmaptools
2223 # architecture, manufacturer and model for the target-tree build
2225 t_manufacturer
="sandisk"
2226 t_model
="sansa-e200"
2231 modelname
="sansac200"
2232 target
="-DSANSA_C200"
2233 memory
=32 # supposedly
2235 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2236 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2237 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2238 output
="rockbox.mi4"
2239 appextra
="recorder:gui:radio"
2242 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2243 bootoutput
="firmware.mi4"
2244 # toolset is the tools within the tools directory that we build for
2245 # this particular target.
2246 toolset
=$scramblebitmaptools
2247 # architecture, manufacturer and model for the target-tree build
2249 t_manufacturer
="sandisk"
2250 t_model
="sansa-c200"
2255 modelname
="sansam200"
2256 target
="-DSANSA_M200"
2259 tool
="$rootdir/tools/scramble -add=m200"
2260 boottool
="$rootdir/tools/scramble -tcc=crc"
2261 bootoutput
="player.rom"
2262 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2263 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2264 output
="rockbox.m200"
2265 appextra
="recorder:gui:radio"
2268 # toolset is the tools within the tools directory that we build for
2269 # this particular target.
2270 toolset
=$tccbitmaptools
2271 # architecture, manufacturer and model for the target-tree build
2273 t_manufacturer
="tcc77x"
2279 modelname
="sansac100"
2280 target
="-DSANSA_C100"
2283 tool
="$rootdir/tools/scramble -add=c100"
2284 boottool
="$rootdir/tools/scramble -tcc=crc"
2285 bootoutput
="player.rom"
2286 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2287 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2288 output
="rockbox.c100"
2289 appextra
="recorder:gui:radio"
2292 # toolset is the tools within the tools directory that we build for
2293 # this particular target.
2294 toolset
=$tccbitmaptools
2295 # architecture, manufacturer and model for the target-tree build
2297 t_manufacturer
="tcc77x"
2303 modelname
="sansaclip"
2304 target
="-DSANSA_CLIP"
2306 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2307 bmp2rb_native
="$bmp2rb_mono"
2308 tool
="$rootdir/tools/scramble -add=clip"
2309 output
="rockbox.sansa"
2310 bootoutput
="bootloader-clip.sansa"
2311 appextra
="recorder:gui:radio"
2314 toolset
=$scramblebitmaptools
2316 t_manufacturer
="as3525"
2317 t_model
="sansa-clip"
2318 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2320 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2326 modelname
="sansae200v2"
2327 target
="-DSANSA_E200V2"
2329 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2330 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2331 tool
="$rootdir/tools/scramble -add=e2v2"
2332 output
="rockbox.sansa"
2333 bootoutput
="bootloader-e200v2.sansa"
2334 appextra
="recorder:gui:radio"
2337 toolset
=$scramblebitmaptools
2339 t_manufacturer
="as3525"
2340 t_model
="sansa-e200v2"
2347 modelname
="sansam200v4"
2348 target
="-DSANSA_M200V4"
2350 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2351 bmp2rb_native
="$bmp2rb_mono"
2352 tool
="$rootdir/tools/scramble -add=m2v4"
2353 output
="rockbox.sansa"
2354 bootoutput
="bootloader-m200v4.sansa"
2355 appextra
="recorder:gui:radio"
2358 toolset
=$scramblebitmaptools
2360 t_manufacturer
="as3525"
2361 t_model
="sansa-m200v4"
2362 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2364 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2370 modelname
="sansafuze"
2371 target
="-DSANSA_FUZE"
2373 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2374 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2375 tool
="$rootdir/tools/scramble -add=fuze"
2376 output
="rockbox.sansa"
2377 bootoutput
="bootloader-fuze.sansa"
2378 appextra
="recorder:gui:radio"
2381 toolset
=$scramblebitmaptools
2383 t_manufacturer
="as3525"
2384 t_model
="sansa-fuze"
2391 modelname
="sansac200v2"
2392 target
="-DSANSA_C200V2"
2393 memory
=2 # as per OF diagnosis mode
2394 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2395 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2396 tool
="$rootdir/tools/scramble -add=c2v2"
2397 output
="rockbox.sansa"
2398 bootoutput
="bootloader-c200v2.sansa"
2399 appextra
="recorder:gui:radio"
2402 # toolset is the tools within the tools directory that we build for
2403 # this particular target.
2404 toolset
=$scramblebitmaptools
2405 # architecture, manufacturer and model for the target-tree build
2407 t_manufacturer
="as3525"
2408 t_model
="sansa-c200v2"
2409 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2411 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2416 modelname
="sansaclipv2"
2417 target
="-DSANSA_CLIPV2"
2419 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2420 bmp2rb_native
="$bmp2rb_mono"
2421 tool
="$rootdir/tools/scramble -add=clv2"
2422 output
="rockbox.sansa"
2423 bootoutput
="bootloader-clipv2.sansa"
2424 appextra
="recorder:gui:radio"
2427 toolset
=$scramblebitmaptools
2429 t_manufacturer
="as3525"
2430 t_model
="sansa-clipv2"
2435 echo "Sansa View is not yet supported!"
2438 modelname
="sansaview"
2439 target
="-DSANSA_VIEW"
2442 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2443 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2444 output
="rockbox.mi4"
2448 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2449 bootoutput
="firmware.mi4"
2450 # toolset is the tools within the tools directory that we build for
2451 # this particular target.
2452 toolset
=$scramblebitmaptools
2454 t_manufacturer
="sandisk"
2455 t_model
="sansa-view"
2460 modelname
="sansaclipplus"
2461 target
="-DSANSA_CLIPPLUS"
2463 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2464 bmp2rb_native
="$bmp2rb_mono"
2465 tool
="$rootdir/tools/scramble -add=cli+"
2466 output
="rockbox.sansa"
2467 bootoutput
="bootloader-clipplus.sansa"
2468 appextra
="recorder:gui:radio"
2471 toolset
=$scramblebitmaptools
2473 t_manufacturer
="as3525"
2474 t_model
="sansa-clipplus"
2480 modelname
="sansafuzev2"
2481 target
="-DSANSA_FUZEV2"
2483 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2484 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2485 tool
="$rootdir/tools/scramble -add=fuz2"
2486 output
="rockbox.sansa"
2487 bootoutput
="bootloader-fuzev2.sansa"
2488 appextra
="recorder:gui:radio"
2491 toolset
=$scramblebitmaptools
2493 t_manufacturer
="as3525"
2494 t_model
="sansa-fuzev2"
2500 modelname
="tatungtpj1022"
2501 target
="-DTATUNG_TPJ1022"
2504 tool
="$rootdir/tools/scramble -add tpj2"
2505 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2506 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2507 output
="rockbox.elio"
2508 appextra
="recorder:gui:radio"
2511 boottool
="$rootdir/tools/scramble -mi4v2"
2512 bootoutput
="pp5020.mi4"
2513 # toolset is the tools within the tools directory that we build for
2514 # this particular target.
2515 toolset
=$scramblebitmaptools
2516 # architecture, manufacturer and model for the target-tree build
2518 t_manufacturer
="tatung"
2524 modelname
="gogearsa9200"
2525 target
="-DPHILIPS_SA9200"
2526 memory
=32 # supposedly
2528 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2529 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2530 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2531 output
="rockbox.mi4"
2532 appextra
="recorder:gui:radio"
2535 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2536 bootoutput
="FWImage.ebn"
2537 # toolset is the tools within the tools directory that we build for
2538 # this particular target.
2539 toolset
=$scramblebitmaptools
2540 # architecture, manufacturer and model for the target-tree build
2542 t_manufacturer
="philips"
2548 modelname
="gogearhdd1630"
2549 target
="-DPHILIPS_HDD1630"
2550 memory
=32 # supposedly
2552 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2553 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2554 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2555 output
="rockbox.mi4"
2556 appextra
="recorder:gui:radio"
2559 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2560 bootoutput
="FWImage.ebn"
2561 # toolset is the tools within the tools directory that we build for
2562 # this particular target.
2563 toolset
=$scramblebitmaptools
2564 # architecture, manufacturer and model for the target-tree build
2566 t_manufacturer
="philips"
2572 modelname
="gogearhdd6330"
2573 target
="-DPHILIPS_HDD6330"
2576 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2577 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2578 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2579 output
="rockbox.mi4"
2580 appextra
="recorder:gui:radio"
2583 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2584 bootoutput
="FWImage.ebn"
2585 # toolset is the tools within the tools directory that we build for
2586 # this particular target.
2587 toolset
=$scramblebitmaptools
2588 # architecture, manufacturer and model for the target-tree build
2590 t_manufacturer
="philips"
2596 modelname
="meizum6sl"
2597 target
="-DMEIZU_M6SL"
2601 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2602 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2603 output
="rockbox.meizu"
2604 appextra
="recorder:gui:radio"
2607 toolset
=$genericbitmaptools
2609 bootoutput
="rockboot.ebn"
2610 # architecture, manufacturer and model for the target-tree build
2612 t_manufacturer
="s5l8700"
2613 t_model
="meizu-m6sl"
2618 modelname
="meizum6sp"
2619 target
="-DMEIZU_M6SP"
2623 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2624 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2625 output
="rockbox.meizu"
2626 appextra
="recorder:gui:radio"
2629 toolset
=$genericbitmaptools
2631 bootoutput
="rockboot.ebn"
2632 # architecture, manufacturer and model for the target-tree build
2634 t_manufacturer
="s5l8700"
2635 t_model
="meizu-m6sp"
2645 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2646 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2647 output
="rockbox.meizu"
2648 appextra
="recorder:gui:radio"
2651 toolset
=$genericbitmaptools
2653 bootoutput
="rockboot.ebn"
2654 # architecture, manufacturer and model for the target-tree build
2656 t_manufacturer
="s5l8700"
2662 modelname
="ondavx747"
2663 target
="-DONDA_VX747"
2666 tool
="$rootdir/tools/scramble -add=x747"
2667 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2668 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2669 output
="rockbox.vx747"
2670 appextra
="recorder:gui:radio"
2673 toolset
=$genericbitmaptools
2674 boottool
="$rootdir/tools/scramble -ccpmp"
2675 bootoutput
="ccpmp.bin"
2676 # architecture, manufacturer and model for the target-tree build
2678 t_manufacturer
="ingenic_jz47xx"
2679 t_model
="onda_vx747"
2684 modelname
="ondavx767"
2685 target
="-DONDA_VX767"
2689 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2690 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2691 output
="rockbox.vx767"
2692 appextra
="recorder:gui:radio"
2695 toolset
=$genericbitmaptools
2696 boottool
="$rootdir/tools/scramble -ccpmp"
2697 bootoutput
="ccpmp.bin"
2698 # architecture, manufacturer and model for the target-tree build
2700 t_manufacturer
="ingenic_jz47xx"
2701 t_model
="onda_vx767"
2706 modelname
="ondavx747p"
2707 target
="-DONDA_VX747P"
2710 tool
="$rootdir/tools/scramble -add=747p"
2711 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2712 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2713 output
="rockbox.vx747p"
2714 appextra
="recorder:gui:radio"
2717 toolset
=$genericbitmaptools
2718 boottool
="$rootdir/tools/scramble -ccpmp"
2719 bootoutput
="ccpmp.bin"
2720 # architecture, manufacturer and model for the target-tree build
2722 t_manufacturer
="ingenic_jz47xx"
2723 t_model
="onda_vx747"
2728 modelname
="ondavx777"
2729 target
="-DONDA_VX777"
2732 tool
="$rootdir/tools/scramble -add=x777"
2733 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2734 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2735 output
="rockbox.vx777"
2736 appextra
="recorder:gui:radio"
2739 toolset
=$genericbitmaptools
2740 boottool
="$rootdir/tools/scramble -ccpmp"
2741 bootoutput
="ccpmp.bin"
2742 # architecture, manufacturer and model for the target-tree build
2744 t_manufacturer
="ingenic_jz47xx"
2745 t_model
="onda_vx747"
2750 modelname
="lyreproto1"
2751 target
="-DLYRE_PROTO1"
2755 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2756 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2757 output
="rockbox.lyre"
2758 appextra
="recorder:gui:radio"
2761 toolset
=$scramblebitmaptools
2763 bootoutput
="bootloader-proto1.lyre"
2764 # architecture, manufacturer and model for the target-tree build
2766 t_manufacturer
="at91sam"
2767 t_model
="lyre_proto1"
2772 modelname
="mini2440"
2776 tool
="$rootdir/tools/scramble -add=m244"
2777 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2778 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2779 output
="rockbox.mini2440"
2780 appextra
="recorder:gui:radio"
2783 toolset
=$scramblebitmaptools
2785 bootoutput
="bootloader-mini2440.lyre"
2786 # architecture, manufacturer and model for the target-tree build
2788 t_manufacturer
="s3c2440"
2794 modelname
="samsungyh820"
2795 target
="-DSAMSUNG_YH820"
2798 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2799 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2800 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2801 output
="rockbox.mi4"
2802 appextra
="recorder:gui:radio"
2805 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2806 bootoutput
="FW_YH820.mi4"
2807 # toolset is the tools within the tools directory that we build for
2808 # this particular target.
2809 toolset
=$scramblebitmaptools
2810 # architecture, manufacturer and model for the target-tree build
2812 t_manufacturer
="samsung"
2818 modelname
="samsungyh920"
2819 target
="-DSAMSUNG_YH920"
2822 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2823 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2824 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2825 output
="rockbox.mi4"
2826 appextra
="recorder:gui:radio"
2829 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2830 bootoutput
="PP5020.mi4"
2831 # toolset is the tools within the tools directory that we build for
2832 # this particular target.
2833 toolset
=$scramblebitmaptools
2834 # architecture, manufacturer and model for the target-tree build
2836 t_manufacturer
="samsung"
2842 modelname
="samsungyh925"
2843 target
="-DSAMSUNG_YH925"
2846 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2847 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2848 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2849 output
="rockbox.mi4"
2850 appextra
="recorder:gui:radio"
2853 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2854 bootoutput
="FW_YH925.mi4"
2855 # toolset is the tools within the tools directory that we build for
2856 # this particular target.
2857 toolset
=$scramblebitmaptools
2858 # architecture, manufacturer and model for the target-tree build
2860 t_manufacturer
="samsung"
2866 modelname
="samsungyps3"
2867 target
="-DSAMSUNG_YPS3"
2871 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2872 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2873 output
="rockbox.yps3"
2874 appextra
="recorder:gui:radio"
2877 toolset
=$genericbitmaptools
2879 bootoutput
="rockboot.ebn"
2880 # architecture, manufacturer and model for the target-tree build
2882 t_manufacturer
="s5l8700"
2889 target
="-DPBELL_VIBE500"
2892 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2893 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2894 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2895 output
="rockbox.mi4"
2896 appextra
="recorder:gui:radio"
2899 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2900 bootoutput
="jukebox.mi4"
2901 # toolset is the tools within the tools directory that we build for
2902 # this particular target.
2903 toolset
=$scramblebitmaptools
2904 # architecture, manufacturer and model for the target-tree build
2906 t_manufacturer
="pbell"
2912 modelname
="mpiohd200"
2913 target
="-DMPIO_HD200"
2916 tool
="$rootdir/tools/scramble -add=hd20"
2917 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2918 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2919 output
="rockbox.mpio"
2920 bootoutput
="bootloader.mpio"
2921 appextra
="recorder:gui:radio"
2924 # toolset is the tools within the tools directory that we build for
2925 # this particular target.
2926 toolset
="$genericbitmaptools"
2927 # architecture, manufacturer and model for the target-tree build
2929 t_manufacturer
="mpio"
2935 modelname
="mpiohd300"
2936 target
="-DMPIO_HD300"
2939 tool
="$rootdir/tools/scramble -add=hd30"
2940 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2941 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2942 output
="rockbox.mpio"
2943 bootoutput
="bootloader.mpio"
2944 appextra
="recorder:gui:radio"
2947 # toolset is the tools within the tools directory that we build for
2948 # this particular target.
2949 toolset
="$genericbitmaptools"
2950 # architecture, manufacturer and model for the target-tree build
2952 t_manufacturer
="mpio"
2958 modelname
="application"
2959 app_modelname
="sdlapp"
2960 target
="-DAPPLICATION"
2968 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2969 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2971 bootoutput
="rockbox"
2972 appextra
="recorder:gui:radio"
2975 # architecture, manufacturer and model for the target-tree build
2977 t_manufacturer
="sdl"
2983 modelname
="application"
2984 app_modelname
="android"
2985 target
="-DAPPLICATION"
2988 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
2989 bindir
="/data/data/org.rockbox/lib"
2990 libdir
="/data/data/org.rockbox/app_rockbox"
2996 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2997 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2998 output
="librockbox.so"
2999 bootoutput
="librockbox.so"
3000 appextra
="recorder:gui:radio"
3003 # architecture, manufacturer and model for the target-tree build
3005 t_manufacturer
="android"
3011 modelname
="application"
3012 app_modelname
="nokian8xx"
3014 target
="-DAPPLICATION"
3015 app_set_lcd_size
800 480
3016 sharedir
="/opt/rockbox/share/rockbox"
3017 bindir
="/opt/rockbox/bin"
3018 libdir
="/opt/rockbox/lib"
3024 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3025 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3027 bootoutput
="rockbox"
3028 appextra
="recorder:gui:radio"
3031 # architecture, manufacturer and model for the target-tree build
3033 t_manufacturer
="maemo"
3039 modelname
="application"
3040 app_modelname
="nokian900"
3042 target
="-DAPPLICATION"
3043 app_set_lcd_size
800 480
3044 sharedir
="/opt/rockbox/share/rockbox"
3045 bindir
="/opt/rockbox/bin"
3046 libdir
="/opt/rockbox/lib"
3052 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3053 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3055 bootoutput
="rockbox"
3056 appextra
="recorder:gui:radio"
3059 # architecture, manufacturer and model for the target-tree build
3061 t_manufacturer
="maemo"
3067 modelname
="application"
3068 app_modelname
="pandora"
3070 target
="-DAPPLICATION"
3071 app_set_lcd_size
800 480
3073 # sharedir="/opt/rockbox/share/rockbox"
3074 # bindir="/opt/rockbox/bin"
3075 # libdir="/opt/rockbox/lib"
3076 sharedir
="/media/TRANS32/rockbox/share/rockbox"
3077 bindir
="/media/TRANS32/rockbox/bin"
3078 libdir
="/media/TRANS32/rockbox/lib"
3084 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3085 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3087 bootoutput
="rockbox"
3088 appextra
="recorder:gui:radio"
3091 # architecture, manufacturer and model for the target-tree build
3093 t_manufacturer
="pandora"
3098 echo "Please select a supported target platform!"
3104 echo "Platform set to $modelname"
3108 ############################################################################
3109 # Amount of memory, for those that can differ. They have $memory unset at
3113 if [ -z "$memory" ]; then
3116 if [ "$ARG_RAM" ]; then
3119 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3132 if [ "$ARG_RAM" ]; then
3135 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3148 echo "Memory size selected: $memory MB"
3149 [ "$ARG_TYPE" ] ||
echo ""
3153 ##################################################################
3154 # Figure out build "type"
3157 # the ifp7x0 is the only platform that supports building a gdb stub like
3161 gdbstub
="(G)DB stub, "
3163 sansae200r|sansae200
)
3164 gdbstub
="(I)nstaller, "
3167 gdbstub
="(E)raser, "
3172 if [ "$ARG_TYPE" ]; then
3175 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
3181 appsdir
='\$(ROOTDIR)/bootloader'
3183 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3185 echo "e200R-installer build selected"
3188 appsdir
='\$(ROOTDIR)/bootloader'
3190 echo "C2(4)0 or C2(5)0"
3194 extradefines
="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
3195 echo "c240 eraser build selected"
3198 extradefines
="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
3199 echo "c240 eraser build selected"
3203 echo "c200 eraser build selected"
3206 if test $t_manufacturer = "archos"; then
3207 # Archos SH-based players do this somewhat differently for
3209 appsdir
='\$(ROOTDIR)/flash/bootbox'
3212 appsdir
='\$(ROOTDIR)/bootloader'
3215 if test -n "$boottool"; then
3218 if test -n "$bootoutput"; then
3222 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3224 echo "Bootloader build selected"
3227 if [ "$modelname" = "sansae200r" ]; then
3228 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3233 extradefines
="$extradefines -DSIMULATOR"
3236 echo "Simulator build selected"
3239 echo "Advanced build selected"
3240 whichadvanced
$btype
3243 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3244 appsdir
='\$(ROOTDIR)/gdb'
3253 echo "GDB stub build selected"
3258 echo "Manual build selected"
3266 extradefines
="$extradefines -DDEBUG"
3267 appsdir
='\$(ROOTDIR)/tools/checkwps';
3268 output
='checkwps.'${modelname};
3270 echo "CheckWPS build selected"
3278 appsdir
='\$(ROOTDIR)/tools/database';
3283 output
="database_${modelname}.exe"
3286 output
='database.'${modelname};
3290 echo "Database tool build selected"
3293 if [ "$modelname" = "sansae200r" ]; then
3294 echo "Do not use the e200R target for regular builds. Use e200 instead."
3298 btype
="N" # set it explicitly since RET only gets here as well
3299 echo "Normal build selected"
3303 # to be able running "make manual" from non-manual configuration
3306 manualdev
="archosfmrecorder"
3309 manualdev
="iriverh100"
3312 manualdev
="ipodmini1g"
3315 manualdev
=$modelname
3319 if [ -z "$debug" ]; then
3320 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3323 echo "Using source code root directory: $rootdir"
3325 # this was once possible to change at build-time, but no more:
3330 if [ "yes" = "$simulator" ]; then
3331 # setup compiler and things for simulator
3334 if [ -d "simdisk" ]; then
3335 echo "Subdirectory 'simdisk' already present"
3338 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3342 # Now, figure out version number of the (gcc) compiler we are about to use
3343 gccver
=`$CC -dumpversion`;
3345 # figure out the binutil version too and display it, mostly for the build
3346 # system etc to be able to see it easier
3347 if [ $uname = "Darwin" ]; then
3348 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3350 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3353 if [ -z "$gccver" ]; then
3354 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3355 echo "[WARNING] this may cause your build to fail since we cannot do the"
3356 echo "[WARNING] checks we want now."
3359 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3362 num1
=`echo $gccver | cut -d . -f1`
3363 num2
=`echo $gccver | cut -d . -f2`
3364 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3371 echo "Using $CC $gccver ($gccnum)"
3373 if test "$gccnum" -ge "400"; then
3374 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3375 # so we ignore that warnings for now
3377 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3380 if test "$gccnum" -ge "402"; then
3381 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3382 # and later would throw it for several valid cases
3383 GCCOPTS
="$GCCOPTS -Wno-override-init"
3387 ""|
"$CROSS_COMPILE")
3391 # cross-compile for win32
3394 # Verify that the cross-compiler is of a recommended version!
3395 if test "$gccver" != "$gccchoice"; then
3396 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3397 echo "WARNING: version $gccchoice!"
3398 echo "WARNING: This may cause your build to fail since it may be a version"
3399 echo "WARNING: that isn't functional or known to not be the best choice."
3400 echo "WARNING: If you suffer from build problems, you know that this is"
3401 echo "WARNING: a likely source for them..."
3409 echo "Using $LD $ldver"
3411 # check the compiler for SH platforms
3412 if test "$CC" = "sh-elf-gcc"; then
3413 if test "$gccnum" -lt "400"; then
3414 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3415 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3417 # figure out patch status
3418 gccpatch
=`$CC --version`;
3420 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3421 echo "gcc $gccver is rockbox patched"
3422 # then convert -O to -Os to get smaller binaries!
3423 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3425 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3426 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3431 if test "$CC" = "m68k-elf-gcc"; then
3432 # convert -O to -Os to get smaller binaries!
3433 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3436 if [ "$ARG_CCACHE" = "1" ]; then
3437 echo "Enable ccache for building"
3439 elif [ "$ARG_CCACHE" != "0" ]; then
3440 ccache
=`findtool ccache`
3441 if test -n "$ccache"; then
3442 echo "Found and uses ccache ($ccache)"
3446 # figure out the full path to the various commands if possible
3447 HOSTCC
=`findtool gcc --lit`
3448 HOSTAR
=`findtool ar --lit`
3449 CC
=`findtool ${CC} --lit`
3450 LD
=`findtool ${AR} --lit`
3451 AR
=`findtool ${AR} --lit`
3452 AS
=`findtool ${AS} --lit`
3453 OC
=`findtool ${OC} --lit`
3454 WINDRES
=`findtool ${WINDRES} --lit`
3455 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3456 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3457 RANLIB
=`findtool ${RANLIB} --lit`
3459 if test -n "$ccache"; then
3463 if test "$ARG_ARM_THUMB" = "1"; then
3464 extradefines
="$extradefines -DUSE_THUMB"
3465 CC
="$toolsdir/thumb-cc.py $CC"
3468 if test "X$endian" = "Xbig"; then
3469 defendian
="ROCKBOX_BIG_ENDIAN"
3471 defendian
="ROCKBOX_LITTLE_ENDIAN"
3474 if [ "$ARG_RBDIR" != "" ]; then
3475 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3480 echo "Using alternate rockbox dir: ${rbdir}"
3484 -e "s<@ENDIAN@<${defendian}<g" \
3485 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3486 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3487 -e "s<@config_rtc@<$config_rtc<g" \
3488 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3489 -e "s<@thread_support@<$thread_support<g" \
3490 -e "s<@RBDIR@<${rbdir}<g" \
3491 -e "s<@sharepath@<${sharedir}<g" \
3492 -e "s<@binpath@<${bindir}<g" \
3493 -e "s<@libpath@<${libdir}<g" \
3494 -e "s<@have_backlight@<$have_backlight<g" \
3495 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3496 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3497 -e "s<@lcd_width@<$app_lcd_width<g" \
3498 -e "s<@lcd_height@<$app_lcd_height<g" \
3500 /* This header was made by configure */
3501 #ifndef __BUILD_AUTOCONF_H
3502 #define __BUILD_AUTOCONF_H
3504 /* Define endianess for the target or simulator platform */
3507 /* Define this if you build rockbox to support the logf logging and display */
3508 #undef ROCKBOX_HAS_LOGF
3510 /* Define this to record a chart with timings for the stages of boot */
3513 /* optional define for a backlight modded Ondio */
3516 /* optional define for FM radio mod for iAudio M5 */
3519 /* optional define for ATA poweroff on Player */
3522 /* optional defines for RTC mod for h1x0 */
3526 /* the threading backend we use */
3527 #define @thread_support@
3529 /* lcd dimensions for application builds from configure */
3533 /* root of Rockbox */
3534 #define ROCKBOX_DIR "@RBDIR@"
3535 #define ROCKBOX_SHARE_PATH "@sharepath@"
3536 #define ROCKBOX_BINARY_PATH "@binpath@"
3537 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3539 #endif /* __BUILD_AUTOCONF_H */
3542 if test -n "$t_cpu"; then
3543 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3545 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3546 # Maemo needs the SDL port, too
3547 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3548 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3549 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3550 # Pandora needs the SDL port, too
3551 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3552 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3553 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3554 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3555 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3558 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3559 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3563 if test "$simulator" = "yes"; then
3564 # add simul make stuff on the #SIMUL# line
3565 simmagic1
="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3566 simmagic2
="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3568 # delete the lines that match
3569 simmagic1
='/@SIMUL1@/D'
3570 simmagic2
='/@SIMUL2@/D'
3573 if test "$swcodec" = "yes"; then
3574 voicetoolset
="rbspeexenc voicefont wavtrim"
3576 voicetoolset
="voicefont wavtrim"
3579 if test "$apps" = "apps"; then
3580 # only when we build "real" apps we build the .lng files
3584 #### Fix the cmdline ###
3585 if [ "$ARG_CCACHE" = "1" ]; then
3587 elif [ "$ARG_CCACHE" = "0" ]; then
3588 cmdline
="--no-ccache "
3590 if [ "$ARG_ARM_EABI" = "1" ]; then
3591 cmdline
="$cmdline--eabi "
3593 if [ -n "$ARG_PREFIX" ]; then
3594 cmdline
="$cmdline--prefix=\$(PREFIX) "
3596 if [ "$modelname" = "application" ]; then
3597 cmdline
="$cmdline--target=$app_modelname --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3599 cmdline
="$cmdline--target=\$(MODELNAME) "
3602 cmdline
="$cmdline--ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3607 -e "s<@ROOTDIR@<${rootdir}<g" \
3608 -e "s<@DEBUG@<${debug}<g" \
3609 -e "s<@MEMORY@<${memory}<g" \
3610 -e "s<@TARGET_ID@<${target_id}<g" \
3611 -e "s<@TARGET@<${target}<g" \
3612 -e "s<@CPU@<${t_cpu}<g" \
3613 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3614 -e "s<@MODELNAME@<${modelname}<g" \
3615 -e "s<@LANGUAGE@<${language}<g" \
3616 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3617 -e "s<@PWD@<${pwd}<g" \
3618 -e "s<@HOSTCC@<${HOSTCC}<g" \
3619 -e "s<@HOSTAR@<${HOSTAR}<g" \
3620 -e "s<@CC@<${CC}<g" \
3621 -e "s<@LD@<${LD}<g" \
3622 -e "s<@AR@<${AR}<g" \
3623 -e "s<@AS@<${AS}<g" \
3624 -e "s<@OC@<${OC}<g" \
3625 -e "s<@WINDRES@<${WINDRES}<g" \
3626 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3627 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3628 -e "s<@RANLIB@<${RANLIB}<g" \
3629 -e "s<@TOOL@<${tool}<g" \
3630 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3631 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3632 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3633 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3634 -e "s<@OUTPUT@<${output}<g" \
3635 -e "s<@APPEXTRA@<${appextra}<g" \
3636 -e "s<@ARCHOSROM@<${archosrom}<g" \
3637 -e "s<@FLASHFILE@<${flash}<g" \
3638 -e "s<@PLUGINS@<${plugins}<g" \
3639 -e "s<@CODECS@<${swcodec}<g" \
3640 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3641 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3642 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3643 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3644 -e "s<@LDOPTS@<${LDOPTS}<g" \
3645 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3646 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3647 -e "s<@EXTRADEF@<${extradefines}<g" \
3648 -e "s<@APPSDIR@<${appsdir}<g" \
3649 -e "s<@FIRMDIR@<${firmdir}<g" \
3650 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3651 -e "s<@APPS@<${apps}<g" \
3652 -e "s<@APP_TYPE@<${app_type}<g" \
3653 -e "s<@GCCVER@<${gccver}<g" \
3654 -e "s<@GCCNUM@<${gccnum}<g" \
3655 -e "s<@UNAME@<${uname}<g" \
3656 -e "s<@ENDIAN@<${defendian}<g" \
3657 -e "s<@TOOLSET@<${toolset}<g" \
3660 -e "s<@MANUALDEV@<${manualdev}<g" \
3661 -e "s<@ENCODER@<${ENC_CMD}<g" \
3662 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3663 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3664 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3665 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3666 -e "s<@LANGS@<${buildlangs}<g" \
3667 -e "s<@USE_ELF@<${USE_ELF}<g" \
3668 -e "s<@RBDIR@<${rbdir}<g" \
3669 -e "s<@sharepath@<${sharedir}<g" \
3670 -e "s<@binpath@<${bindir}<g" \
3671 -e "s<@libpath@<${libdir}<g" \
3672 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3673 -e "s<@CMDLINE@<$cmdline<g" \
3674 -e "s<@SDLCONFIG@<$sdl<g" \
3676 ## Automatically generated. http://www.rockbox.org/
3678 export ROOTDIR=@ROOTDIR@
3679 export FIRMDIR=@FIRMDIR@
3680 export APPSDIR=@APPSDIR@
3681 export TOOLSDIR=@TOOLSDIR@
3682 export DOCSDIR=\$(ROOTDIR)/docs
3683 export MANUALDIR=\${ROOTDIR}/manual
3684 export DEBUG=@DEBUG@
3685 export MODELNAME=@MODELNAME@
3686 export ARCHOSROM=@ARCHOSROM@
3687 export FLASHFILE=@FLASHFILE@
3688 export TARGET_ID=@TARGET_ID@
3689 export TARGET=@TARGET@
3691 export MANUFACTURER=@MANUFACTURER@
3693 export BUILDDIR=@PWD@
3694 export LANGUAGE=@LANGUAGE@
3695 export VOICELANGUAGE=@VOICELANGUAGE@
3696 export MEMORYSIZE=@MEMORY@
3697 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3698 export MKFIRMWARE=@TOOL@
3699 export BMP2RB_MONO=@BMP2RB_MONO@
3700 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3701 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3702 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3703 export BINARY=@OUTPUT@
3704 export APPEXTRA=@APPEXTRA@
3705 export ENABLEDPLUGINS=@PLUGINS@
3706 export SOFTWARECODECS=@CODECS@
3707 export EXTRA_DEFINES=@EXTRADEF@
3708 export HOSTCC=@HOSTCC@
3709 export HOSTAR=@HOSTAR@
3715 export WINDRES=@WINDRES@
3716 export DLLTOOL=@DLLTOOL@
3717 export DLLWRAP=@DLLWRAP@
3718 export RANLIB=@RANLIB@
3719 export PREFIX=@PREFIX@
3720 export PROFILE_OPTS=@PROFILE_OPTS@
3721 export APP_TYPE=@APP_TYPE@
3722 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3723 export GCCOPTS=@GCCOPTS@
3724 export TARGET_INC=@TARGET_INC@
3725 export LOADADDRESS=@LOADADDRESS@
3726 export SHARED_FLAG=@SHARED_FLAG@
3727 export LDOPTS=@LDOPTS@
3728 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3729 export GCCVER=@GCCVER@
3730 export GCCNUM=@GCCNUM@
3731 export UNAME=@UNAME@
3732 export MANUALDEV=@MANUALDEV@
3733 export TTS_OPTS=@TTS_OPTS@
3734 export TTS_ENGINE=@TTS_ENGINE@
3735 export ENC_OPTS=@ENC_OPTS@
3736 export ENCODER=@ENCODER@
3737 export USE_ELF=@USE_ELF@
3738 export RBDIR=@RBDIR@
3739 export ROCKBOX_SHARE_PATH=@sharepath@
3740 export ROCKBOX_BINARY_PATH=@binpath@
3741 export ROCKBOX_LIBRARY_PATH=@libpath@
3742 export SDLCONFIG=@SDLCONFIG@
3744 CONFIGURE_OPTIONS=@CMDLINE@
3746 include \$(TOOLSDIR)/root.make
3750 echo "Created Makefile"