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 93) Zen X-Fi2 102) GoGear HDD6330 57) Sansa m200v4
1275 94) Zen X-Fi3 58) Sansa Fuze
1276 ==Meizu== 59) Sansa c200v2
1277 ==Onda== 110) M6SL 60) Sansa Clipv2
1278 120) VX747 111) M6SP 61) Sansa View
1279 121) VX767 112) M3 62) Sansa Clip+
1280 122) VX747+ 63) Sansa Fuze v2
1281 123) VX777 ==Tatung== 64) Sansa Fuze+
1282 150) Elio TPJ-1022 65) Sansa Clip Zip
1283 ==Samsung== 66) Sansa Connect
1284 140) YH-820 ==Packard Bell==
1285 141) YH-920 160) Vibe 500 ==Logik==
1286 142) YH-925 80) DAX 1GB MP3/DAB
1288 170) HD200 ==Lyre project==
1289 ==Application== 171) HD300 130) Lyre proto 1
1290 200) SDL 131) Mini2440
1291 201) Android ==ROCKCHIP==
1292 202) Nokia N8xx 180) rk27xx generic ==HiFiMAN==
1293 203) Nokia N900 190) HM-60x
1294 204) Pandora 191) HM-801
1301 # Set of tools built for all target platforms:
1302 toolset
="rdf2binary convbdf codepages"
1304 # Toolsets for some target families:
1305 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1306 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1307 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1308 ipodbitmaptools
="$toolset scramble bmp2rb"
1309 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1310 tccbitmaptools
="$toolset scramble bmp2rb"
1311 # generic is used by IFP, Meizu and Onda
1312 genericbitmaptools
="$toolset bmp2rb"
1313 # scramble is used by all other targets
1314 scramblebitmaptools
="$genericbitmaptools scramble"
1317 # ---- For each target ----
1320 # target_id: a unique number identifying this target, IS NOT the menu number.
1321 # Just use the currently highest number+1 when you add a new
1323 # modelname: short model name used all over to identify this target
1324 # memory: number of megabytes of RAM this target has. If the amount can
1325 # be selected by the size prompt, let memory be unset here
1326 # target: -Ddefine passed to the build commands to make the correct
1327 # config-*.h file get included etc
1328 # tool: the tool that takes a plain binary and converts that into a
1329 # working "firmware" file for your target
1330 # output: the final output file name
1331 # boottool: the tool that takes a plain binary and generates a bootloader
1332 # file for your target (or blank to use $tool)
1333 # bootoutput:the final output file name for the bootloader (or blank to use
1335 # appextra: passed to the APPEXTRA variable in the Makefiles.
1336 # TODO: add proper explanation
1337 # archosrom: used only for Archos targets that build a special flashable .ucl
1339 # flash: name of output for flashing, for targets where there's a special
1340 # file output for this.
1341 # plugins: set to 'yes' to build the plugins. Early development builds can
1342 # set this to no in the early stages to have an easier life for a
1344 # swcodec: set 'yes' on swcodec targets
1345 # toolset: lists what particular tools in the tools/ directory that this
1346 # target needs to have built prior to building Rockbox
1349 # *cc: sets up gcc and compiler options for your target builds. Note
1350 # that if you select a simulator build, the compiler selection is
1351 # overridden later in the script.
1357 modelname
="archosplayer"
1358 target
="ARCHOS_PLAYER"
1360 tool
="$rootdir/tools/scramble"
1362 appextra
="player:gui"
1363 archosrom
="$pwd/rombox.ucl"
1364 flash
="$pwd/rockbox.ucl"
1368 # toolset is the tools within the tools directory that we build for
1369 # this particular target.
1370 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1372 # Note: the convbdf is present in the toolset just because: 1) the
1373 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1374 # build the player simulator
1377 t_manufacturer
="archos"
1383 modelname
="archosrecorder"
1384 target
="ARCHOS_RECORDER"
1386 tool
="$rootdir/tools/scramble"
1387 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1388 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1390 appextra
="recorder:gui:radio"
1391 #archosrom="$pwd/rombox.ucl"
1392 flash
="$pwd/rockbox.ucl"
1395 # toolset is the tools within the tools directory that we build for
1396 # this particular target.
1397 toolset
=$archosbitmaptools
1399 t_manufacturer
="archos"
1405 modelname
="archosfmrecorder"
1406 target
="ARCHOS_FMRECORDER"
1408 tool
="$rootdir/tools/scramble -fm"
1409 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1410 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1412 appextra
="recorder:gui:radio"
1413 #archosrom="$pwd/rombox.ucl"
1414 flash
="$pwd/rockbox.ucl"
1417 # toolset is the tools within the tools directory that we build for
1418 # this particular target.
1419 toolset
=$archosbitmaptools
1421 t_manufacturer
="archos"
1427 modelname
="archosrecorderv2"
1428 target
="ARCHOS_RECORDERV2"
1430 tool
="$rootdir/tools/scramble -v2"
1431 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1432 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1434 appextra
="recorder:gui:radio"
1435 #archosrom="$pwd/rombox.ucl"
1436 flash
="$pwd/rockbox.ucl"
1439 # toolset is the tools within the tools directory that we build for
1440 # this particular target.
1441 toolset
=$archosbitmaptools
1443 t_manufacturer
="archos"
1449 modelname
="archosondiosp"
1450 target
="ARCHOS_ONDIOSP"
1452 tool
="$rootdir/tools/scramble -osp"
1453 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1454 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1456 appextra
="recorder:gui:radio"
1457 #archosrom="$pwd/rombox.ucl"
1458 flash
="$pwd/rockbox.ucl"
1461 # toolset is the tools within the tools directory that we build for
1462 # this particular target.
1463 toolset
=$archosbitmaptools
1465 t_manufacturer
="archos"
1471 modelname
="archosondiofm"
1472 target
="ARCHOS_ONDIOFM"
1474 tool
="$rootdir/tools/scramble -ofm"
1475 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1476 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1478 appextra
="recorder:gui:radio"
1479 #archosrom="$pwd/rombox.ucl"
1480 flash
="$pwd/rockbox.ucl"
1483 toolset
=$archosbitmaptools
1485 t_manufacturer
="archos"
1491 modelname
="archosav300"
1492 target
="ARCHOS_AV300"
1495 tool
="$rootdir/tools/scramble -mm=C"
1496 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1497 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1499 appextra
="recorder:gui:radio"
1502 # toolset is the tools within the tools directory that we build for
1503 # this particular target.
1504 toolset
="$toolset scramble descramble bmp2rb"
1505 # architecture, manufacturer and model for the target-tree build
1507 t_manufacturer
="archos"
1513 modelname
="iriverh120"
1514 target
="IRIVER_H120"
1517 tool
="$rootdir/tools/scramble -add=h120"
1518 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1519 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1520 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1521 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1522 output
="rockbox.iriver"
1523 bootoutput
="bootloader.iriver"
1524 appextra
="recorder:gui:radio"
1525 flash
="$pwd/rombox.iriver"
1528 # toolset is the tools within the tools directory that we build for
1529 # this particular target.
1530 toolset
=$iriverbitmaptools
1532 t_manufacturer
="iriver"
1538 modelname
="iriverh300"
1539 target
="IRIVER_H300"
1542 tool
="$rootdir/tools/scramble -add=h300"
1543 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1544 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1545 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1546 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1547 output
="rockbox.iriver"
1548 appextra
="recorder:gui:radio"
1551 # toolset is the tools within the tools directory that we build for
1552 # this particular target.
1553 toolset
=$iriverbitmaptools
1555 t_manufacturer
="iriver"
1561 modelname
="iriverh100"
1562 target
="IRIVER_H100"
1565 tool
="$rootdir/tools/scramble -add=h100"
1566 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1567 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1568 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1569 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1570 output
="rockbox.iriver"
1571 bootoutput
="bootloader.iriver"
1572 appextra
="recorder:gui:radio"
1573 flash
="$pwd/rombox.iriver"
1576 # toolset is the tools within the tools directory that we build for
1577 # this particular target.
1578 toolset
=$iriverbitmaptools
1580 t_manufacturer
="iriver"
1586 modelname
="iriverifp7xx"
1587 target
="IRIVER_IFP7XX"
1591 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1592 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1593 output
="rockbox.wma"
1594 appextra
="recorder:gui:radio"
1597 # toolset is the tools within the tools directory that we build for
1598 # this particular target.
1599 toolset
=$genericbitmaptools
1601 t_manufacturer
="pnx0101"
1602 t_model
="iriver-ifp7xx"
1607 modelname
="iriverh10"
1611 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1612 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1613 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1614 output
="rockbox.mi4"
1615 appextra
="recorder:gui:radio"
1618 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1619 bootoutput
="H10_20GC.mi4"
1620 # toolset is the tools within the tools directory that we build for
1621 # this particular target.
1622 toolset
=$scramblebitmaptools
1623 # architecture, manufacturer and model for the target-tree build
1626 t_manufacturer
="iriver"
1632 modelname
="iriverh10_5gb"
1633 target
="IRIVER_H10_5GB"
1636 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1637 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1638 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1639 output
="rockbox.mi4"
1640 appextra
="recorder:gui:radio"
1643 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1644 bootoutput
="H10.mi4"
1645 # toolset is the tools within the tools directory that we build for
1646 # this particular target.
1647 toolset
=$scramblebitmaptools
1648 # architecture, manufacturer and model for the target-tree build
1651 t_manufacturer
="iriver"
1657 modelname
="ipodcolor"
1661 tool
="$rootdir/tools/scramble -add=ipco"
1662 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1663 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1664 output
="rockbox.ipod"
1665 appextra
="recorder:gui:radio"
1668 bootoutput
="bootloader-$modelname.ipod"
1669 # toolset is the tools within the tools directory that we build for
1670 # this particular target.
1671 toolset
=$ipodbitmaptools
1672 # architecture, manufacturer and model for the target-tree build
1675 t_manufacturer
="ipod"
1681 modelname
="ipodnano1g"
1685 tool
="$rootdir/tools/scramble -add=nano"
1686 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1687 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1688 output
="rockbox.ipod"
1689 appextra
="recorder:gui:radio"
1692 bootoutput
="bootloader-$modelname.ipod"
1693 # toolset is the tools within the tools directory that we build for
1694 # this particular target.
1695 toolset
=$ipodbitmaptools
1696 # architecture, manufacturer and model for the target-tree build
1699 t_manufacturer
="ipod"
1705 modelname
="ipodvideo"
1707 memory
=64 # always. This is reduced at runtime if needed
1709 tool
="$rootdir/tools/scramble -add=ipvd"
1710 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1711 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1712 output
="rockbox.ipod"
1713 appextra
="recorder:gui:radio"
1716 bootoutput
="bootloader-$modelname.ipod"
1717 # toolset is the tools within the tools directory that we build for
1718 # this particular target.
1719 toolset
=$ipodbitmaptools
1720 # architecture, manufacturer and model for the target-tree build
1723 t_manufacturer
="ipod"
1733 tool
="$rootdir/tools/scramble -add=ip3g"
1734 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1735 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1736 output
="rockbox.ipod"
1737 appextra
="recorder:gui:radio"
1740 bootoutput
="bootloader-$modelname.ipod"
1741 # toolset is the tools within the tools directory that we build for
1742 # this particular target.
1743 toolset
=$ipodbitmaptools
1744 # architecture, manufacturer and model for the target-tree build
1747 t_manufacturer
="ipod"
1757 tool
="$rootdir/tools/scramble -add=ip4g"
1758 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1759 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1760 output
="rockbox.ipod"
1761 appextra
="recorder:gui:radio"
1764 bootoutput
="bootloader-$modelname.ipod"
1765 # toolset is the tools within the tools directory that we build for
1766 # this particular target.
1767 toolset
=$ipodbitmaptools
1768 # architecture, manufacturer and model for the target-tree build
1771 t_manufacturer
="ipod"
1777 modelname
="ipodmini1g"
1781 tool
="$rootdir/tools/scramble -add=mini"
1782 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1783 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1784 output
="rockbox.ipod"
1785 appextra
="recorder:gui:radio"
1788 bootoutput
="bootloader-$modelname.ipod"
1789 # toolset is the tools within the tools directory that we build for
1790 # this particular target.
1791 toolset
=$ipodbitmaptools
1792 # architecture, manufacturer and model for the target-tree build
1795 t_manufacturer
="ipod"
1801 modelname
="ipodmini2g"
1802 target
="IPOD_MINI2G"
1805 tool
="$rootdir/tools/scramble -add=mn2g"
1806 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1807 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1808 output
="rockbox.ipod"
1809 appextra
="recorder:gui:radio"
1812 bootoutput
="bootloader-$modelname.ipod"
1813 # toolset is the tools within the tools directory that we build for
1814 # this particular target.
1815 toolset
=$ipodbitmaptools
1816 # architecture, manufacturer and model for the target-tree build
1819 t_manufacturer
="ipod"
1825 modelname
="ipod1g2g"
1829 tool
="$rootdir/tools/scramble -add=1g2g"
1830 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1831 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1832 output
="rockbox.ipod"
1833 appextra
="recorder:gui:radio"
1836 bootoutput
="bootloader-$modelname.ipod"
1837 # toolset is the tools within the tools directory that we build for
1838 # this particular target.
1839 toolset
=$ipodbitmaptools
1840 # architecture, manufacturer and model for the target-tree build
1843 t_manufacturer
="ipod"
1849 modelname
="ipodnano2g"
1850 target
="IPOD_NANO2G"
1853 tool
="$rootdir/tools/scramble -add=nn2g"
1854 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1855 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1856 output
="rockbox.ipod"
1857 appextra
="recorder:gui:radio"
1860 bootoutput
="bootloader-$modelname.ipod"
1861 # toolset is the tools within the tools directory that we build for
1862 # this particular target.
1863 toolset
=$ipodbitmaptools
1864 # architecture, manufacturer and model for the target-tree build
1866 t_manufacturer
="s5l8700"
1867 t_model
="ipodnano2g"
1876 tool
="$rootdir/tools/scramble -add=ip6g"
1877 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1878 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1879 output
="rockbox.ipod"
1880 appextra
="recorder:gui:radio"
1883 bootoutput
="bootloader-$modelname.ipod"
1884 # toolset is the tools within the tools directory that we build for
1885 # this particular target.
1886 toolset
=$ipodbitmaptools
1887 # architecture, manufacturer and model for the target-tree build
1889 t_manufacturer
="s5l8702"
1895 modelname
="iaudiox5"
1899 tool
="$rootdir/tools/scramble -add=iax5"
1900 boottool
="$rootdir/tools/scramble -iaudiox5"
1901 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1902 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1903 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1904 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1905 output
="rockbox.iaudio"
1906 bootoutput
="x5_fw.bin"
1907 appextra
="recorder:gui:radio"
1910 # toolset is the tools within the tools directory that we build for
1911 # this particular target.
1912 toolset
="$iaudiobitmaptools"
1913 # architecture, manufacturer and model for the target-tree build
1915 t_manufacturer
="iaudio"
1921 modelname
="iaudiom5"
1925 tool
="$rootdir/tools/scramble -add=iam5"
1926 boottool
="$rootdir/tools/scramble -iaudiom5"
1927 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1928 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1929 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1930 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1931 output
="rockbox.iaudio"
1932 bootoutput
="m5_fw.bin"
1933 appextra
="recorder:gui:radio"
1936 # toolset is the tools within the tools directory that we build for
1937 # this particular target.
1938 toolset
="$iaudiobitmaptools"
1939 # architecture, manufacturer and model for the target-tree build
1941 t_manufacturer
="iaudio"
1951 tool
="$rootdir/tools/scramble -add=i7"
1952 boottool
="$rootdir/tools/scramble -tcc=crc"
1953 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1954 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1955 output
="rockbox.iaudio"
1956 appextra
="recorder:gui:radio"
1959 bootoutput
="I7_FW.BIN"
1960 # toolset is the tools within the tools directory that we build for
1961 # this particular target.
1962 toolset
="$tccbitmaptools"
1963 # architecture, manufacturer and model for the target-tree build
1965 t_manufacturer
="tcc77x"
1975 tool
="$rootdir/tools/scramble -add=d2"
1977 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1978 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1980 bootoutput
="bootloader-cowond2.bin"
1981 appextra
="recorder:gui:radio"
1984 toolset
="$tccbitmaptools"
1985 # architecture, manufacturer and model for the target-tree build
1987 t_manufacturer
="tcc780x"
1993 modelname
="iaudiom3"
1997 tool
="$rootdir/tools/scramble -add=iam3"
1998 boottool
="$rootdir/tools/scramble -iaudiom3"
1999 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2000 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2001 output
="rockbox.iaudio"
2002 bootoutput
="cowon_m3.bin"
2003 appextra
="recorder:gui:radio"
2006 # toolset is the tools within the tools directory that we build for
2007 # this particular target.
2008 toolset
="$iaudiobitmaptools"
2009 # architecture, manufacturer and model for the target-tree build
2011 t_manufacturer
="iaudio"
2017 modelname
="gigabeatfx"
2021 tool
="$rootdir/tools/scramble -add=giga"
2022 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2023 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2024 output
="rockbox.gigabeat"
2025 appextra
="recorder:gui:radio"
2028 toolset
=$gigabeatbitmaptools
2029 boottool
="$rootdir/tools/scramble -gigabeat"
2030 bootoutput
="FWIMG01.DAT"
2031 # architecture, manufacturer and model for the target-tree build
2033 t_manufacturer
="s3c2440"
2034 t_model
="gigabeat-fx"
2039 modelname
="gigabeats"
2043 tool
="$rootdir/tools/scramble -add=gigs"
2044 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2045 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2046 output
="rockbox.gigabeat"
2047 appextra
="recorder:gui:radio"
2050 toolset
="$gigabeatbitmaptools"
2051 boottool
="$rootdir/tools/scramble -gigabeats"
2053 # architecture, manufacturer and model for the target-tree build
2055 t_manufacturer
="imx31"
2056 t_model
="gigabeat-s"
2061 modelname
="mrobe500"
2065 tool
="$rootdir/tools/scramble -add=m500"
2066 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2067 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2068 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2069 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2070 output
="rockbox.mrobe500"
2071 appextra
="recorder:gui:radio"
2074 toolset
=$gigabeatbitmaptools
2076 bootoutput
="rockbox.mrboot"
2077 # architecture, manufacturer and model for the target-tree build
2079 t_manufacturer
="tms320dm320"
2085 modelname
="mrobe100"
2089 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2090 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2091 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2092 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2093 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2094 output
="rockbox.mi4"
2095 appextra
="recorder:gui:radio"
2098 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2099 bootoutput
="pp5020.mi4"
2100 # toolset is the tools within the tools directory that we build for
2101 # this particular target.
2102 toolset
=$scramblebitmaptools
2103 # architecture, manufacturer and model for the target-tree build
2106 t_manufacturer
="olympus"
2112 modelname
="logikdax"
2116 tool
="$rootdir/tools/scramble -add=ldax"
2117 boottool
="$rootdir/tools/scramble -tcc=crc"
2118 bootoutput
="player.rom"
2119 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2120 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2121 output
="rockbox.logik"
2122 appextra
="recorder:gui:radio"
2125 # toolset is the tools within the tools directory that we build for
2126 # this particular target.
2127 toolset
=$tccbitmaptools
2128 # architecture, manufacturer and model for the target-tree build
2130 t_manufacturer
="tcc77x"
2136 modelname
="zenvisionm30gb"
2137 target
="CREATIVE_ZVM"
2140 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2141 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2142 tool
="$rootdir/tools/scramble -creative=zvm"
2144 output
="rockbox.zvm"
2145 appextra
="recorder:gui:radio"
2148 toolset
=$ipodbitmaptools
2149 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2150 bootoutput
="rockbox.zvmboot"
2151 # architecture, manufacturer and model for the target-tree build
2153 t_manufacturer
="tms320dm320"
2154 t_model
="creative-zvm"
2159 modelname
="zenvisionm60gb"
2160 target
="CREATIVE_ZVM60GB"
2163 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2164 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2165 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2167 output
="rockbox.zvm60"
2168 appextra
="recorder:gui:radio"
2171 toolset
=$ipodbitmaptools
2172 boottool
="$rootdir/tools/scramble -creative=zvm60"
2173 bootoutput
="rockbox.zvm60boot"
2174 # architecture, manufacturer and model for the target-tree build
2176 t_manufacturer
="tms320dm320"
2177 t_model
="creative-zvm"
2182 modelname
="zenvision"
2183 target
="CREATIVE_ZV"
2186 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2187 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2188 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2191 appextra
="recorder:gui:radio"
2194 toolset
=$ipodbitmaptools
2195 boottool
="$rootdir/tools/scramble -creative=zenvision"
2196 bootoutput
="rockbox.zvboot"
2197 # architecture, manufacturer and model for the target-tree build
2199 t_manufacturer
="tms320dm320"
2200 t_model
="creative-zvm"
2205 modelname
="creativezenxfi2"
2206 target
="CREATIVE_ZENXFI2"
2208 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2209 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2210 tool
="$rootdir/tools/scramble -add=zxf2"
2211 output
="rockbox.creative"
2212 bootoutput
="bootloader-zenxfi2.creative"
2213 appextra
="gui:recorder:radio"
2216 toolset
=$scramblebitmaptools
2218 t_manufacturer
="imx233"
2219 t_model
="creative-zenxfi2"
2225 modelname
="creativezenxfi3"
2226 target
="CREATIVE_ZENXFI3"
2228 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2229 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2230 tool
="$rootdir/tools/scramble -add=zxf3"
2231 output
="rockbox.creative"
2232 bootoutput
="bootloader-zenxfi3.creative"
2233 appextra
="gui:recorder:radio"
2236 toolset
=$scramblebitmaptools
2238 t_manufacturer
="imx233"
2239 t_model
="creative-zenxfi3"
2245 modelname
="sansae200"
2247 memory
=32 # supposedly
2249 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2250 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2251 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2252 output
="rockbox.mi4"
2253 appextra
="recorder:gui:radio"
2256 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2257 bootoutput
="PP5022.mi4"
2258 # toolset is the tools within the tools directory that we build for
2259 # this particular target.
2260 toolset
=$scramblebitmaptools
2261 # architecture, manufacturer and model for the target-tree build
2264 t_manufacturer
="sandisk"
2265 t_model
="sansa-e200"
2269 # the e200R model is pretty much identical to the e200, it only has a
2270 # different option to the scramble tool when building a bootloader and
2271 # makes the bootloader output file name in all lower case.
2273 modelname
="sansae200r"
2275 memory
=32 # supposedly
2277 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2278 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2279 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2280 output
="rockbox.mi4"
2281 appextra
="recorder:gui:radio"
2284 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2285 bootoutput
="pp5022.mi4"
2286 # toolset is the tools within the tools directory that we build for
2287 # this particular target.
2288 toolset
=$scramblebitmaptools
2289 # architecture, manufacturer and model for the target-tree build
2292 t_manufacturer
="sandisk"
2293 t_model
="sansa-e200"
2298 modelname
="sansac200"
2300 memory
=32 # supposedly
2302 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2303 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2304 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2305 output
="rockbox.mi4"
2306 appextra
="recorder:gui:radio"
2309 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2310 bootoutput
="firmware.mi4"
2311 # toolset is the tools within the tools directory that we build for
2312 # this particular target.
2313 toolset
=$scramblebitmaptools
2314 # architecture, manufacturer and model for the target-tree build
2317 t_manufacturer
="sandisk"
2318 t_model
="sansa-c200"
2323 modelname
="sansam200"
2327 tool
="$rootdir/tools/scramble -add=m200"
2328 boottool
="$rootdir/tools/scramble -tcc=crc"
2329 bootoutput
="player.rom"
2330 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2331 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2332 output
="rockbox.m200"
2333 appextra
="recorder:gui:radio"
2336 # toolset is the tools within the tools directory that we build for
2337 # this particular target.
2338 toolset
=$tccbitmaptools
2339 # architecture, manufacturer and model for the target-tree build
2341 t_manufacturer
="tcc77x"
2347 modelname
="sansac100"
2351 tool
="$rootdir/tools/scramble -add=c100"
2352 boottool
="$rootdir/tools/scramble -tcc=crc"
2353 bootoutput
="player.rom"
2354 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2355 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2356 output
="rockbox.c100"
2357 appextra
="recorder:gui:radio"
2360 # toolset is the tools within the tools directory that we build for
2361 # this particular target.
2362 toolset
=$tccbitmaptools
2363 # architecture, manufacturer and model for the target-tree build
2365 t_manufacturer
="tcc77x"
2371 modelname
="sansaclip"
2374 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2375 bmp2rb_native
="$bmp2rb_mono"
2376 tool
="$rootdir/tools/scramble -add=clip"
2377 output
="rockbox.sansa"
2378 bootoutput
="bootloader-clip.sansa"
2379 appextra
="recorder:gui:radio"
2382 toolset
=$scramblebitmaptools
2384 t_manufacturer
="as3525"
2385 t_model
="sansa-clip"
2386 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2388 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2394 modelname
="sansae200v2"
2395 target
="SANSA_E200V2"
2397 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2398 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2399 tool
="$rootdir/tools/scramble -add=e2v2"
2400 output
="rockbox.sansa"
2401 bootoutput
="bootloader-e200v2.sansa"
2402 appextra
="recorder:gui:radio"
2405 toolset
=$scramblebitmaptools
2407 t_manufacturer
="as3525"
2408 t_model
="sansa-e200v2"
2415 modelname
="sansam200v4"
2416 target
="SANSA_M200V4"
2418 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2419 bmp2rb_native
="$bmp2rb_mono"
2420 tool
="$rootdir/tools/scramble -add=m2v4"
2421 output
="rockbox.sansa"
2422 bootoutput
="bootloader-m200v4.sansa"
2423 appextra
="recorder:gui:radio"
2426 toolset
=$scramblebitmaptools
2428 t_manufacturer
="as3525"
2429 t_model
="sansa-m200v4"
2430 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2432 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2438 modelname
="sansafuze"
2441 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2442 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2443 tool
="$rootdir/tools/scramble -add=fuze"
2444 output
="rockbox.sansa"
2445 bootoutput
="bootloader-fuze.sansa"
2446 appextra
="recorder:gui:radio"
2449 toolset
=$scramblebitmaptools
2451 t_manufacturer
="as3525"
2452 t_model
="sansa-fuze"
2459 modelname
="sansac200v2"
2460 target
="SANSA_C200V2"
2461 memory
=2 # as per OF diagnosis mode
2462 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2463 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2464 tool
="$rootdir/tools/scramble -add=c2v2"
2465 output
="rockbox.sansa"
2466 bootoutput
="bootloader-c200v2.sansa"
2467 appextra
="recorder:gui:radio"
2470 # toolset is the tools within the tools directory that we build for
2471 # this particular target.
2472 toolset
=$scramblebitmaptools
2473 # architecture, manufacturer and model for the target-tree build
2475 t_manufacturer
="as3525"
2476 t_model
="sansa-c200v2"
2477 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2479 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2484 modelname
="sansaclipv2"
2485 target
="SANSA_CLIPV2"
2487 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2488 bmp2rb_native
="$bmp2rb_mono"
2489 tool
="$rootdir/tools/scramble -add=clv2"
2490 output
="rockbox.sansa"
2491 bootoutput
="bootloader-clipv2.sansa"
2492 appextra
="recorder:gui:radio"
2495 toolset
=$scramblebitmaptools
2497 t_manufacturer
="as3525"
2498 t_model
="sansa-clipv2"
2503 echo "Sansa View is not yet supported!"
2506 modelname
="sansaview"
2510 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2511 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2512 output
="rockbox.mi4"
2516 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2517 bootoutput
="firmware.mi4"
2518 # toolset is the tools within the tools directory that we build for
2519 # this particular target.
2520 toolset
=$scramblebitmaptools
2523 t_manufacturer
="sandisk"
2524 t_model
="sansa-view"
2529 modelname
="sansaclipplus"
2530 target
="SANSA_CLIPPLUS"
2532 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2533 bmp2rb_native
="$bmp2rb_mono"
2534 tool
="$rootdir/tools/scramble -add=cli+"
2535 output
="rockbox.sansa"
2536 bootoutput
="bootloader-clipplus.sansa"
2537 appextra
="recorder:gui:radio"
2540 toolset
=$scramblebitmaptools
2542 t_manufacturer
="as3525"
2543 t_model
="sansa-clipplus"
2549 modelname
="sansafuzev2"
2550 target
="SANSA_FUZEV2"
2552 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2553 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2554 tool
="$rootdir/tools/scramble -add=fuz2"
2555 output
="rockbox.sansa"
2556 bootoutput
="bootloader-fuzev2.sansa"
2557 appextra
="recorder:gui:radio"
2560 toolset
=$scramblebitmaptools
2562 t_manufacturer
="as3525"
2563 t_model
="sansa-fuzev2"
2569 modelname
="sansafuzeplus"
2570 target
="SANSA_FUZEPLUS"
2572 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2573 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2574 tool
="$rootdir/tools/scramble -add=fuz+"
2575 output
="rockbox.sansa"
2576 bootoutput
="bootloader-fuzeplus.sansa"
2577 appextra
="gui:recorder:radio"
2580 toolset
=$scramblebitmaptools
2582 t_manufacturer
="imx233"
2583 t_model
="sansa-fuzeplus"
2589 modelname
="sansaclipzip"
2590 target
="SANSA_CLIPZIP"
2592 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2593 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2594 tool
="$rootdir/tools/scramble -add=clzp"
2595 output
="rockbox.sansa"
2596 bootoutput
="bootloader-clipzip.sansa"
2597 appextra
="recorder:gui:radio"
2600 toolset
=$scramblebitmaptools
2602 t_manufacturer
="as3525"
2603 t_model
="sansa-clipzip"
2609 modelname
="sansaconnect"
2610 target
="SANSA_CONNECT"
2612 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2613 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2614 tool
="$rootdir/tools/scramble -add=conn"
2615 output
="rockbox.sansa"
2616 bootoutput
="bootloader-connect.sansa"
2617 appextra
="recorder:gui"
2620 toolset
=$scramblebitmaptools
2622 t_manufacturer
="tms320dm320"
2623 t_model
="sansa-connect"
2629 modelname
="tatungtpj1022"
2630 target
="TATUNG_TPJ1022"
2633 tool
="$rootdir/tools/scramble -add tpj2"
2634 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2635 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2636 output
="rockbox.elio"
2637 appextra
="recorder:gui:radio"
2640 boottool
="$rootdir/tools/scramble -mi4v2"
2641 bootoutput
="pp5020.mi4"
2642 # toolset is the tools within the tools directory that we build for
2643 # this particular target.
2644 toolset
=$scramblebitmaptools
2645 # architecture, manufacturer and model for the target-tree build
2648 t_manufacturer
="tatung"
2654 modelname
="gogearsa9200"
2655 target
="PHILIPS_SA9200"
2656 memory
=32 # supposedly
2658 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2659 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2660 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2661 output
="rockbox.mi4"
2662 appextra
="recorder:gui:radio"
2665 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2666 bootoutput
="FWImage.ebn"
2667 # toolset is the tools within the tools directory that we build for
2668 # this particular target.
2669 toolset
=$scramblebitmaptools
2670 # architecture, manufacturer and model for the target-tree build
2673 t_manufacturer
="philips"
2679 modelname
="gogearhdd1630"
2680 target
="PHILIPS_HDD1630"
2681 memory
=32 # supposedly
2683 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2684 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2685 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2686 output
="rockbox.mi4"
2687 appextra
="recorder:gui:radio"
2690 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2691 bootoutput
="FWImage.ebn"
2692 # toolset is the tools within the tools directory that we build for
2693 # this particular target.
2694 toolset
=$scramblebitmaptools
2695 # architecture, manufacturer and model for the target-tree build
2698 t_manufacturer
="philips"
2704 modelname
="gogearhdd6330"
2705 target
="PHILIPS_HDD6330"
2708 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2709 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2710 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2711 output
="rockbox.mi4"
2712 appextra
="recorder:gui:radio"
2715 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2716 bootoutput
="FWImage.ebn"
2717 # toolset is the tools within the tools directory that we build for
2718 # this particular target.
2719 toolset
=$scramblebitmaptools
2720 # architecture, manufacturer and model for the target-tree build
2723 t_manufacturer
="philips"
2729 modelname
="meizum6sl"
2734 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2735 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2736 output
="rockbox.meizu"
2737 appextra
="recorder:gui:radio"
2740 toolset
=$genericbitmaptools
2742 bootoutput
="rockboot.ebn"
2743 # architecture, manufacturer and model for the target-tree build
2745 t_manufacturer
="s5l8700"
2746 t_model
="meizu-m6sl"
2751 modelname
="meizum6sp"
2756 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2757 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2758 output
="rockbox.meizu"
2759 appextra
="recorder:gui:radio"
2762 toolset
=$genericbitmaptools
2764 bootoutput
="rockboot.ebn"
2765 # architecture, manufacturer and model for the target-tree build
2767 t_manufacturer
="s5l8700"
2768 t_model
="meizu-m6sp"
2778 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2779 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2780 output
="rockbox.meizu"
2781 appextra
="recorder:gui:radio"
2784 toolset
=$genericbitmaptools
2786 bootoutput
="rockboot.ebn"
2787 # architecture, manufacturer and model for the target-tree build
2789 t_manufacturer
="s5l8700"
2795 modelname
="ondavx747"
2799 tool
="$rootdir/tools/scramble -add=x747"
2800 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2801 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2802 output
="rockbox.vx747"
2803 appextra
="recorder:gui:radio"
2806 toolset
=$genericbitmaptools
2807 boottool
="$rootdir/tools/scramble -ccpmp"
2808 bootoutput
="ccpmp.bin"
2809 # architecture, manufacturer and model for the target-tree build
2811 t_manufacturer
="ingenic_jz47xx"
2812 t_model
="onda_vx747"
2817 modelname
="ondavx767"
2822 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2823 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2824 output
="rockbox.vx767"
2825 appextra
="recorder:gui:radio"
2828 toolset
=$genericbitmaptools
2829 boottool
="$rootdir/tools/scramble -ccpmp"
2830 bootoutput
="ccpmp.bin"
2831 # architecture, manufacturer and model for the target-tree build
2833 t_manufacturer
="ingenic_jz47xx"
2834 t_model
="onda_vx767"
2839 modelname
="ondavx747p"
2840 target
="ONDA_VX747P"
2843 tool
="$rootdir/tools/scramble -add=747p"
2844 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2845 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2846 output
="rockbox.vx747p"
2847 appextra
="recorder:gui:radio"
2850 toolset
=$genericbitmaptools
2851 boottool
="$rootdir/tools/scramble -ccpmp"
2852 bootoutput
="ccpmp.bin"
2853 # architecture, manufacturer and model for the target-tree build
2855 t_manufacturer
="ingenic_jz47xx"
2856 t_model
="onda_vx747"
2861 modelname
="ondavx777"
2865 tool
="$rootdir/tools/scramble -add=x777"
2866 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2867 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2868 output
="rockbox.vx777"
2869 appextra
="recorder:gui:radio"
2872 toolset
=$genericbitmaptools
2873 boottool
="$rootdir/tools/scramble -ccpmp"
2874 bootoutput
="ccpmp.bin"
2875 # architecture, manufacturer and model for the target-tree build
2877 t_manufacturer
="ingenic_jz47xx"
2878 t_model
="onda_vx747"
2883 modelname
="lyreproto1"
2884 target
="LYRE_PROTO1"
2888 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2889 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2890 output
="rockbox.lyre"
2891 appextra
="recorder:gui:radio"
2894 toolset
=$scramblebitmaptools
2896 bootoutput
="bootloader-proto1.lyre"
2897 # architecture, manufacturer and model for the target-tree build
2899 t_manufacturer
="at91sam"
2900 t_model
="lyre_proto1"
2905 modelname
="mini2440"
2909 tool
="$rootdir/tools/scramble -add=m244"
2910 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2911 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2912 output
="rockbox.mini2440"
2913 appextra
="recorder:gui:radio"
2916 toolset
=$scramblebitmaptools
2918 bootoutput
="bootloader-mini2440.lyre"
2919 # architecture, manufacturer and model for the target-tree build
2921 t_manufacturer
="s3c2440"
2927 modelname
="samsungyh820"
2928 target
="SAMSUNG_YH820"
2931 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2932 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2933 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2934 output
="rockbox.mi4"
2935 appextra
="recorder:gui:radio"
2938 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2939 bootoutput
="FW_YH820.mi4"
2940 # toolset is the tools within the tools directory that we build for
2941 # this particular target.
2942 toolset
=$scramblebitmaptools
2943 # architecture, manufacturer and model for the target-tree build
2946 t_manufacturer
="samsung"
2952 modelname
="samsungyh920"
2953 target
="SAMSUNG_YH920"
2956 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2957 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2958 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2959 output
="rockbox.mi4"
2960 appextra
="recorder:gui:radio"
2963 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2964 bootoutput
="PP5020.mi4"
2965 # toolset is the tools within the tools directory that we build for
2966 # this particular target.
2967 toolset
=$scramblebitmaptools
2968 # architecture, manufacturer and model for the target-tree build
2971 t_manufacturer
="samsung"
2977 modelname
="samsungyh925"
2978 target
="SAMSUNG_YH925"
2981 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2982 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2983 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2984 output
="rockbox.mi4"
2985 appextra
="recorder:gui:radio"
2988 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2989 bootoutput
="FW_YH925.mi4"
2990 # toolset is the tools within the tools directory that we build for
2991 # this particular target.
2992 toolset
=$scramblebitmaptools
2993 # architecture, manufacturer and model for the target-tree build
2996 t_manufacturer
="samsung"
3002 modelname
="samsungyps3"
3003 target
="SAMSUNG_YPS3"
3007 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3008 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3009 output
="rockbox.yps3"
3010 appextra
="recorder:gui:radio"
3013 toolset
=$genericbitmaptools
3015 bootoutput
="rockboot.ebn"
3016 # architecture, manufacturer and model for the target-tree build
3018 t_manufacturer
="s5l8700"
3025 target
="PBELL_VIBE500"
3028 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
3029 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3030 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
3031 output
="rockbox.mi4"
3032 appextra
="recorder:gui:radio"
3035 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
3036 bootoutput
="jukebox.mi4"
3037 # toolset is the tools within the tools directory that we build for
3038 # this particular target.
3039 toolset
=$scramblebitmaptools
3040 # architecture, manufacturer and model for the target-tree build
3043 t_manufacturer
="pbell"
3049 modelname
="mpiohd200"
3053 tool
="$rootdir/tools/scramble -add=hd20"
3054 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3055 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
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
="mpiohd300"
3076 tool
="$rootdir/tools/scramble -add=hd30"
3077 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3078 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
3079 output
="rockbox.mpio"
3080 bootoutput
="bootloader.mpio"
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
="mpio"
3095 modelname
="rk27generic"
3096 target
="RK27_GENERIC"
3099 tool
="$rootdir/tools/scramble -rkw -modelnum=73"
3100 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3101 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3102 output
="rockbox.rkw"
3103 bootoutput
="bootloader.rkw"
3104 appextra
="recorder:gui:radio"
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"
3113 t_model
="rk27generic"
3118 modelname
="hifimanhm60x"
3122 tool
="$rootdir/tools/scramble -rkw -modelnum=79"
3123 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3124 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3125 output
="rockbox.rkw"
3126 bootoutput
="bootloader.rkw"
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"
3141 modelname
="hifimanhm801"
3145 tool
="$rootdir/tools/scramble -rkw -modelnum=82"
3146 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3147 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3148 output
="rockbox.rkw"
3149 bootoutput
="bootloader.rkw"
3150 appextra
="recorder:gui"
3153 # toolset is the tools within the tools directory that we build for
3154 # this particular target.
3155 toolset
="$genericbitmaptools"
3156 # architecture, manufacturer and model for the target-tree build
3158 t_manufacturer
="rk27xx"
3174 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3175 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3177 bootoutput
="rockbox"
3178 appextra
="recorder:gui:radio"
3181 # architecture, manufacturer and model for the target-tree build
3183 t_manufacturer
="sdl"
3194 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3195 bindir
="/data/data/org.rockbox/lib"
3196 libdir
="/data/data/org.rockbox/app_rockbox"
3202 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3203 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3204 output
="librockbox.so"
3205 bootoutput
="librockbox.so"
3206 appextra
="recorder:gui:radio:hosted/android"
3209 # architecture, manufacturer and model for the target-tree build
3211 t_manufacturer
="android"
3218 modelname
="nokian8xx"
3221 sharedir
="/opt/rockbox/share/rockbox"
3222 bindir
="/opt/rockbox/bin"
3223 libdir
="/opt/rockbox/lib"
3229 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3230 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3232 bootoutput
="rockbox"
3233 appextra
="recorder:gui:radio"
3236 # architecture, manufacturer and model for the target-tree build
3238 t_manufacturer
="maemo"
3245 modelname
="nokian900"
3248 sharedir
="/opt/rockbox/share/rockbox"
3249 bindir
="/opt/rockbox/bin"
3250 libdir
="/opt/rockbox/lib"
3256 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3257 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3259 bootoutput
="rockbox"
3260 appextra
="recorder:gui:radio"
3263 # architecture, manufacturer and model for the target-tree build
3265 t_manufacturer
="maemo"
3275 sharedir
="rockbox/share/rockbox"
3276 bindir
="rockbox/bin"
3277 libdir
="rockbox/lib"
3283 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3284 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3286 bootoutput
="rockbox"
3287 appextra
="recorder:gui:radio"
3290 # architecture, manufacturer and model for the target-tree build
3292 t_manufacturer
="pandora"
3299 modelname
="samsungypr0"
3300 target
="SAMSUNG_YPR0"
3306 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3307 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3309 bootoutput
="rockbox"
3310 appextra
="recorder:gui:radio"
3313 # architecture, manufacturer and model for the target-tree build
3315 t_manufacturer
="ypr0"
3320 echo "Please select a supported target platform!"
3326 echo "Platform set to $modelname"
3330 ############################################################################
3331 # Amount of memory, for those that can differ. They have $memory unset at
3335 if [ -z "$memory" ]; then
3338 if [ "$ARG_RAM" ]; then
3341 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3354 if [ "$ARG_RAM" ]; then
3357 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3370 echo "Memory size selected: $memory MB"
3371 [ "$ARG_TYPE" ] ||
echo ""
3375 ##################################################################
3376 # Figure out build "type"
3379 # the ifp7x0 is the only platform that supports building a gdb stub like
3383 gdbstub
=", (G)DB stub"
3385 sansae200r|sansae200
)
3386 gdbstub
=", (I)nstaller"
3389 gdbstub
=", (E)raser"
3392 gdbstub
=", (E)raser"
3397 if [ "$ARG_TYPE" ]; then
3400 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (W)arble codec tool$gdbstub: (Defaults to N)"
3406 appsdir
='$(ROOTDIR)/bootloader'
3408 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3410 echo "e200R-installer build selected"
3413 appsdir
='$(ROOTDIR)/bootloader'
3415 extradefines
="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3417 echo "sansa eraser build selected"
3420 if test $t_manufacturer = "archos"; then
3421 # Archos SH-based players do this somewhat differently for
3423 appsdir
='$(ROOTDIR)/flash/bootbox'
3426 appsdir
='$(ROOTDIR)/bootloader'
3429 if test -n "$boottool"; then
3432 if test -n "$bootoutput"; then
3436 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3438 echo "Bootloader build selected"
3441 if [ "$modelname" = "sansae200r" ]; then
3442 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3447 extradefines
="$extradefines -DSIMULATOR"
3450 echo "Simulator build selected"
3453 echo "Advanced build selected"
3454 whichadvanced
$btype
3457 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3458 appsdir
='$(ROOTDIR)/gdb'
3467 echo "GDB stub build selected"
3475 extradefines
="$extradefines -DDEBUG"
3476 appsdir
='$(ROOTDIR)/tools/checkwps';
3477 output
='checkwps.'${modelname};
3479 echo "CheckWPS build selected"
3487 appsdir
='$(ROOTDIR)/tools/database';
3492 output
="database_${modelname}.exe"
3495 output
='database.'${modelname};
3499 echo "Database tool build selected"
3507 extradefines
="$extradefines -DDEBUG"
3508 output
='warble.'${modelname};
3510 echo "Warble build selected"
3513 if [ "$modelname" = "sansae200r" ]; then
3514 echo "Do not use the e200R target for regular builds. Use e200 instead."
3518 btype
="N" # set it explicitly since RET only gets here as well
3519 echo "Normal build selected"
3523 # to be able running "make manual" from non-manual configuration
3526 manualdev
="archosfmrecorder"
3529 manualdev
="iriverh100"
3532 manualdev
="ipodmini1g"
3535 manualdev
=$modelname
3539 if [ -z "$debug" ]; then
3540 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3543 if [ "yes" = "$application" ]; then
3544 echo Building Rockbox as an Application
3545 extradefines
="$extradefines -DAPPLICATION"
3548 echo "Using source code root directory: $rootdir"
3550 # this was once possible to change at build-time, but no more:
3555 if [ "yes" = "$simulator" ]; then
3556 # setup compiler and things for simulator
3559 if [ -d "simdisk" ]; then
3560 echo "Subdirectory 'simdisk' already present"
3563 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3567 # Now, figure out version number of the (gcc) compiler we are about to use
3568 gccver
=`$CC -dumpversion`;
3570 # figure out the binutil version too and display it, mostly for the build
3571 # system etc to be able to see it easier
3572 if [ $uname = "Darwin" ]; then
3573 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3575 ldver
=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
3578 if [ -z "$gccver" ]; then
3579 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3580 echo "[WARNING] this may cause your build to fail since we cannot do the"
3581 echo "[WARNING] checks we want now."
3584 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3587 num1
=`echo $gccver | cut -d . -f1`
3588 num2
=`echo $gccver | cut -d . -f2`
3589 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3596 echo "Using $CC $gccver ($gccnum)"
3598 if test "$gccnum" -ge "400"; then
3599 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3600 # so we ignore that warnings for now
3602 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3605 if test "$gccnum" -ge "402"; then
3606 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3607 # and later would throw it for several valid cases
3608 GCCOPTS
="$GCCOPTS -Wno-override-init"
3612 ""|
"$CROSS_COMPILE")
3616 # Verify that the cross-compiler is of a recommended version!
3617 if test "$gccver" != "$gccchoice"; then
3618 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3619 echo "WARNING: version $gccchoice!"
3620 echo "WARNING: This may cause your build to fail since it may be a version"
3621 echo "WARNING: that isn't functional or known to not be the best choice."
3622 echo "WARNING: If you suffer from build problems, you know that this is"
3623 echo "WARNING: a likely source for them..."
3631 echo "Using $LD $ldver"
3633 # check the compiler for SH platforms
3634 if test "$CC" = "sh-elf-gcc"; then
3635 if test "$gccnum" -lt "400"; then
3636 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3637 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3639 # figure out patch status
3640 gccpatch
=`$CC --version`;
3642 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3643 echo "gcc $gccver is rockbox patched"
3644 # then convert -O to -Os to get smaller binaries!
3645 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3647 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3648 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3653 if test "$CC" = "m68k-elf-gcc"; then
3654 # convert -O to -Os to get smaller binaries!
3655 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3658 if [ "$ARG_CCACHE" = "1" ]; then
3659 echo "Enable ccache for building"
3661 elif [ "$ARG_CCACHE" != "0" ]; then
3662 ccache
=`findtool ccache`
3663 if test -n "$ccache"; then
3664 echo "Found and uses ccache ($ccache)"
3668 # figure out the full path to the various commands if possible
3669 HOSTCC
=`findtool gcc --lit`
3670 HOSTAR
=`findtool ar --lit`
3671 CC
=`findtool ${CC} --lit`
3672 CPP
=`findtool ${CPP} --lit`
3673 LD
=`findtool ${LD} --lit`
3674 AR
=`findtool ${AR} --lit`
3675 AS
=`findtool ${AS} --lit`
3676 OC
=`findtool ${OC} --lit`
3677 WINDRES
=`findtool ${WINDRES} --lit`
3678 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3679 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3680 RANLIB
=`findtool ${RANLIB} --lit`
3683 if [ -z "$arch" ]; then
3684 cpp_defines
=$
(echo "" |
$CPP $GCCOPTS -dD)
3685 if [ -n "$(echo $cpp_defines | grep -w __sh__)" ]; then
3687 elif [ -n "$(echo $cpp_defines | grep -w __m68k__)" ]; then
3689 elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then
3691 # cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4)
3692 arch_version
="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,')"
3693 elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
3694 arch
="mips" # FIXME: autodetect version (32 or 64)
3695 elif [ -n "$(echo $cpp_defines | grep -w __i386__)" ]; then
3697 elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
3701 echo "Warning: Could not determine target arch"
3703 if [ "$arch" != "none" ]; then
3704 if [ -n "$arch_version" ]; then
3705 echo "Automatically selected arch: $arch (ver $arch_version)"
3707 echo "Automatically selected arch: $arch"
3711 if [ -n "$arch_version" ]; then
3712 echo "Manually selected arch: $arch (ver $arch_version)"
3714 echo "Manually selected arch: $arch"
3719 if [ -n "$arch_version" ]; then
3720 Darch_version
="#define ARCH_VERSION $arch_version"
3723 if test -n "$ccache"; then
3727 if test "$ARG_ARM_THUMB" = "1"; then
3728 extradefines
="$extradefines -DUSE_THUMB"
3729 CC
="$toolsdir/thumb-cc.py $CC"
3732 if test "X$endian" = "Xbig"; then
3733 defendian
="ROCKBOX_BIG_ENDIAN"
3735 defendian
="ROCKBOX_LITTLE_ENDIAN"
3738 if [ "$ARG_RBDIR" != "" ]; then
3739 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3744 echo "Using alternate rockbox dir: ${rbdir}"
3747 cat > autoconf.h
<<EOF
3748 /* This header was made by configure */
3749 #ifndef __BUILD_AUTOCONF_H
3750 #define __BUILD_AUTOCONF_H
3752 /* lower case names match the what's exported in the Makefile
3753 * upper case name looks nicer in the code */
3773 #define arch_amd64 6
3774 #define ARCH_AMD64 6
3776 /* Define target machine architecture */
3777 #define ARCH ${arch}
3778 /* Optinally define architecture version */
3781 /* Define endianess for the target or simulator platform */
3782 #define ${defendian} 1
3784 /* Define this if you build rockbox to support the logf logging and display */
3787 /* Define this if you want logf to output to the serial port */
3790 /* Define this to record a chart with timings for the stages of boot */
3793 /* optional define for a backlight modded Ondio */
3796 /* optional define for FM radio mod for iAudio M5 */
3799 /* optional define for ATA poweroff on Player */
3800 ${have_ata_poweroff}
3802 /* optional defines for RTC mod for h1x0 */
3806 /* the threading backend we use */
3807 #define ${thread_support}
3809 /* lcd dimensions for application builds from configure */
3813 /* root of Rockbox */
3814 #define ROCKBOX_DIR "${rbdir}"
3815 #define ROCKBOX_SHARE_PATH "${sharedir}"
3816 #define ROCKBOX_BINARY_PATH "${bindir}"
3817 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3819 #endif /* __BUILD_AUTOCONF_H */
3822 if test -n "$t_cpu"; then
3823 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3825 if [ "$application" = "yes" ] && [ "$t_manufacturer" = "maemo" ]; then
3826 # Maemo needs the SDL port, too
3827 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3828 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3829 elif [ "$application" = "yes" ] && [ "$t_manufacturer" = "pandora" ]; then
3830 # Pandora needs the SDL port, too
3831 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3832 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3833 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3834 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3835 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3838 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3839 test -n "$t_soc" && TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3840 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3844 if test "$swcodec" = "yes"; then
3845 voicetoolset
="rbspeexenc voicefont wavtrim"
3847 voicetoolset
="voicefont wavtrim"
3850 if test "$apps" = "apps"; then
3851 # only when we build "real" apps we build the .lng files
3855 #### Fix the cmdline ###
3856 if [ -n "$ARG_PREFIX" ]; then
3857 cmdline
="$cmdline --prefix=\$(PREFIX)"
3859 if [ -n "$ARG_LCDWIDTH" ]; then
3860 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3863 # remove parts from the cmdline we're going to set unconditionally
3864 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3865 -e s,--ram=[0-9]\*,,g \
3866 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3867 -e s,--type=[a-zA-Z]\*,,g`
3868 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3872 cat > Makefile
<<EOF
3873 ## Automatically generated. http://www.rockbox.org/
3875 export ROOTDIR=${rootdir}
3876 export FIRMDIR=\$(ROOTDIR)/firmware
3877 export APPSDIR=${appsdir}
3878 export TOOLSDIR=${toolsdir}
3879 export DOCSDIR=${rootdir}/docs
3880 export MANUALDIR=${rootdir}/manual
3881 export DEBUG=${debug}
3882 export MODELNAME=${modelname}
3883 export ARCHOSROM=${archosrom}
3884 export FLASHFILE=${flash}
3885 export TARGET_ID=${target_id}
3886 export TARGET=-D${target}
3888 export ARCH_VERSION=${arch_version}
3890 export MANUFACTURER=${t_manufacturer}
3891 export OBJDIR=${pwd}
3892 export BUILDDIR=${pwd}
3893 export RBCODEC_BLD=${pwd}/lib/rbcodec
3894 export LANGUAGE=${language}
3895 export VOICELANGUAGE=${voicelanguage}
3896 export MEMORYSIZE=${memory}
3897 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3898 export MKFIRMWARE=${tool}
3899 export BMP2RB_MONO=${bmp2rb_mono}
3900 export BMP2RB_NATIVE=${bmp2rb_native}
3901 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3902 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3903 export BINARY=${output}
3904 export APPEXTRA=${appextra}
3905 export ENABLEDPLUGINS=${plugins}
3906 export SOFTWARECODECS=${swcodec}
3907 export EXTRA_DEFINES=${extradefines}
3908 export HOSTCC=${HOSTCC}
3909 export HOSTAR=${HOSTAR}
3916 export WINDRES=${WINDRES}
3917 export DLLTOOL=${DLLTOOL}
3918 export DLLWRAP=${DLLWRAP}
3919 export RANLIB=${RANLIB}
3920 export PREFIX=${ARG_PREFIX}
3921 export PROFILE_OPTS=${PROFILE_OPTS}
3922 export APP_TYPE=${app_type}
3923 export APPLICATION=${application}
3924 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3925 export GCCOPTS=${GCCOPTS}
3926 export TARGET_INC=${TARGET_INC}
3927 export LOADADDRESS=${loadaddress}
3928 export SHARED_LDFLAG=${SHARED_LDFLAG}
3929 export SHARED_CFLAGS=${SHARED_CFLAGS}
3930 export LDOPTS=${LDOPTS}
3931 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3932 export GCCVER=${gccver}
3933 export GCCNUM=${gccnum}
3934 export UNAME=${uname}
3935 export MANUALDEV=${manualdev}
3936 export TTS_OPTS=${TTS_OPTS}
3937 export TTS_ENGINE=${TTS_ENGINE}
3938 export ENC_OPTS=${ENC_OPTS}
3939 export ENCODER=${ENCODER}
3940 export USE_ELF=${USE_ELF}
3941 export RBDIR=${rbdir}
3942 export ROCKBOX_SHARE_PATH=${sharedir}
3943 export ROCKBOX_BINARY_PATH=${bindir}
3944 export ROCKBOX_LIBRARY_PATH=${libdir}
3945 export SDLCONFIG=${sdl}
3946 export LCDORIENTATION=${lcd_orientation}
3948 CONFIGURE_OPTIONS=${cmdline}
3950 include \$(TOOLSDIR)/root.make
3953 echo "Created Makefile"