3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 # global CC options for all platforms
11 CCOPTS
="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
13 # global LD options for all platforms
17 use_logf
="#undef ROCKBOX_HAS_LOGF"
18 use_bootchart
="#undef DO_BOOTCHART"
20 scriptver
=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
27 thread_support
="ASSEMBLER_THREADS"
32 # Properly retain command line arguments containing spaces
36 *\
*) cmdline
="$cmdline \"$arg\"";;
37 *) cmdline
="$cmdline $arg";;
42 # Begin Function Definitions
53 WINDRES
=${prefix}windres
54 DLLTOOL
=${prefix}dlltool
55 DLLWRAP
=${prefix}dllwrap
56 RANLIB
=${prefix}ranlib
64 # setup files and paths depending on the platform
65 if [ -z "$ARG_PREFIX" ]; then
66 sharedir
="/usr/local/share/rockbox"
67 bindir
="/usr/local/bin"
68 libdir
="/usr/local/lib"
70 if [ -d "$ARG_PREFIX" ]; then
71 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
72 ARG_PREFIX
=`realpath $ARG_PREFIX`
73 if [ "0" != "$?" ]; then
74 echo "ERROR: Could not get prefix path (is realpath installed?)."
78 sharedir
="$ARG_PREFIX/share/rockbox"
79 bindir
="$ARG_PREFIX/bin"
80 libdir
="$ARG_PREFIX/lib"
82 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
88 # Set the application LCD size according to the following priorities:
89 # 1) If --lcdwidth and --lcdheight are set, use them
90 # 2) If a size is passed to the app_set_lcd_size() function, use that
91 # 3) Otherwise ask the user
93 if [ -z "$ARG_LCDWIDTH" ]; then
96 if [ -z "$ARG_LCDHEIGHT" ]; then
100 echo "Enter the LCD width (default: 320)"
101 if [ -z "$ARG_LCDWIDTH" ]; then
102 app_lcd_width
=`input`
104 app_lcd_width
="$ARG_LCDWIDTH"
106 if [ -z "$app_lcd_width" ]; then app_lcd_width
="320"; fi
107 echo "Enter the LCD height (default: 480)"
108 if [ -z "$ARG_LCDHEIGHT" ]; then
109 app_lcd_height
=`input`
111 app_lcd_height
="$ARG_LCDHEIGHT"
113 if [ -z "$app_lcd_height" ]; then app_lcd_height
="480"; fi
114 if [ $app_lcd_width -gt $app_lcd_height ]; then
115 lcd_orientation
="landscape"
117 lcd_orientation
="portrait"
119 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
120 ARG_LCDWIDTH
=$app_lcd_width
121 ARG_LCDHEIGHT
=$app_lcd_height
123 app_lcd_width
="#define LCD_WIDTH $app_lcd_width"
124 app_lcd_height
="#define LCD_HEIGHT $app_lcd_height"
128 if [ "$ARG_ARM_EABI" != "0" ]; then
129 prefixtools arm-elf-eabi-
137 # scan the $PATH for the given command
144 # echo "checks for $file in $path" >&2
145 if test -f "$path/$file"; then
150 # check whether caller wants literal return value if not found
151 if [ "$2" = "--lit" ]; then
156 # scan the $PATH for sdl-config - check whether for a (cross-)win32
159 # sdl-config might (not) be prefixed for cross compiles so try both.
160 files
="${CROSS_COMPILE}sdl-config:sdl-config"
168 #echo "checks for $file in $path" >&2
169 if test -f "$path/$file"; then
170 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
171 if [ "yes" = "${winbuild}" ]; then
176 if [ "yes" != "${winbuild}" ]; then
186 # check for availability of sigaltstack to support our thread engine
187 check_sigaltstack
() {
188 cat >$tmpdir/check_threads.c
<<EOF
190 int main(int argc, char **argv)
193 #define NULL (void*)0
195 sigaltstack(NULL, NULL);
199 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
1> /dev
/null
201 rm -rf $tmpdir/check_threads
*
205 # check for availability of Fiber on Win32 to support our thread engine
207 cat >$tmpdir/check_threads.c
<<EOF
209 int main(int argc, char **argv)
211 ConvertThreadToFiber(NULL);
215 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
2>/dev
/null
217 rm -rf $tmpdir/check_threads
*
223 # default tool setup for native building
224 prefixtools
"$CROSS_COMPILE"
225 ARG_ARM_THUMB
=0 # can't use thumb in native builds
229 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
230 if [ "$app_type" != "sdl-app" ]; then
231 # Disable optimizations for non-app builds
232 GCCOPTS
=`echo $GCCOPTS | sed -e s/-O//`
235 GCCOPTS
="$GCCOPTS -fno-builtin -g"
237 LDOPTS
='-lm' # button-sdl.c uses sqrt()
240 endian
="" # endianess of the dap doesnt matter here
242 # default output binary name, don't override app_get_platform()
243 if [ "$app_type" != "sdl-app" ]; then
247 # default share option, override below if needed
248 SHARED_LDFLAG
="-shared"
249 SHARED_CFLAGS
="-fPIC -fvisibility=hidden"
251 if [ "$win32crosscompile" = "yes" ]; then
252 # We are crosscompiling
253 # add cross-compiler option(s)
254 LDOPTS
="$LDOPTS -mconsole"
257 CROSS_COMPILE
=${CROSS_COMPILE:-"i586-mingw32msvc-"}
259 prefixtools
"$CROSS_COMPILE"
261 endian
="little" # windows is little endian
262 echo "Enabling MMX support"
263 GCCOPTS
="$GCCOPTS -mmmx"
267 echo "Cygwin host detected"
270 LDOPTS
="$LDOPTS -mconsole"
277 echo "MinGW host detected"
280 LDOPTS
="$LDOPTS -mconsole"
286 sigaltstack
=`check_sigaltstack`
287 echo "Linux host detected"
288 LDOPTS
="$LDOPTS -ldl"
292 sigaltstack
=`check_sigaltstack`
293 echo "FreeBSD host detected"
294 LDOPTS
="$LDOPTS -ldl"
298 sigaltstack
=`check_sigaltstack`
299 echo "Darwin host detected"
300 LDOPTS
="$LDOPTS -ldl"
301 SHARED_LDFLAG
="-dynamiclib -Wl\,-single_module"
305 sigaltstack
=`check_sigaltstack`
306 echo "*Solaris host detected"
308 GCCOPTS
="$GCCOPTS -fPIC"
309 LDOPTS
="$LDOPTS -ldl"
313 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
319 if [ "$winbuild" != "yes" ]; then
320 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
321 if [ "`uname -m`" = "i686" ]; then
322 echo "Enabling MMX support"
323 GCCOPTS
="$GCCOPTS -mmmx"
327 sdl
=`findsdl $winbuild`
329 if [ -n `echo $app_type | grep "sdl"` ]; then
330 if [ -z "$sdl" ]; then
331 echo "configure didn't find sdl-config, which indicates that you"
332 echo "don't have SDL (properly) installed. Please correct and"
333 echo "re-run configure!"
336 # generic sdl-config checker
337 GCCOPTS
="$GCCOPTS `$sdl --cflags`"
338 LDOPTS
="$LDOPTS `$sdl --libs`"
343 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
344 # x86_64 supports MMX by default
346 if [ "$endian" = "" ]; then
348 cat >$tmpdir/conftest-
$id.c
<<EOF
350 int main(int argc, char **argv)
353 char *varp = (char *)&var;
360 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
361 # when cross compiling, the endianess cannot be detected because the above program doesn't run
362 # on the local machine. assume little endian but print a warning
363 endian
=`$tmpdir/conftest-$id 2> /dev/null`
364 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
373 if [ "$CROSS_COMPILE" != "" ]; then
374 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
377 if [ "$app_type" = "sdl-sim" ]; then
378 echo "Simulator environment deemed $endian endian"
379 elif [ "$app_type" = "sdl-app" ]; then
380 echo "Application environment deemed $endian endian"
381 elif [ "$app_type" = "checkwps" ]; then
382 echo "CheckWPS environment deemed $endian endian"
385 # use wildcard here to make it work even if it was named *.exe like
387 rm -f $tmpdir/conftest-
$id*
390 if [ -z "$ARG_THREAD_SUPPORT" ] ||
[ "$ARG_THREAD_SUPPORT" = "0" ]; then
391 if [ "$sigaltstack" = "0" ]; then
392 thread_support
="HAVE_SIGALTSTACK_THREADS"
393 LDOPTS
="$LDOPTS -lpthread" # pthread needed
394 echo "Selected sigaltstack threads"
395 elif [ "$fibers" = "0" ]; then
396 thread_support
="HAVE_WIN32_FIBER_THREADS"
397 echo "Selected Win32 Fiber threads"
401 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
402 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
403 thread_support
="HAVE_SDL_THREADS"
404 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
405 echo "Selected SDL threads"
407 echo "WARNING: Falling back to SDL threads"
413 # functions for setting up cross-compiler names and options
414 # also set endianess and what the exact recommended gcc version is
415 # the gcc version should most likely match what versions we build with
420 GCCOPTS
="$CCOPTS -m1"
421 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
427 prefixtools calmrisc16-unknown-elf-
428 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
429 GCCOPTIMIZE
="-fomit-frame-pointer"
434 prefixtools m68k-elf-
435 GCCOPTS
="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
436 GCCOPTIMIZE
="-fomit-frame-pointer"
443 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
444 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
445 GCCOPTS
="$GCCOPTS -mlong-calls"
447 GCCOPTIMIZE
="-fomit-frame-pointer"
453 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
454 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
455 GCCOPTS
="$GCCOPTS -mlong-calls"
457 GCCOPTIMIZE
="-fomit-frame-pointer"
463 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
464 if test "$ARG_ARM_EABI" = "0"; then
465 GCCOPTS
="$GCCOPTS -mlong-calls"
467 GCCOPTIMIZE
="-fomit-frame-pointer"
473 GCCOPTS
="$CCOPTS -mcpu=arm940t"
474 if test "$ARG_ARM_EABI" = "0"; then
475 GCCOPTS
="$GCCOPTS -mlong-calls"
477 GCCOPTIMIZE
="-fomit-frame-pointer"
483 GCCOPTS
="$CCOPTS -mcpu=arm9e"
484 if test "$ARG_ARM_EABI" = "0"; then
485 GCCOPTS
="$GCCOPTS -mlong-calls"
487 GCCOPTIMIZE
="-fomit-frame-pointer"
493 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
494 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
495 GCCOPTS
="$GCCOPTS -mlong-calls"
497 GCCOPTIMIZE
="-fomit-frame-pointer"
503 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
504 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
505 GCCOPTS
="$GCCOPTS -mlong-calls"
507 GCCOPTIMIZE
="-fomit-frame-pointer"
513 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
514 if test "$ARG_ARM_EABI" = "0"; then
515 GCCOPTS
="$GCCOPTS -mlong-calls"
517 GCCOPTIMIZE
="-fomit-frame-pointer"
523 GCCOPTS
="$CCOPTS -march=armv5te"
524 GCCOPTIMIZE
="-fomit-frame-pointer"
529 prefixtools mipsel-elf-
530 # mips is predefined, but we want it for paths. use __mips instead
531 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
532 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
533 GCCOPTIMIZE
="-fomit-frame-pointer"
539 # Scratchbox sets up "gcc" based on the active target
542 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
543 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
545 LDOPTS
="-lm -ldl $LDOPTS"
546 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
547 SHARED_LDFLAG
="-shared"
550 thread_support
="HAVE_SIGALTSTACK_THREADS"
553 # Determine maemo version
554 if pkg-config
--atleast-version=5 maemo-version
; then
555 if [ "$1" == "4" ]; then
556 echo "ERROR: Maemo 4 SDK required."
559 extradefines
="$extradefines -DMAEMO5"
560 echo "Found N900 maemo version"
562 elif pkg-config
--atleast-version=4 maemo-version
; then
563 if [ "$1" == "5" ]; then
564 echo "ERROR: Maemo 5 SDK required."
567 extradefines
="$extradefines -DMAEMO4"
568 echo "Found N8xx maemo version"
570 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
575 if [ $is_n900 -eq 1 ]; then
576 GCCOPTS
="$GCCOPTS `pkg-config --cflags sdl`"
577 LDOPTS
="$LDOPTS `pkg-config --libs sdl`"
579 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
580 LDOPTS
="$LDOPTS `sdl-config --libs`"
583 # glib and libosso support
584 GCCOPTS
="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
585 LDOPTS
="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
587 # libhal support: Battery monitoring
588 GCCOPTS
="$GCCOPTS `pkg-config --cflags hal`"
589 LDOPTS
="$LDOPTS `pkg-config --libs hal`"
591 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
592 if [ $is_n900 -eq 1 ]; then
593 # gstreamer support: Audio output.
594 GCCOPTS
="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
595 LDOPTS
="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
597 # N900 specific: libplayback support
598 GCCOPTS
="$GCCOPTS `pkg-config --cflags libplayback-1`"
599 LDOPTS
="$LDOPTS `pkg-config --libs libplayback-1`"
601 # N900 specific: Enable ARMv7 NEON support
602 if sb-conf show
-A |
grep -q -i arm
; then
603 echo "Detected ARM target"
604 GCCOPTS
="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
605 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
607 echo "Detected x86 target"
610 # N8xx specific: Enable armv5te instructions
611 if sb-conf show
-A |
grep -q -i arm
; then
612 echo "Detected ARM target"
613 GCCOPTS
="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
614 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
616 echo "Detected x86 target"
622 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
623 # You have to use the sebt3 toolchain:
624 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
626 PNDSDK
="/usr/local/angstrom/arm"
627 if [ ! -x $PNDSDK/bin
/arm-angstrom-linux-gnueabi-gcc
]; then
628 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
632 PATH
=$PNDSDK/bin
:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/bin
633 PKG_CONFIG_PATH
=$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/lib
/pkgconfig
634 LDOPTS
="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
635 PKG_CONFIG
="pkg-config"
637 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
638 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
640 LDOPTS
="-lm -ldl $LDOPTS"
641 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
642 SHARED_LDFLAG
="-shared"
645 thread_support
="HAVE_SIGALTSTACK_THREADS"
648 GCCOPTS
="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
652 prefixtools
"$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
655 GCCOPTS
="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
656 LDOPTS
="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
659 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
660 GCCOPTS
="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
661 GCCOPTS
="$GCCOPTS -ffast-math -fsingle-precision-constant"
666 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
668 LDOPTS
="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
669 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
670 SHARED_LDFLAG
="-shared"
673 thread_support
="HAVE_SIGALTSTACK_THREADS"
678 GCCOPTS
="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
682 prefixtools
"arm-ypr0-linux-gnueabi-"
686 if [ -z "$ANDROID_SDK_PATH" ]; then
687 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
688 echo "environment variable point to the root directory of the Android SDK."
691 if [ -z "$ANDROID_NDK_PATH" ]; then
692 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
693 echo "environment variable point to the root directory of the Android NDK."
696 buildhost
=$
(uname |
tr "[:upper:]" "[:lower:]")
698 gcctarget
="arm-linux-androideabi-"
699 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
700 PATH
=$PATH:$gccprefix/bin
701 prefixtools
$gcctarget
702 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
703 GCCOPTS
="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
704 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
705 GLOBAL_LDOPTS
="-Wl,-z,defs -Wl,-z,noexecstack"
706 LDOPTS
="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
708 SHARED_LDFLAG
="-shared"
712 atype
=`echo "$1" | cut -c 2-`
713 ##################################################################
714 # Prompt for specific developer options
716 if [ "$atype" ]; then
721 printf "Enter your developer options (press only enter when done)\n\
722 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
723 (T)est plugins, S(m)all C lib:"
724 if [ "$modelname" = "archosplayer" ]; then
725 printf ", Use (A)TA poweroff"
727 if [ "$t_model" = "ondio" ]; then
728 printf ", (B)acklight MOD"
730 if [ "$modelname" = "iaudiom5" ]; then
731 printf ", (F)M radio MOD"
733 if [ "$modelname" = "iriverh120" ]; then
740 while [ $cont = "1" ]; do
742 if [ "$interact" ]; then
745 option
=`echo "$atype" | cut -c 1`
750 if [ "yes" = "$profile" ]; then
751 echo "Debug is incompatible with profiling"
753 echo "DEBUG build enabled"
758 echo "logf() support enabled"
762 echo "Using Rockbox' small C library"
763 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
766 echo "Including test plugins"
767 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
770 echo "bootchart enabled (logf also enabled)"
775 echo "Simulator build enabled"
779 if [ "yes" = "$use_debug" ]; then
780 echo "Profiling is incompatible with debug"
782 echo "Profiling support is enabled"
787 echo "Voice build selected"
791 if [ "$modelname" = "archosplayer" ]; then
792 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
793 echo "ATA power off enabled"
797 if [ "$t_model" = "ondio" ]; then
798 have_backlight
="#define HAVE_BACKLIGHT"
799 echo "Backlight functions enabled"
803 if [ "$modelname" = "iaudiom5" ]; then
804 have_fmradio_in
="#define HAVE_FMRADIO_IN"
805 echo "FM radio functions enabled"
809 if [ "$modelname" = "iriverh120" ]; then
810 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
811 have_rtc_alarm
="#define HAVE_RTC_ALARM"
812 echo "RTC functions enabled (DS1339/DS3231)"
816 echo "Enabling Windows 32 cross-compiling"
817 win32crosscompile
="yes"
819 "") # Match enter press when finished with advanced options
823 echo "[ERROR] Option $option unsupported"
826 if [ "$interact" ]; then
827 btype
="$btype$option"
829 atype
=`echo "$atype" | cut -c 2-`
830 [ "$atype" ] || cont
=0
835 if [ "yes" = "$voice" ]; then
836 # Ask about languages to build
838 voicelanguage
=`whichlang`
839 echo "Voice language set to $voicelanguage"
841 # Configure encoder and TTS engine for each language
842 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
843 voiceconfig
"$thislang"
846 if [ "yes" = "$use_debug" ]; then
848 GCCOPTS
="$GCCOPTS -g -DDEBUG"
850 if [ "yes" = "$logf" ]; then
851 use_logf
="#define ROCKBOX_HAS_LOGF 1"
853 if [ "yes" = "$bootchart" ]; then
854 use_bootchart
="#define DO_BOOTCHART 1"
856 if [ "yes" = "$simulator" ]; then
858 extradefines
="$extradefines -DSIMULATOR"
862 if [ "yes" = "$profile" ]; then
863 extradefines
="$extradefines -DRB_PROFILE"
864 PROFILE_OPTS
="-finstrument-functions"
868 # Configure voice settings
871 if [ ! "$ARG_TTS" ]; then
872 echo "Building $thislang voice for $modelname. Select options"
876 if [ -n "`findtool flite`" ]; then
880 DEFAULT_TTS_OPTS
=$FLITE_OPTS
881 DEFAULT_NOISEFLOOR
="500"
884 if [ -n "`findtool espeak`" ]; then
888 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
889 DEFAULT_NOISEFLOOR
="500"
892 if [ -n "`findtool festival`" ]; then
893 FESTIVAL
="(F)estival "
896 FESTIVAL_OPTS
="--language italian"
899 FESTIVAL_OPTS
="--language spanish"
902 FESTIVAL_OPTS
="--language finnish"
905 FESTIVAL_OPTS
="--language czech"
911 DEFAULT_TTS
="festival"
912 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
913 DEFAULT_NOISEFLOOR
="500"
916 if [ -n "`findtool swift`" ]; then
920 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
921 DEFAULT_NOISEFLOOR
="500"
924 # Allow SAPI if Windows is in use
925 if [ -n "`findtool winver`" ]; then
929 DEFAULT_TTS_OPTS
=$SAPI_OPTS
930 DEFAULT_NOISEFLOOR
="500"
934 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
935 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
939 if [ "$ARG_TTS" ]; then
942 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
944 if [ -z "$option" ]; then option
=${DEFAULT_CHOICE}; fi
945 advopts
="$advopts --tts=$option"
950 NOISEFLOOR
="500" # TODO: check this value
956 TTS_OPTS
=$ESPEAK_OPTS
959 TTS_ENGINE
="festival"
961 TTS_OPTS
=$FESTIVAL_OPTS
974 TTS_ENGINE
=$DEFAULT_TTS
975 TTS_OPTS
=$DEFAULT_TTS_OPTS
976 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
978 echo "Using $TTS_ENGINE for TTS"
980 # Select which voice to use for Festival
981 if [ "$TTS_ENGINE" = "festival" ]; then
982 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
983 for voice
in $voicelist; do
984 TTS_FESTIVAL_VOICE
="$voice" # Default choice
987 if [ "$ARG_VOICE" ]; then
991 for voice
in $voicelist; do
992 printf "%3d. %s\n" "$i" "$voice"
995 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
999 for voice
in $voicelist; do
1000 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
1001 TTS_FESTIVAL_VOICE
="$voice"
1005 advopts
="$advopts --voice=$CHOICE"
1006 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1007 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1010 # Read custom tts options from command line
1011 if [ "$ARG_TTSOPTS" ]; then
1012 TTS_OPTS
="$ARG_TTSOPTS"
1013 echo "$TTS_ENGINE options set to $TTS_OPTS"
1016 if [ "$swcodec" = "yes" ]; then
1017 ENCODER
="rbspeexenc"
1018 ENC_OPTS
="-q 4 -c 10"
1020 if [ -n "`findtool lame`" ]; then
1022 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1024 echo "You need LAME in the system path to build voice files for"
1025 echo "HWCODEC targets."
1030 echo "Using $ENCODER for encoding voice clips"
1032 # Read custom encoder options from command line
1033 if [ "$ARG_ENCOPTS" ]; then
1034 ENC_OPTS
="$ARG_ENCOPTS"
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
1064 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 CPP
=`findtool ${CPP} --lit`
3645 LD
=`findtool ${AR} --lit`
3646 AR
=`findtool ${AR} --lit`
3647 AS
=`findtool ${AS} --lit`
3648 OC
=`findtool ${OC} --lit`
3649 WINDRES
=`findtool ${WINDRES} --lit`
3650 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3651 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3652 RANLIB
=`findtool ${RANLIB} --lit`
3655 if [ -z "$arch" ]; then
3656 cpp_defines
=$
(echo "" |
$CPP -dD)
3657 if [ -n "$(echo $cpp_defines | grep -w __sh__)" ]; then
3659 elif [ -n "$(echo $cpp_defines | grep -w __m68k__)" ]; then
3661 elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then
3663 elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
3665 elif [ -n "$(echo $cpp_defines | grep -w _X86_)" ]; then
3667 elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
3671 echo "Warning: Could not determine target arch"
3673 if [ "$arch" != "unknown" ]; then
3674 echo "Automatically selected arch: $arch"
3677 echo "Manually selected arch: $arch"
3680 if test -n "$ccache"; then
3684 if test "$ARG_ARM_THUMB" = "1"; then
3685 extradefines
="$extradefines -DUSE_THUMB"
3686 CC
="$toolsdir/thumb-cc.py $CC"
3689 if test "X$endian" = "Xbig"; then
3690 defendian
="ROCKBOX_BIG_ENDIAN"
3692 defendian
="ROCKBOX_LITTLE_ENDIAN"
3695 if [ "$ARG_RBDIR" != "" ]; then
3696 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3701 echo "Using alternate rockbox dir: ${rbdir}"
3704 cat > autoconf.h
<<EOF
3705 /* This header was made by configure */
3706 #ifndef __BUILD_AUTOCONF_H
3707 #define __BUILD_AUTOCONF_H
3709 /* Define endianess for the target or simulator platform */
3710 #define ${defendian} 1
3712 /* Define this if you build rockbox to support the logf logging and display */
3715 /* Define this to record a chart with timings for the stages of boot */
3718 /* optional define for a backlight modded Ondio */
3721 /* optional define for FM radio mod for iAudio M5 */
3724 /* optional define for ATA poweroff on Player */
3725 ${have_ata_poweroff}
3727 /* optional defines for RTC mod for h1x0 */
3731 /* the threading backend we use */
3732 #define ${thread_support}
3734 /* lcd dimensions for application builds from configure */
3738 /* root of Rockbox */
3739 #define ROCKBOX_DIR "${rbdir}"
3740 #define ROCKBOX_SHARE_PATH "${sharedir}"
3741 #define ROCKBOX_BINARY_PATH "${bindir}"
3742 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3744 #endif /* __BUILD_AUTOCONF_H */
3747 if test -n "$t_cpu"; then
3748 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3750 if [ "$application" = "yes" ] && [ "$t_manufacturer" = "maemo" ]; then
3751 # Maemo needs the SDL port, too
3752 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3753 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3754 elif [ "$application" = "yes" ] && [ "$t_manufacturer" = "pandora" ]; then
3755 # Pandora needs the SDL port, too
3756 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3757 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3758 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3759 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3760 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3763 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3764 test -n "$t_soc" && TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3765 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3769 if test "$swcodec" = "yes"; then
3770 voicetoolset
="rbspeexenc voicefont wavtrim"
3772 voicetoolset
="voicefont wavtrim"
3775 if test "$apps" = "apps"; then
3776 # only when we build "real" apps we build the .lng files
3780 #### Fix the cmdline ###
3781 if [ -n "$ARG_PREFIX" ]; then
3782 cmdline
="$cmdline --prefix=\$(PREFIX)"
3784 if [ -n "$ARG_LCDWIDTH" ]; then
3785 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3788 # remove parts from the cmdline we're going to set unconditionally
3789 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3790 -e s,--ram=[0-9]\*,,g \
3791 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3792 -e s,--type=[a-zA-Z]\*,,g`
3793 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3797 cat > Makefile
<<EOF
3798 ## Automatically generated. http://www.rockbox.org/
3800 export ROOTDIR=${rootdir}
3801 export FIRMDIR=\$(ROOTDIR)/firmware
3802 export APPSDIR=${appsdir}
3803 export TOOLSDIR=${toolsdir}
3804 export DOCSDIR=${rootdir}/docs
3805 export MANUALDIR=${rootdir}/manual
3806 export DEBUG=${debug}
3807 export MODELNAME=${modelname}
3808 export ARCHOSROM=${archosrom}
3809 export FLASHFILE=${flash}
3810 export TARGET_ID=${target_id}
3811 export TARGET=-D${target}
3814 export MANUFACTURER=${t_manufacturer}
3815 export OBJDIR=${pwd}
3816 export BUILDDIR=${pwd}
3817 export LANGUAGE=${language}
3818 export VOICELANGUAGE=${voicelanguage}
3819 export MEMORYSIZE=${memory}
3820 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3821 export MKFIRMWARE=${tool}
3822 export BMP2RB_MONO=${bmp2rb_mono}
3823 export BMP2RB_NATIVE=${bmp2rb_native}
3824 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3825 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3826 export BINARY=${output}
3827 export APPEXTRA=${appextra}
3828 export ENABLEDPLUGINS=${plugins}
3829 export SOFTWARECODECS=${swcodec}
3830 export EXTRA_DEFINES=${extradefines}
3831 export HOSTCC=${HOSTCC}
3832 export HOSTAR=${HOSTAR}
3839 export WINDRES=${WINDRES}
3840 export DLLTOOL=${DLLTOOL}
3841 export DLLWRAP=${DLLWRAP}
3842 export RANLIB=${RANLIB}
3843 export PREFIX=${ARG_PREFIX}
3844 export PROFILE_OPTS=${PROFILE_OPTS}
3845 export APP_TYPE=${app_type}
3846 export APPLICATION=${application}
3847 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3848 export GCCOPTS=${GCCOPTS}
3849 export TARGET_INC=${TARGET_INC}
3850 export LOADADDRESS=${loadaddress}
3851 export SHARED_LDFLAG=${SHARED_LDFLAG}
3852 export SHARED_CFLAGS=${SHARED_CFLAGS}
3853 export LDOPTS=${LDOPTS}
3854 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3855 export GCCVER=${gccver}
3856 export GCCNUM=${gccnum}
3857 export UNAME=${uname}
3858 export MANUALDEV=${manualdev}
3859 export TTS_OPTS=${TTS_OPTS}
3860 export TTS_ENGINE=${TTS_ENGINE}
3861 export ENC_OPTS=${ENC_OPTS}
3862 export ENCODER=${ENCODER}
3863 export USE_ELF=${USE_ELF}
3864 export RBDIR=${rbdir}
3865 export ROCKBOX_SHARE_PATH=${sharedir}
3866 export ROCKBOX_BINARY_PATH=${bindir}
3867 export ROCKBOX_LIBRARY_PATH=${libdir}
3868 export SDLCONFIG=${sdl}
3869 export LCDORIENTATION=${lcd_orientation}
3871 CONFIGURE_OPTIONS=${cmdline}
3873 include \$(TOOLSDIR)/root.make
3876 echo "Created Makefile"