3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 # global CC options for all platforms
11 CCOPTS
="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
13 # LD options for the core
15 # LD options for the core + plugins
19 use_logf
="#undef ROCKBOX_HAS_LOGF"
20 use_bootchart
="#undef DO_BOOTCHART"
21 use_logf_serial
="#undef LOGF_SERIAL"
23 scriptver
=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
30 thread_support
="ASSEMBLER_THREADS"
35 # Properly retain command line arguments containing spaces
39 *\
*) cmdline
="$cmdline \"$arg\"";;
40 *) cmdline
="$cmdline $arg";;
45 # Begin Function Definitions
56 WINDRES
=${prefix}windres
57 DLLTOOL
=${prefix}dlltool
58 DLLWRAP
=${prefix}dllwrap
59 RANLIB
=${prefix}ranlib
67 # setup files and paths depending on the platform
68 if [ -z "$ARG_PREFIX" ]; then
69 sharedir
="/usr/local/share/rockbox"
70 bindir
="/usr/local/bin"
71 libdir
="/usr/local/lib"
73 if [ -d "$ARG_PREFIX" ]; then
74 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
75 ARG_PREFIX
=`realpath $ARG_PREFIX`
76 if [ "0" != "$?" ]; then
77 echo "ERROR: Could not get prefix path (is realpath installed?)."
81 sharedir
="$ARG_PREFIX/share/rockbox"
82 bindir
="$ARG_PREFIX/bin"
83 libdir
="$ARG_PREFIX/lib"
85 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
91 # Set the application LCD size according to the following priorities:
92 # 1) If --lcdwidth and --lcdheight are set, use them
93 # 2) If a size is passed to the app_set_lcd_size() function, use that
94 # 3) Otherwise ask the user
96 if [ -z "$ARG_LCDWIDTH" ]; then
99 if [ -z "$ARG_LCDHEIGHT" ]; then
103 echo "Enter the LCD width (default: 320)"
104 if [ -z "$ARG_LCDWIDTH" ]; then
105 app_lcd_width
=`input`
107 app_lcd_width
="$ARG_LCDWIDTH"
109 if [ -z "$app_lcd_width" ]; then app_lcd_width
="320"; fi
110 echo "Enter the LCD height (default: 480)"
111 if [ -z "$ARG_LCDHEIGHT" ]; then
112 app_lcd_height
=`input`
114 app_lcd_height
="$ARG_LCDHEIGHT"
116 if [ -z "$app_lcd_height" ]; then app_lcd_height
="480"; fi
117 if [ $app_lcd_width -gt $app_lcd_height ]; then
118 lcd_orientation
="landscape"
120 lcd_orientation
="portrait"
122 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
123 ARG_LCDWIDTH
=$app_lcd_width
124 ARG_LCDHEIGHT
=$app_lcd_height
126 app_lcd_width
="#define LCD_WIDTH $app_lcd_width"
127 app_lcd_height
="#define LCD_HEIGHT $app_lcd_height"
131 prefixtools arm-elf-eabi-
135 # scan the $PATH for the given command
142 # echo "checks for $file in $path" >&2
143 if test -f "$path/$file"; then
148 # check whether caller wants literal return value if not found
149 if [ "$2" = "--lit" ]; then
154 # scan the $PATH for sdl-config - check whether for a (cross-)win32
157 # sdl-config might (not) be prefixed for cross compiles so try both.
158 files
="${CROSS_COMPILE}sdl-config:sdl-config"
166 #echo "checks for $file in $path" >&2
167 if test -f "$path/$file"; then
168 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
169 if [ "yes" = "${winbuild}" ]; then
174 if [ "yes" != "${winbuild}" ]; then
184 # check for availability of sigaltstack to support our thread engine
185 check_sigaltstack
() {
186 cat >$tmpdir/check_threads.c
<<EOF
188 int main(int argc, char **argv)
191 #define NULL (void*)0
193 sigaltstack(NULL, NULL);
197 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
1> /dev
/null
199 rm -rf $tmpdir/check_threads
*
203 # check for availability of Fiber on Win32 to support our thread engine
205 cat >$tmpdir/check_threads.c
<<EOF
207 int main(int argc, char **argv)
209 ConvertThreadToFiber(NULL);
213 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
2>/dev
/null
215 rm -rf $tmpdir/check_threads
*
221 # default tool setup for native building
222 prefixtools
"$CROSS_COMPILE"
223 ARG_ARM_THUMB
=0 # can't use thumb in native builds
225 # unset arch if already set shcc() and friends
231 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
233 GCCOPTS
="$GCCOPTS -fno-builtin -g"
235 LDOPTS
="$LDOPTS -lm" # button-sdl.c uses sqrt()
238 endian
="" # endianess of the dap doesnt matter here
240 # default output binary name, don't override app_get_platform()
241 if [ "$app_type" != "sdl-app" ]; then
245 # default share option, override below if needed
246 SHARED_LDFLAG
="-shared"
247 SHARED_CFLAGS
="-fPIC -fvisibility=hidden"
249 if [ "$win32crosscompile" = "yes" ]; then
250 # We are crosscompiling
251 # add cross-compiler option(s)
252 LDOPTS
="$LDOPTS -mconsole"
255 CROSS_COMPILE
=${CROSS_COMPILE:-"i586-mingw32msvc-"}
257 prefixtools
"$CROSS_COMPILE"
259 endian
="little" # windows is little endian
260 echo "Enabling MMX support"
261 GCCOPTS
="$GCCOPTS -mmmx"
265 echo "Cygwin host detected"
268 LDOPTS
="$LDOPTS -mconsole"
275 echo "MinGW host detected"
278 LDOPTS
="$LDOPTS -mconsole"
284 sigaltstack
=`check_sigaltstack`
285 echo "Linux host detected"
286 LDOPTS
="$LDOPTS -ldl"
290 sigaltstack
=`check_sigaltstack`
291 echo "FreeBSD host detected"
292 LDOPTS
="$LDOPTS -ldl"
296 sigaltstack
=`check_sigaltstack`
297 echo "Darwin host detected"
298 LDOPTS
="$LDOPTS -ldl"
299 SHARED_LDFLAG
="-dynamiclib -Wl\,-single_module"
303 sigaltstack
=`check_sigaltstack`
304 echo "*Solaris host detected"
306 GCCOPTS
="$GCCOPTS -fPIC"
307 LDOPTS
="$LDOPTS -ldl"
311 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
317 if [ "$winbuild" != "yes" ]; then
318 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
319 if [ "`uname -m`" = "i686" ]; then
320 echo "Enabling MMX support"
321 GCCOPTS
="$GCCOPTS -mmmx"
325 sdl
=`findsdl $winbuild`
327 if [ -n `echo $app_type | grep "sdl"` ]; then
328 if [ -z "$sdl" ]; then
329 echo "configure didn't find sdl-config, which indicates that you"
330 echo "don't have SDL (properly) installed. Please correct and"
331 echo "re-run configure!"
334 # generic sdl-config checker
335 GCCOPTS
="$GCCOPTS `$sdl --cflags`"
336 LDOPTS
="$LDOPTS `$sdl --libs`"
341 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
342 # x86_64 supports MMX by default
344 if [ "$endian" = "" ]; then
346 cat >$tmpdir/conftest-
$id.c
<<EOF
348 int main(int argc, char **argv)
351 char *varp = (char *)&var;
358 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
359 # when cross compiling, the endianess cannot be detected because the above program doesn't run
360 # on the local machine. assume little endian but print a warning
361 endian
=`$tmpdir/conftest-$id 2> /dev/null`
362 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
371 if [ "$CROSS_COMPILE" != "" ]; then
372 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
375 if [ "$app_type" = "sdl-sim" ]; then
376 echo "Simulator environment deemed $endian endian"
377 elif [ "$app_type" = "sdl-app" ]; then
378 echo "Application environment deemed $endian endian"
379 elif [ "$app_type" = "checkwps" ]; then
380 echo "CheckWPS environment deemed $endian endian"
383 # use wildcard here to make it work even if it was named *.exe like
385 rm -f $tmpdir/conftest-
$id*
388 if [ -z "$ARG_THREAD_SUPPORT" ] ||
[ "$ARG_THREAD_SUPPORT" = "0" ]; then
389 if [ "$sigaltstack" = "0" ]; then
390 thread_support
="HAVE_SIGALTSTACK_THREADS"
391 LDOPTS
="$LDOPTS -lpthread" # pthread needed
392 echo "Selected sigaltstack threads"
393 elif [ "$fibers" = "0" ]; then
394 thread_support
="HAVE_WIN32_FIBER_THREADS"
395 echo "Selected Win32 Fiber threads"
399 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
400 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
401 thread_support
="HAVE_SDL_THREADS"
402 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
403 echo "Selected SDL threads"
405 echo "WARNING: Falling back to SDL threads"
411 # functions for setting up cross-compiler names and options
412 # also set endianess and what the exact recommended gcc version is
413 # the gcc version should most likely match what versions we build with
418 GCCOPTS
="$CCOPTS -m1"
419 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
425 prefixtools calmrisc16-unknown-elf-
426 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
427 GCCOPTIMIZE
="-fomit-frame-pointer"
432 prefixtools m68k-elf-
433 GCCOPTS
="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
434 GCCOPTIMIZE
="-fomit-frame-pointer"
441 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
442 GCCOPTIMIZE
="-fomit-frame-pointer"
448 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
449 GCCOPTIMIZE
="-fomit-frame-pointer"
455 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
456 GCCOPTIMIZE
="-fomit-frame-pointer"
462 GCCOPTS
="$CCOPTS -mcpu=arm940t"
463 GCCOPTIMIZE
="-fomit-frame-pointer"
469 GCCOPTS
="$CCOPTS -mcpu=arm9e"
470 GCCOPTIMIZE
="-fomit-frame-pointer"
476 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
477 GCCOPTIMIZE
="-fomit-frame-pointer"
483 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
484 GCCOPTIMIZE
="-fomit-frame-pointer"
490 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
491 GCCOPTIMIZE
="-fomit-frame-pointer"
497 GCCOPTS
="$CCOPTS -march=armv5te"
498 GCCOPTIMIZE
="-fomit-frame-pointer"
504 arch_version
=32 # FIXME: autodetect version (32 or 64)
505 prefixtools mipsel-elf-
506 # mips is predefined, but we want it for paths. use __mips instead
507 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
508 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
509 GCCOPTIMIZE
="-fomit-frame-pointer"
515 # Scratchbox sets up "gcc" based on the active target
518 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
519 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
521 LDOPTS
="-lm -ldl $LDOPTS"
522 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
523 SHARED_LDFLAG
="-shared"
526 thread_support
="HAVE_SIGALTSTACK_THREADS"
529 # Determine maemo version
530 if pkg-config
--atleast-version=5 maemo-version
; then
531 if [ "$1" == "4" ]; then
532 echo "ERROR: Maemo 4 SDK required."
535 extradefines
="$extradefines -DMAEMO5"
536 echo "Found N900 maemo version"
538 elif pkg-config
--atleast-version=4 maemo-version
; then
539 if [ "$1" == "5" ]; then
540 echo "ERROR: Maemo 5 SDK required."
543 extradefines
="$extradefines -DMAEMO4"
544 echo "Found N8xx maemo version"
546 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
551 if [ $is_n900 -eq 1 ]; then
552 GCCOPTS
="$GCCOPTS `pkg-config --cflags sdl`"
553 LDOPTS
="$LDOPTS `pkg-config --libs sdl`"
555 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
556 LDOPTS
="$LDOPTS `sdl-config --libs`"
559 # glib and libosso support
560 GCCOPTS
="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
561 LDOPTS
="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
563 # libhal support: Battery monitoring
564 GCCOPTS
="$GCCOPTS `pkg-config --cflags hal`"
565 LDOPTS
="$LDOPTS `pkg-config --libs hal`"
567 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
568 if [ $is_n900 -eq 1 ]; then
569 # gstreamer support: Audio output.
570 GCCOPTS
="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
571 LDOPTS
="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
573 # N900 specific: libplayback support
574 GCCOPTS
="$GCCOPTS `pkg-config --cflags libplayback-1`"
575 LDOPTS
="$LDOPTS `pkg-config --libs libplayback-1`"
577 # N900 specific: Enable ARMv7 NEON support
578 if sb-conf show
-A |
grep -q -i arm
; then
579 echo "Detected ARM target"
580 GCCOPTS
="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
581 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
583 echo "Detected x86 target"
586 # N8xx specific: Enable armv5te instructions
587 if sb-conf show
-A |
grep -q -i arm
; then
588 echo "Detected ARM target"
589 GCCOPTS
="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
590 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
592 echo "Detected x86 target"
598 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
599 # You have to use the sebt3 toolchain:
600 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
602 PNDSDK
="/usr/local/angstrom/arm"
603 if [ ! -x $PNDSDK/bin
/arm-angstrom-linux-gnueabi-gcc
]; then
604 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
608 PATH
=$PNDSDK/bin
:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/bin
609 PKG_CONFIG_PATH
=$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/lib
/pkgconfig
610 LDOPTS
="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
611 PKG_CONFIG
="pkg-config"
613 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
614 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
616 LDOPTS
="-lm -ldl $LDOPTS"
617 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
618 SHARED_LDFLAG
="-shared"
621 thread_support
="HAVE_SIGALTSTACK_THREADS"
624 GCCOPTS
="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
628 prefixtools
"$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
631 GCCOPTS
="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
632 LDOPTS
="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
635 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
636 GCCOPTS
="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
637 GCCOPTS
="$GCCOPTS -ffast-math -fsingle-precision-constant"
642 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
644 LDOPTS
="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
645 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
646 SHARED_LDFLAG
="-shared"
652 GCCOPTS
="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
656 prefixtools
"arm-ypr0-linux-gnueabi-"
660 if [ -z "$ANDROID_SDK_PATH" ]; then
661 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
662 echo "environment variable point to the root directory of the Android SDK."
665 if [ -z "$ANDROID_NDK_PATH" ]; then
666 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
667 echo "environment variable point to the root directory of the Android NDK."
670 buildhost
=$
(uname |
tr "[:upper:]" "[:lower:]")
672 gcctarget
="arm-linux-androideabi-"
673 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
674 PATH
=$PATH:$gccprefix/bin
675 prefixtools
$gcctarget
676 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
677 GCCOPTS
="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
678 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
679 GLOBAL_LDOPTS
="-Wl,-z,defs -Wl,-z,noexecstack"
680 LDOPTS
="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
682 SHARED_LDFLAG
="-shared"
687 if [ -z "$ANDROID_SDK_PATH" ]; then
688 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
689 echo "environment variable point to the root directory of the Android SDK."
692 if [ -z "$ANDROID_NDK_PATH" ]; then
693 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
694 echo "environment variable point to the root directory of the Android NDK."
697 buildhost
=$
(uname |
tr "[:upper:]" "[:lower:]")
699 gcctarget
="mipsel-linux-android-"
700 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
701 arch_version
=32 # FIXME: autodetect version (32 or 64)
702 thread_support
="HAVE_SIGALTSTACK_THREADS"
703 PATH
=$PATH:$gccprefix/bin
704 prefixtools
$gcctarget
705 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
706 GCCOPTS
="$GCCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -fomit-frame-pointer \
707 --sysroot=$ANDROID_NDK_PATH/platforms/android-14/arch-mips -fPIC"
708 GLOBAL_LDOPTS
="-Wl,-z,defs -Wl,-z,noexecstack"
709 LDOPTS
="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-14/arch-mips $LDOPTS"
711 SHARED_LDFLAG
="-shared"
716 atype
=`echo "$1" | cut -c 2-`
717 ##################################################################
718 # Prompt for specific developer options
720 if [ "$atype" ]; then
725 printf "Enter your developer options (press only enter when done)\n\
726 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
727 (T)est plugins, S(m)all C lib, Logf to Ser(i)al port:"
728 if [ "$modelname" = "archosplayer" ]; then
729 printf ", Use (A)TA poweroff"
731 if [ "$t_model" = "ondio" ]; then
732 printf ", (B)acklight MOD"
734 if [ "$modelname" = "iaudiom5" ]; then
735 printf ", (F)M radio MOD"
737 if [ "$modelname" = "iriverh120" ]; then
744 while [ $cont = "1" ]; do
746 if [ "$interact" ]; then
749 option
=`echo "$atype" | cut -c 1`
754 if [ "yes" = "$profile" ]; then
755 echo "Debug is incompatible with profiling"
757 echo "DEBUG build enabled"
762 echo "logf() support enabled"
766 echo "Using Rockbox' small C library"
767 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
770 echo "Including test plugins"
771 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
774 echo "bootchart enabled (logf also enabled)"
779 echo "Logf to serial port enabled (logf also enabled)"
784 echo "Simulator build enabled"
788 if [ "yes" = "$use_debug" ]; then
789 echo "Profiling is incompatible with debug"
791 echo "Profiling support is enabled"
796 echo "Voice build selected"
800 if [ "$modelname" = "archosplayer" ]; then
801 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
802 echo "ATA power off enabled"
806 if [ "$t_model" = "ondio" ]; then
807 have_backlight
="#define HAVE_BACKLIGHT"
808 echo "Backlight functions enabled"
812 if [ "$modelname" = "iaudiom5" ]; then
813 have_fmradio_in
="#define HAVE_FMRADIO_IN"
814 echo "FM radio functions enabled"
818 if [ "$modelname" = "iriverh120" ]; then
819 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
820 have_rtc_alarm
="#define HAVE_RTC_ALARM"
821 echo "RTC functions enabled (DS1339/DS3231)"
825 echo "Enabling Windows 32 cross-compiling"
826 win32crosscompile
="yes"
828 "") # Match enter press when finished with advanced options
832 echo "[ERROR] Option $option unsupported"
835 if [ "$interact" ]; then
836 btype
="$btype$option"
838 atype
=`echo "$atype" | cut -c 2-`
839 [ "$atype" ] || cont
=0
844 if [ "yes" = "$voice" ]; then
845 # Ask about languages to build
847 voicelanguage
=`whichlang`
848 echo "Voice language set to $voicelanguage"
850 # Configure encoder and TTS engine for each language
851 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
852 voiceconfig
"$thislang"
855 if [ "yes" = "$use_debug" ]; then
857 GCCOPTS
="$GCCOPTS -g -DDEBUG"
859 if [ "yes" = "$logf" ]; then
860 use_logf
="#define ROCKBOX_HAS_LOGF 1"
862 if [ "yes" = "$logf_serial" ]; then
863 use_logf_serial
="#define LOGF_SERIAL 1"
865 if [ "yes" = "$bootchart" ]; then
866 use_bootchart
="#define DO_BOOTCHART 1"
868 if [ "yes" = "$simulator" ]; then
870 extradefines
="$extradefines -DSIMULATOR"
874 if [ "yes" = "$profile" ]; then
875 extradefines
="$extradefines -DRB_PROFILE"
876 PROFILE_OPTS
="-finstrument-functions"
880 # Configure voice settings
883 if [ ! "$ARG_TTS" ]; then
884 echo "Building $thislang voice for $modelname. Select options"
888 if [ -n "`findtool flite`" ]; then
892 DEFAULT_TTS_OPTS
=$FLITE_OPTS
893 DEFAULT_NOISEFLOOR
="500"
896 if [ -n "`findtool espeak`" ]; then
900 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
901 DEFAULT_NOISEFLOOR
="500"
904 if [ -n "`findtool festival`" ]; then
905 FESTIVAL
="(F)estival "
908 FESTIVAL_OPTS
="--language italian"
911 FESTIVAL_OPTS
="--language spanish"
914 FESTIVAL_OPTS
="--language finnish"
917 FESTIVAL_OPTS
="--language czech"
923 DEFAULT_TTS
="festival"
924 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
925 DEFAULT_NOISEFLOOR
="500"
928 if [ -n "`findtool swift`" ]; then
932 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
933 DEFAULT_NOISEFLOOR
="500"
936 # Allow SAPI if Windows is in use
937 if [ -n "`findtool winver`" ]; then
941 DEFAULT_TTS_OPTS
=$SAPI_OPTS
942 DEFAULT_NOISEFLOOR
="500"
946 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
947 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
951 if [ "$ARG_TTS" ]; then
954 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
956 if [ -z "$option" ]; then option
=${DEFAULT_CHOICE}; fi
957 advopts
="$advopts --tts=$option"
962 NOISEFLOOR
="500" # TODO: check this value
968 TTS_OPTS
=$ESPEAK_OPTS
971 TTS_ENGINE
="festival"
973 TTS_OPTS
=$FESTIVAL_OPTS
986 TTS_ENGINE
=$DEFAULT_TTS
987 TTS_OPTS
=$DEFAULT_TTS_OPTS
988 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
990 echo "Using $TTS_ENGINE for TTS"
992 # Select which voice to use for Festival
993 if [ "$TTS_ENGINE" = "festival" ]; then
994 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
995 for voice
in $voicelist; do
996 TTS_FESTIVAL_VOICE
="$voice" # Default choice
999 if [ "$ARG_VOICE" ]; then
1003 for voice
in $voicelist; do
1004 printf "%3d. %s\n" "$i" "$voice"
1007 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
1011 for voice
in $voicelist; do
1012 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
1013 TTS_FESTIVAL_VOICE
="$voice"
1017 advopts
="$advopts --voice=$CHOICE"
1018 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1019 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1022 # Read custom tts options from command line
1023 if [ "$ARG_TTSOPTS" ]; then
1024 TTS_OPTS
="$ARG_TTSOPTS"
1025 echo "$TTS_ENGINE options set to $TTS_OPTS"
1028 if [ "$swcodec" = "yes" ]; then
1029 ENCODER
="rbspeexenc"
1030 ENC_OPTS
="-q 4 -c 10"
1032 if [ -n "`findtool lame`" ]; then
1034 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1036 echo "You need LAME in the system path to build voice files for"
1037 echo "HWCODEC targets."
1042 echo "Using $ENCODER for encoding voice clips"
1044 # Read custom encoder options from command line
1045 if [ "$ARG_ENCOPTS" ]; then
1046 ENC_OPTS
="$ARG_ENCOPTS"
1047 echo "$ENCODER options set to $ENC_OPTS"
1051 if [ -n "`findtool cygpath`" ]; then
1052 TEMPDIR
=`cygpath . -a -w`
1057 # figure out which languages that are around
1058 for file in $rootdir/apps
/lang
/*.lang
; do
1059 clean
=`basename $file .lang`
1060 langs
="$langs $clean"
1063 if [ "$ARG_LANG" ]; then
1066 echo "Select a number for the language to use (default is english)"
1067 # FIXME The multiple-language feature is currently broken
1068 # echo "You may enter a comma-separated list of languages to build"
1071 for one
in $langs; do
1076 advopts
="$advopts --language=$pick"
1082 # Allow the user to pass a comma-separated list of langauges
1083 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1085 for one
in $langs; do
1086 # Accept both the language number and name
1087 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1088 if [ "$output" = "" ]; then
1097 if [ -z "$output" ]; then
1105 echo "Rockbox configure script."
1106 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1107 echo "Do *NOT* run this within the tools directory!"
1110 Usage: configure [OPTION]...
1112 --target=TARGET Sets the target, TARGET can be either the target ID or
1113 corresponding string. Run without this option to see all
1116 --ram=RAM Sets the RAM for certain targets. Even though any number
1117 is accepted, not every number is correct. The default
1118 value will be applied, if you entered a wrong number
1119 (which depends on the target). Watch the output. Run
1120 without this option if you are not sure which the right
1123 --type=TYPE Sets the build type. Shortcuts are also valid.
1124 Run without this option to see all available types.
1125 Multiple values are allowed and managed in the input
1126 order. So --type=b stands for Bootloader build, while
1127 --type=ab stands for "Backlight MOD" build.
1129 --lcdwidth=X Sets the width of the LCD. Used only for application
1132 --lcdheight=Y Sets the height of the LCD. Used only for application
1135 --language=LANG Set the language used for voice generation (used only if
1138 --tts=ENGINE Set the TTS engine used for voice generation (used only
1141 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1144 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1146 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1148 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1149 This is useful for having multiple alternate builds on
1150 your device that you can load with ROLO. However as the
1151 bootloader looks for .rockbox you won't be able to boot
1154 --ccache Enable ccache use (done by default these days)
1155 --no-ccache Disable ccache use
1157 --thumb Build with -mthumb (for ARM builds)
1158 --no-thumb The opposite of --thumb (don't use thumb even for targets
1159 where this is the default
1160 --sdl-threads Force use of SDL threads. They have inferior performance,
1161 but are better debuggable with GDB
1162 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1163 behavior of falling back to them if no native thread
1165 --prefix Target installation directory
1166 --help Shows this message (must not be used with other options)
1184 ARG_PREFIX
="$PREFIX"
1189 --ccache) ARG_CCACHE
=1;;
1190 --no-ccache) ARG_CCACHE
=0;;
1191 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1192 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1193 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1194 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1195 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1196 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1197 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1198 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1199 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1200 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1201 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1202 --thumb) ARG_ARM_THUMB
=1;;
1203 --no-thumb) ARG_ARM_THUMB
=0;;
1204 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1206 ARG_THREAD_SUPPORT
=0;;
1207 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1209 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1212 [ "$err" ] && exit 1
1216 if [ "$TMPDIR" != "" ]; then
1221 echo Using temporary directory
$tmpdir
1223 if test -r "configure"; then
1224 # this is a check for a configure script in the current directory, it there
1225 # is one, try to figure out if it is this one!
1227 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1228 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1229 echo "It will only cause you pain and grief. Instead do this:"
1232 echo " mkdir build-dir"
1233 echo " cd build-dir"
1234 echo " ../tools/configure"
1236 echo "Much happiness will arise from this. Enjoy"
1241 # get our current directory
1244 if { echo $pwd |
grep " "; } then
1245 echo "You're running this script in a path that contains space. The build"
1246 echo "system is unfortunately not clever enough to deal with this. Please"
1247 echo "run the script from a different path, rename the path or fix the build"
1252 if [ -z "$rootdir" ]; then
1253 ##################################################################
1254 # Figure out where the source code root is!
1256 rootdir
=`dirname $0`/..
/
1258 #####################################################################
1259 # Convert the possibly relative directory name to an absolute version
1265 # cd back to the build dir
1270 appsdir
='$(ROOTDIR)/apps'
1271 toolsdir
='$(ROOTDIR)/tools'
1274 ##################################################################
1275 # Figure out target platform
1278 if [ "$ARG_TARGET" ]; then
1279 buildfor
=$ARG_TARGET
1281 echo "Enter target platform:"
1283 ==Archos== ==iriver== ==Apple iPod==
1284 0) Player/Studio 10) H120/H140 20) Color/Photo
1285 1) Recorder 11) H320/H340 21) Nano 1G
1286 2) FM Recorder 12) iHP-100/110/115 22) Video
1287 3) Recorder v2 13) iFP-790 23) 3G
1288 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1289 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1290 6) AV300 26) Mini 2G
1291 ==Toshiba== 27) 1G, 2G
1292 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1293 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1295 32) 7 ==Olympus= ==SanDisk==
1296 33) D2 70) M:Robe 500 50) Sansa e200
1297 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1299 ==Creative== ==Philips== 53) Sansa m200
1300 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1301 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1302 92) Zen Vision HDD1830 56) Sansa e200v2
1303 93) Zen X-Fi2 102) GoGear HDD6330 57) Sansa m200v4
1304 94) Zen X-Fi3 58) Sansa Fuze
1305 ==Meizu== 59) Sansa c200v2
1306 ==Onda== 110) M6SL 60) Sansa Clipv2
1307 120) VX747 111) M6SP 61) Sansa View
1308 121) VX767 112) M3 62) Sansa Clip+
1309 122) VX747+ 63) Sansa Fuze v2
1310 123) VX777 ==Tatung== 64) Sansa Fuze+
1311 150) Elio TPJ-1022 65) Sansa Clip Zip
1312 ==Samsung== 66) Sansa Connect
1313 140) YH-820 ==Packard Bell==
1314 141) YH-920 160) Vibe 500 ==Logik==
1315 142) YH-925 80) DAX 1GB MP3/DAB
1317 170) HD200 ==Lyre project==
1318 ==Application== 171) HD300 130) Lyre proto 1
1319 200) SDL 131) Mini2440
1320 201) Android ==ROCKCHIP==
1321 202) Nokia N8xx 180) rk27xx generic ==HiFiMAN==
1322 203) Nokia N900 190) HM-60x
1323 204) Pandora 191) HM-801
1331 # Set of tools built for all target platforms:
1332 toolset
="rdf2binary convbdf codepages"
1334 # Toolsets for some target families:
1335 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1336 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1337 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1338 ipodbitmaptools
="$toolset scramble bmp2rb"
1339 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1340 tccbitmaptools
="$toolset scramble bmp2rb"
1341 # generic is used by IFP, Meizu and Onda
1342 genericbitmaptools
="$toolset bmp2rb"
1343 # scramble is used by all other targets
1344 scramblebitmaptools
="$genericbitmaptools scramble"
1347 # ---- For each target ----
1350 # target_id: a unique number identifying this target, IS NOT the menu number.
1351 # Just use the currently highest number+1 when you add a new
1353 # modelname: short model name used all over to identify this target
1354 # memory: number of megabytes of RAM this target has. If the amount can
1355 # be selected by the size prompt, let memory be unset here
1356 # target: -Ddefine passed to the build commands to make the correct
1357 # config-*.h file get included etc
1358 # tool: the tool that takes a plain binary and converts that into a
1359 # working "firmware" file for your target
1360 # output: the final output file name
1361 # boottool: the tool that takes a plain binary and generates a bootloader
1362 # file for your target (or blank to use $tool)
1363 # bootoutput:the final output file name for the bootloader (or blank to use
1365 # appextra: passed to the APPEXTRA variable in the Makefiles.
1366 # TODO: add proper explanation
1367 # archosrom: used only for Archos targets that build a special flashable .ucl
1369 # flash: name of output for flashing, for targets where there's a special
1370 # file output for this.
1371 # plugins: set to 'yes' to build the plugins. Early development builds can
1372 # set this to no in the early stages to have an easier life for a
1374 # swcodec: set 'yes' on swcodec targets
1375 # toolset: lists what particular tools in the tools/ directory that this
1376 # target needs to have built prior to building Rockbox
1379 # *cc: sets up gcc and compiler options for your target builds. Note
1380 # that if you select a simulator build, the compiler selection is
1381 # overridden later in the script.
1387 modelname
="archosplayer"
1388 target
="ARCHOS_PLAYER"
1390 tool
="$rootdir/tools/scramble"
1392 appextra
="player:gui"
1393 archosrom
="$pwd/rombox.ucl"
1394 flash
="$pwd/rockbox.ucl"
1398 # toolset is the tools within the tools directory that we build for
1399 # this particular target.
1400 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1402 # Note: the convbdf is present in the toolset just because: 1) the
1403 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1404 # build the player simulator
1407 t_manufacturer
="archos"
1413 modelname
="archosrecorder"
1414 target
="ARCHOS_RECORDER"
1416 tool
="$rootdir/tools/scramble"
1417 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1418 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1420 appextra
="recorder:gui:radio"
1421 #archosrom="$pwd/rombox.ucl"
1422 flash
="$pwd/rockbox.ucl"
1425 # toolset is the tools within the tools directory that we build for
1426 # this particular target.
1427 toolset
=$archosbitmaptools
1429 t_manufacturer
="archos"
1435 modelname
="archosfmrecorder"
1436 target
="ARCHOS_FMRECORDER"
1438 tool
="$rootdir/tools/scramble -fm"
1439 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1440 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1442 appextra
="recorder:gui:radio"
1443 #archosrom="$pwd/rombox.ucl"
1444 flash
="$pwd/rockbox.ucl"
1447 # toolset is the tools within the tools directory that we build for
1448 # this particular target.
1449 toolset
=$archosbitmaptools
1451 t_manufacturer
="archos"
1457 modelname
="archosrecorderv2"
1458 target
="ARCHOS_RECORDERV2"
1460 tool
="$rootdir/tools/scramble -v2"
1461 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1462 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1464 appextra
="recorder:gui:radio"
1465 #archosrom="$pwd/rombox.ucl"
1466 flash
="$pwd/rockbox.ucl"
1469 # toolset is the tools within the tools directory that we build for
1470 # this particular target.
1471 toolset
=$archosbitmaptools
1473 t_manufacturer
="archos"
1479 modelname
="archosondiosp"
1480 target
="ARCHOS_ONDIOSP"
1482 tool
="$rootdir/tools/scramble -osp"
1483 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1484 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1486 appextra
="recorder:gui:radio"
1487 #archosrom="$pwd/rombox.ucl"
1488 flash
="$pwd/rockbox.ucl"
1491 # toolset is the tools within the tools directory that we build for
1492 # this particular target.
1493 toolset
=$archosbitmaptools
1495 t_manufacturer
="archos"
1501 modelname
="archosondiofm"
1502 target
="ARCHOS_ONDIOFM"
1504 tool
="$rootdir/tools/scramble -ofm"
1505 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1506 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1508 appextra
="recorder:gui:radio"
1509 #archosrom="$pwd/rombox.ucl"
1510 flash
="$pwd/rockbox.ucl"
1513 toolset
=$archosbitmaptools
1515 t_manufacturer
="archos"
1521 modelname
="archosav300"
1522 target
="ARCHOS_AV300"
1525 tool
="$rootdir/tools/scramble -mm=C"
1526 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1527 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1529 appextra
="recorder:gui:radio"
1532 # toolset is the tools within the tools directory that we build for
1533 # this particular target.
1534 toolset
="$toolset scramble descramble bmp2rb"
1535 # architecture, manufacturer and model for the target-tree build
1537 t_manufacturer
="archos"
1543 modelname
="iriverh120"
1544 target
="IRIVER_H120"
1547 tool
="$rootdir/tools/scramble -add=h120"
1548 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1549 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1550 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1551 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1552 output
="rockbox.iriver"
1553 bootoutput
="bootloader.iriver"
1554 appextra
="recorder:gui:radio"
1555 flash
="$pwd/rombox.iriver"
1558 # toolset is the tools within the tools directory that we build for
1559 # this particular target.
1560 toolset
=$iriverbitmaptools
1562 t_manufacturer
="iriver"
1568 modelname
="iriverh300"
1569 target
="IRIVER_H300"
1572 tool
="$rootdir/tools/scramble -add=h300"
1573 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1574 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1575 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1576 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1577 output
="rockbox.iriver"
1578 appextra
="recorder:gui:radio"
1581 # toolset is the tools within the tools directory that we build for
1582 # this particular target.
1583 toolset
=$iriverbitmaptools
1585 t_manufacturer
="iriver"
1591 modelname
="iriverh100"
1592 target
="IRIVER_H100"
1595 tool
="$rootdir/tools/scramble -add=h100"
1596 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1597 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1598 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1599 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1600 output
="rockbox.iriver"
1601 bootoutput
="bootloader.iriver"
1602 appextra
="recorder:gui:radio"
1603 flash
="$pwd/rombox.iriver"
1606 # toolset is the tools within the tools directory that we build for
1607 # this particular target.
1608 toolset
=$iriverbitmaptools
1610 t_manufacturer
="iriver"
1616 modelname
="iriverifp7xx"
1617 target
="IRIVER_IFP7XX"
1621 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1622 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1623 output
="rockbox.wma"
1624 appextra
="recorder:gui:radio"
1627 # toolset is the tools within the tools directory that we build for
1628 # this particular target.
1629 toolset
=$genericbitmaptools
1631 t_manufacturer
="pnx0101"
1632 t_model
="iriver-ifp7xx"
1637 modelname
="iriverh10"
1641 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1642 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1643 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1644 output
="rockbox.mi4"
1645 appextra
="recorder:gui:radio"
1648 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1649 bootoutput
="H10_20GC.mi4"
1650 # toolset is the tools within the tools directory that we build for
1651 # this particular target.
1652 toolset
=$scramblebitmaptools
1653 # architecture, manufacturer and model for the target-tree build
1656 t_manufacturer
="iriver"
1662 modelname
="iriverh10_5gb"
1663 target
="IRIVER_H10_5GB"
1666 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1667 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1668 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1669 output
="rockbox.mi4"
1670 appextra
="recorder:gui:radio"
1673 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1674 bootoutput
="H10.mi4"
1675 # toolset is the tools within the tools directory that we build for
1676 # this particular target.
1677 toolset
=$scramblebitmaptools
1678 # architecture, manufacturer and model for the target-tree build
1681 t_manufacturer
="iriver"
1687 modelname
="ipodcolor"
1691 tool
="$rootdir/tools/scramble -add=ipco"
1692 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1693 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1694 output
="rockbox.ipod"
1695 appextra
="recorder:gui:radio"
1698 bootoutput
="bootloader-$modelname.ipod"
1699 # toolset is the tools within the tools directory that we build for
1700 # this particular target.
1701 toolset
=$ipodbitmaptools
1702 # architecture, manufacturer and model for the target-tree build
1705 t_manufacturer
="ipod"
1711 modelname
="ipodnano1g"
1715 tool
="$rootdir/tools/scramble -add=nano"
1716 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1717 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1718 output
="rockbox.ipod"
1719 appextra
="recorder:gui:radio"
1722 bootoutput
="bootloader-$modelname.ipod"
1723 # toolset is the tools within the tools directory that we build for
1724 # this particular target.
1725 toolset
=$ipodbitmaptools
1726 # architecture, manufacturer and model for the target-tree build
1729 t_manufacturer
="ipod"
1735 modelname
="ipodvideo"
1737 memory
=64 # always. This is reduced at runtime if needed
1739 tool
="$rootdir/tools/scramble -add=ipvd"
1740 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1741 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1742 output
="rockbox.ipod"
1743 appextra
="recorder:gui:radio"
1746 bootoutput
="bootloader-$modelname.ipod"
1747 # toolset is the tools within the tools directory that we build for
1748 # this particular target.
1749 toolset
=$ipodbitmaptools
1750 # architecture, manufacturer and model for the target-tree build
1753 t_manufacturer
="ipod"
1763 tool
="$rootdir/tools/scramble -add=ip3g"
1764 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1765 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1766 output
="rockbox.ipod"
1767 appextra
="recorder:gui:radio"
1770 bootoutput
="bootloader-$modelname.ipod"
1771 # toolset is the tools within the tools directory that we build for
1772 # this particular target.
1773 toolset
=$ipodbitmaptools
1774 # architecture, manufacturer and model for the target-tree build
1777 t_manufacturer
="ipod"
1787 tool
="$rootdir/tools/scramble -add=ip4g"
1788 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1789 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1790 output
="rockbox.ipod"
1791 appextra
="recorder:gui:radio"
1794 bootoutput
="bootloader-$modelname.ipod"
1795 # toolset is the tools within the tools directory that we build for
1796 # this particular target.
1797 toolset
=$ipodbitmaptools
1798 # architecture, manufacturer and model for the target-tree build
1801 t_manufacturer
="ipod"
1807 modelname
="ipodmini1g"
1811 tool
="$rootdir/tools/scramble -add=mini"
1812 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1813 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1814 output
="rockbox.ipod"
1815 appextra
="recorder:gui:radio"
1818 bootoutput
="bootloader-$modelname.ipod"
1819 # toolset is the tools within the tools directory that we build for
1820 # this particular target.
1821 toolset
=$ipodbitmaptools
1822 # architecture, manufacturer and model for the target-tree build
1825 t_manufacturer
="ipod"
1831 modelname
="ipodmini2g"
1832 target
="IPOD_MINI2G"
1835 tool
="$rootdir/tools/scramble -add=mn2g"
1836 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1837 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1838 output
="rockbox.ipod"
1839 appextra
="recorder:gui:radio"
1842 bootoutput
="bootloader-$modelname.ipod"
1843 # toolset is the tools within the tools directory that we build for
1844 # this particular target.
1845 toolset
=$ipodbitmaptools
1846 # architecture, manufacturer and model for the target-tree build
1849 t_manufacturer
="ipod"
1855 modelname
="ipod1g2g"
1859 tool
="$rootdir/tools/scramble -add=1g2g"
1860 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1861 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1862 output
="rockbox.ipod"
1863 appextra
="recorder:gui:radio"
1866 bootoutput
="bootloader-$modelname.ipod"
1867 # toolset is the tools within the tools directory that we build for
1868 # this particular target.
1869 toolset
=$ipodbitmaptools
1870 # architecture, manufacturer and model for the target-tree build
1873 t_manufacturer
="ipod"
1879 modelname
="ipodnano2g"
1880 target
="IPOD_NANO2G"
1883 tool
="$rootdir/tools/scramble -add=nn2g"
1884 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1885 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1886 output
="rockbox.ipod"
1887 appextra
="recorder:gui:radio"
1890 bootoutput
="bootloader-$modelname.ipod"
1891 # toolset is the tools within the tools directory that we build for
1892 # this particular target.
1893 toolset
=$ipodbitmaptools
1894 # architecture, manufacturer and model for the target-tree build
1896 t_manufacturer
="s5l8700"
1897 t_model
="ipodnano2g"
1906 tool
="$rootdir/tools/scramble -add=ip6g"
1907 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1908 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1909 output
="rockbox.ipod"
1910 appextra
="recorder:gui:radio"
1913 bootoutput
="bootloader-$modelname.ipod"
1914 # toolset is the tools within the tools directory that we build for
1915 # this particular target.
1916 toolset
=$ipodbitmaptools
1917 # architecture, manufacturer and model for the target-tree build
1919 t_manufacturer
="s5l8702"
1925 modelname
="iaudiox5"
1929 tool
="$rootdir/tools/scramble -add=iax5"
1930 boottool
="$rootdir/tools/scramble -iaudiox5"
1931 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1932 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1933 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1934 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1935 output
="rockbox.iaudio"
1936 bootoutput
="x5_fw.bin"
1937 appextra
="recorder:gui:radio"
1940 # toolset is the tools within the tools directory that we build for
1941 # this particular target.
1942 toolset
="$iaudiobitmaptools"
1943 # architecture, manufacturer and model for the target-tree build
1945 t_manufacturer
="iaudio"
1951 modelname
="iaudiom5"
1955 tool
="$rootdir/tools/scramble -add=iam5"
1956 boottool
="$rootdir/tools/scramble -iaudiom5"
1957 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1958 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1959 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1960 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1961 output
="rockbox.iaudio"
1962 bootoutput
="m5_fw.bin"
1963 appextra
="recorder:gui:radio"
1966 # toolset is the tools within the tools directory that we build for
1967 # this particular target.
1968 toolset
="$iaudiobitmaptools"
1969 # architecture, manufacturer and model for the target-tree build
1971 t_manufacturer
="iaudio"
1981 tool
="$rootdir/tools/scramble -add=i7"
1982 boottool
="$rootdir/tools/scramble -tcc=crc"
1983 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1984 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1985 output
="rockbox.iaudio"
1986 appextra
="recorder:gui:radio"
1989 bootoutput
="I7_FW.BIN"
1990 # toolset is the tools within the tools directory that we build for
1991 # this particular target.
1992 toolset
="$tccbitmaptools"
1993 # architecture, manufacturer and model for the target-tree build
1995 t_manufacturer
="tcc77x"
2005 tool
="$rootdir/tools/scramble -add=d2"
2007 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2008 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2010 bootoutput
="bootloader-cowond2.bin"
2011 appextra
="recorder:gui:radio"
2014 toolset
="$tccbitmaptools"
2015 # architecture, manufacturer and model for the target-tree build
2017 t_manufacturer
="tcc780x"
2023 modelname
="iaudiom3"
2027 tool
="$rootdir/tools/scramble -add=iam3"
2028 boottool
="$rootdir/tools/scramble -iaudiom3"
2029 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2030 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2031 output
="rockbox.iaudio"
2032 bootoutput
="cowon_m3.bin"
2033 appextra
="recorder:gui:radio"
2036 # toolset is the tools within the tools directory that we build for
2037 # this particular target.
2038 toolset
="$iaudiobitmaptools"
2039 # architecture, manufacturer and model for the target-tree build
2041 t_manufacturer
="iaudio"
2047 modelname
="gigabeatfx"
2051 tool
="$rootdir/tools/scramble -add=giga"
2052 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2053 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2054 output
="rockbox.gigabeat"
2055 appextra
="recorder:gui:radio"
2058 toolset
=$gigabeatbitmaptools
2059 boottool
="$rootdir/tools/scramble -gigabeat"
2060 bootoutput
="FWIMG01.DAT"
2061 # architecture, manufacturer and model for the target-tree build
2063 t_manufacturer
="s3c2440"
2064 t_model
="gigabeat-fx"
2069 modelname
="gigabeats"
2073 tool
="$rootdir/tools/scramble -add=gigs"
2074 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2075 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2076 output
="rockbox.gigabeat"
2077 appextra
="recorder:gui:radio"
2080 toolset
="$gigabeatbitmaptools"
2081 boottool
="$rootdir/tools/scramble -gigabeats"
2083 # architecture, manufacturer and model for the target-tree build
2085 t_manufacturer
="imx31"
2086 t_model
="gigabeat-s"
2091 modelname
="mrobe500"
2095 tool
="$rootdir/tools/scramble -add=m500"
2096 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2097 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2098 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2099 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2100 output
="rockbox.mrobe500"
2101 appextra
="recorder:gui:radio"
2104 toolset
=$gigabeatbitmaptools
2106 bootoutput
="rockbox.mrboot"
2107 # architecture, manufacturer and model for the target-tree build
2109 t_manufacturer
="tms320dm320"
2115 modelname
="mrobe100"
2119 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2120 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2121 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2122 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2123 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2124 output
="rockbox.mi4"
2125 appextra
="recorder:gui:radio"
2128 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2129 bootoutput
="pp5020.mi4"
2130 # toolset is the tools within the tools directory that we build for
2131 # this particular target.
2132 toolset
=$scramblebitmaptools
2133 # architecture, manufacturer and model for the target-tree build
2136 t_manufacturer
="olympus"
2142 modelname
="logikdax"
2146 tool
="$rootdir/tools/scramble -add=ldax"
2147 boottool
="$rootdir/tools/scramble -tcc=crc"
2148 bootoutput
="player.rom"
2149 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2150 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2151 output
="rockbox.logik"
2152 appextra
="recorder:gui:radio"
2155 # toolset is the tools within the tools directory that we build for
2156 # this particular target.
2157 toolset
=$tccbitmaptools
2158 # architecture, manufacturer and model for the target-tree build
2160 t_manufacturer
="tcc77x"
2166 modelname
="zenvisionm30gb"
2167 target
="CREATIVE_ZVM"
2170 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2171 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2172 tool
="$rootdir/tools/scramble -creative=zvm"
2174 output
="rockbox.zvm"
2175 appextra
="recorder:gui:radio"
2178 toolset
=$ipodbitmaptools
2179 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2180 bootoutput
="rockbox.zvmboot"
2181 # architecture, manufacturer and model for the target-tree build
2183 t_manufacturer
="tms320dm320"
2184 t_model
="creative-zvm"
2189 modelname
="zenvisionm60gb"
2190 target
="CREATIVE_ZVM60GB"
2193 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2194 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2195 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2197 output
="rockbox.zvm60"
2198 appextra
="recorder:gui:radio"
2201 toolset
=$ipodbitmaptools
2202 boottool
="$rootdir/tools/scramble -creative=zvm60"
2203 bootoutput
="rockbox.zvm60boot"
2204 # architecture, manufacturer and model for the target-tree build
2206 t_manufacturer
="tms320dm320"
2207 t_model
="creative-zvm"
2212 modelname
="zenvision"
2213 target
="CREATIVE_ZV"
2216 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2217 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2218 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2221 appextra
="recorder:gui:radio"
2224 toolset
=$ipodbitmaptools
2225 boottool
="$rootdir/tools/scramble -creative=zenvision"
2226 bootoutput
="rockbox.zvboot"
2227 # architecture, manufacturer and model for the target-tree build
2229 t_manufacturer
="tms320dm320"
2230 t_model
="creative-zvm"
2235 modelname
="creativezenxfi2"
2236 target
="CREATIVE_ZENXFI2"
2238 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2239 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2240 tool
="$rootdir/tools/scramble -add=zxf2"
2241 output
="rockbox.creative"
2242 bootoutput
="bootloader-zenxfi2.creative"
2243 appextra
="gui:recorder:radio"
2246 toolset
=$scramblebitmaptools
2248 t_manufacturer
="imx233"
2249 t_model
="creative-zenxfi2"
2255 modelname
="creativezenxfi3"
2256 target
="CREATIVE_ZENXFI3"
2258 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2259 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2260 tool
="$rootdir/tools/scramble -add=zxf3"
2261 output
="rockbox.creative"
2262 bootoutput
="bootloader-zenxfi3.creative"
2263 appextra
="gui:recorder:radio"
2266 toolset
=$scramblebitmaptools
2268 t_manufacturer
="imx233"
2269 t_model
="creative-zenxfi3"
2275 modelname
="sansae200"
2277 memory
=32 # supposedly
2279 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2280 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2281 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2282 output
="rockbox.mi4"
2283 appextra
="recorder:gui:radio"
2286 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2287 bootoutput
="PP5022.mi4"
2288 # toolset is the tools within the tools directory that we build for
2289 # this particular target.
2290 toolset
=$scramblebitmaptools
2291 # architecture, manufacturer and model for the target-tree build
2294 t_manufacturer
="sandisk"
2295 t_model
="sansa-e200"
2299 # the e200R model is pretty much identical to the e200, it only has a
2300 # different option to the scramble tool when building a bootloader and
2301 # makes the bootloader output file name in all lower case.
2303 modelname
="sansae200r"
2305 memory
=32 # supposedly
2307 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2308 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2309 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2310 output
="rockbox.mi4"
2311 appextra
="recorder:gui:radio"
2314 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2315 bootoutput
="pp5022.mi4"
2316 # toolset is the tools within the tools directory that we build for
2317 # this particular target.
2318 toolset
=$scramblebitmaptools
2319 # architecture, manufacturer and model for the target-tree build
2322 t_manufacturer
="sandisk"
2323 t_model
="sansa-e200"
2328 modelname
="sansac200"
2330 memory
=32 # supposedly
2332 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2333 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2334 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2335 output
="rockbox.mi4"
2336 appextra
="recorder:gui:radio"
2339 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2340 bootoutput
="firmware.mi4"
2341 # toolset is the tools within the tools directory that we build for
2342 # this particular target.
2343 toolset
=$scramblebitmaptools
2344 # architecture, manufacturer and model for the target-tree build
2347 t_manufacturer
="sandisk"
2348 t_model
="sansa-c200"
2353 modelname
="sansam200"
2357 tool
="$rootdir/tools/scramble -add=m200"
2358 boottool
="$rootdir/tools/scramble -tcc=crc"
2359 bootoutput
="player.rom"
2360 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2361 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2362 output
="rockbox.m200"
2363 appextra
="recorder:gui:radio"
2366 # toolset is the tools within the tools directory that we build for
2367 # this particular target.
2368 toolset
=$tccbitmaptools
2369 # architecture, manufacturer and model for the target-tree build
2371 t_manufacturer
="tcc77x"
2377 modelname
="sansac100"
2381 tool
="$rootdir/tools/scramble -add=c100"
2382 boottool
="$rootdir/tools/scramble -tcc=crc"
2383 bootoutput
="player.rom"
2384 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2385 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2386 output
="rockbox.c100"
2387 appextra
="recorder:gui:radio"
2390 # toolset is the tools within the tools directory that we build for
2391 # this particular target.
2392 toolset
=$tccbitmaptools
2393 # architecture, manufacturer and model for the target-tree build
2395 t_manufacturer
="tcc77x"
2401 modelname
="sansaclip"
2404 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2405 bmp2rb_native
="$bmp2rb_mono"
2406 tool
="$rootdir/tools/scramble -add=clip"
2407 output
="rockbox.sansa"
2408 bootoutput
="bootloader-clip.sansa"
2409 appextra
="recorder:gui:radio"
2412 toolset
=$scramblebitmaptools
2414 t_manufacturer
="as3525"
2415 t_model
="sansa-clip"
2416 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2418 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2424 modelname
="sansae200v2"
2425 target
="SANSA_E200V2"
2427 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2428 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2429 tool
="$rootdir/tools/scramble -add=e2v2"
2430 output
="rockbox.sansa"
2431 bootoutput
="bootloader-e200v2.sansa"
2432 appextra
="recorder:gui:radio"
2435 toolset
=$scramblebitmaptools
2437 t_manufacturer
="as3525"
2438 t_model
="sansa-e200v2"
2445 modelname
="sansam200v4"
2446 target
="SANSA_M200V4"
2448 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2449 bmp2rb_native
="$bmp2rb_mono"
2450 tool
="$rootdir/tools/scramble -add=m2v4"
2451 output
="rockbox.sansa"
2452 bootoutput
="bootloader-m200v4.sansa"
2453 appextra
="recorder:gui:radio"
2456 toolset
=$scramblebitmaptools
2458 t_manufacturer
="as3525"
2459 t_model
="sansa-m200v4"
2460 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2462 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2468 modelname
="sansafuze"
2471 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2472 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2473 tool
="$rootdir/tools/scramble -add=fuze"
2474 output
="rockbox.sansa"
2475 bootoutput
="bootloader-fuze.sansa"
2476 appextra
="recorder:gui:radio"
2479 toolset
=$scramblebitmaptools
2481 t_manufacturer
="as3525"
2482 t_model
="sansa-fuze"
2489 modelname
="sansac200v2"
2490 target
="SANSA_C200V2"
2491 memory
=2 # as per OF diagnosis mode
2492 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2493 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2494 tool
="$rootdir/tools/scramble -add=c2v2"
2495 output
="rockbox.sansa"
2496 bootoutput
="bootloader-c200v2.sansa"
2497 appextra
="recorder:gui:radio"
2500 # toolset is the tools within the tools directory that we build for
2501 # this particular target.
2502 toolset
=$scramblebitmaptools
2503 # architecture, manufacturer and model for the target-tree build
2505 t_manufacturer
="as3525"
2506 t_model
="sansa-c200v2"
2507 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2509 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2514 modelname
="sansaclipv2"
2515 target
="SANSA_CLIPV2"
2517 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2518 bmp2rb_native
="$bmp2rb_mono"
2519 tool
="$rootdir/tools/scramble -add=clv2"
2520 output
="rockbox.sansa"
2521 bootoutput
="bootloader-clipv2.sansa"
2522 appextra
="recorder:gui:radio"
2525 toolset
=$scramblebitmaptools
2527 t_manufacturer
="as3525"
2528 t_model
="sansa-clipv2"
2533 echo "Sansa View is not yet supported!"
2536 modelname
="sansaview"
2540 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2541 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2542 output
="rockbox.mi4"
2546 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2547 bootoutput
="firmware.mi4"
2548 # toolset is the tools within the tools directory that we build for
2549 # this particular target.
2550 toolset
=$scramblebitmaptools
2553 t_manufacturer
="sandisk"
2554 t_model
="sansa-view"
2559 modelname
="sansaclipplus"
2560 target
="SANSA_CLIPPLUS"
2562 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2563 bmp2rb_native
="$bmp2rb_mono"
2564 tool
="$rootdir/tools/scramble -add=cli+"
2565 output
="rockbox.sansa"
2566 bootoutput
="bootloader-clipplus.sansa"
2567 appextra
="recorder:gui:radio"
2570 toolset
=$scramblebitmaptools
2572 t_manufacturer
="as3525"
2573 t_model
="sansa-clipplus"
2579 modelname
="sansafuzev2"
2580 target
="SANSA_FUZEV2"
2582 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2583 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2584 tool
="$rootdir/tools/scramble -add=fuz2"
2585 output
="rockbox.sansa"
2586 bootoutput
="bootloader-fuzev2.sansa"
2587 appextra
="recorder:gui:radio"
2590 toolset
=$scramblebitmaptools
2592 t_manufacturer
="as3525"
2593 t_model
="sansa-fuzev2"
2599 modelname
="sansafuzeplus"
2600 target
="SANSA_FUZEPLUS"
2602 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2603 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2604 tool
="$rootdir/tools/scramble -add=fuz+"
2605 output
="rockbox.sansa"
2606 bootoutput
="bootloader-fuzeplus.sansa"
2607 appextra
="gui:recorder:radio"
2610 toolset
=$scramblebitmaptools
2612 t_manufacturer
="imx233"
2613 t_model
="sansa-fuzeplus"
2619 modelname
="sansaclipzip"
2620 target
="SANSA_CLIPZIP"
2622 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2623 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2624 tool
="$rootdir/tools/scramble -add=clzp"
2625 output
="rockbox.sansa"
2626 bootoutput
="bootloader-clipzip.sansa"
2627 appextra
="recorder:gui:radio"
2630 toolset
=$scramblebitmaptools
2632 t_manufacturer
="as3525"
2633 t_model
="sansa-clipzip"
2639 modelname
="sansaconnect"
2640 target
="SANSA_CONNECT"
2642 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2643 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2644 tool
="$rootdir/tools/scramble -add=conn"
2645 output
="rockbox.sansa"
2646 bootoutput
="bootloader-connect.sansa"
2647 appextra
="recorder:gui"
2650 toolset
=$scramblebitmaptools
2652 t_manufacturer
="tms320dm320"
2653 t_model
="sansa-connect"
2659 modelname
="tatungtpj1022"
2660 target
="TATUNG_TPJ1022"
2663 tool
="$rootdir/tools/scramble -add tpj2"
2664 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2665 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2666 output
="rockbox.elio"
2667 appextra
="recorder:gui:radio"
2670 boottool
="$rootdir/tools/scramble -mi4v2"
2671 bootoutput
="pp5020.mi4"
2672 # toolset is the tools within the tools directory that we build for
2673 # this particular target.
2674 toolset
=$scramblebitmaptools
2675 # architecture, manufacturer and model for the target-tree build
2678 t_manufacturer
="tatung"
2684 modelname
="gogearsa9200"
2685 target
="PHILIPS_SA9200"
2686 memory
=32 # supposedly
2688 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2689 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2690 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2691 output
="rockbox.mi4"
2692 appextra
="recorder:gui:radio"
2695 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2696 bootoutput
="FWImage.ebn"
2697 # toolset is the tools within the tools directory that we build for
2698 # this particular target.
2699 toolset
=$scramblebitmaptools
2700 # architecture, manufacturer and model for the target-tree build
2703 t_manufacturer
="philips"
2709 modelname
="gogearhdd1630"
2710 target
="PHILIPS_HDD1630"
2711 memory
=32 # supposedly
2713 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2714 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2715 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2716 output
="rockbox.mi4"
2717 appextra
="recorder:gui:radio"
2720 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2721 bootoutput
="FWImage.ebn"
2722 # toolset is the tools within the tools directory that we build for
2723 # this particular target.
2724 toolset
=$scramblebitmaptools
2725 # architecture, manufacturer and model for the target-tree build
2728 t_manufacturer
="philips"
2734 modelname
="gogearhdd6330"
2735 target
="PHILIPS_HDD6330"
2738 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2739 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2740 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2741 output
="rockbox.mi4"
2742 appextra
="recorder:gui:radio"
2745 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2746 bootoutput
="FWImage.ebn"
2747 # toolset is the tools within the tools directory that we build for
2748 # this particular target.
2749 toolset
=$scramblebitmaptools
2750 # architecture, manufacturer and model for the target-tree build
2753 t_manufacturer
="philips"
2759 modelname
="meizum6sl"
2764 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2765 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2766 output
="rockbox.meizu"
2767 appextra
="recorder:gui:radio"
2770 toolset
=$genericbitmaptools
2772 bootoutput
="rockboot.ebn"
2773 # architecture, manufacturer and model for the target-tree build
2775 t_manufacturer
="s5l8700"
2776 t_model
="meizu-m6sl"
2781 modelname
="meizum6sp"
2786 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2787 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2788 output
="rockbox.meizu"
2789 appextra
="recorder:gui:radio"
2792 toolset
=$genericbitmaptools
2794 bootoutput
="rockboot.ebn"
2795 # architecture, manufacturer and model for the target-tree build
2797 t_manufacturer
="s5l8700"
2798 t_model
="meizu-m6sp"
2808 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2809 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2810 output
="rockbox.meizu"
2811 appextra
="recorder:gui:radio"
2814 toolset
=$genericbitmaptools
2816 bootoutput
="rockboot.ebn"
2817 # architecture, manufacturer and model for the target-tree build
2819 t_manufacturer
="s5l8700"
2825 modelname
="ondavx747"
2829 tool
="$rootdir/tools/scramble -add=x747"
2830 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2831 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2832 output
="rockbox.vx747"
2833 appextra
="recorder:gui:radio"
2836 toolset
=$genericbitmaptools
2837 boottool
="$rootdir/tools/scramble -ccpmp"
2838 bootoutput
="ccpmp.bin"
2839 # architecture, manufacturer and model for the target-tree build
2841 t_manufacturer
="ingenic_jz47xx"
2842 t_model
="onda_vx747"
2847 modelname
="ondavx767"
2852 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2853 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2854 output
="rockbox.vx767"
2855 appextra
="recorder:gui:radio"
2858 toolset
=$genericbitmaptools
2859 boottool
="$rootdir/tools/scramble -ccpmp"
2860 bootoutput
="ccpmp.bin"
2861 # architecture, manufacturer and model for the target-tree build
2863 t_manufacturer
="ingenic_jz47xx"
2864 t_model
="onda_vx767"
2869 modelname
="ondavx747p"
2870 target
="ONDA_VX747P"
2873 tool
="$rootdir/tools/scramble -add=747p"
2874 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2875 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2876 output
="rockbox.vx747p"
2877 appextra
="recorder:gui:radio"
2880 toolset
=$genericbitmaptools
2881 boottool
="$rootdir/tools/scramble -ccpmp"
2882 bootoutput
="ccpmp.bin"
2883 # architecture, manufacturer and model for the target-tree build
2885 t_manufacturer
="ingenic_jz47xx"
2886 t_model
="onda_vx747"
2891 modelname
="ondavx777"
2895 tool
="$rootdir/tools/scramble -add=x777"
2896 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2897 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2898 output
="rockbox.vx777"
2899 appextra
="recorder:gui:radio"
2902 toolset
=$genericbitmaptools
2903 boottool
="$rootdir/tools/scramble -ccpmp"
2904 bootoutput
="ccpmp.bin"
2905 # architecture, manufacturer and model for the target-tree build
2907 t_manufacturer
="ingenic_jz47xx"
2908 t_model
="onda_vx747"
2913 modelname
="lyreproto1"
2914 target
="LYRE_PROTO1"
2918 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2919 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2920 output
="rockbox.lyre"
2921 appextra
="recorder:gui:radio"
2924 toolset
=$scramblebitmaptools
2926 bootoutput
="bootloader-proto1.lyre"
2927 # architecture, manufacturer and model for the target-tree build
2929 t_manufacturer
="at91sam"
2930 t_model
="lyre_proto1"
2935 modelname
="mini2440"
2939 tool
="$rootdir/tools/scramble -add=m244"
2940 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2941 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2942 output
="rockbox.mini2440"
2943 appextra
="recorder:gui:radio"
2946 toolset
=$scramblebitmaptools
2948 bootoutput
="bootloader-mini2440.lyre"
2949 # architecture, manufacturer and model for the target-tree build
2951 t_manufacturer
="s3c2440"
2957 modelname
="samsungyh820"
2958 target
="SAMSUNG_YH820"
2961 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2962 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2963 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2964 output
="rockbox.mi4"
2965 appextra
="recorder:gui:radio"
2968 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2969 bootoutput
="FW_YH820.mi4"
2970 # toolset is the tools within the tools directory that we build for
2971 # this particular target.
2972 toolset
=$scramblebitmaptools
2973 # architecture, manufacturer and model for the target-tree build
2976 t_manufacturer
="samsung"
2982 modelname
="samsungyh920"
2983 target
="SAMSUNG_YH920"
2986 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2987 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2988 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2989 output
="rockbox.mi4"
2990 appextra
="recorder:gui:radio"
2993 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2994 bootoutput
="PP5020.mi4"
2995 # toolset is the tools within the tools directory that we build for
2996 # this particular target.
2997 toolset
=$scramblebitmaptools
2998 # architecture, manufacturer and model for the target-tree build
3001 t_manufacturer
="samsung"
3007 modelname
="samsungyh925"
3008 target
="SAMSUNG_YH925"
3011 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
3012 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3013 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3014 output
="rockbox.mi4"
3015 appextra
="recorder:gui:radio"
3018 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
3019 bootoutput
="FW_YH925.mi4"
3020 # toolset is the tools within the tools directory that we build for
3021 # this particular target.
3022 toolset
=$scramblebitmaptools
3023 # architecture, manufacturer and model for the target-tree build
3026 t_manufacturer
="samsung"
3032 modelname
="samsungyps3"
3033 target
="SAMSUNG_YPS3"
3037 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3038 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3039 output
="rockbox.yps3"
3040 appextra
="recorder:gui:radio"
3043 toolset
=$genericbitmaptools
3045 bootoutput
="rockboot.ebn"
3046 # architecture, manufacturer and model for the target-tree build
3048 t_manufacturer
="s5l8700"
3055 target
="PBELL_VIBE500"
3058 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
3059 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3060 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
3061 output
="rockbox.mi4"
3062 appextra
="recorder:gui:radio"
3065 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
3066 bootoutput
="jukebox.mi4"
3067 # toolset is the tools within the tools directory that we build for
3068 # this particular target.
3069 toolset
=$scramblebitmaptools
3070 # architecture, manufacturer and model for the target-tree build
3073 t_manufacturer
="pbell"
3079 modelname
="mpiohd200"
3083 tool
="$rootdir/tools/scramble -add=hd20"
3084 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3085 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
3086 output
="rockbox.mpio"
3087 bootoutput
="bootloader.mpio"
3088 appextra
="recorder:gui:radio"
3091 # toolset is the tools within the tools directory that we build for
3092 # this particular target.
3093 toolset
="$genericbitmaptools"
3094 # architecture, manufacturer and model for the target-tree build
3096 t_manufacturer
="mpio"
3102 modelname
="mpiohd300"
3106 tool
="$rootdir/tools/scramble -add=hd30"
3107 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3108 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
3109 output
="rockbox.mpio"
3110 bootoutput
="bootloader.mpio"
3111 appextra
="recorder:gui:radio"
3114 # toolset is the tools within the tools directory that we build for
3115 # this particular target.
3116 toolset
="$genericbitmaptools"
3117 # architecture, manufacturer and model for the target-tree build
3119 t_manufacturer
="mpio"
3125 modelname
="rk27generic"
3126 target
="RK27_GENERIC"
3129 tool
="$rootdir/tools/scramble -rkw -modelnum=73"
3130 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3131 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3132 output
="rockbox.rkw"
3133 bootoutput
="bootloader.rkw"
3134 appextra
="recorder:gui:radio"
3137 # toolset is the tools within the tools directory that we build for
3138 # this particular target.
3139 toolset
="$genericbitmaptools"
3140 # architecture, manufacturer and model for the target-tree build
3142 t_manufacturer
="rk27xx"
3143 t_model
="rk27generic"
3148 modelname
="hifimanhm60x"
3152 tool
="$rootdir/tools/scramble -rkw -modelnum=79"
3153 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3154 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3155 output
="rockbox.rkw"
3156 bootoutput
="bootloader.rkw"
3157 appextra
="recorder:gui"
3160 # toolset is the tools within the tools directory that we build for
3161 # this particular target.
3162 toolset
="$genericbitmaptools"
3163 # architecture, manufacturer and model for the target-tree build
3165 t_manufacturer
="rk27xx"
3171 modelname
="hifimanhm801"
3175 tool
="$rootdir/tools/scramble -rkw -modelnum=82"
3176 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3177 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3178 output
="rockbox.rkw"
3179 bootoutput
="bootloader.rkw"
3180 appextra
="recorder:gui"
3183 # toolset is the tools within the tools directory that we build for
3184 # this particular target.
3185 toolset
="$genericbitmaptools"
3186 # architecture, manufacturer and model for the target-tree build
3188 t_manufacturer
="rk27xx"
3204 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3205 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3207 bootoutput
="rockbox"
3208 appextra
="recorder:gui:radio"
3211 # architecture, manufacturer and model for the target-tree build
3213 t_manufacturer
="sdl"
3224 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3225 bindir
="/data/data/org.rockbox/lib"
3226 libdir
="/data/data/org.rockbox/app_rockbox"
3232 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3233 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3234 output
="librockbox.so"
3235 bootoutput
="librockbox.so"
3236 appextra
="recorder:gui:radio:hosted/android"
3239 # architecture, manufacturer and model for the target-tree build
3241 t_manufacturer
="android"
3248 modelname
="nokian8xx"
3251 sharedir
="/opt/rockbox/share/rockbox"
3252 bindir
="/opt/rockbox/bin"
3253 libdir
="/opt/rockbox/lib"
3259 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3260 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3262 bootoutput
="rockbox"
3263 appextra
="recorder:gui:radio"
3266 # architecture, manufacturer and model for the target-tree build
3268 t_manufacturer
="maemo"
3275 modelname
="nokian900"
3278 sharedir
="/opt/rockbox/share/rockbox"
3279 bindir
="/opt/rockbox/bin"
3280 libdir
="/opt/rockbox/lib"
3286 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3287 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3289 bootoutput
="rockbox"
3290 appextra
="recorder:gui:radio"
3293 # architecture, manufacturer and model for the target-tree build
3295 t_manufacturer
="maemo"
3305 sharedir
="rockbox/share/rockbox"
3306 bindir
="rockbox/bin"
3307 libdir
="rockbox/lib"
3313 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3314 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3316 bootoutput
="rockbox"
3317 appextra
="recorder:gui:radio"
3320 # architecture, manufacturer and model for the target-tree build
3322 t_manufacturer
="pandora"
3329 modelname
="samsungypr0"
3330 target
="SAMSUNG_YPR0"
3336 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3337 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3339 bootoutput
="rockbox"
3340 appextra
="recorder:gui:radio"
3343 # architecture, manufacturer and model for the target-tree build
3345 t_manufacturer
="ypr0"
3352 modelname
="androidmips"
3356 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3357 bindir
="/data/data/org.rockbox/lib"
3358 libdir
="/data/data/org.rockbox/app_rockbox"
3364 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3365 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3366 output
="librockbox.so"
3367 bootoutput
="librockbox.so"
3368 appextra
="recorder:gui:radio:hosted/android"
3371 # architecture, manufacturer and model for the target-tree build
3373 t_manufacturer
="android"
3378 echo "Please select a supported target platform!"
3384 echo "Platform set to $modelname"
3388 ############################################################################
3389 # Amount of memory, for those that can differ. They have $memory unset at
3393 if [ -z "$memory" ]; then
3396 if [ "$ARG_RAM" ]; then
3399 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3412 if [ "$ARG_RAM" ]; then
3415 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3428 echo "Memory size selected: $memory MB"
3429 [ "$ARG_TYPE" ] ||
echo ""
3433 ##################################################################
3434 # Figure out build "type"
3437 # the ifp7x0 is the only platform that supports building a gdb stub like
3441 gdbstub
=", (G)DB stub"
3443 sansae200r|sansae200
)
3444 gdbstub
=", (I)nstaller"
3447 gdbstub
=", (E)raser"
3450 gdbstub
=", (E)raser"
3455 if [ "$ARG_TYPE" ]; then
3458 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (W)arble codec tool$gdbstub: (Defaults to N)"
3464 appsdir
='$(ROOTDIR)/bootloader'
3466 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3468 echo "e200R-installer build selected"
3471 appsdir
='$(ROOTDIR)/bootloader'
3473 extradefines
="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3475 echo "sansa eraser build selected"
3478 if test $t_manufacturer = "archos"; then
3479 # Archos SH-based players do this somewhat differently for
3481 appsdir
='$(ROOTDIR)/flash/bootbox'
3484 appsdir
='$(ROOTDIR)/bootloader'
3487 if test -n "$boottool"; then
3490 if test -n "$bootoutput"; then
3494 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3496 echo "Bootloader build selected"
3499 if [ "$modelname" = "sansae200r" ]; then
3500 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3505 extradefines
="$extradefines -DSIMULATOR"
3508 echo "Simulator build selected"
3511 echo "Advanced build selected"
3512 whichadvanced
$btype
3515 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3516 appsdir
='$(ROOTDIR)/gdb'
3525 echo "GDB stub build selected"
3534 extradefines
="$extradefines -DDEBUG"
3535 appsdir
='$(ROOTDIR)/tools/checkwps';
3536 output
='checkwps.'${modelname};
3538 echo "CheckWPS build selected"
3542 simcc
"database-sdl"
3544 appsdir
='$(ROOTDIR)/tools/database';
3549 output
="database_${modelname}.exe"
3552 output
='database.'${modelname};
3555 # architecture, manufacturer and model for the target-tree build
3557 t_manufacturer
="sdl"
3559 echo "Database tool build selected"
3567 extradefines
="$extradefines -DDEBUG"
3568 output
='warble.'${modelname};
3570 echo "Warble build selected"
3573 if [ "$modelname" = "sansae200r" ]; then
3574 echo "Do not use the e200R target for regular builds. Use e200 instead."
3578 btype
="N" # set it explicitly since RET only gets here as well
3579 echo "Normal build selected"
3583 # to be able running "make manual" from non-manual configuration
3586 manualdev
="archosfmrecorder"
3589 manualdev
="iriverh100"
3592 manualdev
="ipodmini1g"
3595 manualdev
=$modelname
3599 if [ -z "$debug" ]; then
3600 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3603 if [ "yes" = "$application" ]; then
3604 echo Building Rockbox as an Application
3605 extradefines
="$extradefines -DAPPLICATION"
3608 echo "Using source code root directory: $rootdir"
3610 # this was once possible to change at build-time, but no more:
3615 if [ "yes" = "$simulator" ]; then
3616 # setup compiler and things for simulator
3619 if [ -d "simdisk" ]; then
3620 echo "Subdirectory 'simdisk' already present"
3623 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3627 # Now, figure out version number of the (gcc) compiler we are about to use
3628 gccver
=`$CC -dumpversion`;
3630 # figure out the binutil version too and display it, mostly for the build
3631 # system etc to be able to see it easier
3632 if [ $uname = "Darwin" ]; then
3633 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3635 ldver
=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
3638 if [ -z "$gccver" ]; then
3639 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3640 echo "[WARNING] this may cause your build to fail since we cannot do the"
3641 echo "[WARNING] checks we want now."
3644 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3647 num1
=`echo $gccver | cut -d . -f1`
3648 num2
=`echo $gccver | cut -d . -f2`
3649 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3656 echo "Using $CC $gccver ($gccnum)"
3658 if test "$gccnum" -ge "400"; then
3659 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3660 # so we ignore that warnings for now
3662 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3665 if test "$gccnum" -ge "402"; then
3666 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3667 # and later would throw it for several valid cases
3668 GCCOPTS
="$GCCOPTS -Wno-override-init"
3672 ""|
"$CROSS_COMPILE")
3676 # Verify that the cross-compiler is of a recommended version!
3677 if test "$gccver" != "$gccchoice"; then
3678 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3679 echo "WARNING: version $gccchoice!"
3680 echo "WARNING: This may cause your build to fail since it may be a version"
3681 echo "WARNING: that isn't functional or known to not be the best choice."
3682 echo "WARNING: If you suffer from build problems, you know that this is"
3683 echo "WARNING: a likely source for them..."
3691 echo "Using $LD $ldver"
3693 # check the compiler for SH platforms
3694 if test "$CC" = "sh-elf-gcc"; then
3695 if test "$gccnum" -lt "400"; then
3696 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3697 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3699 # figure out patch status
3700 gccpatch
=`$CC --version`;
3702 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3703 echo "gcc $gccver is rockbox patched"
3704 # then convert -O to -Os to get smaller binaries!
3705 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3707 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3708 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3713 if test "$CC" = "m68k-elf-gcc"; then
3714 # convert -O to -Os to get smaller binaries!
3715 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3718 if [ "$ARG_CCACHE" = "1" ]; then
3719 echo "Enable ccache for building"
3721 elif [ "$ARG_CCACHE" != "0" ]; then
3722 ccache
=`findtool ccache`
3723 if test -n "$ccache"; then
3724 echo "Found and uses ccache ($ccache)"
3728 # figure out the full path to the various commands if possible
3729 HOSTCC
=`findtool gcc --lit`
3730 HOSTAR
=`findtool ar --lit`
3731 CC
=`findtool ${CC} --lit`
3732 CPP
=`findtool ${CPP} --lit`
3733 LD
=`findtool ${LD} --lit`
3734 AR
=`findtool ${AR} --lit`
3735 AS
=`findtool ${AS} --lit`
3736 OC
=`findtool ${OC} --lit`
3737 WINDRES
=`findtool ${WINDRES} --lit`
3738 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3739 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3740 RANLIB
=`findtool ${RANLIB} --lit`
3743 if [ -z "$arch" ]; then
3744 cpp_defines
=$
(echo "" |
$CPP $GCCOPTS -dD)
3745 if [ -n "$(echo $cpp_defines | grep -w __sh__)" ]; then
3747 elif [ -n "$(echo $cpp_defines | grep -w __m68k__)" ]; then
3749 elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then
3751 # cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4)
3752 arch_version
="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,')"
3753 elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
3754 arch
="mips" # FIXME: autodetect version (32 or 64)
3755 elif [ -n "$(echo $cpp_defines | grep -w __i386__)" ]; then
3757 elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
3761 echo "Warning: Could not determine target arch"
3763 if [ "$arch" != "none" ]; then
3764 if [ -n "$arch_version" ]; then
3765 echo "Automatically selected arch: $arch (ver $arch_version)"
3767 echo "Automatically selected arch: $arch"
3771 if [ -n "$arch_version" ]; then
3772 echo "Manually selected arch: $arch (ver $arch_version)"
3774 echo "Manually selected arch: $arch"
3779 if [ -n "$arch_version" ]; then
3780 Darch_version
="#define ARCH_VERSION $arch_version"
3783 if test -n "$ccache"; then
3787 if test "$ARG_ARM_THUMB" = "1"; then
3788 extradefines
="$extradefines -DUSE_THUMB"
3789 CC
="$toolsdir/thumb-cc.py $CC"
3792 if test "X$endian" = "Xbig"; then
3793 defendian
="ROCKBOX_BIG_ENDIAN"
3795 defendian
="ROCKBOX_LITTLE_ENDIAN"
3798 if [ "$ARG_RBDIR" != "" ]; then
3799 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3804 echo "Using alternate rockbox dir: ${rbdir}"
3807 cat > autoconf.h
<<EOF
3808 /* This header was made by configure */
3809 #ifndef __BUILD_AUTOCONF_H
3810 #define __BUILD_AUTOCONF_H
3812 /* lower case names match the what's exported in the Makefile
3813 * upper case name looks nicer in the code */
3833 #define arch_amd64 6
3834 #define ARCH_AMD64 6
3836 /* Define target machine architecture */
3837 #define ARCH ${arch}
3838 /* Optinally define architecture version */
3841 /* Define endianess for the target or simulator platform */
3842 #define ${defendian} 1
3844 /* Define the GCC version used for the build */
3845 #define GCCNUM ${gccnum}
3847 /* Define this if you build rockbox to support the logf logging and display */
3850 /* Define this if you want logf to output to the serial port */
3853 /* Define this to record a chart with timings for the stages of boot */
3856 /* optional define for a backlight modded Ondio */
3859 /* optional define for FM radio mod for iAudio M5 */
3862 /* optional define for ATA poweroff on Player */
3863 ${have_ata_poweroff}
3865 /* optional defines for RTC mod for h1x0 */
3869 /* the threading backend we use */
3870 #define ${thread_support}
3872 /* lcd dimensions for application builds from configure */
3876 /* root of Rockbox */
3877 #define ROCKBOX_DIR "${rbdir}"
3878 #define ROCKBOX_SHARE_PATH "${sharedir}"
3879 #define ROCKBOX_BINARY_PATH "${bindir}"
3880 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3882 #endif /* __BUILD_AUTOCONF_H */
3885 if test -n "$t_cpu"; then
3886 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3888 if [ "$application" = "yes" ] && [ "$t_manufacturer" = "maemo" ]; then
3889 # Maemo needs the SDL port, too
3890 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3891 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3892 elif [ "$application" = "yes" ] && [ "$t_manufacturer" = "pandora" ]; then
3893 # Pandora needs the SDL port, too
3894 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3895 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3896 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3897 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3898 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3901 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3902 test -n "$t_soc" && TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3903 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3907 if test "$swcodec" = "yes"; then
3908 voicetoolset
="rbspeexenc voicefont wavtrim"
3910 voicetoolset
="voicefont wavtrim"
3913 if test "$apps" = "apps"; then
3914 # only when we build "real" apps we build the .lng files
3918 #### Fix the cmdline ###
3919 if [ -n "$ARG_PREFIX" ]; then
3920 cmdline
="$cmdline --prefix=\$(PREFIX)"
3922 if [ -n "$ARG_LCDWIDTH" ]; then
3923 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3926 # remove parts from the cmdline we're going to set unconditionally
3927 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3928 -e s,--ram=[0-9]\*,,g \
3929 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3930 -e s,--type=[a-zA-Z]\*,,g`
3931 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3935 cat > Makefile
<<EOF
3936 ## Automatically generated. http://www.rockbox.org/
3938 export ROOTDIR=${rootdir}
3939 export FIRMDIR=\$(ROOTDIR)/firmware
3940 export APPSDIR=${appsdir}
3941 export TOOLSDIR=${toolsdir}
3942 export DOCSDIR=${rootdir}/docs
3943 export MANUALDIR=${rootdir}/manual
3944 export DEBUG=${debug}
3945 export MODELNAME=${modelname}
3946 export ARCHOSROM=${archosrom}
3947 export FLASHFILE=${flash}
3948 export TARGET_ID=${target_id}
3949 export TARGET=-D${target}
3951 export ARCH_VERSION=${arch_version}
3953 export MANUFACTURER=${t_manufacturer}
3954 export OBJDIR=${pwd}
3955 export BUILDDIR=${pwd}
3956 export RBCODEC_BLD=${pwd}/lib/rbcodec
3957 export LANGUAGE=${language}
3958 export VOICELANGUAGE=${voicelanguage}
3959 export MEMORYSIZE=${memory}
3960 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3961 export MKFIRMWARE=${tool}
3962 export BMP2RB_MONO=${bmp2rb_mono}
3963 export BMP2RB_NATIVE=${bmp2rb_native}
3964 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3965 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3966 export BINARY=${output}
3967 export APPEXTRA=${appextra}
3968 export ENABLEDPLUGINS=${plugins}
3969 export SOFTWARECODECS=${swcodec}
3970 export EXTRA_DEFINES=${extradefines}
3971 export HOSTCC=${HOSTCC}
3972 export HOSTAR=${HOSTAR}
3979 export WINDRES=${WINDRES}
3980 export DLLTOOL=${DLLTOOL}
3981 export DLLWRAP=${DLLWRAP}
3982 export RANLIB=${RANLIB}
3983 export PREFIX=${ARG_PREFIX}
3984 export PROFILE_OPTS=${PROFILE_OPTS}
3985 export APP_TYPE=${app_type}
3986 export APPLICATION=${application}
3987 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3988 export GCCOPTS=${GCCOPTS}
3989 export TARGET_INC=${TARGET_INC}
3990 export LOADADDRESS=${loadaddress}
3991 export SHARED_LDFLAG=${SHARED_LDFLAG}
3992 export SHARED_CFLAGS=${SHARED_CFLAGS}
3993 export LDOPTS=${LDOPTS}
3994 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3995 export GCCVER=${gccver}
3996 export GCCNUM=${gccnum}
3997 export UNAME=${uname}
3998 export MANUALDEV=${manualdev}
3999 export TTS_OPTS=${TTS_OPTS}
4000 export TTS_ENGINE=${TTS_ENGINE}
4001 export ENC_OPTS=${ENC_OPTS}
4002 export ENCODER=${ENCODER}
4003 export USE_ELF=${USE_ELF}
4004 export RBDIR=${rbdir}
4005 export ROCKBOX_SHARE_PATH=${sharedir}
4006 export ROCKBOX_BINARY_PATH=${bindir}
4007 export ROCKBOX_LIBRARY_PATH=${libdir}
4008 export SDLCONFIG=${sdl}
4009 export LCDORIENTATION=${lcd_orientation}
4010 export ANDROID_ARCH=${ANDROID_ARCH}
4012 CONFIGURE_OPTIONS=${cmdline}
4014 include \$(TOOLSDIR)/root.make
4017 echo "Created Makefile"