3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 # global CC options for all platforms
11 CCOPTS
="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
13 # global LD options for all platforms
17 use_logf
="#undef ROCKBOX_HAS_LOGF"
18 use_bootchart
="#undef DO_BOOTCHART"
20 scriptver
=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
27 thread_support
="ASSEMBLER_THREADS"
32 # Properly retain command line arguments containing spaces
36 *\
*) cmdline
="$cmdline \"$arg\"";;
37 *) cmdline
="$cmdline $arg";;
42 # Begin Function Definitions
53 WINDRES
=${prefix}windres
54 DLLTOOL
=${prefix}dlltool
55 DLLWRAP
=${prefix}dllwrap
56 RANLIB
=${prefix}ranlib
64 # setup files and paths depending on the platform
65 if [ -z "$ARG_PREFIX" ]; then
66 sharedir
="/usr/local/share/rockbox"
67 bindir
="/usr/local/bin"
68 libdir
="/usr/local/lib"
70 if [ -d "$ARG_PREFIX" ]; then
71 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
72 ARG_PREFIX
=`realpath $ARG_PREFIX`
73 if [ "0" != "$?" ]; then
74 echo "ERROR: Could not get prefix path (is realpath installed?)."
78 sharedir
="$ARG_PREFIX/share/rockbox"
79 bindir
="$ARG_PREFIX/bin"
80 libdir
="$ARG_PREFIX/lib"
82 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
88 # Set the application LCD size according to the following priorities:
89 # 1) If --lcdwidth and --lcdheight are set, use them
90 # 2) If a size is passed to the app_set_lcd_size() function, use that
91 # 3) Otherwise ask the user
93 if [ -z "$ARG_LCDWIDTH" ]; then
96 if [ -z "$ARG_LCDHEIGHT" ]; then
100 echo "Enter the LCD width (default: 320)"
101 if [ -z "$ARG_LCDWIDTH" ]; then
102 app_lcd_width
=`input`
104 app_lcd_width
="$ARG_LCDWIDTH"
106 if [ -z "$app_lcd_width" ]; then app_lcd_width
="320"; fi
107 echo "Enter the LCD height (default: 480)"
108 if [ -z "$ARG_LCDHEIGHT" ]; then
109 app_lcd_height
=`input`
111 app_lcd_height
="$ARG_LCDHEIGHT"
113 if [ -z "$app_lcd_height" ]; then app_lcd_height
="480"; fi
114 if [ $app_lcd_width -gt $app_lcd_height ]; then
115 lcd_orientation
="landscape"
117 lcd_orientation
="portrait"
119 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
120 ARG_LCDWIDTH
=$app_lcd_width
121 ARG_LCDHEIGHT
=$app_lcd_height
123 app_lcd_width
="#define LCD_WIDTH $app_lcd_width"
124 app_lcd_height
="#define LCD_HEIGHT $app_lcd_height"
128 if [ "$ARG_ARM_EABI" != "0" ]; then
129 prefixtools arm-elf-eabi-
137 # scan the $PATH for the given command
144 # echo "checks for $file in $path" >&2
145 if test -f "$path/$file"; then
150 # check whether caller wants literal return value if not found
151 if [ "$2" = "--lit" ]; then
156 # scan the $PATH for sdl-config - check whether for a (cross-)win32
159 # sdl-config might (not) be prefixed for cross compiles so try both.
160 files
="${CROSS_COMPILE}sdl-config:sdl-config"
168 #echo "checks for $file in $path" >&2
169 if test -f "$path/$file"; then
170 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
171 if [ "yes" = "${winbuild}" ]; then
176 if [ "yes" != "${winbuild}" ]; then
186 # check for availability of sigaltstack to support our thread engine
187 check_sigaltstack
() {
188 cat >$tmpdir/check_threads.c
<<EOF
190 int main(int argc, char **argv)
193 #define NULL (void*)0
195 sigaltstack(NULL, NULL);
199 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
1> /dev
/null
201 rm -rf $tmpdir/check_threads
*
205 # check for availability of Fiber on Win32 to support our thread engine
207 cat >$tmpdir/check_threads.c
<<EOF
209 int main(int argc, char **argv)
211 ConvertThreadToFiber(NULL);
215 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
2>/dev
/null
217 rm -rf $tmpdir/check_threads
*
223 # default tool setup for native building
224 prefixtools
"$CROSS_COMPILE"
225 ARG_ARM_THUMB
=0 # can't use thumb in native builds
229 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
231 GCCOPTS
="$GCCOPTS -fno-builtin -g"
233 LDOPTS
='-lm' # button-sdl.c uses sqrt()
236 endian
="" # endianess of the dap doesnt matter here
238 # default output binary name, don't override app_get_platform()
239 if [ "$app_type" != "sdl-app" ]; then
243 # default share option, override below if needed
244 SHARED_LDFLAG
="-shared"
245 SHARED_CFLAGS
="-fPIC -fvisibility=hidden"
247 if [ "$win32crosscompile" = "yes" ]; then
248 # We are crosscompiling
249 # add cross-compiler option(s)
250 LDOPTS
="$LDOPTS -mconsole"
253 CROSS_COMPILE
=${CROSS_COMPILE:-"i586-mingw32msvc-"}
255 prefixtools
"$CROSS_COMPILE"
257 endian
="little" # windows is little endian
258 echo "Enabling MMX support"
259 GCCOPTS
="$GCCOPTS -mmmx"
263 echo "Cygwin host detected"
266 LDOPTS
="$LDOPTS -mconsole"
273 echo "MinGW host detected"
276 LDOPTS
="$LDOPTS -mconsole"
282 sigaltstack
=`check_sigaltstack`
283 echo "Linux host detected"
284 LDOPTS
="$LDOPTS -ldl"
288 sigaltstack
=`check_sigaltstack`
289 echo "FreeBSD host detected"
290 LDOPTS
="$LDOPTS -ldl"
294 sigaltstack
=`check_sigaltstack`
295 echo "Darwin host detected"
296 LDOPTS
="$LDOPTS -ldl"
297 SHARED_LDFLAG
="-dynamiclib -Wl\,-single_module"
301 sigaltstack
=`check_sigaltstack`
302 echo "*Solaris host detected"
304 GCCOPTS
="$GCCOPTS -fPIC"
305 LDOPTS
="$LDOPTS -ldl"
309 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
315 if [ "$winbuild" != "yes" ]; then
316 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
317 if [ "`uname -m`" = "i686" ]; then
318 echo "Enabling MMX support"
319 GCCOPTS
="$GCCOPTS -mmmx"
323 sdl
=`findsdl $winbuild`
325 if [ -n `echo $app_type | grep "sdl"` ]; then
326 if [ -z "$sdl" ]; then
327 echo "configure didn't find sdl-config, which indicates that you"
328 echo "don't have SDL (properly) installed. Please correct and"
329 echo "re-run configure!"
332 # generic sdl-config checker
333 GCCOPTS
="$GCCOPTS `$sdl --cflags`"
334 LDOPTS
="$LDOPTS `$sdl --libs`"
339 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
340 # x86_64 supports MMX by default
342 if [ "$endian" = "" ]; then
344 cat >$tmpdir/conftest-
$id.c
<<EOF
346 int main(int argc, char **argv)
349 char *varp = (char *)&var;
356 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
357 # when cross compiling, the endianess cannot be detected because the above program doesn't run
358 # on the local machine. assume little endian but print a warning
359 endian
=`$tmpdir/conftest-$id 2> /dev/null`
360 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
369 if [ "$CROSS_COMPILE" != "" ]; then
370 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
373 if [ "$app_type" = "sdl-sim" ]; then
374 echo "Simulator environment deemed $endian endian"
375 elif [ "$app_type" = "sdl-app" ]; then
376 echo "Application environment deemed $endian endian"
377 elif [ "$app_type" = "checkwps" ]; then
378 echo "CheckWPS environment deemed $endian endian"
381 # use wildcard here to make it work even if it was named *.exe like
383 rm -f $tmpdir/conftest-
$id*
386 if [ -z "$ARG_THREAD_SUPPORT" ] ||
[ "$ARG_THREAD_SUPPORT" = "0" ]; then
387 if [ "$sigaltstack" = "0" ]; then
388 thread_support
="HAVE_SIGALTSTACK_THREADS"
389 LDOPTS
="$LDOPTS -lpthread" # pthread needed
390 echo "Selected sigaltstack threads"
391 elif [ "$fibers" = "0" ]; then
392 thread_support
="HAVE_WIN32_FIBER_THREADS"
393 echo "Selected Win32 Fiber threads"
397 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
398 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
399 thread_support
="HAVE_SDL_THREADS"
400 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
401 echo "Selected SDL threads"
403 echo "WARNING: Falling back to SDL threads"
409 # functions for setting up cross-compiler names and options
410 # also set endianess and what the exact recommended gcc version is
411 # the gcc version should most likely match what versions we build with
416 GCCOPTS
="$CCOPTS -m1"
417 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
423 prefixtools calmrisc16-unknown-elf-
424 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
425 GCCOPTIMIZE
="-fomit-frame-pointer"
430 prefixtools m68k-elf-
431 GCCOPTS
="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
432 GCCOPTIMIZE
="-fomit-frame-pointer"
439 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
440 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
441 GCCOPTS
="$GCCOPTS -mlong-calls"
443 GCCOPTIMIZE
="-fomit-frame-pointer"
449 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
450 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
451 GCCOPTS
="$GCCOPTS -mlong-calls"
453 GCCOPTIMIZE
="-fomit-frame-pointer"
459 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
460 if test "$ARG_ARM_EABI" = "0"; then
461 GCCOPTS
="$GCCOPTS -mlong-calls"
463 GCCOPTIMIZE
="-fomit-frame-pointer"
469 GCCOPTS
="$CCOPTS -mcpu=arm940t"
470 if test "$ARG_ARM_EABI" = "0"; then
471 GCCOPTS
="$GCCOPTS -mlong-calls"
473 GCCOPTIMIZE
="-fomit-frame-pointer"
479 GCCOPTS
="$CCOPTS -mcpu=arm9e"
480 if test "$ARG_ARM_EABI" = "0"; then
481 GCCOPTS
="$GCCOPTS -mlong-calls"
483 GCCOPTIMIZE
="-fomit-frame-pointer"
489 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
490 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
491 GCCOPTS
="$GCCOPTS -mlong-calls"
493 GCCOPTIMIZE
="-fomit-frame-pointer"
499 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
500 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
501 GCCOPTS
="$GCCOPTS -mlong-calls"
503 GCCOPTIMIZE
="-fomit-frame-pointer"
509 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
510 if test "$ARG_ARM_EABI" = "0"; then
511 GCCOPTS
="$GCCOPTS -mlong-calls"
513 GCCOPTIMIZE
="-fomit-frame-pointer"
519 GCCOPTS
="$CCOPTS -march=armv5te"
520 GCCOPTIMIZE
="-fomit-frame-pointer"
525 prefixtools mipsel-elf-
526 # mips is predefined, but we want it for paths. use __mips instead
527 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
528 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
529 GCCOPTIMIZE
="-fomit-frame-pointer"
535 # Scratchbox sets up "gcc" based on the active target
538 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
539 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
541 LDOPTS
="-lm -ldl $LDOPTS"
542 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
543 SHARED_LDFLAG
="-shared"
546 thread_support
="HAVE_SIGALTSTACK_THREADS"
549 # Determine maemo version
550 if pkg-config
--atleast-version=5 maemo-version
; then
551 if [ "$1" == "4" ]; then
552 echo "ERROR: Maemo 4 SDK required."
555 extradefines
="$extradefines -DMAEMO5"
556 echo "Found N900 maemo version"
558 elif pkg-config
--atleast-version=4 maemo-version
; then
559 if [ "$1" == "5" ]; then
560 echo "ERROR: Maemo 5 SDK required."
563 extradefines
="$extradefines -DMAEMO4"
564 echo "Found N8xx maemo version"
566 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
571 if [ $is_n900 -eq 1 ]; then
572 GCCOPTS
="$GCCOPTS `pkg-config --cflags sdl`"
573 LDOPTS
="$LDOPTS `pkg-config --libs sdl`"
575 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
576 LDOPTS
="$LDOPTS `sdl-config --libs`"
579 # glib and libosso support
580 GCCOPTS
="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
581 LDOPTS
="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
583 # libhal support: Battery monitoring
584 GCCOPTS
="$GCCOPTS `pkg-config --cflags hal`"
585 LDOPTS
="$LDOPTS `pkg-config --libs hal`"
587 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
588 if [ $is_n900 -eq 1 ]; then
589 # gstreamer support: Audio output.
590 GCCOPTS
="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
591 LDOPTS
="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
593 # N900 specific: libplayback support
594 GCCOPTS
="$GCCOPTS `pkg-config --cflags libplayback-1`"
595 LDOPTS
="$LDOPTS `pkg-config --libs libplayback-1`"
597 # N900 specific: Enable ARMv7 NEON support
598 if sb-conf show
-A |
grep -q -i arm
; then
599 echo "Detected ARM target"
600 GCCOPTS
="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
601 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
603 echo "Detected x86 target"
606 # N8xx specific: Enable armv5te instructions
607 if sb-conf show
-A |
grep -q -i arm
; then
608 echo "Detected ARM target"
609 GCCOPTS
="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
610 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
612 echo "Detected x86 target"
618 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
619 # You have to use the sebt3 toolchain:
620 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
622 PNDSDK
="/usr/local/angstrom/arm"
623 if [ ! -x $PNDSDK/bin
/arm-angstrom-linux-gnueabi-gcc
]; then
624 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
628 PATH
=$PNDSDK/bin
:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/bin
629 PKG_CONFIG_PATH
=$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/lib
/pkgconfig
630 LDOPTS
="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
631 PKG_CONFIG
="pkg-config"
633 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
634 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
636 LDOPTS
="-lm -ldl $LDOPTS"
637 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
638 SHARED_LDFLAG
="-shared"
641 thread_support
="HAVE_SIGALTSTACK_THREADS"
644 GCCOPTS
="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
648 prefixtools
"$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
651 GCCOPTS
="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
652 LDOPTS
="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
655 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
656 GCCOPTS
="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
657 GCCOPTS
="$GCCOPTS -ffast-math -fsingle-precision-constant"
662 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
664 LDOPTS
="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
665 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
666 SHARED_LDFLAG
="-shared"
669 thread_support
="HAVE_SIGALTSTACK_THREADS"
673 GCCOPTS
="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
677 prefixtools
"arm-ypr0-linux-gnueabi-"
681 if [ -z "$ANDROID_SDK_PATH" ]; then
682 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
683 echo "environment variable point to the root directory of the Android SDK."
686 if [ -z "$ANDROID_NDK_PATH" ]; then
687 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
688 echo "environment variable point to the root directory of the Android NDK."
691 buildhost
=$
(uname |
tr "[:upper:]" "[:lower:]")
693 gcctarget
="arm-linux-androideabi-"
694 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
695 PATH
=$PATH:$gccprefix/bin
696 prefixtools
$gcctarget
697 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
698 GCCOPTS
="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
699 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
700 GLOBAL_LDOPTS
="-Wl,-z,defs -Wl,-z,noexecstack"
701 LDOPTS
="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
703 SHARED_LDFLAG
="-shared"
707 atype
=`echo "$1" | cut -c 2-`
708 ##################################################################
709 # Prompt for specific developer options
711 if [ "$atype" ]; then
716 printf "Enter your developer options (press only enter when done)\n\
717 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
718 (T)est plugins, S(m)all C lib:"
719 if [ "$modelname" = "archosplayer" ]; then
720 printf ", Use (A)TA poweroff"
722 if [ "$t_model" = "ondio" ]; then
723 printf ", (B)acklight MOD"
725 if [ "$modelname" = "iaudiom5" ]; then
726 printf ", (F)M radio MOD"
728 if [ "$modelname" = "iriverh120" ]; then
735 while [ $cont = "1" ]; do
737 if [ "$interact" ]; then
740 option
=`echo "$atype" | cut -c 1`
745 if [ "yes" = "$profile" ]; then
746 echo "Debug is incompatible with profiling"
748 echo "DEBUG build enabled"
753 echo "logf() support enabled"
757 echo "Using Rockbox' small C library"
758 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
761 echo "Including test plugins"
762 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
765 echo "bootchart enabled (logf also enabled)"
770 echo "Simulator build enabled"
774 if [ "yes" = "$use_debug" ]; then
775 echo "Profiling is incompatible with debug"
777 echo "Profiling support is enabled"
782 echo "Voice build selected"
786 if [ "$modelname" = "archosplayer" ]; then
787 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
788 echo "ATA power off enabled"
792 if [ "$t_model" = "ondio" ]; then
793 have_backlight
="#define HAVE_BACKLIGHT"
794 echo "Backlight functions enabled"
798 if [ "$modelname" = "iaudiom5" ]; then
799 have_fmradio_in
="#define HAVE_FMRADIO_IN"
800 echo "FM radio functions enabled"
804 if [ "$modelname" = "iriverh120" ]; then
805 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
806 have_rtc_alarm
="#define HAVE_RTC_ALARM"
807 echo "RTC functions enabled (DS1339/DS3231)"
811 echo "Enabling Windows 32 cross-compiling"
812 win32crosscompile
="yes"
814 "") # Match enter press when finished with advanced options
818 echo "[ERROR] Option $option unsupported"
821 if [ "$interact" ]; then
822 btype
="$btype$option"
824 atype
=`echo "$atype" | cut -c 2-`
825 [ "$atype" ] || cont
=0
830 if [ "yes" = "$voice" ]; then
831 # Ask about languages to build
833 voicelanguage
=`whichlang`
834 echo "Voice language set to $voicelanguage"
836 # Configure encoder and TTS engine for each language
837 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
838 voiceconfig
"$thislang"
841 if [ "yes" = "$use_debug" ]; then
843 GCCOPTS
="$GCCOPTS -g -DDEBUG"
845 if [ "yes" = "$logf" ]; then
846 use_logf
="#define ROCKBOX_HAS_LOGF 1"
848 if [ "yes" = "$bootchart" ]; then
849 use_bootchart
="#define DO_BOOTCHART 1"
851 if [ "yes" = "$simulator" ]; then
853 extradefines
="$extradefines -DSIMULATOR"
857 if [ "yes" = "$profile" ]; then
858 extradefines
="$extradefines -DRB_PROFILE"
859 PROFILE_OPTS
="-finstrument-functions"
863 # Configure voice settings
866 if [ ! "$ARG_TTS" ]; then
867 echo "Building $thislang voice for $modelname. Select options"
871 if [ -n "`findtool flite`" ]; then
875 DEFAULT_TTS_OPTS
=$FLITE_OPTS
876 DEFAULT_NOISEFLOOR
="500"
879 if [ -n "`findtool espeak`" ]; then
883 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
884 DEFAULT_NOISEFLOOR
="500"
887 if [ -n "`findtool festival`" ]; then
888 FESTIVAL
="(F)estival "
891 FESTIVAL_OPTS
="--language italian"
894 FESTIVAL_OPTS
="--language spanish"
897 FESTIVAL_OPTS
="--language finnish"
900 FESTIVAL_OPTS
="--language czech"
906 DEFAULT_TTS
="festival"
907 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
908 DEFAULT_NOISEFLOOR
="500"
911 if [ -n "`findtool swift`" ]; then
915 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
916 DEFAULT_NOISEFLOOR
="500"
919 # Allow SAPI if Windows is in use
920 if [ -n "`findtool winver`" ]; then
924 DEFAULT_TTS_OPTS
=$SAPI_OPTS
925 DEFAULT_NOISEFLOOR
="500"
929 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
930 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
934 if [ "$ARG_TTS" ]; then
937 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
939 if [ -z "$option" ]; then option
=${DEFAULT_CHOICE}; fi
940 advopts
="$advopts --tts=$option"
945 NOISEFLOOR
="500" # TODO: check this value
951 TTS_OPTS
=$ESPEAK_OPTS
954 TTS_ENGINE
="festival"
956 TTS_OPTS
=$FESTIVAL_OPTS
969 TTS_ENGINE
=$DEFAULT_TTS
970 TTS_OPTS
=$DEFAULT_TTS_OPTS
971 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
973 echo "Using $TTS_ENGINE for TTS"
975 # Select which voice to use for Festival
976 if [ "$TTS_ENGINE" = "festival" ]; then
977 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
978 for voice
in $voicelist; do
979 TTS_FESTIVAL_VOICE
="$voice" # Default choice
982 if [ "$ARG_VOICE" ]; then
986 for voice
in $voicelist; do
987 printf "%3d. %s\n" "$i" "$voice"
990 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
994 for voice
in $voicelist; do
995 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
996 TTS_FESTIVAL_VOICE
="$voice"
1000 advopts
="$advopts --voice=$CHOICE"
1001 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1002 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1005 # Read custom tts options from command line
1006 if [ "$ARG_TTSOPTS" ]; then
1007 TTS_OPTS
="$ARG_TTSOPTS"
1008 echo "$TTS_ENGINE options set to $TTS_OPTS"
1011 if [ "$swcodec" = "yes" ]; then
1012 ENCODER
="rbspeexenc"
1013 ENC_OPTS
="-q 4 -c 10"
1015 if [ -n "`findtool lame`" ]; then
1017 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1019 echo "You need LAME in the system path to build voice files for"
1020 echo "HWCODEC targets."
1025 echo "Using $ENCODER for encoding voice clips"
1027 # Read custom encoder options from command line
1028 if [ "$ARG_ENCOPTS" ]; then
1029 ENC_OPTS
="$ARG_ENCOPTS"
1030 echo "$ENCODER options set to $ENC_OPTS"
1034 if [ -n "`findtool cygpath`" ]; then
1035 TEMPDIR
=`cygpath . -a -w`
1040 # figure out which languages that are around
1041 for file in $rootdir/apps
/lang
/*.lang
; do
1042 clean
=`basename $file .lang`
1043 langs
="$langs $clean"
1046 if [ "$ARG_LANG" ]; then
1049 echo "Select a number for the language to use (default is english)"
1050 # FIXME The multiple-language feature is currently broken
1051 # echo "You may enter a comma-separated list of languages to build"
1054 for one
in $langs; do
1059 advopts
="$advopts --language=$pick"
1065 # Allow the user to pass a comma-separated list of langauges
1066 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1068 for one
in $langs; do
1069 # Accept both the language number and name
1070 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1071 if [ "$output" = "" ]; then
1080 if [ -z "$output" ]; then
1088 echo "Rockbox configure script."
1089 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1090 echo "Do *NOT* run this within the tools directory!"
1093 Usage: configure [OPTION]...
1095 --target=TARGET Sets the target, TARGET can be either the target ID or
1096 corresponding string. Run without this option to see all
1099 --ram=RAM Sets the RAM for certain targets. Even though any number
1100 is accepted, not every number is correct. The default
1101 value will be applied, if you entered a wrong number
1102 (which depends on the target). Watch the output. Run
1103 without this option if you are not sure which the right
1106 --type=TYPE Sets the build type. Shortcuts are also valid.
1107 Run without this option to see all available types.
1108 Multiple values are allowed and managed in the input
1109 order. So --type=b stands for Bootloader build, while
1110 --type=ab stands for "Backlight MOD" build.
1112 --lcdwidth=X Sets the width of the LCD. Used only for application
1115 --lcdheight=Y Sets the height of the LCD. Used only for application
1118 --language=LANG Set the language used for voice generation (used only if
1121 --tts=ENGINE Set the TTS engine used for voice generation (used only
1124 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1127 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1129 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1131 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1132 This is useful for having multiple alternate builds on
1133 your device that you can load with ROLO. However as the
1134 bootloader looks for .rockbox you won't be able to boot
1137 --ccache Enable ccache use (done by default these days)
1138 --no-ccache Disable ccache use
1140 --eabi Make configure prefer toolchains that are able to compile
1141 for the new ARM standard abi EABI
1142 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1143 --thumb Build with -mthumb (for ARM builds)
1144 --no-thumb The opposite of --thumb (don't use thumb even for targets
1145 where this is the default
1146 --sdl-threads Force use of SDL threads. They have inferior performance,
1147 but are better debuggable with GDB
1148 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1149 behavior of falling back to them if no native thread
1151 --prefix Target installation directory
1152 --help Shows this message (must not be used with other options)
1171 ARG_PREFIX
="$PREFIX"
1176 --ccache) ARG_CCACHE
=1;;
1177 --no-ccache) ARG_CCACHE
=0;;
1178 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1179 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1180 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1181 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1182 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1183 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1184 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1185 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1186 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1187 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1188 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1189 --eabi) ARG_ARM_EABI
=1;;
1190 --no-eabi) ARG_ARM_EABI
=0;;
1191 --thumb) ARG_ARM_THUMB
=1;;
1192 --no-thumb) ARG_ARM_THUMB
=0;;
1193 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1195 ARG_THREAD_SUPPORT
=0;;
1196 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1198 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1201 [ "$err" ] && exit 1
1205 if [ "$TMPDIR" != "" ]; then
1210 echo Using temporary directory
$tmpdir
1212 if test -r "configure"; then
1213 # this is a check for a configure script in the current directory, it there
1214 # is one, try to figure out if it is this one!
1216 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1217 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1218 echo "It will only cause you pain and grief. Instead do this:"
1221 echo " mkdir build-dir"
1222 echo " cd build-dir"
1223 echo " ../tools/configure"
1225 echo "Much happiness will arise from this. Enjoy"
1230 # get our current directory
1233 if { echo $pwd |
grep " "; } then
1234 echo "You're running this script in a path that contains space. The build"
1235 echo "system is unfortunately not clever enough to deal with this. Please"
1236 echo "run the script from a different path, rename the path or fix the build"
1241 if [ -z "$rootdir" ]; then
1242 ##################################################################
1243 # Figure out where the source code root is!
1245 rootdir
=`dirname $0`/..
/
1247 #####################################################################
1248 # Convert the possibly relative directory name to an absolute version
1254 # cd back to the build dir
1259 appsdir
='$(ROOTDIR)/apps'
1260 toolsdir
='$(ROOTDIR)/tools'
1263 ##################################################################
1264 # Figure out target platform
1267 if [ "$ARG_TARGET" ]; then
1268 buildfor
=$ARG_TARGET
1270 echo "Enter target platform:"
1272 ==Archos== ==iriver== ==Apple iPod==
1273 0) Player/Studio 10) H120/H140 20) Color/Photo
1274 1) Recorder 11) H320/H340 21) Nano 1G
1275 2) FM Recorder 12) iHP-100/110/115 22) Video
1276 3) Recorder v2 13) iFP-790 23) 3G
1277 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1278 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1279 6) AV300 26) Mini 2G
1280 ==Toshiba== 27) 1G, 2G
1281 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1282 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1284 32) 7 ==Olympus= ==SanDisk==
1285 33) D2 70) M:Robe 500 50) Sansa e200
1286 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1288 ==Creative== ==Philips== 53) Sansa m200
1289 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1290 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1291 92) Zen Vision HDD1830 56) Sansa e200v2
1292 102) GoGear HDD6330 57) Sansa m200v4
1293 ==Onda== 58) Sansa Fuze
1294 120) VX747 ==Meizu== 59) Sansa c200v2
1295 121) VX767 110) M6SL 60) Sansa Clipv2
1296 122) VX747+ 111) M6SP 61) Sansa View
1297 123) VX777 112) M3 62) Sansa Clip+
1299 ==Samsung== ==Tatung== 64) Sansa Fuze+
1300 140) YH-820 150) Elio TPJ-1022 65) Sansa Clip Zip
1301 141) YH-920 66) Sansa Connect
1302 142) YH-925 ==Packard Bell==
1303 143) YP-S3 160) Vibe 500 ==Logik==
1305 ==Application== ==MPIO==
1306 200) SDL 170) HD200 ==Lyre project==
1307 201) Android 171) HD300 130) Lyre proto 1
1308 202) Nokia N8xx 131) Mini2440
1309 203) Nokia N900 ==ROCKCHIP== ==HiFiMAN==
1310 204) Pandora 180) rk27xx generic 190) HM-60x
1311 205) Samsung YP-R0 191) HM-801
1318 # Set of tools built for all target platforms:
1319 toolset
="rdf2binary convbdf codepages"
1321 # Toolsets for some target families:
1322 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1323 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1324 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1325 ipodbitmaptools
="$toolset scramble bmp2rb"
1326 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1327 tccbitmaptools
="$toolset scramble bmp2rb"
1328 # generic is used by IFP, Meizu and Onda
1329 genericbitmaptools
="$toolset bmp2rb"
1330 # scramble is used by all other targets
1331 scramblebitmaptools
="$genericbitmaptools scramble"
1334 # ---- For each target ----
1337 # target_id: a unique number identifying this target, IS NOT the menu number.
1338 # Just use the currently highest number+1 when you add a new
1340 # modelname: short model name used all over to identify this target
1341 # memory: number of megabytes of RAM this target has. If the amount can
1342 # be selected by the size prompt, let memory be unset here
1343 # target: -Ddefine passed to the build commands to make the correct
1344 # config-*.h file get included etc
1345 # tool: the tool that takes a plain binary and converts that into a
1346 # working "firmware" file for your target
1347 # output: the final output file name
1348 # boottool: the tool that takes a plain binary and generates a bootloader
1349 # file for your target (or blank to use $tool)
1350 # bootoutput:the final output file name for the bootloader (or blank to use
1352 # appextra: passed to the APPEXTRA variable in the Makefiles.
1353 # TODO: add proper explanation
1354 # archosrom: used only for Archos targets that build a special flashable .ucl
1356 # flash: name of output for flashing, for targets where there's a special
1357 # file output for this.
1358 # plugins: set to 'yes' to build the plugins. Early development builds can
1359 # set this to no in the early stages to have an easier life for a
1361 # swcodec: set 'yes' on swcodec targets
1362 # toolset: lists what particular tools in the tools/ directory that this
1363 # target needs to have built prior to building Rockbox
1366 # *cc: sets up gcc and compiler options for your target builds. Note
1367 # that if you select a simulator build, the compiler selection is
1368 # overridden later in the script.
1374 modelname
="archosplayer"
1375 target
="ARCHOS_PLAYER"
1377 tool
="$rootdir/tools/scramble"
1379 appextra
="player:gui"
1380 archosrom
="$pwd/rombox.ucl"
1381 flash
="$pwd/rockbox.ucl"
1385 # toolset is the tools within the tools directory that we build for
1386 # this particular target.
1387 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1389 # Note: the convbdf is present in the toolset just because: 1) the
1390 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1391 # build the player simulator
1394 t_manufacturer
="archos"
1400 modelname
="archosrecorder"
1401 target
="ARCHOS_RECORDER"
1403 tool
="$rootdir/tools/scramble"
1404 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1405 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1407 appextra
="recorder:gui:radio"
1408 #archosrom="$pwd/rombox.ucl"
1409 flash
="$pwd/rockbox.ucl"
1412 # toolset is the tools within the tools directory that we build for
1413 # this particular target.
1414 toolset
=$archosbitmaptools
1416 t_manufacturer
="archos"
1422 modelname
="archosfmrecorder"
1423 target
="ARCHOS_FMRECORDER"
1425 tool
="$rootdir/tools/scramble -fm"
1426 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1427 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1429 appextra
="recorder:gui:radio"
1430 #archosrom="$pwd/rombox.ucl"
1431 flash
="$pwd/rockbox.ucl"
1434 # toolset is the tools within the tools directory that we build for
1435 # this particular target.
1436 toolset
=$archosbitmaptools
1438 t_manufacturer
="archos"
1444 modelname
="archosrecorderv2"
1445 target
="ARCHOS_RECORDERV2"
1447 tool
="$rootdir/tools/scramble -v2"
1448 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1449 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1451 appextra
="recorder:gui:radio"
1452 #archosrom="$pwd/rombox.ucl"
1453 flash
="$pwd/rockbox.ucl"
1456 # toolset is the tools within the tools directory that we build for
1457 # this particular target.
1458 toolset
=$archosbitmaptools
1460 t_manufacturer
="archos"
1466 modelname
="archosondiosp"
1467 target
="ARCHOS_ONDIOSP"
1469 tool
="$rootdir/tools/scramble -osp"
1470 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1471 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1473 appextra
="recorder:gui:radio"
1474 #archosrom="$pwd/rombox.ucl"
1475 flash
="$pwd/rockbox.ucl"
1478 # toolset is the tools within the tools directory that we build for
1479 # this particular target.
1480 toolset
=$archosbitmaptools
1482 t_manufacturer
="archos"
1488 modelname
="archosondiofm"
1489 target
="ARCHOS_ONDIOFM"
1491 tool
="$rootdir/tools/scramble -ofm"
1492 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1493 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1495 appextra
="recorder:gui:radio"
1496 #archosrom="$pwd/rombox.ucl"
1497 flash
="$pwd/rockbox.ucl"
1500 toolset
=$archosbitmaptools
1502 t_manufacturer
="archos"
1508 modelname
="archosav300"
1509 target
="ARCHOS_AV300"
1512 tool
="$rootdir/tools/scramble -mm=C"
1513 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1514 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1516 appextra
="recorder:gui:radio"
1519 # toolset is the tools within the tools directory that we build for
1520 # this particular target.
1521 toolset
="$toolset scramble descramble bmp2rb"
1522 # architecture, manufacturer and model for the target-tree build
1524 t_manufacturer
="archos"
1530 modelname
="iriverh120"
1531 target
="IRIVER_H120"
1534 tool
="$rootdir/tools/scramble -add=h120"
1535 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1536 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1537 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1538 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1539 output
="rockbox.iriver"
1540 bootoutput
="bootloader.iriver"
1541 appextra
="recorder:gui:radio"
1542 flash
="$pwd/rombox.iriver"
1545 # toolset is the tools within the tools directory that we build for
1546 # this particular target.
1547 toolset
=$iriverbitmaptools
1549 t_manufacturer
="iriver"
1555 modelname
="iriverh300"
1556 target
="IRIVER_H300"
1559 tool
="$rootdir/tools/scramble -add=h300"
1560 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1561 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1562 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1563 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1564 output
="rockbox.iriver"
1565 appextra
="recorder:gui:radio"
1568 # toolset is the tools within the tools directory that we build for
1569 # this particular target.
1570 toolset
=$iriverbitmaptools
1572 t_manufacturer
="iriver"
1578 modelname
="iriverh100"
1579 target
="IRIVER_H100"
1582 tool
="$rootdir/tools/scramble -add=h100"
1583 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1584 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1585 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1586 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1587 output
="rockbox.iriver"
1588 bootoutput
="bootloader.iriver"
1589 appextra
="recorder:gui:radio"
1590 flash
="$pwd/rombox.iriver"
1593 # toolset is the tools within the tools directory that we build for
1594 # this particular target.
1595 toolset
=$iriverbitmaptools
1597 t_manufacturer
="iriver"
1603 modelname
="iriverifp7xx"
1604 target
="IRIVER_IFP7XX"
1608 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1609 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1610 output
="rockbox.wma"
1611 appextra
="recorder:gui:radio"
1614 # toolset is the tools within the tools directory that we build for
1615 # this particular target.
1616 toolset
=$genericbitmaptools
1618 t_manufacturer
="pnx0101"
1619 t_model
="iriver-ifp7xx"
1624 modelname
="iriverh10"
1628 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1629 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1630 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1631 output
="rockbox.mi4"
1632 appextra
="recorder:gui:radio"
1635 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1636 bootoutput
="H10_20GC.mi4"
1637 # toolset is the tools within the tools directory that we build for
1638 # this particular target.
1639 toolset
=$scramblebitmaptools
1640 # architecture, manufacturer and model for the target-tree build
1643 t_manufacturer
="iriver"
1649 modelname
="iriverh10_5gb"
1650 target
="IRIVER_H10_5GB"
1653 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1654 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1655 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1656 output
="rockbox.mi4"
1657 appextra
="recorder:gui:radio"
1660 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1661 bootoutput
="H10.mi4"
1662 # toolset is the tools within the tools directory that we build for
1663 # this particular target.
1664 toolset
=$scramblebitmaptools
1665 # architecture, manufacturer and model for the target-tree build
1668 t_manufacturer
="iriver"
1674 modelname
="ipodcolor"
1678 tool
="$rootdir/tools/scramble -add=ipco"
1679 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1680 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1681 output
="rockbox.ipod"
1682 appextra
="recorder:gui:radio"
1685 bootoutput
="bootloader-$modelname.ipod"
1686 # toolset is the tools within the tools directory that we build for
1687 # this particular target.
1688 toolset
=$ipodbitmaptools
1689 # architecture, manufacturer and model for the target-tree build
1692 t_manufacturer
="ipod"
1698 modelname
="ipodnano1g"
1702 tool
="$rootdir/tools/scramble -add=nano"
1703 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1704 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1705 output
="rockbox.ipod"
1706 appextra
="recorder:gui:radio"
1709 bootoutput
="bootloader-$modelname.ipod"
1710 # toolset is the tools within the tools directory that we build for
1711 # this particular target.
1712 toolset
=$ipodbitmaptools
1713 # architecture, manufacturer and model for the target-tree build
1716 t_manufacturer
="ipod"
1722 modelname
="ipodvideo"
1724 memory
=64 # always. This is reduced at runtime if needed
1726 tool
="$rootdir/tools/scramble -add=ipvd"
1727 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1728 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1729 output
="rockbox.ipod"
1730 appextra
="recorder:gui:radio"
1733 bootoutput
="bootloader-$modelname.ipod"
1734 # toolset is the tools within the tools directory that we build for
1735 # this particular target.
1736 toolset
=$ipodbitmaptools
1737 # architecture, manufacturer and model for the target-tree build
1740 t_manufacturer
="ipod"
1750 tool
="$rootdir/tools/scramble -add=ip3g"
1751 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1752 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1753 output
="rockbox.ipod"
1754 appextra
="recorder:gui:radio"
1757 bootoutput
="bootloader-$modelname.ipod"
1758 # toolset is the tools within the tools directory that we build for
1759 # this particular target.
1760 toolset
=$ipodbitmaptools
1761 # architecture, manufacturer and model for the target-tree build
1764 t_manufacturer
="ipod"
1774 tool
="$rootdir/tools/scramble -add=ip4g"
1775 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1776 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1777 output
="rockbox.ipod"
1778 appextra
="recorder:gui:radio"
1781 bootoutput
="bootloader-$modelname.ipod"
1782 # toolset is the tools within the tools directory that we build for
1783 # this particular target.
1784 toolset
=$ipodbitmaptools
1785 # architecture, manufacturer and model for the target-tree build
1788 t_manufacturer
="ipod"
1794 modelname
="ipodmini1g"
1798 tool
="$rootdir/tools/scramble -add=mini"
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
1812 t_manufacturer
="ipod"
1818 modelname
="ipodmini2g"
1819 target
="IPOD_MINI2G"
1822 tool
="$rootdir/tools/scramble -add=mn2g"
1823 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1824 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1825 output
="rockbox.ipod"
1826 appextra
="recorder:gui:radio"
1829 bootoutput
="bootloader-$modelname.ipod"
1830 # toolset is the tools within the tools directory that we build for
1831 # this particular target.
1832 toolset
=$ipodbitmaptools
1833 # architecture, manufacturer and model for the target-tree build
1836 t_manufacturer
="ipod"
1842 modelname
="ipod1g2g"
1846 tool
="$rootdir/tools/scramble -add=1g2g"
1847 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1848 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1849 output
="rockbox.ipod"
1850 appextra
="recorder:gui:radio"
1853 bootoutput
="bootloader-$modelname.ipod"
1854 # toolset is the tools within the tools directory that we build for
1855 # this particular target.
1856 toolset
=$ipodbitmaptools
1857 # architecture, manufacturer and model for the target-tree build
1860 t_manufacturer
="ipod"
1866 modelname
="ipodnano2g"
1867 target
="IPOD_NANO2G"
1870 tool
="$rootdir/tools/scramble -add=nn2g"
1871 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1872 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1873 output
="rockbox.ipod"
1874 appextra
="recorder:gui:radio"
1877 bootoutput
="bootloader-$modelname.ipod"
1878 # toolset is the tools within the tools directory that we build for
1879 # this particular target.
1880 toolset
=$ipodbitmaptools
1881 # architecture, manufacturer and model for the target-tree build
1883 t_manufacturer
="s5l8700"
1884 t_model
="ipodnano2g"
1893 tool
="$rootdir/tools/scramble -add=ip6g"
1894 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1895 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1896 output
="rockbox.ipod"
1897 appextra
="recorder:gui:radio"
1900 bootoutput
="bootloader-$modelname.ipod"
1901 # toolset is the tools within the tools directory that we build for
1902 # this particular target.
1903 toolset
=$ipodbitmaptools
1904 # architecture, manufacturer and model for the target-tree build
1906 t_manufacturer
="s5l8702"
1912 modelname
="iaudiox5"
1916 tool
="$rootdir/tools/scramble -add=iax5"
1917 boottool
="$rootdir/tools/scramble -iaudiox5"
1918 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1919 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1920 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1921 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1922 output
="rockbox.iaudio"
1923 bootoutput
="x5_fw.bin"
1924 appextra
="recorder:gui:radio"
1927 # toolset is the tools within the tools directory that we build for
1928 # this particular target.
1929 toolset
="$iaudiobitmaptools"
1930 # architecture, manufacturer and model for the target-tree build
1932 t_manufacturer
="iaudio"
1938 modelname
="iaudiom5"
1942 tool
="$rootdir/tools/scramble -add=iam5"
1943 boottool
="$rootdir/tools/scramble -iaudiom5"
1944 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1945 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1946 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1947 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1948 output
="rockbox.iaudio"
1949 bootoutput
="m5_fw.bin"
1950 appextra
="recorder:gui:radio"
1953 # toolset is the tools within the tools directory that we build for
1954 # this particular target.
1955 toolset
="$iaudiobitmaptools"
1956 # architecture, manufacturer and model for the target-tree build
1958 t_manufacturer
="iaudio"
1968 tool
="$rootdir/tools/scramble -add=i7"
1969 boottool
="$rootdir/tools/scramble -tcc=crc"
1970 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1971 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1972 output
="rockbox.iaudio"
1973 appextra
="recorder:gui:radio"
1976 bootoutput
="I7_FW.BIN"
1977 # toolset is the tools within the tools directory that we build for
1978 # this particular target.
1979 toolset
="$tccbitmaptools"
1980 # architecture, manufacturer and model for the target-tree build
1982 t_manufacturer
="tcc77x"
1992 tool
="$rootdir/tools/scramble -add=d2"
1994 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1995 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1997 bootoutput
="bootloader-cowond2.bin"
1998 appextra
="recorder:gui:radio"
2001 toolset
="$tccbitmaptools"
2002 # architecture, manufacturer and model for the target-tree build
2004 t_manufacturer
="tcc780x"
2010 modelname
="iaudiom3"
2014 tool
="$rootdir/tools/scramble -add=iam3"
2015 boottool
="$rootdir/tools/scramble -iaudiom3"
2016 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2017 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2018 output
="rockbox.iaudio"
2019 bootoutput
="cowon_m3.bin"
2020 appextra
="recorder:gui:radio"
2023 # toolset is the tools within the tools directory that we build for
2024 # this particular target.
2025 toolset
="$iaudiobitmaptools"
2026 # architecture, manufacturer and model for the target-tree build
2028 t_manufacturer
="iaudio"
2034 modelname
="gigabeatfx"
2038 tool
="$rootdir/tools/scramble -add=giga"
2039 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2040 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2041 output
="rockbox.gigabeat"
2042 appextra
="recorder:gui:radio"
2045 toolset
=$gigabeatbitmaptools
2046 boottool
="$rootdir/tools/scramble -gigabeat"
2047 bootoutput
="FWIMG01.DAT"
2048 # architecture, manufacturer and model for the target-tree build
2050 t_manufacturer
="s3c2440"
2051 t_model
="gigabeat-fx"
2056 modelname
="gigabeats"
2060 tool
="$rootdir/tools/scramble -add=gigs"
2061 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2062 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2063 output
="rockbox.gigabeat"
2064 appextra
="recorder:gui:radio"
2067 toolset
="$gigabeatbitmaptools"
2068 boottool
="$rootdir/tools/scramble -gigabeats"
2070 # architecture, manufacturer and model for the target-tree build
2072 t_manufacturer
="imx31"
2073 t_model
="gigabeat-s"
2078 modelname
="mrobe500"
2082 tool
="$rootdir/tools/scramble -add=m500"
2083 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2084 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2085 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2086 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2087 output
="rockbox.mrobe500"
2088 appextra
="recorder:gui:radio"
2091 toolset
=$gigabeatbitmaptools
2093 bootoutput
="rockbox.mrboot"
2094 # architecture, manufacturer and model for the target-tree build
2096 t_manufacturer
="tms320dm320"
2102 modelname
="mrobe100"
2106 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2107 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2108 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2109 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2110 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2111 output
="rockbox.mi4"
2112 appextra
="recorder:gui:radio"
2115 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2116 bootoutput
="pp5020.mi4"
2117 # toolset is the tools within the tools directory that we build for
2118 # this particular target.
2119 toolset
=$scramblebitmaptools
2120 # architecture, manufacturer and model for the target-tree build
2123 t_manufacturer
="olympus"
2129 modelname
="logikdax"
2133 tool
="$rootdir/tools/scramble -add=ldax"
2134 boottool
="$rootdir/tools/scramble -tcc=crc"
2135 bootoutput
="player.rom"
2136 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2137 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2138 output
="rockbox.logik"
2139 appextra
="recorder:gui:radio"
2142 # toolset is the tools within the tools directory that we build for
2143 # this particular target.
2144 toolset
=$tccbitmaptools
2145 # architecture, manufacturer and model for the target-tree build
2147 t_manufacturer
="tcc77x"
2153 modelname
="zenvisionm30gb"
2154 target
="CREATIVE_ZVM"
2157 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2158 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2159 tool
="$rootdir/tools/scramble -creative=zvm"
2161 output
="rockbox.zvm"
2162 appextra
="recorder:gui:radio"
2165 toolset
=$ipodbitmaptools
2166 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2167 bootoutput
="rockbox.zvmboot"
2168 # architecture, manufacturer and model for the target-tree build
2170 t_manufacturer
="tms320dm320"
2171 t_model
="creative-zvm"
2176 modelname
="zenvisionm60gb"
2177 target
="CREATIVE_ZVM60GB"
2180 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2181 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2182 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2184 output
="rockbox.zvm60"
2185 appextra
="recorder:gui:radio"
2188 toolset
=$ipodbitmaptools
2189 boottool
="$rootdir/tools/scramble -creative=zvm60"
2190 bootoutput
="rockbox.zvm60boot"
2191 # architecture, manufacturer and model for the target-tree build
2193 t_manufacturer
="tms320dm320"
2194 t_model
="creative-zvm"
2199 modelname
="zenvision"
2200 target
="CREATIVE_ZV"
2203 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2204 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2205 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2208 appextra
="recorder:gui:radio"
2211 toolset
=$ipodbitmaptools
2212 boottool
="$rootdir/tools/scramble -creative=zenvision"
2213 bootoutput
="rockbox.zvboot"
2214 # architecture, manufacturer and model for the target-tree build
2216 t_manufacturer
="tms320dm320"
2217 t_model
="creative-zvm"
2222 modelname
="sansae200"
2224 memory
=32 # supposedly
2226 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2227 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2228 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2229 output
="rockbox.mi4"
2230 appextra
="recorder:gui:radio"
2233 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2234 bootoutput
="PP5022.mi4"
2235 # toolset is the tools within the tools directory that we build for
2236 # this particular target.
2237 toolset
=$scramblebitmaptools
2238 # architecture, manufacturer and model for the target-tree build
2241 t_manufacturer
="sandisk"
2242 t_model
="sansa-e200"
2246 # the e200R model is pretty much identical to the e200, it only has a
2247 # different option to the scramble tool when building a bootloader and
2248 # makes the bootloader output file name in all lower case.
2250 modelname
="sansae200r"
2252 memory
=32 # supposedly
2254 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2255 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2256 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2257 output
="rockbox.mi4"
2258 appextra
="recorder:gui:radio"
2261 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2262 bootoutput
="pp5022.mi4"
2263 # toolset is the tools within the tools directory that we build for
2264 # this particular target.
2265 toolset
=$scramblebitmaptools
2266 # architecture, manufacturer and model for the target-tree build
2269 t_manufacturer
="sandisk"
2270 t_model
="sansa-e200"
2275 modelname
="sansac200"
2277 memory
=32 # supposedly
2279 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2280 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2281 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2282 output
="rockbox.mi4"
2283 appextra
="recorder:gui:radio"
2286 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2287 bootoutput
="firmware.mi4"
2288 # toolset is the tools within the tools directory that we build for
2289 # this particular target.
2290 toolset
=$scramblebitmaptools
2291 # architecture, manufacturer and model for the target-tree build
2294 t_manufacturer
="sandisk"
2295 t_model
="sansa-c200"
2300 modelname
="sansam200"
2304 tool
="$rootdir/tools/scramble -add=m200"
2305 boottool
="$rootdir/tools/scramble -tcc=crc"
2306 bootoutput
="player.rom"
2307 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2308 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2309 output
="rockbox.m200"
2310 appextra
="recorder:gui:radio"
2313 # toolset is the tools within the tools directory that we build for
2314 # this particular target.
2315 toolset
=$tccbitmaptools
2316 # architecture, manufacturer and model for the target-tree build
2318 t_manufacturer
="tcc77x"
2324 modelname
="sansac100"
2328 tool
="$rootdir/tools/scramble -add=c100"
2329 boottool
="$rootdir/tools/scramble -tcc=crc"
2330 bootoutput
="player.rom"
2331 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2332 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2333 output
="rockbox.c100"
2334 appextra
="recorder:gui:radio"
2337 # toolset is the tools within the tools directory that we build for
2338 # this particular target.
2339 toolset
=$tccbitmaptools
2340 # architecture, manufacturer and model for the target-tree build
2342 t_manufacturer
="tcc77x"
2348 modelname
="sansaclip"
2351 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2352 bmp2rb_native
="$bmp2rb_mono"
2353 tool
="$rootdir/tools/scramble -add=clip"
2354 output
="rockbox.sansa"
2355 bootoutput
="bootloader-clip.sansa"
2356 appextra
="recorder:gui:radio"
2359 toolset
=$scramblebitmaptools
2361 t_manufacturer
="as3525"
2362 t_model
="sansa-clip"
2363 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2365 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2371 modelname
="sansae200v2"
2372 target
="SANSA_E200V2"
2374 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2375 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2376 tool
="$rootdir/tools/scramble -add=e2v2"
2377 output
="rockbox.sansa"
2378 bootoutput
="bootloader-e200v2.sansa"
2379 appextra
="recorder:gui:radio"
2382 toolset
=$scramblebitmaptools
2384 t_manufacturer
="as3525"
2385 t_model
="sansa-e200v2"
2392 modelname
="sansam200v4"
2393 target
="SANSA_M200V4"
2395 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2396 bmp2rb_native
="$bmp2rb_mono"
2397 tool
="$rootdir/tools/scramble -add=m2v4"
2398 output
="rockbox.sansa"
2399 bootoutput
="bootloader-m200v4.sansa"
2400 appextra
="recorder:gui:radio"
2403 toolset
=$scramblebitmaptools
2405 t_manufacturer
="as3525"
2406 t_model
="sansa-m200v4"
2407 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2409 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2415 modelname
="sansafuze"
2418 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2419 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2420 tool
="$rootdir/tools/scramble -add=fuze"
2421 output
="rockbox.sansa"
2422 bootoutput
="bootloader-fuze.sansa"
2423 appextra
="recorder:gui:radio"
2426 toolset
=$scramblebitmaptools
2428 t_manufacturer
="as3525"
2429 t_model
="sansa-fuze"
2436 modelname
="sansac200v2"
2437 target
="SANSA_C200V2"
2438 memory
=2 # as per OF diagnosis mode
2439 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2440 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2441 tool
="$rootdir/tools/scramble -add=c2v2"
2442 output
="rockbox.sansa"
2443 bootoutput
="bootloader-c200v2.sansa"
2444 appextra
="recorder:gui:radio"
2447 # toolset is the tools within the tools directory that we build for
2448 # this particular target.
2449 toolset
=$scramblebitmaptools
2450 # architecture, manufacturer and model for the target-tree build
2452 t_manufacturer
="as3525"
2453 t_model
="sansa-c200v2"
2454 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2456 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2461 modelname
="sansaclipv2"
2462 target
="SANSA_CLIPV2"
2464 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2465 bmp2rb_native
="$bmp2rb_mono"
2466 tool
="$rootdir/tools/scramble -add=clv2"
2467 output
="rockbox.sansa"
2468 bootoutput
="bootloader-clipv2.sansa"
2469 appextra
="recorder:gui:radio"
2472 toolset
=$scramblebitmaptools
2474 t_manufacturer
="as3525"
2475 t_model
="sansa-clipv2"
2480 echo "Sansa View is not yet supported!"
2483 modelname
="sansaview"
2487 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2488 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2489 output
="rockbox.mi4"
2493 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2494 bootoutput
="firmware.mi4"
2495 # toolset is the tools within the tools directory that we build for
2496 # this particular target.
2497 toolset
=$scramblebitmaptools
2500 t_manufacturer
="sandisk"
2501 t_model
="sansa-view"
2506 modelname
="sansaclipplus"
2507 target
="SANSA_CLIPPLUS"
2509 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2510 bmp2rb_native
="$bmp2rb_mono"
2511 tool
="$rootdir/tools/scramble -add=cli+"
2512 output
="rockbox.sansa"
2513 bootoutput
="bootloader-clipplus.sansa"
2514 appextra
="recorder:gui:radio"
2517 toolset
=$scramblebitmaptools
2519 t_manufacturer
="as3525"
2520 t_model
="sansa-clipplus"
2526 modelname
="sansafuzev2"
2527 target
="SANSA_FUZEV2"
2529 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2530 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2531 tool
="$rootdir/tools/scramble -add=fuz2"
2532 output
="rockbox.sansa"
2533 bootoutput
="bootloader-fuzev2.sansa"
2534 appextra
="recorder:gui:radio"
2537 toolset
=$scramblebitmaptools
2539 t_manufacturer
="as3525"
2540 t_model
="sansa-fuzev2"
2546 modelname
="sansafuzeplus"
2547 target
="SANSA_FUZEPLUS"
2549 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2550 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2551 tool
="$rootdir/tools/scramble -add=fuz+"
2552 output
="rockbox.sansa"
2553 bootoutput
="bootloader-fuzeplus.sansa"
2554 appextra
="gui:recorder:radio"
2557 toolset
=$scramblebitmaptools
2559 t_manufacturer
="imx233"
2560 t_model
="sansa-fuzeplus"
2566 modelname
="sansaclipzip"
2567 target
="SANSA_CLIPZIP"
2569 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2570 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2571 tool
="$rootdir/tools/scramble -add=clzp"
2572 output
="rockbox.sansa"
2573 bootoutput
="bootloader-clipzip.sansa"
2574 appextra
="recorder:gui:radio"
2577 toolset
=$scramblebitmaptools
2579 t_manufacturer
="as3525"
2580 t_model
="sansa-clipzip"
2586 modelname
="sansaconnect"
2587 target
="SANSA_CONNECT"
2589 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2590 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2591 tool
="$rootdir/tools/scramble -add=conn"
2592 output
="rockbox.sansa"
2593 bootoutput
="bootloader-connect.sansa"
2594 appextra
="recorder:gui"
2597 toolset
=$scramblebitmaptools
2599 t_manufacturer
="tms320dm320"
2600 t_model
="sansa-connect"
2606 modelname
="tatungtpj1022"
2607 target
="TATUNG_TPJ1022"
2610 tool
="$rootdir/tools/scramble -add tpj2"
2611 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2612 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2613 output
="rockbox.elio"
2614 appextra
="recorder:gui:radio"
2617 boottool
="$rootdir/tools/scramble -mi4v2"
2618 bootoutput
="pp5020.mi4"
2619 # toolset is the tools within the tools directory that we build for
2620 # this particular target.
2621 toolset
=$scramblebitmaptools
2622 # architecture, manufacturer and model for the target-tree build
2625 t_manufacturer
="tatung"
2631 modelname
="gogearsa9200"
2632 target
="PHILIPS_SA9200"
2633 memory
=32 # supposedly
2635 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2636 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2637 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2638 output
="rockbox.mi4"
2639 appextra
="recorder:gui:radio"
2642 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2643 bootoutput
="FWImage.ebn"
2644 # toolset is the tools within the tools directory that we build for
2645 # this particular target.
2646 toolset
=$scramblebitmaptools
2647 # architecture, manufacturer and model for the target-tree build
2650 t_manufacturer
="philips"
2656 modelname
="gogearhdd1630"
2657 target
="PHILIPS_HDD1630"
2658 memory
=32 # supposedly
2660 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2661 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2662 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2663 output
="rockbox.mi4"
2664 appextra
="recorder:gui:radio"
2667 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2668 bootoutput
="FWImage.ebn"
2669 # toolset is the tools within the tools directory that we build for
2670 # this particular target.
2671 toolset
=$scramblebitmaptools
2672 # architecture, manufacturer and model for the target-tree build
2675 t_manufacturer
="philips"
2681 modelname
="gogearhdd6330"
2682 target
="PHILIPS_HDD6330"
2685 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2686 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2687 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2688 output
="rockbox.mi4"
2689 appextra
="recorder:gui:radio"
2692 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2693 bootoutput
="FWImage.ebn"
2694 # toolset is the tools within the tools directory that we build for
2695 # this particular target.
2696 toolset
=$scramblebitmaptools
2697 # architecture, manufacturer and model for the target-tree build
2700 t_manufacturer
="philips"
2706 modelname
="meizum6sl"
2711 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2712 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2713 output
="rockbox.meizu"
2714 appextra
="recorder:gui:radio"
2717 toolset
=$genericbitmaptools
2719 bootoutput
="rockboot.ebn"
2720 # architecture, manufacturer and model for the target-tree build
2722 t_manufacturer
="s5l8700"
2723 t_model
="meizu-m6sl"
2728 modelname
="meizum6sp"
2733 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2734 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2735 output
="rockbox.meizu"
2736 appextra
="recorder:gui:radio"
2739 toolset
=$genericbitmaptools
2741 bootoutput
="rockboot.ebn"
2742 # architecture, manufacturer and model for the target-tree build
2744 t_manufacturer
="s5l8700"
2745 t_model
="meizu-m6sp"
2755 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2756 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2757 output
="rockbox.meizu"
2758 appextra
="recorder:gui:radio"
2761 toolset
=$genericbitmaptools
2763 bootoutput
="rockboot.ebn"
2764 # architecture, manufacturer and model for the target-tree build
2766 t_manufacturer
="s5l8700"
2772 modelname
="ondavx747"
2776 tool
="$rootdir/tools/scramble -add=x747"
2777 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2778 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2779 output
="rockbox.vx747"
2780 appextra
="recorder:gui:radio"
2783 toolset
=$genericbitmaptools
2784 boottool
="$rootdir/tools/scramble -ccpmp"
2785 bootoutput
="ccpmp.bin"
2786 # architecture, manufacturer and model for the target-tree build
2788 t_manufacturer
="ingenic_jz47xx"
2789 t_model
="onda_vx747"
2794 modelname
="ondavx767"
2799 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2800 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2801 output
="rockbox.vx767"
2802 appextra
="recorder:gui:radio"
2805 toolset
=$genericbitmaptools
2806 boottool
="$rootdir/tools/scramble -ccpmp"
2807 bootoutput
="ccpmp.bin"
2808 # architecture, manufacturer and model for the target-tree build
2810 t_manufacturer
="ingenic_jz47xx"
2811 t_model
="onda_vx767"
2816 modelname
="ondavx747p"
2817 target
="ONDA_VX747P"
2820 tool
="$rootdir/tools/scramble -add=747p"
2821 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2822 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2823 output
="rockbox.vx747p"
2824 appextra
="recorder:gui:radio"
2827 toolset
=$genericbitmaptools
2828 boottool
="$rootdir/tools/scramble -ccpmp"
2829 bootoutput
="ccpmp.bin"
2830 # architecture, manufacturer and model for the target-tree build
2832 t_manufacturer
="ingenic_jz47xx"
2833 t_model
="onda_vx747"
2838 modelname
="ondavx777"
2842 tool
="$rootdir/tools/scramble -add=x777"
2843 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2844 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2845 output
="rockbox.vx777"
2846 appextra
="recorder:gui:radio"
2849 toolset
=$genericbitmaptools
2850 boottool
="$rootdir/tools/scramble -ccpmp"
2851 bootoutput
="ccpmp.bin"
2852 # architecture, manufacturer and model for the target-tree build
2854 t_manufacturer
="ingenic_jz47xx"
2855 t_model
="onda_vx747"
2860 modelname
="lyreproto1"
2861 target
="LYRE_PROTO1"
2865 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2866 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2867 output
="rockbox.lyre"
2868 appextra
="recorder:gui:radio"
2871 toolset
=$scramblebitmaptools
2873 bootoutput
="bootloader-proto1.lyre"
2874 # architecture, manufacturer and model for the target-tree build
2876 t_manufacturer
="at91sam"
2877 t_model
="lyre_proto1"
2882 modelname
="mini2440"
2886 tool
="$rootdir/tools/scramble -add=m244"
2887 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2888 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2889 output
="rockbox.mini2440"
2890 appextra
="recorder:gui:radio"
2893 toolset
=$scramblebitmaptools
2895 bootoutput
="bootloader-mini2440.lyre"
2896 # architecture, manufacturer and model for the target-tree build
2898 t_manufacturer
="s3c2440"
2904 modelname
="samsungyh820"
2905 target
="SAMSUNG_YH820"
2908 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2909 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2910 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2911 output
="rockbox.mi4"
2912 appextra
="recorder:gui:radio"
2915 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2916 bootoutput
="FW_YH820.mi4"
2917 # toolset is the tools within the tools directory that we build for
2918 # this particular target.
2919 toolset
=$scramblebitmaptools
2920 # architecture, manufacturer and model for the target-tree build
2923 t_manufacturer
="samsung"
2929 modelname
="samsungyh920"
2930 target
="SAMSUNG_YH920"
2933 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2934 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2935 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2936 output
="rockbox.mi4"
2937 appextra
="recorder:gui:radio"
2940 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2941 bootoutput
="PP5020.mi4"
2942 # toolset is the tools within the tools directory that we build for
2943 # this particular target.
2944 toolset
=$scramblebitmaptools
2945 # architecture, manufacturer and model for the target-tree build
2948 t_manufacturer
="samsung"
2954 modelname
="samsungyh925"
2955 target
="SAMSUNG_YH925"
2958 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2959 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2960 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2961 output
="rockbox.mi4"
2962 appextra
="recorder:gui:radio"
2965 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2966 bootoutput
="FW_YH925.mi4"
2967 # toolset is the tools within the tools directory that we build for
2968 # this particular target.
2969 toolset
=$scramblebitmaptools
2970 # architecture, manufacturer and model for the target-tree build
2973 t_manufacturer
="samsung"
2979 modelname
="samsungyps3"
2980 target
="SAMSUNG_YPS3"
2984 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2985 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2986 output
="rockbox.yps3"
2987 appextra
="recorder:gui:radio"
2990 toolset
=$genericbitmaptools
2992 bootoutput
="rockboot.ebn"
2993 # architecture, manufacturer and model for the target-tree build
2995 t_manufacturer
="s5l8700"
3002 target
="PBELL_VIBE500"
3005 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
3006 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3007 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
3008 output
="rockbox.mi4"
3009 appextra
="recorder:gui:radio"
3012 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
3013 bootoutput
="jukebox.mi4"
3014 # toolset is the tools within the tools directory that we build for
3015 # this particular target.
3016 toolset
=$scramblebitmaptools
3017 # architecture, manufacturer and model for the target-tree build
3020 t_manufacturer
="pbell"
3026 modelname
="mpiohd200"
3030 tool
="$rootdir/tools/scramble -add=hd20"
3031 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3032 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
3033 output
="rockbox.mpio"
3034 bootoutput
="bootloader.mpio"
3035 appextra
="recorder:gui:radio"
3038 # toolset is the tools within the tools directory that we build for
3039 # this particular target.
3040 toolset
="$genericbitmaptools"
3041 # architecture, manufacturer and model for the target-tree build
3043 t_manufacturer
="mpio"
3049 modelname
="mpiohd300"
3053 tool
="$rootdir/tools/scramble -add=hd30"
3054 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3055 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
3056 output
="rockbox.mpio"
3057 bootoutput
="bootloader.mpio"
3058 appextra
="recorder:gui:radio"
3061 # toolset is the tools within the tools directory that we build for
3062 # this particular target.
3063 toolset
="$genericbitmaptools"
3064 # architecture, manufacturer and model for the target-tree build
3066 t_manufacturer
="mpio"
3072 modelname
="rk27generic"
3073 target
="RK27_GENERIC"
3076 tool
="$rootdir/tools/scramble -add=rk27"
3077 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3078 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3079 output
="rockbox.rk27"
3080 bootoutput
="bootloader.rk27"
3081 appextra
="recorder:gui:radio"
3084 # toolset is the tools within the tools directory that we build for
3085 # this particular target.
3086 toolset
="$genericbitmaptools"
3087 # architecture, manufacturer and model for the target-tree build
3089 t_manufacturer
="rk27xx"
3090 t_model
="rk27generic"
3095 modelname
="hifimanhm60x"
3099 tool
="$rootdir/tools/scramble -add=rk27"
3100 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3101 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3102 output
="rockbox.rk27"
3103 bootoutput
="bootloader.rk27"
3104 appextra
="recorder:gui"
3107 # toolset is the tools within the tools directory that we build for
3108 # this particular target.
3109 toolset
="$genericbitmaptools"
3110 # architecture, manufacturer and model for the target-tree build
3112 t_manufacturer
="rk27xx"
3118 modelname
="hifimanhm801"
3122 tool
="$rootdir/tools/scramble -add=rk27"
3123 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3124 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3125 output
="rockbox.rk27"
3126 bootoutput
="bootloader.rk27"
3127 appextra
="recorder:gui"
3130 # toolset is the tools within the tools directory that we build for
3131 # this particular target.
3132 toolset
="$genericbitmaptools"
3133 # architecture, manufacturer and model for the target-tree build
3135 t_manufacturer
="rk27xx"
3151 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3152 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3154 bootoutput
="rockbox"
3155 appextra
="recorder:gui:radio"
3158 # architecture, manufacturer and model for the target-tree build
3160 t_manufacturer
="sdl"
3171 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3172 bindir
="/data/data/org.rockbox/lib"
3173 libdir
="/data/data/org.rockbox/app_rockbox"
3179 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3180 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3181 output
="librockbox.so"
3182 bootoutput
="librockbox.so"
3183 appextra
="recorder:gui:radio:hosted/android"
3186 # architecture, manufacturer and model for the target-tree build
3188 t_manufacturer
="android"
3195 modelname
="nokian8xx"
3198 sharedir
="/opt/rockbox/share/rockbox"
3199 bindir
="/opt/rockbox/bin"
3200 libdir
="/opt/rockbox/lib"
3206 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3207 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3209 bootoutput
="rockbox"
3210 appextra
="recorder:gui:radio"
3213 # architecture, manufacturer and model for the target-tree build
3215 t_manufacturer
="maemo"
3222 modelname
="nokian900"
3225 sharedir
="/opt/rockbox/share/rockbox"
3226 bindir
="/opt/rockbox/bin"
3227 libdir
="/opt/rockbox/lib"
3233 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3234 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3236 bootoutput
="rockbox"
3237 appextra
="recorder:gui:radio"
3240 # architecture, manufacturer and model for the target-tree build
3242 t_manufacturer
="maemo"
3252 sharedir
="rockbox/share/rockbox"
3253 bindir
="rockbox/bin"
3254 libdir
="rockbox/lib"
3260 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3261 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3263 bootoutput
="rockbox"
3264 appextra
="recorder:gui:radio"
3267 # architecture, manufacturer and model for the target-tree build
3269 t_manufacturer
="pandora"
3276 modelname
="samsungypr0"
3277 target
="SAMSUNG_YPR0"
3278 app_set_lcd_size
240 320
3284 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3285 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3287 bootoutput
="rockbox"
3288 appextra
="recorder:gui:radio"
3291 # architecture, manufacturer and model for the target-tree build
3293 t_manufacturer
="ypr0"
3298 echo "Please select a supported target platform!"
3304 echo "Platform set to $modelname"
3308 ############################################################################
3309 # Amount of memory, for those that can differ. They have $memory unset at
3313 if [ -z "$memory" ]; then
3316 if [ "$ARG_RAM" ]; then
3319 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3332 if [ "$ARG_RAM" ]; then
3335 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3348 echo "Memory size selected: $memory MB"
3349 [ "$ARG_TYPE" ] ||
echo ""
3353 ##################################################################
3354 # Figure out build "type"
3357 # the ifp7x0 is the only platform that supports building a gdb stub like
3361 gdbstub
=", (G)DB stub"
3363 sansae200r|sansae200
)
3364 gdbstub
=", (I)nstaller"
3367 gdbstub
=", (E)raser"
3370 gdbstub
=", (E)raser"
3375 if [ "$ARG_TYPE" ]; then
3378 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool$gdbstub: (Defaults to N)"
3384 appsdir
='$(ROOTDIR)/bootloader'
3386 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3388 echo "e200R-installer build selected"
3391 appsdir
='$(ROOTDIR)/bootloader'
3393 extradefines
="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3395 echo "sansa eraser build selected"
3398 if test $t_manufacturer = "archos"; then
3399 # Archos SH-based players do this somewhat differently for
3401 appsdir
='$(ROOTDIR)/flash/bootbox'
3404 appsdir
='$(ROOTDIR)/bootloader'
3407 if test -n "$boottool"; then
3410 if test -n "$bootoutput"; then
3414 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3416 echo "Bootloader build selected"
3419 if [ "$modelname" = "sansae200r" ]; then
3420 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3425 extradefines
="$extradefines -DSIMULATOR"
3428 echo "Simulator build selected"
3431 echo "Advanced build selected"
3432 whichadvanced
$btype
3435 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3436 appsdir
='$(ROOTDIR)/gdb'
3445 echo "GDB stub build selected"
3453 extradefines
="$extradefines -DDEBUG"
3454 appsdir
='$(ROOTDIR)/tools/checkwps';
3455 output
='checkwps.'${modelname};
3457 echo "CheckWPS build selected"
3465 appsdir
='$(ROOTDIR)/tools/database';
3470 output
="database_${modelname}.exe"
3473 output
='database.'${modelname};
3477 echo "Database tool build selected"
3480 if [ "$modelname" = "sansae200r" ]; then
3481 echo "Do not use the e200R target for regular builds. Use e200 instead."
3485 btype
="N" # set it explicitly since RET only gets here as well
3486 echo "Normal build selected"
3490 # to be able running "make manual" from non-manual configuration
3493 manualdev
="archosfmrecorder"
3496 manualdev
="iriverh100"
3499 manualdev
="ipodmini1g"
3502 manualdev
=$modelname
3506 if [ -z "$debug" ]; then
3507 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3510 if [ "yes" = "$application" ]; then
3511 echo Building Rockbox as an Application
3512 extradefines
="$extradefines -DAPPLICATION"
3515 echo "Using source code root directory: $rootdir"
3517 # this was once possible to change at build-time, but no more:
3522 if [ "yes" = "$simulator" ]; then
3523 # setup compiler and things for simulator
3526 if [ -d "simdisk" ]; then
3527 echo "Subdirectory 'simdisk' already present"
3530 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3534 # Now, figure out version number of the (gcc) compiler we are about to use
3535 gccver
=`$CC -dumpversion`;
3537 # figure out the binutil version too and display it, mostly for the build
3538 # system etc to be able to see it easier
3539 if [ $uname = "Darwin" ]; then
3540 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3542 ldver
=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
3545 if [ -z "$gccver" ]; then
3546 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3547 echo "[WARNING] this may cause your build to fail since we cannot do the"
3548 echo "[WARNING] checks we want now."
3551 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3554 num1
=`echo $gccver | cut -d . -f1`
3555 num2
=`echo $gccver | cut -d . -f2`
3556 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3563 echo "Using $CC $gccver ($gccnum)"
3565 if test "$gccnum" -ge "400"; then
3566 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3567 # so we ignore that warnings for now
3569 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3572 if test "$gccnum" -ge "402"; then
3573 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3574 # and later would throw it for several valid cases
3575 GCCOPTS
="$GCCOPTS -Wno-override-init"
3579 ""|
"$CROSS_COMPILE")
3583 # Verify that the cross-compiler is of a recommended version!
3584 if test "$gccver" != "$gccchoice"; then
3585 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3586 echo "WARNING: version $gccchoice!"
3587 echo "WARNING: This may cause your build to fail since it may be a version"
3588 echo "WARNING: that isn't functional or known to not be the best choice."
3589 echo "WARNING: If you suffer from build problems, you know that this is"
3590 echo "WARNING: a likely source for them..."
3598 echo "Using $LD $ldver"
3600 # check the compiler for SH platforms
3601 if test "$CC" = "sh-elf-gcc"; then
3602 if test "$gccnum" -lt "400"; then
3603 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3604 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3606 # figure out patch status
3607 gccpatch
=`$CC --version`;
3609 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3610 echo "gcc $gccver is rockbox patched"
3611 # then convert -O to -Os to get smaller binaries!
3612 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3614 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3615 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3620 if test "$CC" = "m68k-elf-gcc"; then
3621 # convert -O to -Os to get smaller binaries!
3622 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3625 if [ "$ARG_CCACHE" = "1" ]; then
3626 echo "Enable ccache for building"
3628 elif [ "$ARG_CCACHE" != "0" ]; then
3629 ccache
=`findtool ccache`
3630 if test -n "$ccache"; then
3631 echo "Found and uses ccache ($ccache)"
3635 # figure out the full path to the various commands if possible
3636 HOSTCC
=`findtool gcc --lit`
3637 HOSTAR
=`findtool ar --lit`
3638 CC
=`findtool ${CC} --lit`
3639 CPP
=`findtool ${CPP} --lit`
3640 LD
=`findtool ${AR} --lit`
3641 AR
=`findtool ${AR} --lit`
3642 AS
=`findtool ${AS} --lit`
3643 OC
=`findtool ${OC} --lit`
3644 WINDRES
=`findtool ${WINDRES} --lit`
3645 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3646 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3647 RANLIB
=`findtool ${RANLIB} --lit`
3650 if [ -z "$arch" ]; then
3651 cpp_defines
=$
(echo "" |
$CPP -dD)
3652 if [ -n "$(echo $cpp_defines | grep -w __sh__)" ]; then
3654 elif [ -n "$(echo $cpp_defines | grep -w __m68k__)" ]; then
3656 elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then
3658 elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
3660 elif [ -n "$(echo $cpp_defines | grep -w _X86_)" ]; then
3662 elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
3666 echo "Warning: Could not determine target arch"
3668 if [ "$arch" != "unknown" ]; then
3669 echo "Automatically selected arch: $arch"
3672 echo "Manually selected arch: $arch"
3675 if test -n "$ccache"; then
3679 if test "$ARG_ARM_THUMB" = "1"; then
3680 extradefines
="$extradefines -DUSE_THUMB"
3681 CC
="$toolsdir/thumb-cc.py $CC"
3684 if test "X$endian" = "Xbig"; then
3685 defendian
="ROCKBOX_BIG_ENDIAN"
3687 defendian
="ROCKBOX_LITTLE_ENDIAN"
3690 if [ "$ARG_RBDIR" != "" ]; then
3691 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3696 echo "Using alternate rockbox dir: ${rbdir}"
3699 cat > autoconf.h
<<EOF
3700 /* This header was made by configure */
3701 #ifndef __BUILD_AUTOCONF_H
3702 #define __BUILD_AUTOCONF_H
3704 /* Define endianess for the target or simulator platform */
3705 #define ${defendian} 1
3707 /* Define this if you build rockbox to support the logf logging and display */
3710 /* Define this to record a chart with timings for the stages of boot */
3713 /* optional define for a backlight modded Ondio */
3716 /* optional define for FM radio mod for iAudio M5 */
3719 /* optional define for ATA poweroff on Player */
3720 ${have_ata_poweroff}
3722 /* optional defines for RTC mod for h1x0 */
3726 /* the threading backend we use */
3727 #define ${thread_support}
3729 /* lcd dimensions for application builds from configure */
3733 /* root of Rockbox */
3734 #define ROCKBOX_DIR "${rbdir}"
3735 #define ROCKBOX_SHARE_PATH "${sharedir}"
3736 #define ROCKBOX_BINARY_PATH "${bindir}"
3737 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3739 #endif /* __BUILD_AUTOCONF_H */
3742 if test -n "$t_cpu"; then
3743 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3745 if [ "$application" = "yes" ] && [ "$t_manufacturer" = "maemo" ]; then
3746 # Maemo needs the SDL port, too
3747 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3748 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3749 elif [ "$application" = "yes" ] && [ "$t_manufacturer" = "pandora" ]; then
3750 # Pandora needs the SDL port, too
3751 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3752 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3753 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3754 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3755 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3758 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3759 test -n "$t_soc" && TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3760 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3764 if test "$swcodec" = "yes"; then
3765 voicetoolset
="rbspeexenc voicefont wavtrim"
3767 voicetoolset
="voicefont wavtrim"
3770 if test "$apps" = "apps"; then
3771 # only when we build "real" apps we build the .lng files
3775 #### Fix the cmdline ###
3776 if [ -n "$ARG_PREFIX" ]; then
3777 cmdline
="$cmdline --prefix=\$(PREFIX)"
3779 if [ -n "$ARG_LCDWIDTH" ]; then
3780 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3783 # remove parts from the cmdline we're going to set unconditionally
3784 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3785 -e s,--ram=[0-9]\*,,g \
3786 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3787 -e s,--type=[a-zA-Z]\*,,g`
3788 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3792 cat > Makefile
<<EOF
3793 ## Automatically generated. http://www.rockbox.org/
3795 export ROOTDIR=${rootdir}
3796 export FIRMDIR=\$(ROOTDIR)/firmware
3797 export APPSDIR=${appsdir}
3798 export TOOLSDIR=${toolsdir}
3799 export DOCSDIR=${rootdir}/docs
3800 export MANUALDIR=${rootdir}/manual
3801 export DEBUG=${debug}
3802 export MODELNAME=${modelname}
3803 export ARCHOSROM=${archosrom}
3804 export FLASHFILE=${flash}
3805 export TARGET_ID=${target_id}
3806 export TARGET=-D${target}
3809 export MANUFACTURER=${t_manufacturer}
3810 export OBJDIR=${pwd}
3811 export BUILDDIR=${pwd}
3812 export LANGUAGE=${language}
3813 export VOICELANGUAGE=${voicelanguage}
3814 export MEMORYSIZE=${memory}
3815 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3816 export MKFIRMWARE=${tool}
3817 export BMP2RB_MONO=${bmp2rb_mono}
3818 export BMP2RB_NATIVE=${bmp2rb_native}
3819 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3820 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3821 export BINARY=${output}
3822 export APPEXTRA=${appextra}
3823 export ENABLEDPLUGINS=${plugins}
3824 export SOFTWARECODECS=${swcodec}
3825 export EXTRA_DEFINES=${extradefines}
3826 export HOSTCC=${HOSTCC}
3827 export HOSTAR=${HOSTAR}
3834 export WINDRES=${WINDRES}
3835 export DLLTOOL=${DLLTOOL}
3836 export DLLWRAP=${DLLWRAP}
3837 export RANLIB=${RANLIB}
3838 export PREFIX=${ARG_PREFIX}
3839 export PROFILE_OPTS=${PROFILE_OPTS}
3840 export APP_TYPE=${app_type}
3841 export APPLICATION=${application}
3842 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3843 export GCCOPTS=${GCCOPTS}
3844 export TARGET_INC=${TARGET_INC}
3845 export LOADADDRESS=${loadaddress}
3846 export SHARED_LDFLAG=${SHARED_LDFLAG}
3847 export SHARED_CFLAGS=${SHARED_CFLAGS}
3848 export LDOPTS=${LDOPTS}
3849 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3850 export GCCVER=${gccver}
3851 export GCCNUM=${gccnum}
3852 export UNAME=${uname}
3853 export MANUALDEV=${manualdev}
3854 export TTS_OPTS=${TTS_OPTS}
3855 export TTS_ENGINE=${TTS_ENGINE}
3856 export ENC_OPTS=${ENC_OPTS}
3857 export ENCODER=${ENCODER}
3858 export USE_ELF=${USE_ELF}
3859 export RBDIR=${rbdir}
3860 export ROCKBOX_SHARE_PATH=${sharedir}
3861 export ROCKBOX_BINARY_PATH=${bindir}
3862 export ROCKBOX_LIBRARY_PATH=${libdir}
3863 export SDLCONFIG=${sdl}
3864 export LCDORIENTATION=${lcd_orientation}
3866 CONFIGURE_OPTIONS=${cmdline}
3868 include \$(TOOLSDIR)/root.make
3871 echo "Created Makefile"