3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
11 # global CC options for all platforms
12 CCOPTS
="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
14 # global LD options for all platforms
18 use_logf
="#undef ROCKBOX_HAS_LOGF"
19 use_bootchart
="#undef DO_BOOTCHART"
21 scriptver
=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
28 thread_support
="ASSEMBLER_THREADS"
34 # Begin Function Definitions
44 WINDRES
=${prefix}windres
45 DLLTOOL
=${prefix}dlltool
46 DLLWRAP
=${prefix}dllwrap
47 RANLIB
=${prefix}ranlib
55 # setup files and paths depending on the platform
56 if [ -z "$ARG_PREFIX" ]; then
57 sharedir
="/usr/local/share/rockbox"
58 bindir
="/usr/local/bin"
59 libdir
="/usr/local/lib"
61 if [ -d "$ARG_PREFIX" ]; then
62 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
63 ARG_PREFIX
=`realpath $ARG_PREFIX`
64 if [ "0" != "$?" ]; then
65 echo "ERROR: Could not get prefix path (is realpath installed?)."
69 sharedir
="$ARG_PREFIX/share/rockbox"
70 bindir
="$ARG_PREFIX/bin"
71 libdir
="$ARG_PREFIX/lib"
73 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
79 # Set the application LCD size according to the following priorities:
80 # 1) If --lcdwidth and --lcdheight are set, use them
81 # 2) If a size is passed to the app_set_lcd_size() function, use that
82 # 3) Otherwise ask the user
84 if [ -z "$ARG_LCDWIDTH" ]; then
87 if [ -z "$ARG_LCDHEIGHT" ]; then
91 echo "Enter the LCD width (default: 320)"
92 if [ -z "$ARG_LCDWIDTH" ]; then
95 app_lcd_width
="$ARG_LCDWIDTH"
97 if [ -z "$app_lcd_width" ]; then app_lcd_width
="320"; fi
98 echo "Enter the LCD height (default: 480)"
99 if [ -z "$ARG_LCDHEIGHT" ]; then
100 app_lcd_height
=`input`
102 app_lcd_height
="$ARG_LCDHEIGHT"
104 if [ -z "$app_lcd_height" ]; then app_lcd_height
="480"; fi
105 if [ $app_lcd_width -gt $app_lcd_height ]; then
106 lcd_orientation
="landscape"
108 lcd_orientation
="portrait"
110 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
111 ARG_LCDWIDTH
=$app_lcd_width
112 ARG_LCDHEIGHT
=$app_lcd_height
114 app_lcd_width
="#define LCD_WIDTH $app_lcd_width"
115 app_lcd_height
="#define LCD_HEIGHT $app_lcd_height"
119 if [ "$ARG_ARM_EABI" != "0" ]; then
120 prefixtools arm-elf-eabi-
128 # scan the $PATH for the given command
135 # echo "checks for $file in $path" >&2
136 if test -f "$path/$file"; then
141 # check whether caller wants literal return value if not found
142 if [ "$2" = "--lit" ]; then
147 # scan the $PATH for sdl-config - check whether for a (cross-)win32
150 # sdl-config might (not) be prefixed for cross compiles so try both.
151 files
="${CROSS_COMPILE}sdl-config:sdl-config"
159 #echo "checks for $file in $path" >&2
160 if test -f "$path/$file"; then
161 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
162 if [ "yes" = "${winbuild}" ]; then
167 if [ "yes" != "${winbuild}" ]; then
177 # check for availability of sigaltstack to support our thread engine
178 check_sigaltstack
() {
179 cat >$tmpdir/check_threads.c
<<EOF
181 int main(int argc, char **argv)
184 #define NULL (void*)0
186 sigaltstack(NULL, NULL);
190 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
1> /dev
/null
192 rm -rf $tmpdir/check_threads
*
196 # check for availability of Fiber on Win32 to support our thread engine
198 cat >$tmpdir/check_threads.c
<<EOF
200 int main(int argc, char **argv)
202 ConvertThreadToFiber(NULL);
206 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
2>/dev
/null
208 rm -rf $tmpdir/check_threads
*
214 # default tool setup for native building
215 prefixtools
"$CROSS_COMPILE"
216 ARG_ARM_THUMB
=0 # can't use thumb in native builds
220 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
221 if [ "$app_type" != "sdl-app" ]; then
222 # Disable optimizations for non-app builds
223 GCCOPTS
=`echo $GCCOPTS | sed -e s/-O//`
226 GCCOPTS
="$GCCOPTS -fno-builtin -g"
228 LDOPTS
='-lm' # button-sdl.c uses sqrt()
231 endian
="" # endianess of the dap doesnt matter here
233 # default output binary name, don't override app_get_platform()
234 if [ "$app_type" != "sdl-app" ]; then
238 # default share option, override below if needed
239 SHARED_LDFLAG
="-shared"
240 SHARED_CFLAGS
="-fPIC -fvisibility=hidden"
242 if [ "$win32crosscompile" = "yes" ]; then
243 # We are crosscompiling
244 # add cross-compiler option(s)
245 LDOPTS
="$LDOPTS -mconsole"
248 CROSS_COMPILE
=${CROSS_COMPILE:-"i586-mingw32msvc-"}
250 prefixtools
"$CROSS_COMPILE"
252 endian
="little" # windows is little endian
253 echo "Enabling MMX support"
254 GCCOPTS
="$GCCOPTS -mmmx"
258 echo "Cygwin host detected"
261 LDOPTS
="$LDOPTS -mconsole"
268 echo "MinGW host detected"
271 LDOPTS
="$LDOPTS -mconsole"
277 sigaltstack
=`check_sigaltstack`
278 echo "Linux host detected"
279 LDOPTS
="$LDOPTS -ldl"
283 sigaltstack
=`check_sigaltstack`
284 echo "FreeBSD host detected"
285 LDOPTS
="$LDOPTS -ldl"
289 sigaltstack
=`check_sigaltstack`
290 echo "Darwin host detected"
291 LDOPTS
="$LDOPTS -ldl"
292 SHARED_LDFLAG
="-dynamiclib -Wl\,-single_module"
296 sigaltstack
=`check_sigaltstack`
297 echo "*Solaris host detected"
299 GCCOPTS
="$GCCOPTS -fPIC"
300 LDOPTS
="$LDOPTS -ldl"
304 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
310 if [ "$winbuild" != "yes" ]; then
311 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
312 if [ "`uname -m`" = "i686" ]; then
313 echo "Enabling MMX support"
314 GCCOPTS
="$GCCOPTS -mmmx"
318 sdl
=`findsdl $winbuild`
320 if [ -n `echo $app_type | grep "sdl"` ]; then
321 if [ -z "$sdl" ]; then
322 echo "configure didn't find sdl-config, which indicates that you"
323 echo "don't have SDL (properly) installed. Please correct and"
324 echo "re-run configure!"
327 # generic sdl-config checker
328 GCCOPTS
="$GCCOPTS `$sdl --cflags`"
329 LDOPTS
="$LDOPTS `$sdl --libs`"
334 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
335 # x86_64 supports MMX by default
337 if [ "$endian" = "" ]; then
339 cat >$tmpdir/conftest-
$id.c
<<EOF
341 int main(int argc, char **argv)
344 char *varp = (char *)&var;
351 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
352 # when cross compiling, the endianess cannot be detected because the above program doesn't run
353 # on the local machine. assume little endian but print a warning
354 endian
=`$tmpdir/conftest-$id 2> /dev/null`
355 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
364 if [ "$CROSS_COMPILE" != "" ]; then
365 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
368 if [ "$app_type" = "sdl-sim" ]; then
369 echo "Simulator environment deemed $endian endian"
370 elif [ "$app_type" = "sdl-app" ]; then
371 echo "Application environment deemed $endian endian"
372 elif [ "$app_type" = "checkwps" ]; then
373 echo "CheckWPS environment deemed $endian endian"
376 # use wildcard here to make it work even if it was named *.exe like
378 rm -f $tmpdir/conftest-
$id*
381 if [ -z "$ARG_THREAD_SUPPORT" ] ||
[ "$ARG_THREAD_SUPPORT" = "0" ]; then
382 if [ "$sigaltstack" = "0" ]; then
383 thread_support
="HAVE_SIGALTSTACK_THREADS"
384 LDOPTS
="$LDOPTS -lpthread" # pthread needed
385 echo "Selected sigaltstack threads"
386 elif [ "$fibers" = "0" ]; then
387 thread_support
="HAVE_WIN32_FIBER_THREADS"
388 echo "Selected Win32 Fiber threads"
392 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
393 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
394 thread_support
="HAVE_SDL_THREADS"
395 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
396 echo "Selected SDL threads"
398 echo "WARNING: Falling back to SDL threads"
404 # functions for setting up cross-compiler names and options
405 # also set endianess and what the exact recommended gcc version is
406 # the gcc version should most likely match what versions we build with
411 GCCOPTS
="$CCOPTS -m1"
412 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
418 prefixtools calmrisc16-unknown-elf-
419 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
420 GCCOPTIMIZE
="-fomit-frame-pointer"
425 prefixtools m68k-elf-
426 GCCOPTS
="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
427 GCCOPTIMIZE
="-fomit-frame-pointer"
434 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
435 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
436 GCCOPTS
="$GCCOPTS -mlong-calls"
438 GCCOPTIMIZE
="-fomit-frame-pointer"
444 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
445 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
446 GCCOPTS
="$GCCOPTS -mlong-calls"
448 GCCOPTIMIZE
="-fomit-frame-pointer"
454 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
455 if test "$ARG_ARM_EABI" = "0"; then
456 GCCOPTS
="$GCCOPTS -mlong-calls"
458 GCCOPTIMIZE
="-fomit-frame-pointer"
464 GCCOPTS
="$CCOPTS -mcpu=arm940t"
465 if test "$ARG_ARM_EABI" = "0"; then
466 GCCOPTS
="$GCCOPTS -mlong-calls"
468 GCCOPTIMIZE
="-fomit-frame-pointer"
474 GCCOPTS
="$CCOPTS -mcpu=arm9e"
475 if test "$ARG_ARM_EABI" = "0"; then
476 GCCOPTS
="$GCCOPTS -mlong-calls"
478 GCCOPTIMIZE
="-fomit-frame-pointer"
484 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
485 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
486 GCCOPTS
="$GCCOPTS -mlong-calls"
488 GCCOPTIMIZE
="-fomit-frame-pointer"
494 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
495 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
496 GCCOPTS
="$GCCOPTS -mlong-calls"
498 GCCOPTIMIZE
="-fomit-frame-pointer"
504 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
505 if test "$ARG_ARM_EABI" = "0"; then
506 GCCOPTS
="$GCCOPTS -mlong-calls"
508 GCCOPTIMIZE
="-fomit-frame-pointer"
514 GCCOPTS
="$CCOPTS -march=armv5te"
515 GCCOPTIMIZE
="-fomit-frame-pointer"
520 prefixtools mipsel-elf-
521 # mips is predefined, but we want it for paths. use __mips instead
522 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
523 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
524 GCCOPTIMIZE
="-fomit-frame-pointer"
530 # Scratchbox sets up "gcc" based on the active target
533 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
534 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
536 LDOPTS
="-lm -ldl $LDOPTS"
537 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
538 SHARED_LDFLAG
="-shared"
541 thread_support
="HAVE_SIGALTSTACK_THREADS"
544 # Determine maemo version
545 if pkg-config
--atleast-version=5 maemo-version
; then
546 if [ "$1" == "4" ]; then
547 echo "ERROR: Maemo 4 SDK required."
550 extradefines
="$extradefines -DMAEMO5"
551 echo "Found N900 maemo version"
553 elif pkg-config
--atleast-version=4 maemo-version
; then
554 if [ "$1" == "5" ]; then
555 echo "ERROR: Maemo 5 SDK required."
558 extradefines
="$extradefines -DMAEMO4"
559 echo "Found N8xx maemo version"
561 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
566 if [ $is_n900 -eq 1 ]; then
567 GCCOPTS
="$GCCOPTS `pkg-config --cflags sdl`"
568 LDOPTS
="$LDOPTS `pkg-config --libs sdl`"
570 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
571 LDOPTS
="$LDOPTS `sdl-config --libs`"
574 # glib and libosso support
575 GCCOPTS
="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
576 LDOPTS
="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
578 # libhal support: Battery monitoring
579 GCCOPTS
="$GCCOPTS `pkg-config --cflags hal`"
580 LDOPTS
="$LDOPTS `pkg-config --libs hal`"
582 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
583 if [ $is_n900 -eq 1 ]; then
584 # gstreamer support: Audio output.
585 GCCOPTS
="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
586 LDOPTS
="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
588 # N900 specific: libplayback support
589 GCCOPTS
="$GCCOPTS `pkg-config --cflags libplayback-1`"
590 LDOPTS
="$LDOPTS `pkg-config --libs libplayback-1`"
592 # N900 specific: Enable ARMv7 NEON support
593 if sb-conf show
-A |
grep -q -i arm
; then
594 echo "Detected ARM target"
595 GCCOPTS
="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
596 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
598 echo "Detected x86 target"
601 # N8xx specific: Enable armv5te instructions
602 if sb-conf show
-A |
grep -q -i arm
; then
603 echo "Detected ARM target"
604 GCCOPTS
="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
605 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
607 echo "Detected x86 target"
613 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
614 # You have to use the sebt3 toolchain:
615 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
617 PNDSDK
="/usr/local/angstrom/arm"
618 if [ ! -x $PNDSDK/bin
/arm-angstrom-linux-gnueabi-gcc
]; then
619 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
623 PATH
=$PNDSDK/bin
:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/bin
624 PKG_CONFIG_PATH
=$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/lib
/pkgconfig
625 LDOPTS
="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
626 PKG_CONFIG
="pkg-config"
628 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
629 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
631 LDOPTS
="-lm -ldl $LDOPTS"
632 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
633 SHARED_LDFLAG
="-shared"
636 thread_support
="HAVE_SIGALTSTACK_THREADS"
639 GCCOPTS
="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
643 prefixtools
"$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
646 GCCOPTS
="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
647 LDOPTS
="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
650 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
651 GCCOPTS
="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
652 GCCOPTS
="$GCCOPTS -ffast-math -fsingle-precision-constant"
657 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
659 LDOPTS
="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
660 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
661 SHARED_LDFLAG
="-shared"
664 thread_support
="HAVE_SIGALTSTACK_THREADS"
668 GCCOPTS
="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
672 prefixtools
"arm-ypr0-linux-gnueabi-"
676 if [ -z "$ANDROID_SDK_PATH" ]; then
677 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
678 echo "environment variable point to the root directory of the Android SDK."
681 if [ -z "$ANDROID_NDK_PATH" ]; then
682 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
683 echo "environment variable point to the root directory of the Android NDK."
686 buildhost
=$
(uname |
tr "[:upper:]" "[:lower:]")
688 gcctarget
="arm-linux-androideabi-"
689 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
690 PATH
=$PATH:$gccprefix/bin
691 prefixtools
$gcctarget
692 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
693 GCCOPTS
="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
694 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
695 GLOBAL_LDOPTS
="-Wl,-z,defs -Wl,-z,noexecstack"
696 LDOPTS
="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
698 SHARED_LDFLAG
="-shared"
702 atype
=`echo "$1" | cut -c 2-`
703 ##################################################################
704 # Prompt for specific developer options
706 if [ "$atype" ]; then
711 printf "Enter your developer options (press only enter when done)\n\
712 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
713 (T)est plugins, S(m)all C lib:"
714 if [ "$memory" = "2" ]; then
717 if [ "$modelname" = "archosplayer" ]; then
718 printf ", Use (A)TA poweroff"
720 if [ "$t_model" = "ondio" ]; then
721 printf ", (B)acklight MOD"
723 if [ "$modelname" = "iaudiom5" ]; then
724 printf ", (F)M radio MOD"
726 if [ "$modelname" = "iriverh120" ]; then
733 while [ $cont = "1" ]; do
735 if [ "$interact" ]; then
738 option
=`echo "$atype" | cut -c 1`
743 if [ "yes" = "$profile" ]; then
744 echo "Debug is incompatible with profiling"
746 echo "DEBUG build enabled"
751 echo "logf() support enabled"
755 echo "Using Rockbox' small C library"
756 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
759 echo "Including test plugins"
760 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
763 echo "bootchart enabled (logf also enabled)"
768 echo "Simulator build enabled"
772 if [ "yes" = "$use_debug" ]; then
773 echo "Profiling is incompatible with debug"
775 echo "Profiling support is enabled"
780 echo "Voice build selected"
784 if [ "$memory" = "2" ]; then
786 echo "Memory size selected: 8MB"
790 if [ "$modelname" = "archosplayer" ]; then
791 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
792 echo "ATA power off enabled"
796 if [ "$t_model" = "ondio" ]; then
797 have_backlight
="#define HAVE_BACKLIGHT"
798 echo "Backlight functions enabled"
802 if [ "$modelname" = "iaudiom5" ]; then
803 have_fmradio_in
="#define HAVE_FMRADIO_IN"
804 echo "FM radio functions enabled"
808 if [ "$modelname" = "iriverh120" ]; then
809 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
810 have_rtc_alarm
="#define HAVE_RTC_ALARM"
811 echo "RTC functions enabled (DS1339/DS3231)"
815 echo "Enabling Windows 32 cross-compiling"
816 win32crosscompile
="yes"
818 "") # Match enter press when finished with advanced options
822 echo "[ERROR] Option $option unsupported"
825 if [ "$interact" ]; then
826 btype
="$btype$option"
828 atype
=`echo "$atype" | cut -c 2-`
829 [ "$atype" ] || cont
=0
834 if [ "yes" = "$voice" ]; then
835 # Ask about languages to build
837 voicelanguage
=`whichlang`
838 echo "Voice language set to $voicelanguage"
840 # Configure encoder and TTS engine for each language
841 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
842 voiceconfig
"$thislang"
845 if [ "yes" = "$use_debug" ]; then
847 GCCOPTS
="$GCCOPTS -g -DDEBUG"
849 if [ "yes" = "$logf" ]; then
850 use_logf
="#define ROCKBOX_HAS_LOGF 1"
852 if [ "yes" = "$bootchart" ]; then
853 use_bootchart
="#define DO_BOOTCHART 1"
855 if [ "yes" = "$simulator" ]; then
857 extradefines
="$extradefines -DSIMULATOR"
861 if [ "yes" = "$profile" ]; then
862 extradefines
="$extradefines -DRB_PROFILE"
863 PROFILE_OPTS
="-finstrument-functions"
867 # Configure voice settings
870 if [ ! "$ARG_TTS" ]; then
871 echo "Building $thislang voice for $modelname. Select options"
875 if [ -n "`findtool flite`" ]; then
879 DEFAULT_TTS_OPTS
=$FLITE_OPTS
880 DEFAULT_NOISEFLOOR
="500"
883 if [ -n "`findtool espeak`" ]; then
887 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
888 DEFAULT_NOISEFLOOR
="500"
891 if [ -n "`findtool festival`" ]; then
892 FESTIVAL
="(F)estival "
895 FESTIVAL_OPTS
="--language italian"
898 FESTIVAL_OPTS
="--language spanish"
901 FESTIVAL_OPTS
="--language finnish"
904 FESTIVAL_OPTS
="--language czech"
910 DEFAULT_TTS
="festival"
911 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
912 DEFAULT_NOISEFLOOR
="500"
915 if [ -n "`findtool swift`" ]; then
919 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
920 DEFAULT_NOISEFLOOR
="500"
923 # Allow SAPI if Windows is in use
924 if [ -n "`findtool winver`" ]; then
928 DEFAULT_TTS_OPTS
=$SAPI_OPTS
929 DEFAULT_NOISEFLOOR
="500"
933 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
934 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
938 if [ "$ARG_TTS" ]; then
941 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
944 advopts
="$advopts --tts=$option"
948 NOISEFLOOR
="500" # TODO: check this value
954 TTS_OPTS
=$ESPEAK_OPTS
957 TTS_ENGINE
="festival"
959 TTS_OPTS
=$FESTIVAL_OPTS
972 TTS_ENGINE
=$DEFAULT_TTS
973 TTS_OPTS
=$DEFAULT_TTS_OPTS
974 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
976 echo "Using $TTS_ENGINE for TTS"
978 # Select which voice to use for Festival
979 if [ "$TTS_ENGINE" = "festival" ]; then
980 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
981 for voice
in $voicelist; do
982 TTS_FESTIVAL_VOICE
="$voice" # Default choice
985 if [ "$ARG_VOICE" ]; then
989 for voice
in $voicelist; do
990 printf "%3d. %s\n" "$i" "$voice"
993 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
997 for voice
in $voicelist; do
998 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
999 TTS_FESTIVAL_VOICE
="$voice"
1003 advopts
="$advopts --voice=$CHOICE"
1004 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1005 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1008 # Read custom tts options from command line
1009 if [ "$ARG_TTSOPTS" ]; then
1010 TTS_OPTS
="$ARG_TTSOPTS"
1011 advopts
="$advopts --ttsopts='$TTS_OPTS'"
1012 echo "$TTS_ENGINE options set to $TTS_OPTS"
1015 if [ "$swcodec" = "yes" ]; then
1016 ENCODER
="rbspeexenc"
1017 ENC_OPTS
="-q 4 -c 10"
1019 if [ -n "`findtool lame`" ]; then
1021 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1023 echo "You need LAME in the system path to build voice files for"
1024 echo "HWCODEC targets."
1029 echo "Using $ENCODER for encoding voice clips"
1031 # Read custom encoder options from command line
1032 if [ "$ARG_ENCOPTS" ]; then
1033 ENC_OPTS
="$ARG_ENCOPTS"
1034 advopts
="$advopts --encopts='$ENC_OPTS'"
1035 echo "$ENCODER options set to $ENC_OPTS"
1039 if [ -n "`findtool cygpath`" ]; then
1040 TEMPDIR
=`cygpath . -a -w`
1045 # figure out which languages that are around
1046 for file in $rootdir/apps
/lang
/*.lang
; do
1047 clean
=`basename $file .lang`
1048 langs
="$langs $clean"
1051 if [ "$ARG_LANG" ]; then
1054 echo "Select a number for the language to use (default is english)"
1055 # FIXME The multiple-language feature is currently broken
1056 # echo "You may enter a comma-separated list of languages to build"
1059 for one
in $langs; do
1065 advopts
="$advopts --language=$pick"
1070 # Allow the user to pass a comma-separated list of langauges
1071 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1073 for one
in $langs; do
1074 # Accept both the language number and name
1075 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1076 if [ "$output" = "" ]; then
1085 if [ -z "$output" ]; then
1093 echo "Rockbox configure script."
1094 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1095 echo "Do *NOT* run this within the tools directory!"
1098 Usage: configure [OPTION]...
1100 --target=TARGET Sets the target, TARGET can be either the target ID or
1101 corresponding string. Run without this option to see all
1104 --ram=RAM Sets the RAM for certain targets. Even though any number
1105 is accepted, not every number is correct. The default
1106 value will be applied, if you entered a wrong number
1107 (which depends on the target). Watch the output. Run
1108 without this option if you are not sure which the right
1111 --type=TYPE Sets the build type. Shortcuts are also valid.
1112 Run without this option to see all available types.
1113 Multiple values are allowed and managed in the input
1114 order. So --type=b stands for Bootloader build, while
1115 --type=ab stands for "Backlight MOD" build.
1117 --lcdwidth=X Sets the width of the LCD. Used only for application
1120 --lcdheight=Y Sets the height of the LCD. Used only for application
1123 --language=LANG Set the language used for voice generation (used only if
1126 --tts=ENGINE Set the TTS engine used for voice generation (used only
1129 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1132 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1134 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1136 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1137 This is useful for having multiple alternate builds on
1138 your device that you can load with ROLO. However as the
1139 bootloader looks for .rockbox you won't be able to boot
1142 --ccache Enable ccache use (done by default these days)
1143 --no-ccache Disable ccache use
1145 --eabi Make configure prefer toolchains that are able to compile
1146 for the new ARM standard abi EABI
1147 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1148 --thumb Build with -mthumb (for ARM builds)
1149 --no-thumb The opposite of --thumb (don't use thumb even for targets
1150 where this is the default
1151 --sdl-threads Force use of SDL threads. They have inferior performance,
1152 but are better debuggable with GDB
1153 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1154 behavior of falling back to them if no native thread
1156 --prefix Target installation directory
1157 --help Shows this message (must not be used with other options)
1176 ARG_PREFIX
="$PREFIX"
1181 --ccache) ARG_CCACHE
=1;;
1182 --no-ccache) ARG_CCACHE
=0;;
1183 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1184 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1185 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1186 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1187 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1188 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1189 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1190 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1191 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1192 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1193 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1194 --eabi) ARG_ARM_EABI
=1;;
1195 --no-eabi) ARG_ARM_EABI
=0;;
1196 --thumb) ARG_ARM_THUMB
=1;;
1197 --no-thumb) ARG_ARM_THUMB
=0;;
1198 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1200 ARG_THREAD_SUPPORT
=0;;
1201 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1203 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1206 [ "$err" ] && exit 1
1210 if [ "$TMPDIR" != "" ]; then
1215 echo Using temporary directory
$tmpdir
1217 if test -r "configure"; then
1218 # this is a check for a configure script in the current directory, it there
1219 # is one, try to figure out if it is this one!
1221 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1222 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1223 echo "It will only cause you pain and grief. Instead do this:"
1226 echo " mkdir build-dir"
1227 echo " cd build-dir"
1228 echo " ../tools/configure"
1230 echo "Much happiness will arise from this. Enjoy"
1235 # get our current directory
1238 if { echo $pwd |
grep " "; } then
1239 echo "You're running this script in a path that contains space. The build"
1240 echo "system is unfortunately not clever enough to deal with this. Please"
1241 echo "run the script from a different path, rename the path or fix the build"
1246 if [ -z "$rootdir" ]; then
1247 ##################################################################
1248 # Figure out where the source code root is!
1250 rootdir
=`dirname $0`/..
/
1252 #####################################################################
1253 # Convert the possibly relative directory name to an absolute version
1259 # cd back to the build dir
1264 appsdir
='$(ROOTDIR)/apps'
1265 toolsdir
='$(ROOTDIR)/tools'
1268 ##################################################################
1269 # Figure out target platform
1272 if [ "$ARG_TARGET" ]; then
1273 buildfor
=$ARG_TARGET
1275 echo "Enter target platform:"
1277 ==Archos== ==iriver== ==Apple iPod==
1278 0) Player/Studio 10) H120/H140 20) Color/Photo
1279 1) Recorder 11) H320/H340 21) Nano 1G
1280 2) FM Recorder 12) iHP-100/110/115 22) Video
1281 3) Recorder v2 13) iFP-790 23) 3G
1282 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1283 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1284 6) AV300 26) Mini 2G
1285 ==Toshiba== 27) 1G, 2G
1286 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1287 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1289 32) 7 ==Olympus= ==SanDisk==
1290 33) D2 70) M:Robe 500 50) Sansa e200
1291 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1293 ==Creative== ==Philips== 53) Sansa m200
1294 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1295 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1296 92) Zen Vision HDD1830 56) Sansa e200v2
1297 102) GoGear HDD6330 57) Sansa m200v4
1298 ==Onda== 58) Sansa Fuze
1299 120) VX747 ==Meizu== 59) Sansa c200v2
1300 121) VX767 110) M6SL 60) Sansa Clipv2
1301 122) VX747+ 111) M6SP 61) Sansa View
1302 123) VX777 112) M3 62) Sansa Clip+
1304 ==Samsung== ==Tatung== 64) Sansa Fuze+
1305 140) YH-820 150) Elio TPJ-1022 65) Sansa Clip Zip
1306 141) YH-920 66) Sansa Connect
1307 142) YH-925 ==Packard Bell==
1308 143) YP-S3 160) Vibe 500 ==Logik==
1310 ==Application== ==MPIO==
1311 200) SDL 170) HD200 ==Lyre project==
1312 201) Android 171) HD300 130) Lyre proto 1
1313 202) Nokia N8xx 131) Mini2440
1314 203) Nokia N900 ==ROCKCHIP== ==HiFiMAN==
1315 204) Pandora 180) rk27xx generic 190) HM-60x
1316 205) Samsung YP-R0 191) HM-801
1323 # Set of tools built for all target platforms:
1324 toolset
="rdf2binary convbdf codepages"
1326 # Toolsets for some target families:
1327 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1328 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1329 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1330 ipodbitmaptools
="$toolset scramble bmp2rb"
1331 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1332 tccbitmaptools
="$toolset scramble bmp2rb"
1333 # generic is used by IFP, Meizu and Onda
1334 genericbitmaptools
="$toolset bmp2rb"
1335 # scramble is used by all other targets
1336 scramblebitmaptools
="$genericbitmaptools scramble"
1339 # ---- For each target ----
1342 # target_id: a unique number identifying this target, IS NOT the menu number.
1343 # Just use the currently highest number+1 when you add a new
1345 # modelname: short model name used all over to identify this target
1346 # memory: number of megabytes of RAM this target has. If the amount can
1347 # be selected by the size prompt, let memory be unset here
1348 # target: -Ddefine passed to the build commands to make the correct
1349 # config-*.h file get included etc
1350 # tool: the tool that takes a plain binary and converts that into a
1351 # working "firmware" file for your target
1352 # output: the final output file name
1353 # boottool: the tool that takes a plain binary and generates a bootloader
1354 # file for your target (or blank to use $tool)
1355 # bootoutput:the final output file name for the bootloader (or blank to use
1357 # appextra: passed to the APPEXTRA variable in the Makefiles.
1358 # TODO: add proper explanation
1359 # archosrom: used only for Archos targets that build a special flashable .ucl
1361 # flash: name of output for flashing, for targets where there's a special
1362 # file output for this.
1363 # plugins: set to 'yes' to build the plugins. Early development builds can
1364 # set this to no in the early stages to have an easier life for a
1366 # swcodec: set 'yes' on swcodec targets
1367 # toolset: lists what particular tools in the tools/ directory that this
1368 # target needs to have built prior to building Rockbox
1371 # *cc: sets up gcc and compiler options for your target builds. Note
1372 # that if you select a simulator build, the compiler selection is
1373 # overridden later in the script.
1379 modelname
="archosplayer"
1380 target
="ARCHOS_PLAYER"
1382 tool
="$rootdir/tools/scramble"
1384 appextra
="player:gui"
1385 archosrom
="$pwd/rombox.ucl"
1386 flash
="$pwd/rockbox.ucl"
1390 # toolset is the tools within the tools directory that we build for
1391 # this particular target.
1392 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1394 # Note: the convbdf is present in the toolset just because: 1) the
1395 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1396 # build the player simulator
1399 t_manufacturer
="archos"
1405 modelname
="archosrecorder"
1406 target
="ARCHOS_RECORDER"
1408 tool
="$rootdir/tools/scramble"
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
="archosfmrecorder"
1428 target
="ARCHOS_FMRECORDER"
1430 tool
="$rootdir/tools/scramble -fm"
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
="archosrecorderv2"
1450 target
="ARCHOS_RECORDERV2"
1452 tool
="$rootdir/tools/scramble -v2"
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
="archosondiosp"
1472 target
="ARCHOS_ONDIOSP"
1474 tool
="$rootdir/tools/scramble -osp"
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 is the tools within the tools directory that we build for
1484 # this particular target.
1485 toolset
=$archosbitmaptools
1487 t_manufacturer
="archos"
1493 modelname
="archosondiofm"
1494 target
="ARCHOS_ONDIOFM"
1496 tool
="$rootdir/tools/scramble -ofm"
1497 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1498 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1500 appextra
="recorder:gui:radio"
1501 #archosrom="$pwd/rombox.ucl"
1502 flash
="$pwd/rockbox.ucl"
1505 toolset
=$archosbitmaptools
1507 t_manufacturer
="archos"
1513 modelname
="archosav300"
1514 target
="ARCHOS_AV300"
1517 tool
="$rootdir/tools/scramble -mm=C"
1518 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1519 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1521 appextra
="recorder:gui:radio"
1524 # toolset is the tools within the tools directory that we build for
1525 # this particular target.
1526 toolset
="$toolset scramble descramble bmp2rb"
1527 # architecture, manufacturer and model for the target-tree build
1529 t_manufacturer
="archos"
1535 modelname
="iriverh120"
1536 target
="IRIVER_H120"
1539 tool
="$rootdir/tools/scramble -add=h120"
1540 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1541 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1542 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1543 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1544 output
="rockbox.iriver"
1545 bootoutput
="bootloader.iriver"
1546 appextra
="recorder:gui:radio"
1547 flash
="$pwd/rombox.iriver"
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
="iriverh300"
1561 target
="IRIVER_H300"
1564 tool
="$rootdir/tools/scramble -add=h300"
1565 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1566 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1567 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1568 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1569 output
="rockbox.iriver"
1570 appextra
="recorder:gui:radio"
1573 # toolset is the tools within the tools directory that we build for
1574 # this particular target.
1575 toolset
=$iriverbitmaptools
1577 t_manufacturer
="iriver"
1583 modelname
="iriverh100"
1584 target
="IRIVER_H100"
1587 tool
="$rootdir/tools/scramble -add=h100"
1588 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1589 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1590 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1591 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1592 output
="rockbox.iriver"
1593 bootoutput
="bootloader.iriver"
1594 appextra
="recorder:gui:radio"
1595 flash
="$pwd/rombox.iriver"
1598 # toolset is the tools within the tools directory that we build for
1599 # this particular target.
1600 toolset
=$iriverbitmaptools
1602 t_manufacturer
="iriver"
1608 modelname
="iriverifp7xx"
1609 target
="IRIVER_IFP7XX"
1613 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1614 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1615 output
="rockbox.wma"
1616 appextra
="recorder:gui:radio"
1619 # toolset is the tools within the tools directory that we build for
1620 # this particular target.
1621 toolset
=$genericbitmaptools
1623 t_manufacturer
="pnx0101"
1624 t_model
="iriver-ifp7xx"
1629 modelname
="iriverh10"
1633 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1634 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1635 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1636 output
="rockbox.mi4"
1637 appextra
="recorder:gui:radio"
1640 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1641 bootoutput
="H10_20GC.mi4"
1642 # toolset is the tools within the tools directory that we build for
1643 # this particular target.
1644 toolset
=$scramblebitmaptools
1645 # architecture, manufacturer and model for the target-tree build
1648 t_manufacturer
="iriver"
1654 modelname
="iriverh10_5gb"
1655 target
="IRIVER_H10_5GB"
1658 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1659 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1660 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1661 output
="rockbox.mi4"
1662 appextra
="recorder:gui:radio"
1665 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1666 bootoutput
="H10.mi4"
1667 # toolset is the tools within the tools directory that we build for
1668 # this particular target.
1669 toolset
=$scramblebitmaptools
1670 # architecture, manufacturer and model for the target-tree build
1673 t_manufacturer
="iriver"
1679 modelname
="ipodcolor"
1683 tool
="$rootdir/tools/scramble -add=ipco"
1684 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1685 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1686 output
="rockbox.ipod"
1687 appextra
="recorder:gui:radio"
1690 bootoutput
="bootloader-$modelname.ipod"
1691 # toolset is the tools within the tools directory that we build for
1692 # this particular target.
1693 toolset
=$ipodbitmaptools
1694 # architecture, manufacturer and model for the target-tree build
1697 t_manufacturer
="ipod"
1703 modelname
="ipodnano1g"
1707 tool
="$rootdir/tools/scramble -add=nano"
1708 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1709 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1710 output
="rockbox.ipod"
1711 appextra
="recorder:gui:radio"
1714 bootoutput
="bootloader-$modelname.ipod"
1715 # toolset is the tools within the tools directory that we build for
1716 # this particular target.
1717 toolset
=$ipodbitmaptools
1718 # architecture, manufacturer and model for the target-tree build
1721 t_manufacturer
="ipod"
1727 modelname
="ipodvideo"
1729 memory
=64 # always. This is reduced at runtime if needed
1731 tool
="$rootdir/tools/scramble -add=ipvd"
1732 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1733 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1734 output
="rockbox.ipod"
1735 appextra
="recorder:gui:radio"
1738 bootoutput
="bootloader-$modelname.ipod"
1739 # toolset is the tools within the tools directory that we build for
1740 # this particular target.
1741 toolset
=$ipodbitmaptools
1742 # architecture, manufacturer and model for the target-tree build
1745 t_manufacturer
="ipod"
1755 tool
="$rootdir/tools/scramble -add=ip3g"
1756 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1757 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1758 output
="rockbox.ipod"
1759 appextra
="recorder:gui:radio"
1762 bootoutput
="bootloader-$modelname.ipod"
1763 # toolset is the tools within the tools directory that we build for
1764 # this particular target.
1765 toolset
=$ipodbitmaptools
1766 # architecture, manufacturer and model for the target-tree build
1769 t_manufacturer
="ipod"
1779 tool
="$rootdir/tools/scramble -add=ip4g"
1780 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1781 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1782 output
="rockbox.ipod"
1783 appextra
="recorder:gui:radio"
1786 bootoutput
="bootloader-$modelname.ipod"
1787 # toolset is the tools within the tools directory that we build for
1788 # this particular target.
1789 toolset
=$ipodbitmaptools
1790 # architecture, manufacturer and model for the target-tree build
1793 t_manufacturer
="ipod"
1799 modelname
="ipodmini1g"
1803 tool
="$rootdir/tools/scramble -add=mini"
1804 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1805 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1806 output
="rockbox.ipod"
1807 appextra
="recorder:gui:radio"
1810 bootoutput
="bootloader-$modelname.ipod"
1811 # toolset is the tools within the tools directory that we build for
1812 # this particular target.
1813 toolset
=$ipodbitmaptools
1814 # architecture, manufacturer and model for the target-tree build
1817 t_manufacturer
="ipod"
1823 modelname
="ipodmini2g"
1824 target
="IPOD_MINI2G"
1827 tool
="$rootdir/tools/scramble -add=mn2g"
1828 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1829 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1830 output
="rockbox.ipod"
1831 appextra
="recorder:gui:radio"
1834 bootoutput
="bootloader-$modelname.ipod"
1835 # toolset is the tools within the tools directory that we build for
1836 # this particular target.
1837 toolset
=$ipodbitmaptools
1838 # architecture, manufacturer and model for the target-tree build
1841 t_manufacturer
="ipod"
1847 modelname
="ipod1g2g"
1851 tool
="$rootdir/tools/scramble -add=1g2g"
1852 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1853 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1854 output
="rockbox.ipod"
1855 appextra
="recorder:gui:radio"
1858 bootoutput
="bootloader-$modelname.ipod"
1859 # toolset is the tools within the tools directory that we build for
1860 # this particular target.
1861 toolset
=$ipodbitmaptools
1862 # architecture, manufacturer and model for the target-tree build
1865 t_manufacturer
="ipod"
1871 modelname
="ipodnano2g"
1872 target
="IPOD_NANO2G"
1875 tool
="$rootdir/tools/scramble -add=nn2g"
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
="s5l8700"
1889 t_model
="ipodnano2g"
1898 tool
="$rootdir/tools/scramble -add=ip6g"
1899 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1900 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1901 output
="rockbox.ipod"
1902 appextra
="recorder:gui:radio"
1905 bootoutput
="bootloader-$modelname.ipod"
1906 # toolset is the tools within the tools directory that we build for
1907 # this particular target.
1908 toolset
=$ipodbitmaptools
1909 # architecture, manufacturer and model for the target-tree build
1911 t_manufacturer
="s5l8702"
1917 modelname
="iaudiox5"
1921 tool
="$rootdir/tools/scramble -add=iax5"
1922 boottool
="$rootdir/tools/scramble -iaudiox5"
1923 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1924 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1925 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1926 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1927 output
="rockbox.iaudio"
1928 bootoutput
="x5_fw.bin"
1929 appextra
="recorder:gui:radio"
1932 # toolset is the tools within the tools directory that we build for
1933 # this particular target.
1934 toolset
="$iaudiobitmaptools"
1935 # architecture, manufacturer and model for the target-tree build
1937 t_manufacturer
="iaudio"
1943 modelname
="iaudiom5"
1947 tool
="$rootdir/tools/scramble -add=iam5"
1948 boottool
="$rootdir/tools/scramble -iaudiom5"
1949 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1950 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1951 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1952 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1953 output
="rockbox.iaudio"
1954 bootoutput
="m5_fw.bin"
1955 appextra
="recorder:gui:radio"
1958 # toolset is the tools within the tools directory that we build for
1959 # this particular target.
1960 toolset
="$iaudiobitmaptools"
1961 # architecture, manufacturer and model for the target-tree build
1963 t_manufacturer
="iaudio"
1973 tool
="$rootdir/tools/scramble -add=i7"
1974 boottool
="$rootdir/tools/scramble -tcc=crc"
1975 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1976 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1977 output
="rockbox.iaudio"
1978 appextra
="recorder:gui:radio"
1981 bootoutput
="I7_FW.BIN"
1982 # toolset is the tools within the tools directory that we build for
1983 # this particular target.
1984 toolset
="$tccbitmaptools"
1985 # architecture, manufacturer and model for the target-tree build
1987 t_manufacturer
="tcc77x"
1997 tool
="$rootdir/tools/scramble -add=d2"
1999 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2000 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2002 bootoutput
="bootloader-cowond2.bin"
2003 appextra
="recorder:gui:radio"
2006 toolset
="$tccbitmaptools"
2007 # architecture, manufacturer and model for the target-tree build
2009 t_manufacturer
="tcc780x"
2015 modelname
="iaudiom3"
2019 tool
="$rootdir/tools/scramble -add=iam3"
2020 boottool
="$rootdir/tools/scramble -iaudiom3"
2021 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2022 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2023 output
="rockbox.iaudio"
2024 bootoutput
="cowon_m3.bin"
2025 appextra
="recorder:gui:radio"
2028 # toolset is the tools within the tools directory that we build for
2029 # this particular target.
2030 toolset
="$iaudiobitmaptools"
2031 # architecture, manufacturer and model for the target-tree build
2033 t_manufacturer
="iaudio"
2039 modelname
="gigabeatfx"
2043 tool
="$rootdir/tools/scramble -add=giga"
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 -gigabeat"
2052 bootoutput
="FWIMG01.DAT"
2053 # architecture, manufacturer and model for the target-tree build
2055 t_manufacturer
="s3c2440"
2056 t_model
="gigabeat-fx"
2061 modelname
="gigabeats"
2065 tool
="$rootdir/tools/scramble -add=gigs"
2066 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2067 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2068 output
="rockbox.gigabeat"
2069 appextra
="recorder:gui:radio"
2072 toolset
="$gigabeatbitmaptools"
2073 boottool
="$rootdir/tools/scramble -gigabeats"
2075 # architecture, manufacturer and model for the target-tree build
2077 t_manufacturer
="imx31"
2078 t_model
="gigabeat-s"
2083 modelname
="mrobe500"
2087 tool
="$rootdir/tools/scramble -add=m500"
2088 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2089 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2090 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2091 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2092 output
="rockbox.mrobe500"
2093 appextra
="recorder:gui:radio"
2096 toolset
=$gigabeatbitmaptools
2098 bootoutput
="rockbox.mrboot"
2099 # architecture, manufacturer and model for the target-tree build
2101 t_manufacturer
="tms320dm320"
2107 modelname
="mrobe100"
2111 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2112 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2113 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2114 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2115 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2116 output
="rockbox.mi4"
2117 appextra
="recorder:gui:radio"
2120 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2121 bootoutput
="pp5020.mi4"
2122 # toolset is the tools within the tools directory that we build for
2123 # this particular target.
2124 toolset
=$scramblebitmaptools
2125 # architecture, manufacturer and model for the target-tree build
2128 t_manufacturer
="olympus"
2134 modelname
="logikdax"
2138 tool
="$rootdir/tools/scramble -add=ldax"
2139 boottool
="$rootdir/tools/scramble -tcc=crc"
2140 bootoutput
="player.rom"
2141 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2142 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2143 output
="rockbox.logik"
2144 appextra
="recorder:gui:radio"
2147 # toolset is the tools within the tools directory that we build for
2148 # this particular target.
2149 toolset
=$tccbitmaptools
2150 # architecture, manufacturer and model for the target-tree build
2152 t_manufacturer
="tcc77x"
2158 modelname
="zenvisionm30gb"
2159 target
="CREATIVE_ZVM"
2162 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2163 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2164 tool
="$rootdir/tools/scramble -creative=zvm"
2166 output
="rockbox.zvm"
2167 appextra
="recorder:gui:radio"
2170 toolset
=$ipodbitmaptools
2171 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2172 bootoutput
="rockbox.zvmboot"
2173 # architecture, manufacturer and model for the target-tree build
2175 t_manufacturer
="tms320dm320"
2176 t_model
="creative-zvm"
2181 modelname
="zenvisionm60gb"
2182 target
="CREATIVE_ZVM60GB"
2185 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2186 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2187 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2189 output
="rockbox.zvm60"
2190 appextra
="recorder:gui:radio"
2193 toolset
=$ipodbitmaptools
2194 boottool
="$rootdir/tools/scramble -creative=zvm60"
2195 bootoutput
="rockbox.zvm60boot"
2196 # architecture, manufacturer and model for the target-tree build
2198 t_manufacturer
="tms320dm320"
2199 t_model
="creative-zvm"
2204 modelname
="zenvision"
2205 target
="CREATIVE_ZV"
2208 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2209 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2210 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2213 appextra
="recorder:gui:radio"
2216 toolset
=$ipodbitmaptools
2217 boottool
="$rootdir/tools/scramble -creative=zenvision"
2218 bootoutput
="rockbox.zvboot"
2219 # architecture, manufacturer and model for the target-tree build
2221 t_manufacturer
="tms320dm320"
2222 t_model
="creative-zvm"
2227 modelname
="sansae200"
2229 memory
=32 # supposedly
2231 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2232 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2233 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2234 output
="rockbox.mi4"
2235 appextra
="recorder:gui:radio"
2238 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2239 bootoutput
="PP5022.mi4"
2240 # toolset is the tools within the tools directory that we build for
2241 # this particular target.
2242 toolset
=$scramblebitmaptools
2243 # architecture, manufacturer and model for the target-tree build
2246 t_manufacturer
="sandisk"
2247 t_model
="sansa-e200"
2251 # the e200R model is pretty much identical to the e200, it only has a
2252 # different option to the scramble tool when building a bootloader and
2253 # makes the bootloader output file name in all lower case.
2255 modelname
="sansae200r"
2257 memory
=32 # supposedly
2259 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2260 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2261 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2262 output
="rockbox.mi4"
2263 appextra
="recorder:gui:radio"
2266 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2267 bootoutput
="pp5022.mi4"
2268 # toolset is the tools within the tools directory that we build for
2269 # this particular target.
2270 toolset
=$scramblebitmaptools
2271 # architecture, manufacturer and model for the target-tree build
2274 t_manufacturer
="sandisk"
2275 t_model
="sansa-e200"
2280 modelname
="sansac200"
2282 memory
=32 # supposedly
2284 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2285 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2286 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2287 output
="rockbox.mi4"
2288 appextra
="recorder:gui:radio"
2291 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2292 bootoutput
="firmware.mi4"
2293 # toolset is the tools within the tools directory that we build for
2294 # this particular target.
2295 toolset
=$scramblebitmaptools
2296 # architecture, manufacturer and model for the target-tree build
2299 t_manufacturer
="sandisk"
2300 t_model
="sansa-c200"
2305 modelname
="sansam200"
2309 tool
="$rootdir/tools/scramble -add=m200"
2310 boottool
="$rootdir/tools/scramble -tcc=crc"
2311 bootoutput
="player.rom"
2312 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2313 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2314 output
="rockbox.m200"
2315 appextra
="recorder:gui:radio"
2318 # toolset is the tools within the tools directory that we build for
2319 # this particular target.
2320 toolset
=$tccbitmaptools
2321 # architecture, manufacturer and model for the target-tree build
2323 t_manufacturer
="tcc77x"
2329 modelname
="sansac100"
2333 tool
="$rootdir/tools/scramble -add=c100"
2334 boottool
="$rootdir/tools/scramble -tcc=crc"
2335 bootoutput
="player.rom"
2336 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2337 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2338 output
="rockbox.c100"
2339 appextra
="recorder:gui:radio"
2342 # toolset is the tools within the tools directory that we build for
2343 # this particular target.
2344 toolset
=$tccbitmaptools
2345 # architecture, manufacturer and model for the target-tree build
2347 t_manufacturer
="tcc77x"
2353 modelname
="sansaclip"
2356 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2357 bmp2rb_native
="$bmp2rb_mono"
2358 tool
="$rootdir/tools/scramble -add=clip"
2359 output
="rockbox.sansa"
2360 bootoutput
="bootloader-clip.sansa"
2361 appextra
="recorder:gui:radio"
2364 toolset
=$scramblebitmaptools
2366 t_manufacturer
="as3525"
2367 t_model
="sansa-clip"
2368 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2370 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2376 modelname
="sansae200v2"
2377 target
="SANSA_E200V2"
2379 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2380 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2381 tool
="$rootdir/tools/scramble -add=e2v2"
2382 output
="rockbox.sansa"
2383 bootoutput
="bootloader-e200v2.sansa"
2384 appextra
="recorder:gui:radio"
2387 toolset
=$scramblebitmaptools
2389 t_manufacturer
="as3525"
2390 t_model
="sansa-e200v2"
2397 modelname
="sansam200v4"
2398 target
="SANSA_M200V4"
2400 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2401 bmp2rb_native
="$bmp2rb_mono"
2402 tool
="$rootdir/tools/scramble -add=m2v4"
2403 output
="rockbox.sansa"
2404 bootoutput
="bootloader-m200v4.sansa"
2405 appextra
="recorder:gui:radio"
2408 toolset
=$scramblebitmaptools
2410 t_manufacturer
="as3525"
2411 t_model
="sansa-m200v4"
2412 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2414 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2420 modelname
="sansafuze"
2423 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2424 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2425 tool
="$rootdir/tools/scramble -add=fuze"
2426 output
="rockbox.sansa"
2427 bootoutput
="bootloader-fuze.sansa"
2428 appextra
="recorder:gui:radio"
2431 toolset
=$scramblebitmaptools
2433 t_manufacturer
="as3525"
2434 t_model
="sansa-fuze"
2441 modelname
="sansac200v2"
2442 target
="SANSA_C200V2"
2443 memory
=2 # as per OF diagnosis mode
2444 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2445 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2446 tool
="$rootdir/tools/scramble -add=c2v2"
2447 output
="rockbox.sansa"
2448 bootoutput
="bootloader-c200v2.sansa"
2449 appextra
="recorder:gui:radio"
2452 # toolset is the tools within the tools directory that we build for
2453 # this particular target.
2454 toolset
=$scramblebitmaptools
2455 # architecture, manufacturer and model for the target-tree build
2457 t_manufacturer
="as3525"
2458 t_model
="sansa-c200v2"
2459 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2461 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2466 modelname
="sansaclipv2"
2467 target
="SANSA_CLIPV2"
2469 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2470 bmp2rb_native
="$bmp2rb_mono"
2471 tool
="$rootdir/tools/scramble -add=clv2"
2472 output
="rockbox.sansa"
2473 bootoutput
="bootloader-clipv2.sansa"
2474 appextra
="recorder:gui:radio"
2477 toolset
=$scramblebitmaptools
2479 t_manufacturer
="as3525"
2480 t_model
="sansa-clipv2"
2485 echo "Sansa View is not yet supported!"
2488 modelname
="sansaview"
2492 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2493 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2494 output
="rockbox.mi4"
2498 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2499 bootoutput
="firmware.mi4"
2500 # toolset is the tools within the tools directory that we build for
2501 # this particular target.
2502 toolset
=$scramblebitmaptools
2505 t_manufacturer
="sandisk"
2506 t_model
="sansa-view"
2511 modelname
="sansaclipplus"
2512 target
="SANSA_CLIPPLUS"
2514 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2515 bmp2rb_native
="$bmp2rb_mono"
2516 tool
="$rootdir/tools/scramble -add=cli+"
2517 output
="rockbox.sansa"
2518 bootoutput
="bootloader-clipplus.sansa"
2519 appextra
="recorder:gui:radio"
2522 toolset
=$scramblebitmaptools
2524 t_manufacturer
="as3525"
2525 t_model
="sansa-clipplus"
2531 modelname
="sansafuzev2"
2532 target
="SANSA_FUZEV2"
2534 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2535 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2536 tool
="$rootdir/tools/scramble -add=fuz2"
2537 output
="rockbox.sansa"
2538 bootoutput
="bootloader-fuzev2.sansa"
2539 appextra
="recorder:gui:radio"
2542 toolset
=$scramblebitmaptools
2544 t_manufacturer
="as3525"
2545 t_model
="sansa-fuzev2"
2551 modelname
="sansafuzeplus"
2552 target
="SANSA_FUZEPLUS"
2554 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2555 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2556 tool
="$rootdir/tools/scramble -add=fuz+"
2557 output
="rockbox.sansa"
2558 bootoutput
="bootloader-fuzeplus.sansa"
2559 appextra
="gui:recorder:radio"
2562 toolset
=$scramblebitmaptools
2564 t_manufacturer
="imx233"
2565 t_model
="sansa-fuzeplus"
2571 modelname
="sansaclipzip"
2572 target
="SANSA_CLIPZIP"
2574 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2575 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2576 tool
="$rootdir/tools/scramble -add=clzp"
2577 output
="rockbox.sansa"
2578 bootoutput
="bootloader-clipzip.sansa"
2579 appextra
="recorder:gui:radio"
2582 toolset
=$scramblebitmaptools
2584 t_manufacturer
="as3525"
2585 t_model
="sansa-clipzip"
2591 modelname
="sansaconnect"
2592 target
="SANSA_CONNECT"
2594 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2595 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2596 tool
="$rootdir/tools/scramble -add=conn"
2597 output
="rockbox.sansa"
2598 bootoutput
="bootloader-connect.sansa"
2599 appextra
="recorder:gui"
2602 toolset
=$scramblebitmaptools
2604 t_manufacturer
="tms320dm320"
2605 t_model
="sansa-connect"
2611 modelname
="tatungtpj1022"
2612 target
="TATUNG_TPJ1022"
2615 tool
="$rootdir/tools/scramble -add tpj2"
2616 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2617 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2618 output
="rockbox.elio"
2619 appextra
="recorder:gui:radio"
2622 boottool
="$rootdir/tools/scramble -mi4v2"
2623 bootoutput
="pp5020.mi4"
2624 # toolset is the tools within the tools directory that we build for
2625 # this particular target.
2626 toolset
=$scramblebitmaptools
2627 # architecture, manufacturer and model for the target-tree build
2630 t_manufacturer
="tatung"
2636 modelname
="gogearsa9200"
2637 target
="PHILIPS_SA9200"
2638 memory
=32 # supposedly
2640 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2641 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2642 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2643 output
="rockbox.mi4"
2644 appextra
="recorder:gui:radio"
2647 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2648 bootoutput
="FWImage.ebn"
2649 # toolset is the tools within the tools directory that we build for
2650 # this particular target.
2651 toolset
=$scramblebitmaptools
2652 # architecture, manufacturer and model for the target-tree build
2655 t_manufacturer
="philips"
2661 modelname
="gogearhdd1630"
2662 target
="PHILIPS_HDD1630"
2663 memory
=32 # supposedly
2665 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2666 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2667 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2668 output
="rockbox.mi4"
2669 appextra
="recorder:gui:radio"
2672 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2673 bootoutput
="FWImage.ebn"
2674 # toolset is the tools within the tools directory that we build for
2675 # this particular target.
2676 toolset
=$scramblebitmaptools
2677 # architecture, manufacturer and model for the target-tree build
2680 t_manufacturer
="philips"
2686 modelname
="gogearhdd6330"
2687 target
="PHILIPS_HDD6330"
2690 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2691 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2692 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2693 output
="rockbox.mi4"
2694 appextra
="recorder:gui:radio"
2697 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2698 bootoutput
="FWImage.ebn"
2699 # toolset is the tools within the tools directory that we build for
2700 # this particular target.
2701 toolset
=$scramblebitmaptools
2702 # architecture, manufacturer and model for the target-tree build
2705 t_manufacturer
="philips"
2711 modelname
="meizum6sl"
2716 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2717 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2718 output
="rockbox.meizu"
2719 appextra
="recorder:gui:radio"
2722 toolset
=$genericbitmaptools
2724 bootoutput
="rockboot.ebn"
2725 # architecture, manufacturer and model for the target-tree build
2727 t_manufacturer
="s5l8700"
2728 t_model
="meizu-m6sl"
2733 modelname
="meizum6sp"
2738 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2739 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2740 output
="rockbox.meizu"
2741 appextra
="recorder:gui:radio"
2744 toolset
=$genericbitmaptools
2746 bootoutput
="rockboot.ebn"
2747 # architecture, manufacturer and model for the target-tree build
2749 t_manufacturer
="s5l8700"
2750 t_model
="meizu-m6sp"
2760 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2761 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2762 output
="rockbox.meizu"
2763 appextra
="recorder:gui:radio"
2766 toolset
=$genericbitmaptools
2768 bootoutput
="rockboot.ebn"
2769 # architecture, manufacturer and model for the target-tree build
2771 t_manufacturer
="s5l8700"
2777 modelname
="ondavx747"
2781 tool
="$rootdir/tools/scramble -add=x747"
2782 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2783 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2784 output
="rockbox.vx747"
2785 appextra
="recorder:gui:radio"
2788 toolset
=$genericbitmaptools
2789 boottool
="$rootdir/tools/scramble -ccpmp"
2790 bootoutput
="ccpmp.bin"
2791 # architecture, manufacturer and model for the target-tree build
2793 t_manufacturer
="ingenic_jz47xx"
2794 t_model
="onda_vx747"
2799 modelname
="ondavx767"
2804 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2805 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2806 output
="rockbox.vx767"
2807 appextra
="recorder:gui:radio"
2810 toolset
=$genericbitmaptools
2811 boottool
="$rootdir/tools/scramble -ccpmp"
2812 bootoutput
="ccpmp.bin"
2813 # architecture, manufacturer and model for the target-tree build
2815 t_manufacturer
="ingenic_jz47xx"
2816 t_model
="onda_vx767"
2821 modelname
="ondavx747p"
2822 target
="ONDA_VX747P"
2825 tool
="$rootdir/tools/scramble -add=747p"
2826 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2827 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2828 output
="rockbox.vx747p"
2829 appextra
="recorder:gui:radio"
2832 toolset
=$genericbitmaptools
2833 boottool
="$rootdir/tools/scramble -ccpmp"
2834 bootoutput
="ccpmp.bin"
2835 # architecture, manufacturer and model for the target-tree build
2837 t_manufacturer
="ingenic_jz47xx"
2838 t_model
="onda_vx747"
2843 modelname
="ondavx777"
2847 tool
="$rootdir/tools/scramble -add=x777"
2848 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2849 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2850 output
="rockbox.vx777"
2851 appextra
="recorder:gui:radio"
2854 toolset
=$genericbitmaptools
2855 boottool
="$rootdir/tools/scramble -ccpmp"
2856 bootoutput
="ccpmp.bin"
2857 # architecture, manufacturer and model for the target-tree build
2859 t_manufacturer
="ingenic_jz47xx"
2860 t_model
="onda_vx747"
2865 modelname
="lyreproto1"
2866 target
="LYRE_PROTO1"
2870 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2871 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2872 output
="rockbox.lyre"
2873 appextra
="recorder:gui:radio"
2876 toolset
=$scramblebitmaptools
2878 bootoutput
="bootloader-proto1.lyre"
2879 # architecture, manufacturer and model for the target-tree build
2881 t_manufacturer
="at91sam"
2882 t_model
="lyre_proto1"
2887 modelname
="mini2440"
2891 tool
="$rootdir/tools/scramble -add=m244"
2892 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2893 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2894 output
="rockbox.mini2440"
2895 appextra
="recorder:gui:radio"
2898 toolset
=$scramblebitmaptools
2900 bootoutput
="bootloader-mini2440.lyre"
2901 # architecture, manufacturer and model for the target-tree build
2903 t_manufacturer
="s3c2440"
2909 modelname
="samsungyh820"
2910 target
="SAMSUNG_YH820"
2913 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2914 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2915 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2916 output
="rockbox.mi4"
2917 appextra
="recorder:gui:radio"
2920 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2921 bootoutput
="FW_YH820.mi4"
2922 # toolset is the tools within the tools directory that we build for
2923 # this particular target.
2924 toolset
=$scramblebitmaptools
2925 # architecture, manufacturer and model for the target-tree build
2928 t_manufacturer
="samsung"
2934 modelname
="samsungyh920"
2935 target
="SAMSUNG_YH920"
2938 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2939 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2940 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2941 output
="rockbox.mi4"
2942 appextra
="recorder:gui:radio"
2945 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2946 bootoutput
="PP5020.mi4"
2947 # toolset is the tools within the tools directory that we build for
2948 # this particular target.
2949 toolset
=$scramblebitmaptools
2950 # architecture, manufacturer and model for the target-tree build
2953 t_manufacturer
="samsung"
2959 modelname
="samsungyh925"
2960 target
="SAMSUNG_YH925"
2963 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2964 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2965 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2966 output
="rockbox.mi4"
2967 appextra
="recorder:gui:radio"
2970 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2971 bootoutput
="FW_YH925.mi4"
2972 # toolset is the tools within the tools directory that we build for
2973 # this particular target.
2974 toolset
=$scramblebitmaptools
2975 # architecture, manufacturer and model for the target-tree build
2978 t_manufacturer
="samsung"
2984 modelname
="samsungyps3"
2985 target
="SAMSUNG_YPS3"
2989 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2990 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2991 output
="rockbox.yps3"
2992 appextra
="recorder:gui:radio"
2995 toolset
=$genericbitmaptools
2997 bootoutput
="rockboot.ebn"
2998 # architecture, manufacturer and model for the target-tree build
3000 t_manufacturer
="s5l8700"
3007 target
="PBELL_VIBE500"
3010 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
3011 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3012 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
3013 output
="rockbox.mi4"
3014 appextra
="recorder:gui:radio"
3017 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
3018 bootoutput
="jukebox.mi4"
3019 # toolset is the tools within the tools directory that we build for
3020 # this particular target.
3021 toolset
=$scramblebitmaptools
3022 # architecture, manufacturer and model for the target-tree build
3025 t_manufacturer
="pbell"
3031 modelname
="mpiohd200"
3035 tool
="$rootdir/tools/scramble -add=hd20"
3036 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3037 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
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
="mpiohd300"
3058 tool
="$rootdir/tools/scramble -add=hd30"
3059 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3060 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
3061 output
="rockbox.mpio"
3062 bootoutput
="bootloader.mpio"
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
="mpio"
3077 modelname
="rk27generic"
3078 target
="RK27_GENERIC"
3081 tool
="$rootdir/tools/scramble -add=rk27"
3082 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3083 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3084 output
="rockbox.rk27"
3085 bootoutput
="bootloader.rk27"
3086 appextra
="recorder:gui:radio"
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"
3095 t_model
="rk27generic"
3100 modelname
="hifimanhm60x"
3104 tool
="$rootdir/tools/scramble -add=rk27"
3105 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3106 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3107 output
="rockbox.rk27"
3108 bootoutput
="bootloader.rk27"
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"
3123 modelname
="hifimanhm801"
3127 tool
="$rootdir/tools/scramble -add=rk27"
3128 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3129 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3130 output
="rockbox.rk27"
3131 bootoutput
="bootloader.rk27"
3132 appextra
="recorder:gui"
3135 # toolset is the tools within the tools directory that we build for
3136 # this particular target.
3137 toolset
="$genericbitmaptools"
3138 # architecture, manufacturer and model for the target-tree build
3140 t_manufacturer
="rk27xx"
3156 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3157 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3159 bootoutput
="rockbox"
3160 appextra
="recorder:gui:radio"
3163 # architecture, manufacturer and model for the target-tree build
3165 t_manufacturer
="sdl"
3176 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3177 bindir
="/data/data/org.rockbox/lib"
3178 libdir
="/data/data/org.rockbox/app_rockbox"
3184 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3185 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3186 output
="librockbox.so"
3187 bootoutput
="librockbox.so"
3188 appextra
="recorder:gui:radio:hosted/android"
3191 # architecture, manufacturer and model for the target-tree build
3193 t_manufacturer
="android"
3200 modelname
="nokian8xx"
3203 sharedir
="/opt/rockbox/share/rockbox"
3204 bindir
="/opt/rockbox/bin"
3205 libdir
="/opt/rockbox/lib"
3211 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3212 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3214 bootoutput
="rockbox"
3215 appextra
="recorder:gui:radio"
3218 # architecture, manufacturer and model for the target-tree build
3220 t_manufacturer
="maemo"
3227 modelname
="nokian900"
3230 sharedir
="/opt/rockbox/share/rockbox"
3231 bindir
="/opt/rockbox/bin"
3232 libdir
="/opt/rockbox/lib"
3238 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3239 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3241 bootoutput
="rockbox"
3242 appextra
="recorder:gui:radio"
3245 # architecture, manufacturer and model for the target-tree build
3247 t_manufacturer
="maemo"
3257 sharedir
="rockbox/share/rockbox"
3258 bindir
="rockbox/bin"
3259 libdir
="rockbox/lib"
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
="pandora"
3281 modelname
="samsungypr0"
3282 target
="SAMSUNG_YPR0"
3283 app_set_lcd_size
240 320
3289 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3290 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3292 bootoutput
="rockbox"
3293 appextra
="recorder:gui:radio"
3296 # architecture, manufacturer and model for the target-tree build
3298 t_manufacturer
="ypr0"
3303 echo "Please select a supported target platform!"
3309 echo "Platform set to $modelname"
3313 ############################################################################
3314 # Amount of memory, for those that can differ. They have $memory unset at
3318 if [ -z "$memory" ]; then
3321 if [ "$ARG_RAM" ]; then
3324 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3337 if [ "$ARG_RAM" ]; then
3340 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3353 echo "Memory size selected: $memory MB"
3354 [ "$ARG_TYPE" ] ||
echo ""
3358 ##################################################################
3359 # Figure out build "type"
3362 # the ifp7x0 is the only platform that supports building a gdb stub like
3366 gdbstub
=", (G)DB stub"
3368 sansae200r|sansae200
)
3369 gdbstub
=", (I)nstaller"
3372 gdbstub
=", (E)raser"
3375 gdbstub
=", (E)raser"
3380 if [ "$ARG_TYPE" ]; then
3383 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool$gdbstub: (Defaults to N)"
3389 appsdir
='$(ROOTDIR)/bootloader'
3391 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3393 echo "e200R-installer build selected"
3396 appsdir
='$(ROOTDIR)/bootloader'
3398 extradefines
="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3400 echo "sansa eraser build selected"
3403 if test $t_manufacturer = "archos"; then
3404 # Archos SH-based players do this somewhat differently for
3406 appsdir
='$(ROOTDIR)/flash/bootbox'
3409 appsdir
='$(ROOTDIR)/bootloader'
3412 if test -n "$boottool"; then
3415 if test -n "$bootoutput"; then
3419 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3421 echo "Bootloader build selected"
3424 if [ "$modelname" = "sansae200r" ]; then
3425 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3430 extradefines
="$extradefines -DSIMULATOR"
3433 echo "Simulator build selected"
3436 echo "Advanced build selected"
3437 whichadvanced
$btype
3440 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3441 appsdir
='$(ROOTDIR)/gdb'
3450 echo "GDB stub build selected"
3458 extradefines
="$extradefines -DDEBUG"
3459 appsdir
='$(ROOTDIR)/tools/checkwps';
3460 output
='checkwps.'${modelname};
3462 echo "CheckWPS build selected"
3470 appsdir
='$(ROOTDIR)/tools/database';
3475 output
="database_${modelname}.exe"
3478 output
='database.'${modelname};
3482 echo "Database tool build selected"
3485 if [ "$modelname" = "sansae200r" ]; then
3486 echo "Do not use the e200R target for regular builds. Use e200 instead."
3490 btype
="N" # set it explicitly since RET only gets here as well
3491 echo "Normal build selected"
3495 # to be able running "make manual" from non-manual configuration
3498 manualdev
="archosfmrecorder"
3501 manualdev
="iriverh100"
3504 manualdev
="ipodmini1g"
3507 manualdev
=$modelname
3511 if [ -z "$debug" ]; then
3512 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3515 if [ "yes" = "$application" ]; then
3516 echo Building Rockbox as an Application
3517 extradefines
="$extradefines -DAPPLICATION"
3520 echo "Using source code root directory: $rootdir"
3522 # this was once possible to change at build-time, but no more:
3527 if [ "yes" = "$simulator" ]; then
3528 # setup compiler and things for simulator
3531 if [ -d "simdisk" ]; then
3532 echo "Subdirectory 'simdisk' already present"
3535 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3539 # Now, figure out version number of the (gcc) compiler we are about to use
3540 gccver
=`$CC -dumpversion`;
3542 # figure out the binutil version too and display it, mostly for the build
3543 # system etc to be able to see it easier
3544 if [ $uname = "Darwin" ]; then
3545 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3547 ldver
=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
3550 if [ -z "$gccver" ]; then
3551 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3552 echo "[WARNING] this may cause your build to fail since we cannot do the"
3553 echo "[WARNING] checks we want now."
3556 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3559 num1
=`echo $gccver | cut -d . -f1`
3560 num2
=`echo $gccver | cut -d . -f2`
3561 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3568 echo "Using $CC $gccver ($gccnum)"
3570 if test "$gccnum" -ge "400"; then
3571 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3572 # so we ignore that warnings for now
3574 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3577 if test "$gccnum" -ge "402"; then
3578 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3579 # and later would throw it for several valid cases
3580 GCCOPTS
="$GCCOPTS -Wno-override-init"
3584 ""|
"$CROSS_COMPILE")
3588 # Verify that the cross-compiler is of a recommended version!
3589 if test "$gccver" != "$gccchoice"; then
3590 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3591 echo "WARNING: version $gccchoice!"
3592 echo "WARNING: This may cause your build to fail since it may be a version"
3593 echo "WARNING: that isn't functional or known to not be the best choice."
3594 echo "WARNING: If you suffer from build problems, you know that this is"
3595 echo "WARNING: a likely source for them..."
3603 echo "Using $LD $ldver"
3605 # check the compiler for SH platforms
3606 if test "$CC" = "sh-elf-gcc"; then
3607 if test "$gccnum" -lt "400"; then
3608 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3609 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3611 # figure out patch status
3612 gccpatch
=`$CC --version`;
3614 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3615 echo "gcc $gccver is rockbox patched"
3616 # then convert -O to -Os to get smaller binaries!
3617 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3619 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3620 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3625 if test "$CC" = "m68k-elf-gcc"; then
3626 # convert -O to -Os to get smaller binaries!
3627 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3630 if [ "$ARG_CCACHE" = "1" ]; then
3631 echo "Enable ccache for building"
3633 elif [ "$ARG_CCACHE" != "0" ]; then
3634 ccache
=`findtool ccache`
3635 if test -n "$ccache"; then
3636 echo "Found and uses ccache ($ccache)"
3640 # figure out the full path to the various commands if possible
3641 HOSTCC
=`findtool gcc --lit`
3642 HOSTAR
=`findtool ar --lit`
3643 CC
=`findtool ${CC} --lit`
3644 LD
=`findtool ${AR} --lit`
3645 AR
=`findtool ${AR} --lit`
3646 AS
=`findtool ${AS} --lit`
3647 OC
=`findtool ${OC} --lit`
3648 WINDRES
=`findtool ${WINDRES} --lit`
3649 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3650 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3651 RANLIB
=`findtool ${RANLIB} --lit`
3653 if test -n "$ccache"; then
3657 if test "$ARG_ARM_THUMB" = "1"; then
3658 extradefines
="$extradefines -DUSE_THUMB"
3659 CC
="$toolsdir/thumb-cc.py $CC"
3662 if test "X$endian" = "Xbig"; then
3663 defendian
="ROCKBOX_BIG_ENDIAN"
3665 defendian
="ROCKBOX_LITTLE_ENDIAN"
3668 if [ "$ARG_RBDIR" != "" ]; then
3669 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3674 echo "Using alternate rockbox dir: ${rbdir}"
3677 cat > autoconf.h
<<EOF
3678 /* This header was made by configure */
3679 #ifndef __BUILD_AUTOCONF_H
3680 #define __BUILD_AUTOCONF_H
3682 /* Define endianess for the target or simulator platform */
3683 #define ${defendian} 1
3685 /* Define this if you build rockbox to support the logf logging and display */
3688 /* Define this to record a chart with timings for the stages of boot */
3691 /* optional define for a backlight modded Ondio */
3694 /* optional define for FM radio mod for iAudio M5 */
3697 /* optional define for ATA poweroff on Player */
3698 ${have_ata_poweroff}
3700 /* optional defines for RTC mod for h1x0 */
3704 /* the threading backend we use */
3705 #define ${thread_support}
3707 /* lcd dimensions for application builds from configure */
3711 /* root of Rockbox */
3712 #define ROCKBOX_DIR "${rbdir}"
3713 #define ROCKBOX_SHARE_PATH "${sharedir}"
3714 #define ROCKBOX_BINARY_PATH "${bindir}"
3715 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3717 #endif /* __BUILD_AUTOCONF_H */
3720 if test -n "$t_cpu"; then
3721 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3723 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3724 # Maemo needs the SDL port, too
3725 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3726 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3727 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3728 # Pandora needs the SDL port, too
3729 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3730 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3731 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3732 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3733 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3736 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3737 test -n "$t_soc" && TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3738 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3742 if test "$swcodec" = "yes"; then
3743 voicetoolset
="rbspeexenc voicefont wavtrim"
3745 voicetoolset
="voicefont wavtrim"
3748 if test "$apps" = "apps"; then
3749 # only when we build "real" apps we build the .lng files
3753 #### Fix the cmdline ###
3754 if [ -n "$ARG_PREFIX" ]; then
3755 cmdline
="$cmdline --prefix=\$(PREFIX)"
3757 if [ -n "$ARG_LCDWIDTH" ]; then
3758 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3761 # remove parts from the cmdline we're going to set unconditionally
3762 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3763 -e s,--ram=[0-9]\*,,g \
3764 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3765 -e s,--type=[a-zA-Z]\*,,g`
3766 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3770 cat > Makefile
<<EOF
3771 ## Automatically generated. http://www.rockbox.org/
3773 export ROOTDIR=${rootdir}
3774 export FIRMDIR=\$(ROOTDIR)/firmware
3775 export APPSDIR=${appsdir}
3776 export TOOLSDIR=${toolsdir}
3777 export DOCSDIR=${rootdir}/docs
3778 export MANUALDIR=${rootdir}/manual
3779 export DEBUG=${debug}
3780 export MODELNAME=${modelname}
3781 export ARCHOSROM=${archosrom}
3782 export FLASHFILE=${flash}
3783 export TARGET_ID=${target_id}
3784 export TARGET=-D${target}
3786 export MANUFACTURER=${t_manufacturer}
3787 export OBJDIR=${pwd}
3788 export BUILDDIR=${pwd}
3789 export LANGUAGE=${language}
3790 export VOICELANGUAGE=${voicelanguage}
3791 export MEMORYSIZE=${memory}
3792 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3793 export MKFIRMWARE=${tool}
3794 export BMP2RB_MONO=${bmp2rb_mono}
3795 export BMP2RB_NATIVE=${bmp2rb_native}
3796 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3797 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3798 export BINARY=${output}
3799 export APPEXTRA=${appextra}
3800 export ENABLEDPLUGINS=${plugins}
3801 export SOFTWARECODECS=${swcodec}
3802 export EXTRA_DEFINES=${extradefines}
3803 export HOSTCC=${HOSTCC}
3804 export HOSTAR=${HOSTAR}
3810 export WINDRES=${WINDRES}
3811 export DLLTOOL=${DLLTOOL}
3812 export DLLWRAP=${DLLWRAP}
3813 export RANLIB=${RANLIB}
3814 export PREFIX=${ARG_PREFIX}
3815 export PROFILE_OPTS=${PROFILE_OPTS}
3816 export APP_TYPE=${app_type}
3817 export APPLICATION=${application}
3818 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3819 export GCCOPTS=${GCCOPTS}
3820 export TARGET_INC=${TARGET_INC}
3821 export LOADADDRESS=${loadaddress}
3822 export SHARED_LDFLAG=${SHARED_LDFLAG}
3823 export SHARED_CFLAGS=${SHARED_CFLAGS}
3824 export LDOPTS=${LDOPTS}
3825 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3826 export GCCVER=${gccver}
3827 export GCCNUM=${gccnum}
3828 export UNAME=${uname}
3829 export MANUALDEV=${manualdev}
3830 export TTS_OPTS=${TTS_OPTS}
3831 export TTS_ENGINE=${TTS_ENGINE}
3832 export ENC_OPTS=${ENC_OPTS}
3833 export ENCODER=${ENCODER}
3834 export USE_ELF=${USE_ELF}
3835 export RBDIR=${rbdir}
3836 export ROCKBOX_SHARE_PATH=${sharedir}
3837 export ROCKBOX_BINARY_PATH=${bindir}
3838 export ROCKBOX_LIBRARY_PATH=${libdir}
3839 export SDLCONFIG=${sdl}
3840 export LCDORIENTATION=${lcd_orientation}
3842 CONFIGURE_OPTIONS=${cmdline}
3844 include \$(TOOLSDIR)/root.make
3847 echo "Created Makefile"