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 # LD options for the core
15 # LD options for the core + plugins
19 use_logf
="#undef ROCKBOX_HAS_LOGF"
20 use_bootchart
="#undef DO_BOOTCHART"
21 use_logf_serial
="#undef LOGF_SERIAL"
23 scriptver
=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
30 thread_support
="ASSEMBLER_THREADS"
35 # Properly retain command line arguments containing spaces
39 *\
*) cmdline
="$cmdline \"$arg\"";;
40 *) cmdline
="$cmdline $arg";;
45 # Begin Function Definitions
56 WINDRES
=${prefix}windres
57 DLLTOOL
=${prefix}dlltool
58 DLLWRAP
=${prefix}dllwrap
59 RANLIB
=${prefix}ranlib
67 # setup files and paths depending on the platform
68 if [ -z "$ARG_PREFIX" ]; then
69 sharedir
="/usr/local/share/rockbox"
70 bindir
="/usr/local/bin"
71 libdir
="/usr/local/lib"
73 if [ -d "$ARG_PREFIX" ]; then
74 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
75 ARG_PREFIX
=`realpath $ARG_PREFIX`
76 if [ "0" != "$?" ]; then
77 echo "ERROR: Could not get prefix path (is realpath installed?)."
81 sharedir
="$ARG_PREFIX/share/rockbox"
82 bindir
="$ARG_PREFIX/bin"
83 libdir
="$ARG_PREFIX/lib"
85 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
91 # Set the application LCD size according to the following priorities:
92 # 1) If --lcdwidth and --lcdheight are set, use them
93 # 2) If a size is passed to the app_set_lcd_size() function, use that
94 # 3) Otherwise ask the user
96 if [ -z "$ARG_LCDWIDTH" ]; then
99 if [ -z "$ARG_LCDHEIGHT" ]; then
103 echo "Enter the LCD width (default: 320)"
104 if [ -z "$ARG_LCDWIDTH" ]; then
105 app_lcd_width
=`input`
107 app_lcd_width
="$ARG_LCDWIDTH"
109 if [ -z "$app_lcd_width" ]; then app_lcd_width
="320"; fi
110 echo "Enter the LCD height (default: 480)"
111 if [ -z "$ARG_LCDHEIGHT" ]; then
112 app_lcd_height
=`input`
114 app_lcd_height
="$ARG_LCDHEIGHT"
116 if [ -z "$app_lcd_height" ]; then app_lcd_height
="480"; fi
117 if [ $app_lcd_width -gt $app_lcd_height ]; then
118 lcd_orientation
="landscape"
120 lcd_orientation
="portrait"
122 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
123 ARG_LCDWIDTH
=$app_lcd_width
124 ARG_LCDHEIGHT
=$app_lcd_height
126 app_lcd_width
="#define LCD_WIDTH $app_lcd_width"
127 app_lcd_height
="#define LCD_HEIGHT $app_lcd_height"
131 prefixtools arm-elf-eabi-
135 # scan the $PATH for the given command
142 # echo "checks for $file in $path" >&2
143 if test -f "$path/$file"; then
148 # check whether caller wants literal return value if not found
149 if [ "$2" = "--lit" ]; then
154 # scan the $PATH for sdl-config - check whether for a (cross-)win32
157 # sdl-config might (not) be prefixed for cross compiles so try both.
158 files
="${CROSS_COMPILE}sdl-config:sdl-config"
166 #echo "checks for $file in $path" >&2
167 if test -f "$path/$file"; then
168 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
169 if [ "yes" = "${winbuild}" ]; then
174 if [ "yes" != "${winbuild}" ]; then
184 # check for availability of sigaltstack to support our thread engine
185 check_sigaltstack
() {
186 cat >$tmpdir/check_threads.c
<<EOF
188 int main(int argc, char **argv)
191 #define NULL (void*)0
193 sigaltstack(NULL, NULL);
197 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
1> /dev
/null
199 rm -rf $tmpdir/check_threads
*
203 # check for availability of Fiber on Win32 to support our thread engine
205 cat >$tmpdir/check_threads.c
<<EOF
207 int main(int argc, char **argv)
209 ConvertThreadToFiber(NULL);
213 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
2>/dev
/null
215 rm -rf $tmpdir/check_threads
*
221 # default tool setup for native building
222 prefixtools
"$CROSS_COMPILE"
223 ARG_ARM_THUMB
=0 # can't use thumb in native builds
225 # unset arch if already set shcc() and friends
231 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
233 GCCOPTS
="$GCCOPTS -fno-builtin -g"
235 LDOPTS
="$LDOPTS -lm" # button-sdl.c uses sqrt()
238 endian
="" # endianess of the dap doesnt matter here
240 # default output binary name, don't override app_get_platform()
241 if [ "$app_type" != "sdl-app" ]; then
245 # default share option, override below if needed
246 SHARED_LDFLAG
="-shared"
247 SHARED_CFLAGS
="-fPIC -fvisibility=hidden"
249 if [ "$win32crosscompile" = "yes" ]; then
250 # We are crosscompiling
251 # add cross-compiler option(s)
252 LDOPTS
="$LDOPTS -mconsole"
255 CROSS_COMPILE
=${CROSS_COMPILE:-"i586-mingw32msvc-"}
257 prefixtools
"$CROSS_COMPILE"
259 endian
="little" # windows is little endian
260 echo "Enabling MMX support"
261 GCCOPTS
="$GCCOPTS -mmmx"
265 echo "Cygwin host detected"
268 LDOPTS
="$LDOPTS -mconsole"
275 echo "MinGW host detected"
278 LDOPTS
="$LDOPTS -mconsole"
284 sigaltstack
=`check_sigaltstack`
285 echo "Linux host detected"
286 LDOPTS
="$LDOPTS -ldl"
290 sigaltstack
=`check_sigaltstack`
291 echo "FreeBSD host detected"
292 LDOPTS
="$LDOPTS -ldl"
296 sigaltstack
=`check_sigaltstack`
297 echo "Darwin host detected"
298 LDOPTS
="$LDOPTS -ldl"
299 SHARED_LDFLAG
="-dynamiclib -Wl\,-single_module"
303 sigaltstack
=`check_sigaltstack`
304 echo "*Solaris host detected"
306 GCCOPTS
="$GCCOPTS -fPIC"
307 LDOPTS
="$LDOPTS -ldl"
311 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
317 if [ "$winbuild" != "yes" ]; then
318 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
319 if [ "`uname -m`" = "i686" ]; then
320 echo "Enabling MMX support"
321 GCCOPTS
="$GCCOPTS -mmmx"
325 sdl
=`findsdl $winbuild`
327 if [ -n `echo $app_type | grep "sdl"` ]; then
328 if [ -z "$sdl" ]; then
329 echo "configure didn't find sdl-config, which indicates that you"
330 echo "don't have SDL (properly) installed. Please correct and"
331 echo "re-run configure!"
334 # generic sdl-config checker
335 GCCOPTS
="$GCCOPTS `$sdl --cflags`"
336 LDOPTS
="$LDOPTS `$sdl --libs`"
341 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
342 # x86_64 supports MMX by default
344 if [ "$endian" = "" ]; then
346 cat >$tmpdir/conftest-
$id.c
<<EOF
348 int main(int argc, char **argv)
351 char *varp = (char *)&var;
358 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
359 # when cross compiling, the endianess cannot be detected because the above program doesn't run
360 # on the local machine. assume little endian but print a warning
361 endian
=`$tmpdir/conftest-$id 2> /dev/null`
362 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
371 if [ "$CROSS_COMPILE" != "" ]; then
372 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
375 if [ "$app_type" = "sdl-sim" ]; then
376 echo "Simulator environment deemed $endian endian"
377 elif [ "$app_type" = "sdl-app" ]; then
378 echo "Application environment deemed $endian endian"
379 elif [ "$app_type" = "checkwps" ]; then
380 echo "CheckWPS environment deemed $endian endian"
383 # use wildcard here to make it work even if it was named *.exe like
385 rm -f $tmpdir/conftest-
$id*
388 if [ -z "$ARG_THREAD_SUPPORT" ] ||
[ "$ARG_THREAD_SUPPORT" = "0" ]; then
389 if [ "$sigaltstack" = "0" ]; then
390 thread_support
="HAVE_SIGALTSTACK_THREADS"
391 LDOPTS
="$LDOPTS -lpthread" # pthread needed
392 echo "Selected sigaltstack threads"
393 elif [ "$fibers" = "0" ]; then
394 thread_support
="HAVE_WIN32_FIBER_THREADS"
395 echo "Selected Win32 Fiber threads"
399 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
400 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
401 thread_support
="HAVE_SDL_THREADS"
402 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
403 echo "Selected SDL threads"
405 echo "WARNING: Falling back to SDL threads"
411 # functions for setting up cross-compiler names and options
412 # also set endianess and what the exact recommended gcc version is
413 # the gcc version should most likely match what versions we build with
418 GCCOPTS
="$CCOPTS -m1"
419 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
425 prefixtools calmrisc16-unknown-elf-
426 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
427 GCCOPTIMIZE
="-fomit-frame-pointer"
432 prefixtools m68k-elf-
433 GCCOPTS
="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
434 GCCOPTIMIZE
="-fomit-frame-pointer"
441 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
442 GCCOPTIMIZE
="-fomit-frame-pointer"
448 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
449 GCCOPTIMIZE
="-fomit-frame-pointer"
455 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
456 GCCOPTIMIZE
="-fomit-frame-pointer"
462 GCCOPTS
="$CCOPTS -mcpu=arm940t"
463 GCCOPTIMIZE
="-fomit-frame-pointer"
469 GCCOPTS
="$CCOPTS -mcpu=arm9e"
470 GCCOPTIMIZE
="-fomit-frame-pointer"
476 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
477 GCCOPTIMIZE
="-fomit-frame-pointer"
483 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
484 GCCOPTIMIZE
="-fomit-frame-pointer"
490 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
491 GCCOPTIMIZE
="-fomit-frame-pointer"
497 GCCOPTS
="$CCOPTS -march=armv5te"
498 GCCOPTIMIZE
="-fomit-frame-pointer"
504 arch_version
=32 # FIXME: autodetect version (32 or 64)
505 prefixtools mipsel-elf-
506 # mips is predefined, but we want it for paths. use __mips instead
507 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
508 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
509 GCCOPTIMIZE
="-fomit-frame-pointer"
515 # Scratchbox sets up "gcc" based on the active target
518 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
519 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
521 LDOPTS
="-lm -ldl $LDOPTS"
522 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
523 SHARED_LDFLAG
="-shared"
526 thread_support
="HAVE_SIGALTSTACK_THREADS"
529 # Determine maemo version
530 if pkg-config
--atleast-version=5 maemo-version
; then
531 if [ "$1" == "4" ]; then
532 echo "ERROR: Maemo 4 SDK required."
535 extradefines
="$extradefines -DMAEMO5"
536 echo "Found N900 maemo version"
538 elif pkg-config
--atleast-version=4 maemo-version
; then
539 if [ "$1" == "5" ]; then
540 echo "ERROR: Maemo 5 SDK required."
543 extradefines
="$extradefines -DMAEMO4"
544 echo "Found N8xx maemo version"
546 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
551 if [ $is_n900 -eq 1 ]; then
552 GCCOPTS
="$GCCOPTS `pkg-config --cflags sdl`"
553 LDOPTS
="$LDOPTS `pkg-config --libs sdl`"
555 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
556 LDOPTS
="$LDOPTS `sdl-config --libs`"
559 # glib and libosso support
560 GCCOPTS
="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
561 LDOPTS
="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
563 # libhal support: Battery monitoring
564 GCCOPTS
="$GCCOPTS `pkg-config --cflags hal`"
565 LDOPTS
="$LDOPTS `pkg-config --libs hal`"
567 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
568 if [ $is_n900 -eq 1 ]; then
569 # gstreamer support: Audio output.
570 GCCOPTS
="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
571 LDOPTS
="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
573 # N900 specific: libplayback support
574 GCCOPTS
="$GCCOPTS `pkg-config --cflags libplayback-1`"
575 LDOPTS
="$LDOPTS `pkg-config --libs libplayback-1`"
577 # N900 specific: Enable ARMv7 NEON support
578 if sb-conf show
-A |
grep -q -i arm
; then
579 echo "Detected ARM target"
580 GCCOPTS
="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
581 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
583 echo "Detected x86 target"
586 # N8xx specific: Enable armv5te instructions
587 if sb-conf show
-A |
grep -q -i arm
; then
588 echo "Detected ARM target"
589 GCCOPTS
="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
590 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
592 echo "Detected x86 target"
598 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
599 # You have to use the sebt3 toolchain:
600 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
602 PNDSDK
="/usr/local/angstrom/arm"
603 if [ ! -x $PNDSDK/bin
/arm-angstrom-linux-gnueabi-gcc
]; then
604 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
608 PATH
=$PNDSDK/bin
:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/bin
609 PKG_CONFIG_PATH
=$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/lib
/pkgconfig
610 LDOPTS
="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
611 PKG_CONFIG
="pkg-config"
613 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
614 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
616 LDOPTS
="-lm -ldl $LDOPTS"
617 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
618 SHARED_LDFLAG
="-shared"
621 thread_support
="HAVE_SIGALTSTACK_THREADS"
624 GCCOPTS
="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
628 prefixtools
"$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
631 GCCOPTS
="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
632 LDOPTS
="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
635 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
636 GCCOPTS
="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
637 GCCOPTS
="$GCCOPTS -ffast-math -fsingle-precision-constant"
642 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
644 LDOPTS
="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
645 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
646 SHARED_LDFLAG
="-shared"
649 thread_support
="HAVE_SIGALTSTACK_THREADS"
653 GCCOPTS
="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
657 prefixtools
"arm-ypr0-linux-gnueabi-"
661 if [ -z "$ANDROID_SDK_PATH" ]; then
662 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
663 echo "environment variable point to the root directory of the Android SDK."
666 if [ -z "$ANDROID_NDK_PATH" ]; then
667 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
668 echo "environment variable point to the root directory of the Android NDK."
671 buildhost
=$
(uname |
tr "[:upper:]" "[:lower:]")
673 gcctarget
="arm-linux-androideabi-"
674 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
675 PATH
=$PATH:$gccprefix/bin
676 prefixtools
$gcctarget
677 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
678 GCCOPTS
="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
679 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
680 GLOBAL_LDOPTS
="-Wl,-z,defs -Wl,-z,noexecstack"
681 LDOPTS
="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
683 SHARED_LDFLAG
="-shared"
687 atype
=`echo "$1" | cut -c 2-`
688 ##################################################################
689 # Prompt for specific developer options
691 if [ "$atype" ]; then
696 printf "Enter your developer options (press only enter when done)\n\
697 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
698 (T)est plugins, S(m)all C lib, Logf to Ser(i)al port:"
699 if [ "$modelname" = "archosplayer" ]; then
700 printf ", Use (A)TA poweroff"
702 if [ "$t_model" = "ondio" ]; then
703 printf ", (B)acklight MOD"
705 if [ "$modelname" = "iaudiom5" ]; then
706 printf ", (F)M radio MOD"
708 if [ "$modelname" = "iriverh120" ]; then
715 while [ $cont = "1" ]; do
717 if [ "$interact" ]; then
720 option
=`echo "$atype" | cut -c 1`
725 if [ "yes" = "$profile" ]; then
726 echo "Debug is incompatible with profiling"
728 echo "DEBUG build enabled"
733 echo "logf() support enabled"
737 echo "Using Rockbox' small C library"
738 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
741 echo "Including test plugins"
742 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
745 echo "bootchart enabled (logf also enabled)"
750 echo "Logf to serial port enabled (logf also enabled)"
755 echo "Simulator build enabled"
759 if [ "yes" = "$use_debug" ]; then
760 echo "Profiling is incompatible with debug"
762 echo "Profiling support is enabled"
767 echo "Voice build selected"
771 if [ "$modelname" = "archosplayer" ]; then
772 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
773 echo "ATA power off enabled"
777 if [ "$t_model" = "ondio" ]; then
778 have_backlight
="#define HAVE_BACKLIGHT"
779 echo "Backlight functions enabled"
783 if [ "$modelname" = "iaudiom5" ]; then
784 have_fmradio_in
="#define HAVE_FMRADIO_IN"
785 echo "FM radio functions enabled"
789 if [ "$modelname" = "iriverh120" ]; then
790 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
791 have_rtc_alarm
="#define HAVE_RTC_ALARM"
792 echo "RTC functions enabled (DS1339/DS3231)"
796 echo "Enabling Windows 32 cross-compiling"
797 win32crosscompile
="yes"
799 "") # Match enter press when finished with advanced options
803 echo "[ERROR] Option $option unsupported"
806 if [ "$interact" ]; then
807 btype
="$btype$option"
809 atype
=`echo "$atype" | cut -c 2-`
810 [ "$atype" ] || cont
=0
815 if [ "yes" = "$voice" ]; then
816 # Ask about languages to build
818 voicelanguage
=`whichlang`
819 echo "Voice language set to $voicelanguage"
821 # Configure encoder and TTS engine for each language
822 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
823 voiceconfig
"$thislang"
826 if [ "yes" = "$use_debug" ]; then
828 GCCOPTS
="$GCCOPTS -g -DDEBUG"
830 if [ "yes" = "$logf" ]; then
831 use_logf
="#define ROCKBOX_HAS_LOGF 1"
833 if [ "yes" = "$logf_serial" ]; then
834 use_logf_serial
="#define LOGF_SERIAL 1"
836 if [ "yes" = "$bootchart" ]; then
837 use_bootchart
="#define DO_BOOTCHART 1"
839 if [ "yes" = "$simulator" ]; then
841 extradefines
="$extradefines -DSIMULATOR"
845 if [ "yes" = "$profile" ]; then
846 extradefines
="$extradefines -DRB_PROFILE"
847 PROFILE_OPTS
="-finstrument-functions"
851 # Configure voice settings
854 if [ ! "$ARG_TTS" ]; then
855 echo "Building $thislang voice for $modelname. Select options"
859 if [ -n "`findtool flite`" ]; then
863 DEFAULT_TTS_OPTS
=$FLITE_OPTS
864 DEFAULT_NOISEFLOOR
="500"
867 if [ -n "`findtool espeak`" ]; then
871 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
872 DEFAULT_NOISEFLOOR
="500"
875 if [ -n "`findtool festival`" ]; then
876 FESTIVAL
="(F)estival "
879 FESTIVAL_OPTS
="--language italian"
882 FESTIVAL_OPTS
="--language spanish"
885 FESTIVAL_OPTS
="--language finnish"
888 FESTIVAL_OPTS
="--language czech"
894 DEFAULT_TTS
="festival"
895 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
896 DEFAULT_NOISEFLOOR
="500"
899 if [ -n "`findtool swift`" ]; then
903 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
904 DEFAULT_NOISEFLOOR
="500"
907 # Allow SAPI if Windows is in use
908 if [ -n "`findtool winver`" ]; then
912 DEFAULT_TTS_OPTS
=$SAPI_OPTS
913 DEFAULT_NOISEFLOOR
="500"
917 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
918 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
922 if [ "$ARG_TTS" ]; then
925 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
927 if [ -z "$option" ]; then option
=${DEFAULT_CHOICE}; fi
928 advopts
="$advopts --tts=$option"
933 NOISEFLOOR
="500" # TODO: check this value
939 TTS_OPTS
=$ESPEAK_OPTS
942 TTS_ENGINE
="festival"
944 TTS_OPTS
=$FESTIVAL_OPTS
957 TTS_ENGINE
=$DEFAULT_TTS
958 TTS_OPTS
=$DEFAULT_TTS_OPTS
959 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
961 echo "Using $TTS_ENGINE for TTS"
963 # Select which voice to use for Festival
964 if [ "$TTS_ENGINE" = "festival" ]; then
965 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
966 for voice
in $voicelist; do
967 TTS_FESTIVAL_VOICE
="$voice" # Default choice
970 if [ "$ARG_VOICE" ]; then
974 for voice
in $voicelist; do
975 printf "%3d. %s\n" "$i" "$voice"
978 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
982 for voice
in $voicelist; do
983 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
984 TTS_FESTIVAL_VOICE
="$voice"
988 advopts
="$advopts --voice=$CHOICE"
989 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
990 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
993 # Read custom tts options from command line
994 if [ "$ARG_TTSOPTS" ]; then
995 TTS_OPTS
="$ARG_TTSOPTS"
996 echo "$TTS_ENGINE options set to $TTS_OPTS"
999 if [ "$swcodec" = "yes" ]; then
1000 ENCODER
="rbspeexenc"
1001 ENC_OPTS
="-q 4 -c 10"
1003 if [ -n "`findtool lame`" ]; then
1005 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1007 echo "You need LAME in the system path to build voice files for"
1008 echo "HWCODEC targets."
1013 echo "Using $ENCODER for encoding voice clips"
1015 # Read custom encoder options from command line
1016 if [ "$ARG_ENCOPTS" ]; then
1017 ENC_OPTS
="$ARG_ENCOPTS"
1018 echo "$ENCODER options set to $ENC_OPTS"
1022 if [ -n "`findtool cygpath`" ]; then
1023 TEMPDIR
=`cygpath . -a -w`
1028 # figure out which languages that are around
1029 for file in $rootdir/apps
/lang
/*.lang
; do
1030 clean
=`basename $file .lang`
1031 langs
="$langs $clean"
1034 if [ "$ARG_LANG" ]; then
1037 echo "Select a number for the language to use (default is english)"
1038 # FIXME The multiple-language feature is currently broken
1039 # echo "You may enter a comma-separated list of languages to build"
1042 for one
in $langs; do
1047 advopts
="$advopts --language=$pick"
1053 # Allow the user to pass a comma-separated list of langauges
1054 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1056 for one
in $langs; do
1057 # Accept both the language number and name
1058 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1059 if [ "$output" = "" ]; then
1068 if [ -z "$output" ]; then
1076 echo "Rockbox configure script."
1077 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1078 echo "Do *NOT* run this within the tools directory!"
1081 Usage: configure [OPTION]...
1083 --target=TARGET Sets the target, TARGET can be either the target ID or
1084 corresponding string. Run without this option to see all
1087 --ram=RAM Sets the RAM for certain targets. Even though any number
1088 is accepted, not every number is correct. The default
1089 value will be applied, if you entered a wrong number
1090 (which depends on the target). Watch the output. Run
1091 without this option if you are not sure which the right
1094 --type=TYPE Sets the build type. Shortcuts are also valid.
1095 Run without this option to see all available types.
1096 Multiple values are allowed and managed in the input
1097 order. So --type=b stands for Bootloader build, while
1098 --type=ab stands for "Backlight MOD" build.
1100 --lcdwidth=X Sets the width of the LCD. Used only for application
1103 --lcdheight=Y Sets the height of the LCD. Used only for application
1106 --language=LANG Set the language used for voice generation (used only if
1109 --tts=ENGINE Set the TTS engine used for voice generation (used only
1112 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1115 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1117 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1119 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1120 This is useful for having multiple alternate builds on
1121 your device that you can load with ROLO. However as the
1122 bootloader looks for .rockbox you won't be able to boot
1125 --ccache Enable ccache use (done by default these days)
1126 --no-ccache Disable ccache use
1128 --thumb Build with -mthumb (for ARM builds)
1129 --no-thumb The opposite of --thumb (don't use thumb even for targets
1130 where this is the default
1131 --sdl-threads Force use of SDL threads. They have inferior performance,
1132 but are better debuggable with GDB
1133 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1134 behavior of falling back to them if no native thread
1136 --prefix Target installation directory
1137 --help Shows this message (must not be used with other options)
1155 ARG_PREFIX
="$PREFIX"
1160 --ccache) ARG_CCACHE
=1;;
1161 --no-ccache) ARG_CCACHE
=0;;
1162 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1163 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1164 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1165 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1166 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1167 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1168 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1169 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1170 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1171 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1172 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1173 --thumb) ARG_ARM_THUMB
=1;;
1174 --no-thumb) ARG_ARM_THUMB
=0;;
1175 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1177 ARG_THREAD_SUPPORT
=0;;
1178 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1180 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1183 [ "$err" ] && exit 1
1187 if [ "$TMPDIR" != "" ]; then
1192 echo Using temporary directory
$tmpdir
1194 if test -r "configure"; then
1195 # this is a check for a configure script in the current directory, it there
1196 # is one, try to figure out if it is this one!
1198 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1199 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1200 echo "It will only cause you pain and grief. Instead do this:"
1203 echo " mkdir build-dir"
1204 echo " cd build-dir"
1205 echo " ../tools/configure"
1207 echo "Much happiness will arise from this. Enjoy"
1212 # get our current directory
1215 if { echo $pwd |
grep " "; } then
1216 echo "You're running this script in a path that contains space. The build"
1217 echo "system is unfortunately not clever enough to deal with this. Please"
1218 echo "run the script from a different path, rename the path or fix the build"
1223 if [ -z "$rootdir" ]; then
1224 ##################################################################
1225 # Figure out where the source code root is!
1227 rootdir
=`dirname $0`/..
/
1229 #####################################################################
1230 # Convert the possibly relative directory name to an absolute version
1236 # cd back to the build dir
1241 appsdir
='$(ROOTDIR)/apps'
1242 toolsdir
='$(ROOTDIR)/tools'
1245 ##################################################################
1246 # Figure out target platform
1249 if [ "$ARG_TARGET" ]; then
1250 buildfor
=$ARG_TARGET
1252 echo "Enter target platform:"
1254 ==Archos== ==iriver== ==Apple iPod==
1255 0) Player/Studio 10) H120/H140 20) Color/Photo
1256 1) Recorder 11) H320/H340 21) Nano 1G
1257 2) FM Recorder 12) iHP-100/110/115 22) Video
1258 3) Recorder v2 13) iFP-790 23) 3G
1259 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1260 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1261 6) AV300 26) Mini 2G
1262 ==Toshiba== 27) 1G, 2G
1263 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1264 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1266 32) 7 ==Olympus= ==SanDisk==
1267 33) D2 70) M:Robe 500 50) Sansa e200
1268 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1270 ==Creative== ==Philips== 53) Sansa m200
1271 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1272 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1273 92) Zen Vision HDD1830 56) Sansa e200v2
1274 102) GoGear HDD6330 57) Sansa m200v4
1275 ==Onda== 58) Sansa Fuze
1276 120) VX747 ==Meizu== 59) Sansa c200v2
1277 121) VX767 110) M6SL 60) Sansa Clipv2
1278 122) VX747+ 111) M6SP 61) Sansa View
1279 123) VX777 112) M3 62) Sansa Clip+
1281 ==Samsung== ==Tatung== 64) Sansa Fuze+
1282 140) YH-820 150) Elio TPJ-1022 65) Sansa Clip Zip
1283 141) YH-920 66) Sansa Connect
1284 142) YH-925 ==Packard Bell==
1285 143) YP-S3 160) Vibe 500 ==Logik==
1287 ==Application== ==MPIO==
1288 200) SDL 170) HD200 ==Lyre project==
1289 201) Android 171) HD300 130) Lyre proto 1
1290 202) Nokia N8xx 131) Mini2440
1291 203) Nokia N900 ==ROCKCHIP== ==HiFiMAN==
1292 204) Pandora 180) rk27xx generic 190) HM-60x
1293 205) Samsung YP-R0 191) HM-801
1300 # Set of tools built for all target platforms:
1301 toolset
="rdf2binary convbdf codepages"
1303 # Toolsets for some target families:
1304 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1305 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1306 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1307 ipodbitmaptools
="$toolset scramble bmp2rb"
1308 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1309 tccbitmaptools
="$toolset scramble bmp2rb"
1310 # generic is used by IFP, Meizu and Onda
1311 genericbitmaptools
="$toolset bmp2rb"
1312 # scramble is used by all other targets
1313 scramblebitmaptools
="$genericbitmaptools scramble"
1316 # ---- For each target ----
1319 # target_id: a unique number identifying this target, IS NOT the menu number.
1320 # Just use the currently highest number+1 when you add a new
1322 # modelname: short model name used all over to identify this target
1323 # memory: number of megabytes of RAM this target has. If the amount can
1324 # be selected by the size prompt, let memory be unset here
1325 # target: -Ddefine passed to the build commands to make the correct
1326 # config-*.h file get included etc
1327 # tool: the tool that takes a plain binary and converts that into a
1328 # working "firmware" file for your target
1329 # output: the final output file name
1330 # boottool: the tool that takes a plain binary and generates a bootloader
1331 # file for your target (or blank to use $tool)
1332 # bootoutput:the final output file name for the bootloader (or blank to use
1334 # appextra: passed to the APPEXTRA variable in the Makefiles.
1335 # TODO: add proper explanation
1336 # archosrom: used only for Archos targets that build a special flashable .ucl
1338 # flash: name of output for flashing, for targets where there's a special
1339 # file output for this.
1340 # plugins: set to 'yes' to build the plugins. Early development builds can
1341 # set this to no in the early stages to have an easier life for a
1343 # swcodec: set 'yes' on swcodec targets
1344 # toolset: lists what particular tools in the tools/ directory that this
1345 # target needs to have built prior to building Rockbox
1348 # *cc: sets up gcc and compiler options for your target builds. Note
1349 # that if you select a simulator build, the compiler selection is
1350 # overridden later in the script.
1356 modelname
="archosplayer"
1357 target
="ARCHOS_PLAYER"
1359 tool
="$rootdir/tools/scramble"
1361 appextra
="player:gui"
1362 archosrom
="$pwd/rombox.ucl"
1363 flash
="$pwd/rockbox.ucl"
1367 # toolset is the tools within the tools directory that we build for
1368 # this particular target.
1369 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1371 # Note: the convbdf is present in the toolset just because: 1) the
1372 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1373 # build the player simulator
1376 t_manufacturer
="archos"
1382 modelname
="archosrecorder"
1383 target
="ARCHOS_RECORDER"
1385 tool
="$rootdir/tools/scramble"
1386 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1387 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1389 appextra
="recorder:gui:radio"
1390 #archosrom="$pwd/rombox.ucl"
1391 flash
="$pwd/rockbox.ucl"
1394 # toolset is the tools within the tools directory that we build for
1395 # this particular target.
1396 toolset
=$archosbitmaptools
1398 t_manufacturer
="archos"
1404 modelname
="archosfmrecorder"
1405 target
="ARCHOS_FMRECORDER"
1407 tool
="$rootdir/tools/scramble -fm"
1408 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1409 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1411 appextra
="recorder:gui:radio"
1412 #archosrom="$pwd/rombox.ucl"
1413 flash
="$pwd/rockbox.ucl"
1416 # toolset is the tools within the tools directory that we build for
1417 # this particular target.
1418 toolset
=$archosbitmaptools
1420 t_manufacturer
="archos"
1426 modelname
="archosrecorderv2"
1427 target
="ARCHOS_RECORDERV2"
1429 tool
="$rootdir/tools/scramble -v2"
1430 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1431 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1433 appextra
="recorder:gui:radio"
1434 #archosrom="$pwd/rombox.ucl"
1435 flash
="$pwd/rockbox.ucl"
1438 # toolset is the tools within the tools directory that we build for
1439 # this particular target.
1440 toolset
=$archosbitmaptools
1442 t_manufacturer
="archos"
1448 modelname
="archosondiosp"
1449 target
="ARCHOS_ONDIOSP"
1451 tool
="$rootdir/tools/scramble -osp"
1452 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1453 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1455 appextra
="recorder:gui:radio"
1456 #archosrom="$pwd/rombox.ucl"
1457 flash
="$pwd/rockbox.ucl"
1460 # toolset is the tools within the tools directory that we build for
1461 # this particular target.
1462 toolset
=$archosbitmaptools
1464 t_manufacturer
="archos"
1470 modelname
="archosondiofm"
1471 target
="ARCHOS_ONDIOFM"
1473 tool
="$rootdir/tools/scramble -ofm"
1474 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1475 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1477 appextra
="recorder:gui:radio"
1478 #archosrom="$pwd/rombox.ucl"
1479 flash
="$pwd/rockbox.ucl"
1482 toolset
=$archosbitmaptools
1484 t_manufacturer
="archos"
1490 modelname
="archosav300"
1491 target
="ARCHOS_AV300"
1494 tool
="$rootdir/tools/scramble -mm=C"
1495 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1496 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1498 appextra
="recorder:gui:radio"
1501 # toolset is the tools within the tools directory that we build for
1502 # this particular target.
1503 toolset
="$toolset scramble descramble bmp2rb"
1504 # architecture, manufacturer and model for the target-tree build
1506 t_manufacturer
="archos"
1512 modelname
="iriverh120"
1513 target
="IRIVER_H120"
1516 tool
="$rootdir/tools/scramble -add=h120"
1517 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1518 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1519 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1520 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1521 output
="rockbox.iriver"
1522 bootoutput
="bootloader.iriver"
1523 appextra
="recorder:gui:radio"
1524 flash
="$pwd/rombox.iriver"
1527 # toolset is the tools within the tools directory that we build for
1528 # this particular target.
1529 toolset
=$iriverbitmaptools
1531 t_manufacturer
="iriver"
1537 modelname
="iriverh300"
1538 target
="IRIVER_H300"
1541 tool
="$rootdir/tools/scramble -add=h300"
1542 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1543 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1544 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1545 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1546 output
="rockbox.iriver"
1547 appextra
="recorder:gui:radio"
1550 # toolset is the tools within the tools directory that we build for
1551 # this particular target.
1552 toolset
=$iriverbitmaptools
1554 t_manufacturer
="iriver"
1560 modelname
="iriverh100"
1561 target
="IRIVER_H100"
1564 tool
="$rootdir/tools/scramble -add=h100"
1565 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1566 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1567 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1568 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1569 output
="rockbox.iriver"
1570 bootoutput
="bootloader.iriver"
1571 appextra
="recorder:gui:radio"
1572 flash
="$pwd/rombox.iriver"
1575 # toolset is the tools within the tools directory that we build for
1576 # this particular target.
1577 toolset
=$iriverbitmaptools
1579 t_manufacturer
="iriver"
1585 modelname
="iriverifp7xx"
1586 target
="IRIVER_IFP7XX"
1590 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1591 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1592 output
="rockbox.wma"
1593 appextra
="recorder:gui:radio"
1596 # toolset is the tools within the tools directory that we build for
1597 # this particular target.
1598 toolset
=$genericbitmaptools
1600 t_manufacturer
="pnx0101"
1601 t_model
="iriver-ifp7xx"
1606 modelname
="iriverh10"
1610 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1611 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1612 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1613 output
="rockbox.mi4"
1614 appextra
="recorder:gui:radio"
1617 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1618 bootoutput
="H10_20GC.mi4"
1619 # toolset is the tools within the tools directory that we build for
1620 # this particular target.
1621 toolset
=$scramblebitmaptools
1622 # architecture, manufacturer and model for the target-tree build
1625 t_manufacturer
="iriver"
1631 modelname
="iriverh10_5gb"
1632 target
="IRIVER_H10_5GB"
1635 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1636 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1637 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1638 output
="rockbox.mi4"
1639 appextra
="recorder:gui:radio"
1642 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1643 bootoutput
="H10.mi4"
1644 # toolset is the tools within the tools directory that we build for
1645 # this particular target.
1646 toolset
=$scramblebitmaptools
1647 # architecture, manufacturer and model for the target-tree build
1650 t_manufacturer
="iriver"
1656 modelname
="ipodcolor"
1660 tool
="$rootdir/tools/scramble -add=ipco"
1661 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1662 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1663 output
="rockbox.ipod"
1664 appextra
="recorder:gui:radio"
1667 bootoutput
="bootloader-$modelname.ipod"
1668 # toolset is the tools within the tools directory that we build for
1669 # this particular target.
1670 toolset
=$ipodbitmaptools
1671 # architecture, manufacturer and model for the target-tree build
1674 t_manufacturer
="ipod"
1680 modelname
="ipodnano1g"
1684 tool
="$rootdir/tools/scramble -add=nano"
1685 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1686 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1687 output
="rockbox.ipod"
1688 appextra
="recorder:gui:radio"
1691 bootoutput
="bootloader-$modelname.ipod"
1692 # toolset is the tools within the tools directory that we build for
1693 # this particular target.
1694 toolset
=$ipodbitmaptools
1695 # architecture, manufacturer and model for the target-tree build
1698 t_manufacturer
="ipod"
1704 modelname
="ipodvideo"
1706 memory
=64 # always. This is reduced at runtime if needed
1708 tool
="$rootdir/tools/scramble -add=ipvd"
1709 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1710 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1711 output
="rockbox.ipod"
1712 appextra
="recorder:gui:radio"
1715 bootoutput
="bootloader-$modelname.ipod"
1716 # toolset is the tools within the tools directory that we build for
1717 # this particular target.
1718 toolset
=$ipodbitmaptools
1719 # architecture, manufacturer and model for the target-tree build
1722 t_manufacturer
="ipod"
1732 tool
="$rootdir/tools/scramble -add=ip3g"
1733 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1734 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1735 output
="rockbox.ipod"
1736 appextra
="recorder:gui:radio"
1739 bootoutput
="bootloader-$modelname.ipod"
1740 # toolset is the tools within the tools directory that we build for
1741 # this particular target.
1742 toolset
=$ipodbitmaptools
1743 # architecture, manufacturer and model for the target-tree build
1746 t_manufacturer
="ipod"
1756 tool
="$rootdir/tools/scramble -add=ip4g"
1757 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1758 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1759 output
="rockbox.ipod"
1760 appextra
="recorder:gui:radio"
1763 bootoutput
="bootloader-$modelname.ipod"
1764 # toolset is the tools within the tools directory that we build for
1765 # this particular target.
1766 toolset
=$ipodbitmaptools
1767 # architecture, manufacturer and model for the target-tree build
1770 t_manufacturer
="ipod"
1776 modelname
="ipodmini1g"
1780 tool
="$rootdir/tools/scramble -add=mini"
1781 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1782 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1783 output
="rockbox.ipod"
1784 appextra
="recorder:gui:radio"
1787 bootoutput
="bootloader-$modelname.ipod"
1788 # toolset is the tools within the tools directory that we build for
1789 # this particular target.
1790 toolset
=$ipodbitmaptools
1791 # architecture, manufacturer and model for the target-tree build
1794 t_manufacturer
="ipod"
1800 modelname
="ipodmini2g"
1801 target
="IPOD_MINI2G"
1804 tool
="$rootdir/tools/scramble -add=mn2g"
1805 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1806 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1807 output
="rockbox.ipod"
1808 appextra
="recorder:gui:radio"
1811 bootoutput
="bootloader-$modelname.ipod"
1812 # toolset is the tools within the tools directory that we build for
1813 # this particular target.
1814 toolset
=$ipodbitmaptools
1815 # architecture, manufacturer and model for the target-tree build
1818 t_manufacturer
="ipod"
1824 modelname
="ipod1g2g"
1828 tool
="$rootdir/tools/scramble -add=1g2g"
1829 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1830 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1831 output
="rockbox.ipod"
1832 appextra
="recorder:gui:radio"
1835 bootoutput
="bootloader-$modelname.ipod"
1836 # toolset is the tools within the tools directory that we build for
1837 # this particular target.
1838 toolset
=$ipodbitmaptools
1839 # architecture, manufacturer and model for the target-tree build
1842 t_manufacturer
="ipod"
1848 modelname
="ipodnano2g"
1849 target
="IPOD_NANO2G"
1852 tool
="$rootdir/tools/scramble -add=nn2g"
1853 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1854 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1855 output
="rockbox.ipod"
1856 appextra
="recorder:gui:radio"
1859 bootoutput
="bootloader-$modelname.ipod"
1860 # toolset is the tools within the tools directory that we build for
1861 # this particular target.
1862 toolset
=$ipodbitmaptools
1863 # architecture, manufacturer and model for the target-tree build
1865 t_manufacturer
="s5l8700"
1866 t_model
="ipodnano2g"
1875 tool
="$rootdir/tools/scramble -add=ip6g"
1876 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1877 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1878 output
="rockbox.ipod"
1879 appextra
="recorder:gui:radio"
1882 bootoutput
="bootloader-$modelname.ipod"
1883 # toolset is the tools within the tools directory that we build for
1884 # this particular target.
1885 toolset
=$ipodbitmaptools
1886 # architecture, manufacturer and model for the target-tree build
1888 t_manufacturer
="s5l8702"
1894 modelname
="iaudiox5"
1898 tool
="$rootdir/tools/scramble -add=iax5"
1899 boottool
="$rootdir/tools/scramble -iaudiox5"
1900 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1901 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1902 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1903 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1904 output
="rockbox.iaudio"
1905 bootoutput
="x5_fw.bin"
1906 appextra
="recorder:gui:radio"
1909 # toolset is the tools within the tools directory that we build for
1910 # this particular target.
1911 toolset
="$iaudiobitmaptools"
1912 # architecture, manufacturer and model for the target-tree build
1914 t_manufacturer
="iaudio"
1920 modelname
="iaudiom5"
1924 tool
="$rootdir/tools/scramble -add=iam5"
1925 boottool
="$rootdir/tools/scramble -iaudiom5"
1926 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1927 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1928 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1929 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1930 output
="rockbox.iaudio"
1931 bootoutput
="m5_fw.bin"
1932 appextra
="recorder:gui:radio"
1935 # toolset is the tools within the tools directory that we build for
1936 # this particular target.
1937 toolset
="$iaudiobitmaptools"
1938 # architecture, manufacturer and model for the target-tree build
1940 t_manufacturer
="iaudio"
1950 tool
="$rootdir/tools/scramble -add=i7"
1951 boottool
="$rootdir/tools/scramble -tcc=crc"
1952 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1953 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1954 output
="rockbox.iaudio"
1955 appextra
="recorder:gui:radio"
1958 bootoutput
="I7_FW.BIN"
1959 # toolset is the tools within the tools directory that we build for
1960 # this particular target.
1961 toolset
="$tccbitmaptools"
1962 # architecture, manufacturer and model for the target-tree build
1964 t_manufacturer
="tcc77x"
1974 tool
="$rootdir/tools/scramble -add=d2"
1976 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1977 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1979 bootoutput
="bootloader-cowond2.bin"
1980 appextra
="recorder:gui:radio"
1983 toolset
="$tccbitmaptools"
1984 # architecture, manufacturer and model for the target-tree build
1986 t_manufacturer
="tcc780x"
1992 modelname
="iaudiom3"
1996 tool
="$rootdir/tools/scramble -add=iam3"
1997 boottool
="$rootdir/tools/scramble -iaudiom3"
1998 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1999 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2000 output
="rockbox.iaudio"
2001 bootoutput
="cowon_m3.bin"
2002 appextra
="recorder:gui:radio"
2005 # toolset is the tools within the tools directory that we build for
2006 # this particular target.
2007 toolset
="$iaudiobitmaptools"
2008 # architecture, manufacturer and model for the target-tree build
2010 t_manufacturer
="iaudio"
2016 modelname
="gigabeatfx"
2020 tool
="$rootdir/tools/scramble -add=giga"
2021 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2022 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2023 output
="rockbox.gigabeat"
2024 appextra
="recorder:gui:radio"
2027 toolset
=$gigabeatbitmaptools
2028 boottool
="$rootdir/tools/scramble -gigabeat"
2029 bootoutput
="FWIMG01.DAT"
2030 # architecture, manufacturer and model for the target-tree build
2032 t_manufacturer
="s3c2440"
2033 t_model
="gigabeat-fx"
2038 modelname
="gigabeats"
2042 tool
="$rootdir/tools/scramble -add=gigs"
2043 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2044 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2045 output
="rockbox.gigabeat"
2046 appextra
="recorder:gui:radio"
2049 toolset
="$gigabeatbitmaptools"
2050 boottool
="$rootdir/tools/scramble -gigabeats"
2052 # architecture, manufacturer and model for the target-tree build
2054 t_manufacturer
="imx31"
2055 t_model
="gigabeat-s"
2060 modelname
="mrobe500"
2064 tool
="$rootdir/tools/scramble -add=m500"
2065 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2066 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2067 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2068 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2069 output
="rockbox.mrobe500"
2070 appextra
="recorder:gui:radio"
2073 toolset
=$gigabeatbitmaptools
2075 bootoutput
="rockbox.mrboot"
2076 # architecture, manufacturer and model for the target-tree build
2078 t_manufacturer
="tms320dm320"
2084 modelname
="mrobe100"
2088 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2089 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2090 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2091 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2092 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2093 output
="rockbox.mi4"
2094 appextra
="recorder:gui:radio"
2097 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2098 bootoutput
="pp5020.mi4"
2099 # toolset is the tools within the tools directory that we build for
2100 # this particular target.
2101 toolset
=$scramblebitmaptools
2102 # architecture, manufacturer and model for the target-tree build
2105 t_manufacturer
="olympus"
2111 modelname
="logikdax"
2115 tool
="$rootdir/tools/scramble -add=ldax"
2116 boottool
="$rootdir/tools/scramble -tcc=crc"
2117 bootoutput
="player.rom"
2118 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2119 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2120 output
="rockbox.logik"
2121 appextra
="recorder:gui:radio"
2124 # toolset is the tools within the tools directory that we build for
2125 # this particular target.
2126 toolset
=$tccbitmaptools
2127 # architecture, manufacturer and model for the target-tree build
2129 t_manufacturer
="tcc77x"
2135 modelname
="zenvisionm30gb"
2136 target
="CREATIVE_ZVM"
2139 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2140 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2141 tool
="$rootdir/tools/scramble -creative=zvm"
2143 output
="rockbox.zvm"
2144 appextra
="recorder:gui:radio"
2147 toolset
=$ipodbitmaptools
2148 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2149 bootoutput
="rockbox.zvmboot"
2150 # architecture, manufacturer and model for the target-tree build
2152 t_manufacturer
="tms320dm320"
2153 t_model
="creative-zvm"
2158 modelname
="zenvisionm60gb"
2159 target
="CREATIVE_ZVM60GB"
2162 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2163 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2164 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2166 output
="rockbox.zvm60"
2167 appextra
="recorder:gui:radio"
2170 toolset
=$ipodbitmaptools
2171 boottool
="$rootdir/tools/scramble -creative=zvm60"
2172 bootoutput
="rockbox.zvm60boot"
2173 # architecture, manufacturer and model for the target-tree build
2175 t_manufacturer
="tms320dm320"
2176 t_model
="creative-zvm"
2181 modelname
="zenvision"
2182 target
="CREATIVE_ZV"
2185 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2186 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2187 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2190 appextra
="recorder:gui:radio"
2193 toolset
=$ipodbitmaptools
2194 boottool
="$rootdir/tools/scramble -creative=zenvision"
2195 bootoutput
="rockbox.zvboot"
2196 # architecture, manufacturer and model for the target-tree build
2198 t_manufacturer
="tms320dm320"
2199 t_model
="creative-zvm"
2204 modelname
="sansae200"
2206 memory
=32 # supposedly
2208 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2209 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2210 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2211 output
="rockbox.mi4"
2212 appextra
="recorder:gui:radio"
2215 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2216 bootoutput
="PP5022.mi4"
2217 # toolset is the tools within the tools directory that we build for
2218 # this particular target.
2219 toolset
=$scramblebitmaptools
2220 # architecture, manufacturer and model for the target-tree build
2223 t_manufacturer
="sandisk"
2224 t_model
="sansa-e200"
2228 # the e200R model is pretty much identical to the e200, it only has a
2229 # different option to the scramble tool when building a bootloader and
2230 # makes the bootloader output file name in all lower case.
2232 modelname
="sansae200r"
2234 memory
=32 # supposedly
2236 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2237 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2238 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2239 output
="rockbox.mi4"
2240 appextra
="recorder:gui:radio"
2243 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2244 bootoutput
="pp5022.mi4"
2245 # toolset is the tools within the tools directory that we build for
2246 # this particular target.
2247 toolset
=$scramblebitmaptools
2248 # architecture, manufacturer and model for the target-tree build
2251 t_manufacturer
="sandisk"
2252 t_model
="sansa-e200"
2257 modelname
="sansac200"
2259 memory
=32 # supposedly
2261 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2262 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2263 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2264 output
="rockbox.mi4"
2265 appextra
="recorder:gui:radio"
2268 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2269 bootoutput
="firmware.mi4"
2270 # toolset is the tools within the tools directory that we build for
2271 # this particular target.
2272 toolset
=$scramblebitmaptools
2273 # architecture, manufacturer and model for the target-tree build
2276 t_manufacturer
="sandisk"
2277 t_model
="sansa-c200"
2282 modelname
="sansam200"
2286 tool
="$rootdir/tools/scramble -add=m200"
2287 boottool
="$rootdir/tools/scramble -tcc=crc"
2288 bootoutput
="player.rom"
2289 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2290 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2291 output
="rockbox.m200"
2292 appextra
="recorder:gui:radio"
2295 # toolset is the tools within the tools directory that we build for
2296 # this particular target.
2297 toolset
=$tccbitmaptools
2298 # architecture, manufacturer and model for the target-tree build
2300 t_manufacturer
="tcc77x"
2306 modelname
="sansac100"
2310 tool
="$rootdir/tools/scramble -add=c100"
2311 boottool
="$rootdir/tools/scramble -tcc=crc"
2312 bootoutput
="player.rom"
2313 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2314 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2315 output
="rockbox.c100"
2316 appextra
="recorder:gui:radio"
2319 # toolset is the tools within the tools directory that we build for
2320 # this particular target.
2321 toolset
=$tccbitmaptools
2322 # architecture, manufacturer and model for the target-tree build
2324 t_manufacturer
="tcc77x"
2330 modelname
="sansaclip"
2333 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2334 bmp2rb_native
="$bmp2rb_mono"
2335 tool
="$rootdir/tools/scramble -add=clip"
2336 output
="rockbox.sansa"
2337 bootoutput
="bootloader-clip.sansa"
2338 appextra
="recorder:gui:radio"
2341 toolset
=$scramblebitmaptools
2343 t_manufacturer
="as3525"
2344 t_model
="sansa-clip"
2345 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2347 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2353 modelname
="sansae200v2"
2354 target
="SANSA_E200V2"
2356 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2357 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2358 tool
="$rootdir/tools/scramble -add=e2v2"
2359 output
="rockbox.sansa"
2360 bootoutput
="bootloader-e200v2.sansa"
2361 appextra
="recorder:gui:radio"
2364 toolset
=$scramblebitmaptools
2366 t_manufacturer
="as3525"
2367 t_model
="sansa-e200v2"
2374 modelname
="sansam200v4"
2375 target
="SANSA_M200V4"
2377 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2378 bmp2rb_native
="$bmp2rb_mono"
2379 tool
="$rootdir/tools/scramble -add=m2v4"
2380 output
="rockbox.sansa"
2381 bootoutput
="bootloader-m200v4.sansa"
2382 appextra
="recorder:gui:radio"
2385 toolset
=$scramblebitmaptools
2387 t_manufacturer
="as3525"
2388 t_model
="sansa-m200v4"
2389 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2391 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2397 modelname
="sansafuze"
2400 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2401 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2402 tool
="$rootdir/tools/scramble -add=fuze"
2403 output
="rockbox.sansa"
2404 bootoutput
="bootloader-fuze.sansa"
2405 appextra
="recorder:gui:radio"
2408 toolset
=$scramblebitmaptools
2410 t_manufacturer
="as3525"
2411 t_model
="sansa-fuze"
2418 modelname
="sansac200v2"
2419 target
="SANSA_C200V2"
2420 memory
=2 # as per OF diagnosis mode
2421 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2422 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2423 tool
="$rootdir/tools/scramble -add=c2v2"
2424 output
="rockbox.sansa"
2425 bootoutput
="bootloader-c200v2.sansa"
2426 appextra
="recorder:gui:radio"
2429 # toolset is the tools within the tools directory that we build for
2430 # this particular target.
2431 toolset
=$scramblebitmaptools
2432 # architecture, manufacturer and model for the target-tree build
2434 t_manufacturer
="as3525"
2435 t_model
="sansa-c200v2"
2436 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2438 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2443 modelname
="sansaclipv2"
2444 target
="SANSA_CLIPV2"
2446 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2447 bmp2rb_native
="$bmp2rb_mono"
2448 tool
="$rootdir/tools/scramble -add=clv2"
2449 output
="rockbox.sansa"
2450 bootoutput
="bootloader-clipv2.sansa"
2451 appextra
="recorder:gui:radio"
2454 toolset
=$scramblebitmaptools
2456 t_manufacturer
="as3525"
2457 t_model
="sansa-clipv2"
2462 echo "Sansa View is not yet supported!"
2465 modelname
="sansaview"
2469 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2470 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2471 output
="rockbox.mi4"
2475 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2476 bootoutput
="firmware.mi4"
2477 # toolset is the tools within the tools directory that we build for
2478 # this particular target.
2479 toolset
=$scramblebitmaptools
2482 t_manufacturer
="sandisk"
2483 t_model
="sansa-view"
2488 modelname
="sansaclipplus"
2489 target
="SANSA_CLIPPLUS"
2491 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2492 bmp2rb_native
="$bmp2rb_mono"
2493 tool
="$rootdir/tools/scramble -add=cli+"
2494 output
="rockbox.sansa"
2495 bootoutput
="bootloader-clipplus.sansa"
2496 appextra
="recorder:gui:radio"
2499 toolset
=$scramblebitmaptools
2501 t_manufacturer
="as3525"
2502 t_model
="sansa-clipplus"
2508 modelname
="sansafuzev2"
2509 target
="SANSA_FUZEV2"
2511 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2512 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2513 tool
="$rootdir/tools/scramble -add=fuz2"
2514 output
="rockbox.sansa"
2515 bootoutput
="bootloader-fuzev2.sansa"
2516 appextra
="recorder:gui:radio"
2519 toolset
=$scramblebitmaptools
2521 t_manufacturer
="as3525"
2522 t_model
="sansa-fuzev2"
2528 modelname
="sansafuzeplus"
2529 target
="SANSA_FUZEPLUS"
2531 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2532 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2533 tool
="$rootdir/tools/scramble -add=fuz+"
2534 output
="rockbox.sansa"
2535 bootoutput
="bootloader-fuzeplus.sansa"
2536 appextra
="gui:recorder:radio"
2539 toolset
=$scramblebitmaptools
2541 t_manufacturer
="imx233"
2542 t_model
="sansa-fuzeplus"
2548 modelname
="sansaclipzip"
2549 target
="SANSA_CLIPZIP"
2551 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2552 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2553 tool
="$rootdir/tools/scramble -add=clzp"
2554 output
="rockbox.sansa"
2555 bootoutput
="bootloader-clipzip.sansa"
2556 appextra
="recorder:gui:radio"
2559 toolset
=$scramblebitmaptools
2561 t_manufacturer
="as3525"
2562 t_model
="sansa-clipzip"
2568 modelname
="sansaconnect"
2569 target
="SANSA_CONNECT"
2571 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2572 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2573 tool
="$rootdir/tools/scramble -add=conn"
2574 output
="rockbox.sansa"
2575 bootoutput
="bootloader-connect.sansa"
2576 appextra
="recorder:gui"
2579 toolset
=$scramblebitmaptools
2581 t_manufacturer
="tms320dm320"
2582 t_model
="sansa-connect"
2588 modelname
="tatungtpj1022"
2589 target
="TATUNG_TPJ1022"
2592 tool
="$rootdir/tools/scramble -add tpj2"
2593 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2594 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2595 output
="rockbox.elio"
2596 appextra
="recorder:gui:radio"
2599 boottool
="$rootdir/tools/scramble -mi4v2"
2600 bootoutput
="pp5020.mi4"
2601 # toolset is the tools within the tools directory that we build for
2602 # this particular target.
2603 toolset
=$scramblebitmaptools
2604 # architecture, manufacturer and model for the target-tree build
2607 t_manufacturer
="tatung"
2613 modelname
="gogearsa9200"
2614 target
="PHILIPS_SA9200"
2615 memory
=32 # supposedly
2617 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2618 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2619 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2620 output
="rockbox.mi4"
2621 appextra
="recorder:gui:radio"
2624 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2625 bootoutput
="FWImage.ebn"
2626 # toolset is the tools within the tools directory that we build for
2627 # this particular target.
2628 toolset
=$scramblebitmaptools
2629 # architecture, manufacturer and model for the target-tree build
2632 t_manufacturer
="philips"
2638 modelname
="gogearhdd1630"
2639 target
="PHILIPS_HDD1630"
2640 memory
=32 # supposedly
2642 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2643 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2644 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2645 output
="rockbox.mi4"
2646 appextra
="recorder:gui:radio"
2649 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2650 bootoutput
="FWImage.ebn"
2651 # toolset is the tools within the tools directory that we build for
2652 # this particular target.
2653 toolset
=$scramblebitmaptools
2654 # architecture, manufacturer and model for the target-tree build
2657 t_manufacturer
="philips"
2663 modelname
="gogearhdd6330"
2664 target
="PHILIPS_HDD6330"
2667 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2668 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2669 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2670 output
="rockbox.mi4"
2671 appextra
="recorder:gui:radio"
2674 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2675 bootoutput
="FWImage.ebn"
2676 # toolset is the tools within the tools directory that we build for
2677 # this particular target.
2678 toolset
=$scramblebitmaptools
2679 # architecture, manufacturer and model for the target-tree build
2682 t_manufacturer
="philips"
2688 modelname
="meizum6sl"
2693 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2694 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2695 output
="rockbox.meizu"
2696 appextra
="recorder:gui:radio"
2699 toolset
=$genericbitmaptools
2701 bootoutput
="rockboot.ebn"
2702 # architecture, manufacturer and model for the target-tree build
2704 t_manufacturer
="s5l8700"
2705 t_model
="meizu-m6sl"
2710 modelname
="meizum6sp"
2715 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2716 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2717 output
="rockbox.meizu"
2718 appextra
="recorder:gui:radio"
2721 toolset
=$genericbitmaptools
2723 bootoutput
="rockboot.ebn"
2724 # architecture, manufacturer and model for the target-tree build
2726 t_manufacturer
="s5l8700"
2727 t_model
="meizu-m6sp"
2737 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2738 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2739 output
="rockbox.meizu"
2740 appextra
="recorder:gui:radio"
2743 toolset
=$genericbitmaptools
2745 bootoutput
="rockboot.ebn"
2746 # architecture, manufacturer and model for the target-tree build
2748 t_manufacturer
="s5l8700"
2754 modelname
="ondavx747"
2758 tool
="$rootdir/tools/scramble -add=x747"
2759 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2760 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2761 output
="rockbox.vx747"
2762 appextra
="recorder:gui:radio"
2765 toolset
=$genericbitmaptools
2766 boottool
="$rootdir/tools/scramble -ccpmp"
2767 bootoutput
="ccpmp.bin"
2768 # architecture, manufacturer and model for the target-tree build
2770 t_manufacturer
="ingenic_jz47xx"
2771 t_model
="onda_vx747"
2776 modelname
="ondavx767"
2781 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2782 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2783 output
="rockbox.vx767"
2784 appextra
="recorder:gui:radio"
2787 toolset
=$genericbitmaptools
2788 boottool
="$rootdir/tools/scramble -ccpmp"
2789 bootoutput
="ccpmp.bin"
2790 # architecture, manufacturer and model for the target-tree build
2792 t_manufacturer
="ingenic_jz47xx"
2793 t_model
="onda_vx767"
2798 modelname
="ondavx747p"
2799 target
="ONDA_VX747P"
2802 tool
="$rootdir/tools/scramble -add=747p"
2803 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2804 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2805 output
="rockbox.vx747p"
2806 appextra
="recorder:gui:radio"
2809 toolset
=$genericbitmaptools
2810 boottool
="$rootdir/tools/scramble -ccpmp"
2811 bootoutput
="ccpmp.bin"
2812 # architecture, manufacturer and model for the target-tree build
2814 t_manufacturer
="ingenic_jz47xx"
2815 t_model
="onda_vx747"
2820 modelname
="ondavx777"
2824 tool
="$rootdir/tools/scramble -add=x777"
2825 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2826 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2827 output
="rockbox.vx777"
2828 appextra
="recorder:gui:radio"
2831 toolset
=$genericbitmaptools
2832 boottool
="$rootdir/tools/scramble -ccpmp"
2833 bootoutput
="ccpmp.bin"
2834 # architecture, manufacturer and model for the target-tree build
2836 t_manufacturer
="ingenic_jz47xx"
2837 t_model
="onda_vx747"
2842 modelname
="lyreproto1"
2843 target
="LYRE_PROTO1"
2847 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2848 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2849 output
="rockbox.lyre"
2850 appextra
="recorder:gui:radio"
2853 toolset
=$scramblebitmaptools
2855 bootoutput
="bootloader-proto1.lyre"
2856 # architecture, manufacturer and model for the target-tree build
2858 t_manufacturer
="at91sam"
2859 t_model
="lyre_proto1"
2864 modelname
="mini2440"
2868 tool
="$rootdir/tools/scramble -add=m244"
2869 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2870 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2871 output
="rockbox.mini2440"
2872 appextra
="recorder:gui:radio"
2875 toolset
=$scramblebitmaptools
2877 bootoutput
="bootloader-mini2440.lyre"
2878 # architecture, manufacturer and model for the target-tree build
2880 t_manufacturer
="s3c2440"
2886 modelname
="samsungyh820"
2887 target
="SAMSUNG_YH820"
2890 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2891 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2892 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2893 output
="rockbox.mi4"
2894 appextra
="recorder:gui:radio"
2897 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2898 bootoutput
="FW_YH820.mi4"
2899 # toolset is the tools within the tools directory that we build for
2900 # this particular target.
2901 toolset
=$scramblebitmaptools
2902 # architecture, manufacturer and model for the target-tree build
2905 t_manufacturer
="samsung"
2911 modelname
="samsungyh920"
2912 target
="SAMSUNG_YH920"
2915 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2916 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2917 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2918 output
="rockbox.mi4"
2919 appextra
="recorder:gui:radio"
2922 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2923 bootoutput
="PP5020.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
2930 t_manufacturer
="samsung"
2936 modelname
="samsungyh925"
2937 target
="SAMSUNG_YH925"
2940 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2941 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2942 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2943 output
="rockbox.mi4"
2944 appextra
="recorder:gui:radio"
2947 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2948 bootoutput
="FW_YH925.mi4"
2949 # toolset is the tools within the tools directory that we build for
2950 # this particular target.
2951 toolset
=$scramblebitmaptools
2952 # architecture, manufacturer and model for the target-tree build
2955 t_manufacturer
="samsung"
2961 modelname
="samsungyps3"
2962 target
="SAMSUNG_YPS3"
2966 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2967 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2968 output
="rockbox.yps3"
2969 appextra
="recorder:gui:radio"
2972 toolset
=$genericbitmaptools
2974 bootoutput
="rockboot.ebn"
2975 # architecture, manufacturer and model for the target-tree build
2977 t_manufacturer
="s5l8700"
2984 target
="PBELL_VIBE500"
2987 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2988 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2989 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2990 output
="rockbox.mi4"
2991 appextra
="recorder:gui:radio"
2994 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2995 bootoutput
="jukebox.mi4"
2996 # toolset is the tools within the tools directory that we build for
2997 # this particular target.
2998 toolset
=$scramblebitmaptools
2999 # architecture, manufacturer and model for the target-tree build
3002 t_manufacturer
="pbell"
3008 modelname
="mpiohd200"
3012 tool
="$rootdir/tools/scramble -add=hd20"
3013 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3014 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
3015 output
="rockbox.mpio"
3016 bootoutput
="bootloader.mpio"
3017 appextra
="recorder:gui:radio"
3020 # toolset is the tools within the tools directory that we build for
3021 # this particular target.
3022 toolset
="$genericbitmaptools"
3023 # architecture, manufacturer and model for the target-tree build
3025 t_manufacturer
="mpio"
3031 modelname
="mpiohd300"
3035 tool
="$rootdir/tools/scramble -add=hd30"
3036 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3037 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
3038 output
="rockbox.mpio"
3039 bootoutput
="bootloader.mpio"
3040 appextra
="recorder:gui:radio"
3043 # toolset is the tools within the tools directory that we build for
3044 # this particular target.
3045 toolset
="$genericbitmaptools"
3046 # architecture, manufacturer and model for the target-tree build
3048 t_manufacturer
="mpio"
3054 modelname
="rk27generic"
3055 target
="RK27_GENERIC"
3058 tool
="$rootdir/tools/scramble -rkw -modelnum=73"
3059 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3060 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3061 output
="rockbox.rkw"
3062 bootoutput
="bootloader.rkw"
3063 appextra
="recorder:gui:radio"
3066 # toolset is the tools within the tools directory that we build for
3067 # this particular target.
3068 toolset
="$genericbitmaptools"
3069 # architecture, manufacturer and model for the target-tree build
3071 t_manufacturer
="rk27xx"
3072 t_model
="rk27generic"
3077 modelname
="hifimanhm60x"
3081 tool
="$rootdir/tools/scramble -rkw -modelnum=79"
3082 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3083 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3084 output
="rockbox.rkw"
3085 bootoutput
="bootloader.rkw"
3086 appextra
="recorder:gui"
3089 # toolset is the tools within the tools directory that we build for
3090 # this particular target.
3091 toolset
="$genericbitmaptools"
3092 # architecture, manufacturer and model for the target-tree build
3094 t_manufacturer
="rk27xx"
3100 modelname
="hifimanhm801"
3104 tool
="$rootdir/tools/scramble -rkw -modelnum=82"
3105 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3106 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3107 output
="rockbox.rkw"
3108 bootoutput
="bootloader.rkw"
3109 appextra
="recorder:gui"
3112 # toolset is the tools within the tools directory that we build for
3113 # this particular target.
3114 toolset
="$genericbitmaptools"
3115 # architecture, manufacturer and model for the target-tree build
3117 t_manufacturer
="rk27xx"
3133 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3134 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3136 bootoutput
="rockbox"
3137 appextra
="recorder:gui:radio"
3140 # architecture, manufacturer and model for the target-tree build
3142 t_manufacturer
="sdl"
3153 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3154 bindir
="/data/data/org.rockbox/lib"
3155 libdir
="/data/data/org.rockbox/app_rockbox"
3161 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3162 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3163 output
="librockbox.so"
3164 bootoutput
="librockbox.so"
3165 appextra
="recorder:gui:radio:hosted/android"
3168 # architecture, manufacturer and model for the target-tree build
3170 t_manufacturer
="android"
3177 modelname
="nokian8xx"
3180 sharedir
="/opt/rockbox/share/rockbox"
3181 bindir
="/opt/rockbox/bin"
3182 libdir
="/opt/rockbox/lib"
3188 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3189 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3191 bootoutput
="rockbox"
3192 appextra
="recorder:gui:radio"
3195 # architecture, manufacturer and model for the target-tree build
3197 t_manufacturer
="maemo"
3204 modelname
="nokian900"
3207 sharedir
="/opt/rockbox/share/rockbox"
3208 bindir
="/opt/rockbox/bin"
3209 libdir
="/opt/rockbox/lib"
3215 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3216 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3218 bootoutput
="rockbox"
3219 appextra
="recorder:gui:radio"
3222 # architecture, manufacturer and model for the target-tree build
3224 t_manufacturer
="maemo"
3234 sharedir
="rockbox/share/rockbox"
3235 bindir
="rockbox/bin"
3236 libdir
="rockbox/lib"
3242 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3243 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3245 bootoutput
="rockbox"
3246 appextra
="recorder:gui:radio"
3249 # architecture, manufacturer and model for the target-tree build
3251 t_manufacturer
="pandora"
3258 modelname
="samsungypr0"
3259 target
="SAMSUNG_YPR0"
3265 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3266 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3268 bootoutput
="rockbox"
3269 appextra
="recorder:gui:radio"
3272 # architecture, manufacturer and model for the target-tree build
3274 t_manufacturer
="ypr0"
3279 echo "Please select a supported target platform!"
3285 echo "Platform set to $modelname"
3289 ############################################################################
3290 # Amount of memory, for those that can differ. They have $memory unset at
3294 if [ -z "$memory" ]; then
3297 if [ "$ARG_RAM" ]; then
3300 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3313 if [ "$ARG_RAM" ]; then
3316 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3329 echo "Memory size selected: $memory MB"
3330 [ "$ARG_TYPE" ] ||
echo ""
3334 ##################################################################
3335 # Figure out build "type"
3338 # the ifp7x0 is the only platform that supports building a gdb stub like
3342 gdbstub
=", (G)DB stub"
3344 sansae200r|sansae200
)
3345 gdbstub
=", (I)nstaller"
3348 gdbstub
=", (E)raser"
3351 gdbstub
=", (E)raser"
3356 if [ "$ARG_TYPE" ]; then
3359 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (W)arble codec tool$gdbstub: (Defaults to N)"
3365 appsdir
='$(ROOTDIR)/bootloader'
3367 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3369 echo "e200R-installer build selected"
3372 appsdir
='$(ROOTDIR)/bootloader'
3374 extradefines
="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3376 echo "sansa eraser build selected"
3379 if test $t_manufacturer = "archos"; then
3380 # Archos SH-based players do this somewhat differently for
3382 appsdir
='$(ROOTDIR)/flash/bootbox'
3385 appsdir
='$(ROOTDIR)/bootloader'
3388 if test -n "$boottool"; then
3391 if test -n "$bootoutput"; then
3395 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3397 echo "Bootloader build selected"
3400 if [ "$modelname" = "sansae200r" ]; then
3401 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3406 extradefines
="$extradefines -DSIMULATOR"
3409 echo "Simulator build selected"
3412 echo "Advanced build selected"
3413 whichadvanced
$btype
3416 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3417 appsdir
='$(ROOTDIR)/gdb'
3426 echo "GDB stub build selected"
3434 extradefines
="$extradefines -DDEBUG"
3435 appsdir
='$(ROOTDIR)/tools/checkwps';
3436 output
='checkwps.'${modelname};
3438 echo "CheckWPS build selected"
3446 appsdir
='$(ROOTDIR)/tools/database';
3451 output
="database_${modelname}.exe"
3454 output
='database.'${modelname};
3458 echo "Database tool build selected"
3466 extradefines
="$extradefines -DDEBUG"
3467 output
='warble.'${modelname};
3469 echo "Warble build selected"
3472 if [ "$modelname" = "sansae200r" ]; then
3473 echo "Do not use the e200R target for regular builds. Use e200 instead."
3477 btype
="N" # set it explicitly since RET only gets here as well
3478 echo "Normal build selected"
3482 # to be able running "make manual" from non-manual configuration
3485 manualdev
="archosfmrecorder"
3488 manualdev
="iriverh100"
3491 manualdev
="ipodmini1g"
3494 manualdev
=$modelname
3498 if [ -z "$debug" ]; then
3499 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3502 if [ "yes" = "$application" ]; then
3503 echo Building Rockbox as an Application
3504 extradefines
="$extradefines -DAPPLICATION"
3507 echo "Using source code root directory: $rootdir"
3509 # this was once possible to change at build-time, but no more:
3514 if [ "yes" = "$simulator" ]; then
3515 # setup compiler and things for simulator
3518 if [ -d "simdisk" ]; then
3519 echo "Subdirectory 'simdisk' already present"
3522 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3526 # Now, figure out version number of the (gcc) compiler we are about to use
3527 gccver
=`$CC -dumpversion`;
3529 # figure out the binutil version too and display it, mostly for the build
3530 # system etc to be able to see it easier
3531 if [ $uname = "Darwin" ]; then
3532 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3534 ldver
=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
3537 if [ -z "$gccver" ]; then
3538 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3539 echo "[WARNING] this may cause your build to fail since we cannot do the"
3540 echo "[WARNING] checks we want now."
3543 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3546 num1
=`echo $gccver | cut -d . -f1`
3547 num2
=`echo $gccver | cut -d . -f2`
3548 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3555 echo "Using $CC $gccver ($gccnum)"
3557 if test "$gccnum" -ge "400"; then
3558 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3559 # so we ignore that warnings for now
3561 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3564 if test "$gccnum" -ge "402"; then
3565 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3566 # and later would throw it for several valid cases
3567 GCCOPTS
="$GCCOPTS -Wno-override-init"
3571 ""|
"$CROSS_COMPILE")
3575 # Verify that the cross-compiler is of a recommended version!
3576 if test "$gccver" != "$gccchoice"; then
3577 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3578 echo "WARNING: version $gccchoice!"
3579 echo "WARNING: This may cause your build to fail since it may be a version"
3580 echo "WARNING: that isn't functional or known to not be the best choice."
3581 echo "WARNING: If you suffer from build problems, you know that this is"
3582 echo "WARNING: a likely source for them..."
3590 echo "Using $LD $ldver"
3592 # check the compiler for SH platforms
3593 if test "$CC" = "sh-elf-gcc"; then
3594 if test "$gccnum" -lt "400"; then
3595 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3596 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3598 # figure out patch status
3599 gccpatch
=`$CC --version`;
3601 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3602 echo "gcc $gccver is rockbox patched"
3603 # then convert -O to -Os to get smaller binaries!
3604 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3606 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3607 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3612 if test "$CC" = "m68k-elf-gcc"; then
3613 # convert -O to -Os to get smaller binaries!
3614 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3617 if [ "$ARG_CCACHE" = "1" ]; then
3618 echo "Enable ccache for building"
3620 elif [ "$ARG_CCACHE" != "0" ]; then
3621 ccache
=`findtool ccache`
3622 if test -n "$ccache"; then
3623 echo "Found and uses ccache ($ccache)"
3627 # figure out the full path to the various commands if possible
3628 HOSTCC
=`findtool gcc --lit`
3629 HOSTAR
=`findtool ar --lit`
3630 CC
=`findtool ${CC} --lit`
3631 CPP
=`findtool ${CPP} --lit`
3632 LD
=`findtool ${LD} --lit`
3633 AR
=`findtool ${AR} --lit`
3634 AS
=`findtool ${AS} --lit`
3635 OC
=`findtool ${OC} --lit`
3636 WINDRES
=`findtool ${WINDRES} --lit`
3637 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3638 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3639 RANLIB
=`findtool ${RANLIB} --lit`
3642 if [ -z "$arch" ]; then
3643 cpp_defines
=$
(echo "" |
$CPP $GCCOPTS -dD)
3644 if [ -n "$(echo $cpp_defines | grep -w __sh__)" ]; then
3646 elif [ -n "$(echo $cpp_defines | grep -w __m68k__)" ]; then
3648 elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then
3650 # cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4)
3651 arch_version
="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,')"
3652 elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
3653 arch
="mips" # FIXME: autodetect version (32 or 64)
3654 elif [ -n "$(echo $cpp_defines | grep -w __i386__)" ]; then
3656 elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
3660 echo "Warning: Could not determine target arch"
3662 if [ "$arch" != "none" ]; then
3663 if [ -n "$arch_version" ]; then
3664 echo "Automatically selected arch: $arch (ver $arch_version)"
3666 echo "Automatically selected arch: $arch"
3670 if [ -n "$arch_version" ]; then
3671 echo "Manually selected arch: $arch (ver $arch_version)"
3673 echo "Manually selected arch: $arch"
3678 if [ -n "$arch_version" ]; then
3679 Darch_version
="#define ARCH_VERSION $arch_version"
3682 if test -n "$ccache"; then
3686 if test "$ARG_ARM_THUMB" = "1"; then
3687 extradefines
="$extradefines -DUSE_THUMB"
3688 CC
="$toolsdir/thumb-cc.py $CC"
3691 if test "X$endian" = "Xbig"; then
3692 defendian
="ROCKBOX_BIG_ENDIAN"
3694 defendian
="ROCKBOX_LITTLE_ENDIAN"
3697 if [ "$ARG_RBDIR" != "" ]; then
3698 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3703 echo "Using alternate rockbox dir: ${rbdir}"
3706 cat > autoconf.h
<<EOF
3707 /* This header was made by configure */
3708 #ifndef __BUILD_AUTOCONF_H
3709 #define __BUILD_AUTOCONF_H
3711 /* lower case names match the what's exported in the Makefile
3712 * upper case name looks nicer in the code */
3732 #define arch_amd64 6
3733 #define ARCH_AMD64 6
3735 /* Define target machine architecture */
3736 #define ARCH ${arch}
3737 /* Optinally define architecture version */
3740 /* Define endianess for the target or simulator platform */
3741 #define ${defendian} 1
3743 /* Define this if you build rockbox to support the logf logging and display */
3746 /* Define this if you want logf to output to the serial port */
3749 /* Define this to record a chart with timings for the stages of boot */
3752 /* optional define for a backlight modded Ondio */
3755 /* optional define for FM radio mod for iAudio M5 */
3758 /* optional define for ATA poweroff on Player */
3759 ${have_ata_poweroff}
3761 /* optional defines for RTC mod for h1x0 */
3765 /* the threading backend we use */
3766 #define ${thread_support}
3768 /* lcd dimensions for application builds from configure */
3772 /* root of Rockbox */
3773 #define ROCKBOX_DIR "${rbdir}"
3774 #define ROCKBOX_SHARE_PATH "${sharedir}"
3775 #define ROCKBOX_BINARY_PATH "${bindir}"
3776 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3778 #endif /* __BUILD_AUTOCONF_H */
3781 if test -n "$t_cpu"; then
3782 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3784 if [ "$application" = "yes" ] && [ "$t_manufacturer" = "maemo" ]; then
3785 # Maemo needs the SDL port, too
3786 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3787 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3788 elif [ "$application" = "yes" ] && [ "$t_manufacturer" = "pandora" ]; then
3789 # Pandora needs the SDL port, too
3790 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3791 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3792 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3793 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3794 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3797 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3798 test -n "$t_soc" && TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3799 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3803 if test "$swcodec" = "yes"; then
3804 voicetoolset
="rbspeexenc voicefont wavtrim"
3806 voicetoolset
="voicefont wavtrim"
3809 if test "$apps" = "apps"; then
3810 # only when we build "real" apps we build the .lng files
3814 #### Fix the cmdline ###
3815 if [ -n "$ARG_PREFIX" ]; then
3816 cmdline
="$cmdline --prefix=\$(PREFIX)"
3818 if [ -n "$ARG_LCDWIDTH" ]; then
3819 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3822 # remove parts from the cmdline we're going to set unconditionally
3823 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3824 -e s,--ram=[0-9]\*,,g \
3825 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3826 -e s,--type=[a-zA-Z]\*,,g`
3827 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3831 cat > Makefile
<<EOF
3832 ## Automatically generated. http://www.rockbox.org/
3834 export ROOTDIR=${rootdir}
3835 export FIRMDIR=\$(ROOTDIR)/firmware
3836 export APPSDIR=${appsdir}
3837 export TOOLSDIR=${toolsdir}
3838 export DOCSDIR=${rootdir}/docs
3839 export MANUALDIR=${rootdir}/manual
3840 export DEBUG=${debug}
3841 export MODELNAME=${modelname}
3842 export ARCHOSROM=${archosrom}
3843 export FLASHFILE=${flash}
3844 export TARGET_ID=${target_id}
3845 export TARGET=-D${target}
3847 export ARCH_VERSION=${arch_version}
3849 export MANUFACTURER=${t_manufacturer}
3850 export OBJDIR=${pwd}
3851 export BUILDDIR=${pwd}
3852 export RBCODEC_BLD=${pwd}/lib/rbcodec
3853 export LANGUAGE=${language}
3854 export VOICELANGUAGE=${voicelanguage}
3855 export MEMORYSIZE=${memory}
3856 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3857 export MKFIRMWARE=${tool}
3858 export BMP2RB_MONO=${bmp2rb_mono}
3859 export BMP2RB_NATIVE=${bmp2rb_native}
3860 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3861 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3862 export BINARY=${output}
3863 export APPEXTRA=${appextra}
3864 export ENABLEDPLUGINS=${plugins}
3865 export SOFTWARECODECS=${swcodec}
3866 export EXTRA_DEFINES=${extradefines}
3867 export HOSTCC=${HOSTCC}
3868 export HOSTAR=${HOSTAR}
3875 export WINDRES=${WINDRES}
3876 export DLLTOOL=${DLLTOOL}
3877 export DLLWRAP=${DLLWRAP}
3878 export RANLIB=${RANLIB}
3879 export PREFIX=${ARG_PREFIX}
3880 export PROFILE_OPTS=${PROFILE_OPTS}
3881 export APP_TYPE=${app_type}
3882 export APPLICATION=${application}
3883 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3884 export GCCOPTS=${GCCOPTS}
3885 export TARGET_INC=${TARGET_INC}
3886 export LOADADDRESS=${loadaddress}
3887 export SHARED_LDFLAG=${SHARED_LDFLAG}
3888 export SHARED_CFLAGS=${SHARED_CFLAGS}
3889 export LDOPTS=${LDOPTS}
3890 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3891 export GCCVER=${gccver}
3892 export GCCNUM=${gccnum}
3893 export UNAME=${uname}
3894 export MANUALDEV=${manualdev}
3895 export TTS_OPTS=${TTS_OPTS}
3896 export TTS_ENGINE=${TTS_ENGINE}
3897 export ENC_OPTS=${ENC_OPTS}
3898 export ENCODER=${ENCODER}
3899 export USE_ELF=${USE_ELF}
3900 export RBDIR=${rbdir}
3901 export ROCKBOX_SHARE_PATH=${sharedir}
3902 export ROCKBOX_BINARY_PATH=${bindir}
3903 export ROCKBOX_LIBRARY_PATH=${libdir}
3904 export SDLCONFIG=${sdl}
3905 export LCDORIENTATION=${lcd_orientation}
3907 CONFIGURE_OPTIONS=${cmdline}
3909 include \$(TOOLSDIR)/root.make
3912 echo "Created Makefile"