3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
11 # global CC options for all platforms
12 CCOPTS
="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
14 # global LD options for all platforms
18 use_logf
="#undef ROCKBOX_HAS_LOGF"
19 use_bootchart
="#undef DO_BOOTCHART"
21 scriptver
=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
28 thread_support
="ASSEMBLER_THREADS"
32 # Begin Function Definitions
42 WINDRES
=${prefix}windres
43 DLLTOOL
=${prefix}dlltool
44 DLLWRAP
=${prefix}dllwrap
45 RANLIB
=${prefix}ranlib
53 # setup files and paths depending on the platform
54 if [ -z "$ARG_PREFIX" ]; then
55 sharedir
="/usr/local/share/rockbox"
56 bindir
="/usr/local/bin"
57 libdir
="/usr/local/lib"
59 if [ -d "$ARG_PREFIX" ]; then
60 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
61 ARG_PREFIX
=`realpath $ARG_PREFIX`
62 if [ "0" != "$?" ]; then
63 echo "ERROR: Could not get prefix path (is realpath installed?)."
67 sharedir
="$ARG_PREFIX/share/rockbox"
68 bindir
="$ARG_PREFIX/bin"
69 libdir
="$ARG_PREFIX/lib"
71 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
77 # Set the application LCD size according to the following priorities:
78 # 1) If --lcdwidth and --lcdheight are set, use them
79 # 2) If a size is passed to the app_set_lcd_size() function, use that
80 # 3) Otherwise ask the user
82 if [ -z "$ARG_LCDWIDTH" ]; then
85 if [ -z "$ARG_LCDHEIGHT" ]; then
89 echo "Enter the LCD width (default: 320)"
90 if [ -z "$ARG_LCDWIDTH" ]; then
93 app_lcd_width
="$ARG_LCDWIDTH"
95 if [ -z "$app_lcd_width" ]; then app_lcd_width
="320"; fi
96 echo "Enter the LCD height (default: 480)"
97 if [ -z "$ARG_LCDHEIGHT" ]; then
98 app_lcd_height
=`input`
100 app_lcd_height
="$ARG_LCDHEIGHT"
102 if [ -z "$app_lcd_height" ]; then app_lcd_height
="480"; fi
103 echo "Selected $app_lcd_width x $app_lcd_height resolution"
104 ARG_LCDWIDTH
=$app_lcd_width
105 ARG_LCDHEIGHT
=$app_lcd_height
107 app_lcd_width
="#define LCD_WIDTH $app_lcd_width"
108 app_lcd_height
="#define LCD_HEIGHT $app_lcd_height"
112 if [ "$ARG_ARM_EABI" != "0" ]; then
113 prefixtools arm-elf-eabi-
121 # scan the $PATH for the given command
128 # echo "checks for $file in $path" >&2
129 if test -f "$path/$file"; then
134 # check whether caller wants literal return value if not found
135 if [ "$2" = "--lit" ]; then
140 # scan the $PATH for sdl-config - check whether for a (cross-)win32
149 #echo "checks for $file in $path" >&2
150 if test -f "$path/$file"; then
151 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
152 if [ "yes" = "${winbuild}" ]; then
157 if [ "yes" != "${winbuild}" ]; then
166 # check for availability of sigaltstack to support our thread engine
167 check_sigaltstack
() {
168 cat >$tmpdir/check_threads.c
<<EOF
170 int main(int argc, char **argv)
173 #define NULL (void*)0
175 sigaltstack(NULL, NULL);
179 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
1> /dev
/null
181 rm -rf $tmpdir/check_threads
*
185 # check for availability of Fiber on Win32 to support our thread engine
187 cat >$tmpdir/check_threads.c
<<EOF
189 int main(int argc, char **argv)
191 ConvertThreadToFiber(NULL);
195 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
2>/dev
/null
197 rm -rf $tmpdir/check_threads
*
203 # default tool setup for native building
204 prefixtools
"$CROSS_COMPILE"
205 ARG_ARM_THUMB
=0 # can't use thumb in native builds
209 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef// -e s/-O//`
210 GCCOPTS
="$GCCOPTS -fno-builtin -g"
212 LDOPTS
='-lm' # button-sdl.c uses sqrt()
216 # default output binary name, don't override app_get_platform()
217 if [ "$app_type" != "sdl-app" ]; then
221 # default share option, override below if needed
222 SHARED_FLAG
="-shared"
224 if [ "$win32crosscompile" = "yes" ]; then
225 LDOPTS
="$LDOPTS -mconsole"
231 echo "Cygwin host detected"
234 LDOPTS
="$LDOPTS -mconsole"
240 echo "MinGW host detected"
243 LDOPTS
="$LDOPTS -mconsole"
249 sigaltstack
=`check_sigaltstack`
250 echo "Linux host detected"
251 LDOPTS
="$LDOPTS -ldl"
255 sigaltstack
=`check_sigaltstack`
256 echo "FreeBSD host detected"
257 LDOPTS
="$LDOPTS -ldl"
261 sigaltstack
=`check_sigaltstack`
262 echo "Darwin host detected"
263 LDOPTS
="$LDOPTS -ldl"
264 SHARED_FLAG
="-dynamiclib -Wl\,-single_module"
268 sigaltstack
=`check_sigaltstack`
269 echo "*Solaris host detected"
271 GCCOPTS
="$GCCOPTS -fPIC"
272 LDOPTS
="$LDOPTS -ldl"
276 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
282 [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
283 sdl
=`findsdl $winbuild`
285 if [ -n `echo $app_type | grep "sdl"` ]; then
286 if [ -z "$sdl" ]; then
287 echo "configure didn't find sdl-config, which indicates that you"
288 echo "don't have SDL (properly) installed. Please correct and"
289 echo "re-run configure!"
292 # generic sdl-config checker
293 GCCOPTS
="$GCCOPTS `$sdl --cflags`"
294 LDOPTS
="$LDOPTS `$sdl --libs`"
299 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
301 if test "X$win32crosscompile" != "Xyes"; then
304 # fPIC is needed to make shared objects link
305 # setting visibility to hidden is necessary to avoid strange crashes
306 # due to symbol clashing
307 GCCOPTS
="$GCCOPTS -fPIC -fvisibility=hidden"
308 # x86_64 supports MMX by default
312 echo "Enabling MMX support"
313 GCCOPTS
="$GCCOPTS -mmmx"
318 cat >$tmpdir/conftest-
$id.c
<<EOF
320 int main(int argc, char **argv)
323 char *varp = (char *)&var;
331 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
333 # when cross compiling, the endianess cannot be detected because the above program doesn't run
334 # on the local machine. assume little endian but print a warning
335 endian
=`$tmpdir/conftest-$id 2> /dev/null`
336 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
344 if [ "$CROSS_COMPILE" != "" ]; then
345 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
348 if [ "$app_type" = "sdl-sim" ]; then
349 echo "Simulator environment deemed $endian endian"
350 elif [ "$app_type" = "sdl-app" ]; then
351 echo "Application environment deemed $endian endian"
352 elif [ "$app_type" = "checkwps" ]; then
353 echo "CheckWPS environment deemed $endian endian"
356 # use wildcard here to make it work even if it was named *.exe like
358 rm -f $tmpdir/conftest-
$id*
360 # We are crosscompiling
361 # add cross-compiler option(s)
362 prefixtools i586-mingw32msvc-
363 LDOPTS
="$LDOPTS -mconsole"
365 output
="rockboxui.exe"
366 endian
="little" # windows is little endian
367 echo "Enabling MMX support"
368 GCCOPTS
="$GCCOPTS -mmmx"
372 if [ -z "$ARG_THREAD_SUPPORT" ] ||
[ "$ARG_THREAD_SUPPORT" = "0" ]; then
373 if [ "$sigaltstack" = "0" ]; then
374 thread_support
="HAVE_SIGALTSTACK_THREADS"
375 LDOPTS
="$LDOPTS -lpthread" # pthread needed
376 echo "Selected sigaltstack threads"
377 elif [ "$fibers" = "0" ]; then
378 thread_support
="HAVE_WIN32_FIBER_THREADS"
379 echo "Selected Win32 Fiber threads"
383 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
384 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
385 thread_support
="HAVE_SDL_THREADS"
386 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
387 echo "Selected SDL threads"
389 echo "WARNING: Falling back to SDL threads"
395 # functions for setting up cross-compiler names and options
396 # also set endianess and what the exact recommended gcc version is
397 # the gcc version should most likely match what versions we build with
402 GCCOPTS
="$CCOPTS -m1"
403 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
409 prefixtools calmrisc16-unknown-elf-
410 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
411 GCCOPTIMIZE
="-fomit-frame-pointer"
416 prefixtools m68k-elf-
417 GCCOPTS
="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
418 GCCOPTIMIZE
="-fomit-frame-pointer"
425 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
426 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
427 GCCOPTS
="$GCCOPTS -mlong-calls"
429 GCCOPTIMIZE
="-fomit-frame-pointer"
435 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
436 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
437 GCCOPTS
="$GCCOPTS -mlong-calls"
439 GCCOPTIMIZE
="-fomit-frame-pointer"
445 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
446 if test "$ARG_ARM_EABI" = "0"; then
447 GCCOPTS
="$GCCOPTS -mlong-calls"
449 GCCOPTIMIZE
="-fomit-frame-pointer"
455 GCCOPTS
="$CCOPTS -mcpu=arm940t"
456 if test "$ARG_ARM_EABI" = "0"; then
457 GCCOPTS
="$GCCOPTS -mlong-calls"
459 GCCOPTIMIZE
="-fomit-frame-pointer"
465 GCCOPTS
="$CCOPTS -mcpu=arm9e"
466 if test "$ARG_ARM_EABI" = "0"; then
467 GCCOPTS
="$GCCOPTS -mlong-calls"
469 GCCOPTIMIZE
="-fomit-frame-pointer"
475 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
476 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
477 GCCOPTS
="$GCCOPTS -mlong-calls"
479 GCCOPTIMIZE
="-fomit-frame-pointer"
485 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
486 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
487 GCCOPTS
="$GCCOPTS -mlong-calls"
489 GCCOPTIMIZE
="-fomit-frame-pointer"
495 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
496 if test "$ARG_ARM_EABI" = "0"; then
497 GCCOPTS
="$GCCOPTS -mlong-calls"
499 GCCOPTIMIZE
="-fomit-frame-pointer"
505 GCCOPTS
="$CCOPTS -march=armv5te"
506 GCCOPTIMIZE
="-fomit-frame-pointer"
511 prefixtools mipsel-elf-
512 # mips is predefined, but we want it for paths. use __mips instead
513 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
514 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
515 GCCOPTIMIZE
="-fomit-frame-pointer"
521 # Scratchbox sets up "gcc" based on the active target
524 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
525 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
527 LDOPTS
="-lm -ldl $LDOPTS"
528 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
529 SHARED_FLAG
="-shared"
531 thread_support
="HAVE_SIGALTSTACK_THREADS"
534 # Determine maemo version
535 if pkg-config
--atleast-version=5 maemo-version
; then
536 if [ "$1" == "4" ]; then
537 echo "ERROR: Maemo 4 SDK required."
540 extradefines
="$extradefines -DMAEMO5"
541 echo "Found N900 maemo version"
543 elif pkg-config
--atleast-version=4 maemo-version
; then
544 if [ "$1" == "5" ]; then
545 echo "ERROR: Maemo 5 SDK required."
548 extradefines
="$extradefines -DMAEMO4"
549 echo "Found N8xx maemo version"
551 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
556 if [ $is_n900 -eq 1 ]; then
557 GCCOPTS
="$GCCOPTS `pkg-config --cflags sdl`"
558 LDOPTS
="$LDOPTS `pkg-config --libs sdl`"
560 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
561 LDOPTS
="$LDOPTS `sdl-config --libs`"
564 # glib and libosso support
565 GCCOPTS
="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
566 LDOPTS
="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
568 # libhal support: Battery monitoring
569 GCCOPTS
="$GCCOPTS `pkg-config --cflags hal`"
570 LDOPTS
="$LDOPTS `pkg-config --libs hal`"
572 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
573 if [ $is_n900 -eq 1 ]; then
574 # gstreamer support: Audio output.
575 GCCOPTS
="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
576 LDOPTS
="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
578 # N900 specific: libplayback support
579 GCCOPTS
="$GCCOPTS `pkg-config --cflags libplayback-1`"
580 LDOPTS
="$LDOPTS `pkg-config --libs libplayback-1`"
582 # N900 specific: Enable ARMv7 NEON support
583 if sb-conf show
-A |
grep -q -i arm
; then
584 echo "Detected ARM target"
585 GCCOPTS
="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
586 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
588 echo "Detected x86 target"
591 # N8xx specific: Enable armv5te instructions
592 if sb-conf show
-A |
grep -q -i arm
; then
593 echo "Detected ARM target"
594 GCCOPTS
="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
595 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
597 echo "Detected x86 target"
603 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
604 # You have to use the sebt3 toolchain:
605 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
607 PNDSDK
="/usr/local/angstrom/arm"
608 if [ ! -x $PNDSDK/bin
/arm-angstrom-linux-gnueabi-gcc
]; then
609 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
613 PATH
=$PNDSDK/bin
:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/bin
614 PKG_CONFIG_PATH
=$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/lib
/pkgconfig
615 LDOPTS
="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
616 PKG_CONFIG
="pkg-config"
618 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
619 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
621 LDOPTS
="-lm -ldl $LDOPTS"
622 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
623 SHARED_FLAG
="-shared"
625 thread_support
="HAVE_SIGALTSTACK_THREADS"
628 GCCOPTS
="-I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
632 prefixtools
"$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
635 GCCOPTS
="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
636 LDOPTS
="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
639 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
640 GCCOPTS
="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
641 GCCOPTS
="$GCCOPTS -ffast-math -fsingle-precision-constant"
645 if [ -z "$ANDROID_SDK_PATH" ]; then
646 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
647 echo "environment variable point to the root directory of the Android SDK."
650 if [ -z "$ANDROID_NDK_PATH" ]; then
651 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
652 echo "environment variable point to the root directory of the Android NDK."
655 buildhost
=`uname | tr [:upper:] [:lower:]`
657 gcctarget
="arm-linux-androideabi-"
658 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
659 PATH
=$PATH:$gccprefix/bin
660 prefixtools
$gcctarget
661 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
662 GCCOPTS
="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
663 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
664 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \
665 --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm"
666 LDOPTS
="$LDOPTS -shared -nostdlib -ldl -llog"
668 SHARED_FLAG
="-shared"
672 atype
=`echo "$1" | cut -c 2-`
673 ##################################################################
674 # Prompt for specific developer options
676 if [ "$atype" ]; then
681 printf "Enter your developer options (press only enter when done)\n\
682 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
683 (T)est plugins, S(m)all C lib:"
684 if [ "$memory" = "2" ]; then
687 if [ "$modelname" = "archosplayer" ]; then
688 printf ", Use (A)TA poweroff"
690 if [ "$t_model" = "ondio" ]; then
691 printf ", (B)acklight MOD"
693 if [ "$modelname" = "iaudiom5" ]; then
694 printf ", (F)M radio MOD"
696 if [ "$modelname" = "iriverh120" ]; then
703 while [ $cont = "1" ]; do
705 if [ "$interact" ]; then
708 option
=`echo "$atype" | cut -c 1`
713 if [ "yes" = "$profile" ]; then
714 echo "Debug is incompatible with profiling"
716 echo "DEBUG build enabled"
721 echo "logf() support enabled"
725 echo "Using Rockbox' small C library"
726 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
729 echo "Including test plugins"
730 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
733 echo "bootchart enabled (logf also enabled)"
738 echo "Simulator build enabled"
742 if [ "yes" = "$use_debug" ]; then
743 echo "Profiling is incompatible with debug"
745 echo "Profiling support is enabled"
750 echo "Voice build selected"
754 if [ "$memory" = "2" ]; then
756 echo "Memory size selected: 8MB"
760 if [ "$modelname" = "archosplayer" ]; then
761 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
762 echo "ATA power off enabled"
766 if [ "$t_model" = "ondio" ]; then
767 have_backlight
="#define HAVE_BACKLIGHT"
768 echo "Backlight functions enabled"
772 if [ "$modelname" = "iaudiom5" ]; then
773 have_fmradio_in
="#define HAVE_FMRADIO_IN"
774 echo "FM radio functions enabled"
778 if [ "$modelname" = "iriverh120" ]; then
779 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
780 have_rtc_alarm
="#define HAVE_RTC_ALARM"
781 echo "RTC functions enabled (DS1339/DS3231)"
785 echo "Enabling Windows 32 cross-compiling"
786 win32crosscompile
="yes"
788 "") # Match enter press when finished with advanced options
792 echo "[ERROR] Option $option unsupported"
795 if [ "$interact" ]; then
796 btype
="$btype$option"
798 atype
=`echo "$atype" | cut -c 2-`
799 [ "$atype" ] || cont
=0
804 if [ "yes" = "$voice" ]; then
805 # Ask about languages to build
807 voicelanguage
=`whichlang`
808 echo "Voice language set to $voicelanguage"
810 # Configure encoder and TTS engine for each language
811 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
812 voiceconfig
"$thislang"
815 if [ "yes" = "$use_debug" ]; then
817 GCCOPTS
="$GCCOPTS -g -DDEBUG"
819 if [ "yes" = "$logf" ]; then
820 use_logf
="#define ROCKBOX_HAS_LOGF 1"
822 if [ "yes" = "$bootchart" ]; then
823 use_bootchart
="#define DO_BOOTCHART 1"
825 if [ "yes" = "$simulator" ]; then
827 extradefines
="$extradefines -DSIMULATOR"
831 if [ "yes" = "$profile" ]; then
832 extradefines
="$extradefines -DRB_PROFILE"
833 PROFILE_OPTS
="-finstrument-functions"
837 # Configure voice settings
840 if [ ! "$ARG_TTS" ]; then
841 echo "Building $thislang voice for $modelname. Select options"
845 if [ -n "`findtool flite`" ]; then
849 DEFAULT_TTS_OPTS
=$FLITE_OPTS
850 DEFAULT_NOISEFLOOR
="500"
853 if [ -n "`findtool espeak`" ]; then
857 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
858 DEFAULT_NOISEFLOOR
="500"
861 if [ -n "`findtool festival`" ]; then
862 FESTIVAL
="(F)estival "
865 FESTIVAL_OPTS
="--language italian"
868 FESTIVAL_OPTS
="--language spanish"
871 FESTIVAL_OPTS
="--language finnish"
874 FESTIVAL_OPTS
="--language czech"
880 DEFAULT_TTS
="festival"
881 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
882 DEFAULT_NOISEFLOOR
="500"
885 if [ -n "`findtool swift`" ]; then
889 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
890 DEFAULT_NOISEFLOOR
="500"
893 # Allow SAPI if Windows is in use
894 if [ -n "`findtool winver`" ]; then
898 DEFAULT_TTS_OPTS
=$SAPI_OPTS
899 DEFAULT_NOISEFLOOR
="500"
903 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
904 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
908 if [ "$ARG_TTS" ]; then
911 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
914 advopts
="$advopts --tts=$option"
918 NOISEFLOOR
="500" # TODO: check this value
924 TTS_OPTS
=$ESPEAK_OPTS
927 TTS_ENGINE
="festival"
929 TTS_OPTS
=$FESTIVAL_OPTS
942 TTS_ENGINE
=$DEFAULT_TTS
943 TTS_OPTS
=$DEFAULT_TTS_OPTS
944 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
946 echo "Using $TTS_ENGINE for TTS"
948 # Select which voice to use for Festival
949 if [ "$TTS_ENGINE" = "festival" ]; then
950 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
951 for voice
in $voicelist; do
952 TTS_FESTIVAL_VOICE
="$voice" # Default choice
955 if [ "$ARG_VOICE" ]; then
959 for voice
in $voicelist; do
960 printf "%3d. %s\n" "$i" "$voice"
963 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
967 for voice
in $voicelist; do
968 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
969 TTS_FESTIVAL_VOICE
="$voice"
973 advopts
="$advopts --voice=$CHOICE"
974 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
975 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
978 # Read custom tts options from command line
979 if [ "$ARG_TTSOPTS" ]; then
980 TTS_OPTS
="$ARG_TTSOPTS"
981 advopts
="$advopts --ttsopts='$TTS_OPTS'"
982 echo "$TTS_ENGINE options set to $TTS_OPTS"
985 if [ "$swcodec" = "yes" ]; then
988 ENC_OPTS
="-q 4 -c 10"
990 if [ -n "`findtool lame`" ]; then
993 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
995 echo "You need LAME in the system path to build voice files for"
996 echo "HWCODEC targets."
1001 echo "Using $ENCODER for encoding voice clips"
1003 # Read custom encoder options from command line
1004 if [ "$ARG_ENCOPTS" ]; then
1005 ENC_OPTS
="$ARG_ENCOPTS"
1006 advopts
="$advopts --encopts='$ENC_OPTS'"
1007 echo "$ENCODER options set to $ENC_OPTS"
1011 if [ -n "`findtool cygpath`" ]; then
1012 TEMPDIR
=`cygpath . -a -w`
1017 # figure out which languages that are around
1018 for file in $rootdir/apps
/lang
/*.lang
; do
1019 clean
=`basename $file .lang`
1020 langs
="$langs $clean"
1023 if [ "$ARG_LANG" ]; then
1026 echo "Select a number for the language to use (default is english)"
1027 # FIXME The multiple-language feature is currently broken
1028 # echo "You may enter a comma-separated list of languages to build"
1031 for one
in $langs; do
1037 advopts
="$advopts --language=$pick"
1042 # Allow the user to pass a comma-separated list of langauges
1043 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1045 for one
in $langs; do
1046 # Accept both the language number and name
1047 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1048 if [ "$output" = "" ]; then
1057 if [ -z "$output" ]; then
1065 echo "Rockbox configure script."
1066 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1067 echo "Do *NOT* run this within the tools directory!"
1070 Usage: configure [OPTION]...
1072 --target=TARGET Sets the target, TARGET can be either the target ID or
1073 corresponding string. Run without this option to see all
1076 --ram=RAM Sets the RAM for certain targets. Even though any number
1077 is accepted, not every number is correct. The default
1078 value will be applied, if you entered a wrong number
1079 (which depends on the target). Watch the output. Run
1080 without this option if you are not sure which the right
1083 --type=TYPE Sets the build type. Shortcuts are also valid.
1084 Run without this option to see all available types.
1085 Multiple values are allowed and managed in the input
1086 order. So --type=b stands for Bootloader build, while
1087 --type=ab stands for "Backlight MOD" build.
1089 --language=LANG Set the language used for voice generation (used only if
1092 --tts=ENGINE Set the TTS engine used for voice generation (used only
1095 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1098 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1100 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1102 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1103 This is useful for having multiple alternate builds on
1104 your device that you can load with ROLO. However as the
1105 bootloader looks for .rockbox you won't be able to boot
1108 --ccache Enable ccache use (done by default these days)
1109 --no-ccache Disable ccache use
1111 --eabi Make configure prefer toolchains that are able to compile
1112 for the new ARM standard abi EABI
1113 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1114 --thumb Build with -mthumb (for ARM builds)
1115 --no-thumb The opposite of --thumb (don't use thumb even for targets
1116 where this is the default
1117 --sdl-threads Force use of SDL threads. They have inferior performance,
1118 but are better debuggable with GDB
1119 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1120 behavior of falling back to them if no native thread
1122 --prefix Target installation directory
1123 --help Shows this message (must not be used with other options)
1142 ARG_PREFIX
="$PREFIX"
1147 --ccache) ARG_CCACHE
=1;;
1148 --no-ccache) ARG_CCACHE
=0;;
1149 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1150 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1151 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1152 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1153 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1154 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1155 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1156 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1157 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1158 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1159 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1160 --eabi) ARG_ARM_EABI
=1;;
1161 --no-eabi) ARG_ARM_EABI
=0;;
1162 --thumb) ARG_ARM_THUMB
=1;;
1163 --no-thumb) ARG_ARM_THUMB
=0;;
1164 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1166 ARG_THREAD_SUPPORT
=0;;
1167 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1169 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1172 [ "$err" ] && exit 1
1176 if [ "$TMPDIR" != "" ]; then
1181 echo Using temporary directory
$tmpdir
1183 if test -r "configure"; then
1184 # this is a check for a configure script in the current directory, it there
1185 # is one, try to figure out if it is this one!
1187 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1188 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1189 echo "It will only cause you pain and grief. Instead do this:"
1192 echo " mkdir build-dir"
1193 echo " cd build-dir"
1194 echo " ../tools/configure"
1196 echo "Much happiness will arise from this. Enjoy"
1201 # get our current directory
1204 if { echo $pwd |
grep " "; } then
1205 echo "You're running this script in a path that contains space. The build"
1206 echo "system is unfortunately not clever enough to deal with this. Please"
1207 echo "run the script from a different path, rename the path or fix the build"
1212 if [ -z "$rootdir" ]; then
1213 ##################################################################
1214 # Figure out where the source code root is!
1216 rootdir
=`dirname $0`/..
/
1218 #####################################################################
1219 # Convert the possibly relative directory name to an absolute version
1225 # cd back to the build dir
1230 appsdir
='\$(ROOTDIR)/apps'
1231 firmdir
='\$(ROOTDIR)/firmware'
1232 toolsdir
='\$(ROOTDIR)/tools'
1235 ##################################################################
1236 # Figure out target platform
1239 if [ "$ARG_TARGET" ]; then
1240 buildfor
=$ARG_TARGET
1242 echo "Enter target platform:"
1244 ==Archos== ==iriver== ==Apple iPod==
1245 0) Player/Studio 10) H120/H140 20) Color/Photo
1246 1) Recorder 11) H320/H340 21) Nano 1G
1247 2) FM Recorder 12) iHP-100/110/115 22) Video
1248 3) Recorder v2 13) iFP-790 23) 3G
1249 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1250 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1251 6) AV300 26) Mini 2G
1252 ==Toshiba== 27) 1G, 2G
1253 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1254 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1256 32) 7 ==Olympus= ==SanDisk==
1257 33) D2 70) M:Robe 500 50) Sansa e200
1258 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1260 ==Creative== ==Philips== 53) Sansa m200
1261 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1262 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1263 92) Zen Vision HDD1830 56) Sansa e200v2
1264 102) GoGear HDD6330 57) Sansa m200v4
1265 ==Onda== 58) Sansa Fuze
1266 120) VX747 ==Meizu== 59) Sansa c200v2
1267 121) VX767 110) M6SL 60) Sansa Clipv2
1268 122) VX747+ 111) M6SP 61) Sansa View
1269 123) VX777 112) M3 62) Sansa Clip+
1271 ==Samsung== ==Tatung== 64) Sansa Fuze+
1272 140) YH-820 150) Elio TPJ-1022
1273 141) YH-920 ==Logik==
1274 142) YH-925 ==Packard Bell== 80) DAX 1GB MP3/DAB
1275 143) YP-S3 160) Vibe 500
1277 ==Application== ==MPIO== 130) Lyre proto 1
1278 200) SDL 170) HD200 131) Mini2440
1279 201) Android 171) HD300
1281 203) Nokia N900 ==ROCKCHIP==
1282 204) Pandora 180) rk27xx generic
1289 # Set of tools built for all target platforms:
1290 toolset
="rdf2binary convbdf codepages"
1292 # Toolsets for some target families:
1293 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1294 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1295 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1296 ipodbitmaptools
="$toolset scramble bmp2rb"
1297 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1298 tccbitmaptools
="$toolset scramble bmp2rb"
1299 # generic is used by IFP, Meizu and Onda
1300 genericbitmaptools
="$toolset bmp2rb"
1301 # scramble is used by all other targets
1302 scramblebitmaptools
="$genericbitmaptools scramble"
1305 # ---- For each target ----
1308 # target_id: a unique number identifying this target, IS NOT the menu number.
1309 # Just use the currently highest number+1 when you add a new
1311 # modelname: short model name used all over to identify this target
1312 # memory: number of megabytes of RAM this target has. If the amount can
1313 # be selected by the size prompt, let memory be unset here
1314 # target: -Ddefine passed to the build commands to make the correct
1315 # config-*.h file get included etc
1316 # tool: the tool that takes a plain binary and converts that into a
1317 # working "firmware" file for your target
1318 # output: the final output file name
1319 # boottool: the tool that takes a plain binary and generates a bootloader
1320 # file for your target (or blank to use $tool)
1321 # bootoutput:the final output file name for the bootloader (or blank to use
1323 # appextra: passed to the APPEXTRA variable in the Makefiles.
1324 # TODO: add proper explanation
1325 # archosrom: used only for Archos targets that build a special flashable .ucl
1327 # flash: name of output for flashing, for targets where there's a special
1328 # file output for this.
1329 # plugins: set to 'yes' to build the plugins. Early development builds can
1330 # set this to no in the early stages to have an easier life for a
1332 # swcodec: set 'yes' on swcodec targets
1333 # toolset: lists what particular tools in the tools/ directory that this
1334 # target needs to have built prior to building Rockbox
1337 # *cc: sets up gcc and compiler options for your target builds. Note
1338 # that if you select a simulator build, the compiler selection is
1339 # overridden later in the script.
1345 modelname
="archosplayer"
1346 target
="-DARCHOS_PLAYER"
1348 tool
="$rootdir/tools/scramble"
1350 appextra
="player:gui"
1351 archosrom
="$pwd/rombox.ucl"
1352 flash
="$pwd/rockbox.ucl"
1356 # toolset is the tools within the tools directory that we build for
1357 # this particular target.
1358 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1360 # Note: the convbdf is present in the toolset just because: 1) the
1361 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1362 # build the player simulator
1365 t_manufacturer
="archos"
1371 modelname
="archosrecorder"
1372 target
="-DARCHOS_RECORDER"
1374 tool
="$rootdir/tools/scramble"
1375 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1376 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1378 appextra
="recorder:gui:radio"
1379 #archosrom="$pwd/rombox.ucl"
1380 flash
="$pwd/rockbox.ucl"
1383 # toolset is the tools within the tools directory that we build for
1384 # this particular target.
1385 toolset
=$archosbitmaptools
1387 t_manufacturer
="archos"
1393 modelname
="archosfmrecorder"
1394 target
="-DARCHOS_FMRECORDER"
1396 tool
="$rootdir/tools/scramble -fm"
1397 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1398 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1400 appextra
="recorder:gui:radio"
1401 #archosrom="$pwd/rombox.ucl"
1402 flash
="$pwd/rockbox.ucl"
1405 # toolset is the tools within the tools directory that we build for
1406 # this particular target.
1407 toolset
=$archosbitmaptools
1409 t_manufacturer
="archos"
1415 modelname
="archosrecorderv2"
1416 target
="-DARCHOS_RECORDERV2"
1418 tool
="$rootdir/tools/scramble -v2"
1419 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1420 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1422 appextra
="recorder:gui:radio"
1423 #archosrom="$pwd/rombox.ucl"
1424 flash
="$pwd/rockbox.ucl"
1427 # toolset is the tools within the tools directory that we build for
1428 # this particular target.
1429 toolset
=$archosbitmaptools
1431 t_manufacturer
="archos"
1437 modelname
="archosondiosp"
1438 target
="-DARCHOS_ONDIOSP"
1440 tool
="$rootdir/tools/scramble -osp"
1441 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1442 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1444 appextra
="recorder:gui:radio"
1445 #archosrom="$pwd/rombox.ucl"
1446 flash
="$pwd/rockbox.ucl"
1449 # toolset is the tools within the tools directory that we build for
1450 # this particular target.
1451 toolset
=$archosbitmaptools
1453 t_manufacturer
="archos"
1459 modelname
="archosondiofm"
1460 target
="-DARCHOS_ONDIOFM"
1462 tool
="$rootdir/tools/scramble -ofm"
1463 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1464 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1466 appextra
="recorder:gui:radio"
1467 #archosrom="$pwd/rombox.ucl"
1468 flash
="$pwd/rockbox.ucl"
1471 toolset
=$archosbitmaptools
1473 t_manufacturer
="archos"
1479 modelname
="archosav300"
1480 target
="-DARCHOS_AV300"
1483 tool
="$rootdir/tools/scramble -mm=C"
1484 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1485 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1487 appextra
="recorder:gui:radio"
1490 # toolset is the tools within the tools directory that we build for
1491 # this particular target.
1492 toolset
="$toolset scramble descramble bmp2rb"
1493 # architecture, manufacturer and model for the target-tree build
1495 t_manufacturer
="archos"
1501 modelname
="iriverh120"
1502 target
="-DIRIVER_H120"
1505 tool
="$rootdir/tools/scramble -add=h120"
1506 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1507 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1508 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1509 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1510 output
="rockbox.iriver"
1511 bootoutput
="bootloader.iriver"
1512 appextra
="recorder:gui:radio"
1513 flash
="$pwd/rombox.iriver"
1516 # toolset is the tools within the tools directory that we build for
1517 # this particular target.
1518 toolset
=$iriverbitmaptools
1520 t_manufacturer
="iriver"
1526 modelname
="iriverh300"
1527 target
="-DIRIVER_H300"
1530 tool
="$rootdir/tools/scramble -add=h300"
1531 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1532 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1533 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1534 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1535 output
="rockbox.iriver"
1536 appextra
="recorder:gui:radio"
1539 # toolset is the tools within the tools directory that we build for
1540 # this particular target.
1541 toolset
=$iriverbitmaptools
1543 t_manufacturer
="iriver"
1549 modelname
="iriverh100"
1550 target
="-DIRIVER_H100"
1553 tool
="$rootdir/tools/scramble -add=h100"
1554 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1555 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1556 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1557 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1558 output
="rockbox.iriver"
1559 bootoutput
="bootloader.iriver"
1560 appextra
="recorder:gui:radio"
1561 flash
="$pwd/rombox.iriver"
1564 # toolset is the tools within the tools directory that we build for
1565 # this particular target.
1566 toolset
=$iriverbitmaptools
1568 t_manufacturer
="iriver"
1574 modelname
="iriverifp7xx"
1575 target
="-DIRIVER_IFP7XX"
1579 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1580 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1581 output
="rockbox.wma"
1582 appextra
="recorder:gui:radio"
1585 # toolset is the tools within the tools directory that we build for
1586 # this particular target.
1587 toolset
=$genericbitmaptools
1589 t_manufacturer
="pnx0101"
1590 t_model
="iriver-ifp7xx"
1595 modelname
="iriverh10"
1596 target
="-DIRIVER_H10"
1599 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1600 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1601 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1602 output
="rockbox.mi4"
1603 appextra
="recorder:gui:radio"
1606 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1607 bootoutput
="H10_20GC.mi4"
1608 # toolset is the tools within the tools directory that we build for
1609 # this particular target.
1610 toolset
=$scramblebitmaptools
1611 # architecture, manufacturer and model for the target-tree build
1613 t_manufacturer
="iriver"
1619 modelname
="iriverh10_5gb"
1620 target
="-DIRIVER_H10_5GB"
1623 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1624 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1625 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1626 output
="rockbox.mi4"
1627 appextra
="recorder:gui:radio"
1630 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1631 bootoutput
="H10.mi4"
1632 # toolset is the tools within the tools directory that we build for
1633 # this particular target.
1634 toolset
=$scramblebitmaptools
1635 # architecture, manufacturer and model for the target-tree build
1637 t_manufacturer
="iriver"
1643 modelname
="ipodcolor"
1644 target
="-DIPOD_COLOR"
1647 tool
="$rootdir/tools/scramble -add=ipco"
1648 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1649 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1650 output
="rockbox.ipod"
1651 appextra
="recorder:gui:radio"
1654 bootoutput
="bootloader-$modelname.ipod"
1655 # toolset is the tools within the tools directory that we build for
1656 # this particular target.
1657 toolset
=$ipodbitmaptools
1658 # architecture, manufacturer and model for the target-tree build
1660 t_manufacturer
="ipod"
1666 modelname
="ipodnano1g"
1667 target
="-DIPOD_NANO"
1670 tool
="$rootdir/tools/scramble -add=nano"
1671 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1672 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1673 output
="rockbox.ipod"
1674 appextra
="recorder:gui:radio"
1677 bootoutput
="bootloader-$modelname.ipod"
1678 # toolset is the tools within the tools directory that we build for
1679 # this particular target.
1680 toolset
=$ipodbitmaptools
1681 # architecture, manufacturer and model for the target-tree build
1683 t_manufacturer
="ipod"
1689 modelname
="ipodvideo"
1690 target
="-DIPOD_VIDEO"
1691 memory
=64 # always. This is reduced at runtime if needed
1693 tool
="$rootdir/tools/scramble -add=ipvd"
1694 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1695 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1696 output
="rockbox.ipod"
1697 appextra
="recorder:gui:radio"
1700 bootoutput
="bootloader-$modelname.ipod"
1701 # toolset is the tools within the tools directory that we build for
1702 # this particular target.
1703 toolset
=$ipodbitmaptools
1704 # architecture, manufacturer and model for the target-tree build
1706 t_manufacturer
="ipod"
1716 tool
="$rootdir/tools/scramble -add=ip3g"
1717 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1718 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1719 output
="rockbox.ipod"
1720 appextra
="recorder:gui:radio"
1723 bootoutput
="bootloader-$modelname.ipod"
1724 # toolset is the tools within the tools directory that we build for
1725 # this particular target.
1726 toolset
=$ipodbitmaptools
1727 # architecture, manufacturer and model for the target-tree build
1729 t_manufacturer
="ipod"
1739 tool
="$rootdir/tools/scramble -add=ip4g"
1740 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1741 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1742 output
="rockbox.ipod"
1743 appextra
="recorder:gui:radio"
1746 bootoutput
="bootloader-$modelname.ipod"
1747 # toolset is the tools within the tools directory that we build for
1748 # this particular target.
1749 toolset
=$ipodbitmaptools
1750 # architecture, manufacturer and model for the target-tree build
1752 t_manufacturer
="ipod"
1758 modelname
="ipodmini1g"
1759 target
="-DIPOD_MINI"
1762 tool
="$rootdir/tools/scramble -add=mini"
1763 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1764 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1765 output
="rockbox.ipod"
1766 appextra
="recorder:gui:radio"
1769 bootoutput
="bootloader-$modelname.ipod"
1770 # toolset is the tools within the tools directory that we build for
1771 # this particular target.
1772 toolset
=$ipodbitmaptools
1773 # architecture, manufacturer and model for the target-tree build
1775 t_manufacturer
="ipod"
1781 modelname
="ipodmini2g"
1782 target
="-DIPOD_MINI2G"
1785 tool
="$rootdir/tools/scramble -add=mn2g"
1786 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1787 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1788 output
="rockbox.ipod"
1789 appextra
="recorder:gui:radio"
1792 bootoutput
="bootloader-$modelname.ipod"
1793 # toolset is the tools within the tools directory that we build for
1794 # this particular target.
1795 toolset
=$ipodbitmaptools
1796 # architecture, manufacturer and model for the target-tree build
1798 t_manufacturer
="ipod"
1804 modelname
="ipod1g2g"
1805 target
="-DIPOD_1G2G"
1808 tool
="$rootdir/tools/scramble -add=1g2g"
1809 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1810 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1811 output
="rockbox.ipod"
1812 appextra
="recorder:gui:radio"
1815 bootoutput
="bootloader-$modelname.ipod"
1816 # toolset is the tools within the tools directory that we build for
1817 # this particular target.
1818 toolset
=$ipodbitmaptools
1819 # architecture, manufacturer and model for the target-tree build
1821 t_manufacturer
="ipod"
1827 modelname
="ipodnano2g"
1828 target
="-DIPOD_NANO2G"
1831 tool
="$rootdir/tools/scramble -add=nn2g"
1832 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1833 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1834 output
="rockbox.ipod"
1835 appextra
="recorder:gui:radio"
1838 bootoutput
="bootloader-$modelname.ipod"
1839 # toolset is the tools within the tools directory that we build for
1840 # this particular target.
1841 toolset
=$ipodbitmaptools
1842 # architecture, manufacturer and model for the target-tree build
1844 t_manufacturer
="s5l8700"
1845 t_model
="ipodnano2g"
1854 tool
="$rootdir/tools/scramble -add=ip6g"
1855 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1856 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1857 output
="rockbox.ipod"
1858 appextra
="recorder:gui:radio"
1861 bootoutput
="bootloader-$modelname.ipod"
1862 # toolset is the tools within the tools directory that we build for
1863 # this particular target.
1864 toolset
=$ipodbitmaptools
1865 # architecture, manufacturer and model for the target-tree build
1867 t_manufacturer
="s5l8702"
1873 modelname
="iaudiox5"
1874 target
="-DIAUDIO_X5"
1877 tool
="$rootdir/tools/scramble -add=iax5"
1878 boottool
="$rootdir/tools/scramble -iaudiox5"
1879 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1880 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1881 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1882 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1883 output
="rockbox.iaudio"
1884 bootoutput
="x5_fw.bin"
1885 appextra
="recorder:gui:radio"
1888 # toolset is the tools within the tools directory that we build for
1889 # this particular target.
1890 toolset
="$iaudiobitmaptools"
1891 # architecture, manufacturer and model for the target-tree build
1893 t_manufacturer
="iaudio"
1899 modelname
="iaudiom5"
1900 target
="-DIAUDIO_M5"
1903 tool
="$rootdir/tools/scramble -add=iam5"
1904 boottool
="$rootdir/tools/scramble -iaudiom5"
1905 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1906 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1907 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1908 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1909 output
="rockbox.iaudio"
1910 bootoutput
="m5_fw.bin"
1911 appextra
="recorder:gui:radio"
1914 # toolset is the tools within the tools directory that we build for
1915 # this particular target.
1916 toolset
="$iaudiobitmaptools"
1917 # architecture, manufacturer and model for the target-tree build
1919 t_manufacturer
="iaudio"
1929 tool
="$rootdir/tools/scramble -add=i7"
1930 boottool
="$rootdir/tools/scramble -tcc=crc"
1931 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1932 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1933 output
="rockbox.iaudio"
1934 appextra
="recorder:gui:radio"
1937 bootoutput
="I7_FW.BIN"
1938 # toolset is the tools within the tools directory that we build for
1939 # this particular target.
1940 toolset
="$tccbitmaptools"
1941 # architecture, manufacturer and model for the target-tree build
1943 t_manufacturer
="tcc77x"
1953 tool
="$rootdir/tools/scramble -add=d2"
1955 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1956 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1958 bootoutput
="bootloader-cowond2.bin"
1959 appextra
="recorder:gui:radio"
1962 toolset
="$tccbitmaptools"
1963 # architecture, manufacturer and model for the target-tree build
1965 t_manufacturer
="tcc780x"
1971 modelname
="iaudiom3"
1972 target
="-DIAUDIO_M3"
1975 tool
="$rootdir/tools/scramble -add=iam3"
1976 boottool
="$rootdir/tools/scramble -iaudiom3"
1977 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1978 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
1979 output
="rockbox.iaudio"
1980 bootoutput
="cowon_m3.bin"
1981 appextra
="recorder:gui:radio"
1984 # toolset is the tools within the tools directory that we build for
1985 # this particular target.
1986 toolset
="$iaudiobitmaptools"
1987 # architecture, manufacturer and model for the target-tree build
1989 t_manufacturer
="iaudio"
1995 modelname
="gigabeatfx"
1996 target
="-DGIGABEAT_F"
1999 tool
="$rootdir/tools/scramble -add=giga"
2000 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2001 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2002 output
="rockbox.gigabeat"
2003 appextra
="recorder:gui:radio"
2006 toolset
=$gigabeatbitmaptools
2007 boottool
="$rootdir/tools/scramble -gigabeat"
2008 bootoutput
="FWIMG01.DAT"
2009 # architecture, manufacturer and model for the target-tree build
2011 t_manufacturer
="s3c2440"
2012 t_model
="gigabeat-fx"
2017 modelname
="gigabeats"
2018 target
="-DGIGABEAT_S"
2021 tool
="$rootdir/tools/scramble -add=gigs"
2022 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2023 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2024 output
="rockbox.gigabeat"
2025 appextra
="recorder:gui:radio"
2028 toolset
="$gigabeatbitmaptools"
2029 boottool
="$rootdir/tools/scramble -gigabeats"
2031 # architecture, manufacturer and model for the target-tree build
2033 t_manufacturer
="imx31"
2034 t_model
="gigabeat-s"
2039 modelname
="mrobe500"
2040 target
="-DMROBE_500"
2043 tool
="$rootdir/tools/scramble -add=m500"
2044 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2045 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2046 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2047 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2048 output
="rockbox.mrobe500"
2049 appextra
="recorder:gui:radio"
2052 toolset
=$gigabeatbitmaptools
2054 bootoutput
="rockbox.mrboot"
2055 # architecture, manufacturer and model for the target-tree build
2057 t_manufacturer
="tms320dm320"
2063 modelname
="mrobe100"
2064 target
="-DMROBE_100"
2067 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2068 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2069 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2070 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2071 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2072 output
="rockbox.mi4"
2073 appextra
="recorder:gui:radio"
2076 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2077 bootoutput
="pp5020.mi4"
2078 # toolset is the tools within the tools directory that we build for
2079 # this particular target.
2080 toolset
=$scramblebitmaptools
2081 # architecture, manufacturer and model for the target-tree build
2083 t_manufacturer
="olympus"
2089 modelname
="logikdax"
2090 target
="-DLOGIK_DAX"
2093 tool
="$rootdir/tools/scramble -add=ldax"
2094 boottool
="$rootdir/tools/scramble -tcc=crc"
2095 bootoutput
="player.rom"
2096 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2097 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2098 output
="rockbox.logik"
2099 appextra
="recorder:gui:radio"
2102 # toolset is the tools within the tools directory that we build for
2103 # this particular target.
2104 toolset
=$tccbitmaptools
2105 # architecture, manufacturer and model for the target-tree build
2107 t_manufacturer
="tcc77x"
2113 modelname
="zenvisionm30gb"
2114 target
="-DCREATIVE_ZVM"
2117 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2118 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2119 tool
="$rootdir/tools/scramble -creative=zvm"
2121 output
="rockbox.zvm"
2122 appextra
="recorder:gui:radio"
2125 toolset
=$ipodbitmaptools
2126 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2127 bootoutput
="rockbox.zvmboot"
2128 # architecture, manufacturer and model for the target-tree build
2130 t_manufacturer
="tms320dm320"
2131 t_model
="creative-zvm"
2136 modelname
="zenvisionm60gb"
2137 target
="-DCREATIVE_ZVM60GB"
2140 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2141 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2142 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2144 output
="rockbox.zvm60"
2145 appextra
="recorder:gui:radio"
2148 toolset
=$ipodbitmaptools
2149 boottool
="$rootdir/tools/scramble -creative=zvm60"
2150 bootoutput
="rockbox.zvm60boot"
2151 # architecture, manufacturer and model for the target-tree build
2153 t_manufacturer
="tms320dm320"
2154 t_model
="creative-zvm"
2159 modelname
="zenvision"
2160 target
="-DCREATIVE_ZV"
2163 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2164 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2165 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2168 appextra
="recorder:gui:radio"
2171 toolset
=$ipodbitmaptools
2172 boottool
="$rootdir/tools/scramble -creative=zenvision"
2173 bootoutput
="rockbox.zvboot"
2174 # architecture, manufacturer and model for the target-tree build
2176 t_manufacturer
="tms320dm320"
2177 t_model
="creative-zvm"
2182 modelname
="sansae200"
2183 target
="-DSANSA_E200"
2184 memory
=32 # supposedly
2186 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2187 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2188 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2189 output
="rockbox.mi4"
2190 appextra
="recorder:gui:radio"
2193 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2194 bootoutput
="PP5022.mi4"
2195 # toolset is the tools within the tools directory that we build for
2196 # this particular target.
2197 toolset
=$scramblebitmaptools
2198 # architecture, manufacturer and model for the target-tree build
2200 t_manufacturer
="sandisk"
2201 t_model
="sansa-e200"
2205 # the e200R model is pretty much identical to the e200, it only has a
2206 # different option to the scramble tool when building a bootloader and
2207 # makes the bootloader output file name in all lower case.
2209 modelname
="sansae200r"
2210 target
="-DSANSA_E200"
2211 memory
=32 # supposedly
2213 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2214 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2215 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2216 output
="rockbox.mi4"
2217 appextra
="recorder:gui:radio"
2220 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2221 bootoutput
="pp5022.mi4"
2222 # toolset is the tools within the tools directory that we build for
2223 # this particular target.
2224 toolset
=$scramblebitmaptools
2225 # architecture, manufacturer and model for the target-tree build
2227 t_manufacturer
="sandisk"
2228 t_model
="sansa-e200"
2233 modelname
="sansac200"
2234 target
="-DSANSA_C200"
2235 memory
=32 # supposedly
2237 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2238 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2239 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2240 output
="rockbox.mi4"
2241 appextra
="recorder:gui:radio"
2244 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2245 bootoutput
="firmware.mi4"
2246 # toolset is the tools within the tools directory that we build for
2247 # this particular target.
2248 toolset
=$scramblebitmaptools
2249 # architecture, manufacturer and model for the target-tree build
2251 t_manufacturer
="sandisk"
2252 t_model
="sansa-c200"
2257 modelname
="sansam200"
2258 target
="-DSANSA_M200"
2261 tool
="$rootdir/tools/scramble -add=m200"
2262 boottool
="$rootdir/tools/scramble -tcc=crc"
2263 bootoutput
="player.rom"
2264 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2265 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2266 output
="rockbox.m200"
2267 appextra
="recorder:gui:radio"
2270 # toolset is the tools within the tools directory that we build for
2271 # this particular target.
2272 toolset
=$tccbitmaptools
2273 # architecture, manufacturer and model for the target-tree build
2275 t_manufacturer
="tcc77x"
2281 modelname
="sansac100"
2282 target
="-DSANSA_C100"
2285 tool
="$rootdir/tools/scramble -add=c100"
2286 boottool
="$rootdir/tools/scramble -tcc=crc"
2287 bootoutput
="player.rom"
2288 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2289 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2290 output
="rockbox.c100"
2291 appextra
="recorder:gui:radio"
2294 # toolset is the tools within the tools directory that we build for
2295 # this particular target.
2296 toolset
=$tccbitmaptools
2297 # architecture, manufacturer and model for the target-tree build
2299 t_manufacturer
="tcc77x"
2305 modelname
="sansaclip"
2306 target
="-DSANSA_CLIP"
2308 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2309 bmp2rb_native
="$bmp2rb_mono"
2310 tool
="$rootdir/tools/scramble -add=clip"
2311 output
="rockbox.sansa"
2312 bootoutput
="bootloader-clip.sansa"
2313 appextra
="recorder:gui:radio"
2316 toolset
=$scramblebitmaptools
2318 t_manufacturer
="as3525"
2319 t_model
="sansa-clip"
2320 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2322 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2328 modelname
="sansae200v2"
2329 target
="-DSANSA_E200V2"
2331 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2332 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2333 tool
="$rootdir/tools/scramble -add=e2v2"
2334 output
="rockbox.sansa"
2335 bootoutput
="bootloader-e200v2.sansa"
2336 appextra
="recorder:gui:radio"
2339 toolset
=$scramblebitmaptools
2341 t_manufacturer
="as3525"
2342 t_model
="sansa-e200v2"
2349 modelname
="sansam200v4"
2350 target
="-DSANSA_M200V4"
2352 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2353 bmp2rb_native
="$bmp2rb_mono"
2354 tool
="$rootdir/tools/scramble -add=m2v4"
2355 output
="rockbox.sansa"
2356 bootoutput
="bootloader-m200v4.sansa"
2357 appextra
="recorder:gui:radio"
2360 toolset
=$scramblebitmaptools
2362 t_manufacturer
="as3525"
2363 t_model
="sansa-m200v4"
2364 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2366 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2372 modelname
="sansafuze"
2373 target
="-DSANSA_FUZE"
2375 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2376 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2377 tool
="$rootdir/tools/scramble -add=fuze"
2378 output
="rockbox.sansa"
2379 bootoutput
="bootloader-fuze.sansa"
2380 appextra
="recorder:gui:radio"
2383 toolset
=$scramblebitmaptools
2385 t_manufacturer
="as3525"
2386 t_model
="sansa-fuze"
2393 modelname
="sansac200v2"
2394 target
="-DSANSA_C200V2"
2395 memory
=2 # as per OF diagnosis mode
2396 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2397 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2398 tool
="$rootdir/tools/scramble -add=c2v2"
2399 output
="rockbox.sansa"
2400 bootoutput
="bootloader-c200v2.sansa"
2401 appextra
="recorder:gui:radio"
2404 # toolset is the tools within the tools directory that we build for
2405 # this particular target.
2406 toolset
=$scramblebitmaptools
2407 # architecture, manufacturer and model for the target-tree build
2409 t_manufacturer
="as3525"
2410 t_model
="sansa-c200v2"
2411 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2413 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2418 modelname
="sansaclipv2"
2419 target
="-DSANSA_CLIPV2"
2421 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2422 bmp2rb_native
="$bmp2rb_mono"
2423 tool
="$rootdir/tools/scramble -add=clv2"
2424 output
="rockbox.sansa"
2425 bootoutput
="bootloader-clipv2.sansa"
2426 appextra
="recorder:gui:radio"
2429 toolset
=$scramblebitmaptools
2431 t_manufacturer
="as3525"
2432 t_model
="sansa-clipv2"
2437 echo "Sansa View is not yet supported!"
2440 modelname
="sansaview"
2441 target
="-DSANSA_VIEW"
2444 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2445 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2446 output
="rockbox.mi4"
2450 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2451 bootoutput
="firmware.mi4"
2452 # toolset is the tools within the tools directory that we build for
2453 # this particular target.
2454 toolset
=$scramblebitmaptools
2456 t_manufacturer
="sandisk"
2457 t_model
="sansa-view"
2462 modelname
="sansaclipplus"
2463 target
="-DSANSA_CLIPPLUS"
2465 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2466 bmp2rb_native
="$bmp2rb_mono"
2467 tool
="$rootdir/tools/scramble -add=cli+"
2468 output
="rockbox.sansa"
2469 bootoutput
="bootloader-clipplus.sansa"
2470 appextra
="recorder:gui:radio"
2473 toolset
=$scramblebitmaptools
2475 t_manufacturer
="as3525"
2476 t_model
="sansa-clipplus"
2482 modelname
="sansafuzev2"
2483 target
="-DSANSA_FUZEV2"
2485 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2486 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2487 tool
="$rootdir/tools/scramble -add=fuz2"
2488 output
="rockbox.sansa"
2489 bootoutput
="bootloader-fuzev2.sansa"
2490 appextra
="recorder:gui:radio"
2493 toolset
=$scramblebitmaptools
2495 t_manufacturer
="as3525"
2496 t_model
="sansa-fuzev2"
2502 modelname
="sansafuzeplus"
2503 target
="-DSANSA_FUZEPLUS"
2505 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2506 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2507 tool
="$rootdir/tools/scramble -add=fuz+"
2508 output
="rockbox.sansa"
2514 toolset
=$scramblebitmaptools
2516 t_manufacturer
="imx233"
2517 t_model
="sansa-fuzeplus"
2523 modelname
="tatungtpj1022"
2524 target
="-DTATUNG_TPJ1022"
2527 tool
="$rootdir/tools/scramble -add tpj2"
2528 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2529 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2530 output
="rockbox.elio"
2531 appextra
="recorder:gui:radio"
2534 boottool
="$rootdir/tools/scramble -mi4v2"
2535 bootoutput
="pp5020.mi4"
2536 # toolset is the tools within the tools directory that we build for
2537 # this particular target.
2538 toolset
=$scramblebitmaptools
2539 # architecture, manufacturer and model for the target-tree build
2541 t_manufacturer
="tatung"
2547 modelname
="gogearsa9200"
2548 target
="-DPHILIPS_SA9200"
2549 memory
=32 # supposedly
2551 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2552 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2553 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2554 output
="rockbox.mi4"
2555 appextra
="recorder:gui:radio"
2558 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2559 bootoutput
="FWImage.ebn"
2560 # toolset is the tools within the tools directory that we build for
2561 # this particular target.
2562 toolset
=$scramblebitmaptools
2563 # architecture, manufacturer and model for the target-tree build
2565 t_manufacturer
="philips"
2571 modelname
="gogearhdd1630"
2572 target
="-DPHILIPS_HDD1630"
2573 memory
=32 # supposedly
2575 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2576 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2577 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2578 output
="rockbox.mi4"
2579 appextra
="recorder:gui:radio"
2582 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2583 bootoutput
="FWImage.ebn"
2584 # toolset is the tools within the tools directory that we build for
2585 # this particular target.
2586 toolset
=$scramblebitmaptools
2587 # architecture, manufacturer and model for the target-tree build
2589 t_manufacturer
="philips"
2595 modelname
="gogearhdd6330"
2596 target
="-DPHILIPS_HDD6330"
2599 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2600 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2601 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2602 output
="rockbox.mi4"
2603 appextra
="recorder:gui:radio"
2606 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2607 bootoutput
="FWImage.ebn"
2608 # toolset is the tools within the tools directory that we build for
2609 # this particular target.
2610 toolset
=$scramblebitmaptools
2611 # architecture, manufacturer and model for the target-tree build
2613 t_manufacturer
="philips"
2619 modelname
="meizum6sl"
2620 target
="-DMEIZU_M6SL"
2624 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2625 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2626 output
="rockbox.meizu"
2627 appextra
="recorder:gui:radio"
2630 toolset
=$genericbitmaptools
2632 bootoutput
="rockboot.ebn"
2633 # architecture, manufacturer and model for the target-tree build
2635 t_manufacturer
="s5l8700"
2636 t_model
="meizu-m6sl"
2641 modelname
="meizum6sp"
2642 target
="-DMEIZU_M6SP"
2646 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2647 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2648 output
="rockbox.meizu"
2649 appextra
="recorder:gui:radio"
2652 toolset
=$genericbitmaptools
2654 bootoutput
="rockboot.ebn"
2655 # architecture, manufacturer and model for the target-tree build
2657 t_manufacturer
="s5l8700"
2658 t_model
="meizu-m6sp"
2668 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2669 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2670 output
="rockbox.meizu"
2671 appextra
="recorder:gui:radio"
2674 toolset
=$genericbitmaptools
2676 bootoutput
="rockboot.ebn"
2677 # architecture, manufacturer and model for the target-tree build
2679 t_manufacturer
="s5l8700"
2685 modelname
="ondavx747"
2686 target
="-DONDA_VX747"
2689 tool
="$rootdir/tools/scramble -add=x747"
2690 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2691 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2692 output
="rockbox.vx747"
2693 appextra
="recorder:gui:radio"
2696 toolset
=$genericbitmaptools
2697 boottool
="$rootdir/tools/scramble -ccpmp"
2698 bootoutput
="ccpmp.bin"
2699 # architecture, manufacturer and model for the target-tree build
2701 t_manufacturer
="ingenic_jz47xx"
2702 t_model
="onda_vx747"
2707 modelname
="ondavx767"
2708 target
="-DONDA_VX767"
2712 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2713 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2714 output
="rockbox.vx767"
2715 appextra
="recorder:gui:radio"
2718 toolset
=$genericbitmaptools
2719 boottool
="$rootdir/tools/scramble -ccpmp"
2720 bootoutput
="ccpmp.bin"
2721 # architecture, manufacturer and model for the target-tree build
2723 t_manufacturer
="ingenic_jz47xx"
2724 t_model
="onda_vx767"
2729 modelname
="ondavx747p"
2730 target
="-DONDA_VX747P"
2733 tool
="$rootdir/tools/scramble -add=747p"
2734 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2735 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2736 output
="rockbox.vx747p"
2737 appextra
="recorder:gui:radio"
2740 toolset
=$genericbitmaptools
2741 boottool
="$rootdir/tools/scramble -ccpmp"
2742 bootoutput
="ccpmp.bin"
2743 # architecture, manufacturer and model for the target-tree build
2745 t_manufacturer
="ingenic_jz47xx"
2746 t_model
="onda_vx747"
2751 modelname
="ondavx777"
2752 target
="-DONDA_VX777"
2755 tool
="$rootdir/tools/scramble -add=x777"
2756 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2757 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2758 output
="rockbox.vx777"
2759 appextra
="recorder:gui:radio"
2762 toolset
=$genericbitmaptools
2763 boottool
="$rootdir/tools/scramble -ccpmp"
2764 bootoutput
="ccpmp.bin"
2765 # architecture, manufacturer and model for the target-tree build
2767 t_manufacturer
="ingenic_jz47xx"
2768 t_model
="onda_vx747"
2773 modelname
="lyreproto1"
2774 target
="-DLYRE_PROTO1"
2778 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2779 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2780 output
="rockbox.lyre"
2781 appextra
="recorder:gui:radio"
2784 toolset
=$scramblebitmaptools
2786 bootoutput
="bootloader-proto1.lyre"
2787 # architecture, manufacturer and model for the target-tree build
2789 t_manufacturer
="at91sam"
2790 t_model
="lyre_proto1"
2795 modelname
="mini2440"
2799 tool
="$rootdir/tools/scramble -add=m244"
2800 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2801 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2802 output
="rockbox.mini2440"
2803 appextra
="recorder:gui:radio"
2806 toolset
=$scramblebitmaptools
2808 bootoutput
="bootloader-mini2440.lyre"
2809 # architecture, manufacturer and model for the target-tree build
2811 t_manufacturer
="s3c2440"
2817 modelname
="samsungyh820"
2818 target
="-DSAMSUNG_YH820"
2821 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2822 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2823 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2824 output
="rockbox.mi4"
2825 appextra
="recorder:gui:radio"
2828 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2829 bootoutput
="FW_YH820.mi4"
2830 # toolset is the tools within the tools directory that we build for
2831 # this particular target.
2832 toolset
=$scramblebitmaptools
2833 # architecture, manufacturer and model for the target-tree build
2835 t_manufacturer
="samsung"
2841 modelname
="samsungyh920"
2842 target
="-DSAMSUNG_YH920"
2845 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2846 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2847 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2848 output
="rockbox.mi4"
2849 appextra
="recorder:gui:radio"
2852 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2853 bootoutput
="PP5020.mi4"
2854 # toolset is the tools within the tools directory that we build for
2855 # this particular target.
2856 toolset
=$scramblebitmaptools
2857 # architecture, manufacturer and model for the target-tree build
2859 t_manufacturer
="samsung"
2865 modelname
="samsungyh925"
2866 target
="-DSAMSUNG_YH925"
2869 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2870 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2871 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2872 output
="rockbox.mi4"
2873 appextra
="recorder:gui:radio"
2876 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2877 bootoutput
="FW_YH925.mi4"
2878 # toolset is the tools within the tools directory that we build for
2879 # this particular target.
2880 toolset
=$scramblebitmaptools
2881 # architecture, manufacturer and model for the target-tree build
2883 t_manufacturer
="samsung"
2889 modelname
="samsungyps3"
2890 target
="-DSAMSUNG_YPS3"
2894 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2895 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2896 output
="rockbox.yps3"
2897 appextra
="recorder:gui:radio"
2900 toolset
=$genericbitmaptools
2902 bootoutput
="rockboot.ebn"
2903 # architecture, manufacturer and model for the target-tree build
2905 t_manufacturer
="s5l8700"
2912 target
="-DPBELL_VIBE500"
2915 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2916 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2917 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2918 output
="rockbox.mi4"
2919 appextra
="recorder:gui:radio"
2922 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2923 bootoutput
="jukebox.mi4"
2924 # toolset is the tools within the tools directory that we build for
2925 # this particular target.
2926 toolset
=$scramblebitmaptools
2927 # architecture, manufacturer and model for the target-tree build
2929 t_manufacturer
="pbell"
2935 modelname
="mpiohd200"
2936 target
="-DMPIO_HD200"
2939 tool
="$rootdir/tools/scramble -add=hd20"
2940 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2941 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
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
="mpiohd300"
2959 target
="-DMPIO_HD300"
2962 tool
="$rootdir/tools/scramble -add=hd30"
2963 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2964 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2965 output
="rockbox.mpio"
2966 bootoutput
="bootloader.mpio"
2967 appextra
="recorder:gui:radio"
2970 # toolset is the tools within the tools directory that we build for
2971 # this particular target.
2972 toolset
="$genericbitmaptools"
2973 # architecture, manufacturer and model for the target-tree build
2975 t_manufacturer
="mpio"
2981 modelname
="rk27generic"
2982 target
="-DRK27_GENERIC"
2985 tool
="$rootdir/tools/scramble -add=rk27"
2986 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2987 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2988 output
="rockbox.rk27"
2989 bootoutput
="bootloader.rk27"
2990 appextra
="recorder:gui:radio"
2993 # toolset is the tools within the tools directory that we build for
2994 # this particular target.
2995 toolset
="$genericbitmaptools"
2996 # architecture, manufacturer and model for the target-tree build
2998 t_manufacturer
="rk27xx"
2999 t_model
="rk27generic"
3014 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3015 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3017 bootoutput
="rockbox"
3018 appextra
="recorder:gui:radio"
3021 # architecture, manufacturer and model for the target-tree build
3023 t_manufacturer
="sdl"
3034 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3035 bindir
="/data/data/org.rockbox/lib"
3036 libdir
="/data/data/org.rockbox/app_rockbox"
3042 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3043 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3044 output
="librockbox.so"
3045 bootoutput
="librockbox.so"
3046 appextra
="recorder:gui:radio:hosted/android"
3049 # architecture, manufacturer and model for the target-tree build
3051 t_manufacturer
="android"
3058 modelname
="nokian8xx"
3060 target
="-DNOKIAN8XX"
3061 sharedir
="/opt/rockbox/share/rockbox"
3062 bindir
="/opt/rockbox/bin"
3063 libdir
="/opt/rockbox/lib"
3069 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3070 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3072 bootoutput
="rockbox"
3073 appextra
="recorder:gui:radio"
3076 # architecture, manufacturer and model for the target-tree build
3078 t_manufacturer
="maemo"
3085 modelname
="nokian900"
3087 target
="-DNOKIAN900"
3088 sharedir
="/opt/rockbox/share/rockbox"
3089 bindir
="/opt/rockbox/bin"
3090 libdir
="/opt/rockbox/lib"
3096 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3097 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3099 bootoutput
="rockbox"
3100 appextra
="recorder:gui:radio"
3103 # architecture, manufacturer and model for the target-tree build
3105 t_manufacturer
="maemo"
3115 sharedir
="rockbox/share"
3116 bindir
="rockbox/bin"
3117 libdir
="rockbox/lib"
3123 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3124 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3126 bootoutput
="rockbox"
3127 appextra
="recorder:gui:radio"
3130 # architecture, manufacturer and model for the target-tree build
3132 t_manufacturer
="pandora"
3137 echo "Please select a supported target platform!"
3143 echo "Platform set to $modelname"
3147 ############################################################################
3148 # Amount of memory, for those that can differ. They have $memory unset at
3152 if [ -z "$memory" ]; then
3155 if [ "$ARG_RAM" ]; then
3158 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3171 if [ "$ARG_RAM" ]; then
3174 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3187 echo "Memory size selected: $memory MB"
3188 [ "$ARG_TYPE" ] ||
echo ""
3192 ##################################################################
3193 # Figure out build "type"
3196 # the ifp7x0 is the only platform that supports building a gdb stub like
3200 gdbstub
="(G)DB stub, "
3202 sansae200r|sansae200
)
3203 gdbstub
="(I)nstaller, "
3206 gdbstub
="(E)raser, "
3211 if [ "$ARG_TYPE" ]; then
3214 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
3220 appsdir
='\$(ROOTDIR)/bootloader'
3222 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3224 echo "e200R-installer build selected"
3227 appsdir
='\$(ROOTDIR)/bootloader'
3229 echo "C2(4)0 or C2(5)0"
3233 extradefines
="$extradefines -DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
3234 echo "c240 eraser build selected"
3237 extradefines
="$extradefines -DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
3238 echo "c240 eraser build selected"
3242 echo "c200 eraser build selected"
3245 if test $t_manufacturer = "archos"; then
3246 # Archos SH-based players do this somewhat differently for
3248 appsdir
='\$(ROOTDIR)/flash/bootbox'
3251 appsdir
='\$(ROOTDIR)/bootloader'
3254 if test -n "$boottool"; then
3257 if test -n "$bootoutput"; then
3261 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3263 echo "Bootloader build selected"
3266 if [ "$modelname" = "sansae200r" ]; then
3267 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3272 extradefines
="$extradefines -DSIMULATOR"
3275 echo "Simulator build selected"
3278 echo "Advanced build selected"
3279 whichadvanced
$btype
3282 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3283 appsdir
='\$(ROOTDIR)/gdb'
3292 echo "GDB stub build selected"
3297 echo "Manual build selected"
3305 extradefines
="$extradefines -DDEBUG"
3306 appsdir
='\$(ROOTDIR)/tools/checkwps';
3307 output
='checkwps.'${modelname};
3309 echo "CheckWPS build selected"
3317 appsdir
='\$(ROOTDIR)/tools/database';
3322 output
="database_${modelname}.exe"
3325 output
='database.'${modelname};
3329 echo "Database tool build selected"
3332 if [ "$modelname" = "sansae200r" ]; then
3333 echo "Do not use the e200R target for regular builds. Use e200 instead."
3337 btype
="N" # set it explicitly since RET only gets here as well
3338 echo "Normal build selected"
3342 # to be able running "make manual" from non-manual configuration
3345 manualdev
="archosfmrecorder"
3348 manualdev
="iriverh100"
3351 manualdev
="ipodmini1g"
3354 manualdev
=$modelname
3358 if [ -z "$debug" ]; then
3359 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3362 if [ "yes" = "$application" ]; then
3363 echo Building Rockbox as an Application
3364 extradefines
="$extradefines -DAPPLICATION"
3367 echo "Using source code root directory: $rootdir"
3369 # this was once possible to change at build-time, but no more:
3374 if [ "yes" = "$simulator" ]; then
3375 # setup compiler and things for simulator
3378 if [ -d "simdisk" ]; then
3379 echo "Subdirectory 'simdisk' already present"
3382 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3386 # Now, figure out version number of the (gcc) compiler we are about to use
3387 gccver
=`$CC -dumpversion`;
3389 # figure out the binutil version too and display it, mostly for the build
3390 # system etc to be able to see it easier
3391 if [ $uname = "Darwin" ]; then
3392 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3394 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
3397 if [ -z "$gccver" ]; then
3398 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3399 echo "[WARNING] this may cause your build to fail since we cannot do the"
3400 echo "[WARNING] checks we want now."
3403 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3406 num1
=`echo $gccver | cut -d . -f1`
3407 num2
=`echo $gccver | cut -d . -f2`
3408 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3415 echo "Using $CC $gccver ($gccnum)"
3417 if test "$gccnum" -ge "400"; then
3418 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3419 # so we ignore that warnings for now
3421 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3424 if test "$gccnum" -ge "402"; then
3425 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3426 # and later would throw it for several valid cases
3427 GCCOPTS
="$GCCOPTS -Wno-override-init"
3431 ""|
"$CROSS_COMPILE")
3435 # cross-compile for win32
3438 # Verify that the cross-compiler is of a recommended version!
3439 if test "$gccver" != "$gccchoice"; then
3440 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3441 echo "WARNING: version $gccchoice!"
3442 echo "WARNING: This may cause your build to fail since it may be a version"
3443 echo "WARNING: that isn't functional or known to not be the best choice."
3444 echo "WARNING: If you suffer from build problems, you know that this is"
3445 echo "WARNING: a likely source for them..."
3453 echo "Using $LD $ldver"
3455 # check the compiler for SH platforms
3456 if test "$CC" = "sh-elf-gcc"; then
3457 if test "$gccnum" -lt "400"; then
3458 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3459 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3461 # figure out patch status
3462 gccpatch
=`$CC --version`;
3464 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3465 echo "gcc $gccver is rockbox patched"
3466 # then convert -O to -Os to get smaller binaries!
3467 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3469 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3470 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3475 if test "$CC" = "m68k-elf-gcc"; then
3476 # convert -O to -Os to get smaller binaries!
3477 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3480 if [ "$ARG_CCACHE" = "1" ]; then
3481 echo "Enable ccache for building"
3483 elif [ "$ARG_CCACHE" != "0" ]; then
3484 ccache
=`findtool ccache`
3485 if test -n "$ccache"; then
3486 echo "Found and uses ccache ($ccache)"
3490 # figure out the full path to the various commands if possible
3491 HOSTCC
=`findtool gcc --lit`
3492 HOSTAR
=`findtool ar --lit`
3493 CC
=`findtool ${CC} --lit`
3494 LD
=`findtool ${AR} --lit`
3495 AR
=`findtool ${AR} --lit`
3496 AS
=`findtool ${AS} --lit`
3497 OC
=`findtool ${OC} --lit`
3498 WINDRES
=`findtool ${WINDRES} --lit`
3499 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3500 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3501 RANLIB
=`findtool ${RANLIB} --lit`
3503 if test -n "$ccache"; then
3507 if test "$ARG_ARM_THUMB" = "1"; then
3508 extradefines
="$extradefines -DUSE_THUMB"
3509 CC
="$toolsdir/thumb-cc.py $CC"
3512 if test "X$endian" = "Xbig"; then
3513 defendian
="ROCKBOX_BIG_ENDIAN"
3515 defendian
="ROCKBOX_LITTLE_ENDIAN"
3518 if [ "$ARG_RBDIR" != "" ]; then
3519 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3524 echo "Using alternate rockbox dir: ${rbdir}"
3528 -e "s<@ENDIAN@<${defendian}<g" \
3529 -e "s<^#undef ROCKBOX_HAS_LOGF<$use_logf<g" \
3530 -e "s<^#undef DO_BOOTCHART<$use_bootchart<g" \
3531 -e "s<@config_rtc@<$config_rtc<g" \
3532 -e "s<@have_rtc_alarm@<$have_rtc_alarm<g" \
3533 -e "s<@thread_support@<$thread_support<g" \
3534 -e "s<@RBDIR@<${rbdir}<g" \
3535 -e "s<@sharepath@<${sharedir}<g" \
3536 -e "s<@binpath@<${bindir}<g" \
3537 -e "s<@libpath@<${libdir}<g" \
3538 -e "s<@have_backlight@<$have_backlight<g" \
3539 -e "s<@have_fmradio_in@<$have_fmradio_in<g" \
3540 -e "s<@have_ata_poweroff@<$have_ata_poweroff<g" \
3541 -e "s<@lcd_width@<$app_lcd_width<g" \
3542 -e "s<@lcd_height@<$app_lcd_height<g" \
3544 /* This header was made by configure */
3545 #ifndef __BUILD_AUTOCONF_H
3546 #define __BUILD_AUTOCONF_H
3548 /* Define endianess for the target or simulator platform */
3551 /* Define this if you build rockbox to support the logf logging and display */
3552 #undef ROCKBOX_HAS_LOGF
3554 /* Define this to record a chart with timings for the stages of boot */
3557 /* optional define for a backlight modded Ondio */
3560 /* optional define for FM radio mod for iAudio M5 */
3563 /* optional define for ATA poweroff on Player */
3566 /* optional defines for RTC mod for h1x0 */
3570 /* the threading backend we use */
3571 #define @thread_support@
3573 /* lcd dimensions for application builds from configure */
3577 /* root of Rockbox */
3578 #define ROCKBOX_DIR "@RBDIR@"
3579 #define ROCKBOX_SHARE_PATH "@sharepath@"
3580 #define ROCKBOX_BINARY_PATH "@binpath@"
3581 #define ROCKBOX_LIBRARY_PATH "@libpath@"
3583 #endif /* __BUILD_AUTOCONF_H */
3586 if test -n "$t_cpu"; then
3587 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3589 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3590 # Maemo needs the SDL port, too
3591 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3592 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3593 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3594 # Pandora needs the SDL port, too
3595 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3596 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3597 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3598 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3599 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3602 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3603 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3607 if test "$simulator" = "yes"; then
3608 # add simul make stuff on the #SIMUL# line
3609 simmagic1
="s<@SIMUL1@<\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim<"
3610 simmagic2
="s<@SIMUL2@<\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim<"
3612 # delete the lines that match
3613 simmagic1
='/@SIMUL1@/D'
3614 simmagic2
='/@SIMUL2@/D'
3617 if test "$swcodec" = "yes"; then
3618 voicetoolset
="rbspeexenc voicefont wavtrim"
3620 voicetoolset
="voicefont wavtrim"
3623 if test "$apps" = "apps"; then
3624 # only when we build "real" apps we build the .lng files
3628 #### Fix the cmdline ###
3629 if [ "$ARG_CCACHE" = "1" ]; then
3631 elif [ "$ARG_CCACHE" = "0" ]; then
3632 cmdline
="--no-ccache "
3634 if [ "$ARG_ARM_EABI" = "1" ]; then
3635 cmdline
="$cmdline--eabi "
3637 if [ -n "$ARG_PREFIX" ]; then
3638 cmdline
="$cmdline--prefix=\$(PREFIX) "
3640 if [ -n "$ARG_LCDWIDTH" ]; then
3641 cmdline
="$cmdline--lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3644 cmdline
="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3649 -e "s<@ROOTDIR@<${rootdir}<g" \
3650 -e "s<@DEBUG@<${debug}<g" \
3651 -e "s<@MEMORY@<${memory}<g" \
3652 -e "s<@TARGET_ID@<${target_id}<g" \
3653 -e "s<@TARGET@<${target}<g" \
3654 -e "s<@CPU@<${t_cpu}<g" \
3655 -e "s<@MANUFACTURER@<${t_manufacturer}<g" \
3656 -e "s<@MODELNAME@<${modelname}<g" \
3657 -e "s<@LANGUAGE@<${language}<g" \
3658 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3659 -e "s<@PWD@<${pwd}<g" \
3660 -e "s<@HOSTCC@<${HOSTCC}<g" \
3661 -e "s<@HOSTAR@<${HOSTAR}<g" \
3662 -e "s<@CC@<${CC}<g" \
3663 -e "s<@LD@<${LD}<g" \
3664 -e "s<@AR@<${AR}<g" \
3665 -e "s<@AS@<${AS}<g" \
3666 -e "s<@OC@<${OC}<g" \
3667 -e "s<@WINDRES@<${WINDRES}<g" \
3668 -e "s<@DLLTOOL@<${DLLTOOL}<g" \
3669 -e "s<@DLLWRAP@<${DLLWRAP}<g" \
3670 -e "s<@RANLIB@<${RANLIB}<g" \
3671 -e "s<@TOOL@<${tool}<g" \
3672 -e "s<@BMP2RB_NATIVE@<${bmp2rb_native}<g" \
3673 -e "s<@BMP2RB_MONO@<${bmp2rb_mono}<g" \
3674 -e "s<@BMP2RB_REMOTENATIVE@<${bmp2rb_remotenative}<g" \
3675 -e "s<@BMP2RB_REMOTEMONO@<${bmp2rb_remotemono}<g" \
3676 -e "s<@OUTPUT@<${output}<g" \
3677 -e "s<@APPEXTRA@<${appextra}<g" \
3678 -e "s<@ARCHOSROM@<${archosrom}<g" \
3679 -e "s<@FLASHFILE@<${flash}<g" \
3680 -e "s<@PLUGINS@<${plugins}<g" \
3681 -e "s<@CODECS@<${swcodec}<g" \
3682 -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \
3683 -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \
3684 -e "s<@GCCOPTS@<${GCCOPTS}<g" \
3685 -e "s<@TARGET_INC@<${TARGET_INC}<g" \
3686 -e "s<@LDOPTS@<${LDOPTS}<g" \
3687 -e "s<@GLOBAL_LDOPTS@<${GLOBAL_LDOPTS}<g" \
3688 -e "s<@LOADADDRESS@<${loadaddress}<g" \
3689 -e "s<@EXTRADEF@<${extradefines}<g" \
3690 -e "s<@APPSDIR@<${appsdir}<g" \
3691 -e "s<@FIRMDIR@<${firmdir}<g" \
3692 -e "s<@TOOLSDIR@<${toolsdir}<g" \
3693 -e "s<@APPS@<${apps}<g" \
3694 -e "s<@APP_TYPE@<${app_type}<g" \
3695 -e "s<@APPLICATION@<${application}<g" \
3696 -e "s<@GCCVER@<${gccver}<g" \
3697 -e "s<@GCCNUM@<${gccnum}<g" \
3698 -e "s<@UNAME@<${uname}<g" \
3699 -e "s<@ENDIAN@<${defendian}<g" \
3700 -e "s<@TOOLSET@<${toolset}<g" \
3703 -e "s<@MANUALDEV@<${manualdev}<g" \
3704 -e "s<@ENCODER@<${ENC_CMD}<g" \
3705 -e "s<@ENC_OPTS@<${ENC_OPTS}<g" \
3706 -e "s<@TTS_ENGINE@<${TTS_ENGINE}<g" \
3707 -e "s<@TTS_OPTS@<${TTS_OPTS}<g" \
3708 -e "s<@VOICETOOLSET@<${voicetoolset}<g" \
3709 -e "s<@LANGS@<${buildlangs}<g" \
3710 -e "s<@USE_ELF@<${USE_ELF}<g" \
3711 -e "s<@RBDIR@<${rbdir}<g" \
3712 -e "s<@sharepath@<${sharedir}<g" \
3713 -e "s<@binpath@<${bindir}<g" \
3714 -e "s<@libpath@<${libdir}<g" \
3715 -e "s<@PREFIX@<$ARG_PREFIX<g" \
3716 -e "s<@CMDLINE@<$cmdline<g" \
3717 -e "s<@SDLCONFIG@<$sdl<g" \
3719 ## Automatically generated. http://www.rockbox.org/
3721 export ROOTDIR=@ROOTDIR@
3722 export FIRMDIR=@FIRMDIR@
3723 export APPSDIR=@APPSDIR@
3724 export TOOLSDIR=@TOOLSDIR@
3725 export DOCSDIR=\$(ROOTDIR)/docs
3726 export MANUALDIR=\${ROOTDIR}/manual
3727 export DEBUG=@DEBUG@
3728 export MODELNAME=@MODELNAME@
3729 export ARCHOSROM=@ARCHOSROM@
3730 export FLASHFILE=@FLASHFILE@
3731 export TARGET_ID=@TARGET_ID@
3732 export TARGET=@TARGET@
3734 export MANUFACTURER=@MANUFACTURER@
3736 export BUILDDIR=@PWD@
3737 export LANGUAGE=@LANGUAGE@
3738 export VOICELANGUAGE=@VOICELANGUAGE@
3739 export MEMORYSIZE=@MEMORY@
3740 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3741 export MKFIRMWARE=@TOOL@
3742 export BMP2RB_MONO=@BMP2RB_MONO@
3743 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3744 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3745 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3746 export BINARY=@OUTPUT@
3747 export APPEXTRA=@APPEXTRA@
3748 export ENABLEDPLUGINS=@PLUGINS@
3749 export SOFTWARECODECS=@CODECS@
3750 export EXTRA_DEFINES=@EXTRADEF@
3751 export HOSTCC=@HOSTCC@
3752 export HOSTAR=@HOSTAR@
3758 export WINDRES=@WINDRES@
3759 export DLLTOOL=@DLLTOOL@
3760 export DLLWRAP=@DLLWRAP@
3761 export RANLIB=@RANLIB@
3762 export PREFIX=@PREFIX@
3763 export PROFILE_OPTS=@PROFILE_OPTS@
3764 export APP_TYPE=@APP_TYPE@
3765 export APPLICATION=@APPLICATION@
3766 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3767 export GCCOPTS=@GCCOPTS@
3768 export TARGET_INC=@TARGET_INC@
3769 export LOADADDRESS=@LOADADDRESS@
3770 export SHARED_FLAG=@SHARED_FLAG@
3771 export LDOPTS=@LDOPTS@
3772 export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@
3773 export GCCVER=@GCCVER@
3774 export GCCNUM=@GCCNUM@
3775 export UNAME=@UNAME@
3776 export MANUALDEV=@MANUALDEV@
3777 export TTS_OPTS=@TTS_OPTS@
3778 export TTS_ENGINE=@TTS_ENGINE@
3779 export ENC_OPTS=@ENC_OPTS@
3780 export ENCODER=@ENCODER@
3781 export USE_ELF=@USE_ELF@
3782 export RBDIR=@RBDIR@
3783 export ROCKBOX_SHARE_PATH=@sharepath@
3784 export ROCKBOX_BINARY_PATH=@binpath@
3785 export ROCKBOX_LIBRARY_PATH=@libpath@
3786 export SDLCONFIG=@SDLCONFIG@
3788 CONFIGURE_OPTIONS=@CMDLINE@
3790 include \$(TOOLSDIR)/root.make
3794 echo "Created Makefile"