3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 # global CC options for all platforms
11 CCOPTS
="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
13 # global LD options for all platforms
17 use_logf
="#undef ROCKBOX_HAS_LOGF"
18 use_bootchart
="#undef DO_BOOTCHART"
19 use_logf_serial
="#undef LOGF_SERIAL"
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
54 WINDRES
=${prefix}windres
55 DLLTOOL
=${prefix}dlltool
56 DLLWRAP
=${prefix}dllwrap
57 RANLIB
=${prefix}ranlib
65 # setup files and paths depending on the platform
66 if [ -z "$ARG_PREFIX" ]; then
67 sharedir
="/usr/local/share/rockbox"
68 bindir
="/usr/local/bin"
69 libdir
="/usr/local/lib"
71 if [ -d "$ARG_PREFIX" ]; then
72 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
73 ARG_PREFIX
=`realpath $ARG_PREFIX`
74 if [ "0" != "$?" ]; then
75 echo "ERROR: Could not get prefix path (is realpath installed?)."
79 sharedir
="$ARG_PREFIX/share/rockbox"
80 bindir
="$ARG_PREFIX/bin"
81 libdir
="$ARG_PREFIX/lib"
83 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
89 # Set the application LCD size according to the following priorities:
90 # 1) If --lcdwidth and --lcdheight are set, use them
91 # 2) If a size is passed to the app_set_lcd_size() function, use that
92 # 3) Otherwise ask the user
94 if [ -z "$ARG_LCDWIDTH" ]; then
97 if [ -z "$ARG_LCDHEIGHT" ]; then
101 echo "Enter the LCD width (default: 320)"
102 if [ -z "$ARG_LCDWIDTH" ]; then
103 app_lcd_width
=`input`
105 app_lcd_width
="$ARG_LCDWIDTH"
107 if [ -z "$app_lcd_width" ]; then app_lcd_width
="320"; fi
108 echo "Enter the LCD height (default: 480)"
109 if [ -z "$ARG_LCDHEIGHT" ]; then
110 app_lcd_height
=`input`
112 app_lcd_height
="$ARG_LCDHEIGHT"
114 if [ -z "$app_lcd_height" ]; then app_lcd_height
="480"; fi
115 if [ $app_lcd_width -gt $app_lcd_height ]; then
116 lcd_orientation
="landscape"
118 lcd_orientation
="portrait"
120 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
121 ARG_LCDWIDTH
=$app_lcd_width
122 ARG_LCDHEIGHT
=$app_lcd_height
124 app_lcd_width
="#define LCD_WIDTH $app_lcd_width"
125 app_lcd_height
="#define LCD_HEIGHT $app_lcd_height"
129 if [ "$ARG_ARM_EABI" != "0" ]; then
130 prefixtools arm-elf-eabi-
138 # scan the $PATH for the given command
145 # echo "checks for $file in $path" >&2
146 if test -f "$path/$file"; then
151 # check whether caller wants literal return value if not found
152 if [ "$2" = "--lit" ]; then
157 # scan the $PATH for sdl-config - check whether for a (cross-)win32
160 # sdl-config might (not) be prefixed for cross compiles so try both.
161 files
="${CROSS_COMPILE}sdl-config:sdl-config"
169 #echo "checks for $file in $path" >&2
170 if test -f "$path/$file"; then
171 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
172 if [ "yes" = "${winbuild}" ]; then
177 if [ "yes" != "${winbuild}" ]; then
187 # check for availability of sigaltstack to support our thread engine
188 check_sigaltstack
() {
189 cat >$tmpdir/check_threads.c
<<EOF
191 int main(int argc, char **argv)
194 #define NULL (void*)0
196 sigaltstack(NULL, NULL);
200 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
1> /dev
/null
202 rm -rf $tmpdir/check_threads
*
206 # check for availability of Fiber on Win32 to support our thread engine
208 cat >$tmpdir/check_threads.c
<<EOF
210 int main(int argc, char **argv)
212 ConvertThreadToFiber(NULL);
216 $CC -o $tmpdir/check_threads
$tmpdir/check_threads.c
2>/dev
/null
218 rm -rf $tmpdir/check_threads
*
224 # default tool setup for native building
225 prefixtools
"$CROSS_COMPILE"
226 ARG_ARM_THUMB
=0 # can't use thumb in native builds
230 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
232 GCCOPTS
="$GCCOPTS -fno-builtin -g"
234 LDOPTS
='-lm' # button-sdl.c uses sqrt()
237 endian
="" # endianess of the dap doesnt matter here
239 # default output binary name, don't override app_get_platform()
240 if [ "$app_type" != "sdl-app" ]; then
244 # default share option, override below if needed
245 SHARED_LDFLAG
="-shared"
246 SHARED_CFLAGS
="-fPIC -fvisibility=hidden"
248 if [ "$win32crosscompile" = "yes" ]; then
249 # We are crosscompiling
250 # add cross-compiler option(s)
251 LDOPTS
="$LDOPTS -mconsole"
254 CROSS_COMPILE
=${CROSS_COMPILE:-"i586-mingw32msvc-"}
256 prefixtools
"$CROSS_COMPILE"
258 endian
="little" # windows is little endian
259 echo "Enabling MMX support"
260 GCCOPTS
="$GCCOPTS -mmmx"
264 echo "Cygwin host detected"
267 LDOPTS
="$LDOPTS -mconsole"
274 echo "MinGW host detected"
277 LDOPTS
="$LDOPTS -mconsole"
283 sigaltstack
=`check_sigaltstack`
284 echo "Linux host detected"
285 LDOPTS
="$LDOPTS -ldl"
289 sigaltstack
=`check_sigaltstack`
290 echo "FreeBSD host detected"
291 LDOPTS
="$LDOPTS -ldl"
295 sigaltstack
=`check_sigaltstack`
296 echo "Darwin host detected"
297 LDOPTS
="$LDOPTS -ldl"
298 SHARED_LDFLAG
="-dynamiclib -Wl\,-single_module"
302 sigaltstack
=`check_sigaltstack`
303 echo "*Solaris host detected"
305 GCCOPTS
="$GCCOPTS -fPIC"
306 LDOPTS
="$LDOPTS -ldl"
310 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
316 if [ "$winbuild" != "yes" ]; then
317 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
318 if [ "`uname -m`" = "i686" ]; then
319 echo "Enabling MMX support"
320 GCCOPTS
="$GCCOPTS -mmmx"
324 sdl
=`findsdl $winbuild`
326 if [ -n `echo $app_type | grep "sdl"` ]; then
327 if [ -z "$sdl" ]; then
328 echo "configure didn't find sdl-config, which indicates that you"
329 echo "don't have SDL (properly) installed. Please correct and"
330 echo "re-run configure!"
333 # generic sdl-config checker
334 GCCOPTS
="$GCCOPTS `$sdl --cflags`"
335 LDOPTS
="$LDOPTS `$sdl --libs`"
340 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
341 # x86_64 supports MMX by default
343 if [ "$endian" = "" ]; then
345 cat >$tmpdir/conftest-
$id.c
<<EOF
347 int main(int argc, char **argv)
350 char *varp = (char *)&var;
357 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
358 # when cross compiling, the endianess cannot be detected because the above program doesn't run
359 # on the local machine. assume little endian but print a warning
360 endian
=`$tmpdir/conftest-$id 2> /dev/null`
361 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
370 if [ "$CROSS_COMPILE" != "" ]; then
371 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
374 if [ "$app_type" = "sdl-sim" ]; then
375 echo "Simulator environment deemed $endian endian"
376 elif [ "$app_type" = "sdl-app" ]; then
377 echo "Application environment deemed $endian endian"
378 elif [ "$app_type" = "checkwps" ]; then
379 echo "CheckWPS environment deemed $endian endian"
382 # use wildcard here to make it work even if it was named *.exe like
384 rm -f $tmpdir/conftest-
$id*
387 if [ -z "$ARG_THREAD_SUPPORT" ] ||
[ "$ARG_THREAD_SUPPORT" = "0" ]; then
388 if [ "$sigaltstack" = "0" ]; then
389 thread_support
="HAVE_SIGALTSTACK_THREADS"
390 LDOPTS
="$LDOPTS -lpthread" # pthread needed
391 echo "Selected sigaltstack threads"
392 elif [ "$fibers" = "0" ]; then
393 thread_support
="HAVE_WIN32_FIBER_THREADS"
394 echo "Selected Win32 Fiber threads"
398 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
399 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
400 thread_support
="HAVE_SDL_THREADS"
401 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
402 echo "Selected SDL threads"
404 echo "WARNING: Falling back to SDL threads"
410 # functions for setting up cross-compiler names and options
411 # also set endianess and what the exact recommended gcc version is
412 # the gcc version should most likely match what versions we build with
417 GCCOPTS
="$CCOPTS -m1"
418 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
424 prefixtools calmrisc16-unknown-elf-
425 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
426 GCCOPTIMIZE
="-fomit-frame-pointer"
431 prefixtools m68k-elf-
432 GCCOPTS
="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
433 GCCOPTIMIZE
="-fomit-frame-pointer"
440 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
441 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
442 GCCOPTS
="$GCCOPTS -mlong-calls"
444 GCCOPTIMIZE
="-fomit-frame-pointer"
450 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
451 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
452 GCCOPTS
="$GCCOPTS -mlong-calls"
454 GCCOPTIMIZE
="-fomit-frame-pointer"
460 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
461 if test "$ARG_ARM_EABI" = "0"; then
462 GCCOPTS
="$GCCOPTS -mlong-calls"
464 GCCOPTIMIZE
="-fomit-frame-pointer"
470 GCCOPTS
="$CCOPTS -mcpu=arm940t"
471 if test "$ARG_ARM_EABI" = "0"; then
472 GCCOPTS
="$GCCOPTS -mlong-calls"
474 GCCOPTIMIZE
="-fomit-frame-pointer"
480 GCCOPTS
="$CCOPTS -mcpu=arm9e"
481 if test "$ARG_ARM_EABI" = "0"; then
482 GCCOPTS
="$GCCOPTS -mlong-calls"
484 GCCOPTIMIZE
="-fomit-frame-pointer"
490 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
491 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
492 GCCOPTS
="$GCCOPTS -mlong-calls"
494 GCCOPTIMIZE
="-fomit-frame-pointer"
500 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
501 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
502 GCCOPTS
="$GCCOPTS -mlong-calls"
504 GCCOPTIMIZE
="-fomit-frame-pointer"
510 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
511 if test "$ARG_ARM_EABI" = "0"; then
512 GCCOPTS
="$GCCOPTS -mlong-calls"
514 GCCOPTIMIZE
="-fomit-frame-pointer"
520 GCCOPTS
="$CCOPTS -march=armv5te"
521 GCCOPTIMIZE
="-fomit-frame-pointer"
526 prefixtools mipsel-elf-
527 # mips is predefined, but we want it for paths. use __mips instead
528 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
529 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
530 GCCOPTIMIZE
="-fomit-frame-pointer"
536 # Scratchbox sets up "gcc" based on the active target
539 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
540 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
542 LDOPTS
="-lm -ldl $LDOPTS"
543 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
544 SHARED_LDFLAG
="-shared"
547 thread_support
="HAVE_SIGALTSTACK_THREADS"
550 # Determine maemo version
551 if pkg-config
--atleast-version=5 maemo-version
; then
552 if [ "$1" == "4" ]; then
553 echo "ERROR: Maemo 4 SDK required."
556 extradefines
="$extradefines -DMAEMO5"
557 echo "Found N900 maemo version"
559 elif pkg-config
--atleast-version=4 maemo-version
; then
560 if [ "$1" == "5" ]; then
561 echo "ERROR: Maemo 5 SDK required."
564 extradefines
="$extradefines -DMAEMO4"
565 echo "Found N8xx maemo version"
567 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
572 if [ $is_n900 -eq 1 ]; then
573 GCCOPTS
="$GCCOPTS `pkg-config --cflags sdl`"
574 LDOPTS
="$LDOPTS `pkg-config --libs sdl`"
576 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
577 LDOPTS
="$LDOPTS `sdl-config --libs`"
580 # glib and libosso support
581 GCCOPTS
="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
582 LDOPTS
="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
584 # libhal support: Battery monitoring
585 GCCOPTS
="$GCCOPTS `pkg-config --cflags hal`"
586 LDOPTS
="$LDOPTS `pkg-config --libs hal`"
588 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
589 if [ $is_n900 -eq 1 ]; then
590 # gstreamer support: Audio output.
591 GCCOPTS
="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
592 LDOPTS
="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
594 # N900 specific: libplayback support
595 GCCOPTS
="$GCCOPTS `pkg-config --cflags libplayback-1`"
596 LDOPTS
="$LDOPTS `pkg-config --libs libplayback-1`"
598 # N900 specific: Enable ARMv7 NEON support
599 if sb-conf show
-A |
grep -q -i arm
; then
600 echo "Detected ARM target"
601 GCCOPTS
="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
602 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
604 echo "Detected x86 target"
607 # N8xx specific: Enable armv5te instructions
608 if sb-conf show
-A |
grep -q -i arm
; then
609 echo "Detected ARM target"
610 GCCOPTS
="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
611 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
613 echo "Detected x86 target"
619 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
620 # You have to use the sebt3 toolchain:
621 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
623 PNDSDK
="/usr/local/angstrom/arm"
624 if [ ! -x $PNDSDK/bin
/arm-angstrom-linux-gnueabi-gcc
]; then
625 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
629 PATH
=$PNDSDK/bin
:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/bin
630 PKG_CONFIG_PATH
=$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/lib
/pkgconfig
631 LDOPTS
="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
632 PKG_CONFIG
="pkg-config"
634 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
635 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
637 LDOPTS
="-lm -ldl $LDOPTS"
638 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
639 SHARED_LDFLAG
="-shared"
642 thread_support
="HAVE_SIGALTSTACK_THREADS"
645 GCCOPTS
="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
649 prefixtools
"$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
652 GCCOPTS
="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
653 LDOPTS
="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
656 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
657 GCCOPTS
="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
658 GCCOPTS
="$GCCOPTS -ffast-math -fsingle-precision-constant"
663 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
665 LDOPTS
="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
666 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
667 SHARED_LDFLAG
="-shared"
670 thread_support
="HAVE_SIGALTSTACK_THREADS"
674 GCCOPTS
="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
678 prefixtools
"arm-ypr0-linux-gnueabi-"
682 if [ -z "$ANDROID_SDK_PATH" ]; then
683 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
684 echo "environment variable point to the root directory of the Android SDK."
687 if [ -z "$ANDROID_NDK_PATH" ]; then
688 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
689 echo "environment variable point to the root directory of the Android NDK."
692 buildhost
=$
(uname |
tr "[:upper:]" "[:lower:]")
694 gcctarget
="arm-linux-androideabi-"
695 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
696 PATH
=$PATH:$gccprefix/bin
697 prefixtools
$gcctarget
698 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
699 GCCOPTS
="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
700 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
701 GLOBAL_LDOPTS
="-Wl,-z,defs -Wl,-z,noexecstack"
702 LDOPTS
="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
704 SHARED_LDFLAG
="-shared"
708 atype
=`echo "$1" | cut -c 2-`
709 ##################################################################
710 # Prompt for specific developer options
712 if [ "$atype" ]; then
717 printf "Enter your developer options (press only enter when done)\n\
718 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
719 (T)est plugins, S(m)all C lib, Logf to Ser(i)al port:"
720 if [ "$modelname" = "archosplayer" ]; then
721 printf ", Use (A)TA poweroff"
723 if [ "$t_model" = "ondio" ]; then
724 printf ", (B)acklight MOD"
726 if [ "$modelname" = "iaudiom5" ]; then
727 printf ", (F)M radio MOD"
729 if [ "$modelname" = "iriverh120" ]; then
736 while [ $cont = "1" ]; do
738 if [ "$interact" ]; then
741 option
=`echo "$atype" | cut -c 1`
746 if [ "yes" = "$profile" ]; then
747 echo "Debug is incompatible with profiling"
749 echo "DEBUG build enabled"
754 echo "logf() support enabled"
758 echo "Using Rockbox' small C library"
759 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
762 echo "Including test plugins"
763 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
766 echo "bootchart enabled (logf also enabled)"
771 echo "Logf to serial port enabled (logf also enabled)"
776 echo "Simulator build enabled"
780 if [ "yes" = "$use_debug" ]; then
781 echo "Profiling is incompatible with debug"
783 echo "Profiling support is enabled"
788 echo "Voice build selected"
792 if [ "$modelname" = "archosplayer" ]; then
793 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
794 echo "ATA power off enabled"
798 if [ "$t_model" = "ondio" ]; then
799 have_backlight
="#define HAVE_BACKLIGHT"
800 echo "Backlight functions enabled"
804 if [ "$modelname" = "iaudiom5" ]; then
805 have_fmradio_in
="#define HAVE_FMRADIO_IN"
806 echo "FM radio functions enabled"
810 if [ "$modelname" = "iriverh120" ]; then
811 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
812 have_rtc_alarm
="#define HAVE_RTC_ALARM"
813 echo "RTC functions enabled (DS1339/DS3231)"
817 echo "Enabling Windows 32 cross-compiling"
818 win32crosscompile
="yes"
820 "") # Match enter press when finished with advanced options
824 echo "[ERROR] Option $option unsupported"
827 if [ "$interact" ]; then
828 btype
="$btype$option"
830 atype
=`echo "$atype" | cut -c 2-`
831 [ "$atype" ] || cont
=0
836 if [ "yes" = "$voice" ]; then
837 # Ask about languages to build
839 voicelanguage
=`whichlang`
840 echo "Voice language set to $voicelanguage"
842 # Configure encoder and TTS engine for each language
843 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
844 voiceconfig
"$thislang"
847 if [ "yes" = "$use_debug" ]; then
849 GCCOPTS
="$GCCOPTS -g -DDEBUG"
851 if [ "yes" = "$logf" ]; then
852 use_logf
="#define ROCKBOX_HAS_LOGF 1"
854 if [ "yes" = "$logf_serial" ]; then
855 use_logf_serial
="#define LOGF_SERIAL 1"
857 if [ "yes" = "$bootchart" ]; then
858 use_bootchart
="#define DO_BOOTCHART 1"
860 if [ "yes" = "$simulator" ]; then
862 extradefines
="$extradefines -DSIMULATOR"
866 if [ "yes" = "$profile" ]; then
867 extradefines
="$extradefines -DRB_PROFILE"
868 PROFILE_OPTS
="-finstrument-functions"
872 # Configure voice settings
875 if [ ! "$ARG_TTS" ]; then
876 echo "Building $thislang voice for $modelname. Select options"
880 if [ -n "`findtool flite`" ]; then
884 DEFAULT_TTS_OPTS
=$FLITE_OPTS
885 DEFAULT_NOISEFLOOR
="500"
888 if [ -n "`findtool espeak`" ]; then
892 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
893 DEFAULT_NOISEFLOOR
="500"
896 if [ -n "`findtool festival`" ]; then
897 FESTIVAL
="(F)estival "
900 FESTIVAL_OPTS
="--language italian"
903 FESTIVAL_OPTS
="--language spanish"
906 FESTIVAL_OPTS
="--language finnish"
909 FESTIVAL_OPTS
="--language czech"
915 DEFAULT_TTS
="festival"
916 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
917 DEFAULT_NOISEFLOOR
="500"
920 if [ -n "`findtool swift`" ]; then
924 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
925 DEFAULT_NOISEFLOOR
="500"
928 # Allow SAPI if Windows is in use
929 if [ -n "`findtool winver`" ]; then
933 DEFAULT_TTS_OPTS
=$SAPI_OPTS
934 DEFAULT_NOISEFLOOR
="500"
938 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
939 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
943 if [ "$ARG_TTS" ]; then
946 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
948 if [ -z "$option" ]; then option
=${DEFAULT_CHOICE}; fi
949 advopts
="$advopts --tts=$option"
954 NOISEFLOOR
="500" # TODO: check this value
960 TTS_OPTS
=$ESPEAK_OPTS
963 TTS_ENGINE
="festival"
965 TTS_OPTS
=$FESTIVAL_OPTS
978 TTS_ENGINE
=$DEFAULT_TTS
979 TTS_OPTS
=$DEFAULT_TTS_OPTS
980 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
982 echo "Using $TTS_ENGINE for TTS"
984 # Select which voice to use for Festival
985 if [ "$TTS_ENGINE" = "festival" ]; then
986 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
987 for voice
in $voicelist; do
988 TTS_FESTIVAL_VOICE
="$voice" # Default choice
991 if [ "$ARG_VOICE" ]; then
995 for voice
in $voicelist; do
996 printf "%3d. %s\n" "$i" "$voice"
999 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
1003 for voice
in $voicelist; do
1004 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
1005 TTS_FESTIVAL_VOICE
="$voice"
1009 advopts
="$advopts --voice=$CHOICE"
1010 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1011 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1014 # Read custom tts options from command line
1015 if [ "$ARG_TTSOPTS" ]; then
1016 TTS_OPTS
="$ARG_TTSOPTS"
1017 echo "$TTS_ENGINE options set to $TTS_OPTS"
1020 if [ "$swcodec" = "yes" ]; then
1021 ENCODER
="rbspeexenc"
1022 ENC_OPTS
="-q 4 -c 10"
1024 if [ -n "`findtool lame`" ]; then
1026 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1028 echo "You need LAME in the system path to build voice files for"
1029 echo "HWCODEC targets."
1034 echo "Using $ENCODER for encoding voice clips"
1036 # Read custom encoder options from command line
1037 if [ "$ARG_ENCOPTS" ]; then
1038 ENC_OPTS
="$ARG_ENCOPTS"
1039 echo "$ENCODER options set to $ENC_OPTS"
1043 if [ -n "`findtool cygpath`" ]; then
1044 TEMPDIR
=`cygpath . -a -w`
1049 # figure out which languages that are around
1050 for file in $rootdir/apps
/lang
/*.lang
; do
1051 clean
=`basename $file .lang`
1052 langs
="$langs $clean"
1055 if [ "$ARG_LANG" ]; then
1058 echo "Select a number for the language to use (default is english)"
1059 # FIXME The multiple-language feature is currently broken
1060 # echo "You may enter a comma-separated list of languages to build"
1063 for one
in $langs; do
1068 advopts
="$advopts --language=$pick"
1074 # Allow the user to pass a comma-separated list of langauges
1075 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1077 for one
in $langs; do
1078 # Accept both the language number and name
1079 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1080 if [ "$output" = "" ]; then
1089 if [ -z "$output" ]; then
1097 echo "Rockbox configure script."
1098 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1099 echo "Do *NOT* run this within the tools directory!"
1102 Usage: configure [OPTION]...
1104 --target=TARGET Sets the target, TARGET can be either the target ID or
1105 corresponding string. Run without this option to see all
1108 --ram=RAM Sets the RAM for certain targets. Even though any number
1109 is accepted, not every number is correct. The default
1110 value will be applied, if you entered a wrong number
1111 (which depends on the target). Watch the output. Run
1112 without this option if you are not sure which the right
1115 --type=TYPE Sets the build type. Shortcuts are also valid.
1116 Run without this option to see all available types.
1117 Multiple values are allowed and managed in the input
1118 order. So --type=b stands for Bootloader build, while
1119 --type=ab stands for "Backlight MOD" build.
1121 --lcdwidth=X Sets the width of the LCD. Used only for application
1124 --lcdheight=Y Sets the height of the LCD. Used only for application
1127 --language=LANG Set the language used for voice generation (used only if
1130 --tts=ENGINE Set the TTS engine used for voice generation (used only
1133 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1136 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1138 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1140 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1141 This is useful for having multiple alternate builds on
1142 your device that you can load with ROLO. However as the
1143 bootloader looks for .rockbox you won't be able to boot
1146 --ccache Enable ccache use (done by default these days)
1147 --no-ccache Disable ccache use
1149 --eabi Make configure prefer toolchains that are able to compile
1150 for the new ARM standard abi EABI
1151 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1152 --thumb Build with -mthumb (for ARM builds)
1153 --no-thumb The opposite of --thumb (don't use thumb even for targets
1154 where this is the default
1155 --sdl-threads Force use of SDL threads. They have inferior performance,
1156 but are better debuggable with GDB
1157 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1158 behavior of falling back to them if no native thread
1160 --prefix Target installation directory
1161 --help Shows this message (must not be used with other options)
1180 ARG_PREFIX
="$PREFIX"
1185 --ccache) ARG_CCACHE
=1;;
1186 --no-ccache) ARG_CCACHE
=0;;
1187 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1188 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1189 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1190 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1191 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1192 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1193 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1194 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1195 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1196 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1197 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1198 --eabi) ARG_ARM_EABI
=1;;
1199 --no-eabi) ARG_ARM_EABI
=0;;
1200 --thumb) ARG_ARM_THUMB
=1;;
1201 --no-thumb) ARG_ARM_THUMB
=0;;
1202 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1204 ARG_THREAD_SUPPORT
=0;;
1205 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1207 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1210 [ "$err" ] && exit 1
1214 if [ "$TMPDIR" != "" ]; then
1219 echo Using temporary directory
$tmpdir
1221 if test -r "configure"; then
1222 # this is a check for a configure script in the current directory, it there
1223 # is one, try to figure out if it is this one!
1225 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1226 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1227 echo "It will only cause you pain and grief. Instead do this:"
1230 echo " mkdir build-dir"
1231 echo " cd build-dir"
1232 echo " ../tools/configure"
1234 echo "Much happiness will arise from this. Enjoy"
1239 # get our current directory
1242 if { echo $pwd |
grep " "; } then
1243 echo "You're running this script in a path that contains space. The build"
1244 echo "system is unfortunately not clever enough to deal with this. Please"
1245 echo "run the script from a different path, rename the path or fix the build"
1250 if [ -z "$rootdir" ]; then
1251 ##################################################################
1252 # Figure out where the source code root is!
1254 rootdir
=`dirname $0`/..
/
1256 #####################################################################
1257 # Convert the possibly relative directory name to an absolute version
1263 # cd back to the build dir
1268 appsdir
='$(ROOTDIR)/apps'
1269 toolsdir
='$(ROOTDIR)/tools'
1272 ##################################################################
1273 # Figure out target platform
1276 if [ "$ARG_TARGET" ]; then
1277 buildfor
=$ARG_TARGET
1279 echo "Enter target platform:"
1281 ==Archos== ==iriver== ==Apple iPod==
1282 0) Player/Studio 10) H120/H140 20) Color/Photo
1283 1) Recorder 11) H320/H340 21) Nano 1G
1284 2) FM Recorder 12) iHP-100/110/115 22) Video
1285 3) Recorder v2 13) iFP-790 23) 3G
1286 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1287 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1288 6) AV300 26) Mini 2G
1289 ==Toshiba== 27) 1G, 2G
1290 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1291 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1293 32) 7 ==Olympus= ==SanDisk==
1294 33) D2 70) M:Robe 500 50) Sansa e200
1295 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1297 ==Creative== ==Philips== 53) Sansa m200
1298 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1299 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1300 92) Zen Vision HDD1830 56) Sansa e200v2
1301 102) GoGear HDD6330 57) Sansa m200v4
1302 ==Onda== 58) Sansa Fuze
1303 120) VX747 ==Meizu== 59) Sansa c200v2
1304 121) VX767 110) M6SL 60) Sansa Clipv2
1305 122) VX747+ 111) M6SP 61) Sansa View
1306 123) VX777 112) M3 62) Sansa Clip+
1308 ==Samsung== ==Tatung== 64) Sansa Fuze+
1309 140) YH-820 150) Elio TPJ-1022 65) Sansa Clip Zip
1310 141) YH-920 66) Sansa Connect
1311 142) YH-925 ==Packard Bell==
1312 143) YP-S3 160) Vibe 500 ==Logik==
1314 ==Application== ==MPIO==
1315 200) SDL 170) HD200 ==Lyre project==
1316 201) Android 171) HD300 130) Lyre proto 1
1317 202) Nokia N8xx 131) Mini2440
1318 203) Nokia N900 ==ROCKCHIP== ==HiFiMAN==
1319 204) Pandora 180) rk27xx generic 190) HM-60x
1320 205) Samsung YP-R0 191) HM-801
1327 # Set of tools built for all target platforms:
1328 toolset
="rdf2binary convbdf codepages"
1330 # Toolsets for some target families:
1331 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1332 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1333 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1334 ipodbitmaptools
="$toolset scramble bmp2rb"
1335 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1336 tccbitmaptools
="$toolset scramble bmp2rb"
1337 # generic is used by IFP, Meizu and Onda
1338 genericbitmaptools
="$toolset bmp2rb"
1339 # scramble is used by all other targets
1340 scramblebitmaptools
="$genericbitmaptools scramble"
1343 # ---- For each target ----
1346 # target_id: a unique number identifying this target, IS NOT the menu number.
1347 # Just use the currently highest number+1 when you add a new
1349 # modelname: short model name used all over to identify this target
1350 # memory: number of megabytes of RAM this target has. If the amount can
1351 # be selected by the size prompt, let memory be unset here
1352 # target: -Ddefine passed to the build commands to make the correct
1353 # config-*.h file get included etc
1354 # tool: the tool that takes a plain binary and converts that into a
1355 # working "firmware" file for your target
1356 # output: the final output file name
1357 # boottool: the tool that takes a plain binary and generates a bootloader
1358 # file for your target (or blank to use $tool)
1359 # bootoutput:the final output file name for the bootloader (or blank to use
1361 # appextra: passed to the APPEXTRA variable in the Makefiles.
1362 # TODO: add proper explanation
1363 # archosrom: used only for Archos targets that build a special flashable .ucl
1365 # flash: name of output for flashing, for targets where there's a special
1366 # file output for this.
1367 # plugins: set to 'yes' to build the plugins. Early development builds can
1368 # set this to no in the early stages to have an easier life for a
1370 # swcodec: set 'yes' on swcodec targets
1371 # toolset: lists what particular tools in the tools/ directory that this
1372 # target needs to have built prior to building Rockbox
1375 # *cc: sets up gcc and compiler options for your target builds. Note
1376 # that if you select a simulator build, the compiler selection is
1377 # overridden later in the script.
1383 modelname
="archosplayer"
1384 target
="ARCHOS_PLAYER"
1386 tool
="$rootdir/tools/scramble"
1388 appextra
="player:gui"
1389 archosrom
="$pwd/rombox.ucl"
1390 flash
="$pwd/rockbox.ucl"
1394 # toolset is the tools within the tools directory that we build for
1395 # this particular target.
1396 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1398 # Note: the convbdf is present in the toolset just because: 1) the
1399 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1400 # build the player simulator
1403 t_manufacturer
="archos"
1409 modelname
="archosrecorder"
1410 target
="ARCHOS_RECORDER"
1412 tool
="$rootdir/tools/scramble"
1413 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1414 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1416 appextra
="recorder:gui:radio"
1417 #archosrom="$pwd/rombox.ucl"
1418 flash
="$pwd/rockbox.ucl"
1421 # toolset is the tools within the tools directory that we build for
1422 # this particular target.
1423 toolset
=$archosbitmaptools
1425 t_manufacturer
="archos"
1431 modelname
="archosfmrecorder"
1432 target
="ARCHOS_FMRECORDER"
1434 tool
="$rootdir/tools/scramble -fm"
1435 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1436 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1438 appextra
="recorder:gui:radio"
1439 #archosrom="$pwd/rombox.ucl"
1440 flash
="$pwd/rockbox.ucl"
1443 # toolset is the tools within the tools directory that we build for
1444 # this particular target.
1445 toolset
=$archosbitmaptools
1447 t_manufacturer
="archos"
1453 modelname
="archosrecorderv2"
1454 target
="ARCHOS_RECORDERV2"
1456 tool
="$rootdir/tools/scramble -v2"
1457 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1458 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1460 appextra
="recorder:gui:radio"
1461 #archosrom="$pwd/rombox.ucl"
1462 flash
="$pwd/rockbox.ucl"
1465 # toolset is the tools within the tools directory that we build for
1466 # this particular target.
1467 toolset
=$archosbitmaptools
1469 t_manufacturer
="archos"
1475 modelname
="archosondiosp"
1476 target
="ARCHOS_ONDIOSP"
1478 tool
="$rootdir/tools/scramble -osp"
1479 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1480 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1482 appextra
="recorder:gui:radio"
1483 #archosrom="$pwd/rombox.ucl"
1484 flash
="$pwd/rockbox.ucl"
1487 # toolset is the tools within the tools directory that we build for
1488 # this particular target.
1489 toolset
=$archosbitmaptools
1491 t_manufacturer
="archos"
1497 modelname
="archosondiofm"
1498 target
="ARCHOS_ONDIOFM"
1500 tool
="$rootdir/tools/scramble -ofm"
1501 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1502 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1504 appextra
="recorder:gui:radio"
1505 #archosrom="$pwd/rombox.ucl"
1506 flash
="$pwd/rockbox.ucl"
1509 toolset
=$archosbitmaptools
1511 t_manufacturer
="archos"
1517 modelname
="archosav300"
1518 target
="ARCHOS_AV300"
1521 tool
="$rootdir/tools/scramble -mm=C"
1522 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1523 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1525 appextra
="recorder:gui:radio"
1528 # toolset is the tools within the tools directory that we build for
1529 # this particular target.
1530 toolset
="$toolset scramble descramble bmp2rb"
1531 # architecture, manufacturer and model for the target-tree build
1533 t_manufacturer
="archos"
1539 modelname
="iriverh120"
1540 target
="IRIVER_H120"
1543 tool
="$rootdir/tools/scramble -add=h120"
1544 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1545 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1546 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1547 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1548 output
="rockbox.iriver"
1549 bootoutput
="bootloader.iriver"
1550 appextra
="recorder:gui:radio"
1551 flash
="$pwd/rombox.iriver"
1554 # toolset is the tools within the tools directory that we build for
1555 # this particular target.
1556 toolset
=$iriverbitmaptools
1558 t_manufacturer
="iriver"
1564 modelname
="iriverh300"
1565 target
="IRIVER_H300"
1568 tool
="$rootdir/tools/scramble -add=h300"
1569 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1570 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1571 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1572 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1573 output
="rockbox.iriver"
1574 appextra
="recorder:gui:radio"
1577 # toolset is the tools within the tools directory that we build for
1578 # this particular target.
1579 toolset
=$iriverbitmaptools
1581 t_manufacturer
="iriver"
1587 modelname
="iriverh100"
1588 target
="IRIVER_H100"
1591 tool
="$rootdir/tools/scramble -add=h100"
1592 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1593 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1594 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1595 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1596 output
="rockbox.iriver"
1597 bootoutput
="bootloader.iriver"
1598 appextra
="recorder:gui:radio"
1599 flash
="$pwd/rombox.iriver"
1602 # toolset is the tools within the tools directory that we build for
1603 # this particular target.
1604 toolset
=$iriverbitmaptools
1606 t_manufacturer
="iriver"
1612 modelname
="iriverifp7xx"
1613 target
="IRIVER_IFP7XX"
1617 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1618 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1619 output
="rockbox.wma"
1620 appextra
="recorder:gui:radio"
1623 # toolset is the tools within the tools directory that we build for
1624 # this particular target.
1625 toolset
=$genericbitmaptools
1627 t_manufacturer
="pnx0101"
1628 t_model
="iriver-ifp7xx"
1633 modelname
="iriverh10"
1637 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1638 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1639 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1640 output
="rockbox.mi4"
1641 appextra
="recorder:gui:radio"
1644 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1645 bootoutput
="H10_20GC.mi4"
1646 # toolset is the tools within the tools directory that we build for
1647 # this particular target.
1648 toolset
=$scramblebitmaptools
1649 # architecture, manufacturer and model for the target-tree build
1652 t_manufacturer
="iriver"
1658 modelname
="iriverh10_5gb"
1659 target
="IRIVER_H10_5GB"
1662 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1663 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1664 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1665 output
="rockbox.mi4"
1666 appextra
="recorder:gui:radio"
1669 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1670 bootoutput
="H10.mi4"
1671 # toolset is the tools within the tools directory that we build for
1672 # this particular target.
1673 toolset
=$scramblebitmaptools
1674 # architecture, manufacturer and model for the target-tree build
1677 t_manufacturer
="iriver"
1683 modelname
="ipodcolor"
1687 tool
="$rootdir/tools/scramble -add=ipco"
1688 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1689 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1690 output
="rockbox.ipod"
1691 appextra
="recorder:gui:radio"
1694 bootoutput
="bootloader-$modelname.ipod"
1695 # toolset is the tools within the tools directory that we build for
1696 # this particular target.
1697 toolset
=$ipodbitmaptools
1698 # architecture, manufacturer and model for the target-tree build
1701 t_manufacturer
="ipod"
1707 modelname
="ipodnano1g"
1711 tool
="$rootdir/tools/scramble -add=nano"
1712 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1713 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1714 output
="rockbox.ipod"
1715 appextra
="recorder:gui:radio"
1718 bootoutput
="bootloader-$modelname.ipod"
1719 # toolset is the tools within the tools directory that we build for
1720 # this particular target.
1721 toolset
=$ipodbitmaptools
1722 # architecture, manufacturer and model for the target-tree build
1725 t_manufacturer
="ipod"
1731 modelname
="ipodvideo"
1733 memory
=64 # always. This is reduced at runtime if needed
1735 tool
="$rootdir/tools/scramble -add=ipvd"
1736 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1737 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1738 output
="rockbox.ipod"
1739 appextra
="recorder:gui:radio"
1742 bootoutput
="bootloader-$modelname.ipod"
1743 # toolset is the tools within the tools directory that we build for
1744 # this particular target.
1745 toolset
=$ipodbitmaptools
1746 # architecture, manufacturer and model for the target-tree build
1749 t_manufacturer
="ipod"
1759 tool
="$rootdir/tools/scramble -add=ip3g"
1760 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1761 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1762 output
="rockbox.ipod"
1763 appextra
="recorder:gui:radio"
1766 bootoutput
="bootloader-$modelname.ipod"
1767 # toolset is the tools within the tools directory that we build for
1768 # this particular target.
1769 toolset
=$ipodbitmaptools
1770 # architecture, manufacturer and model for the target-tree build
1773 t_manufacturer
="ipod"
1783 tool
="$rootdir/tools/scramble -add=ip4g"
1784 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1785 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1786 output
="rockbox.ipod"
1787 appextra
="recorder:gui:radio"
1790 bootoutput
="bootloader-$modelname.ipod"
1791 # toolset is the tools within the tools directory that we build for
1792 # this particular target.
1793 toolset
=$ipodbitmaptools
1794 # architecture, manufacturer and model for the target-tree build
1797 t_manufacturer
="ipod"
1803 modelname
="ipodmini1g"
1807 tool
="$rootdir/tools/scramble -add=mini"
1808 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1809 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1810 output
="rockbox.ipod"
1811 appextra
="recorder:gui:radio"
1814 bootoutput
="bootloader-$modelname.ipod"
1815 # toolset is the tools within the tools directory that we build for
1816 # this particular target.
1817 toolset
=$ipodbitmaptools
1818 # architecture, manufacturer and model for the target-tree build
1821 t_manufacturer
="ipod"
1827 modelname
="ipodmini2g"
1828 target
="IPOD_MINI2G"
1831 tool
="$rootdir/tools/scramble -add=mn2g"
1832 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1833 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1834 output
="rockbox.ipod"
1835 appextra
="recorder:gui:radio"
1838 bootoutput
="bootloader-$modelname.ipod"
1839 # toolset is the tools within the tools directory that we build for
1840 # this particular target.
1841 toolset
=$ipodbitmaptools
1842 # architecture, manufacturer and model for the target-tree build
1845 t_manufacturer
="ipod"
1851 modelname
="ipod1g2g"
1855 tool
="$rootdir/tools/scramble -add=1g2g"
1856 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1857 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1858 output
="rockbox.ipod"
1859 appextra
="recorder:gui:radio"
1862 bootoutput
="bootloader-$modelname.ipod"
1863 # toolset is the tools within the tools directory that we build for
1864 # this particular target.
1865 toolset
=$ipodbitmaptools
1866 # architecture, manufacturer and model for the target-tree build
1869 t_manufacturer
="ipod"
1875 modelname
="ipodnano2g"
1876 target
="IPOD_NANO2G"
1879 tool
="$rootdir/tools/scramble -add=nn2g"
1880 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1881 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1882 output
="rockbox.ipod"
1883 appextra
="recorder:gui:radio"
1886 bootoutput
="bootloader-$modelname.ipod"
1887 # toolset is the tools within the tools directory that we build for
1888 # this particular target.
1889 toolset
=$ipodbitmaptools
1890 # architecture, manufacturer and model for the target-tree build
1892 t_manufacturer
="s5l8700"
1893 t_model
="ipodnano2g"
1902 tool
="$rootdir/tools/scramble -add=ip6g"
1903 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1904 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1905 output
="rockbox.ipod"
1906 appextra
="recorder:gui:radio"
1909 bootoutput
="bootloader-$modelname.ipod"
1910 # toolset is the tools within the tools directory that we build for
1911 # this particular target.
1912 toolset
=$ipodbitmaptools
1913 # architecture, manufacturer and model for the target-tree build
1915 t_manufacturer
="s5l8702"
1921 modelname
="iaudiox5"
1925 tool
="$rootdir/tools/scramble -add=iax5"
1926 boottool
="$rootdir/tools/scramble -iaudiox5"
1927 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1928 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1929 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1930 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1931 output
="rockbox.iaudio"
1932 bootoutput
="x5_fw.bin"
1933 appextra
="recorder:gui:radio"
1936 # toolset is the tools within the tools directory that we build for
1937 # this particular target.
1938 toolset
="$iaudiobitmaptools"
1939 # architecture, manufacturer and model for the target-tree build
1941 t_manufacturer
="iaudio"
1947 modelname
="iaudiom5"
1951 tool
="$rootdir/tools/scramble -add=iam5"
1952 boottool
="$rootdir/tools/scramble -iaudiom5"
1953 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1954 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1955 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1956 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1957 output
="rockbox.iaudio"
1958 bootoutput
="m5_fw.bin"
1959 appextra
="recorder:gui:radio"
1962 # toolset is the tools within the tools directory that we build for
1963 # this particular target.
1964 toolset
="$iaudiobitmaptools"
1965 # architecture, manufacturer and model for the target-tree build
1967 t_manufacturer
="iaudio"
1977 tool
="$rootdir/tools/scramble -add=i7"
1978 boottool
="$rootdir/tools/scramble -tcc=crc"
1979 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1980 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1981 output
="rockbox.iaudio"
1982 appextra
="recorder:gui:radio"
1985 bootoutput
="I7_FW.BIN"
1986 # toolset is the tools within the tools directory that we build for
1987 # this particular target.
1988 toolset
="$tccbitmaptools"
1989 # architecture, manufacturer and model for the target-tree build
1991 t_manufacturer
="tcc77x"
2001 tool
="$rootdir/tools/scramble -add=d2"
2003 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2004 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2006 bootoutput
="bootloader-cowond2.bin"
2007 appextra
="recorder:gui:radio"
2010 toolset
="$tccbitmaptools"
2011 # architecture, manufacturer and model for the target-tree build
2013 t_manufacturer
="tcc780x"
2019 modelname
="iaudiom3"
2023 tool
="$rootdir/tools/scramble -add=iam3"
2024 boottool
="$rootdir/tools/scramble -iaudiom3"
2025 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2026 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2027 output
="rockbox.iaudio"
2028 bootoutput
="cowon_m3.bin"
2029 appextra
="recorder:gui:radio"
2032 # toolset is the tools within the tools directory that we build for
2033 # this particular target.
2034 toolset
="$iaudiobitmaptools"
2035 # architecture, manufacturer and model for the target-tree build
2037 t_manufacturer
="iaudio"
2043 modelname
="gigabeatfx"
2047 tool
="$rootdir/tools/scramble -add=giga"
2048 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2049 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2050 output
="rockbox.gigabeat"
2051 appextra
="recorder:gui:radio"
2054 toolset
=$gigabeatbitmaptools
2055 boottool
="$rootdir/tools/scramble -gigabeat"
2056 bootoutput
="FWIMG01.DAT"
2057 # architecture, manufacturer and model for the target-tree build
2059 t_manufacturer
="s3c2440"
2060 t_model
="gigabeat-fx"
2065 modelname
="gigabeats"
2069 tool
="$rootdir/tools/scramble -add=gigs"
2070 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2071 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2072 output
="rockbox.gigabeat"
2073 appextra
="recorder:gui:radio"
2076 toolset
="$gigabeatbitmaptools"
2077 boottool
="$rootdir/tools/scramble -gigabeats"
2079 # architecture, manufacturer and model for the target-tree build
2081 t_manufacturer
="imx31"
2082 t_model
="gigabeat-s"
2087 modelname
="mrobe500"
2091 tool
="$rootdir/tools/scramble -add=m500"
2092 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2093 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2094 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2095 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2096 output
="rockbox.mrobe500"
2097 appextra
="recorder:gui:radio"
2100 toolset
=$gigabeatbitmaptools
2102 bootoutput
="rockbox.mrboot"
2103 # architecture, manufacturer and model for the target-tree build
2105 t_manufacturer
="tms320dm320"
2111 modelname
="mrobe100"
2115 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2116 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2117 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2118 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2119 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2120 output
="rockbox.mi4"
2121 appextra
="recorder:gui:radio"
2124 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2125 bootoutput
="pp5020.mi4"
2126 # toolset is the tools within the tools directory that we build for
2127 # this particular target.
2128 toolset
=$scramblebitmaptools
2129 # architecture, manufacturer and model for the target-tree build
2132 t_manufacturer
="olympus"
2138 modelname
="logikdax"
2142 tool
="$rootdir/tools/scramble -add=ldax"
2143 boottool
="$rootdir/tools/scramble -tcc=crc"
2144 bootoutput
="player.rom"
2145 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2146 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2147 output
="rockbox.logik"
2148 appextra
="recorder:gui:radio"
2151 # toolset is the tools within the tools directory that we build for
2152 # this particular target.
2153 toolset
=$tccbitmaptools
2154 # architecture, manufacturer and model for the target-tree build
2156 t_manufacturer
="tcc77x"
2162 modelname
="zenvisionm30gb"
2163 target
="CREATIVE_ZVM"
2166 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2167 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2168 tool
="$rootdir/tools/scramble -creative=zvm"
2170 output
="rockbox.zvm"
2171 appextra
="recorder:gui:radio"
2174 toolset
=$ipodbitmaptools
2175 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2176 bootoutput
="rockbox.zvmboot"
2177 # architecture, manufacturer and model for the target-tree build
2179 t_manufacturer
="tms320dm320"
2180 t_model
="creative-zvm"
2185 modelname
="zenvisionm60gb"
2186 target
="CREATIVE_ZVM60GB"
2189 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2190 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2191 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2193 output
="rockbox.zvm60"
2194 appextra
="recorder:gui:radio"
2197 toolset
=$ipodbitmaptools
2198 boottool
="$rootdir/tools/scramble -creative=zvm60"
2199 bootoutput
="rockbox.zvm60boot"
2200 # architecture, manufacturer and model for the target-tree build
2202 t_manufacturer
="tms320dm320"
2203 t_model
="creative-zvm"
2208 modelname
="zenvision"
2209 target
="CREATIVE_ZV"
2212 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2213 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2214 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2217 appextra
="recorder:gui:radio"
2220 toolset
=$ipodbitmaptools
2221 boottool
="$rootdir/tools/scramble -creative=zenvision"
2222 bootoutput
="rockbox.zvboot"
2223 # architecture, manufacturer and model for the target-tree build
2225 t_manufacturer
="tms320dm320"
2226 t_model
="creative-zvm"
2231 modelname
="sansae200"
2233 memory
=32 # supposedly
2235 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2236 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2237 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2238 output
="rockbox.mi4"
2239 appextra
="recorder:gui:radio"
2242 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2243 bootoutput
="PP5022.mi4"
2244 # toolset is the tools within the tools directory that we build for
2245 # this particular target.
2246 toolset
=$scramblebitmaptools
2247 # architecture, manufacturer and model for the target-tree build
2250 t_manufacturer
="sandisk"
2251 t_model
="sansa-e200"
2255 # the e200R model is pretty much identical to the e200, it only has a
2256 # different option to the scramble tool when building a bootloader and
2257 # makes the bootloader output file name in all lower case.
2259 modelname
="sansae200r"
2261 memory
=32 # supposedly
2263 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2264 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2265 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2266 output
="rockbox.mi4"
2267 appextra
="recorder:gui:radio"
2270 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2271 bootoutput
="pp5022.mi4"
2272 # toolset is the tools within the tools directory that we build for
2273 # this particular target.
2274 toolset
=$scramblebitmaptools
2275 # architecture, manufacturer and model for the target-tree build
2278 t_manufacturer
="sandisk"
2279 t_model
="sansa-e200"
2284 modelname
="sansac200"
2286 memory
=32 # supposedly
2288 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2289 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2290 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2291 output
="rockbox.mi4"
2292 appextra
="recorder:gui:radio"
2295 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2296 bootoutput
="firmware.mi4"
2297 # toolset is the tools within the tools directory that we build for
2298 # this particular target.
2299 toolset
=$scramblebitmaptools
2300 # architecture, manufacturer and model for the target-tree build
2303 t_manufacturer
="sandisk"
2304 t_model
="sansa-c200"
2309 modelname
="sansam200"
2313 tool
="$rootdir/tools/scramble -add=m200"
2314 boottool
="$rootdir/tools/scramble -tcc=crc"
2315 bootoutput
="player.rom"
2316 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2317 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2318 output
="rockbox.m200"
2319 appextra
="recorder:gui:radio"
2322 # toolset is the tools within the tools directory that we build for
2323 # this particular target.
2324 toolset
=$tccbitmaptools
2325 # architecture, manufacturer and model for the target-tree build
2327 t_manufacturer
="tcc77x"
2333 modelname
="sansac100"
2337 tool
="$rootdir/tools/scramble -add=c100"
2338 boottool
="$rootdir/tools/scramble -tcc=crc"
2339 bootoutput
="player.rom"
2340 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2341 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2342 output
="rockbox.c100"
2343 appextra
="recorder:gui:radio"
2346 # toolset is the tools within the tools directory that we build for
2347 # this particular target.
2348 toolset
=$tccbitmaptools
2349 # architecture, manufacturer and model for the target-tree build
2351 t_manufacturer
="tcc77x"
2357 modelname
="sansaclip"
2360 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2361 bmp2rb_native
="$bmp2rb_mono"
2362 tool
="$rootdir/tools/scramble -add=clip"
2363 output
="rockbox.sansa"
2364 bootoutput
="bootloader-clip.sansa"
2365 appextra
="recorder:gui:radio"
2368 toolset
=$scramblebitmaptools
2370 t_manufacturer
="as3525"
2371 t_model
="sansa-clip"
2372 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2374 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2380 modelname
="sansae200v2"
2381 target
="SANSA_E200V2"
2383 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2384 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2385 tool
="$rootdir/tools/scramble -add=e2v2"
2386 output
="rockbox.sansa"
2387 bootoutput
="bootloader-e200v2.sansa"
2388 appextra
="recorder:gui:radio"
2391 toolset
=$scramblebitmaptools
2393 t_manufacturer
="as3525"
2394 t_model
="sansa-e200v2"
2401 modelname
="sansam200v4"
2402 target
="SANSA_M200V4"
2404 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2405 bmp2rb_native
="$bmp2rb_mono"
2406 tool
="$rootdir/tools/scramble -add=m2v4"
2407 output
="rockbox.sansa"
2408 bootoutput
="bootloader-m200v4.sansa"
2409 appextra
="recorder:gui:radio"
2412 toolset
=$scramblebitmaptools
2414 t_manufacturer
="as3525"
2415 t_model
="sansa-m200v4"
2416 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2418 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2424 modelname
="sansafuze"
2427 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2428 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2429 tool
="$rootdir/tools/scramble -add=fuze"
2430 output
="rockbox.sansa"
2431 bootoutput
="bootloader-fuze.sansa"
2432 appextra
="recorder:gui:radio"
2435 toolset
=$scramblebitmaptools
2437 t_manufacturer
="as3525"
2438 t_model
="sansa-fuze"
2445 modelname
="sansac200v2"
2446 target
="SANSA_C200V2"
2447 memory
=2 # as per OF diagnosis mode
2448 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2449 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2450 tool
="$rootdir/tools/scramble -add=c2v2"
2451 output
="rockbox.sansa"
2452 bootoutput
="bootloader-c200v2.sansa"
2453 appextra
="recorder:gui:radio"
2456 # toolset is the tools within the tools directory that we build for
2457 # this particular target.
2458 toolset
=$scramblebitmaptools
2459 # architecture, manufacturer and model for the target-tree build
2461 t_manufacturer
="as3525"
2462 t_model
="sansa-c200v2"
2463 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2465 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2470 modelname
="sansaclipv2"
2471 target
="SANSA_CLIPV2"
2473 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2474 bmp2rb_native
="$bmp2rb_mono"
2475 tool
="$rootdir/tools/scramble -add=clv2"
2476 output
="rockbox.sansa"
2477 bootoutput
="bootloader-clipv2.sansa"
2478 appextra
="recorder:gui:radio"
2481 toolset
=$scramblebitmaptools
2483 t_manufacturer
="as3525"
2484 t_model
="sansa-clipv2"
2489 echo "Sansa View is not yet supported!"
2492 modelname
="sansaview"
2496 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2497 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2498 output
="rockbox.mi4"
2502 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2503 bootoutput
="firmware.mi4"
2504 # toolset is the tools within the tools directory that we build for
2505 # this particular target.
2506 toolset
=$scramblebitmaptools
2509 t_manufacturer
="sandisk"
2510 t_model
="sansa-view"
2515 modelname
="sansaclipplus"
2516 target
="SANSA_CLIPPLUS"
2518 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2519 bmp2rb_native
="$bmp2rb_mono"
2520 tool
="$rootdir/tools/scramble -add=cli+"
2521 output
="rockbox.sansa"
2522 bootoutput
="bootloader-clipplus.sansa"
2523 appextra
="recorder:gui:radio"
2526 toolset
=$scramblebitmaptools
2528 t_manufacturer
="as3525"
2529 t_model
="sansa-clipplus"
2535 modelname
="sansafuzev2"
2536 target
="SANSA_FUZEV2"
2538 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2539 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2540 tool
="$rootdir/tools/scramble -add=fuz2"
2541 output
="rockbox.sansa"
2542 bootoutput
="bootloader-fuzev2.sansa"
2543 appextra
="recorder:gui:radio"
2546 toolset
=$scramblebitmaptools
2548 t_manufacturer
="as3525"
2549 t_model
="sansa-fuzev2"
2555 modelname
="sansafuzeplus"
2556 target
="SANSA_FUZEPLUS"
2558 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2559 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2560 tool
="$rootdir/tools/scramble -add=fuz+"
2561 output
="rockbox.sansa"
2562 bootoutput
="bootloader-fuzeplus.sansa"
2563 appextra
="gui:recorder:radio"
2566 toolset
=$scramblebitmaptools
2568 t_manufacturer
="imx233"
2569 t_model
="sansa-fuzeplus"
2575 modelname
="sansaclipzip"
2576 target
="SANSA_CLIPZIP"
2578 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2579 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2580 tool
="$rootdir/tools/scramble -add=clzp"
2581 output
="rockbox.sansa"
2582 bootoutput
="bootloader-clipzip.sansa"
2583 appextra
="recorder:gui:radio"
2586 toolset
=$scramblebitmaptools
2588 t_manufacturer
="as3525"
2589 t_model
="sansa-clipzip"
2595 modelname
="sansaconnect"
2596 target
="SANSA_CONNECT"
2598 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2599 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2600 tool
="$rootdir/tools/scramble -add=conn"
2601 output
="rockbox.sansa"
2602 bootoutput
="bootloader-connect.sansa"
2603 appextra
="recorder:gui"
2606 toolset
=$scramblebitmaptools
2608 t_manufacturer
="tms320dm320"
2609 t_model
="sansa-connect"
2615 modelname
="tatungtpj1022"
2616 target
="TATUNG_TPJ1022"
2619 tool
="$rootdir/tools/scramble -add tpj2"
2620 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2621 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2622 output
="rockbox.elio"
2623 appextra
="recorder:gui:radio"
2626 boottool
="$rootdir/tools/scramble -mi4v2"
2627 bootoutput
="pp5020.mi4"
2628 # toolset is the tools within the tools directory that we build for
2629 # this particular target.
2630 toolset
=$scramblebitmaptools
2631 # architecture, manufacturer and model for the target-tree build
2634 t_manufacturer
="tatung"
2640 modelname
="gogearsa9200"
2641 target
="PHILIPS_SA9200"
2642 memory
=32 # supposedly
2644 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2645 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2646 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2647 output
="rockbox.mi4"
2648 appextra
="recorder:gui:radio"
2651 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2652 bootoutput
="FWImage.ebn"
2653 # toolset is the tools within the tools directory that we build for
2654 # this particular target.
2655 toolset
=$scramblebitmaptools
2656 # architecture, manufacturer and model for the target-tree build
2659 t_manufacturer
="philips"
2665 modelname
="gogearhdd1630"
2666 target
="PHILIPS_HDD1630"
2667 memory
=32 # supposedly
2669 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2670 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2671 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2672 output
="rockbox.mi4"
2673 appextra
="recorder:gui:radio"
2676 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2677 bootoutput
="FWImage.ebn"
2678 # toolset is the tools within the tools directory that we build for
2679 # this particular target.
2680 toolset
=$scramblebitmaptools
2681 # architecture, manufacturer and model for the target-tree build
2684 t_manufacturer
="philips"
2690 modelname
="gogearhdd6330"
2691 target
="PHILIPS_HDD6330"
2694 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2695 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2696 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2697 output
="rockbox.mi4"
2698 appextra
="recorder:gui:radio"
2701 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2702 bootoutput
="FWImage.ebn"
2703 # toolset is the tools within the tools directory that we build for
2704 # this particular target.
2705 toolset
=$scramblebitmaptools
2706 # architecture, manufacturer and model for the target-tree build
2709 t_manufacturer
="philips"
2715 modelname
="meizum6sl"
2720 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2721 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2722 output
="rockbox.meizu"
2723 appextra
="recorder:gui:radio"
2726 toolset
=$genericbitmaptools
2728 bootoutput
="rockboot.ebn"
2729 # architecture, manufacturer and model for the target-tree build
2731 t_manufacturer
="s5l8700"
2732 t_model
="meizu-m6sl"
2737 modelname
="meizum6sp"
2742 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2743 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2744 output
="rockbox.meizu"
2745 appextra
="recorder:gui:radio"
2748 toolset
=$genericbitmaptools
2750 bootoutput
="rockboot.ebn"
2751 # architecture, manufacturer and model for the target-tree build
2753 t_manufacturer
="s5l8700"
2754 t_model
="meizu-m6sp"
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"
2781 modelname
="ondavx747"
2785 tool
="$rootdir/tools/scramble -add=x747"
2786 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2787 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2788 output
="rockbox.vx747"
2789 appextra
="recorder:gui:radio"
2792 toolset
=$genericbitmaptools
2793 boottool
="$rootdir/tools/scramble -ccpmp"
2794 bootoutput
="ccpmp.bin"
2795 # architecture, manufacturer and model for the target-tree build
2797 t_manufacturer
="ingenic_jz47xx"
2798 t_model
="onda_vx747"
2803 modelname
="ondavx767"
2808 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2809 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2810 output
="rockbox.vx767"
2811 appextra
="recorder:gui:radio"
2814 toolset
=$genericbitmaptools
2815 boottool
="$rootdir/tools/scramble -ccpmp"
2816 bootoutput
="ccpmp.bin"
2817 # architecture, manufacturer and model for the target-tree build
2819 t_manufacturer
="ingenic_jz47xx"
2820 t_model
="onda_vx767"
2825 modelname
="ondavx747p"
2826 target
="ONDA_VX747P"
2829 tool
="$rootdir/tools/scramble -add=747p"
2830 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2831 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2832 output
="rockbox.vx747p"
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
="ondavx777"
2851 tool
="$rootdir/tools/scramble -add=x777"
2852 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2853 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2854 output
="rockbox.vx777"
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_vx747"
2869 modelname
="lyreproto1"
2870 target
="LYRE_PROTO1"
2874 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2875 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2876 output
="rockbox.lyre"
2877 appextra
="recorder:gui:radio"
2880 toolset
=$scramblebitmaptools
2882 bootoutput
="bootloader-proto1.lyre"
2883 # architecture, manufacturer and model for the target-tree build
2885 t_manufacturer
="at91sam"
2886 t_model
="lyre_proto1"
2891 modelname
="mini2440"
2895 tool
="$rootdir/tools/scramble -add=m244"
2896 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2897 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2898 output
="rockbox.mini2440"
2899 appextra
="recorder:gui:radio"
2902 toolset
=$scramblebitmaptools
2904 bootoutput
="bootloader-mini2440.lyre"
2905 # architecture, manufacturer and model for the target-tree build
2907 t_manufacturer
="s3c2440"
2913 modelname
="samsungyh820"
2914 target
="SAMSUNG_YH820"
2917 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2918 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2919 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2920 output
="rockbox.mi4"
2921 appextra
="recorder:gui:radio"
2924 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2925 bootoutput
="FW_YH820.mi4"
2926 # toolset is the tools within the tools directory that we build for
2927 # this particular target.
2928 toolset
=$scramblebitmaptools
2929 # architecture, manufacturer and model for the target-tree build
2932 t_manufacturer
="samsung"
2938 modelname
="samsungyh920"
2939 target
="SAMSUNG_YH920"
2942 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2943 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2944 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2945 output
="rockbox.mi4"
2946 appextra
="recorder:gui:radio"
2949 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2950 bootoutput
="PP5020.mi4"
2951 # toolset is the tools within the tools directory that we build for
2952 # this particular target.
2953 toolset
=$scramblebitmaptools
2954 # architecture, manufacturer and model for the target-tree build
2957 t_manufacturer
="samsung"
2963 modelname
="samsungyh925"
2964 target
="SAMSUNG_YH925"
2967 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2968 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2969 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2970 output
="rockbox.mi4"
2971 appextra
="recorder:gui:radio"
2974 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2975 bootoutput
="FW_YH925.mi4"
2976 # toolset is the tools within the tools directory that we build for
2977 # this particular target.
2978 toolset
=$scramblebitmaptools
2979 # architecture, manufacturer and model for the target-tree build
2982 t_manufacturer
="samsung"
2988 modelname
="samsungyps3"
2989 target
="SAMSUNG_YPS3"
2993 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2994 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2995 output
="rockbox.yps3"
2996 appextra
="recorder:gui:radio"
2999 toolset
=$genericbitmaptools
3001 bootoutput
="rockboot.ebn"
3002 # architecture, manufacturer and model for the target-tree build
3004 t_manufacturer
="s5l8700"
3011 target
="PBELL_VIBE500"
3014 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
3015 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3016 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
3017 output
="rockbox.mi4"
3018 appextra
="recorder:gui:radio"
3021 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
3022 bootoutput
="jukebox.mi4"
3023 # toolset is the tools within the tools directory that we build for
3024 # this particular target.
3025 toolset
=$scramblebitmaptools
3026 # architecture, manufacturer and model for the target-tree build
3029 t_manufacturer
="pbell"
3035 modelname
="mpiohd200"
3039 tool
="$rootdir/tools/scramble -add=hd20"
3040 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3041 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
3042 output
="rockbox.mpio"
3043 bootoutput
="bootloader.mpio"
3044 appextra
="recorder:gui:radio"
3047 # toolset is the tools within the tools directory that we build for
3048 # this particular target.
3049 toolset
="$genericbitmaptools"
3050 # architecture, manufacturer and model for the target-tree build
3052 t_manufacturer
="mpio"
3058 modelname
="mpiohd300"
3062 tool
="$rootdir/tools/scramble -add=hd30"
3063 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3064 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
3065 output
="rockbox.mpio"
3066 bootoutput
="bootloader.mpio"
3067 appextra
="recorder:gui:radio"
3070 # toolset is the tools within the tools directory that we build for
3071 # this particular target.
3072 toolset
="$genericbitmaptools"
3073 # architecture, manufacturer and model for the target-tree build
3075 t_manufacturer
="mpio"
3081 modelname
="rk27generic"
3082 target
="RK27_GENERIC"
3085 tool
="$rootdir/tools/scramble -rkw -modelnum=73"
3086 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3087 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3088 output
="rockbox.rkw"
3089 bootoutput
="bootloader.rkw"
3090 appextra
="recorder:gui:radio"
3093 # toolset is the tools within the tools directory that we build for
3094 # this particular target.
3095 toolset
="$genericbitmaptools"
3096 # architecture, manufacturer and model for the target-tree build
3098 t_manufacturer
="rk27xx"
3099 t_model
="rk27generic"
3104 modelname
="hifimanhm60x"
3108 tool
="$rootdir/tools/scramble -rkw -modelnum=79"
3109 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3110 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3111 output
="rockbox.rkw"
3112 bootoutput
="bootloader.rkw"
3113 appextra
="recorder:gui"
3116 # toolset is the tools within the tools directory that we build for
3117 # this particular target.
3118 toolset
="$genericbitmaptools"
3119 # architecture, manufacturer and model for the target-tree build
3121 t_manufacturer
="rk27xx"
3127 modelname
="hifimanhm801"
3131 tool
="$rootdir/tools/scramble -rkw -modelnum=82"
3132 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3133 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3134 output
="rockbox.rkw"
3135 bootoutput
="bootloader.rkw"
3136 appextra
="recorder:gui"
3139 # toolset is the tools within the tools directory that we build for
3140 # this particular target.
3141 toolset
="$genericbitmaptools"
3142 # architecture, manufacturer and model for the target-tree build
3144 t_manufacturer
="rk27xx"
3160 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3161 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3163 bootoutput
="rockbox"
3164 appextra
="recorder:gui:radio"
3167 # architecture, manufacturer and model for the target-tree build
3169 t_manufacturer
="sdl"
3180 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3181 bindir
="/data/data/org.rockbox/lib"
3182 libdir
="/data/data/org.rockbox/app_rockbox"
3188 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3189 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3190 output
="librockbox.so"
3191 bootoutput
="librockbox.so"
3192 appextra
="recorder:gui:radio:hosted/android"
3195 # architecture, manufacturer and model for the target-tree build
3197 t_manufacturer
="android"
3204 modelname
="nokian8xx"
3207 sharedir
="/opt/rockbox/share/rockbox"
3208 bindir
="/opt/rockbox/bin"
3209 libdir
="/opt/rockbox/lib"
3215 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3216 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3218 bootoutput
="rockbox"
3219 appextra
="recorder:gui:radio"
3222 # architecture, manufacturer and model for the target-tree build
3224 t_manufacturer
="maemo"
3231 modelname
="nokian900"
3234 sharedir
="/opt/rockbox/share/rockbox"
3235 bindir
="/opt/rockbox/bin"
3236 libdir
="/opt/rockbox/lib"
3242 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3243 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3245 bootoutput
="rockbox"
3246 appextra
="recorder:gui:radio"
3249 # architecture, manufacturer and model for the target-tree build
3251 t_manufacturer
="maemo"
3261 sharedir
="rockbox/share/rockbox"
3262 bindir
="rockbox/bin"
3263 libdir
="rockbox/lib"
3269 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3270 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3272 bootoutput
="rockbox"
3273 appextra
="recorder:gui:radio"
3276 # architecture, manufacturer and model for the target-tree build
3278 t_manufacturer
="pandora"
3285 modelname
="samsungypr0"
3286 target
="SAMSUNG_YPR0"
3292 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3293 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3295 bootoutput
="rockbox"
3296 appextra
="recorder:gui:radio"
3299 # architecture, manufacturer and model for the target-tree build
3301 t_manufacturer
="ypr0"
3306 echo "Please select a supported target platform!"
3312 echo "Platform set to $modelname"
3316 ############################################################################
3317 # Amount of memory, for those that can differ. They have $memory unset at
3321 if [ -z "$memory" ]; then
3324 if [ "$ARG_RAM" ]; then
3327 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3340 if [ "$ARG_RAM" ]; then
3343 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3356 echo "Memory size selected: $memory MB"
3357 [ "$ARG_TYPE" ] ||
echo ""
3361 ##################################################################
3362 # Figure out build "type"
3365 # the ifp7x0 is the only platform that supports building a gdb stub like
3369 gdbstub
=", (G)DB stub"
3371 sansae200r|sansae200
)
3372 gdbstub
=", (I)nstaller"
3375 gdbstub
=", (E)raser"
3378 gdbstub
=", (E)raser"
3383 if [ "$ARG_TYPE" ]; then
3386 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (W)arble codec tool$gdbstub: (Defaults to N)"
3392 appsdir
='$(ROOTDIR)/bootloader'
3394 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3396 echo "e200R-installer build selected"
3399 appsdir
='$(ROOTDIR)/bootloader'
3401 extradefines
="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3403 echo "sansa eraser build selected"
3406 if test $t_manufacturer = "archos"; then
3407 # Archos SH-based players do this somewhat differently for
3409 appsdir
='$(ROOTDIR)/flash/bootbox'
3412 appsdir
='$(ROOTDIR)/bootloader'
3415 if test -n "$boottool"; then
3418 if test -n "$bootoutput"; then
3422 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3424 echo "Bootloader build selected"
3427 if [ "$modelname" = "sansae200r" ]; then
3428 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3433 extradefines
="$extradefines -DSIMULATOR"
3436 echo "Simulator build selected"
3439 echo "Advanced build selected"
3440 whichadvanced
$btype
3443 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3444 appsdir
='$(ROOTDIR)/gdb'
3453 echo "GDB stub build selected"
3461 extradefines
="$extradefines -DDEBUG"
3462 appsdir
='$(ROOTDIR)/tools/checkwps';
3463 output
='checkwps.'${modelname};
3465 echo "CheckWPS build selected"
3473 appsdir
='$(ROOTDIR)/tools/database';
3478 output
="database_${modelname}.exe"
3481 output
='database.'${modelname};
3485 echo "Database tool build selected"
3493 extradefines
="$extradefines -DDEBUG"
3494 output
='warble.'${modelname};
3496 echo "Warble build selected"
3499 if [ "$modelname" = "sansae200r" ]; then
3500 echo "Do not use the e200R target for regular builds. Use e200 instead."
3504 btype
="N" # set it explicitly since RET only gets here as well
3505 echo "Normal build selected"
3509 # to be able running "make manual" from non-manual configuration
3512 manualdev
="archosfmrecorder"
3515 manualdev
="iriverh100"
3518 manualdev
="ipodmini1g"
3521 manualdev
=$modelname
3525 if [ -z "$debug" ]; then
3526 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3529 if [ "yes" = "$application" ]; then
3530 echo Building Rockbox as an Application
3531 extradefines
="$extradefines -DAPPLICATION"
3534 echo "Using source code root directory: $rootdir"
3536 # this was once possible to change at build-time, but no more:
3541 if [ "yes" = "$simulator" ]; then
3542 # setup compiler and things for simulator
3545 if [ -d "simdisk" ]; then
3546 echo "Subdirectory 'simdisk' already present"
3549 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3553 # Now, figure out version number of the (gcc) compiler we are about to use
3554 gccver
=`$CC -dumpversion`;
3556 # figure out the binutil version too and display it, mostly for the build
3557 # system etc to be able to see it easier
3558 if [ $uname = "Darwin" ]; then
3559 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3561 ldver
=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
3564 if [ -z "$gccver" ]; then
3565 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3566 echo "[WARNING] this may cause your build to fail since we cannot do the"
3567 echo "[WARNING] checks we want now."
3570 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3573 num1
=`echo $gccver | cut -d . -f1`
3574 num2
=`echo $gccver | cut -d . -f2`
3575 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3582 echo "Using $CC $gccver ($gccnum)"
3584 if test "$gccnum" -ge "400"; then
3585 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3586 # so we ignore that warnings for now
3588 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3591 if test "$gccnum" -ge "402"; then
3592 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3593 # and later would throw it for several valid cases
3594 GCCOPTS
="$GCCOPTS -Wno-override-init"
3598 ""|
"$CROSS_COMPILE")
3602 # Verify that the cross-compiler is of a recommended version!
3603 if test "$gccver" != "$gccchoice"; then
3604 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3605 echo "WARNING: version $gccchoice!"
3606 echo "WARNING: This may cause your build to fail since it may be a version"
3607 echo "WARNING: that isn't functional or known to not be the best choice."
3608 echo "WARNING: If you suffer from build problems, you know that this is"
3609 echo "WARNING: a likely source for them..."
3617 echo "Using $LD $ldver"
3619 # check the compiler for SH platforms
3620 if test "$CC" = "sh-elf-gcc"; then
3621 if test "$gccnum" -lt "400"; then
3622 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3623 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3625 # figure out patch status
3626 gccpatch
=`$CC --version`;
3628 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3629 echo "gcc $gccver is rockbox patched"
3630 # then convert -O to -Os to get smaller binaries!
3631 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3633 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3634 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3639 if test "$CC" = "m68k-elf-gcc"; then
3640 # convert -O to -Os to get smaller binaries!
3641 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3644 if [ "$ARG_CCACHE" = "1" ]; then
3645 echo "Enable ccache for building"
3647 elif [ "$ARG_CCACHE" != "0" ]; then
3648 ccache
=`findtool ccache`
3649 if test -n "$ccache"; then
3650 echo "Found and uses ccache ($ccache)"
3654 # figure out the full path to the various commands if possible
3655 HOSTCC
=`findtool gcc --lit`
3656 HOSTAR
=`findtool ar --lit`
3657 CC
=`findtool ${CC} --lit`
3658 CPP
=`findtool ${CPP} --lit`
3659 LD
=`findtool ${LD} --lit`
3660 AR
=`findtool ${AR} --lit`
3661 AS
=`findtool ${AS} --lit`
3662 OC
=`findtool ${OC} --lit`
3663 WINDRES
=`findtool ${WINDRES} --lit`
3664 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3665 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3666 RANLIB
=`findtool ${RANLIB} --lit`
3669 if [ -z "$arch" ]; then
3670 cpp_defines
=$
(echo "" |
$CPP -dD)
3671 if [ -n "$(echo $cpp_defines | grep -w __sh__)" ]; then
3673 elif [ -n "$(echo $cpp_defines | grep -w __m68k__)" ]; then
3675 elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then
3677 elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
3679 elif [ -n "$(echo $cpp_defines | grep -w _X86_)" ]; then
3681 elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
3685 echo "Warning: Could not determine target arch"
3687 if [ "$arch" != "unknown" ]; then
3688 echo "Automatically selected arch: $arch"
3691 echo "Manually selected arch: $arch"
3694 if test -n "$ccache"; then
3698 if test "$ARG_ARM_THUMB" = "1"; then
3699 extradefines
="$extradefines -DUSE_THUMB"
3700 CC
="$toolsdir/thumb-cc.py $CC"
3703 if test "X$endian" = "Xbig"; then
3704 defendian
="ROCKBOX_BIG_ENDIAN"
3706 defendian
="ROCKBOX_LITTLE_ENDIAN"
3709 if [ "$ARG_RBDIR" != "" ]; then
3710 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3715 echo "Using alternate rockbox dir: ${rbdir}"
3718 cat > autoconf.h
<<EOF
3719 /* This header was made by configure */
3720 #ifndef __BUILD_AUTOCONF_H
3721 #define __BUILD_AUTOCONF_H
3723 /* Define endianess for the target or simulator platform */
3724 #define ${defendian} 1
3726 /* Define this if you build rockbox to support the logf logging and display */
3729 /* Define this if you want logf to output to the serial port */
3732 /* Define this to record a chart with timings for the stages of boot */
3735 /* optional define for a backlight modded Ondio */
3738 /* optional define for FM radio mod for iAudio M5 */
3741 /* optional define for ATA poweroff on Player */
3742 ${have_ata_poweroff}
3744 /* optional defines for RTC mod for h1x0 */
3748 /* the threading backend we use */
3749 #define ${thread_support}
3751 /* lcd dimensions for application builds from configure */
3755 /* root of Rockbox */
3756 #define ROCKBOX_DIR "${rbdir}"
3757 #define ROCKBOX_SHARE_PATH "${sharedir}"
3758 #define ROCKBOX_BINARY_PATH "${bindir}"
3759 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3761 #endif /* __BUILD_AUTOCONF_H */
3764 if test -n "$t_cpu"; then
3765 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3767 if [ "$application" = "yes" ] && [ "$t_manufacturer" = "maemo" ]; then
3768 # Maemo needs the SDL port, too
3769 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3770 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3771 elif [ "$application" = "yes" ] && [ "$t_manufacturer" = "pandora" ]; then
3772 # Pandora needs the SDL port, too
3773 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3774 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3775 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3776 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3777 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3780 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3781 test -n "$t_soc" && TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3782 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3786 if test "$swcodec" = "yes"; then
3787 voicetoolset
="rbspeexenc voicefont wavtrim"
3789 voicetoolset
="voicefont wavtrim"
3792 if test "$apps" = "apps"; then
3793 # only when we build "real" apps we build the .lng files
3797 #### Fix the cmdline ###
3798 if [ -n "$ARG_PREFIX" ]; then
3799 cmdline
="$cmdline --prefix=\$(PREFIX)"
3801 if [ -n "$ARG_LCDWIDTH" ]; then
3802 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3805 # remove parts from the cmdline we're going to set unconditionally
3806 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3807 -e s,--ram=[0-9]\*,,g \
3808 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3809 -e s,--type=[a-zA-Z]\*,,g`
3810 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3814 cat > Makefile
<<EOF
3815 ## Automatically generated. http://www.rockbox.org/
3817 export ROOTDIR=${rootdir}
3818 export FIRMDIR=\$(ROOTDIR)/firmware
3819 export APPSDIR=${appsdir}
3820 export TOOLSDIR=${toolsdir}
3821 export DOCSDIR=${rootdir}/docs
3822 export MANUALDIR=${rootdir}/manual
3823 export DEBUG=${debug}
3824 export MODELNAME=${modelname}
3825 export ARCHOSROM=${archosrom}
3826 export FLASHFILE=${flash}
3827 export TARGET_ID=${target_id}
3828 export TARGET=-D${target}
3831 export MANUFACTURER=${t_manufacturer}
3832 export OBJDIR=${pwd}
3833 export BUILDDIR=${pwd}
3834 export LANGUAGE=${language}
3835 export VOICELANGUAGE=${voicelanguage}
3836 export MEMORYSIZE=${memory}
3837 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3838 export MKFIRMWARE=${tool}
3839 export BMP2RB_MONO=${bmp2rb_mono}
3840 export BMP2RB_NATIVE=${bmp2rb_native}
3841 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3842 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3843 export BINARY=${output}
3844 export APPEXTRA=${appextra}
3845 export ENABLEDPLUGINS=${plugins}
3846 export SOFTWARECODECS=${swcodec}
3847 export EXTRA_DEFINES=${extradefines}
3848 export HOSTCC=${HOSTCC}
3849 export HOSTAR=${HOSTAR}
3856 export WINDRES=${WINDRES}
3857 export DLLTOOL=${DLLTOOL}
3858 export DLLWRAP=${DLLWRAP}
3859 export RANLIB=${RANLIB}
3860 export PREFIX=${ARG_PREFIX}
3861 export PROFILE_OPTS=${PROFILE_OPTS}
3862 export APP_TYPE=${app_type}
3863 export APPLICATION=${application}
3864 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3865 export GCCOPTS=${GCCOPTS}
3866 export TARGET_INC=${TARGET_INC}
3867 export LOADADDRESS=${loadaddress}
3868 export SHARED_LDFLAG=${SHARED_LDFLAG}
3869 export SHARED_CFLAGS=${SHARED_CFLAGS}
3870 export LDOPTS=${LDOPTS}
3871 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3872 export GCCVER=${gccver}
3873 export GCCNUM=${gccnum}
3874 export UNAME=${uname}
3875 export MANUALDEV=${manualdev}
3876 export TTS_OPTS=${TTS_OPTS}
3877 export TTS_ENGINE=${TTS_ENGINE}
3878 export ENC_OPTS=${ENC_OPTS}
3879 export ENCODER=${ENCODER}
3880 export USE_ELF=${USE_ELF}
3881 export RBDIR=${rbdir}
3882 export ROCKBOX_SHARE_PATH=${sharedir}
3883 export ROCKBOX_BINARY_PATH=${bindir}
3884 export ROCKBOX_LIBRARY_PATH=${libdir}
3885 export SDLCONFIG=${sdl}
3886 export LCDORIENTATION=${lcd_orientation}
3888 CONFIGURE_OPTIONS=${cmdline}
3890 include \$(TOOLSDIR)/root.make
3893 echo "Created Makefile"