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 new "Ivanovic" pandora toolchain is not able to compile rockbox.
592 # You have to use the sebt3 toolchain:
593 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
595 PNDSDK
="/usr/local/angstrom/arm"
596 if [ ! -x $PNDSDK/bin
/arm-angstrom-linux-gnueabi-gcc
]; then
597 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
601 PATH
=$PNDSDK/bin
:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/bin
602 PKG_CONFIG_PATH
=$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/lib
/pkgconfig
603 LDOPTS
="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
604 PKG_CONFIG
="pkg-config"
606 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
607 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
609 LDOPTS
="-lm -ldl $LDOPTS"
610 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
611 SHARED_FLAG
="-shared"
613 thread_support
="HAVE_SIGALTSTACK_THREADS"
614 extradefines
="$extradefines -DPANDORA"
616 # Set paths to PNDSDK root
617 # GCCOPTS="$GCCOPTS -I$PNDSDK/usr/include -L$PNDSDK/usr/lib -Wl,-rpath,$PNDSDK/usr/lib"
621 prefixtools
"$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
624 GCCOPTS
="$GCCOPTS `$PKG_CONFIG --cflags sdl`"
625 LDOPTS
="$LDOPTS `$PKG_CONFIG --libs sdl`"
628 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
629 GCCOPTS
="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
630 GCCOPTS
="$GCCOPTS -ffast-math -fsingle-precision-constant"
634 if [ -z "$ANDROID_SDK_PATH" ]; then
635 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
636 echo "environment variable point to the root directory of the Android SDK."
639 if [ -z "$ANDROID_NDK_PATH" ]; then
640 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
641 echo "environment variable point to the root directory of the Android NDK."
644 buildhost
=`uname | tr [:upper:] [:lower:]`
646 gcctarget
="arm-linux-androideabi-"
647 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
648 PATH
=$PATH:$gccprefix/bin
649 prefixtools
$gcctarget
650 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
651 GCCOPTS
="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
652 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
653 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
654 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
655 LDOPTS
="$LDOPTS -shared -nostdlib -ldl -llog"
656 extradefines
="$extradefines -DANDROID"
658 SHARED_FLAG
="-shared"
662 atype
=`echo "$1" | cut -c 2-`
663 ##################################################################
664 # Prompt for specific developer options
666 if [ "$atype" ]; then
671 printf "Enter your developer options (press only enter when done)\n\
672 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
673 (T)est plugins, S(m)all C lib:"
674 if [ "$memory" = "2" ]; then
677 if [ "$modelname" = "archosplayer" ]; then
678 printf ", Use (A)TA poweroff"
680 if [ "$t_model" = "ondio" ]; then
681 printf ", (B)acklight MOD"
683 if [ "$modelname" = "iaudiom5" ]; then
684 printf ", (F)M radio MOD"
686 if [ "$modelname" = "iriverh120" ]; then
693 while [ $cont = "1" ]; do
695 if [ "$interact" ]; then
698 option
=`echo "$atype" | cut -c 1`
703 if [ "yes" = "$profile" ]; then
704 echo "Debug is incompatible with profiling"
706 echo "DEBUG build enabled"
711 echo "logf() support enabled"
715 echo "Using Rockbox' small C library"
716 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
719 echo "Including test plugins"
720 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
723 echo "bootchart enabled (logf also enabled)"
728 echo "Simulator build enabled"
732 if [ "yes" = "$use_debug" ]; then
733 echo "Profiling is incompatible with debug"
735 echo "Profiling support is enabled"
740 echo "Voice build selected"
744 if [ "$memory" = "2" ]; then
746 echo "Memory size selected: 8MB"
750 if [ "$modelname" = "archosplayer" ]; then
751 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
752 echo "ATA power off enabled"
756 if [ "$t_model" = "ondio" ]; then
757 have_backlight
="#define HAVE_BACKLIGHT"
758 echo "Backlight functions enabled"
762 if [ "$modelname" = "iaudiom5" ]; then
763 have_fmradio_in
="#define HAVE_FMRADIO_IN"
764 echo "FM radio functions enabled"
768 if [ "$modelname" = "iriverh120" ]; then
769 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
770 have_rtc_alarm
="#define HAVE_RTC_ALARM"
771 echo "RTC functions enabled (DS1339/DS3231)"
775 echo "Enabling Windows 32 cross-compiling"
776 win32crosscompile
="yes"
778 "") # Match enter press when finished with advanced options
782 echo "[ERROR] Option $option unsupported"
785 if [ "$interact" ]; then
786 btype
="$btype$option"
788 atype
=`echo "$atype" | cut -c 2-`
789 [ "$atype" ] || cont
=0
794 if [ "yes" = "$voice" ]; then
795 # Ask about languages to build
797 voicelanguage
=`whichlang`
798 echo "Voice language set to $voicelanguage"
800 # Configure encoder and TTS engine for each language
801 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
802 voiceconfig
"$thislang"
805 if [ "yes" = "$use_debug" ]; then
807 GCCOPTS
="$GCCOPTS -g -DDEBUG"
809 if [ "yes" = "$logf" ]; then
810 use_logf
="#define ROCKBOX_HAS_LOGF 1"
812 if [ "yes" = "$bootchart" ]; then
813 use_bootchart
="#define DO_BOOTCHART 1"
815 if [ "yes" = "$simulator" ]; then
817 extradefines
="$extradefines -DSIMULATOR"
821 if [ "yes" = "$profile" ]; then
822 extradefines
="$extradefines -DRB_PROFILE"
823 PROFILE_OPTS
="-finstrument-functions"
827 # Configure voice settings
830 if [ ! "$ARG_TTS" ]; then
831 echo "Building $thislang voice for $modelname. Select options"
835 if [ -n "`findtool flite`" ]; then
839 DEFAULT_TTS_OPTS
=$FLITE_OPTS
840 DEFAULT_NOISEFLOOR
="500"
843 if [ -n "`findtool espeak`" ]; then
847 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
848 DEFAULT_NOISEFLOOR
="500"
851 if [ -n "`findtool festival`" ]; then
852 FESTIVAL
="(F)estival "
855 FESTIVAL_OPTS
="--language italian"
858 FESTIVAL_OPTS
="--language spanish"
861 FESTIVAL_OPTS
="--language finnish"
864 FESTIVAL_OPTS
="--language czech"
870 DEFAULT_TTS
="festival"
871 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
872 DEFAULT_NOISEFLOOR
="500"
875 if [ -n "`findtool swift`" ]; then
879 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
880 DEFAULT_NOISEFLOOR
="500"
883 # Allow SAPI if Windows is in use
884 if [ -n "`findtool winver`" ]; then
888 DEFAULT_TTS_OPTS
=$SAPI_OPTS
889 DEFAULT_NOISEFLOOR
="500"
893 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
894 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
898 if [ "$ARG_TTS" ]; then
901 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
904 advopts
="$advopts --tts=$option"
908 NOISEFLOOR
="500" # TODO: check this value
914 TTS_OPTS
=$ESPEAK_OPTS
917 TTS_ENGINE
="festival"
919 TTS_OPTS
=$FESTIVAL_OPTS
932 TTS_ENGINE
=$DEFAULT_TTS
933 TTS_OPTS
=$DEFAULT_TTS_OPTS
934 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
936 echo "Using $TTS_ENGINE for TTS"
938 # Select which voice to use for Festival
939 if [ "$TTS_ENGINE" = "festival" ]; then
940 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
941 for voice
in $voicelist; do
942 TTS_FESTIVAL_VOICE
="$voice" # Default choice
945 if [ "$ARG_VOICE" ]; then
949 for voice
in $voicelist; do
950 printf "%3d. %s\n" "$i" "$voice"
953 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
957 for voice
in $voicelist; do
958 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
959 TTS_FESTIVAL_VOICE
="$voice"
963 advopts
="$advopts --voice=$CHOICE"
964 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
965 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
968 # Read custom tts options from command line
969 if [ "$ARG_TTSOPTS" ]; then
970 TTS_OPTS
="$ARG_TTSOPTS"
971 advopts
="$advopts --ttsopts='$TTS_OPTS'"
972 echo "$TTS_ENGINE options set to $TTS_OPTS"
975 if [ "$swcodec" = "yes" ]; then
978 ENC_OPTS
="-q 4 -c 10"
980 if [ -n "`findtool lame`" ]; then
983 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
985 echo "You need LAME in the system path to build voice files for"
986 echo "HWCODEC targets."
991 echo "Using $ENCODER for encoding voice clips"
993 # Read custom encoder options from command line
994 if [ "$ARG_ENCOPTS" ]; then
995 ENC_OPTS
="$ARG_ENCOPTS"
996 advopts
="$advopts --encopts='$ENC_OPTS'"
997 echo "$ENCODER options set to $ENC_OPTS"
1001 if [ -n "`findtool cygpath`" ]; then
1002 TEMPDIR
=`cygpath . -a -w`
1007 # figure out which languages that are around
1008 for file in $rootdir/apps
/lang
/*.lang
; do
1009 clean
=`basename $file .lang`
1010 langs
="$langs $clean"
1013 if [ "$ARG_LANG" ]; then
1016 echo "Select a number for the language to use (default is english)"
1017 # FIXME The multiple-language feature is currently broken
1018 # echo "You may enter a comma-separated list of languages to build"
1021 for one
in $langs; do
1027 advopts
="$advopts --language=$pick"
1032 # Allow the user to pass a comma-separated list of langauges
1033 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1035 for one
in $langs; do
1036 # Accept both the language number and name
1037 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1038 if [ "$output" = "" ]; then
1047 if [ -z "$output" ]; then
1055 echo "Rockbox configure script."
1056 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1057 echo "Do *NOT* run this within the tools directory!"
1060 Usage: configure [OPTION]...
1062 --target=TARGET Sets the target, TARGET can be either the target ID or
1063 corresponding string. Run without this option to see all
1066 --ram=RAM Sets the RAM for certain targets. Even though any number
1067 is accepted, not every number is correct. The default
1068 value will be applied, if you entered a wrong number
1069 (which depends on the target). Watch the output. Run
1070 without this option if you are not sure which the right
1073 --type=TYPE Sets the build type. Shortcuts are also valid.
1074 Run without this option to see all available types.
1075 Multiple values are allowed and managed in the input
1076 order. So --type=b stands for Bootloader build, while
1077 --type=ab stands for "Backlight MOD" build.
1079 --language=LANG Set the language used for voice generation (used only if
1082 --tts=ENGINE Set the TTS engine used for voice generation (used only
1085 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1088 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1090 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1092 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1093 This is useful for having multiple alternate builds on
1094 your device that you can load with ROLO. However as the
1095 bootloader looks for .rockbox you won't be able to boot
1098 --ccache Enable ccache use (done by default these days)
1099 --no-ccache Disable ccache use
1101 --eabi Make configure prefer toolchains that are able to compile
1102 for the new ARM standard abi EABI
1103 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1104 --thumb Build with -mthumb (for ARM builds)
1105 --no-thumb The opposite of --thumb (don't use thumb even for targets
1106 where this is the default
1107 --sdl-threads Force use of SDL threads. They have inferior performance,
1108 but are better debuggable with GDB
1109 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1110 behavior of falling back to them if no native thread
1112 --prefix Target installation directory
1113 --help Shows this message (must not be used with other options)
1132 ARG_PREFIX
="$PREFIX"
1137 --ccache) ARG_CCACHE
=1;;
1138 --no-ccache) ARG_CCACHE
=0;;
1139 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1140 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1141 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1142 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1143 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1144 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1145 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1146 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1147 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1148 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1149 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1150 --eabi) ARG_ARM_EABI
=1;;
1151 --no-eabi) ARG_ARM_EABI
=0;;
1152 --thumb) ARG_ARM_THUMB
=1;;
1153 --no-thumb) ARG_ARM_THUMB
=0;;
1154 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1156 ARG_THREAD_SUPPORT
=0;;
1157 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1159 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1162 [ "$err" ] && exit 1
1166 if [ "$TMPDIR" != "" ]; then
1171 echo Using temporary directory
$tmpdir
1173 if test -r "configure"; then
1174 # this is a check for a configure script in the current directory, it there
1175 # is one, try to figure out if it is this one!
1177 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1178 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1179 echo "It will only cause you pain and grief. Instead do this:"
1182 echo " mkdir build-dir"
1183 echo " cd build-dir"
1184 echo " ../tools/configure"
1186 echo "Much happiness will arise from this. Enjoy"
1191 # get our current directory
1194 if { echo $pwd |
grep " "; } then
1195 echo "You're running this script in a path that contains space. The build"
1196 echo "system is unfortunately not clever enough to deal with this. Please"
1197 echo "run the script from a different path, rename the path or fix the build"
1202 if [ -z "$rootdir" ]; then
1203 ##################################################################
1204 # Figure out where the source code root is!
1206 rootdir
=`dirname $0`/..
/
1208 #####################################################################
1209 # Convert the possibly relative directory name to an absolute version
1215 # cd back to the build dir
1220 appsdir
='\$(ROOTDIR)/apps'
1221 firmdir
='\$(ROOTDIR)/firmware'
1222 toolsdir
='\$(ROOTDIR)/tools'
1225 ##################################################################
1226 # Figure out target platform
1229 if [ "$ARG_TARGET" ]; then
1230 buildfor
=$ARG_TARGET
1232 echo "Enter target platform:"
1234 ==Archos== ==iriver== ==Apple iPod==
1235 0) Player/Studio 10) H120/H140 20) Color/Photo
1236 1) Recorder 11) H320/H340 21) Nano 1G
1237 2) FM Recorder 12) iHP-100/110/115 22) Video
1238 3) Recorder v2 13) iFP-790 23) 3G
1239 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1240 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1241 6) AV300 26) Mini 2G
1242 ==Toshiba== 27) 1G, 2G
1243 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1244 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1246 32) 7 ==Olympus= ==SanDisk==
1247 33) D2 70) M:Robe 500 50) Sansa e200
1248 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1250 ==Creative== ==Philips== 53) Sansa m200
1251 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1252 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1253 92) Zen Vision HDD1830 56) Sansa e200v2
1254 102) GoGear HDD6330 57) Sansa m200v4
1255 ==Onda== 58) Sansa Fuze
1256 120) VX747 ==Meizu== 59) Sansa c200v2
1257 121) VX767 110) M6SL 60) Sansa Clipv2
1258 122) VX747+ 111) M6SP 61) Sansa View
1259 123) VX777 112) M3 62) Sansa Clip+
1261 ==Samsung== ==Tatung==
1262 140) YH-820 150) Elio TPJ-1022 ==Logik==
1263 141) YH-920 80) DAX 1GB MP3/DAB
1264 142) YH-925 ==Packard Bell==
1265 143) YP-S3 160) Vibe 500 ==Lyre project==
1267 ==Application== ==MPIO== 131) Mini2440
1269 201) Android 171) HD300
1279 # Set of tools built for all target platforms:
1280 toolset
="rdf2binary convbdf codepages"
1282 # Toolsets for some target families:
1283 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1284 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1285 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1286 ipodbitmaptools
="$toolset scramble bmp2rb"
1287 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1288 tccbitmaptools
="$toolset scramble bmp2rb"
1289 # generic is used by IFP, Meizu and Onda
1290 genericbitmaptools
="$toolset bmp2rb"
1291 # scramble is used by all other targets
1292 scramblebitmaptools
="$genericbitmaptools scramble"
1295 # ---- For each target ----
1298 # target_id: a unique number identifying this target, IS NOT the menu number.
1299 # Just use the currently highest number+1 when you add a new
1301 # modelname: short model name used all over to identify this target
1302 # memory: number of megabytes of RAM this target has. If the amount can
1303 # be selected by the size prompt, let memory be unset here
1304 # target: -Ddefine passed to the build commands to make the correct
1305 # config-*.h file get included etc
1306 # tool: the tool that takes a plain binary and converts that into a
1307 # working "firmware" file for your target
1308 # output: the final output file name
1309 # boottool: the tool that takes a plain binary and generates a bootloader
1310 # file for your target (or blank to use $tool)
1311 # bootoutput:the final output file name for the bootloader (or blank to use
1313 # appextra: passed to the APPEXTRA variable in the Makefiles.
1314 # TODO: add proper explanation
1315 # archosrom: used only for Archos targets that build a special flashable .ucl
1317 # flash: name of output for flashing, for targets where there's a special
1318 # file output for this.
1319 # plugins: set to 'yes' to build the plugins. Early development builds can
1320 # set this to no in the early stages to have an easier life for a
1322 # swcodec: set 'yes' on swcodec targets
1323 # toolset: lists what particular tools in the tools/ directory that this
1324 # target needs to have built prior to building Rockbox
1327 # *cc: sets up gcc and compiler options for your target builds. Note
1328 # that if you select a simulator build, the compiler selection is
1329 # overridden later in the script.
1335 modelname
="archosplayer"
1336 target
="-DARCHOS_PLAYER"
1338 tool
="$rootdir/tools/scramble"
1340 appextra
="player:gui"
1341 archosrom
="$pwd/rombox.ucl"
1342 flash
="$pwd/rockbox.ucl"
1346 # toolset is the tools within the tools directory that we build for
1347 # this particular target.
1348 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1350 # Note: the convbdf is present in the toolset just because: 1) the
1351 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1352 # build the player simulator
1355 t_manufacturer
="archos"
1361 modelname
="archosrecorder"
1362 target
="-DARCHOS_RECORDER"
1364 tool
="$rootdir/tools/scramble"
1365 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1366 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1368 appextra
="recorder:gui:radio"
1369 #archosrom="$pwd/rombox.ucl"
1370 flash
="$pwd/rockbox.ucl"
1373 # toolset is the tools within the tools directory that we build for
1374 # this particular target.
1375 toolset
=$archosbitmaptools
1377 t_manufacturer
="archos"
1383 modelname
="archosfmrecorder"
1384 target
="-DARCHOS_FMRECORDER"
1386 tool
="$rootdir/tools/scramble -fm"
1387 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1388 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1390 appextra
="recorder:gui:radio"
1391 #archosrom="$pwd/rombox.ucl"
1392 flash
="$pwd/rockbox.ucl"
1395 # toolset is the tools within the tools directory that we build for
1396 # this particular target.
1397 toolset
=$archosbitmaptools
1399 t_manufacturer
="archos"
1405 modelname
="archosrecorderv2"
1406 target
="-DARCHOS_RECORDERV2"
1408 tool
="$rootdir/tools/scramble -v2"
1409 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1410 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1412 appextra
="recorder:gui:radio"
1413 #archosrom="$pwd/rombox.ucl"
1414 flash
="$pwd/rockbox.ucl"
1417 # toolset is the tools within the tools directory that we build for
1418 # this particular target.
1419 toolset
=$archosbitmaptools
1421 t_manufacturer
="archos"
1427 modelname
="archosondiosp"
1428 target
="-DARCHOS_ONDIOSP"
1430 tool
="$rootdir/tools/scramble -osp"
1431 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1432 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1434 appextra
="recorder:gui:radio"
1435 #archosrom="$pwd/rombox.ucl"
1436 flash
="$pwd/rockbox.ucl"
1439 # toolset is the tools within the tools directory that we build for
1440 # this particular target.
1441 toolset
=$archosbitmaptools
1443 t_manufacturer
="archos"
1449 modelname
="archosondiofm"
1450 target
="-DARCHOS_ONDIOFM"
1452 tool
="$rootdir/tools/scramble -ofm"
1453 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1454 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1456 appextra
="recorder:gui:radio"
1457 #archosrom="$pwd/rombox.ucl"
1458 flash
="$pwd/rockbox.ucl"
1461 toolset
=$archosbitmaptools
1463 t_manufacturer
="archos"
1469 modelname
="archosav300"
1470 target
="-DARCHOS_AV300"
1473 tool
="$rootdir/tools/scramble -mm=C"
1474 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1475 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1477 appextra
="recorder:gui:radio"
1480 # toolset is the tools within the tools directory that we build for
1481 # this particular target.
1482 toolset
="$toolset scramble descramble bmp2rb"
1483 # architecture, manufacturer and model for the target-tree build
1485 t_manufacturer
="archos"
1491 modelname
="iriverh120"
1492 target
="-DIRIVER_H120"
1495 tool
="$rootdir/tools/scramble -add=h120"
1496 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1497 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1498 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1499 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1500 output
="rockbox.iriver"
1501 bootoutput
="bootloader.iriver"
1502 appextra
="recorder:gui:radio"
1503 flash
="$pwd/rombox.iriver"
1506 # toolset is the tools within the tools directory that we build for
1507 # this particular target.
1508 toolset
=$iriverbitmaptools
1510 t_manufacturer
="iriver"
1516 modelname
="iriverh300"
1517 target
="-DIRIVER_H300"
1520 tool
="$rootdir/tools/scramble -add=h300"
1521 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1522 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1523 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1524 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1525 output
="rockbox.iriver"
1526 appextra
="recorder:gui:radio"
1529 # toolset is the tools within the tools directory that we build for
1530 # this particular target.
1531 toolset
=$iriverbitmaptools
1533 t_manufacturer
="iriver"
1539 modelname
="iriverh100"
1540 target
="-DIRIVER_H100"
1543 tool
="$rootdir/tools/scramble -add=h100"
1544 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1545 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1546 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1547 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1548 output
="rockbox.iriver"
1549 bootoutput
="bootloader.iriver"
1550 appextra
="recorder:gui:radio"
1551 flash
="$pwd/rombox.iriver"
1554 # toolset is the tools within the tools directory that we build for
1555 # this particular target.
1556 toolset
=$iriverbitmaptools
1558 t_manufacturer
="iriver"
1564 modelname
="iriverifp7xx"
1565 target
="-DIRIVER_IFP7XX"
1569 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1570 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1571 output
="rockbox.wma"
1572 appextra
="recorder:gui:radio"
1575 # toolset is the tools within the tools directory that we build for
1576 # this particular target.
1577 toolset
=$genericbitmaptools
1579 t_manufacturer
="pnx0101"
1580 t_model
="iriver-ifp7xx"
1585 modelname
="iriverh10"
1586 target
="-DIRIVER_H10"
1589 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1590 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1591 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1592 output
="rockbox.mi4"
1593 appextra
="recorder:gui:radio"
1596 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1597 bootoutput
="H10_20GC.mi4"
1598 # toolset is the tools within the tools directory that we build for
1599 # this particular target.
1600 toolset
=$scramblebitmaptools
1601 # architecture, manufacturer and model for the target-tree build
1603 t_manufacturer
="iriver"
1609 modelname
="iriverh10_5gb"
1610 target
="-DIRIVER_H10_5GB"
1613 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1614 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1615 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1616 output
="rockbox.mi4"
1617 appextra
="recorder:gui:radio"
1620 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1621 bootoutput
="H10.mi4"
1622 # toolset is the tools within the tools directory that we build for
1623 # this particular target.
1624 toolset
=$scramblebitmaptools
1625 # architecture, manufacturer and model for the target-tree build
1627 t_manufacturer
="iriver"
1633 modelname
="ipodcolor"
1634 target
="-DIPOD_COLOR"
1637 tool
="$rootdir/tools/scramble -add=ipco"
1638 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1639 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1640 output
="rockbox.ipod"
1641 appextra
="recorder:gui:radio"
1644 bootoutput
="bootloader-$modelname.ipod"
1645 # toolset is the tools within the tools directory that we build for
1646 # this particular target.
1647 toolset
=$ipodbitmaptools
1648 # architecture, manufacturer and model for the target-tree build
1650 t_manufacturer
="ipod"
1656 modelname
="ipodnano1g"
1657 target
="-DIPOD_NANO"
1660 tool
="$rootdir/tools/scramble -add=nano"
1661 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1662 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1663 output
="rockbox.ipod"
1664 appextra
="recorder:gui:radio"
1667 bootoutput
="bootloader-$modelname.ipod"
1668 # toolset is the tools within the tools directory that we build for
1669 # this particular target.
1670 toolset
=$ipodbitmaptools
1671 # architecture, manufacturer and model for the target-tree build
1673 t_manufacturer
="ipod"
1679 modelname
="ipodvideo"
1680 target
="-DIPOD_VIDEO"
1681 memory
=64 # always. This is reduced at runtime if needed
1683 tool
="$rootdir/tools/scramble -add=ipvd"
1684 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1685 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1686 output
="rockbox.ipod"
1687 appextra
="recorder:gui:radio"
1690 bootoutput
="bootloader-$modelname.ipod"
1691 # toolset is the tools within the tools directory that we build for
1692 # this particular target.
1693 toolset
=$ipodbitmaptools
1694 # architecture, manufacturer and model for the target-tree build
1696 t_manufacturer
="ipod"
1706 tool
="$rootdir/tools/scramble -add=ip3g"
1707 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1708 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1709 output
="rockbox.ipod"
1710 appextra
="recorder:gui:radio"
1713 bootoutput
="bootloader-$modelname.ipod"
1714 # toolset is the tools within the tools directory that we build for
1715 # this particular target.
1716 toolset
=$ipodbitmaptools
1717 # architecture, manufacturer and model for the target-tree build
1719 t_manufacturer
="ipod"
1729 tool
="$rootdir/tools/scramble -add=ip4g"
1730 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1731 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1732 output
="rockbox.ipod"
1733 appextra
="recorder:gui:radio"
1736 bootoutput
="bootloader-$modelname.ipod"
1737 # toolset is the tools within the tools directory that we build for
1738 # this particular target.
1739 toolset
=$ipodbitmaptools
1740 # architecture, manufacturer and model for the target-tree build
1742 t_manufacturer
="ipod"
1748 modelname
="ipodmini1g"
1749 target
="-DIPOD_MINI"
1752 tool
="$rootdir/tools/scramble -add=mini"
1753 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1754 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1755 output
="rockbox.ipod"
1756 appextra
="recorder:gui:radio"
1759 bootoutput
="bootloader-$modelname.ipod"
1760 # toolset is the tools within the tools directory that we build for
1761 # this particular target.
1762 toolset
=$ipodbitmaptools
1763 # architecture, manufacturer and model for the target-tree build
1765 t_manufacturer
="ipod"
1771 modelname
="ipodmini2g"
1772 target
="-DIPOD_MINI2G"
1775 tool
="$rootdir/tools/scramble -add=mn2g"
1776 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1777 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1778 output
="rockbox.ipod"
1779 appextra
="recorder:gui:radio"
1782 bootoutput
="bootloader-$modelname.ipod"
1783 # toolset is the tools within the tools directory that we build for
1784 # this particular target.
1785 toolset
=$ipodbitmaptools
1786 # architecture, manufacturer and model for the target-tree build
1788 t_manufacturer
="ipod"
1794 modelname
="ipod1g2g"
1795 target
="-DIPOD_1G2G"
1798 tool
="$rootdir/tools/scramble -add=1g2g"
1799 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1800 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1801 output
="rockbox.ipod"
1802 appextra
="recorder:gui:radio"
1805 bootoutput
="bootloader-$modelname.ipod"
1806 # toolset is the tools within the tools directory that we build for
1807 # this particular target.
1808 toolset
=$ipodbitmaptools
1809 # architecture, manufacturer and model for the target-tree build
1811 t_manufacturer
="ipod"
1817 modelname
="ipodnano2g"
1818 target
="-DIPOD_NANO2G"
1821 tool
="$rootdir/tools/scramble -add=nn2g"
1822 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1823 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1824 output
="rockbox.ipod"
1825 appextra
="recorder:gui:radio"
1828 bootoutput
="bootloader-$modelname.ipod"
1829 # toolset is the tools within the tools directory that we build for
1830 # this particular target.
1831 toolset
=$ipodbitmaptools
1832 # architecture, manufacturer and model for the target-tree build
1834 t_manufacturer
="s5l8700"
1835 t_model
="ipodnano2g"
1844 tool
="$rootdir/tools/scramble -add=ip6g"
1845 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1846 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1847 output
="rockbox.ipod"
1848 appextra
="recorder:gui:radio"
1851 bootoutput
="bootloader-$modelname.ipod"
1852 # toolset is the tools within the tools directory that we build for
1853 # this particular target.
1854 toolset
=$ipodbitmaptools
1855 # architecture, manufacturer and model for the target-tree build
1857 t_manufacturer
="s5l8702"
1863 modelname
="iaudiox5"
1864 target
="-DIAUDIO_X5"
1867 tool
="$rootdir/tools/scramble -add=iax5"
1868 boottool
="$rootdir/tools/scramble -iaudiox5"
1869 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1870 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1871 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1872 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1873 output
="rockbox.iaudio"
1874 bootoutput
="x5_fw.bin"
1875 appextra
="recorder:gui:radio"
1878 # toolset is the tools within the tools directory that we build for
1879 # this particular target.
1880 toolset
="$iaudiobitmaptools"
1881 # architecture, manufacturer and model for the target-tree build
1883 t_manufacturer
="iaudio"
1889 modelname
="iaudiom5"
1890 target
="-DIAUDIO_M5"
1893 tool
="$rootdir/tools/scramble -add=iam5"
1894 boottool
="$rootdir/tools/scramble -iaudiom5"
1895 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1896 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1897 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1898 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1899 output
="rockbox.iaudio"
1900 bootoutput
="m5_fw.bin"
1901 appextra
="recorder:gui:radio"
1904 # toolset is the tools within the tools directory that we build for
1905 # this particular target.
1906 toolset
="$iaudiobitmaptools"
1907 # architecture, manufacturer and model for the target-tree build
1909 t_manufacturer
="iaudio"
1919 tool
="$rootdir/tools/scramble -add=i7"
1920 boottool
="$rootdir/tools/scramble -tcc=crc"
1921 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1922 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1923 output
="rockbox.iaudio"
1924 appextra
="recorder:gui:radio"
1927 bootoutput
="I7_FW.BIN"
1928 # toolset is the tools within the tools directory that we build for
1929 # this particular target.
1930 toolset
="$tccbitmaptools"
1931 # architecture, manufacturer and model for the target-tree build
1933 t_manufacturer
="tcc77x"
1943 tool
="$rootdir/tools/scramble -add=d2"
1945 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1946 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1948 bootoutput
="bootloader-cowond2.bin"
1949 appextra
="recorder:gui:radio"
1952 toolset
="$tccbitmaptools"
1953 # architecture, manufacturer and model for the target-tree build
1955 t_manufacturer
="tcc780x"
1961 modelname
="iaudiom3"
1962 target
="-DIAUDIO_M3"
1965 tool
="$rootdir/tools/scramble -add=iam3"
1966 boottool
="$rootdir/tools/scramble -iaudiom3"
1967 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1968 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
1969 output
="rockbox.iaudio"
1970 bootoutput
="cowon_m3.bin"
1971 appextra
="recorder:gui:radio"
1974 # toolset is the tools within the tools directory that we build for
1975 # this particular target.
1976 toolset
="$iaudiobitmaptools"
1977 # architecture, manufacturer and model for the target-tree build
1979 t_manufacturer
="iaudio"
1985 modelname
="gigabeatfx"
1986 target
="-DGIGABEAT_F"
1989 tool
="$rootdir/tools/scramble -add=giga"
1990 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1991 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1992 output
="rockbox.gigabeat"
1993 appextra
="recorder:gui:radio"
1996 toolset
=$gigabeatbitmaptools
1997 boottool
="$rootdir/tools/scramble -gigabeat"
1998 bootoutput
="FWIMG01.DAT"
1999 # architecture, manufacturer and model for the target-tree build
2001 t_manufacturer
="s3c2440"
2002 t_model
="gigabeat-fx"
2007 modelname
="gigabeats"
2008 target
="-DGIGABEAT_S"
2011 tool
="$rootdir/tools/scramble -add=gigs"
2012 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2013 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2014 output
="rockbox.gigabeat"
2015 appextra
="recorder:gui:radio"
2018 toolset
="$gigabeatbitmaptools"
2019 boottool
="$rootdir/tools/scramble -gigabeats"
2021 # architecture, manufacturer and model for the target-tree build
2023 t_manufacturer
="imx31"
2024 t_model
="gigabeat-s"
2029 modelname
="mrobe500"
2030 target
="-DMROBE_500"
2033 tool
="$rootdir/tools/scramble -add=m500"
2034 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2035 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2036 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2037 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2038 output
="rockbox.mrobe500"
2039 appextra
="recorder:gui:radio"
2042 toolset
=$gigabeatbitmaptools
2044 bootoutput
="rockbox.mrboot"
2045 # architecture, manufacturer and model for the target-tree build
2047 t_manufacturer
="tms320dm320"
2053 modelname
="mrobe100"
2054 target
="-DMROBE_100"
2057 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2058 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2059 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2060 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2061 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2062 output
="rockbox.mi4"
2063 appextra
="recorder:gui:radio"
2066 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2067 bootoutput
="pp5020.mi4"
2068 # toolset is the tools within the tools directory that we build for
2069 # this particular target.
2070 toolset
=$scramblebitmaptools
2071 # architecture, manufacturer and model for the target-tree build
2073 t_manufacturer
="olympus"
2079 modelname
="logikdax"
2080 target
="-DLOGIK_DAX"
2083 tool
="$rootdir/tools/scramble -add=ldax"
2084 boottool
="$rootdir/tools/scramble -tcc=crc"
2085 bootoutput
="player.rom"
2086 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2087 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2088 output
="rockbox.logik"
2089 appextra
="recorder:gui:radio"
2092 # toolset is the tools within the tools directory that we build for
2093 # this particular target.
2094 toolset
=$tccbitmaptools
2095 # architecture, manufacturer and model for the target-tree build
2097 t_manufacturer
="tcc77x"
2103 modelname
="zenvisionm30gb"
2104 target
="-DCREATIVE_ZVM"
2107 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2108 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2109 tool
="$rootdir/tools/scramble -creative=zvm"
2111 output
="rockbox.zvm"
2112 appextra
="recorder:gui:radio"
2115 toolset
=$ipodbitmaptools
2116 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2117 bootoutput
="rockbox.zvmboot"
2118 # architecture, manufacturer and model for the target-tree build
2120 t_manufacturer
="tms320dm320"
2121 t_model
="creative-zvm"
2126 modelname
="zenvisionm60gb"
2127 target
="-DCREATIVE_ZVM60GB"
2130 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2131 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2132 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2134 output
="rockbox.zvm60"
2135 appextra
="recorder:gui:radio"
2138 toolset
=$ipodbitmaptools
2139 boottool
="$rootdir/tools/scramble -creative=zvm60"
2140 bootoutput
="rockbox.zvm60boot"
2141 # architecture, manufacturer and model for the target-tree build
2143 t_manufacturer
="tms320dm320"
2144 t_model
="creative-zvm"
2149 modelname
="zenvision"
2150 target
="-DCREATIVE_ZV"
2153 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2154 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2155 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2158 appextra
="recorder:gui:radio"
2161 toolset
=$ipodbitmaptools
2162 boottool
="$rootdir/tools/scramble -creative=zenvision"
2163 bootoutput
="rockbox.zvboot"
2164 # architecture, manufacturer and model for the target-tree build
2166 t_manufacturer
="tms320dm320"
2167 t_model
="creative-zvm"
2172 modelname
="sansae200"
2173 target
="-DSANSA_E200"
2174 memory
=32 # supposedly
2176 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2177 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2178 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2179 output
="rockbox.mi4"
2180 appextra
="recorder:gui:radio"
2183 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2184 bootoutput
="PP5022.mi4"
2185 # toolset is the tools within the tools directory that we build for
2186 # this particular target.
2187 toolset
=$scramblebitmaptools
2188 # architecture, manufacturer and model for the target-tree build
2190 t_manufacturer
="sandisk"
2191 t_model
="sansa-e200"
2195 # the e200R model is pretty much identical to the e200, it only has a
2196 # different option to the scramble tool when building a bootloader and
2197 # makes the bootloader output file name in all lower case.
2199 modelname
="sansae200r"
2200 target
="-DSANSA_E200"
2201 memory
=32 # supposedly
2203 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2204 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2205 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2206 output
="rockbox.mi4"
2207 appextra
="recorder:gui:radio"
2210 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2211 bootoutput
="pp5022.mi4"
2212 # toolset is the tools within the tools directory that we build for
2213 # this particular target.
2214 toolset
=$scramblebitmaptools
2215 # architecture, manufacturer and model for the target-tree build
2217 t_manufacturer
="sandisk"
2218 t_model
="sansa-e200"
2223 modelname
="sansac200"
2224 target
="-DSANSA_C200"
2225 memory
=32 # supposedly
2227 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2228 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2229 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2230 output
="rockbox.mi4"
2231 appextra
="recorder:gui:radio"
2234 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2235 bootoutput
="firmware.mi4"
2236 # toolset is the tools within the tools directory that we build for
2237 # this particular target.
2238 toolset
=$scramblebitmaptools
2239 # architecture, manufacturer and model for the target-tree build
2241 t_manufacturer
="sandisk"
2242 t_model
="sansa-c200"
2247 modelname
="sansam200"
2248 target
="-DSANSA_M200"
2251 tool
="$rootdir/tools/scramble -add=m200"
2252 boottool
="$rootdir/tools/scramble -tcc=crc"
2253 bootoutput
="player.rom"
2254 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2255 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2256 output
="rockbox.m200"
2257 appextra
="recorder:gui:radio"
2260 # toolset is the tools within the tools directory that we build for
2261 # this particular target.
2262 toolset
=$tccbitmaptools
2263 # architecture, manufacturer and model for the target-tree build
2265 t_manufacturer
="tcc77x"
2271 modelname
="sansac100"
2272 target
="-DSANSA_C100"
2275 tool
="$rootdir/tools/scramble -add=c100"
2276 boottool
="$rootdir/tools/scramble -tcc=crc"
2277 bootoutput
="player.rom"
2278 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2279 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2280 output
="rockbox.c100"
2281 appextra
="recorder:gui:radio"
2284 # toolset is the tools within the tools directory that we build for
2285 # this particular target.
2286 toolset
=$tccbitmaptools
2287 # architecture, manufacturer and model for the target-tree build
2289 t_manufacturer
="tcc77x"
2295 modelname
="sansaclip"
2296 target
="-DSANSA_CLIP"
2298 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2299 bmp2rb_native
="$bmp2rb_mono"
2300 tool
="$rootdir/tools/scramble -add=clip"
2301 output
="rockbox.sansa"
2302 bootoutput
="bootloader-clip.sansa"
2303 appextra
="recorder:gui:radio"
2306 toolset
=$scramblebitmaptools
2308 t_manufacturer
="as3525"
2309 t_model
="sansa-clip"
2310 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2312 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2318 modelname
="sansae200v2"
2319 target
="-DSANSA_E200V2"
2321 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2322 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2323 tool
="$rootdir/tools/scramble -add=e2v2"
2324 output
="rockbox.sansa"
2325 bootoutput
="bootloader-e200v2.sansa"
2326 appextra
="recorder:gui:radio"
2329 toolset
=$scramblebitmaptools
2331 t_manufacturer
="as3525"
2332 t_model
="sansa-e200v2"
2339 modelname
="sansam200v4"
2340 target
="-DSANSA_M200V4"
2342 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2343 bmp2rb_native
="$bmp2rb_mono"
2344 tool
="$rootdir/tools/scramble -add=m2v4"
2345 output
="rockbox.sansa"
2346 bootoutput
="bootloader-m200v4.sansa"
2347 appextra
="recorder:gui:radio"
2350 toolset
=$scramblebitmaptools
2352 t_manufacturer
="as3525"
2353 t_model
="sansa-m200v4"
2354 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2356 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2362 modelname
="sansafuze"
2363 target
="-DSANSA_FUZE"
2365 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2366 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2367 tool
="$rootdir/tools/scramble -add=fuze"
2368 output
="rockbox.sansa"
2369 bootoutput
="bootloader-fuze.sansa"
2370 appextra
="recorder:gui:radio"
2373 toolset
=$scramblebitmaptools
2375 t_manufacturer
="as3525"
2376 t_model
="sansa-fuze"
2383 modelname
="sansac200v2"
2384 target
="-DSANSA_C200V2"
2385 memory
=2 # as per OF diagnosis mode
2386 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2387 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2388 tool
="$rootdir/tools/scramble -add=c2v2"
2389 output
="rockbox.sansa"
2390 bootoutput
="bootloader-c200v2.sansa"
2391 appextra
="recorder:gui:radio"
2394 # toolset is the tools within the tools directory that we build for
2395 # this particular target.
2396 toolset
=$scramblebitmaptools
2397 # architecture, manufacturer and model for the target-tree build
2399 t_manufacturer
="as3525"
2400 t_model
="sansa-c200v2"
2401 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2403 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2408 modelname
="sansaclipv2"
2409 target
="-DSANSA_CLIPV2"
2411 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2412 bmp2rb_native
="$bmp2rb_mono"
2413 tool
="$rootdir/tools/scramble -add=clv2"
2414 output
="rockbox.sansa"
2415 bootoutput
="bootloader-clipv2.sansa"
2416 appextra
="recorder:gui:radio"
2419 toolset
=$scramblebitmaptools
2421 t_manufacturer
="as3525"
2422 t_model
="sansa-clipv2"
2427 echo "Sansa View is not yet supported!"
2430 modelname
="sansaview"
2431 target
="-DSANSA_VIEW"
2434 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2435 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2436 output
="rockbox.mi4"
2440 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2441 bootoutput
="firmware.mi4"
2442 # toolset is the tools within the tools directory that we build for
2443 # this particular target.
2444 toolset
=$scramblebitmaptools
2446 t_manufacturer
="sandisk"
2447 t_model
="sansa-view"
2452 modelname
="sansaclipplus"
2453 target
="-DSANSA_CLIPPLUS"
2455 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2456 bmp2rb_native
="$bmp2rb_mono"
2457 tool
="$rootdir/tools/scramble -add=cli+"
2458 output
="rockbox.sansa"
2459 bootoutput
="bootloader-clipplus.sansa"
2460 appextra
="recorder:gui:radio"
2463 toolset
=$scramblebitmaptools
2465 t_manufacturer
="as3525"
2466 t_model
="sansa-clipplus"
2472 modelname
="sansafuzev2"
2473 target
="-DSANSA_FUZEV2"
2475 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2476 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2477 tool
="$rootdir/tools/scramble -add=fuz2"
2478 output
="rockbox.sansa"
2479 bootoutput
="bootloader-fuzev2.sansa"
2480 appextra
="recorder:gui:radio"
2483 toolset
=$scramblebitmaptools
2485 t_manufacturer
="as3525"
2486 t_model
="sansa-fuzev2"
2492 modelname
="tatungtpj1022"
2493 target
="-DTATUNG_TPJ1022"
2496 tool
="$rootdir/tools/scramble -add tpj2"
2497 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2498 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2499 output
="rockbox.elio"
2500 appextra
="recorder:gui:radio"
2503 boottool
="$rootdir/tools/scramble -mi4v2"
2504 bootoutput
="pp5020.mi4"
2505 # toolset is the tools within the tools directory that we build for
2506 # this particular target.
2507 toolset
=$scramblebitmaptools
2508 # architecture, manufacturer and model for the target-tree build
2510 t_manufacturer
="tatung"
2516 modelname
="gogearsa9200"
2517 target
="-DPHILIPS_SA9200"
2518 memory
=32 # supposedly
2520 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2521 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2522 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2523 output
="rockbox.mi4"
2524 appextra
="recorder:gui:radio"
2527 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2528 bootoutput
="FWImage.ebn"
2529 # toolset is the tools within the tools directory that we build for
2530 # this particular target.
2531 toolset
=$scramblebitmaptools
2532 # architecture, manufacturer and model for the target-tree build
2534 t_manufacturer
="philips"
2540 modelname
="gogearhdd1630"
2541 target
="-DPHILIPS_HDD1630"
2542 memory
=32 # supposedly
2544 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2545 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2546 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2547 output
="rockbox.mi4"
2548 appextra
="recorder:gui:radio"
2551 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2552 bootoutput
="FWImage.ebn"
2553 # toolset is the tools within the tools directory that we build for
2554 # this particular target.
2555 toolset
=$scramblebitmaptools
2556 # architecture, manufacturer and model for the target-tree build
2558 t_manufacturer
="philips"
2564 modelname
="gogearhdd6330"
2565 target
="-DPHILIPS_HDD6330"
2568 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2569 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2570 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2571 output
="rockbox.mi4"
2572 appextra
="recorder:gui:radio"
2575 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2576 bootoutput
="FWImage.ebn"
2577 # toolset is the tools within the tools directory that we build for
2578 # this particular target.
2579 toolset
=$scramblebitmaptools
2580 # architecture, manufacturer and model for the target-tree build
2582 t_manufacturer
="philips"
2588 modelname
="meizum6sl"
2589 target
="-DMEIZU_M6SL"
2593 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2594 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2595 output
="rockbox.meizu"
2596 appextra
="recorder:gui:radio"
2599 toolset
=$genericbitmaptools
2601 bootoutput
="rockboot.ebn"
2602 # architecture, manufacturer and model for the target-tree build
2604 t_manufacturer
="s5l8700"
2605 t_model
="meizu-m6sl"
2610 modelname
="meizum6sp"
2611 target
="-DMEIZU_M6SP"
2615 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2616 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2617 output
="rockbox.meizu"
2618 appextra
="recorder:gui:radio"
2621 toolset
=$genericbitmaptools
2623 bootoutput
="rockboot.ebn"
2624 # architecture, manufacturer and model for the target-tree build
2626 t_manufacturer
="s5l8700"
2627 t_model
="meizu-m6sp"
2637 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2638 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2639 output
="rockbox.meizu"
2640 appextra
="recorder:gui:radio"
2643 toolset
=$genericbitmaptools
2645 bootoutput
="rockboot.ebn"
2646 # architecture, manufacturer and model for the target-tree build
2648 t_manufacturer
="s5l8700"
2654 modelname
="ondavx747"
2655 target
="-DONDA_VX747"
2658 tool
="$rootdir/tools/scramble -add=x747"
2659 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2660 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2661 output
="rockbox.vx747"
2662 appextra
="recorder:gui:radio"
2665 toolset
=$genericbitmaptools
2666 boottool
="$rootdir/tools/scramble -ccpmp"
2667 bootoutput
="ccpmp.bin"
2668 # architecture, manufacturer and model for the target-tree build
2670 t_manufacturer
="ingenic_jz47xx"
2671 t_model
="onda_vx747"
2676 modelname
="ondavx767"
2677 target
="-DONDA_VX767"
2681 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2682 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2683 output
="rockbox.vx767"
2684 appextra
="recorder:gui:radio"
2687 toolset
=$genericbitmaptools
2688 boottool
="$rootdir/tools/scramble -ccpmp"
2689 bootoutput
="ccpmp.bin"
2690 # architecture, manufacturer and model for the target-tree build
2692 t_manufacturer
="ingenic_jz47xx"
2693 t_model
="onda_vx767"
2698 modelname
="ondavx747p"
2699 target
="-DONDA_VX747P"
2702 tool
="$rootdir/tools/scramble -add=747p"
2703 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2704 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2705 output
="rockbox.vx747p"
2706 appextra
="recorder:gui:radio"
2709 toolset
=$genericbitmaptools
2710 boottool
="$rootdir/tools/scramble -ccpmp"
2711 bootoutput
="ccpmp.bin"
2712 # architecture, manufacturer and model for the target-tree build
2714 t_manufacturer
="ingenic_jz47xx"
2715 t_model
="onda_vx747"
2720 modelname
="ondavx777"
2721 target
="-DONDA_VX777"
2724 tool
="$rootdir/tools/scramble -add=x777"
2725 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2726 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2727 output
="rockbox.vx777"
2728 appextra
="recorder:gui:radio"
2731 toolset
=$genericbitmaptools
2732 boottool
="$rootdir/tools/scramble -ccpmp"
2733 bootoutput
="ccpmp.bin"
2734 # architecture, manufacturer and model for the target-tree build
2736 t_manufacturer
="ingenic_jz47xx"
2737 t_model
="onda_vx747"
2742 modelname
="lyreproto1"
2743 target
="-DLYRE_PROTO1"
2747 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2748 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2749 output
="rockbox.lyre"
2750 appextra
="recorder:gui:radio"
2753 toolset
=$scramblebitmaptools
2755 bootoutput
="bootloader-proto1.lyre"
2756 # architecture, manufacturer and model for the target-tree build
2758 t_manufacturer
="at91sam"
2759 t_model
="lyre_proto1"
2764 modelname
="mini2440"
2768 tool
="$rootdir/tools/scramble -add=m244"
2769 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2770 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2771 output
="rockbox.mini2440"
2772 appextra
="recorder:gui:radio"
2775 toolset
=$scramblebitmaptools
2777 bootoutput
="bootloader-mini2440.lyre"
2778 # architecture, manufacturer and model for the target-tree build
2780 t_manufacturer
="s3c2440"
2786 modelname
="samsungyh820"
2787 target
="-DSAMSUNG_YH820"
2790 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2791 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2792 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2793 output
="rockbox.mi4"
2794 appextra
="recorder:gui:radio"
2797 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2798 bootoutput
="FW_YH820.mi4"
2799 # toolset is the tools within the tools directory that we build for
2800 # this particular target.
2801 toolset
=$scramblebitmaptools
2802 # architecture, manufacturer and model for the target-tree build
2804 t_manufacturer
="samsung"
2810 modelname
="samsungyh920"
2811 target
="-DSAMSUNG_YH920"
2814 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2815 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2816 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2817 output
="rockbox.mi4"
2818 appextra
="recorder:gui:radio"
2821 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2822 bootoutput
="PP5020.mi4"
2823 # toolset is the tools within the tools directory that we build for
2824 # this particular target.
2825 toolset
=$scramblebitmaptools
2826 # architecture, manufacturer and model for the target-tree build
2828 t_manufacturer
="samsung"
2834 modelname
="samsungyh925"
2835 target
="-DSAMSUNG_YH925"
2838 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2839 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2840 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2841 output
="rockbox.mi4"
2842 appextra
="recorder:gui:radio"
2845 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2846 bootoutput
="FW_YH925.mi4"
2847 # toolset is the tools within the tools directory that we build for
2848 # this particular target.
2849 toolset
=$scramblebitmaptools
2850 # architecture, manufacturer and model for the target-tree build
2852 t_manufacturer
="samsung"
2858 modelname
="samsungyps3"
2859 target
="-DSAMSUNG_YPS3"
2863 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2864 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2865 output
="rockbox.yps3"
2866 appextra
="recorder:gui:radio"
2869 toolset
=$genericbitmaptools
2871 bootoutput
="rockboot.ebn"
2872 # architecture, manufacturer and model for the target-tree build
2874 t_manufacturer
="s5l8700"
2881 target
="-DPBELL_VIBE500"
2884 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2885 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2886 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2887 output
="rockbox.mi4"
2888 appextra
="recorder:gui:radio"
2891 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2892 bootoutput
="jukebox.mi4"
2893 # toolset is the tools within the tools directory that we build for
2894 # this particular target.
2895 toolset
=$scramblebitmaptools
2896 # architecture, manufacturer and model for the target-tree build
2898 t_manufacturer
="pbell"
2904 modelname
="mpiohd200"
2905 target
="-DMPIO_HD200"
2908 tool
="$rootdir/tools/scramble -add=hd20"
2909 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2910 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2911 output
="rockbox.mpio"
2912 bootoutput
="bootloader.mpio"
2913 appextra
="recorder:gui:radio"
2916 # toolset is the tools within the tools directory that we build for
2917 # this particular target.
2918 toolset
="$genericbitmaptools"
2919 # architecture, manufacturer and model for the target-tree build
2921 t_manufacturer
="mpio"
2927 modelname
="mpiohd300"
2928 target
="-DMPIO_HD300"
2931 tool
="$rootdir/tools/scramble -add=hd30"
2932 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2933 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2934 output
="rockbox.mpio"
2935 bootoutput
="bootloader.mpio"
2936 appextra
="recorder:gui:radio"
2939 # toolset is the tools within the tools directory that we build for
2940 # this particular target.
2941 toolset
="$genericbitmaptools"
2942 # architecture, manufacturer and model for the target-tree build
2944 t_manufacturer
="mpio"
2950 modelname
="application"
2951 app_modelname
="sdlapp"
2952 target
="-DAPPLICATION"
2960 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2961 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2963 bootoutput
="rockbox"
2964 appextra
="recorder:gui:radio"
2967 # architecture, manufacturer and model for the target-tree build
2969 t_manufacturer
="sdl"
2975 modelname
="application"
2976 app_modelname
="android"
2977 target
="-DAPPLICATION"
2980 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
2981 bindir
="/data/data/org.rockbox/lib"
2982 libdir
="/data/data/org.rockbox/app_rockbox"
2988 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2989 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2990 output
="librockbox.so"
2991 bootoutput
="librockbox.so"
2992 appextra
="recorder:gui:radio"
2995 # architecture, manufacturer and model for the target-tree build
2997 t_manufacturer
="android"
3003 modelname
="application"
3004 app_modelname
="nokian8xx"
3006 target
="-DAPPLICATION"
3007 app_set_lcd_size
800 480
3008 sharedir
="/opt/rockbox/share/rockbox"
3009 bindir
="/opt/rockbox/bin"
3010 libdir
="/opt/rockbox/lib"
3016 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3017 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3019 bootoutput
="rockbox"
3020 appextra
="recorder:gui:radio"
3023 # architecture, manufacturer and model for the target-tree build
3025 t_manufacturer
="maemo"
3031 modelname
="application"
3032 app_modelname
="nokian900"
3034 target
="-DAPPLICATION"
3035 app_set_lcd_size
800 480
3036 sharedir
="/opt/rockbox/share/rockbox"
3037 bindir
="/opt/rockbox/bin"
3038 libdir
="/opt/rockbox/lib"
3044 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3045 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3047 bootoutput
="rockbox"
3048 appextra
="recorder:gui:radio"
3051 # architecture, manufacturer and model for the target-tree build
3053 t_manufacturer
="maemo"
3059 modelname
="application"
3060 app_modelname
="pandora"
3062 target
="-DAPPLICATION"
3063 app_set_lcd_size
800 480
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 echo "Using source code root directory: $rootdir"
3313 # this was once possible to change at build-time, but no more:
3318 if [ "yes" = "$simulator" ]; then
3319 # setup compiler and things for simulator
3322 if [ -d "simdisk" ]; then
3323 echo "Subdirectory 'simdisk' already present"
3326 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3330 # Now, figure out version number of the (gcc) compiler we are about to use
3331 gccver
=`$CC -dumpversion`;
3333 # figure out the binutil version too and display it, mostly for the build
3334 # system etc to be able to see it easier
3335 if [ $uname = "Darwin" ]; then
3336 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3338 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3341 if [ -z "$gccver" ]; then
3342 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3343 echo "[WARNING] this may cause your build to fail since we cannot do the"
3344 echo "[WARNING] checks we want now."
3347 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3350 num1
=`echo $gccver | cut -d . -f1`
3351 num2
=`echo $gccver | cut -d . -f2`
3352 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3359 echo "Using $CC $gccver ($gccnum)"
3361 if test "$gccnum" -ge "400"; then
3362 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3363 # so we ignore that warnings for now
3365 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3368 if test "$gccnum" -ge "402"; then
3369 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3370 # and later would throw it for several valid cases
3371 GCCOPTS
="$GCCOPTS -Wno-override-init"
3375 ""|
"$CROSS_COMPILE")
3379 # cross-compile for win32
3382 # Verify that the cross-compiler is of a recommended version!
3383 if test "$gccver" != "$gccchoice"; then
3384 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3385 echo "WARNING: version $gccchoice!"
3386 echo "WARNING: This may cause your build to fail since it may be a version"
3387 echo "WARNING: that isn't functional or known to not be the best choice."
3388 echo "WARNING: If you suffer from build problems, you know that this is"
3389 echo "WARNING: a likely source for them..."
3397 echo "Using $LD $ldver"
3399 # check the compiler for SH platforms
3400 if test "$CC" = "sh-elf-gcc"; then
3401 if test "$gccnum" -lt "400"; then
3402 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3403 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3405 # figure out patch status
3406 gccpatch
=`$CC --version`;
3408 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3409 echo "gcc $gccver is rockbox patched"
3410 # then convert -O to -Os to get smaller binaries!
3411 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3413 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3414 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3419 if test "$CC" = "m68k-elf-gcc"; then
3420 # convert -O to -Os to get smaller binaries!
3421 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3424 if [ "$ARG_CCACHE" = "1" ]; then
3425 echo "Enable ccache for building"
3427 elif [ "$ARG_CCACHE" != "0" ]; then
3428 ccache
=`findtool ccache`
3429 if test -n "$ccache"; then
3430 echo "Found and uses ccache ($ccache)"
3434 # figure out the full path to the various commands if possible
3435 HOSTCC
=`findtool gcc --lit`
3436 HOSTAR
=`findtool ar --lit`
3437 CC
=`findtool ${CC} --lit`
3438 LD
=`findtool ${AR} --lit`
3439 AR
=`findtool ${AR} --lit`
3440 AS
=`findtool ${AS} --lit`
3441 OC
=`findtool ${OC} --lit`
3442 WINDRES
=`findtool ${WINDRES} --lit`
3443 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3444 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3445 RANLIB
=`findtool ${RANLIB} --lit`
3447 if test -n "$ccache"; then
3451 if test "$ARG_ARM_THUMB" = "1"; then
3452 extradefines
="$extradefines -DUSE_THUMB"
3453 CC
="$toolsdir/thumb-cc.py $CC"
3456 if test "X$endian" = "Xbig"; then
3457 defendian
="ROCKBOX_BIG_ENDIAN"
3459 defendian
="ROCKBOX_LITTLE_ENDIAN"
3462 if [ "$ARG_RBDIR" != "" ]; then
3463 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3468 echo "Using alternate rockbox dir: ${rbdir}"
3472 -e "s<@ENDIAN@<${defendian}<g" \
3473 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3474 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3475 -e "s<@config_rtc@<$config_rtc<g" \
3476 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3477 -e "s<@thread_support@<$thread_support<g" \
3478 -e "s<@RBDIR@<${rbdir}<g" \
3479 -e "s<@sharepath@<${sharedir}<g" \
3480 -e "s<@binpath@<${bindir}<g" \
3481 -e "s<@libpath@<${libdir}<g" \
3482 -e "s<@have_backlight@<$have_backlight<g" \
3483 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3484 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3485 -e "s<@lcd_width@<$app_lcd_width<g" \
3486 -e "s<@lcd_height@<$app_lcd_height<g" \
3488 /* This header was made by configure */
3489 #ifndef __BUILD_AUTOCONF_H
3490 #define __BUILD_AUTOCONF_H
3492 /* Define endianess for the target or simulator platform */
3495 /* Define this if you build rockbox to support the logf logging and display */
3496 #undef ROCKBOX_HAS_LOGF
3498 /* Define this to record a chart with timings for the stages of boot */
3501 /* optional define for a backlight modded Ondio */
3504 /* optional define for FM radio mod for iAudio M5 */
3507 /* optional define for ATA poweroff on Player */
3510 /* optional defines for RTC mod for h1x0 */
3514 /* the threading backend we use */
3515 #define @thread_support@
3517 /* lcd dimensions for application builds from configure */
3521 /* root of Rockbox */
3522 #define ROCKBOX_DIR "@RBDIR@"
3523 #define ROCKBOX_SHARE_PATH "@sharepath@"
3524 #define ROCKBOX_BINARY_PATH "@binpath@"
3525 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3527 #endif /* __BUILD_AUTOCONF_H */
3530 if test -n "$t_cpu"; then
3531 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3533 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3534 # Maemo needs the SDL port, too
3535 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3536 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3537 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3538 # Pandora needs the SDL port, too
3539 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3540 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3541 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3542 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3543 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3546 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3547 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3551 if test "$simulator" = "yes"; then
3552 # add simul make stuff on the #SIMUL# line
3553 simmagic1
="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3554 simmagic2
="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3556 # delete the lines that match
3557 simmagic1
='/@SIMUL1@/D'
3558 simmagic2
='/@SIMUL2@/D'
3561 if test "$swcodec" = "yes"; then
3562 voicetoolset
="rbspeexenc voicefont wavtrim"
3564 voicetoolset
="voicefont wavtrim"
3567 if test "$apps" = "apps"; then
3568 # only when we build "real" apps we build the .lng files
3572 #### Fix the cmdline ###
3573 if [ "$ARG_CCACHE" = "1" ]; then
3575 elif [ "$ARG_CCACHE" = "0" ]; then
3576 cmdline
="--no-ccache "
3578 if [ "$ARG_ARM_EABI" = "1" ]; then
3579 cmdline
="$cmdline--eabi "
3581 if [ -n "$ARG_PREFIX" ]; then
3582 cmdline
="$cmdline--prefix=\$(PREFIX) "
3584 if [ "$modelname" = "application" ]; then
3585 cmdline
="$cmdline--target=$app_modelname --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3587 cmdline
="$cmdline--target=\$(MODELNAME) "
3590 cmdline
="$cmdline--ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3595 -e "s<@ROOTDIR@<${rootdir}<g" \
3596 -e "s<@DEBUG@<${debug}<g" \
3597 -e "s<@MEMORY@<${memory}<g" \
3598 -e "s<@TARGET_ID@<${target_id}<g" \
3599 -e "s<@TARGET@<${target}<g" \
3600 -e "s<@CPU@<${t_cpu}<g" \
3601 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3602 -e "s<@MODELNAME@<${modelname}<g" \
3603 -e "s<@LANGUAGE@<${language}<g" \
3604 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3605 -e "s<@PWD@<${pwd}<g" \
3606 -e "s<@HOSTCC@<${HOSTCC}<g" \
3607 -e "s<@HOSTAR@<${HOSTAR}<g" \
3608 -e "s<@CC@<${CC}<g" \
3609 -e "s<@LD@<${LD}<g" \
3610 -e "s<@AR@<${AR}<g" \
3611 -e "s<@AS@<${AS}<g" \
3612 -e "s<@OC@<${OC}<g" \
3613 -e "s<@WINDRES@<${WINDRES}<g" \
3614 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3615 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3616 -e "s<@RANLIB@<${RANLIB}<g" \
3617 -e "s<@TOOL@<${tool}<g" \
3618 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3619 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3620 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3621 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3622 -e "s<@OUTPUT@<${output}<g" \
3623 -e "s<@APPEXTRA@<${appextra}<g" \
3624 -e "s<@ARCHOSROM@<${archosrom}<g" \
3625 -e "s<@FLASHFILE@<${flash}<g" \
3626 -e "s<@PLUGINS@<${plugins}<g" \
3627 -e "s<@CODECS@<${swcodec}<g" \
3628 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3629 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3630 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3631 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3632 -e "s<@LDOPTS@<${LDOPTS}<g" \
3633 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3634 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3635 -e "s<@EXTRADEF@<${extradefines}<g" \
3636 -e "s<@APPSDIR@<${appsdir}<g" \
3637 -e "s<@FIRMDIR@<${firmdir}<g" \
3638 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3639 -e "s<@APPS@<${apps}<g" \
3640 -e "s<@APP_TYPE@<${app_type}<g" \
3641 -e "s<@GCCVER@<${gccver}<g" \
3642 -e "s<@GCCNUM@<${gccnum}<g" \
3643 -e "s<@UNAME@<${uname}<g" \
3644 -e "s<@ENDIAN@<${defendian}<g" \
3645 -e "s<@TOOLSET@<${toolset}<g" \
3648 -e "s<@MANUALDEV@<${manualdev}<g" \
3649 -e "s<@ENCODER@<${ENC_CMD}<g" \
3650 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3651 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3652 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3653 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3654 -e "s<@LANGS@<${buildlangs}<g" \
3655 -e "s<@USE_ELF@<${USE_ELF}<g" \
3656 -e "s<@RBDIR@<${rbdir}<g" \
3657 -e "s<@sharepath@<${sharedir}<g" \
3658 -e "s<@binpath@<${bindir}<g" \
3659 -e "s<@libpath@<${libdir}<g" \
3660 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3661 -e "s<@CMDLINE@<$cmdline<g" \
3662 -e "s<@SDLCONFIG@<$sdl<g" \
3664 ## Automatically generated. http://www.rockbox.org/
3666 export ROOTDIR=@ROOTDIR@
3667 export FIRMDIR=@FIRMDIR@
3668 export APPSDIR=@APPSDIR@
3669 export TOOLSDIR=@TOOLSDIR@
3670 export DOCSDIR=\$(ROOTDIR)/docs
3671 export MANUALDIR=\${ROOTDIR}/manual
3672 export DEBUG=@DEBUG@
3673 export MODELNAME=@MODELNAME@
3674 export ARCHOSROM=@ARCHOSROM@
3675 export FLASHFILE=@FLASHFILE@
3676 export TARGET_ID=@TARGET_ID@
3677 export TARGET=@TARGET@
3679 export MANUFACTURER=@MANUFACTURER@
3681 export BUILDDIR=@PWD@
3682 export LANGUAGE=@LANGUAGE@
3683 export VOICELANGUAGE=@VOICELANGUAGE@
3684 export MEMORYSIZE=@MEMORY@
3685 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3686 export MKFIRMWARE=@TOOL@
3687 export BMP2RB_MONO=@BMP2RB_MONO@
3688 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3689 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3690 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3691 export BINARY=@OUTPUT@
3692 export APPEXTRA=@APPEXTRA@
3693 export ENABLEDPLUGINS=@PLUGINS@
3694 export SOFTWARECODECS=@CODECS@
3695 export EXTRA_DEFINES=@EXTRADEF@
3696 export HOSTCC=@HOSTCC@
3697 export HOSTAR=@HOSTAR@
3703 export WINDRES=@WINDRES@
3704 export DLLTOOL=@DLLTOOL@
3705 export DLLWRAP=@DLLWRAP@
3706 export RANLIB=@RANLIB@
3707 export PREFIX=@PREFIX@
3708 export PROFILE_OPTS=@PROFILE_OPTS@
3709 export APP_TYPE=@APP_TYPE@
3710 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3711 export GCCOPTS=@GCCOPTS@
3712 export TARGET_INC=@TARGET_INC@
3713 export LOADADDRESS=@LOADADDRESS@
3714 export SHARED_FLAG=@SHARED_FLAG@
3715 export LDOPTS=@LDOPTS@
3716 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3717 export GCCVER=@GCCVER@
3718 export GCCNUM=@GCCNUM@
3719 export UNAME=@UNAME@
3720 export MANUALDEV=@MANUALDEV@
3721 export TTS_OPTS=@TTS_OPTS@
3722 export TTS_ENGINE=@TTS_ENGINE@
3723 export ENC_OPTS=@ENC_OPTS@
3724 export ENCODER=@ENCODER@
3725 export USE_ELF=@USE_ELF@
3726 export RBDIR=@RBDIR@
3727 export ROCKBOX_SHARE_PATH=@sharepath@
3728 export ROCKBOX_BINARY_PATH=@binpath@
3729 export ROCKBOX_LIBRARY_PATH=@libpath@
3730 export SDLCONFIG=@SDLCONFIG@
3732 CONFIGURE_OPTIONS=@CMDLINE@
3734 include \$(TOOLSDIR)/root.make
3738 echo "Created Makefile"