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 if [ "$ARG_ARM_EABI" != "0" ]; then
132 prefixtools arm-elf-eabi-
140 # scan the $PATH for the given command
147 # echo "checks for $file in $path" >&2
148 if test -f "$path/$file"; then
153 # check whether caller wants literal return value if not found
154 if [ "$2" = "--lit" ]; then
159 # scan the $PATH for sdl-config - check whether for a (cross-)win32
162 # sdl-config might (not) be prefixed for cross compiles so try both.
163 files
="${CROSS_COMPILE}sdl-config:sdl-config"
171 #echo "checks for $file in $path" >&2
172 if test -f "$path/$file"; then
173 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
174 if [ "yes" = "${winbuild}" ]; then
179 if [ "yes" != "${winbuild}" ]; then
189 # check for availability of sigaltstack to support our thread engine
190 check_sigaltstack
() {
191 cat >$tmpdir/check_threads.c
<<EOF
193 int main(int argc, char **argv)
196 #define NULL (void*)0
198 sigaltstack(NULL, NULL);
202 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
1> /dev
/null
204 rm -rf $tmpdir/check_threads
*
208 # check for availability of Fiber on Win32 to support our thread engine
210 cat >$tmpdir/check_threads.c
<<EOF
212 int main(int argc, char **argv)
214 ConvertThreadToFiber(NULL);
218 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
2>/dev
/null
220 rm -rf $tmpdir/check_threads
*
226 # default tool setup for native building
227 prefixtools
"$CROSS_COMPILE"
228 ARG_ARM_THUMB
=0 # can't use thumb in native builds
230 # unset arch if already set shcc() and friends
236 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
238 GCCOPTS
="$GCCOPTS -fno-builtin -g"
240 LDOPTS
="$LDOPTS -lm" # button-sdl.c uses sqrt()
243 endian
="" # endianess of the dap doesnt matter here
245 # default output binary name, don't override app_get_platform()
246 if [ "$app_type" != "sdl-app" ]; then
250 # default share option, override below if needed
251 SHARED_LDFLAG
="-shared"
252 SHARED_CFLAGS
="-fPIC -fvisibility=hidden"
254 if [ "$win32crosscompile" = "yes" ]; then
255 # We are crosscompiling
256 # add cross-compiler option(s)
257 LDOPTS
="$LDOPTS -mconsole"
260 CROSS_COMPILE
=${CROSS_COMPILE:-"i586-mingw32msvc-"}
262 prefixtools
"$CROSS_COMPILE"
264 endian
="little" # windows is little endian
265 echo "Enabling MMX support"
266 GCCOPTS
="$GCCOPTS -mmmx"
270 echo "Cygwin host detected"
273 LDOPTS
="$LDOPTS -mconsole"
280 echo "MinGW host detected"
283 LDOPTS
="$LDOPTS -mconsole"
289 sigaltstack
=`check_sigaltstack`
290 echo "Linux host detected"
291 LDOPTS
="$LDOPTS -ldl"
295 sigaltstack
=`check_sigaltstack`
296 echo "FreeBSD host detected"
297 LDOPTS
="$LDOPTS -ldl"
301 sigaltstack
=`check_sigaltstack`
302 echo "Darwin host detected"
303 LDOPTS
="$LDOPTS -ldl"
304 SHARED_LDFLAG
="-dynamiclib -Wl\,-single_module"
308 sigaltstack
=`check_sigaltstack`
309 echo "*Solaris host detected"
311 GCCOPTS
="$GCCOPTS -fPIC"
312 LDOPTS
="$LDOPTS -ldl"
316 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
322 if [ "$winbuild" != "yes" ]; then
323 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
324 if [ "`uname -m`" = "i686" ]; then
325 echo "Enabling MMX support"
326 GCCOPTS
="$GCCOPTS -mmmx"
330 sdl
=`findsdl $winbuild`
332 if [ -n `echo $app_type | grep "sdl"` ]; then
333 if [ -z "$sdl" ]; then
334 echo "configure didn't find sdl-config, which indicates that you"
335 echo "don't have SDL (properly) installed. Please correct and"
336 echo "re-run configure!"
339 # generic sdl-config checker
340 GCCOPTS
="$GCCOPTS `$sdl --cflags`"
341 LDOPTS
="$LDOPTS `$sdl --libs`"
346 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
347 # x86_64 supports MMX by default
349 if [ "$endian" = "" ]; then
351 cat >$tmpdir/conftest-
$id.c
<<EOF
353 int main(int argc, char **argv)
356 char *varp = (char *)&var;
363 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
364 # when cross compiling, the endianess cannot be detected because the above program doesn't run
365 # on the local machine. assume little endian but print a warning
366 endian
=`$tmpdir/conftest-$id 2> /dev/null`
367 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
376 if [ "$CROSS_COMPILE" != "" ]; then
377 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
380 if [ "$app_type" = "sdl-sim" ]; then
381 echo "Simulator environment deemed $endian endian"
382 elif [ "$app_type" = "sdl-app" ]; then
383 echo "Application environment deemed $endian endian"
384 elif [ "$app_type" = "checkwps" ]; then
385 echo "CheckWPS environment deemed $endian endian"
388 # use wildcard here to make it work even if it was named *.exe like
390 rm -f $tmpdir/conftest-
$id*
393 if [ -z "$ARG_THREAD_SUPPORT" ] ||
[ "$ARG_THREAD_SUPPORT" = "0" ]; then
394 if [ "$sigaltstack" = "0" ]; then
395 thread_support
="HAVE_SIGALTSTACK_THREADS"
396 LDOPTS
="$LDOPTS -lpthread" # pthread needed
397 echo "Selected sigaltstack threads"
398 elif [ "$fibers" = "0" ]; then
399 thread_support
="HAVE_WIN32_FIBER_THREADS"
400 echo "Selected Win32 Fiber threads"
404 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
405 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
406 thread_support
="HAVE_SDL_THREADS"
407 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
408 echo "Selected SDL threads"
410 echo "WARNING: Falling back to SDL threads"
416 # functions for setting up cross-compiler names and options
417 # also set endianess and what the exact recommended gcc version is
418 # the gcc version should most likely match what versions we build with
423 GCCOPTS
="$CCOPTS -m1"
424 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
430 prefixtools calmrisc16-unknown-elf-
431 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
432 GCCOPTIMIZE
="-fomit-frame-pointer"
437 prefixtools m68k-elf-
438 GCCOPTS
="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
439 GCCOPTIMIZE
="-fomit-frame-pointer"
446 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
447 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
448 GCCOPTS
="$GCCOPTS -mlong-calls"
450 GCCOPTIMIZE
="-fomit-frame-pointer"
456 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
457 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
458 GCCOPTS
="$GCCOPTS -mlong-calls"
460 GCCOPTIMIZE
="-fomit-frame-pointer"
466 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
467 if test "$ARG_ARM_EABI" = "0"; then
468 GCCOPTS
="$GCCOPTS -mlong-calls"
470 GCCOPTIMIZE
="-fomit-frame-pointer"
476 GCCOPTS
="$CCOPTS -mcpu=arm940t"
477 if test "$ARG_ARM_EABI" = "0"; then
478 GCCOPTS
="$GCCOPTS -mlong-calls"
480 GCCOPTIMIZE
="-fomit-frame-pointer"
486 GCCOPTS
="$CCOPTS -mcpu=arm9e"
487 if test "$ARG_ARM_EABI" = "0"; then
488 GCCOPTS
="$GCCOPTS -mlong-calls"
490 GCCOPTIMIZE
="-fomit-frame-pointer"
496 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
497 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
498 GCCOPTS
="$GCCOPTS -mlong-calls"
500 GCCOPTIMIZE
="-fomit-frame-pointer"
506 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
507 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
508 GCCOPTS
="$GCCOPTS -mlong-calls"
510 GCCOPTIMIZE
="-fomit-frame-pointer"
516 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
517 if test "$ARG_ARM_EABI" = "0"; then
518 GCCOPTS
="$GCCOPTS -mlong-calls"
520 GCCOPTIMIZE
="-fomit-frame-pointer"
526 GCCOPTS
="$CCOPTS -march=armv5te"
527 GCCOPTIMIZE
="-fomit-frame-pointer"
533 arch_version
=32 # FIXME: autodetect version (32 or 64)
534 prefixtools mipsel-elf-
535 # mips is predefined, but we want it for paths. use __mips instead
536 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
537 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
538 GCCOPTIMIZE
="-fomit-frame-pointer"
544 # Scratchbox sets up "gcc" based on the active target
547 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
548 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
550 LDOPTS
="-lm -ldl $LDOPTS"
551 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
552 SHARED_LDFLAG
="-shared"
555 thread_support
="HAVE_SIGALTSTACK_THREADS"
558 # Determine maemo version
559 if pkg-config
--atleast-version=5 maemo-version
; then
560 if [ "$1" == "4" ]; then
561 echo "ERROR: Maemo 4 SDK required."
564 extradefines
="$extradefines -DMAEMO5"
565 echo "Found N900 maemo version"
567 elif pkg-config
--atleast-version=4 maemo-version
; then
568 if [ "$1" == "5" ]; then
569 echo "ERROR: Maemo 5 SDK required."
572 extradefines
="$extradefines -DMAEMO4"
573 echo "Found N8xx maemo version"
575 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
580 if [ $is_n900 -eq 1 ]; then
581 GCCOPTS
="$GCCOPTS `pkg-config --cflags sdl`"
582 LDOPTS
="$LDOPTS `pkg-config --libs sdl`"
584 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
585 LDOPTS
="$LDOPTS `sdl-config --libs`"
588 # glib and libosso support
589 GCCOPTS
="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
590 LDOPTS
="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
592 # libhal support: Battery monitoring
593 GCCOPTS
="$GCCOPTS `pkg-config --cflags hal`"
594 LDOPTS
="$LDOPTS `pkg-config --libs hal`"
596 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
597 if [ $is_n900 -eq 1 ]; then
598 # gstreamer support: Audio output.
599 GCCOPTS
="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
600 LDOPTS
="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
602 # N900 specific: libplayback support
603 GCCOPTS
="$GCCOPTS `pkg-config --cflags libplayback-1`"
604 LDOPTS
="$LDOPTS `pkg-config --libs libplayback-1`"
606 # N900 specific: Enable ARMv7 NEON support
607 if sb-conf show
-A |
grep -q -i arm
; then
608 echo "Detected ARM target"
609 GCCOPTS
="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
610 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
612 echo "Detected x86 target"
615 # N8xx specific: Enable armv5te instructions
616 if sb-conf show
-A |
grep -q -i arm
; then
617 echo "Detected ARM target"
618 GCCOPTS
="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
619 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
621 echo "Detected x86 target"
627 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
628 # You have to use the sebt3 toolchain:
629 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
631 PNDSDK
="/usr/local/angstrom/arm"
632 if [ ! -x $PNDSDK/bin
/arm-angstrom-linux-gnueabi-gcc
]; then
633 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
637 PATH
=$PNDSDK/bin
:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/bin
638 PKG_CONFIG_PATH
=$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/lib
/pkgconfig
639 LDOPTS
="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
640 PKG_CONFIG
="pkg-config"
642 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
643 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
645 LDOPTS
="-lm -ldl $LDOPTS"
646 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
647 SHARED_LDFLAG
="-shared"
650 thread_support
="HAVE_SIGALTSTACK_THREADS"
653 GCCOPTS
="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
657 prefixtools
"$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
660 GCCOPTS
="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
661 LDOPTS
="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
664 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
665 GCCOPTS
="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
666 GCCOPTS
="$GCCOPTS -ffast-math -fsingle-precision-constant"
671 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
673 LDOPTS
="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
674 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
675 SHARED_LDFLAG
="-shared"
678 thread_support
="HAVE_SIGALTSTACK_THREADS"
682 GCCOPTS
="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
686 prefixtools
"arm-ypr0-linux-gnueabi-"
690 if [ -z "$ANDROID_SDK_PATH" ]; then
691 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
692 echo "environment variable point to the root directory of the Android SDK."
695 if [ -z "$ANDROID_NDK_PATH" ]; then
696 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
697 echo "environment variable point to the root directory of the Android NDK."
700 buildhost
=$
(uname |
tr "[:upper:]" "[:lower:]")
702 gcctarget
="arm-linux-androideabi-"
703 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
704 PATH
=$PATH:$gccprefix/bin
705 prefixtools
$gcctarget
706 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
707 GCCOPTS
="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
708 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
709 GLOBAL_LDOPTS
="-Wl,-z,defs -Wl,-z,noexecstack"
710 LDOPTS
="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
712 SHARED_LDFLAG
="-shared"
716 atype
=`echo "$1" | cut -c 2-`
717 ##################################################################
718 # Prompt for specific developer options
720 if [ "$atype" ]; then
725 printf "Enter your developer options (press only enter when done)\n\
726 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
727 (T)est plugins, S(m)all C lib, Logf to Ser(i)al port:"
728 if [ "$modelname" = "archosplayer" ]; then
729 printf ", Use (A)TA poweroff"
731 if [ "$t_model" = "ondio" ]; then
732 printf ", (B)acklight MOD"
734 if [ "$modelname" = "iaudiom5" ]; then
735 printf ", (F)M radio MOD"
737 if [ "$modelname" = "iriverh120" ]; then
744 while [ $cont = "1" ]; do
746 if [ "$interact" ]; then
749 option
=`echo "$atype" | cut -c 1`
754 if [ "yes" = "$profile" ]; then
755 echo "Debug is incompatible with profiling"
757 echo "DEBUG build enabled"
762 echo "logf() support enabled"
766 echo "Using Rockbox' small C library"
767 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
770 echo "Including test plugins"
771 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
774 echo "bootchart enabled (logf also enabled)"
779 echo "Logf to serial port enabled (logf also enabled)"
784 echo "Simulator build enabled"
788 if [ "yes" = "$use_debug" ]; then
789 echo "Profiling is incompatible with debug"
791 echo "Profiling support is enabled"
796 echo "Voice build selected"
800 if [ "$modelname" = "archosplayer" ]; then
801 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
802 echo "ATA power off enabled"
806 if [ "$t_model" = "ondio" ]; then
807 have_backlight
="#define HAVE_BACKLIGHT"
808 echo "Backlight functions enabled"
812 if [ "$modelname" = "iaudiom5" ]; then
813 have_fmradio_in
="#define HAVE_FMRADIO_IN"
814 echo "FM radio functions enabled"
818 if [ "$modelname" = "iriverh120" ]; then
819 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
820 have_rtc_alarm
="#define HAVE_RTC_ALARM"
821 echo "RTC functions enabled (DS1339/DS3231)"
825 echo "Enabling Windows 32 cross-compiling"
826 win32crosscompile
="yes"
828 "") # Match enter press when finished with advanced options
832 echo "[ERROR] Option $option unsupported"
835 if [ "$interact" ]; then
836 btype
="$btype$option"
838 atype
=`echo "$atype" | cut -c 2-`
839 [ "$atype" ] || cont
=0
844 if [ "yes" = "$voice" ]; then
845 # Ask about languages to build
847 voicelanguage
=`whichlang`
848 echo "Voice language set to $voicelanguage"
850 # Configure encoder and TTS engine for each language
851 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
852 voiceconfig
"$thislang"
855 if [ "yes" = "$use_debug" ]; then
857 GCCOPTS
="$GCCOPTS -g -DDEBUG"
859 if [ "yes" = "$logf" ]; then
860 use_logf
="#define ROCKBOX_HAS_LOGF 1"
862 if [ "yes" = "$logf_serial" ]; then
863 use_logf_serial
="#define LOGF_SERIAL 1"
865 if [ "yes" = "$bootchart" ]; then
866 use_bootchart
="#define DO_BOOTCHART 1"
868 if [ "yes" = "$simulator" ]; then
870 extradefines
="$extradefines -DSIMULATOR"
874 if [ "yes" = "$profile" ]; then
875 extradefines
="$extradefines -DRB_PROFILE"
876 PROFILE_OPTS
="-finstrument-functions"
880 # Configure voice settings
883 if [ ! "$ARG_TTS" ]; then
884 echo "Building $thislang voice for $modelname. Select options"
888 if [ -n "`findtool flite`" ]; then
892 DEFAULT_TTS_OPTS
=$FLITE_OPTS
893 DEFAULT_NOISEFLOOR
="500"
896 if [ -n "`findtool espeak`" ]; then
900 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
901 DEFAULT_NOISEFLOOR
="500"
904 if [ -n "`findtool festival`" ]; then
905 FESTIVAL
="(F)estival "
908 FESTIVAL_OPTS
="--language italian"
911 FESTIVAL_OPTS
="--language spanish"
914 FESTIVAL_OPTS
="--language finnish"
917 FESTIVAL_OPTS
="--language czech"
923 DEFAULT_TTS
="festival"
924 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
925 DEFAULT_NOISEFLOOR
="500"
928 if [ -n "`findtool swift`" ]; then
932 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
933 DEFAULT_NOISEFLOOR
="500"
936 # Allow SAPI if Windows is in use
937 if [ -n "`findtool winver`" ]; then
941 DEFAULT_TTS_OPTS
=$SAPI_OPTS
942 DEFAULT_NOISEFLOOR
="500"
946 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
947 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
951 if [ "$ARG_TTS" ]; then
954 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
956 if [ -z "$option" ]; then option
=${DEFAULT_CHOICE}; fi
957 advopts
="$advopts --tts=$option"
962 NOISEFLOOR
="500" # TODO: check this value
968 TTS_OPTS
=$ESPEAK_OPTS
971 TTS_ENGINE
="festival"
973 TTS_OPTS
=$FESTIVAL_OPTS
986 TTS_ENGINE
=$DEFAULT_TTS
987 TTS_OPTS
=$DEFAULT_TTS_OPTS
988 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
990 echo "Using $TTS_ENGINE for TTS"
992 # Select which voice to use for Festival
993 if [ "$TTS_ENGINE" = "festival" ]; then
994 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
995 for voice
in $voicelist; do
996 TTS_FESTIVAL_VOICE
="$voice" # Default choice
999 if [ "$ARG_VOICE" ]; then
1003 for voice
in $voicelist; do
1004 printf "%3d. %s\n" "$i" "$voice"
1007 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
1011 for voice
in $voicelist; do
1012 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
1013 TTS_FESTIVAL_VOICE
="$voice"
1017 advopts
="$advopts --voice=$CHOICE"
1018 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1019 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1022 # Read custom tts options from command line
1023 if [ "$ARG_TTSOPTS" ]; then
1024 TTS_OPTS
="$ARG_TTSOPTS"
1025 echo "$TTS_ENGINE options set to $TTS_OPTS"
1028 if [ "$swcodec" = "yes" ]; then
1029 ENCODER
="rbspeexenc"
1030 ENC_OPTS
="-q 4 -c 10"
1032 if [ -n "`findtool lame`" ]; then
1034 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1036 echo "You need LAME in the system path to build voice files for"
1037 echo "HWCODEC targets."
1042 echo "Using $ENCODER for encoding voice clips"
1044 # Read custom encoder options from command line
1045 if [ "$ARG_ENCOPTS" ]; then
1046 ENC_OPTS
="$ARG_ENCOPTS"
1047 echo "$ENCODER options set to $ENC_OPTS"
1051 if [ -n "`findtool cygpath`" ]; then
1052 TEMPDIR
=`cygpath . -a -w`
1057 # figure out which languages that are around
1058 for file in $rootdir/apps
/lang
/*.lang
; do
1059 clean
=`basename $file .lang`
1060 langs
="$langs $clean"
1063 if [ "$ARG_LANG" ]; then
1066 echo "Select a number for the language to use (default is english)"
1067 # FIXME The multiple-language feature is currently broken
1068 # echo "You may enter a comma-separated list of languages to build"
1071 for one
in $langs; do
1076 advopts
="$advopts --language=$pick"
1082 # Allow the user to pass a comma-separated list of langauges
1083 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1085 for one
in $langs; do
1086 # Accept both the language number and name
1087 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1088 if [ "$output" = "" ]; then
1097 if [ -z "$output" ]; then
1105 echo "Rockbox configure script."
1106 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1107 echo "Do *NOT* run this within the tools directory!"
1110 Usage: configure [OPTION]...
1112 --target=TARGET Sets the target, TARGET can be either the target ID or
1113 corresponding string. Run without this option to see all
1116 --ram=RAM Sets the RAM for certain targets. Even though any number
1117 is accepted, not every number is correct. The default
1118 value will be applied, if you entered a wrong number
1119 (which depends on the target). Watch the output. Run
1120 without this option if you are not sure which the right
1123 --type=TYPE Sets the build type. Shortcuts are also valid.
1124 Run without this option to see all available types.
1125 Multiple values are allowed and managed in the input
1126 order. So --type=b stands for Bootloader build, while
1127 --type=ab stands for "Backlight MOD" build.
1129 --lcdwidth=X Sets the width of the LCD. Used only for application
1132 --lcdheight=Y Sets the height of the LCD. Used only for application
1135 --language=LANG Set the language used for voice generation (used only if
1138 --tts=ENGINE Set the TTS engine used for voice generation (used only
1141 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1144 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1146 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1148 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1149 This is useful for having multiple alternate builds on
1150 your device that you can load with ROLO. However as the
1151 bootloader looks for .rockbox you won't be able to boot
1154 --ccache Enable ccache use (done by default these days)
1155 --no-ccache Disable ccache use
1157 --eabi Make configure prefer toolchains that are able to compile
1158 for the new ARM standard abi EABI
1159 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1160 --thumb Build with -mthumb (for ARM builds)
1161 --no-thumb The opposite of --thumb (don't use thumb even for targets
1162 where this is the default
1163 --sdl-threads Force use of SDL threads. They have inferior performance,
1164 but are better debuggable with GDB
1165 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1166 behavior of falling back to them if no native thread
1168 --prefix Target installation directory
1169 --help Shows this message (must not be used with other options)
1188 ARG_PREFIX
="$PREFIX"
1193 --ccache) ARG_CCACHE
=1;;
1194 --no-ccache) ARG_CCACHE
=0;;
1195 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1196 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1197 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1198 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1199 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1200 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1201 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1202 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1203 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1204 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1205 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1206 --eabi) ARG_ARM_EABI
=1;;
1207 --no-eabi) ARG_ARM_EABI
=0;;
1208 --thumb) ARG_ARM_THUMB
=1;;
1209 --no-thumb) ARG_ARM_THUMB
=0;;
1210 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1212 ARG_THREAD_SUPPORT
=0;;
1213 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1215 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1218 [ "$err" ] && exit 1
1222 if [ "$TMPDIR" != "" ]; then
1227 echo Using temporary directory
$tmpdir
1229 if test -r "configure"; then
1230 # this is a check for a configure script in the current directory, it there
1231 # is one, try to figure out if it is this one!
1233 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1234 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1235 echo "It will only cause you pain and grief. Instead do this:"
1238 echo " mkdir build-dir"
1239 echo " cd build-dir"
1240 echo " ../tools/configure"
1242 echo "Much happiness will arise from this. Enjoy"
1247 # get our current directory
1250 if { echo $pwd |
grep " "; } then
1251 echo "You're running this script in a path that contains space. The build"
1252 echo "system is unfortunately not clever enough to deal with this. Please"
1253 echo "run the script from a different path, rename the path or fix the build"
1258 if [ -z "$rootdir" ]; then
1259 ##################################################################
1260 # Figure out where the source code root is!
1262 rootdir
=`dirname $0`/..
/
1264 #####################################################################
1265 # Convert the possibly relative directory name to an absolute version
1271 # cd back to the build dir
1276 appsdir
='$(ROOTDIR)/apps'
1277 toolsdir
='$(ROOTDIR)/tools'
1280 ##################################################################
1281 # Figure out target platform
1284 if [ "$ARG_TARGET" ]; then
1285 buildfor
=$ARG_TARGET
1287 echo "Enter target platform:"
1289 ==Archos== ==iriver== ==Apple iPod==
1290 0) Player/Studio 10) H120/H140 20) Color/Photo
1291 1) Recorder 11) H320/H340 21) Nano 1G
1292 2) FM Recorder 12) iHP-100/110/115 22) Video
1293 3) Recorder v2 13) iFP-790 23) 3G
1294 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1295 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1296 6) AV300 26) Mini 2G
1297 ==Toshiba== 27) 1G, 2G
1298 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1299 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1301 32) 7 ==Olympus= ==SanDisk==
1302 33) D2 70) M:Robe 500 50) Sansa e200
1303 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1305 ==Creative== ==Philips== 53) Sansa m200
1306 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1307 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1308 92) Zen Vision HDD1830 56) Sansa e200v2
1309 102) GoGear HDD6330 57) Sansa m200v4
1310 ==Onda== 58) Sansa Fuze
1311 120) VX747 ==Meizu== 59) Sansa c200v2
1312 121) VX767 110) M6SL 60) Sansa Clipv2
1313 122) VX747+ 111) M6SP 61) Sansa View
1314 123) VX777 112) M3 62) Sansa Clip+
1316 ==Samsung== ==Tatung== 64) Sansa Fuze+
1317 140) YH-820 150) Elio TPJ-1022 65) Sansa Clip Zip
1318 141) YH-920 66) Sansa Connect
1319 142) YH-925 ==Packard Bell==
1320 143) YP-S3 160) Vibe 500 ==Logik==
1322 ==Application== ==MPIO==
1323 200) SDL 170) HD200 ==Lyre project==
1324 201) Android 171) HD300 130) Lyre proto 1
1325 202) Nokia N8xx 131) Mini2440
1326 203) Nokia N900 ==ROCKCHIP== ==HiFiMAN==
1327 204) Pandora 180) rk27xx generic 190) HM-60x
1328 205) Samsung YP-R0 191) HM-801
1335 # Set of tools built for all target platforms:
1336 toolset
="rdf2binary convbdf codepages"
1338 # Toolsets for some target families:
1339 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1340 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1341 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1342 ipodbitmaptools
="$toolset scramble bmp2rb"
1343 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1344 tccbitmaptools
="$toolset scramble bmp2rb"
1345 # generic is used by IFP, Meizu and Onda
1346 genericbitmaptools
="$toolset bmp2rb"
1347 # scramble is used by all other targets
1348 scramblebitmaptools
="$genericbitmaptools scramble"
1351 # ---- For each target ----
1354 # target_id: a unique number identifying this target, IS NOT the menu number.
1355 # Just use the currently highest number+1 when you add a new
1357 # modelname: short model name used all over to identify this target
1358 # memory: number of megabytes of RAM this target has. If the amount can
1359 # be selected by the size prompt, let memory be unset here
1360 # target: -Ddefine passed to the build commands to make the correct
1361 # config-*.h file get included etc
1362 # tool: the tool that takes a plain binary and converts that into a
1363 # working "firmware" file for your target
1364 # output: the final output file name
1365 # boottool: the tool that takes a plain binary and generates a bootloader
1366 # file for your target (or blank to use $tool)
1367 # bootoutput:the final output file name for the bootloader (or blank to use
1369 # appextra: passed to the APPEXTRA variable in the Makefiles.
1370 # TODO: add proper explanation
1371 # archosrom: used only for Archos targets that build a special flashable .ucl
1373 # flash: name of output for flashing, for targets where there's a special
1374 # file output for this.
1375 # plugins: set to 'yes' to build the plugins. Early development builds can
1376 # set this to no in the early stages to have an easier life for a
1378 # swcodec: set 'yes' on swcodec targets
1379 # toolset: lists what particular tools in the tools/ directory that this
1380 # target needs to have built prior to building Rockbox
1383 # *cc: sets up gcc and compiler options for your target builds. Note
1384 # that if you select a simulator build, the compiler selection is
1385 # overridden later in the script.
1391 modelname
="archosplayer"
1392 target
="ARCHOS_PLAYER"
1394 tool
="$rootdir/tools/scramble"
1396 appextra
="player:gui"
1397 archosrom
="$pwd/rombox.ucl"
1398 flash
="$pwd/rockbox.ucl"
1402 # toolset is the tools within the tools directory that we build for
1403 # this particular target.
1404 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1406 # Note: the convbdf is present in the toolset just because: 1) the
1407 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1408 # build the player simulator
1411 t_manufacturer
="archos"
1417 modelname
="archosrecorder"
1418 target
="ARCHOS_RECORDER"
1420 tool
="$rootdir/tools/scramble"
1421 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1422 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1424 appextra
="recorder:gui:radio"
1425 #archosrom="$pwd/rombox.ucl"
1426 flash
="$pwd/rockbox.ucl"
1429 # toolset is the tools within the tools directory that we build for
1430 # this particular target.
1431 toolset
=$archosbitmaptools
1433 t_manufacturer
="archos"
1439 modelname
="archosfmrecorder"
1440 target
="ARCHOS_FMRECORDER"
1442 tool
="$rootdir/tools/scramble -fm"
1443 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1444 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1446 appextra
="recorder:gui:radio"
1447 #archosrom="$pwd/rombox.ucl"
1448 flash
="$pwd/rockbox.ucl"
1451 # toolset is the tools within the tools directory that we build for
1452 # this particular target.
1453 toolset
=$archosbitmaptools
1455 t_manufacturer
="archos"
1461 modelname
="archosrecorderv2"
1462 target
="ARCHOS_RECORDERV2"
1464 tool
="$rootdir/tools/scramble -v2"
1465 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1466 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1468 appextra
="recorder:gui:radio"
1469 #archosrom="$pwd/rombox.ucl"
1470 flash
="$pwd/rockbox.ucl"
1473 # toolset is the tools within the tools directory that we build for
1474 # this particular target.
1475 toolset
=$archosbitmaptools
1477 t_manufacturer
="archos"
1483 modelname
="archosondiosp"
1484 target
="ARCHOS_ONDIOSP"
1486 tool
="$rootdir/tools/scramble -osp"
1487 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1488 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1490 appextra
="recorder:gui:radio"
1491 #archosrom="$pwd/rombox.ucl"
1492 flash
="$pwd/rockbox.ucl"
1495 # toolset is the tools within the tools directory that we build for
1496 # this particular target.
1497 toolset
=$archosbitmaptools
1499 t_manufacturer
="archos"
1505 modelname
="archosondiofm"
1506 target
="ARCHOS_ONDIOFM"
1508 tool
="$rootdir/tools/scramble -ofm"
1509 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1510 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1512 appextra
="recorder:gui:radio"
1513 #archosrom="$pwd/rombox.ucl"
1514 flash
="$pwd/rockbox.ucl"
1517 toolset
=$archosbitmaptools
1519 t_manufacturer
="archos"
1525 modelname
="archosav300"
1526 target
="ARCHOS_AV300"
1529 tool
="$rootdir/tools/scramble -mm=C"
1530 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1531 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1533 appextra
="recorder:gui:radio"
1536 # toolset is the tools within the tools directory that we build for
1537 # this particular target.
1538 toolset
="$toolset scramble descramble bmp2rb"
1539 # architecture, manufacturer and model for the target-tree build
1541 t_manufacturer
="archos"
1547 modelname
="iriverh120"
1548 target
="IRIVER_H120"
1551 tool
="$rootdir/tools/scramble -add=h120"
1552 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1553 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1554 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1555 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1556 output
="rockbox.iriver"
1557 bootoutput
="bootloader.iriver"
1558 appextra
="recorder:gui:radio"
1559 flash
="$pwd/rombox.iriver"
1562 # toolset is the tools within the tools directory that we build for
1563 # this particular target.
1564 toolset
=$iriverbitmaptools
1566 t_manufacturer
="iriver"
1572 modelname
="iriverh300"
1573 target
="IRIVER_H300"
1576 tool
="$rootdir/tools/scramble -add=h300"
1577 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1578 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1579 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1580 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1581 output
="rockbox.iriver"
1582 appextra
="recorder:gui:radio"
1585 # toolset is the tools within the tools directory that we build for
1586 # this particular target.
1587 toolset
=$iriverbitmaptools
1589 t_manufacturer
="iriver"
1595 modelname
="iriverh100"
1596 target
="IRIVER_H100"
1599 tool
="$rootdir/tools/scramble -add=h100"
1600 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1601 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1602 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1603 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1604 output
="rockbox.iriver"
1605 bootoutput
="bootloader.iriver"
1606 appextra
="recorder:gui:radio"
1607 flash
="$pwd/rombox.iriver"
1610 # toolset is the tools within the tools directory that we build for
1611 # this particular target.
1612 toolset
=$iriverbitmaptools
1614 t_manufacturer
="iriver"
1620 modelname
="iriverifp7xx"
1621 target
="IRIVER_IFP7XX"
1625 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1626 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1627 output
="rockbox.wma"
1628 appextra
="recorder:gui:radio"
1631 # toolset is the tools within the tools directory that we build for
1632 # this particular target.
1633 toolset
=$genericbitmaptools
1635 t_manufacturer
="pnx0101"
1636 t_model
="iriver-ifp7xx"
1641 modelname
="iriverh10"
1645 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1646 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1647 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1648 output
="rockbox.mi4"
1649 appextra
="recorder:gui:radio"
1652 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1653 bootoutput
="H10_20GC.mi4"
1654 # toolset is the tools within the tools directory that we build for
1655 # this particular target.
1656 toolset
=$scramblebitmaptools
1657 # architecture, manufacturer and model for the target-tree build
1660 t_manufacturer
="iriver"
1666 modelname
="iriverh10_5gb"
1667 target
="IRIVER_H10_5GB"
1670 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1671 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1672 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1673 output
="rockbox.mi4"
1674 appextra
="recorder:gui:radio"
1677 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1678 bootoutput
="H10.mi4"
1679 # toolset is the tools within the tools directory that we build for
1680 # this particular target.
1681 toolset
=$scramblebitmaptools
1682 # architecture, manufacturer and model for the target-tree build
1685 t_manufacturer
="iriver"
1691 modelname
="ipodcolor"
1695 tool
="$rootdir/tools/scramble -add=ipco"
1696 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1697 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1698 output
="rockbox.ipod"
1699 appextra
="recorder:gui:radio"
1702 bootoutput
="bootloader-$modelname.ipod"
1703 # toolset is the tools within the tools directory that we build for
1704 # this particular target.
1705 toolset
=$ipodbitmaptools
1706 # architecture, manufacturer and model for the target-tree build
1709 t_manufacturer
="ipod"
1715 modelname
="ipodnano1g"
1719 tool
="$rootdir/tools/scramble -add=nano"
1720 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1721 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1722 output
="rockbox.ipod"
1723 appextra
="recorder:gui:radio"
1726 bootoutput
="bootloader-$modelname.ipod"
1727 # toolset is the tools within the tools directory that we build for
1728 # this particular target.
1729 toolset
=$ipodbitmaptools
1730 # architecture, manufacturer and model for the target-tree build
1733 t_manufacturer
="ipod"
1739 modelname
="ipodvideo"
1741 memory
=64 # always. This is reduced at runtime if needed
1743 tool
="$rootdir/tools/scramble -add=ipvd"
1744 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1745 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1746 output
="rockbox.ipod"
1747 appextra
="recorder:gui:radio"
1750 bootoutput
="bootloader-$modelname.ipod"
1751 # toolset is the tools within the tools directory that we build for
1752 # this particular target.
1753 toolset
=$ipodbitmaptools
1754 # architecture, manufacturer and model for the target-tree build
1757 t_manufacturer
="ipod"
1767 tool
="$rootdir/tools/scramble -add=ip3g"
1768 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1769 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1770 output
="rockbox.ipod"
1771 appextra
="recorder:gui:radio"
1774 bootoutput
="bootloader-$modelname.ipod"
1775 # toolset is the tools within the tools directory that we build for
1776 # this particular target.
1777 toolset
=$ipodbitmaptools
1778 # architecture, manufacturer and model for the target-tree build
1781 t_manufacturer
="ipod"
1791 tool
="$rootdir/tools/scramble -add=ip4g"
1792 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1793 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1794 output
="rockbox.ipod"
1795 appextra
="recorder:gui:radio"
1798 bootoutput
="bootloader-$modelname.ipod"
1799 # toolset is the tools within the tools directory that we build for
1800 # this particular target.
1801 toolset
=$ipodbitmaptools
1802 # architecture, manufacturer and model for the target-tree build
1805 t_manufacturer
="ipod"
1811 modelname
="ipodmini1g"
1815 tool
="$rootdir/tools/scramble -add=mini"
1816 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1817 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1818 output
="rockbox.ipod"
1819 appextra
="recorder:gui:radio"
1822 bootoutput
="bootloader-$modelname.ipod"
1823 # toolset is the tools within the tools directory that we build for
1824 # this particular target.
1825 toolset
=$ipodbitmaptools
1826 # architecture, manufacturer and model for the target-tree build
1829 t_manufacturer
="ipod"
1835 modelname
="ipodmini2g"
1836 target
="IPOD_MINI2G"
1839 tool
="$rootdir/tools/scramble -add=mn2g"
1840 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1841 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1842 output
="rockbox.ipod"
1843 appextra
="recorder:gui:radio"
1846 bootoutput
="bootloader-$modelname.ipod"
1847 # toolset is the tools within the tools directory that we build for
1848 # this particular target.
1849 toolset
=$ipodbitmaptools
1850 # architecture, manufacturer and model for the target-tree build
1853 t_manufacturer
="ipod"
1859 modelname
="ipod1g2g"
1863 tool
="$rootdir/tools/scramble -add=1g2g"
1864 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1865 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1866 output
="rockbox.ipod"
1867 appextra
="recorder:gui:radio"
1870 bootoutput
="bootloader-$modelname.ipod"
1871 # toolset is the tools within the tools directory that we build for
1872 # this particular target.
1873 toolset
=$ipodbitmaptools
1874 # architecture, manufacturer and model for the target-tree build
1877 t_manufacturer
="ipod"
1883 modelname
="ipodnano2g"
1884 target
="IPOD_NANO2G"
1887 tool
="$rootdir/tools/scramble -add=nn2g"
1888 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1889 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1890 output
="rockbox.ipod"
1891 appextra
="recorder:gui:radio"
1894 bootoutput
="bootloader-$modelname.ipod"
1895 # toolset is the tools within the tools directory that we build for
1896 # this particular target.
1897 toolset
=$ipodbitmaptools
1898 # architecture, manufacturer and model for the target-tree build
1900 t_manufacturer
="s5l8700"
1901 t_model
="ipodnano2g"
1910 tool
="$rootdir/tools/scramble -add=ip6g"
1911 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1912 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1913 output
="rockbox.ipod"
1914 appextra
="recorder:gui:radio"
1917 bootoutput
="bootloader-$modelname.ipod"
1918 # toolset is the tools within the tools directory that we build for
1919 # this particular target.
1920 toolset
=$ipodbitmaptools
1921 # architecture, manufacturer and model for the target-tree build
1923 t_manufacturer
="s5l8702"
1929 modelname
="iaudiox5"
1933 tool
="$rootdir/tools/scramble -add=iax5"
1934 boottool
="$rootdir/tools/scramble -iaudiox5"
1935 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1936 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1937 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1938 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1939 output
="rockbox.iaudio"
1940 bootoutput
="x5_fw.bin"
1941 appextra
="recorder:gui:radio"
1944 # toolset is the tools within the tools directory that we build for
1945 # this particular target.
1946 toolset
="$iaudiobitmaptools"
1947 # architecture, manufacturer and model for the target-tree build
1949 t_manufacturer
="iaudio"
1955 modelname
="iaudiom5"
1959 tool
="$rootdir/tools/scramble -add=iam5"
1960 boottool
="$rootdir/tools/scramble -iaudiom5"
1961 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1962 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1963 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1964 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1965 output
="rockbox.iaudio"
1966 bootoutput
="m5_fw.bin"
1967 appextra
="recorder:gui:radio"
1970 # toolset is the tools within the tools directory that we build for
1971 # this particular target.
1972 toolset
="$iaudiobitmaptools"
1973 # architecture, manufacturer and model for the target-tree build
1975 t_manufacturer
="iaudio"
1985 tool
="$rootdir/tools/scramble -add=i7"
1986 boottool
="$rootdir/tools/scramble -tcc=crc"
1987 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1988 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1989 output
="rockbox.iaudio"
1990 appextra
="recorder:gui:radio"
1993 bootoutput
="I7_FW.BIN"
1994 # toolset is the tools within the tools directory that we build for
1995 # this particular target.
1996 toolset
="$tccbitmaptools"
1997 # architecture, manufacturer and model for the target-tree build
1999 t_manufacturer
="tcc77x"
2009 tool
="$rootdir/tools/scramble -add=d2"
2011 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2012 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2014 bootoutput
="bootloader-cowond2.bin"
2015 appextra
="recorder:gui:radio"
2018 toolset
="$tccbitmaptools"
2019 # architecture, manufacturer and model for the target-tree build
2021 t_manufacturer
="tcc780x"
2027 modelname
="iaudiom3"
2031 tool
="$rootdir/tools/scramble -add=iam3"
2032 boottool
="$rootdir/tools/scramble -iaudiom3"
2033 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2034 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2035 output
="rockbox.iaudio"
2036 bootoutput
="cowon_m3.bin"
2037 appextra
="recorder:gui:radio"
2040 # toolset is the tools within the tools directory that we build for
2041 # this particular target.
2042 toolset
="$iaudiobitmaptools"
2043 # architecture, manufacturer and model for the target-tree build
2045 t_manufacturer
="iaudio"
2051 modelname
="gigabeatfx"
2055 tool
="$rootdir/tools/scramble -add=giga"
2056 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2057 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2058 output
="rockbox.gigabeat"
2059 appextra
="recorder:gui:radio"
2062 toolset
=$gigabeatbitmaptools
2063 boottool
="$rootdir/tools/scramble -gigabeat"
2064 bootoutput
="FWIMG01.DAT"
2065 # architecture, manufacturer and model for the target-tree build
2067 t_manufacturer
="s3c2440"
2068 t_model
="gigabeat-fx"
2073 modelname
="gigabeats"
2077 tool
="$rootdir/tools/scramble -add=gigs"
2078 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2079 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2080 output
="rockbox.gigabeat"
2081 appextra
="recorder:gui:radio"
2084 toolset
="$gigabeatbitmaptools"
2085 boottool
="$rootdir/tools/scramble -gigabeats"
2087 # architecture, manufacturer and model for the target-tree build
2089 t_manufacturer
="imx31"
2090 t_model
="gigabeat-s"
2095 modelname
="mrobe500"
2099 tool
="$rootdir/tools/scramble -add=m500"
2100 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2101 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2102 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2103 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2104 output
="rockbox.mrobe500"
2105 appextra
="recorder:gui:radio"
2108 toolset
=$gigabeatbitmaptools
2110 bootoutput
="rockbox.mrboot"
2111 # architecture, manufacturer and model for the target-tree build
2113 t_manufacturer
="tms320dm320"
2119 modelname
="mrobe100"
2123 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2124 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2125 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2126 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2127 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2128 output
="rockbox.mi4"
2129 appextra
="recorder:gui:radio"
2132 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2133 bootoutput
="pp5020.mi4"
2134 # toolset is the tools within the tools directory that we build for
2135 # this particular target.
2136 toolset
=$scramblebitmaptools
2137 # architecture, manufacturer and model for the target-tree build
2140 t_manufacturer
="olympus"
2146 modelname
="logikdax"
2150 tool
="$rootdir/tools/scramble -add=ldax"
2151 boottool
="$rootdir/tools/scramble -tcc=crc"
2152 bootoutput
="player.rom"
2153 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2154 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2155 output
="rockbox.logik"
2156 appextra
="recorder:gui:radio"
2159 # toolset is the tools within the tools directory that we build for
2160 # this particular target.
2161 toolset
=$tccbitmaptools
2162 # architecture, manufacturer and model for the target-tree build
2164 t_manufacturer
="tcc77x"
2170 modelname
="zenvisionm30gb"
2171 target
="CREATIVE_ZVM"
2174 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2175 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2176 tool
="$rootdir/tools/scramble -creative=zvm"
2178 output
="rockbox.zvm"
2179 appextra
="recorder:gui:radio"
2182 toolset
=$ipodbitmaptools
2183 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2184 bootoutput
="rockbox.zvmboot"
2185 # architecture, manufacturer and model for the target-tree build
2187 t_manufacturer
="tms320dm320"
2188 t_model
="creative-zvm"
2193 modelname
="zenvisionm60gb"
2194 target
="CREATIVE_ZVM60GB"
2197 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2198 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2199 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2201 output
="rockbox.zvm60"
2202 appextra
="recorder:gui:radio"
2205 toolset
=$ipodbitmaptools
2206 boottool
="$rootdir/tools/scramble -creative=zvm60"
2207 bootoutput
="rockbox.zvm60boot"
2208 # architecture, manufacturer and model for the target-tree build
2210 t_manufacturer
="tms320dm320"
2211 t_model
="creative-zvm"
2216 modelname
="zenvision"
2217 target
="CREATIVE_ZV"
2220 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2221 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2222 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2225 appextra
="recorder:gui:radio"
2228 toolset
=$ipodbitmaptools
2229 boottool
="$rootdir/tools/scramble -creative=zenvision"
2230 bootoutput
="rockbox.zvboot"
2231 # architecture, manufacturer and model for the target-tree build
2233 t_manufacturer
="tms320dm320"
2234 t_model
="creative-zvm"
2239 modelname
="sansae200"
2241 memory
=32 # supposedly
2243 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2244 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2245 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2246 output
="rockbox.mi4"
2247 appextra
="recorder:gui:radio"
2250 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2251 bootoutput
="PP5022.mi4"
2252 # toolset is the tools within the tools directory that we build for
2253 # this particular target.
2254 toolset
=$scramblebitmaptools
2255 # architecture, manufacturer and model for the target-tree build
2258 t_manufacturer
="sandisk"
2259 t_model
="sansa-e200"
2263 # the e200R model is pretty much identical to the e200, it only has a
2264 # different option to the scramble tool when building a bootloader and
2265 # makes the bootloader output file name in all lower case.
2267 modelname
="sansae200r"
2269 memory
=32 # supposedly
2271 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2272 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2273 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2274 output
="rockbox.mi4"
2275 appextra
="recorder:gui:radio"
2278 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2279 bootoutput
="pp5022.mi4"
2280 # toolset is the tools within the tools directory that we build for
2281 # this particular target.
2282 toolset
=$scramblebitmaptools
2283 # architecture, manufacturer and model for the target-tree build
2286 t_manufacturer
="sandisk"
2287 t_model
="sansa-e200"
2292 modelname
="sansac200"
2294 memory
=32 # supposedly
2296 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2297 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2298 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2299 output
="rockbox.mi4"
2300 appextra
="recorder:gui:radio"
2303 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2304 bootoutput
="firmware.mi4"
2305 # toolset is the tools within the tools directory that we build for
2306 # this particular target.
2307 toolset
=$scramblebitmaptools
2308 # architecture, manufacturer and model for the target-tree build
2311 t_manufacturer
="sandisk"
2312 t_model
="sansa-c200"
2317 modelname
="sansam200"
2321 tool
="$rootdir/tools/scramble -add=m200"
2322 boottool
="$rootdir/tools/scramble -tcc=crc"
2323 bootoutput
="player.rom"
2324 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2325 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2326 output
="rockbox.m200"
2327 appextra
="recorder:gui:radio"
2330 # toolset is the tools within the tools directory that we build for
2331 # this particular target.
2332 toolset
=$tccbitmaptools
2333 # architecture, manufacturer and model for the target-tree build
2335 t_manufacturer
="tcc77x"
2341 modelname
="sansac100"
2345 tool
="$rootdir/tools/scramble -add=c100"
2346 boottool
="$rootdir/tools/scramble -tcc=crc"
2347 bootoutput
="player.rom"
2348 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2349 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2350 output
="rockbox.c100"
2351 appextra
="recorder:gui:radio"
2354 # toolset is the tools within the tools directory that we build for
2355 # this particular target.
2356 toolset
=$tccbitmaptools
2357 # architecture, manufacturer and model for the target-tree build
2359 t_manufacturer
="tcc77x"
2365 modelname
="sansaclip"
2368 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2369 bmp2rb_native
="$bmp2rb_mono"
2370 tool
="$rootdir/tools/scramble -add=clip"
2371 output
="rockbox.sansa"
2372 bootoutput
="bootloader-clip.sansa"
2373 appextra
="recorder:gui:radio"
2376 toolset
=$scramblebitmaptools
2378 t_manufacturer
="as3525"
2379 t_model
="sansa-clip"
2380 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2382 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2388 modelname
="sansae200v2"
2389 target
="SANSA_E200V2"
2391 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2392 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2393 tool
="$rootdir/tools/scramble -add=e2v2"
2394 output
="rockbox.sansa"
2395 bootoutput
="bootloader-e200v2.sansa"
2396 appextra
="recorder:gui:radio"
2399 toolset
=$scramblebitmaptools
2401 t_manufacturer
="as3525"
2402 t_model
="sansa-e200v2"
2409 modelname
="sansam200v4"
2410 target
="SANSA_M200V4"
2412 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2413 bmp2rb_native
="$bmp2rb_mono"
2414 tool
="$rootdir/tools/scramble -add=m2v4"
2415 output
="rockbox.sansa"
2416 bootoutput
="bootloader-m200v4.sansa"
2417 appextra
="recorder:gui:radio"
2420 toolset
=$scramblebitmaptools
2422 t_manufacturer
="as3525"
2423 t_model
="sansa-m200v4"
2424 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2426 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2432 modelname
="sansafuze"
2435 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2436 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2437 tool
="$rootdir/tools/scramble -add=fuze"
2438 output
="rockbox.sansa"
2439 bootoutput
="bootloader-fuze.sansa"
2440 appextra
="recorder:gui:radio"
2443 toolset
=$scramblebitmaptools
2445 t_manufacturer
="as3525"
2446 t_model
="sansa-fuze"
2453 modelname
="sansac200v2"
2454 target
="SANSA_C200V2"
2455 memory
=2 # as per OF diagnosis mode
2456 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2457 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2458 tool
="$rootdir/tools/scramble -add=c2v2"
2459 output
="rockbox.sansa"
2460 bootoutput
="bootloader-c200v2.sansa"
2461 appextra
="recorder:gui:radio"
2464 # toolset is the tools within the tools directory that we build for
2465 # this particular target.
2466 toolset
=$scramblebitmaptools
2467 # architecture, manufacturer and model for the target-tree build
2469 t_manufacturer
="as3525"
2470 t_model
="sansa-c200v2"
2471 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2473 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2478 modelname
="sansaclipv2"
2479 target
="SANSA_CLIPV2"
2481 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2482 bmp2rb_native
="$bmp2rb_mono"
2483 tool
="$rootdir/tools/scramble -add=clv2"
2484 output
="rockbox.sansa"
2485 bootoutput
="bootloader-clipv2.sansa"
2486 appextra
="recorder:gui:radio"
2489 toolset
=$scramblebitmaptools
2491 t_manufacturer
="as3525"
2492 t_model
="sansa-clipv2"
2497 echo "Sansa View is not yet supported!"
2500 modelname
="sansaview"
2504 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2505 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2506 output
="rockbox.mi4"
2510 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2511 bootoutput
="firmware.mi4"
2512 # toolset is the tools within the tools directory that we build for
2513 # this particular target.
2514 toolset
=$scramblebitmaptools
2517 t_manufacturer
="sandisk"
2518 t_model
="sansa-view"
2523 modelname
="sansaclipplus"
2524 target
="SANSA_CLIPPLUS"
2526 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2527 bmp2rb_native
="$bmp2rb_mono"
2528 tool
="$rootdir/tools/scramble -add=cli+"
2529 output
="rockbox.sansa"
2530 bootoutput
="bootloader-clipplus.sansa"
2531 appextra
="recorder:gui:radio"
2534 toolset
=$scramblebitmaptools
2536 t_manufacturer
="as3525"
2537 t_model
="sansa-clipplus"
2543 modelname
="sansafuzev2"
2544 target
="SANSA_FUZEV2"
2546 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2547 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2548 tool
="$rootdir/tools/scramble -add=fuz2"
2549 output
="rockbox.sansa"
2550 bootoutput
="bootloader-fuzev2.sansa"
2551 appextra
="recorder:gui:radio"
2554 toolset
=$scramblebitmaptools
2556 t_manufacturer
="as3525"
2557 t_model
="sansa-fuzev2"
2563 modelname
="sansafuzeplus"
2564 target
="SANSA_FUZEPLUS"
2566 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2567 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2568 tool
="$rootdir/tools/scramble -add=fuz+"
2569 output
="rockbox.sansa"
2570 bootoutput
="bootloader-fuzeplus.sansa"
2571 appextra
="gui:recorder:radio"
2574 toolset
=$scramblebitmaptools
2576 t_manufacturer
="imx233"
2577 t_model
="sansa-fuzeplus"
2583 modelname
="sansaclipzip"
2584 target
="SANSA_CLIPZIP"
2586 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2587 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2588 tool
="$rootdir/tools/scramble -add=clzp"
2589 output
="rockbox.sansa"
2590 bootoutput
="bootloader-clipzip.sansa"
2591 appextra
="recorder:gui:radio"
2594 toolset
=$scramblebitmaptools
2596 t_manufacturer
="as3525"
2597 t_model
="sansa-clipzip"
2603 modelname
="sansaconnect"
2604 target
="SANSA_CONNECT"
2606 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2607 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2608 tool
="$rootdir/tools/scramble -add=conn"
2609 output
="rockbox.sansa"
2610 bootoutput
="bootloader-connect.sansa"
2611 appextra
="recorder:gui"
2614 toolset
=$scramblebitmaptools
2616 t_manufacturer
="tms320dm320"
2617 t_model
="sansa-connect"
2623 modelname
="tatungtpj1022"
2624 target
="TATUNG_TPJ1022"
2627 tool
="$rootdir/tools/scramble -add tpj2"
2628 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2629 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2630 output
="rockbox.elio"
2631 appextra
="recorder:gui:radio"
2634 boottool
="$rootdir/tools/scramble -mi4v2"
2635 bootoutput
="pp5020.mi4"
2636 # toolset is the tools within the tools directory that we build for
2637 # this particular target.
2638 toolset
=$scramblebitmaptools
2639 # architecture, manufacturer and model for the target-tree build
2642 t_manufacturer
="tatung"
2648 modelname
="gogearsa9200"
2649 target
="PHILIPS_SA9200"
2650 memory
=32 # supposedly
2652 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2653 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2654 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2655 output
="rockbox.mi4"
2656 appextra
="recorder:gui:radio"
2659 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2660 bootoutput
="FWImage.ebn"
2661 # toolset is the tools within the tools directory that we build for
2662 # this particular target.
2663 toolset
=$scramblebitmaptools
2664 # architecture, manufacturer and model for the target-tree build
2667 t_manufacturer
="philips"
2673 modelname
="gogearhdd1630"
2674 target
="PHILIPS_HDD1630"
2675 memory
=32 # supposedly
2677 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2678 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2679 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2680 output
="rockbox.mi4"
2681 appextra
="recorder:gui:radio"
2684 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2685 bootoutput
="FWImage.ebn"
2686 # toolset is the tools within the tools directory that we build for
2687 # this particular target.
2688 toolset
=$scramblebitmaptools
2689 # architecture, manufacturer and model for the target-tree build
2692 t_manufacturer
="philips"
2698 modelname
="gogearhdd6330"
2699 target
="PHILIPS_HDD6330"
2702 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2703 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2704 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2705 output
="rockbox.mi4"
2706 appextra
="recorder:gui:radio"
2709 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2710 bootoutput
="FWImage.ebn"
2711 # toolset is the tools within the tools directory that we build for
2712 # this particular target.
2713 toolset
=$scramblebitmaptools
2714 # architecture, manufacturer and model for the target-tree build
2717 t_manufacturer
="philips"
2723 modelname
="meizum6sl"
2728 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2729 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2730 output
="rockbox.meizu"
2731 appextra
="recorder:gui:radio"
2734 toolset
=$genericbitmaptools
2736 bootoutput
="rockboot.ebn"
2737 # architecture, manufacturer and model for the target-tree build
2739 t_manufacturer
="s5l8700"
2740 t_model
="meizu-m6sl"
2745 modelname
="meizum6sp"
2750 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2751 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2752 output
="rockbox.meizu"
2753 appextra
="recorder:gui:radio"
2756 toolset
=$genericbitmaptools
2758 bootoutput
="rockboot.ebn"
2759 # architecture, manufacturer and model for the target-tree build
2761 t_manufacturer
="s5l8700"
2762 t_model
="meizu-m6sp"
2772 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2773 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2774 output
="rockbox.meizu"
2775 appextra
="recorder:gui:radio"
2778 toolset
=$genericbitmaptools
2780 bootoutput
="rockboot.ebn"
2781 # architecture, manufacturer and model for the target-tree build
2783 t_manufacturer
="s5l8700"
2789 modelname
="ondavx747"
2793 tool
="$rootdir/tools/scramble -add=x747"
2794 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2795 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2796 output
="rockbox.vx747"
2797 appextra
="recorder:gui:radio"
2800 toolset
=$genericbitmaptools
2801 boottool
="$rootdir/tools/scramble -ccpmp"
2802 bootoutput
="ccpmp.bin"
2803 # architecture, manufacturer and model for the target-tree build
2805 t_manufacturer
="ingenic_jz47xx"
2806 t_model
="onda_vx747"
2811 modelname
="ondavx767"
2816 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2817 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2818 output
="rockbox.vx767"
2819 appextra
="recorder:gui:radio"
2822 toolset
=$genericbitmaptools
2823 boottool
="$rootdir/tools/scramble -ccpmp"
2824 bootoutput
="ccpmp.bin"
2825 # architecture, manufacturer and model for the target-tree build
2827 t_manufacturer
="ingenic_jz47xx"
2828 t_model
="onda_vx767"
2833 modelname
="ondavx747p"
2834 target
="ONDA_VX747P"
2837 tool
="$rootdir/tools/scramble -add=747p"
2838 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2839 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2840 output
="rockbox.vx747p"
2841 appextra
="recorder:gui:radio"
2844 toolset
=$genericbitmaptools
2845 boottool
="$rootdir/tools/scramble -ccpmp"
2846 bootoutput
="ccpmp.bin"
2847 # architecture, manufacturer and model for the target-tree build
2849 t_manufacturer
="ingenic_jz47xx"
2850 t_model
="onda_vx747"
2855 modelname
="ondavx777"
2859 tool
="$rootdir/tools/scramble -add=x777"
2860 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2861 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2862 output
="rockbox.vx777"
2863 appextra
="recorder:gui:radio"
2866 toolset
=$genericbitmaptools
2867 boottool
="$rootdir/tools/scramble -ccpmp"
2868 bootoutput
="ccpmp.bin"
2869 # architecture, manufacturer and model for the target-tree build
2871 t_manufacturer
="ingenic_jz47xx"
2872 t_model
="onda_vx747"
2877 modelname
="lyreproto1"
2878 target
="LYRE_PROTO1"
2882 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2883 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2884 output
="rockbox.lyre"
2885 appextra
="recorder:gui:radio"
2888 toolset
=$scramblebitmaptools
2890 bootoutput
="bootloader-proto1.lyre"
2891 # architecture, manufacturer and model for the target-tree build
2893 t_manufacturer
="at91sam"
2894 t_model
="lyre_proto1"
2899 modelname
="mini2440"
2903 tool
="$rootdir/tools/scramble -add=m244"
2904 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2905 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2906 output
="rockbox.mini2440"
2907 appextra
="recorder:gui:radio"
2910 toolset
=$scramblebitmaptools
2912 bootoutput
="bootloader-mini2440.lyre"
2913 # architecture, manufacturer and model for the target-tree build
2915 t_manufacturer
="s3c2440"
2921 modelname
="samsungyh820"
2922 target
="SAMSUNG_YH820"
2925 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2926 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2927 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2928 output
="rockbox.mi4"
2929 appextra
="recorder:gui:radio"
2932 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2933 bootoutput
="FW_YH820.mi4"
2934 # toolset is the tools within the tools directory that we build for
2935 # this particular target.
2936 toolset
=$scramblebitmaptools
2937 # architecture, manufacturer and model for the target-tree build
2940 t_manufacturer
="samsung"
2946 modelname
="samsungyh920"
2947 target
="SAMSUNG_YH920"
2950 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2951 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2952 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2953 output
="rockbox.mi4"
2954 appextra
="recorder:gui:radio"
2957 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2958 bootoutput
="PP5020.mi4"
2959 # toolset is the tools within the tools directory that we build for
2960 # this particular target.
2961 toolset
=$scramblebitmaptools
2962 # architecture, manufacturer and model for the target-tree build
2965 t_manufacturer
="samsung"
2971 modelname
="samsungyh925"
2972 target
="SAMSUNG_YH925"
2975 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2976 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2977 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2978 output
="rockbox.mi4"
2979 appextra
="recorder:gui:radio"
2982 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2983 bootoutput
="FW_YH925.mi4"
2984 # toolset is the tools within the tools directory that we build for
2985 # this particular target.
2986 toolset
=$scramblebitmaptools
2987 # architecture, manufacturer and model for the target-tree build
2990 t_manufacturer
="samsung"
2996 modelname
="samsungyps3"
2997 target
="SAMSUNG_YPS3"
3001 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3002 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3003 output
="rockbox.yps3"
3004 appextra
="recorder:gui:radio"
3007 toolset
=$genericbitmaptools
3009 bootoutput
="rockboot.ebn"
3010 # architecture, manufacturer and model for the target-tree build
3012 t_manufacturer
="s5l8700"
3019 target
="PBELL_VIBE500"
3022 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
3023 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3024 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
3025 output
="rockbox.mi4"
3026 appextra
="recorder:gui:radio"
3029 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
3030 bootoutput
="jukebox.mi4"
3031 # toolset is the tools within the tools directory that we build for
3032 # this particular target.
3033 toolset
=$scramblebitmaptools
3034 # architecture, manufacturer and model for the target-tree build
3037 t_manufacturer
="pbell"
3043 modelname
="mpiohd200"
3047 tool
="$rootdir/tools/scramble -add=hd20"
3048 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3049 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
3050 output
="rockbox.mpio"
3051 bootoutput
="bootloader.mpio"
3052 appextra
="recorder:gui:radio"
3055 # toolset is the tools within the tools directory that we build for
3056 # this particular target.
3057 toolset
="$genericbitmaptools"
3058 # architecture, manufacturer and model for the target-tree build
3060 t_manufacturer
="mpio"
3066 modelname
="mpiohd300"
3070 tool
="$rootdir/tools/scramble -add=hd30"
3071 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3072 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
3073 output
="rockbox.mpio"
3074 bootoutput
="bootloader.mpio"
3075 appextra
="recorder:gui:radio"
3078 # toolset is the tools within the tools directory that we build for
3079 # this particular target.
3080 toolset
="$genericbitmaptools"
3081 # architecture, manufacturer and model for the target-tree build
3083 t_manufacturer
="mpio"
3089 modelname
="rk27generic"
3090 target
="RK27_GENERIC"
3093 tool
="$rootdir/tools/scramble -rkw -modelnum=73"
3094 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3095 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3096 output
="rockbox.rkw"
3097 bootoutput
="bootloader.rkw"
3098 appextra
="recorder:gui:radio"
3101 # toolset is the tools within the tools directory that we build for
3102 # this particular target.
3103 toolset
="$genericbitmaptools"
3104 # architecture, manufacturer and model for the target-tree build
3106 t_manufacturer
="rk27xx"
3107 t_model
="rk27generic"
3112 modelname
="hifimanhm60x"
3116 tool
="$rootdir/tools/scramble -rkw -modelnum=79"
3117 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3118 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3119 output
="rockbox.rkw"
3120 bootoutput
="bootloader.rkw"
3121 appextra
="recorder:gui"
3124 # toolset is the tools within the tools directory that we build for
3125 # this particular target.
3126 toolset
="$genericbitmaptools"
3127 # architecture, manufacturer and model for the target-tree build
3129 t_manufacturer
="rk27xx"
3135 modelname
="hifimanhm801"
3139 tool
="$rootdir/tools/scramble -rkw -modelnum=82"
3140 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3141 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3142 output
="rockbox.rkw"
3143 bootoutput
="bootloader.rkw"
3144 appextra
="recorder:gui"
3147 # toolset is the tools within the tools directory that we build for
3148 # this particular target.
3149 toolset
="$genericbitmaptools"
3150 # architecture, manufacturer and model for the target-tree build
3152 t_manufacturer
="rk27xx"
3168 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3169 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3171 bootoutput
="rockbox"
3172 appextra
="recorder:gui:radio"
3175 # architecture, manufacturer and model for the target-tree build
3177 t_manufacturer
="sdl"
3188 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3189 bindir
="/data/data/org.rockbox/lib"
3190 libdir
="/data/data/org.rockbox/app_rockbox"
3196 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3197 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3198 output
="librockbox.so"
3199 bootoutput
="librockbox.so"
3200 appextra
="recorder:gui:radio:hosted/android"
3203 # architecture, manufacturer and model for the target-tree build
3205 t_manufacturer
="android"
3212 modelname
="nokian8xx"
3215 sharedir
="/opt/rockbox/share/rockbox"
3216 bindir
="/opt/rockbox/bin"
3217 libdir
="/opt/rockbox/lib"
3223 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3224 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3226 bootoutput
="rockbox"
3227 appextra
="recorder:gui:radio"
3230 # architecture, manufacturer and model for the target-tree build
3232 t_manufacturer
="maemo"
3239 modelname
="nokian900"
3242 sharedir
="/opt/rockbox/share/rockbox"
3243 bindir
="/opt/rockbox/bin"
3244 libdir
="/opt/rockbox/lib"
3250 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3251 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3253 bootoutput
="rockbox"
3254 appextra
="recorder:gui:radio"
3257 # architecture, manufacturer and model for the target-tree build
3259 t_manufacturer
="maemo"
3269 sharedir
="rockbox/share/rockbox"
3270 bindir
="rockbox/bin"
3271 libdir
="rockbox/lib"
3277 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3278 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3280 bootoutput
="rockbox"
3281 appextra
="recorder:gui:radio"
3284 # architecture, manufacturer and model for the target-tree build
3286 t_manufacturer
="pandora"
3293 modelname
="samsungypr0"
3294 target
="SAMSUNG_YPR0"
3300 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3301 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3303 bootoutput
="rockbox"
3304 appextra
="recorder:gui:radio"
3307 # architecture, manufacturer and model for the target-tree build
3309 t_manufacturer
="ypr0"
3314 echo "Please select a supported target platform!"
3320 echo "Platform set to $modelname"
3324 ############################################################################
3325 # Amount of memory, for those that can differ. They have $memory unset at
3329 if [ -z "$memory" ]; then
3332 if [ "$ARG_RAM" ]; then
3335 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3348 if [ "$ARG_RAM" ]; then
3351 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3364 echo "Memory size selected: $memory MB"
3365 [ "$ARG_TYPE" ] ||
echo ""
3369 ##################################################################
3370 # Figure out build "type"
3373 # the ifp7x0 is the only platform that supports building a gdb stub like
3377 gdbstub
=", (G)DB stub"
3379 sansae200r|sansae200
)
3380 gdbstub
=", (I)nstaller"
3383 gdbstub
=", (E)raser"
3386 gdbstub
=", (E)raser"
3391 if [ "$ARG_TYPE" ]; then
3394 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (W)arble codec tool$gdbstub: (Defaults to N)"
3400 appsdir
='$(ROOTDIR)/bootloader'
3402 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3404 echo "e200R-installer build selected"
3407 appsdir
='$(ROOTDIR)/bootloader'
3409 extradefines
="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3411 echo "sansa eraser build selected"
3414 if test $t_manufacturer = "archos"; then
3415 # Archos SH-based players do this somewhat differently for
3417 appsdir
='$(ROOTDIR)/flash/bootbox'
3420 appsdir
='$(ROOTDIR)/bootloader'
3423 if test -n "$boottool"; then
3426 if test -n "$bootoutput"; then
3430 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3432 echo "Bootloader build selected"
3435 if [ "$modelname" = "sansae200r" ]; then
3436 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3441 extradefines
="$extradefines -DSIMULATOR"
3444 echo "Simulator build selected"
3447 echo "Advanced build selected"
3448 whichadvanced
$btype
3451 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3452 appsdir
='$(ROOTDIR)/gdb'
3461 echo "GDB stub build selected"
3469 extradefines
="$extradefines -DDEBUG"
3470 appsdir
='$(ROOTDIR)/tools/checkwps';
3471 output
='checkwps.'${modelname};
3473 echo "CheckWPS build selected"
3481 appsdir
='$(ROOTDIR)/tools/database';
3486 output
="database_${modelname}.exe"
3489 output
='database.'${modelname};
3493 echo "Database tool build selected"
3501 extradefines
="$extradefines -DDEBUG"
3502 output
='warble.'${modelname};
3504 echo "Warble build selected"
3507 if [ "$modelname" = "sansae200r" ]; then
3508 echo "Do not use the e200R target for regular builds. Use e200 instead."
3512 btype
="N" # set it explicitly since RET only gets here as well
3513 echo "Normal build selected"
3517 # to be able running "make manual" from non-manual configuration
3520 manualdev
="archosfmrecorder"
3523 manualdev
="iriverh100"
3526 manualdev
="ipodmini1g"
3529 manualdev
=$modelname
3533 if [ -z "$debug" ]; then
3534 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3537 if [ "yes" = "$application" ]; then
3538 echo Building Rockbox as an Application
3539 extradefines
="$extradefines -DAPPLICATION"
3542 echo "Using source code root directory: $rootdir"
3544 # this was once possible to change at build-time, but no more:
3549 if [ "yes" = "$simulator" ]; then
3550 # setup compiler and things for simulator
3553 if [ -d "simdisk" ]; then
3554 echo "Subdirectory 'simdisk' already present"
3557 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3561 # Now, figure out version number of the (gcc) compiler we are about to use
3562 gccver
=`$CC -dumpversion`;
3564 # figure out the binutil version too and display it, mostly for the build
3565 # system etc to be able to see it easier
3566 if [ $uname = "Darwin" ]; then
3567 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3569 ldver
=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
3572 if [ -z "$gccver" ]; then
3573 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3574 echo "[WARNING] this may cause your build to fail since we cannot do the"
3575 echo "[WARNING] checks we want now."
3578 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3581 num1
=`echo $gccver | cut -d . -f1`
3582 num2
=`echo $gccver | cut -d . -f2`
3583 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3590 echo "Using $CC $gccver ($gccnum)"
3592 if test "$gccnum" -ge "400"; then
3593 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3594 # so we ignore that warnings for now
3596 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3599 if test "$gccnum" -ge "402"; then
3600 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3601 # and later would throw it for several valid cases
3602 GCCOPTS
="$GCCOPTS -Wno-override-init"
3606 ""|
"$CROSS_COMPILE")
3610 # Verify that the cross-compiler is of a recommended version!
3611 if test "$gccver" != "$gccchoice"; then
3612 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3613 echo "WARNING: version $gccchoice!"
3614 echo "WARNING: This may cause your build to fail since it may be a version"
3615 echo "WARNING: that isn't functional or known to not be the best choice."
3616 echo "WARNING: If you suffer from build problems, you know that this is"
3617 echo "WARNING: a likely source for them..."
3625 echo "Using $LD $ldver"
3627 # check the compiler for SH platforms
3628 if test "$CC" = "sh-elf-gcc"; then
3629 if test "$gccnum" -lt "400"; then
3630 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3631 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3633 # figure out patch status
3634 gccpatch
=`$CC --version`;
3636 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3637 echo "gcc $gccver is rockbox patched"
3638 # then convert -O to -Os to get smaller binaries!
3639 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3641 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3642 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3647 if test "$CC" = "m68k-elf-gcc"; then
3648 # convert -O to -Os to get smaller binaries!
3649 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3652 if [ "$ARG_CCACHE" = "1" ]; then
3653 echo "Enable ccache for building"
3655 elif [ "$ARG_CCACHE" != "0" ]; then
3656 ccache
=`findtool ccache`
3657 if test -n "$ccache"; then
3658 echo "Found and uses ccache ($ccache)"
3662 # figure out the full path to the various commands if possible
3663 HOSTCC
=`findtool gcc --lit`
3664 HOSTAR
=`findtool ar --lit`
3665 CC
=`findtool ${CC} --lit`
3666 CPP
=`findtool ${CPP} --lit`
3667 LD
=`findtool ${LD} --lit`
3668 AR
=`findtool ${AR} --lit`
3669 AS
=`findtool ${AS} --lit`
3670 OC
=`findtool ${OC} --lit`
3671 WINDRES
=`findtool ${WINDRES} --lit`
3672 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3673 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3674 RANLIB
=`findtool ${RANLIB} --lit`
3677 if [ -z "$arch" ]; then
3678 cpp_defines
=$
(echo "" |
$CPP $GCCOPTS -dD)
3679 if [ -n "$(echo $cpp_defines | grep -w __sh__)" ]; then
3681 elif [ -n "$(echo $cpp_defines | grep -w __m68k__)" ]; then
3683 elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then
3685 # cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4)
3686 arch_version
="$(echo $cpp_defines | sed s,\ ,\\n,g | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,')"
3687 elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
3688 arch
="mips" # FIXME: autodetect version (32 or 64)
3689 elif [ -n "$(echo $cpp_defines | grep -w __i386__)" ]; then
3691 elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
3695 echo "Warning: Could not determine target arch"
3697 if [ "$arch" != "none" ]; then
3698 if [ -n "$arch_version" ]; then
3699 echo "Automatically selected arch: $arch (ver $arch_version)"
3701 echo "Automatically selected arch: $arch"
3705 if [ -n "$arch_version" ]; then
3706 echo "Manually selected arch: $arch (ver $arch_version)"
3708 echo "Manually selected arch: $arch"
3713 if [ -n "$arch_version" ]; then
3714 Darch_version
="#define ARCH_VERSION $arch_version"
3717 if test -n "$ccache"; then
3721 if test "$ARG_ARM_THUMB" = "1"; then
3722 extradefines
="$extradefines -DUSE_THUMB"
3723 CC
="$toolsdir/thumb-cc.py $CC"
3726 if test "X$endian" = "Xbig"; then
3727 defendian
="ROCKBOX_BIG_ENDIAN"
3729 defendian
="ROCKBOX_LITTLE_ENDIAN"
3732 if [ "$ARG_RBDIR" != "" ]; then
3733 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3738 echo "Using alternate rockbox dir: ${rbdir}"
3741 cat > autoconf.h
<<EOF
3742 /* This header was made by configure */
3743 #ifndef __BUILD_AUTOCONF_H
3744 #define __BUILD_AUTOCONF_H
3746 /* lower case names match the what's exported in the Makefile
3747 * upper case name looks nicer in the code */
3767 #define arch_amd64 6
3768 #define ARCH_AMD64 6
3770 /* Define target machine architecture */
3771 #define ARCH ${arch}
3772 /* Optinally define architecture version */
3775 /* Define endianess for the target or simulator platform */
3776 #define ${defendian} 1
3778 /* Define this if you build rockbox to support the logf logging and display */
3781 /* Define this if you want logf to output to the serial port */
3784 /* Define this to record a chart with timings for the stages of boot */
3787 /* optional define for a backlight modded Ondio */
3790 /* optional define for FM radio mod for iAudio M5 */
3793 /* optional define for ATA poweroff on Player */
3794 ${have_ata_poweroff}
3796 /* optional defines for RTC mod for h1x0 */
3800 /* the threading backend we use */
3801 #define ${thread_support}
3803 /* lcd dimensions for application builds from configure */
3807 /* root of Rockbox */
3808 #define ROCKBOX_DIR "${rbdir}"
3809 #define ROCKBOX_SHARE_PATH "${sharedir}"
3810 #define ROCKBOX_BINARY_PATH "${bindir}"
3811 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3813 #endif /* __BUILD_AUTOCONF_H */
3816 if test -n "$t_cpu"; then
3817 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3819 if [ "$application" = "yes" ] && [ "$t_manufacturer" = "maemo" ]; then
3820 # Maemo needs the SDL port, too
3821 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3822 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3823 elif [ "$application" = "yes" ] && [ "$t_manufacturer" = "pandora" ]; then
3824 # Pandora needs the SDL port, too
3825 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3826 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3827 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3828 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3829 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3832 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3833 test -n "$t_soc" && TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3834 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3838 if test "$swcodec" = "yes"; then
3839 voicetoolset
="rbspeexenc voicefont wavtrim"
3841 voicetoolset
="voicefont wavtrim"
3844 if test "$apps" = "apps"; then
3845 # only when we build "real" apps we build the .lng files
3849 #### Fix the cmdline ###
3850 if [ -n "$ARG_PREFIX" ]; then
3851 cmdline
="$cmdline --prefix=\$(PREFIX)"
3853 if [ -n "$ARG_LCDWIDTH" ]; then
3854 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3857 # remove parts from the cmdline we're going to set unconditionally
3858 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3859 -e s,--ram=[0-9]\*,,g \
3860 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3861 -e s,--type=[a-zA-Z]\*,,g`
3862 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3866 cat > Makefile
<<EOF
3867 ## Automatically generated. http://www.rockbox.org/
3869 export ROOTDIR=${rootdir}
3870 export FIRMDIR=\$(ROOTDIR)/firmware
3871 export APPSDIR=${appsdir}
3872 export TOOLSDIR=${toolsdir}
3873 export DOCSDIR=${rootdir}/docs
3874 export MANUALDIR=${rootdir}/manual
3875 export DEBUG=${debug}
3876 export MODELNAME=${modelname}
3877 export ARCHOSROM=${archosrom}
3878 export FLASHFILE=${flash}
3879 export TARGET_ID=${target_id}
3880 export TARGET=-D${target}
3882 export ARCH_VERSION=${arch_version}
3884 export MANUFACTURER=${t_manufacturer}
3885 export OBJDIR=${pwd}
3886 export BUILDDIR=${pwd}
3887 export LANGUAGE=${language}
3888 export VOICELANGUAGE=${voicelanguage}
3889 export MEMORYSIZE=${memory}
3890 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3891 export MKFIRMWARE=${tool}
3892 export BMP2RB_MONO=${bmp2rb_mono}
3893 export BMP2RB_NATIVE=${bmp2rb_native}
3894 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3895 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3896 export BINARY=${output}
3897 export APPEXTRA=${appextra}
3898 export ENABLEDPLUGINS=${plugins}
3899 export SOFTWARECODECS=${swcodec}
3900 export EXTRA_DEFINES=${extradefines}
3901 export HOSTCC=${HOSTCC}
3902 export HOSTAR=${HOSTAR}
3909 export WINDRES=${WINDRES}
3910 export DLLTOOL=${DLLTOOL}
3911 export DLLWRAP=${DLLWRAP}
3912 export RANLIB=${RANLIB}
3913 export PREFIX=${ARG_PREFIX}
3914 export PROFILE_OPTS=${PROFILE_OPTS}
3915 export APP_TYPE=${app_type}
3916 export APPLICATION=${application}
3917 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3918 export GCCOPTS=${GCCOPTS}
3919 export TARGET_INC=${TARGET_INC}
3920 export LOADADDRESS=${loadaddress}
3921 export SHARED_LDFLAG=${SHARED_LDFLAG}
3922 export SHARED_CFLAGS=${SHARED_CFLAGS}
3923 export LDOPTS=${LDOPTS}
3924 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3925 export GCCVER=${gccver}
3926 export GCCNUM=${gccnum}
3927 export UNAME=${uname}
3928 export MANUALDEV=${manualdev}
3929 export TTS_OPTS=${TTS_OPTS}
3930 export TTS_ENGINE=${TTS_ENGINE}
3931 export ENC_OPTS=${ENC_OPTS}
3932 export ENCODER=${ENCODER}
3933 export USE_ELF=${USE_ELF}
3934 export RBDIR=${rbdir}
3935 export ROCKBOX_SHARE_PATH=${sharedir}
3936 export ROCKBOX_BINARY_PATH=${bindir}
3937 export ROCKBOX_LIBRARY_PATH=${libdir}
3938 export SDLCONFIG=${sdl}
3939 export LCDORIENTATION=${lcd_orientation}
3941 CONFIGURE_OPTIONS=${cmdline}
3943 include \$(TOOLSDIR)/root.make
3946 echo "Created Makefile"