3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
11 # global CC options for all platforms
12 CCOPTS
="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
14 # global LD options for all platforms
18 use_logf
="#undef ROCKBOX_HAS_LOGF"
19 use_bootchart
="#undef DO_BOOTCHART"
21 scriptver
=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
28 thread_support
="ASSEMBLER_THREADS"
33 # Properly retain command line arguments containing spaces
37 *\
*) cmdline
="$cmdline \"$arg\"";;
38 *) cmdline
="$cmdline $arg";;
43 # 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"
677 GCCOPTS
="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
681 prefixtools
"arm-ypr0-linux-gnueabi-"
685 if [ -z "$ANDROID_SDK_PATH" ]; then
686 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
687 echo "environment variable point to the root directory of the Android SDK."
690 if [ -z "$ANDROID_NDK_PATH" ]; then
691 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
692 echo "environment variable point to the root directory of the Android NDK."
695 buildhost
=$
(uname |
tr "[:upper:]" "[:lower:]")
697 gcctarget
="arm-linux-androideabi-"
698 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
699 PATH
=$PATH:$gccprefix/bin
700 prefixtools
$gcctarget
701 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
702 GCCOPTS
="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
703 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
704 GLOBAL_LDOPTS
="-Wl,-z,defs -Wl,-z,noexecstack"
705 LDOPTS
="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
707 SHARED_LDFLAG
="-shared"
711 atype
=`echo "$1" | cut -c 2-`
712 ##################################################################
713 # Prompt for specific developer options
715 if [ "$atype" ]; then
720 printf "Enter your developer options (press only enter when done)\n\
721 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
722 (T)est plugins, S(m)all C lib:"
723 if [ "$modelname" = "archosplayer" ]; then
724 printf ", Use (A)TA poweroff"
726 if [ "$t_model" = "ondio" ]; then
727 printf ", (B)acklight MOD"
729 if [ "$modelname" = "iaudiom5" ]; then
730 printf ", (F)M radio MOD"
732 if [ "$modelname" = "iriverh120" ]; then
739 while [ $cont = "1" ]; do
741 if [ "$interact" ]; then
744 option
=`echo "$atype" | cut -c 1`
749 if [ "yes" = "$profile" ]; then
750 echo "Debug is incompatible with profiling"
752 echo "DEBUG build enabled"
757 echo "logf() support enabled"
761 echo "Using Rockbox' small C library"
762 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
765 echo "Including test plugins"
766 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
769 echo "bootchart enabled (logf also enabled)"
774 echo "Simulator build enabled"
778 if [ "yes" = "$use_debug" ]; then
779 echo "Profiling is incompatible with debug"
781 echo "Profiling support is enabled"
786 echo "Voice build selected"
790 if [ "$modelname" = "archosplayer" ]; then
791 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
792 echo "ATA power off enabled"
796 if [ "$t_model" = "ondio" ]; then
797 have_backlight
="#define HAVE_BACKLIGHT"
798 echo "Backlight functions enabled"
802 if [ "$modelname" = "iaudiom5" ]; then
803 have_fmradio_in
="#define HAVE_FMRADIO_IN"
804 echo "FM radio functions enabled"
808 if [ "$modelname" = "iriverh120" ]; then
809 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
810 have_rtc_alarm
="#define HAVE_RTC_ALARM"
811 echo "RTC functions enabled (DS1339/DS3231)"
815 echo "Enabling Windows 32 cross-compiling"
816 win32crosscompile
="yes"
818 "") # Match enter press when finished with advanced options
822 echo "[ERROR] Option $option unsupported"
825 if [ "$interact" ]; then
826 btype
="$btype$option"
828 atype
=`echo "$atype" | cut -c 2-`
829 [ "$atype" ] || cont
=0
834 if [ "yes" = "$voice" ]; then
835 # Ask about languages to build
837 voicelanguage
=`whichlang`
838 echo "Voice language set to $voicelanguage"
840 # Configure encoder and TTS engine for each language
841 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
842 voiceconfig
"$thislang"
845 if [ "yes" = "$use_debug" ]; then
847 GCCOPTS
="$GCCOPTS -g -DDEBUG"
849 if [ "yes" = "$logf" ]; then
850 use_logf
="#define ROCKBOX_HAS_LOGF 1"
852 if [ "yes" = "$bootchart" ]; then
853 use_bootchart
="#define DO_BOOTCHART 1"
855 if [ "yes" = "$simulator" ]; then
857 extradefines
="$extradefines -DSIMULATOR"
861 if [ "yes" = "$profile" ]; then
862 extradefines
="$extradefines -DRB_PROFILE"
863 PROFILE_OPTS
="-finstrument-functions"
867 # Configure voice settings
870 if [ ! "$ARG_TTS" ]; then
871 echo "Building $thislang voice for $modelname. Select options"
875 if [ -n "`findtool flite`" ]; then
879 DEFAULT_TTS_OPTS
=$FLITE_OPTS
880 DEFAULT_NOISEFLOOR
="500"
883 if [ -n "`findtool espeak`" ]; then
887 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
888 DEFAULT_NOISEFLOOR
="500"
891 if [ -n "`findtool festival`" ]; then
892 FESTIVAL
="(F)estival "
895 FESTIVAL_OPTS
="--language italian"
898 FESTIVAL_OPTS
="--language spanish"
901 FESTIVAL_OPTS
="--language finnish"
904 FESTIVAL_OPTS
="--language czech"
910 DEFAULT_TTS
="festival"
911 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
912 DEFAULT_NOISEFLOOR
="500"
915 if [ -n "`findtool swift`" ]; then
919 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
920 DEFAULT_NOISEFLOOR
="500"
923 # Allow SAPI if Windows is in use
924 if [ -n "`findtool winver`" ]; then
928 DEFAULT_TTS_OPTS
=$SAPI_OPTS
929 DEFAULT_NOISEFLOOR
="500"
933 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
934 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
938 if [ "$ARG_TTS" ]; then
941 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
943 if [ -z "$option" ]; then option
=${DEFAULT_CHOICE}; fi
944 advopts
="$advopts --tts=$option"
949 NOISEFLOOR
="500" # TODO: check this value
955 TTS_OPTS
=$ESPEAK_OPTS
958 TTS_ENGINE
="festival"
960 TTS_OPTS
=$FESTIVAL_OPTS
973 TTS_ENGINE
=$DEFAULT_TTS
974 TTS_OPTS
=$DEFAULT_TTS_OPTS
975 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
977 echo "Using $TTS_ENGINE for TTS"
979 # Select which voice to use for Festival
980 if [ "$TTS_ENGINE" = "festival" ]; then
981 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
982 for voice
in $voicelist; do
983 TTS_FESTIVAL_VOICE
="$voice" # Default choice
986 if [ "$ARG_VOICE" ]; then
990 for voice
in $voicelist; do
991 printf "%3d. %s\n" "$i" "$voice"
994 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
998 for voice
in $voicelist; do
999 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
1000 TTS_FESTIVAL_VOICE
="$voice"
1004 advopts
="$advopts --voice=$CHOICE"
1005 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1006 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1009 # Read custom tts options from command line
1010 if [ "$ARG_TTSOPTS" ]; then
1011 TTS_OPTS
="$ARG_TTSOPTS"
1012 echo "$TTS_ENGINE options set to $TTS_OPTS"
1015 if [ "$swcodec" = "yes" ]; then
1016 ENCODER
="rbspeexenc"
1017 ENC_OPTS
="-q 4 -c 10"
1019 if [ -n "`findtool lame`" ]; then
1021 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1023 echo "You need LAME in the system path to build voice files for"
1024 echo "HWCODEC targets."
1029 echo "Using $ENCODER for encoding voice clips"
1031 # Read custom encoder options from command line
1032 if [ "$ARG_ENCOPTS" ]; then
1033 ENC_OPTS
="$ARG_ENCOPTS"
1034 echo "$ENCODER options set to $ENC_OPTS"
1038 if [ -n "`findtool cygpath`" ]; then
1039 TEMPDIR
=`cygpath . -a -w`
1044 # figure out which languages that are around
1045 for file in $rootdir/apps
/lang
/*.lang
; do
1046 clean
=`basename $file .lang`
1047 langs
="$langs $clean"
1050 if [ "$ARG_LANG" ]; then
1053 echo "Select a number for the language to use (default is english)"
1054 # FIXME The multiple-language feature is currently broken
1055 # echo "You may enter a comma-separated list of languages to build"
1058 for one
in $langs; do
1063 advopts
="$advopts --language=$pick"
1069 # Allow the user to pass a comma-separated list of langauges
1070 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1072 for one
in $langs; do
1073 # Accept both the language number and name
1074 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1075 if [ "$output" = "" ]; then
1084 if [ -z "$output" ]; then
1092 echo "Rockbox configure script."
1093 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1094 echo "Do *NOT* run this within the tools directory!"
1097 Usage: configure [OPTION]...
1099 --target=TARGET Sets the target, TARGET can be either the target ID or
1100 corresponding string. Run without this option to see all
1103 --ram=RAM Sets the RAM for certain targets. Even though any number
1104 is accepted, not every number is correct. The default
1105 value will be applied, if you entered a wrong number
1106 (which depends on the target). Watch the output. Run
1107 without this option if you are not sure which the right
1110 --type=TYPE Sets the build type. Shortcuts are also valid.
1111 Run without this option to see all available types.
1112 Multiple values are allowed and managed in the input
1113 order. So --type=b stands for Bootloader build, while
1114 --type=ab stands for "Backlight MOD" build.
1116 --lcdwidth=X Sets the width of the LCD. Used only for application
1119 --lcdheight=Y Sets the height of the LCD. Used only for application
1122 --language=LANG Set the language used for voice generation (used only if
1125 --tts=ENGINE Set the TTS engine used for voice generation (used only
1128 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1131 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1133 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1135 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1136 This is useful for having multiple alternate builds on
1137 your device that you can load with ROLO. However as the
1138 bootloader looks for .rockbox you won't be able to boot
1141 --ccache Enable ccache use (done by default these days)
1142 --no-ccache Disable ccache use
1144 --eabi Make configure prefer toolchains that are able to compile
1145 for the new ARM standard abi EABI
1146 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1147 --thumb Build with -mthumb (for ARM builds)
1148 --no-thumb The opposite of --thumb (don't use thumb even for targets
1149 where this is the default
1150 --sdl-threads Force use of SDL threads. They have inferior performance,
1151 but are better debuggable with GDB
1152 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1153 behavior of falling back to them if no native thread
1155 --prefix Target installation directory
1156 --help Shows this message (must not be used with other options)
1175 ARG_PREFIX
="$PREFIX"
1180 --ccache) ARG_CCACHE
=1;;
1181 --no-ccache) ARG_CCACHE
=0;;
1182 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1183 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1184 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1185 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1186 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1187 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1188 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1189 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1190 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1191 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1192 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1193 --eabi) ARG_ARM_EABI
=1;;
1194 --no-eabi) ARG_ARM_EABI
=0;;
1195 --thumb) ARG_ARM_THUMB
=1;;
1196 --no-thumb) ARG_ARM_THUMB
=0;;
1197 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1199 ARG_THREAD_SUPPORT
=0;;
1200 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1202 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1205 [ "$err" ] && exit 1
1209 if [ "$TMPDIR" != "" ]; then
1214 echo Using temporary directory
$tmpdir
1216 if test -r "configure"; then
1217 # this is a check for a configure script in the current directory, it there
1218 # is one, try to figure out if it is this one!
1220 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1221 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1222 echo "It will only cause you pain and grief. Instead do this:"
1225 echo " mkdir build-dir"
1226 echo " cd build-dir"
1227 echo " ../tools/configure"
1229 echo "Much happiness will arise from this. Enjoy"
1234 # get our current directory
1237 if { echo $pwd |
grep " "; } then
1238 echo "You're running this script in a path that contains space. The build"
1239 echo "system is unfortunately not clever enough to deal with this. Please"
1240 echo "run the script from a different path, rename the path or fix the build"
1245 if [ -z "$rootdir" ]; then
1246 ##################################################################
1247 # Figure out where the source code root is!
1249 rootdir
=`dirname $0`/..
/
1251 #####################################################################
1252 # Convert the possibly relative directory name to an absolute version
1258 # cd back to the build dir
1263 appsdir
='$(ROOTDIR)/apps'
1264 toolsdir
='$(ROOTDIR)/tools'
1267 ##################################################################
1268 # Figure out target platform
1271 if [ "$ARG_TARGET" ]; then
1272 buildfor
=$ARG_TARGET
1274 echo "Enter target platform:"
1276 ==Archos== ==iriver== ==Apple iPod==
1277 0) Player/Studio 10) H120/H140 20) Color/Photo
1278 1) Recorder 11) H320/H340 21) Nano 1G
1279 2) FM Recorder 12) iHP-100/110/115 22) Video
1280 3) Recorder v2 13) iFP-790 23) 3G
1281 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1282 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1283 6) AV300 26) Mini 2G
1284 ==Toshiba== 27) 1G, 2G
1285 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1286 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1288 32) 7 ==Olympus= ==SanDisk==
1289 33) D2 70) M:Robe 500 50) Sansa e200
1290 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1292 ==Creative== ==Philips== 53) Sansa m200
1293 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1294 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1295 92) Zen Vision HDD1830 56) Sansa e200v2
1296 102) GoGear HDD6330 57) Sansa m200v4
1297 ==Onda== 58) Sansa Fuze
1298 120) VX747 ==Meizu== 59) Sansa c200v2
1299 121) VX767 110) M6SL 60) Sansa Clipv2
1300 122) VX747+ 111) M6SP 61) Sansa View
1301 123) VX777 112) M3 62) Sansa Clip+
1303 ==Samsung== ==Tatung== 64) Sansa Fuze+
1304 140) YH-820 150) Elio TPJ-1022 65) Sansa Clip Zip
1305 141) YH-920 66) Sansa Connect
1306 142) YH-925 ==Packard Bell==
1307 143) YP-S3 160) Vibe 500 ==Logik==
1309 ==Application== ==MPIO==
1310 200) SDL 170) HD200 ==Lyre project==
1311 201) Android 171) HD300 130) Lyre proto 1
1312 202) Nokia N8xx 131) Mini2440
1313 203) Nokia N900 ==ROCKCHIP== ==HiFiMAN==
1314 204) Pandora 180) rk27xx generic 190) HM-60x
1315 205) Samsung YP-R0 191) HM-801
1322 # Set of tools built for all target platforms:
1323 toolset
="rdf2binary convbdf codepages"
1325 # Toolsets for some target families:
1326 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1327 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1328 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1329 ipodbitmaptools
="$toolset scramble bmp2rb"
1330 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1331 tccbitmaptools
="$toolset scramble bmp2rb"
1332 # generic is used by IFP, Meizu and Onda
1333 genericbitmaptools
="$toolset bmp2rb"
1334 # scramble is used by all other targets
1335 scramblebitmaptools
="$genericbitmaptools scramble"
1338 # ---- For each target ----
1341 # target_id: a unique number identifying this target, IS NOT the menu number.
1342 # Just use the currently highest number+1 when you add a new
1344 # modelname: short model name used all over to identify this target
1345 # memory: number of megabytes of RAM this target has. If the amount can
1346 # be selected by the size prompt, let memory be unset here
1347 # target: -Ddefine passed to the build commands to make the correct
1348 # config-*.h file get included etc
1349 # tool: the tool that takes a plain binary and converts that into a
1350 # working "firmware" file for your target
1351 # output: the final output file name
1352 # boottool: the tool that takes a plain binary and generates a bootloader
1353 # file for your target (or blank to use $tool)
1354 # bootoutput:the final output file name for the bootloader (or blank to use
1356 # appextra: passed to the APPEXTRA variable in the Makefiles.
1357 # TODO: add proper explanation
1358 # archosrom: used only for Archos targets that build a special flashable .ucl
1360 # flash: name of output for flashing, for targets where there's a special
1361 # file output for this.
1362 # plugins: set to 'yes' to build the plugins. Early development builds can
1363 # set this to no in the early stages to have an easier life for a
1365 # swcodec: set 'yes' on swcodec targets
1366 # toolset: lists what particular tools in the tools/ directory that this
1367 # target needs to have built prior to building Rockbox
1370 # *cc: sets up gcc and compiler options for your target builds. Note
1371 # that if you select a simulator build, the compiler selection is
1372 # overridden later in the script.
1378 modelname
="archosplayer"
1379 target
="ARCHOS_PLAYER"
1381 tool
="$rootdir/tools/scramble"
1383 appextra
="player:gui"
1384 archosrom
="$pwd/rombox.ucl"
1385 flash
="$pwd/rockbox.ucl"
1389 # toolset is the tools within the tools directory that we build for
1390 # this particular target.
1391 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1393 # Note: the convbdf is present in the toolset just because: 1) the
1394 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1395 # build the player simulator
1398 t_manufacturer
="archos"
1404 modelname
="archosrecorder"
1405 target
="ARCHOS_RECORDER"
1407 tool
="$rootdir/tools/scramble"
1408 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1409 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1411 appextra
="recorder:gui:radio"
1412 #archosrom="$pwd/rombox.ucl"
1413 flash
="$pwd/rockbox.ucl"
1416 # toolset is the tools within the tools directory that we build for
1417 # this particular target.
1418 toolset
=$archosbitmaptools
1420 t_manufacturer
="archos"
1426 modelname
="archosfmrecorder"
1427 target
="ARCHOS_FMRECORDER"
1429 tool
="$rootdir/tools/scramble -fm"
1430 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1431 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1433 appextra
="recorder:gui:radio"
1434 #archosrom="$pwd/rombox.ucl"
1435 flash
="$pwd/rockbox.ucl"
1438 # toolset is the tools within the tools directory that we build for
1439 # this particular target.
1440 toolset
=$archosbitmaptools
1442 t_manufacturer
="archos"
1448 modelname
="archosrecorderv2"
1449 target
="ARCHOS_RECORDERV2"
1451 tool
="$rootdir/tools/scramble -v2"
1452 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1453 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1455 appextra
="recorder:gui:radio"
1456 #archosrom="$pwd/rombox.ucl"
1457 flash
="$pwd/rockbox.ucl"
1460 # toolset is the tools within the tools directory that we build for
1461 # this particular target.
1462 toolset
=$archosbitmaptools
1464 t_manufacturer
="archos"
1470 modelname
="archosondiosp"
1471 target
="ARCHOS_ONDIOSP"
1473 tool
="$rootdir/tools/scramble -osp"
1474 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1475 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1477 appextra
="recorder:gui:radio"
1478 #archosrom="$pwd/rombox.ucl"
1479 flash
="$pwd/rockbox.ucl"
1482 # toolset is the tools within the tools directory that we build for
1483 # this particular target.
1484 toolset
=$archosbitmaptools
1486 t_manufacturer
="archos"
1492 modelname
="archosondiofm"
1493 target
="ARCHOS_ONDIOFM"
1495 tool
="$rootdir/tools/scramble -ofm"
1496 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1497 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1499 appextra
="recorder:gui:radio"
1500 #archosrom="$pwd/rombox.ucl"
1501 flash
="$pwd/rockbox.ucl"
1504 toolset
=$archosbitmaptools
1506 t_manufacturer
="archos"
1512 modelname
="archosav300"
1513 target
="ARCHOS_AV300"
1516 tool
="$rootdir/tools/scramble -mm=C"
1517 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1518 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1520 appextra
="recorder:gui:radio"
1523 # toolset is the tools within the tools directory that we build for
1524 # this particular target.
1525 toolset
="$toolset scramble descramble bmp2rb"
1526 # architecture, manufacturer and model for the target-tree build
1528 t_manufacturer
="archos"
1534 modelname
="iriverh120"
1535 target
="IRIVER_H120"
1538 tool
="$rootdir/tools/scramble -add=h120"
1539 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1540 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1541 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1542 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1543 output
="rockbox.iriver"
1544 bootoutput
="bootloader.iriver"
1545 appextra
="recorder:gui:radio"
1546 flash
="$pwd/rombox.iriver"
1549 # toolset is the tools within the tools directory that we build for
1550 # this particular target.
1551 toolset
=$iriverbitmaptools
1553 t_manufacturer
="iriver"
1559 modelname
="iriverh300"
1560 target
="IRIVER_H300"
1563 tool
="$rootdir/tools/scramble -add=h300"
1564 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1565 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1566 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1567 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1568 output
="rockbox.iriver"
1569 appextra
="recorder:gui:radio"
1572 # toolset is the tools within the tools directory that we build for
1573 # this particular target.
1574 toolset
=$iriverbitmaptools
1576 t_manufacturer
="iriver"
1582 modelname
="iriverh100"
1583 target
="IRIVER_H100"
1586 tool
="$rootdir/tools/scramble -add=h100"
1587 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1588 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1589 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1590 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1591 output
="rockbox.iriver"
1592 bootoutput
="bootloader.iriver"
1593 appextra
="recorder:gui:radio"
1594 flash
="$pwd/rombox.iriver"
1597 # toolset is the tools within the tools directory that we build for
1598 # this particular target.
1599 toolset
=$iriverbitmaptools
1601 t_manufacturer
="iriver"
1607 modelname
="iriverifp7xx"
1608 target
="IRIVER_IFP7XX"
1612 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1613 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1614 output
="rockbox.wma"
1615 appextra
="recorder:gui:radio"
1618 # toolset is the tools within the tools directory that we build for
1619 # this particular target.
1620 toolset
=$genericbitmaptools
1622 t_manufacturer
="pnx0101"
1623 t_model
="iriver-ifp7xx"
1628 modelname
="iriverh10"
1632 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1633 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1634 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1635 output
="rockbox.mi4"
1636 appextra
="recorder:gui:radio"
1639 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1640 bootoutput
="H10_20GC.mi4"
1641 # toolset is the tools within the tools directory that we build for
1642 # this particular target.
1643 toolset
=$scramblebitmaptools
1644 # architecture, manufacturer and model for the target-tree build
1647 t_manufacturer
="iriver"
1653 modelname
="iriverh10_5gb"
1654 target
="IRIVER_H10_5GB"
1657 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1658 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1659 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1660 output
="rockbox.mi4"
1661 appextra
="recorder:gui:radio"
1664 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1665 bootoutput
="H10.mi4"
1666 # toolset is the tools within the tools directory that we build for
1667 # this particular target.
1668 toolset
=$scramblebitmaptools
1669 # architecture, manufacturer and model for the target-tree build
1672 t_manufacturer
="iriver"
1678 modelname
="ipodcolor"
1682 tool
="$rootdir/tools/scramble -add=ipco"
1683 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1684 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1685 output
="rockbox.ipod"
1686 appextra
="recorder:gui:radio"
1689 bootoutput
="bootloader-$modelname.ipod"
1690 # toolset is the tools within the tools directory that we build for
1691 # this particular target.
1692 toolset
=$ipodbitmaptools
1693 # architecture, manufacturer and model for the target-tree build
1696 t_manufacturer
="ipod"
1702 modelname
="ipodnano1g"
1706 tool
="$rootdir/tools/scramble -add=nano"
1707 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1708 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1709 output
="rockbox.ipod"
1710 appextra
="recorder:gui:radio"
1713 bootoutput
="bootloader-$modelname.ipod"
1714 # toolset is the tools within the tools directory that we build for
1715 # this particular target.
1716 toolset
=$ipodbitmaptools
1717 # architecture, manufacturer and model for the target-tree build
1720 t_manufacturer
="ipod"
1726 modelname
="ipodvideo"
1728 memory
=64 # always. This is reduced at runtime if needed
1730 tool
="$rootdir/tools/scramble -add=ipvd"
1731 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1732 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1733 output
="rockbox.ipod"
1734 appextra
="recorder:gui:radio"
1737 bootoutput
="bootloader-$modelname.ipod"
1738 # toolset is the tools within the tools directory that we build for
1739 # this particular target.
1740 toolset
=$ipodbitmaptools
1741 # architecture, manufacturer and model for the target-tree build
1744 t_manufacturer
="ipod"
1754 tool
="$rootdir/tools/scramble -add=ip3g"
1755 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1756 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1757 output
="rockbox.ipod"
1758 appextra
="recorder:gui:radio"
1761 bootoutput
="bootloader-$modelname.ipod"
1762 # toolset is the tools within the tools directory that we build for
1763 # this particular target.
1764 toolset
=$ipodbitmaptools
1765 # architecture, manufacturer and model for the target-tree build
1768 t_manufacturer
="ipod"
1778 tool
="$rootdir/tools/scramble -add=ip4g"
1779 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1780 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1781 output
="rockbox.ipod"
1782 appextra
="recorder:gui:radio"
1785 bootoutput
="bootloader-$modelname.ipod"
1786 # toolset is the tools within the tools directory that we build for
1787 # this particular target.
1788 toolset
=$ipodbitmaptools
1789 # architecture, manufacturer and model for the target-tree build
1792 t_manufacturer
="ipod"
1798 modelname
="ipodmini1g"
1802 tool
="$rootdir/tools/scramble -add=mini"
1803 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1804 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1805 output
="rockbox.ipod"
1806 appextra
="recorder:gui:radio"
1809 bootoutput
="bootloader-$modelname.ipod"
1810 # toolset is the tools within the tools directory that we build for
1811 # this particular target.
1812 toolset
=$ipodbitmaptools
1813 # architecture, manufacturer and model for the target-tree build
1816 t_manufacturer
="ipod"
1822 modelname
="ipodmini2g"
1823 target
="IPOD_MINI2G"
1826 tool
="$rootdir/tools/scramble -add=mn2g"
1827 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1828 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1829 output
="rockbox.ipod"
1830 appextra
="recorder:gui:radio"
1833 bootoutput
="bootloader-$modelname.ipod"
1834 # toolset is the tools within the tools directory that we build for
1835 # this particular target.
1836 toolset
=$ipodbitmaptools
1837 # architecture, manufacturer and model for the target-tree build
1840 t_manufacturer
="ipod"
1846 modelname
="ipod1g2g"
1850 tool
="$rootdir/tools/scramble -add=1g2g"
1851 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1852 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1853 output
="rockbox.ipod"
1854 appextra
="recorder:gui:radio"
1857 bootoutput
="bootloader-$modelname.ipod"
1858 # toolset is the tools within the tools directory that we build for
1859 # this particular target.
1860 toolset
=$ipodbitmaptools
1861 # architecture, manufacturer and model for the target-tree build
1864 t_manufacturer
="ipod"
1870 modelname
="ipodnano2g"
1871 target
="IPOD_NANO2G"
1874 tool
="$rootdir/tools/scramble -add=nn2g"
1875 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1876 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1877 output
="rockbox.ipod"
1878 appextra
="recorder:gui:radio"
1881 bootoutput
="bootloader-$modelname.ipod"
1882 # toolset is the tools within the tools directory that we build for
1883 # this particular target.
1884 toolset
=$ipodbitmaptools
1885 # architecture, manufacturer and model for the target-tree build
1887 t_manufacturer
="s5l8700"
1888 t_model
="ipodnano2g"
1897 tool
="$rootdir/tools/scramble -add=ip6g"
1898 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1899 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1900 output
="rockbox.ipod"
1901 appextra
="recorder:gui:radio"
1904 bootoutput
="bootloader-$modelname.ipod"
1905 # toolset is the tools within the tools directory that we build for
1906 # this particular target.
1907 toolset
=$ipodbitmaptools
1908 # architecture, manufacturer and model for the target-tree build
1910 t_manufacturer
="s5l8702"
1916 modelname
="iaudiox5"
1920 tool
="$rootdir/tools/scramble -add=iax5"
1921 boottool
="$rootdir/tools/scramble -iaudiox5"
1922 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1923 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1924 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1925 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1926 output
="rockbox.iaudio"
1927 bootoutput
="x5_fw.bin"
1928 appextra
="recorder:gui:radio"
1931 # toolset is the tools within the tools directory that we build for
1932 # this particular target.
1933 toolset
="$iaudiobitmaptools"
1934 # architecture, manufacturer and model for the target-tree build
1936 t_manufacturer
="iaudio"
1942 modelname
="iaudiom5"
1946 tool
="$rootdir/tools/scramble -add=iam5"
1947 boottool
="$rootdir/tools/scramble -iaudiom5"
1948 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1949 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1950 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1951 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1952 output
="rockbox.iaudio"
1953 bootoutput
="m5_fw.bin"
1954 appextra
="recorder:gui:radio"
1957 # toolset is the tools within the tools directory that we build for
1958 # this particular target.
1959 toolset
="$iaudiobitmaptools"
1960 # architecture, manufacturer and model for the target-tree build
1962 t_manufacturer
="iaudio"
1972 tool
="$rootdir/tools/scramble -add=i7"
1973 boottool
="$rootdir/tools/scramble -tcc=crc"
1974 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1975 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1976 output
="rockbox.iaudio"
1977 appextra
="recorder:gui:radio"
1980 bootoutput
="I7_FW.BIN"
1981 # toolset is the tools within the tools directory that we build for
1982 # this particular target.
1983 toolset
="$tccbitmaptools"
1984 # architecture, manufacturer and model for the target-tree build
1986 t_manufacturer
="tcc77x"
1996 tool
="$rootdir/tools/scramble -add=d2"
1998 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1999 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2001 bootoutput
="bootloader-cowond2.bin"
2002 appextra
="recorder:gui:radio"
2005 toolset
="$tccbitmaptools"
2006 # architecture, manufacturer and model for the target-tree build
2008 t_manufacturer
="tcc780x"
2014 modelname
="iaudiom3"
2018 tool
="$rootdir/tools/scramble -add=iam3"
2019 boottool
="$rootdir/tools/scramble -iaudiom3"
2020 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2021 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2022 output
="rockbox.iaudio"
2023 bootoutput
="cowon_m3.bin"
2024 appextra
="recorder:gui:radio"
2027 # toolset is the tools within the tools directory that we build for
2028 # this particular target.
2029 toolset
="$iaudiobitmaptools"
2030 # architecture, manufacturer and model for the target-tree build
2032 t_manufacturer
="iaudio"
2038 modelname
="gigabeatfx"
2042 tool
="$rootdir/tools/scramble -add=giga"
2043 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2044 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2045 output
="rockbox.gigabeat"
2046 appextra
="recorder:gui:radio"
2049 toolset
=$gigabeatbitmaptools
2050 boottool
="$rootdir/tools/scramble -gigabeat"
2051 bootoutput
="FWIMG01.DAT"
2052 # architecture, manufacturer and model for the target-tree build
2054 t_manufacturer
="s3c2440"
2055 t_model
="gigabeat-fx"
2060 modelname
="gigabeats"
2064 tool
="$rootdir/tools/scramble -add=gigs"
2065 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2066 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2067 output
="rockbox.gigabeat"
2068 appextra
="recorder:gui:radio"
2071 toolset
="$gigabeatbitmaptools"
2072 boottool
="$rootdir/tools/scramble -gigabeats"
2074 # architecture, manufacturer and model for the target-tree build
2076 t_manufacturer
="imx31"
2077 t_model
="gigabeat-s"
2082 modelname
="mrobe500"
2086 tool
="$rootdir/tools/scramble -add=m500"
2087 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2088 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2089 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2090 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2091 output
="rockbox.mrobe500"
2092 appextra
="recorder:gui:radio"
2095 toolset
=$gigabeatbitmaptools
2097 bootoutput
="rockbox.mrboot"
2098 # architecture, manufacturer and model for the target-tree build
2100 t_manufacturer
="tms320dm320"
2106 modelname
="mrobe100"
2110 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2111 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2112 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2113 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2114 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2115 output
="rockbox.mi4"
2116 appextra
="recorder:gui:radio"
2119 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2120 bootoutput
="pp5020.mi4"
2121 # toolset is the tools within the tools directory that we build for
2122 # this particular target.
2123 toolset
=$scramblebitmaptools
2124 # architecture, manufacturer and model for the target-tree build
2127 t_manufacturer
="olympus"
2133 modelname
="logikdax"
2137 tool
="$rootdir/tools/scramble -add=ldax"
2138 boottool
="$rootdir/tools/scramble -tcc=crc"
2139 bootoutput
="player.rom"
2140 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2141 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2142 output
="rockbox.logik"
2143 appextra
="recorder:gui:radio"
2146 # toolset is the tools within the tools directory that we build for
2147 # this particular target.
2148 toolset
=$tccbitmaptools
2149 # architecture, manufacturer and model for the target-tree build
2151 t_manufacturer
="tcc77x"
2157 modelname
="zenvisionm30gb"
2158 target
="CREATIVE_ZVM"
2161 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2162 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2163 tool
="$rootdir/tools/scramble -creative=zvm"
2165 output
="rockbox.zvm"
2166 appextra
="recorder:gui:radio"
2169 toolset
=$ipodbitmaptools
2170 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2171 bootoutput
="rockbox.zvmboot"
2172 # architecture, manufacturer and model for the target-tree build
2174 t_manufacturer
="tms320dm320"
2175 t_model
="creative-zvm"
2180 modelname
="zenvisionm60gb"
2181 target
="CREATIVE_ZVM60GB"
2184 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2185 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2186 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2188 output
="rockbox.zvm60"
2189 appextra
="recorder:gui:radio"
2192 toolset
=$ipodbitmaptools
2193 boottool
="$rootdir/tools/scramble -creative=zvm60"
2194 bootoutput
="rockbox.zvm60boot"
2195 # architecture, manufacturer and model for the target-tree build
2197 t_manufacturer
="tms320dm320"
2198 t_model
="creative-zvm"
2203 modelname
="zenvision"
2204 target
="CREATIVE_ZV"
2207 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2208 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2209 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2212 appextra
="recorder:gui:radio"
2215 toolset
=$ipodbitmaptools
2216 boottool
="$rootdir/tools/scramble -creative=zenvision"
2217 bootoutput
="rockbox.zvboot"
2218 # architecture, manufacturer and model for the target-tree build
2220 t_manufacturer
="tms320dm320"
2221 t_model
="creative-zvm"
2226 modelname
="sansae200"
2228 memory
=32 # supposedly
2230 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2231 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2232 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2233 output
="rockbox.mi4"
2234 appextra
="recorder:gui:radio"
2237 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2238 bootoutput
="PP5022.mi4"
2239 # toolset is the tools within the tools directory that we build for
2240 # this particular target.
2241 toolset
=$scramblebitmaptools
2242 # architecture, manufacturer and model for the target-tree build
2245 t_manufacturer
="sandisk"
2246 t_model
="sansa-e200"
2250 # the e200R model is pretty much identical to the e200, it only has a
2251 # different option to the scramble tool when building a bootloader and
2252 # makes the bootloader output file name in all lower case.
2254 modelname
="sansae200r"
2256 memory
=32 # supposedly
2258 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2259 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2260 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2261 output
="rockbox.mi4"
2262 appextra
="recorder:gui:radio"
2265 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2266 bootoutput
="pp5022.mi4"
2267 # toolset is the tools within the tools directory that we build for
2268 # this particular target.
2269 toolset
=$scramblebitmaptools
2270 # architecture, manufacturer and model for the target-tree build
2273 t_manufacturer
="sandisk"
2274 t_model
="sansa-e200"
2279 modelname
="sansac200"
2281 memory
=32 # supposedly
2283 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2284 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2285 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2286 output
="rockbox.mi4"
2287 appextra
="recorder:gui:radio"
2290 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2291 bootoutput
="firmware.mi4"
2292 # toolset is the tools within the tools directory that we build for
2293 # this particular target.
2294 toolset
=$scramblebitmaptools
2295 # architecture, manufacturer and model for the target-tree build
2298 t_manufacturer
="sandisk"
2299 t_model
="sansa-c200"
2304 modelname
="sansam200"
2308 tool
="$rootdir/tools/scramble -add=m200"
2309 boottool
="$rootdir/tools/scramble -tcc=crc"
2310 bootoutput
="player.rom"
2311 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2312 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2313 output
="rockbox.m200"
2314 appextra
="recorder:gui:radio"
2317 # toolset is the tools within the tools directory that we build for
2318 # this particular target.
2319 toolset
=$tccbitmaptools
2320 # architecture, manufacturer and model for the target-tree build
2322 t_manufacturer
="tcc77x"
2328 modelname
="sansac100"
2332 tool
="$rootdir/tools/scramble -add=c100"
2333 boottool
="$rootdir/tools/scramble -tcc=crc"
2334 bootoutput
="player.rom"
2335 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2336 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2337 output
="rockbox.c100"
2338 appextra
="recorder:gui:radio"
2341 # toolset is the tools within the tools directory that we build for
2342 # this particular target.
2343 toolset
=$tccbitmaptools
2344 # architecture, manufacturer and model for the target-tree build
2346 t_manufacturer
="tcc77x"
2352 modelname
="sansaclip"
2355 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2356 bmp2rb_native
="$bmp2rb_mono"
2357 tool
="$rootdir/tools/scramble -add=clip"
2358 output
="rockbox.sansa"
2359 bootoutput
="bootloader-clip.sansa"
2360 appextra
="recorder:gui:radio"
2363 toolset
=$scramblebitmaptools
2365 t_manufacturer
="as3525"
2366 t_model
="sansa-clip"
2367 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2369 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2375 modelname
="sansae200v2"
2376 target
="SANSA_E200V2"
2378 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2379 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2380 tool
="$rootdir/tools/scramble -add=e2v2"
2381 output
="rockbox.sansa"
2382 bootoutput
="bootloader-e200v2.sansa"
2383 appextra
="recorder:gui:radio"
2386 toolset
=$scramblebitmaptools
2388 t_manufacturer
="as3525"
2389 t_model
="sansa-e200v2"
2396 modelname
="sansam200v4"
2397 target
="SANSA_M200V4"
2399 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2400 bmp2rb_native
="$bmp2rb_mono"
2401 tool
="$rootdir/tools/scramble -add=m2v4"
2402 output
="rockbox.sansa"
2403 bootoutput
="bootloader-m200v4.sansa"
2404 appextra
="recorder:gui:radio"
2407 toolset
=$scramblebitmaptools
2409 t_manufacturer
="as3525"
2410 t_model
="sansa-m200v4"
2411 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2413 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2419 modelname
="sansafuze"
2422 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2423 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2424 tool
="$rootdir/tools/scramble -add=fuze"
2425 output
="rockbox.sansa"
2426 bootoutput
="bootloader-fuze.sansa"
2427 appextra
="recorder:gui:radio"
2430 toolset
=$scramblebitmaptools
2432 t_manufacturer
="as3525"
2433 t_model
="sansa-fuze"
2440 modelname
="sansac200v2"
2441 target
="SANSA_C200V2"
2442 memory
=2 # as per OF diagnosis mode
2443 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2444 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2445 tool
="$rootdir/tools/scramble -add=c2v2"
2446 output
="rockbox.sansa"
2447 bootoutput
="bootloader-c200v2.sansa"
2448 appextra
="recorder:gui:radio"
2451 # toolset is the tools within the tools directory that we build for
2452 # this particular target.
2453 toolset
=$scramblebitmaptools
2454 # architecture, manufacturer and model for the target-tree build
2456 t_manufacturer
="as3525"
2457 t_model
="sansa-c200v2"
2458 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2460 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2465 modelname
="sansaclipv2"
2466 target
="SANSA_CLIPV2"
2468 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2469 bmp2rb_native
="$bmp2rb_mono"
2470 tool
="$rootdir/tools/scramble -add=clv2"
2471 output
="rockbox.sansa"
2472 bootoutput
="bootloader-clipv2.sansa"
2473 appextra
="recorder:gui:radio"
2476 toolset
=$scramblebitmaptools
2478 t_manufacturer
="as3525"
2479 t_model
="sansa-clipv2"
2484 echo "Sansa View is not yet supported!"
2487 modelname
="sansaview"
2491 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2492 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2493 output
="rockbox.mi4"
2497 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2498 bootoutput
="firmware.mi4"
2499 # toolset is the tools within the tools directory that we build for
2500 # this particular target.
2501 toolset
=$scramblebitmaptools
2504 t_manufacturer
="sandisk"
2505 t_model
="sansa-view"
2510 modelname
="sansaclipplus"
2511 target
="SANSA_CLIPPLUS"
2513 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2514 bmp2rb_native
="$bmp2rb_mono"
2515 tool
="$rootdir/tools/scramble -add=cli+"
2516 output
="rockbox.sansa"
2517 bootoutput
="bootloader-clipplus.sansa"
2518 appextra
="recorder:gui:radio"
2521 toolset
=$scramblebitmaptools
2523 t_manufacturer
="as3525"
2524 t_model
="sansa-clipplus"
2530 modelname
="sansafuzev2"
2531 target
="SANSA_FUZEV2"
2533 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2534 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2535 tool
="$rootdir/tools/scramble -add=fuz2"
2536 output
="rockbox.sansa"
2537 bootoutput
="bootloader-fuzev2.sansa"
2538 appextra
="recorder:gui:radio"
2541 toolset
=$scramblebitmaptools
2543 t_manufacturer
="as3525"
2544 t_model
="sansa-fuzev2"
2550 modelname
="sansafuzeplus"
2551 target
="SANSA_FUZEPLUS"
2553 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2554 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2555 tool
="$rootdir/tools/scramble -add=fuz+"
2556 output
="rockbox.sansa"
2557 bootoutput
="bootloader-fuzeplus.sansa"
2558 appextra
="gui:recorder:radio"
2561 toolset
=$scramblebitmaptools
2563 t_manufacturer
="imx233"
2564 t_model
="sansa-fuzeplus"
2570 modelname
="sansaclipzip"
2571 target
="SANSA_CLIPZIP"
2573 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2574 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2575 tool
="$rootdir/tools/scramble -add=clzp"
2576 output
="rockbox.sansa"
2577 bootoutput
="bootloader-clipzip.sansa"
2578 appextra
="recorder:gui:radio"
2581 toolset
=$scramblebitmaptools
2583 t_manufacturer
="as3525"
2584 t_model
="sansa-clipzip"
2590 modelname
="sansaconnect"
2591 target
="SANSA_CONNECT"
2593 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2594 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2595 tool
="$rootdir/tools/scramble -add=conn"
2596 output
="rockbox.sansa"
2597 bootoutput
="bootloader-connect.sansa"
2598 appextra
="recorder:gui"
2601 toolset
=$scramblebitmaptools
2603 t_manufacturer
="tms320dm320"
2604 t_model
="sansa-connect"
2610 modelname
="tatungtpj1022"
2611 target
="TATUNG_TPJ1022"
2614 tool
="$rootdir/tools/scramble -add tpj2"
2615 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2616 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2617 output
="rockbox.elio"
2618 appextra
="recorder:gui:radio"
2621 boottool
="$rootdir/tools/scramble -mi4v2"
2622 bootoutput
="pp5020.mi4"
2623 # toolset is the tools within the tools directory that we build for
2624 # this particular target.
2625 toolset
=$scramblebitmaptools
2626 # architecture, manufacturer and model for the target-tree build
2629 t_manufacturer
="tatung"
2635 modelname
="gogearsa9200"
2636 target
="PHILIPS_SA9200"
2637 memory
=32 # supposedly
2639 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2640 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2641 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2642 output
="rockbox.mi4"
2643 appextra
="recorder:gui:radio"
2646 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2647 bootoutput
="FWImage.ebn"
2648 # toolset is the tools within the tools directory that we build for
2649 # this particular target.
2650 toolset
=$scramblebitmaptools
2651 # architecture, manufacturer and model for the target-tree build
2654 t_manufacturer
="philips"
2660 modelname
="gogearhdd1630"
2661 target
="PHILIPS_HDD1630"
2662 memory
=32 # supposedly
2664 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2665 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2666 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2667 output
="rockbox.mi4"
2668 appextra
="recorder:gui:radio"
2671 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2672 bootoutput
="FWImage.ebn"
2673 # toolset is the tools within the tools directory that we build for
2674 # this particular target.
2675 toolset
=$scramblebitmaptools
2676 # architecture, manufacturer and model for the target-tree build
2679 t_manufacturer
="philips"
2685 modelname
="gogearhdd6330"
2686 target
="PHILIPS_HDD6330"
2689 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2690 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2691 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2692 output
="rockbox.mi4"
2693 appextra
="recorder:gui:radio"
2696 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2697 bootoutput
="FWImage.ebn"
2698 # toolset is the tools within the tools directory that we build for
2699 # this particular target.
2700 toolset
=$scramblebitmaptools
2701 # architecture, manufacturer and model for the target-tree build
2704 t_manufacturer
="philips"
2710 modelname
="meizum6sl"
2715 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2716 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2717 output
="rockbox.meizu"
2718 appextra
="recorder:gui:radio"
2721 toolset
=$genericbitmaptools
2723 bootoutput
="rockboot.ebn"
2724 # architecture, manufacturer and model for the target-tree build
2726 t_manufacturer
="s5l8700"
2727 t_model
="meizu-m6sl"
2732 modelname
="meizum6sp"
2737 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2738 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2739 output
="rockbox.meizu"
2740 appextra
="recorder:gui:radio"
2743 toolset
=$genericbitmaptools
2745 bootoutput
="rockboot.ebn"
2746 # architecture, manufacturer and model for the target-tree build
2748 t_manufacturer
="s5l8700"
2749 t_model
="meizu-m6sp"
2759 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2760 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2761 output
="rockbox.meizu"
2762 appextra
="recorder:gui:radio"
2765 toolset
=$genericbitmaptools
2767 bootoutput
="rockboot.ebn"
2768 # architecture, manufacturer and model for the target-tree build
2770 t_manufacturer
="s5l8700"
2776 modelname
="ondavx747"
2780 tool
="$rootdir/tools/scramble -add=x747"
2781 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2782 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2783 output
="rockbox.vx747"
2784 appextra
="recorder:gui:radio"
2787 toolset
=$genericbitmaptools
2788 boottool
="$rootdir/tools/scramble -ccpmp"
2789 bootoutput
="ccpmp.bin"
2790 # architecture, manufacturer and model for the target-tree build
2792 t_manufacturer
="ingenic_jz47xx"
2793 t_model
="onda_vx747"
2798 modelname
="ondavx767"
2803 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2804 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2805 output
="rockbox.vx767"
2806 appextra
="recorder:gui:radio"
2809 toolset
=$genericbitmaptools
2810 boottool
="$rootdir/tools/scramble -ccpmp"
2811 bootoutput
="ccpmp.bin"
2812 # architecture, manufacturer and model for the target-tree build
2814 t_manufacturer
="ingenic_jz47xx"
2815 t_model
="onda_vx767"
2820 modelname
="ondavx747p"
2821 target
="ONDA_VX747P"
2824 tool
="$rootdir/tools/scramble -add=747p"
2825 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2826 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2827 output
="rockbox.vx747p"
2828 appextra
="recorder:gui:radio"
2831 toolset
=$genericbitmaptools
2832 boottool
="$rootdir/tools/scramble -ccpmp"
2833 bootoutput
="ccpmp.bin"
2834 # architecture, manufacturer and model for the target-tree build
2836 t_manufacturer
="ingenic_jz47xx"
2837 t_model
="onda_vx747"
2842 modelname
="ondavx777"
2846 tool
="$rootdir/tools/scramble -add=x777"
2847 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2848 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2849 output
="rockbox.vx777"
2850 appextra
="recorder:gui:radio"
2853 toolset
=$genericbitmaptools
2854 boottool
="$rootdir/tools/scramble -ccpmp"
2855 bootoutput
="ccpmp.bin"
2856 # architecture, manufacturer and model for the target-tree build
2858 t_manufacturer
="ingenic_jz47xx"
2859 t_model
="onda_vx747"
2864 modelname
="lyreproto1"
2865 target
="LYRE_PROTO1"
2869 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2870 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2871 output
="rockbox.lyre"
2872 appextra
="recorder:gui:radio"
2875 toolset
=$scramblebitmaptools
2877 bootoutput
="bootloader-proto1.lyre"
2878 # architecture, manufacturer and model for the target-tree build
2880 t_manufacturer
="at91sam"
2881 t_model
="lyre_proto1"
2886 modelname
="mini2440"
2890 tool
="$rootdir/tools/scramble -add=m244"
2891 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2892 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2893 output
="rockbox.mini2440"
2894 appextra
="recorder:gui:radio"
2897 toolset
=$scramblebitmaptools
2899 bootoutput
="bootloader-mini2440.lyre"
2900 # architecture, manufacturer and model for the target-tree build
2902 t_manufacturer
="s3c2440"
2908 modelname
="samsungyh820"
2909 target
="SAMSUNG_YH820"
2912 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2913 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2914 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2915 output
="rockbox.mi4"
2916 appextra
="recorder:gui:radio"
2919 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2920 bootoutput
="FW_YH820.mi4"
2921 # toolset is the tools within the tools directory that we build for
2922 # this particular target.
2923 toolset
=$scramblebitmaptools
2924 # architecture, manufacturer and model for the target-tree build
2927 t_manufacturer
="samsung"
2933 modelname
="samsungyh920"
2934 target
="SAMSUNG_YH920"
2937 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2938 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2939 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2940 output
="rockbox.mi4"
2941 appextra
="recorder:gui:radio"
2944 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2945 bootoutput
="PP5020.mi4"
2946 # toolset is the tools within the tools directory that we build for
2947 # this particular target.
2948 toolset
=$scramblebitmaptools
2949 # architecture, manufacturer and model for the target-tree build
2952 t_manufacturer
="samsung"
2958 modelname
="samsungyh925"
2959 target
="SAMSUNG_YH925"
2962 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2963 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2964 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2965 output
="rockbox.mi4"
2966 appextra
="recorder:gui:radio"
2969 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2970 bootoutput
="FW_YH925.mi4"
2971 # toolset is the tools within the tools directory that we build for
2972 # this particular target.
2973 toolset
=$scramblebitmaptools
2974 # architecture, manufacturer and model for the target-tree build
2977 t_manufacturer
="samsung"
2983 modelname
="samsungyps3"
2984 target
="SAMSUNG_YPS3"
2988 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2989 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2990 output
="rockbox.yps3"
2991 appextra
="recorder:gui:radio"
2994 toolset
=$genericbitmaptools
2996 bootoutput
="rockboot.ebn"
2997 # architecture, manufacturer and model for the target-tree build
2999 t_manufacturer
="s5l8700"
3006 target
="PBELL_VIBE500"
3009 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
3010 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3011 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
3012 output
="rockbox.mi4"
3013 appextra
="recorder:gui:radio"
3016 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
3017 bootoutput
="jukebox.mi4"
3018 # toolset is the tools within the tools directory that we build for
3019 # this particular target.
3020 toolset
=$scramblebitmaptools
3021 # architecture, manufacturer and model for the target-tree build
3024 t_manufacturer
="pbell"
3030 modelname
="mpiohd200"
3034 tool
="$rootdir/tools/scramble -add=hd20"
3035 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3036 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
3037 output
="rockbox.mpio"
3038 bootoutput
="bootloader.mpio"
3039 appextra
="recorder:gui:radio"
3042 # toolset is the tools within the tools directory that we build for
3043 # this particular target.
3044 toolset
="$genericbitmaptools"
3045 # architecture, manufacturer and model for the target-tree build
3047 t_manufacturer
="mpio"
3053 modelname
="mpiohd300"
3057 tool
="$rootdir/tools/scramble -add=hd30"
3058 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3059 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
3060 output
="rockbox.mpio"
3061 bootoutput
="bootloader.mpio"
3062 appextra
="recorder:gui:radio"
3065 # toolset is the tools within the tools directory that we build for
3066 # this particular target.
3067 toolset
="$genericbitmaptools"
3068 # architecture, manufacturer and model for the target-tree build
3070 t_manufacturer
="mpio"
3076 modelname
="rk27generic"
3077 target
="RK27_GENERIC"
3080 tool
="$rootdir/tools/scramble -add=rk27"
3081 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3082 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3083 output
="rockbox.rk27"
3084 bootoutput
="bootloader.rk27"
3085 appextra
="recorder:gui:radio"
3088 # toolset is the tools within the tools directory that we build for
3089 # this particular target.
3090 toolset
="$genericbitmaptools"
3091 # architecture, manufacturer and model for the target-tree build
3093 t_manufacturer
="rk27xx"
3094 t_model
="rk27generic"
3099 modelname
="hifimanhm60x"
3103 tool
="$rootdir/tools/scramble -add=rk27"
3104 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3105 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3106 output
="rockbox.rk27"
3107 bootoutput
="bootloader.rk27"
3108 appextra
="recorder:gui"
3111 # toolset is the tools within the tools directory that we build for
3112 # this particular target.
3113 toolset
="$genericbitmaptools"
3114 # architecture, manufacturer and model for the target-tree build
3116 t_manufacturer
="rk27xx"
3122 modelname
="hifimanhm801"
3126 tool
="$rootdir/tools/scramble -add=rk27"
3127 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3128 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3129 output
="rockbox.rk27"
3130 bootoutput
="bootloader.rk27"
3131 appextra
="recorder:gui"
3134 # toolset is the tools within the tools directory that we build for
3135 # this particular target.
3136 toolset
="$genericbitmaptools"
3137 # architecture, manufacturer and model for the target-tree build
3139 t_manufacturer
="rk27xx"
3155 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3156 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3158 bootoutput
="rockbox"
3159 appextra
="recorder:gui:radio"
3162 # architecture, manufacturer and model for the target-tree build
3164 t_manufacturer
="sdl"
3175 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3176 bindir
="/data/data/org.rockbox/lib"
3177 libdir
="/data/data/org.rockbox/app_rockbox"
3183 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3184 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3185 output
="librockbox.so"
3186 bootoutput
="librockbox.so"
3187 appextra
="recorder:gui:radio:hosted/android"
3190 # architecture, manufacturer and model for the target-tree build
3192 t_manufacturer
="android"
3199 modelname
="nokian8xx"
3202 sharedir
="/opt/rockbox/share/rockbox"
3203 bindir
="/opt/rockbox/bin"
3204 libdir
="/opt/rockbox/lib"
3210 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3211 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3213 bootoutput
="rockbox"
3214 appextra
="recorder:gui:radio"
3217 # architecture, manufacturer and model for the target-tree build
3219 t_manufacturer
="maemo"
3226 modelname
="nokian900"
3229 sharedir
="/opt/rockbox/share/rockbox"
3230 bindir
="/opt/rockbox/bin"
3231 libdir
="/opt/rockbox/lib"
3237 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3238 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3240 bootoutput
="rockbox"
3241 appextra
="recorder:gui:radio"
3244 # architecture, manufacturer and model for the target-tree build
3246 t_manufacturer
="maemo"
3256 sharedir
="rockbox/share/rockbox"
3257 bindir
="rockbox/bin"
3258 libdir
="rockbox/lib"
3264 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3265 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3267 bootoutput
="rockbox"
3268 appextra
="recorder:gui:radio"
3271 # architecture, manufacturer and model for the target-tree build
3273 t_manufacturer
="pandora"
3280 modelname
="samsungypr0"
3281 target
="SAMSUNG_YPR0"
3282 app_set_lcd_size
240 320
3288 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3289 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3291 bootoutput
="rockbox"
3292 appextra
="recorder:gui:radio"
3295 # architecture, manufacturer and model for the target-tree build
3297 t_manufacturer
="ypr0"
3302 echo "Please select a supported target platform!"
3308 echo "Platform set to $modelname"
3312 ############################################################################
3313 # Amount of memory, for those that can differ. They have $memory unset at
3317 if [ -z "$memory" ]; then
3320 if [ "$ARG_RAM" ]; then
3323 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3336 if [ "$ARG_RAM" ]; then
3339 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3352 echo "Memory size selected: $memory MB"
3353 [ "$ARG_TYPE" ] ||
echo ""
3357 ##################################################################
3358 # Figure out build "type"
3361 # the ifp7x0 is the only platform that supports building a gdb stub like
3365 gdbstub
=", (G)DB stub"
3367 sansae200r|sansae200
)
3368 gdbstub
=", (I)nstaller"
3371 gdbstub
=", (E)raser"
3374 gdbstub
=", (E)raser"
3379 if [ "$ARG_TYPE" ]; then
3382 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool$gdbstub: (Defaults to N)"
3388 appsdir
='$(ROOTDIR)/bootloader'
3390 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3392 echo "e200R-installer build selected"
3395 appsdir
='$(ROOTDIR)/bootloader'
3397 extradefines
="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3399 echo "sansa eraser build selected"
3402 if test $t_manufacturer = "archos"; then
3403 # Archos SH-based players do this somewhat differently for
3405 appsdir
='$(ROOTDIR)/flash/bootbox'
3408 appsdir
='$(ROOTDIR)/bootloader'
3411 if test -n "$boottool"; then
3414 if test -n "$bootoutput"; then
3418 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3420 echo "Bootloader build selected"
3423 if [ "$modelname" = "sansae200r" ]; then
3424 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3429 extradefines
="$extradefines -DSIMULATOR"
3432 echo "Simulator build selected"
3435 echo "Advanced build selected"
3436 whichadvanced
$btype
3439 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3440 appsdir
='$(ROOTDIR)/gdb'
3449 echo "GDB stub build selected"
3457 extradefines
="$extradefines -DDEBUG"
3458 appsdir
='$(ROOTDIR)/tools/checkwps';
3459 output
='checkwps.'${modelname};
3461 echo "CheckWPS build selected"
3469 appsdir
='$(ROOTDIR)/tools/database';
3474 output
="database_${modelname}.exe"
3477 output
='database.'${modelname};
3481 echo "Database tool build selected"
3484 if [ "$modelname" = "sansae200r" ]; then
3485 echo "Do not use the e200R target for regular builds. Use e200 instead."
3489 btype
="N" # set it explicitly since RET only gets here as well
3490 echo "Normal build selected"
3494 # to be able running "make manual" from non-manual configuration
3497 manualdev
="archosfmrecorder"
3500 manualdev
="iriverh100"
3503 manualdev
="ipodmini1g"
3506 manualdev
=$modelname
3510 if [ -z "$debug" ]; then
3511 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3514 if [ "yes" = "$application" ]; then
3515 echo Building Rockbox as an Application
3516 extradefines
="$extradefines -DAPPLICATION"
3519 echo "Using source code root directory: $rootdir"
3521 # this was once possible to change at build-time, but no more:
3526 if [ "yes" = "$simulator" ]; then
3527 # setup compiler and things for simulator
3530 if [ -d "simdisk" ]; then
3531 echo "Subdirectory 'simdisk' already present"
3534 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3538 # Now, figure out version number of the (gcc) compiler we are about to use
3539 gccver
=`$CC -dumpversion`;
3541 # figure out the binutil version too and display it, mostly for the build
3542 # system etc to be able to see it easier
3543 if [ $uname = "Darwin" ]; then
3544 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3546 ldver
=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
3549 if [ -z "$gccver" ]; then
3550 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3551 echo "[WARNING] this may cause your build to fail since we cannot do the"
3552 echo "[WARNING] checks we want now."
3555 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3558 num1
=`echo $gccver | cut -d . -f1`
3559 num2
=`echo $gccver | cut -d . -f2`
3560 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3567 echo "Using $CC $gccver ($gccnum)"
3569 if test "$gccnum" -ge "400"; then
3570 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3571 # so we ignore that warnings for now
3573 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3576 if test "$gccnum" -ge "402"; then
3577 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3578 # and later would throw it for several valid cases
3579 GCCOPTS
="$GCCOPTS -Wno-override-init"
3583 ""|
"$CROSS_COMPILE")
3587 # Verify that the cross-compiler is of a recommended version!
3588 if test "$gccver" != "$gccchoice"; then
3589 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3590 echo "WARNING: version $gccchoice!"
3591 echo "WARNING: This may cause your build to fail since it may be a version"
3592 echo "WARNING: that isn't functional or known to not be the best choice."
3593 echo "WARNING: If you suffer from build problems, you know that this is"
3594 echo "WARNING: a likely source for them..."
3602 echo "Using $LD $ldver"
3604 # check the compiler for SH platforms
3605 if test "$CC" = "sh-elf-gcc"; then
3606 if test "$gccnum" -lt "400"; then
3607 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3608 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3610 # figure out patch status
3611 gccpatch
=`$CC --version`;
3613 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3614 echo "gcc $gccver is rockbox patched"
3615 # then convert -O to -Os to get smaller binaries!
3616 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3618 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3619 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3624 if test "$CC" = "m68k-elf-gcc"; then
3625 # convert -O to -Os to get smaller binaries!
3626 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3629 if [ "$ARG_CCACHE" = "1" ]; then
3630 echo "Enable ccache for building"
3632 elif [ "$ARG_CCACHE" != "0" ]; then
3633 ccache
=`findtool ccache`
3634 if test -n "$ccache"; then
3635 echo "Found and uses ccache ($ccache)"
3639 # figure out the full path to the various commands if possible
3640 HOSTCC
=`findtool gcc --lit`
3641 HOSTAR
=`findtool ar --lit`
3642 CC
=`findtool ${CC} --lit`
3643 LD
=`findtool ${AR} --lit`
3644 AR
=`findtool ${AR} --lit`
3645 AS
=`findtool ${AS} --lit`
3646 OC
=`findtool ${OC} --lit`
3647 WINDRES
=`findtool ${WINDRES} --lit`
3648 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3649 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3650 RANLIB
=`findtool ${RANLIB} --lit`
3652 if test -n "$ccache"; then
3656 if test "$ARG_ARM_THUMB" = "1"; then
3657 extradefines
="$extradefines -DUSE_THUMB"
3658 CC
="$toolsdir/thumb-cc.py $CC"
3661 if test "X$endian" = "Xbig"; then
3662 defendian
="ROCKBOX_BIG_ENDIAN"
3664 defendian
="ROCKBOX_LITTLE_ENDIAN"
3667 if [ "$ARG_RBDIR" != "" ]; then
3668 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3673 echo "Using alternate rockbox dir: ${rbdir}"
3676 cat > autoconf.h
<<EOF
3677 /* This header was made by configure */
3678 #ifndef __BUILD_AUTOCONF_H
3679 #define __BUILD_AUTOCONF_H
3681 /* Define endianess for the target or simulator platform */
3682 #define ${defendian} 1
3684 /* Define this if you build rockbox to support the logf logging and display */
3687 /* Define this to record a chart with timings for the stages of boot */
3690 /* optional define for a backlight modded Ondio */
3693 /* optional define for FM radio mod for iAudio M5 */
3696 /* optional define for ATA poweroff on Player */
3697 ${have_ata_poweroff}
3699 /* optional defines for RTC mod for h1x0 */
3703 /* the threading backend we use */
3704 #define ${thread_support}
3706 /* lcd dimensions for application builds from configure */
3710 /* root of Rockbox */
3711 #define ROCKBOX_DIR "${rbdir}"
3712 #define ROCKBOX_SHARE_PATH "${sharedir}"
3713 #define ROCKBOX_BINARY_PATH "${bindir}"
3714 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3716 #endif /* __BUILD_AUTOCONF_H */
3719 if test -n "$t_cpu"; then
3720 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3722 if [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "maemo" ]; then
3723 # Maemo needs the SDL port, too
3724 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3725 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3726 elif [ "$t_cpu" = "hosted" ] && [ "$t_manufacturer" = "pandora" ]; then
3727 # Pandora needs the SDL port, too
3728 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3729 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3730 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3731 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3732 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3735 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3736 test -n "$t_soc" && TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3737 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3741 if test "$swcodec" = "yes"; then
3742 voicetoolset
="rbspeexenc voicefont wavtrim"
3744 voicetoolset
="voicefont wavtrim"
3747 if test "$apps" = "apps"; then
3748 # only when we build "real" apps we build the .lng files
3752 #### Fix the cmdline ###
3753 if [ -n "$ARG_PREFIX" ]; then
3754 cmdline
="$cmdline --prefix=\$(PREFIX)"
3756 if [ -n "$ARG_LCDWIDTH" ]; then
3757 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3760 # remove parts from the cmdline we're going to set unconditionally
3761 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3762 -e s,--ram=[0-9]\*,,g \
3763 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3764 -e s,--type=[a-zA-Z]\*,,g`
3765 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3769 cat > Makefile
<<EOF
3770 ## Automatically generated. http://www.rockbox.org/
3772 export ROOTDIR=${rootdir}
3773 export FIRMDIR=\$(ROOTDIR)/firmware
3774 export APPSDIR=${appsdir}
3775 export TOOLSDIR=${toolsdir}
3776 export DOCSDIR=${rootdir}/docs
3777 export MANUALDIR=${rootdir}/manual
3778 export DEBUG=${debug}
3779 export MODELNAME=${modelname}
3780 export ARCHOSROM=${archosrom}
3781 export FLASHFILE=${flash}
3782 export TARGET_ID=${target_id}
3783 export TARGET=-D${target}
3785 export MANUFACTURER=${t_manufacturer}
3786 export OBJDIR=${pwd}
3787 export BUILDDIR=${pwd}
3788 export LANGUAGE=${language}
3789 export VOICELANGUAGE=${voicelanguage}
3790 export MEMORYSIZE=${memory}
3791 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3792 export MKFIRMWARE=${tool}
3793 export BMP2RB_MONO=${bmp2rb_mono}
3794 export BMP2RB_NATIVE=${bmp2rb_native}
3795 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3796 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3797 export BINARY=${output}
3798 export APPEXTRA=${appextra}
3799 export ENABLEDPLUGINS=${plugins}
3800 export SOFTWARECODECS=${swcodec}
3801 export EXTRA_DEFINES=${extradefines}
3802 export HOSTCC=${HOSTCC}
3803 export HOSTAR=${HOSTAR}
3809 export WINDRES=${WINDRES}
3810 export DLLTOOL=${DLLTOOL}
3811 export DLLWRAP=${DLLWRAP}
3812 export RANLIB=${RANLIB}
3813 export PREFIX=${ARG_PREFIX}
3814 export PROFILE_OPTS=${PROFILE_OPTS}
3815 export APP_TYPE=${app_type}
3816 export APPLICATION=${application}
3817 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3818 export GCCOPTS=${GCCOPTS}
3819 export TARGET_INC=${TARGET_INC}
3820 export LOADADDRESS=${loadaddress}
3821 export SHARED_LDFLAG=${SHARED_LDFLAG}
3822 export SHARED_CFLAGS=${SHARED_CFLAGS}
3823 export LDOPTS=${LDOPTS}
3824 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3825 export GCCVER=${gccver}
3826 export GCCNUM=${gccnum}
3827 export UNAME=${uname}
3828 export MANUALDEV=${manualdev}
3829 export TTS_OPTS=${TTS_OPTS}
3830 export TTS_ENGINE=${TTS_ENGINE}
3831 export ENC_OPTS=${ENC_OPTS}
3832 export ENCODER=${ENCODER}
3833 export USE_ELF=${USE_ELF}
3834 export RBDIR=${rbdir}
3835 export ROCKBOX_SHARE_PATH=${sharedir}
3836 export ROCKBOX_BINARY_PATH=${bindir}
3837 export ROCKBOX_LIBRARY_PATH=${libdir}
3838 export SDLCONFIG=${sdl}
3839 export LCDORIENTATION=${lcd_orientation}
3841 CONFIGURE_OPTIONS=${cmdline}
3843 include \$(TOOLSDIR)/root.make
3846 echo "Created Makefile"