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
228 # unset arch if already set shcc() and friends
234 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
236 GCCOPTS
="$GCCOPTS -fno-builtin -g"
238 LDOPTS
='-lm' # button-sdl.c uses sqrt()
241 endian
="" # endianess of the dap doesnt matter here
243 # default output binary name, don't override app_get_platform()
244 if [ "$app_type" != "sdl-app" ]; then
248 # default share option, override below if needed
249 SHARED_LDFLAG
="-shared"
250 SHARED_CFLAGS
="-fPIC -fvisibility=hidden"
252 if [ "$win32crosscompile" = "yes" ]; then
253 # We are crosscompiling
254 # add cross-compiler option(s)
255 LDOPTS
="$LDOPTS -mconsole"
258 CROSS_COMPILE
=${CROSS_COMPILE:-"i586-mingw32msvc-"}
260 prefixtools
"$CROSS_COMPILE"
262 endian
="little" # windows is little endian
263 echo "Enabling MMX support"
264 GCCOPTS
="$GCCOPTS -mmmx"
268 echo "Cygwin host detected"
271 LDOPTS
="$LDOPTS -mconsole"
278 echo "MinGW host detected"
281 LDOPTS
="$LDOPTS -mconsole"
287 sigaltstack
=`check_sigaltstack`
288 echo "Linux host detected"
289 LDOPTS
="$LDOPTS -ldl"
293 sigaltstack
=`check_sigaltstack`
294 echo "FreeBSD host detected"
295 LDOPTS
="$LDOPTS -ldl"
299 sigaltstack
=`check_sigaltstack`
300 echo "Darwin host detected"
301 LDOPTS
="$LDOPTS -ldl"
302 SHARED_LDFLAG
="-dynamiclib -Wl\,-single_module"
306 sigaltstack
=`check_sigaltstack`
307 echo "*Solaris host detected"
309 GCCOPTS
="$GCCOPTS -fPIC"
310 LDOPTS
="$LDOPTS -ldl"
314 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
320 if [ "$winbuild" != "yes" ]; then
321 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
322 if [ "`uname -m`" = "i686" ]; then
323 echo "Enabling MMX support"
324 GCCOPTS
="$GCCOPTS -mmmx"
328 sdl
=`findsdl $winbuild`
330 if [ -n `echo $app_type | grep "sdl"` ]; then
331 if [ -z "$sdl" ]; then
332 echo "configure didn't find sdl-config, which indicates that you"
333 echo "don't have SDL (properly) installed. Please correct and"
334 echo "re-run configure!"
337 # generic sdl-config checker
338 GCCOPTS
="$GCCOPTS `$sdl --cflags`"
339 LDOPTS
="$LDOPTS `$sdl --libs`"
344 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
345 # x86_64 supports MMX by default
347 if [ "$endian" = "" ]; then
349 cat >$tmpdir/conftest-
$id.c
<<EOF
351 int main(int argc, char **argv)
354 char *varp = (char *)&var;
361 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
362 # when cross compiling, the endianess cannot be detected because the above program doesn't run
363 # on the local machine. assume little endian but print a warning
364 endian
=`$tmpdir/conftest-$id 2> /dev/null`
365 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
374 if [ "$CROSS_COMPILE" != "" ]; then
375 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
378 if [ "$app_type" = "sdl-sim" ]; then
379 echo "Simulator environment deemed $endian endian"
380 elif [ "$app_type" = "sdl-app" ]; then
381 echo "Application environment deemed $endian endian"
382 elif [ "$app_type" = "checkwps" ]; then
383 echo "CheckWPS environment deemed $endian endian"
386 # use wildcard here to make it work even if it was named *.exe like
388 rm -f $tmpdir/conftest-
$id*
391 if [ -z "$ARG_THREAD_SUPPORT" ] ||
[ "$ARG_THREAD_SUPPORT" = "0" ]; then
392 if [ "$sigaltstack" = "0" ]; then
393 thread_support
="HAVE_SIGALTSTACK_THREADS"
394 LDOPTS
="$LDOPTS -lpthread" # pthread needed
395 echo "Selected sigaltstack threads"
396 elif [ "$fibers" = "0" ]; then
397 thread_support
="HAVE_WIN32_FIBER_THREADS"
398 echo "Selected Win32 Fiber threads"
402 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
403 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
404 thread_support
="HAVE_SDL_THREADS"
405 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
406 echo "Selected SDL threads"
408 echo "WARNING: Falling back to SDL threads"
414 # functions for setting up cross-compiler names and options
415 # also set endianess and what the exact recommended gcc version is
416 # the gcc version should most likely match what versions we build with
421 GCCOPTS
="$CCOPTS -m1"
422 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
428 prefixtools calmrisc16-unknown-elf-
429 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
430 GCCOPTIMIZE
="-fomit-frame-pointer"
435 prefixtools m68k-elf-
436 GCCOPTS
="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
437 GCCOPTIMIZE
="-fomit-frame-pointer"
444 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
445 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" = "0"; then
446 GCCOPTS
="$GCCOPTS -mlong-calls"
448 GCCOPTIMIZE
="-fomit-frame-pointer"
454 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
455 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
456 GCCOPTS
="$GCCOPTS -mlong-calls"
458 GCCOPTIMIZE
="-fomit-frame-pointer"
464 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
465 if test "$ARG_ARM_EABI" = "0"; then
466 GCCOPTS
="$GCCOPTS -mlong-calls"
468 GCCOPTIMIZE
="-fomit-frame-pointer"
474 GCCOPTS
="$CCOPTS -mcpu=arm940t"
475 if test "$ARG_ARM_EABI" = "0"; then
476 GCCOPTS
="$GCCOPTS -mlong-calls"
478 GCCOPTIMIZE
="-fomit-frame-pointer"
484 GCCOPTS
="$CCOPTS -mcpu=arm9e"
485 if test "$ARG_ARM_EABI" = "0"; then
486 GCCOPTS
="$GCCOPTS -mlong-calls"
488 GCCOPTIMIZE
="-fomit-frame-pointer"
494 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
495 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" = "0"; then
496 GCCOPTS
="$GCCOPTS -mlong-calls"
498 GCCOPTIMIZE
="-fomit-frame-pointer"
504 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
505 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" = "0"; then
506 GCCOPTS
="$GCCOPTS -mlong-calls"
508 GCCOPTIMIZE
="-fomit-frame-pointer"
514 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
515 if test "$ARG_ARM_EABI" = "0"; then
516 GCCOPTS
="$GCCOPTS -mlong-calls"
518 GCCOPTIMIZE
="-fomit-frame-pointer"
524 GCCOPTS
="$CCOPTS -march=armv5te"
525 GCCOPTIMIZE
="-fomit-frame-pointer"
531 arch_version
=32 # FIXME: autodetect version (32 or 64)
532 prefixtools mipsel-elf-
533 # mips is predefined, but we want it for paths. use __mips instead
534 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
535 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
536 GCCOPTIMIZE
="-fomit-frame-pointer"
542 # Scratchbox sets up "gcc" based on the active target
545 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
546 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
548 LDOPTS
="-lm -ldl $LDOPTS"
549 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
550 SHARED_LDFLAG
="-shared"
553 thread_support
="HAVE_SIGALTSTACK_THREADS"
556 # Determine maemo version
557 if pkg-config
--atleast-version=5 maemo-version
; then
558 if [ "$1" == "4" ]; then
559 echo "ERROR: Maemo 4 SDK required."
562 extradefines
="$extradefines -DMAEMO5"
563 echo "Found N900 maemo version"
565 elif pkg-config
--atleast-version=4 maemo-version
; then
566 if [ "$1" == "5" ]; then
567 echo "ERROR: Maemo 5 SDK required."
570 extradefines
="$extradefines -DMAEMO4"
571 echo "Found N8xx maemo version"
573 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
578 if [ $is_n900 -eq 1 ]; then
579 GCCOPTS
="$GCCOPTS `pkg-config --cflags sdl`"
580 LDOPTS
="$LDOPTS `pkg-config --libs sdl`"
582 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
583 LDOPTS
="$LDOPTS `sdl-config --libs`"
586 # glib and libosso support
587 GCCOPTS
="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
588 LDOPTS
="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
590 # libhal support: Battery monitoring
591 GCCOPTS
="$GCCOPTS `pkg-config --cflags hal`"
592 LDOPTS
="$LDOPTS `pkg-config --libs hal`"
594 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
595 if [ $is_n900 -eq 1 ]; then
596 # gstreamer support: Audio output.
597 GCCOPTS
="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
598 LDOPTS
="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
600 # N900 specific: libplayback support
601 GCCOPTS
="$GCCOPTS `pkg-config --cflags libplayback-1`"
602 LDOPTS
="$LDOPTS `pkg-config --libs libplayback-1`"
604 # N900 specific: Enable ARMv7 NEON support
605 if sb-conf show
-A |
grep -q -i arm
; then
606 echo "Detected ARM target"
607 GCCOPTS
="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
608 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
610 echo "Detected x86 target"
613 # N8xx specific: Enable armv5te instructions
614 if sb-conf show
-A |
grep -q -i arm
; then
615 echo "Detected ARM target"
616 GCCOPTS
="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
617 extradefines
="$extradefines -DMAEMO_ARM_BUILD"
619 echo "Detected x86 target"
625 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
626 # You have to use the sebt3 toolchain:
627 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
629 PNDSDK
="/usr/local/angstrom/arm"
630 if [ ! -x $PNDSDK/bin
/arm-angstrom-linux-gnueabi-gcc
]; then
631 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
635 PATH
=$PNDSDK/bin
:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/bin
636 PKG_CONFIG_PATH
=$PNDSDK/arm-angstrom-linux-gnueabi
/usr
/lib
/pkgconfig
637 LDOPTS
="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
638 PKG_CONFIG
="pkg-config"
640 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
641 GCCOPTS
="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
643 LDOPTS
="-lm -ldl $LDOPTS"
644 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
645 SHARED_LDFLAG
="-shared"
648 thread_support
="HAVE_SIGALTSTACK_THREADS"
651 GCCOPTS
="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
655 prefixtools
"$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
658 GCCOPTS
="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
659 LDOPTS
="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
662 GCCOPTS
="$GCCOPTS -O2 -fno-strict-aliasing"
663 GCCOPTS
="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
664 GCCOPTS
="$GCCOPTS -ffast-math -fsingle-precision-constant"
669 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
671 LDOPTS
="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
672 GLOBAL_LDOPTS
="$GLOBAL_LDOPTS -Wl,-z,defs"
673 SHARED_LDFLAG
="-shared"
676 thread_support
="HAVE_SIGALTSTACK_THREADS"
680 GCCOPTS
="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
684 prefixtools
"arm-ypr0-linux-gnueabi-"
688 if [ -z "$ANDROID_SDK_PATH" ]; then
689 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
690 echo "environment variable point to the root directory of the Android SDK."
693 if [ -z "$ANDROID_NDK_PATH" ]; then
694 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
695 echo "environment variable point to the root directory of the Android NDK."
698 buildhost
=$
(uname |
tr "[:upper:]" "[:lower:]")
700 gcctarget
="arm-linux-androideabi-"
701 gccprefix
=$ANDROID_NDK_PATH/toolchains
/$gcctarget$gccchoice/prebuilt
/$buildhost-x86
702 PATH
=$PATH:$gccprefix/bin
703 prefixtools
$gcctarget
704 GCCOPTS
=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
705 GCCOPTS
="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
706 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
707 GLOBAL_LDOPTS
="-Wl,-z,defs -Wl,-z,noexecstack"
708 LDOPTS
="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
710 SHARED_LDFLAG
="-shared"
714 atype
=`echo "$1" | cut -c 2-`
715 ##################################################################
716 # Prompt for specific developer options
718 if [ "$atype" ]; then
723 printf "Enter your developer options (press only enter when done)\n\
724 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
725 (T)est plugins, S(m)all C lib, Logf to Ser(i)al port:"
726 if [ "$modelname" = "archosplayer" ]; then
727 printf ", Use (A)TA poweroff"
729 if [ "$t_model" = "ondio" ]; then
730 printf ", (B)acklight MOD"
732 if [ "$modelname" = "iaudiom5" ]; then
733 printf ", (F)M radio MOD"
735 if [ "$modelname" = "iriverh120" ]; then
742 while [ $cont = "1" ]; do
744 if [ "$interact" ]; then
747 option
=`echo "$atype" | cut -c 1`
752 if [ "yes" = "$profile" ]; then
753 echo "Debug is incompatible with profiling"
755 echo "DEBUG build enabled"
760 echo "logf() support enabled"
764 echo "Using Rockbox' small C library"
765 extradefines
="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
768 echo "Including test plugins"
769 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
772 echo "bootchart enabled (logf also enabled)"
777 echo "Logf to serial port enabled (logf also enabled)"
782 echo "Simulator build enabled"
786 if [ "yes" = "$use_debug" ]; then
787 echo "Profiling is incompatible with debug"
789 echo "Profiling support is enabled"
794 echo "Voice build selected"
798 if [ "$modelname" = "archosplayer" ]; then
799 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
800 echo "ATA power off enabled"
804 if [ "$t_model" = "ondio" ]; then
805 have_backlight
="#define HAVE_BACKLIGHT"
806 echo "Backlight functions enabled"
810 if [ "$modelname" = "iaudiom5" ]; then
811 have_fmradio_in
="#define HAVE_FMRADIO_IN"
812 echo "FM radio functions enabled"
816 if [ "$modelname" = "iriverh120" ]; then
817 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
818 have_rtc_alarm
="#define HAVE_RTC_ALARM"
819 echo "RTC functions enabled (DS1339/DS3231)"
823 echo "Enabling Windows 32 cross-compiling"
824 win32crosscompile
="yes"
826 "") # Match enter press when finished with advanced options
830 echo "[ERROR] Option $option unsupported"
833 if [ "$interact" ]; then
834 btype
="$btype$option"
836 atype
=`echo "$atype" | cut -c 2-`
837 [ "$atype" ] || cont
=0
842 if [ "yes" = "$voice" ]; then
843 # Ask about languages to build
845 voicelanguage
=`whichlang`
846 echo "Voice language set to $voicelanguage"
848 # Configure encoder and TTS engine for each language
849 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
850 voiceconfig
"$thislang"
853 if [ "yes" = "$use_debug" ]; then
855 GCCOPTS
="$GCCOPTS -g -DDEBUG"
857 if [ "yes" = "$logf" ]; then
858 use_logf
="#define ROCKBOX_HAS_LOGF 1"
860 if [ "yes" = "$logf_serial" ]; then
861 use_logf_serial
="#define LOGF_SERIAL 1"
863 if [ "yes" = "$bootchart" ]; then
864 use_bootchart
="#define DO_BOOTCHART 1"
866 if [ "yes" = "$simulator" ]; then
868 extradefines
="$extradefines -DSIMULATOR"
872 if [ "yes" = "$profile" ]; then
873 extradefines
="$extradefines -DRB_PROFILE"
874 PROFILE_OPTS
="-finstrument-functions"
878 # Configure voice settings
881 if [ ! "$ARG_TTS" ]; then
882 echo "Building $thislang voice for $modelname. Select options"
886 if [ -n "`findtool flite`" ]; then
890 DEFAULT_TTS_OPTS
=$FLITE_OPTS
891 DEFAULT_NOISEFLOOR
="500"
894 if [ -n "`findtool espeak`" ]; then
898 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
899 DEFAULT_NOISEFLOOR
="500"
902 if [ -n "`findtool festival`" ]; then
903 FESTIVAL
="(F)estival "
906 FESTIVAL_OPTS
="--language italian"
909 FESTIVAL_OPTS
="--language spanish"
912 FESTIVAL_OPTS
="--language finnish"
915 FESTIVAL_OPTS
="--language czech"
921 DEFAULT_TTS
="festival"
922 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
923 DEFAULT_NOISEFLOOR
="500"
926 if [ -n "`findtool swift`" ]; then
930 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
931 DEFAULT_NOISEFLOOR
="500"
934 # Allow SAPI if Windows is in use
935 if [ -n "`findtool winver`" ]; then
939 DEFAULT_TTS_OPTS
=$SAPI_OPTS
940 DEFAULT_NOISEFLOOR
="500"
944 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
945 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
949 if [ "$ARG_TTS" ]; then
952 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
954 if [ -z "$option" ]; then option
=${DEFAULT_CHOICE}; fi
955 advopts
="$advopts --tts=$option"
960 NOISEFLOOR
="500" # TODO: check this value
966 TTS_OPTS
=$ESPEAK_OPTS
969 TTS_ENGINE
="festival"
971 TTS_OPTS
=$FESTIVAL_OPTS
984 TTS_ENGINE
=$DEFAULT_TTS
985 TTS_OPTS
=$DEFAULT_TTS_OPTS
986 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
988 echo "Using $TTS_ENGINE for TTS"
990 # Select which voice to use for Festival
991 if [ "$TTS_ENGINE" = "festival" ]; then
992 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
993 for voice
in $voicelist; do
994 TTS_FESTIVAL_VOICE
="$voice" # Default choice
997 if [ "$ARG_VOICE" ]; then
1001 for voice
in $voicelist; do
1002 printf "%3d. %s\n" "$i" "$voice"
1005 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
1009 for voice
in $voicelist; do
1010 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
1011 TTS_FESTIVAL_VOICE
="$voice"
1015 advopts
="$advopts --voice=$CHOICE"
1016 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1017 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1020 # Read custom tts options from command line
1021 if [ "$ARG_TTSOPTS" ]; then
1022 TTS_OPTS
="$ARG_TTSOPTS"
1023 echo "$TTS_ENGINE options set to $TTS_OPTS"
1026 if [ "$swcodec" = "yes" ]; then
1027 ENCODER
="rbspeexenc"
1028 ENC_OPTS
="-q 4 -c 10"
1030 if [ -n "`findtool lame`" ]; then
1032 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
1034 echo "You need LAME in the system path to build voice files for"
1035 echo "HWCODEC targets."
1040 echo "Using $ENCODER for encoding voice clips"
1042 # Read custom encoder options from command line
1043 if [ "$ARG_ENCOPTS" ]; then
1044 ENC_OPTS
="$ARG_ENCOPTS"
1045 echo "$ENCODER options set to $ENC_OPTS"
1049 if [ -n "`findtool cygpath`" ]; then
1050 TEMPDIR
=`cygpath . -a -w`
1055 # figure out which languages that are around
1056 for file in $rootdir/apps
/lang
/*.lang
; do
1057 clean
=`basename $file .lang`
1058 langs
="$langs $clean"
1061 if [ "$ARG_LANG" ]; then
1064 echo "Select a number for the language to use (default is english)"
1065 # FIXME The multiple-language feature is currently broken
1066 # echo "You may enter a comma-separated list of languages to build"
1069 for one
in $langs; do
1074 advopts
="$advopts --language=$pick"
1080 # Allow the user to pass a comma-separated list of langauges
1081 for thispick
in `echo $pick | sed 's/,/ /g'`; do
1083 for one
in $langs; do
1084 # Accept both the language number and name
1085 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
1086 if [ "$output" = "" ]; then
1095 if [ -z "$output" ]; then
1103 echo "Rockbox configure script."
1104 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1105 echo "Do *NOT* run this within the tools directory!"
1108 Usage: configure [OPTION]...
1110 --target=TARGET Sets the target, TARGET can be either the target ID or
1111 corresponding string. Run without this option to see all
1114 --ram=RAM Sets the RAM for certain targets. Even though any number
1115 is accepted, not every number is correct. The default
1116 value will be applied, if you entered a wrong number
1117 (which depends on the target). Watch the output. Run
1118 without this option if you are not sure which the right
1121 --type=TYPE Sets the build type. Shortcuts are also valid.
1122 Run without this option to see all available types.
1123 Multiple values are allowed and managed in the input
1124 order. So --type=b stands for Bootloader build, while
1125 --type=ab stands for "Backlight MOD" build.
1127 --lcdwidth=X Sets the width of the LCD. Used only for application
1130 --lcdheight=Y Sets the height of the LCD. Used only for application
1133 --language=LANG Set the language used for voice generation (used only if
1136 --tts=ENGINE Set the TTS engine used for voice generation (used only
1139 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1142 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1144 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
1146 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1147 This is useful for having multiple alternate builds on
1148 your device that you can load with ROLO. However as the
1149 bootloader looks for .rockbox you won't be able to boot
1152 --ccache Enable ccache use (done by default these days)
1153 --no-ccache Disable ccache use
1155 --eabi Make configure prefer toolchains that are able to compile
1156 for the new ARM standard abi EABI
1157 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
1158 --thumb Build with -mthumb (for ARM builds)
1159 --no-thumb The opposite of --thumb (don't use thumb even for targets
1160 where this is the default
1161 --sdl-threads Force use of SDL threads. They have inferior performance,
1162 but are better debuggable with GDB
1163 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1164 behavior of falling back to them if no native thread
1166 --prefix Target installation directory
1167 --help Shows this message (must not be used with other options)
1186 ARG_PREFIX
="$PREFIX"
1191 --ccache) ARG_CCACHE
=1;;
1192 --no-ccache) ARG_CCACHE
=0;;
1193 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
1194 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
1195 --lcdwidth=*) ARG_LCDWIDTH
=`echo "$arg" | cut -d = -f 2`;;
1196 --lcdheight=*) ARG_LCDHEIGHT
=`echo "$arg" | cut -d = -f 2`;;
1197 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
1198 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
1199 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
1200 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
1201 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
1202 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
1203 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
1204 --eabi) ARG_ARM_EABI
=1;;
1205 --no-eabi) ARG_ARM_EABI
=0;;
1206 --thumb) ARG_ARM_THUMB
=1;;
1207 --no-thumb) ARG_ARM_THUMB
=0;;
1208 --sdl-threads)ARG_THREAD_SUPPORT
=1;;
1210 ARG_THREAD_SUPPORT
=0;;
1211 --prefix=*) ARG_PREFIX
=`echo "$arg" | cut -d = -f 2`;;
1213 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
1216 [ "$err" ] && exit 1
1220 if [ "$TMPDIR" != "" ]; then
1225 echo Using temporary directory
$tmpdir
1227 if test -r "configure"; then
1228 # this is a check for a configure script in the current directory, it there
1229 # is one, try to figure out if it is this one!
1231 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
1232 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1233 echo "It will only cause you pain and grief. Instead do this:"
1236 echo " mkdir build-dir"
1237 echo " cd build-dir"
1238 echo " ../tools/configure"
1240 echo "Much happiness will arise from this. Enjoy"
1245 # get our current directory
1248 if { echo $pwd |
grep " "; } then
1249 echo "You're running this script in a path that contains space. The build"
1250 echo "system is unfortunately not clever enough to deal with this. Please"
1251 echo "run the script from a different path, rename the path or fix the build"
1256 if [ -z "$rootdir" ]; then
1257 ##################################################################
1258 # Figure out where the source code root is!
1260 rootdir
=`dirname $0`/..
/
1262 #####################################################################
1263 # Convert the possibly relative directory name to an absolute version
1269 # cd back to the build dir
1274 appsdir
='$(ROOTDIR)/apps'
1275 toolsdir
='$(ROOTDIR)/tools'
1278 ##################################################################
1279 # Figure out target platform
1282 if [ "$ARG_TARGET" ]; then
1283 buildfor
=$ARG_TARGET
1285 echo "Enter target platform:"
1287 ==Archos== ==iriver== ==Apple iPod==
1288 0) Player/Studio 10) H120/H140 20) Color/Photo
1289 1) Recorder 11) H320/H340 21) Nano 1G
1290 2) FM Recorder 12) iHP-100/110/115 22) Video
1291 3) Recorder v2 13) iFP-790 23) 3G
1292 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1293 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1294 6) AV300 26) Mini 2G
1295 ==Toshiba== 27) 1G, 2G
1296 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
1297 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1299 32) 7 ==Olympus= ==SanDisk==
1300 33) D2 70) M:Robe 500 50) Sansa e200
1301 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1303 ==Creative== ==Philips== 53) Sansa m200
1304 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1305 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1306 92) Zen Vision HDD1830 56) Sansa e200v2
1307 102) GoGear HDD6330 57) Sansa m200v4
1308 ==Onda== 58) Sansa Fuze
1309 120) VX747 ==Meizu== 59) Sansa c200v2
1310 121) VX767 110) M6SL 60) Sansa Clipv2
1311 122) VX747+ 111) M6SP 61) Sansa View
1312 123) VX777 112) M3 62) Sansa Clip+
1314 ==Samsung== ==Tatung== 64) Sansa Fuze+
1315 140) YH-820 150) Elio TPJ-1022 65) Sansa Clip Zip
1316 141) YH-920 66) Sansa Connect
1317 142) YH-925 ==Packard Bell==
1318 143) YP-S3 160) Vibe 500 ==Logik==
1320 ==Application== ==MPIO==
1321 200) SDL 170) HD200 ==Lyre project==
1322 201) Android 171) HD300 130) Lyre proto 1
1323 202) Nokia N8xx 131) Mini2440
1324 203) Nokia N900 ==ROCKCHIP== ==HiFiMAN==
1325 204) Pandora 180) rk27xx generic 190) HM-60x
1326 205) Samsung YP-R0 191) HM-801
1333 # Set of tools built for all target platforms:
1334 toolset
="rdf2binary convbdf codepages"
1336 # Toolsets for some target families:
1337 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
1338 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1339 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
1340 ipodbitmaptools
="$toolset scramble bmp2rb"
1341 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
1342 tccbitmaptools
="$toolset scramble bmp2rb"
1343 # generic is used by IFP, Meizu and Onda
1344 genericbitmaptools
="$toolset bmp2rb"
1345 # scramble is used by all other targets
1346 scramblebitmaptools
="$genericbitmaptools scramble"
1349 # ---- For each target ----
1352 # target_id: a unique number identifying this target, IS NOT the menu number.
1353 # Just use the currently highest number+1 when you add a new
1355 # modelname: short model name used all over to identify this target
1356 # memory: number of megabytes of RAM this target has. If the amount can
1357 # be selected by the size prompt, let memory be unset here
1358 # target: -Ddefine passed to the build commands to make the correct
1359 # config-*.h file get included etc
1360 # tool: the tool that takes a plain binary and converts that into a
1361 # working "firmware" file for your target
1362 # output: the final output file name
1363 # boottool: the tool that takes a plain binary and generates a bootloader
1364 # file for your target (or blank to use $tool)
1365 # bootoutput:the final output file name for the bootloader (or blank to use
1367 # appextra: passed to the APPEXTRA variable in the Makefiles.
1368 # TODO: add proper explanation
1369 # archosrom: used only for Archos targets that build a special flashable .ucl
1371 # flash: name of output for flashing, for targets where there's a special
1372 # file output for this.
1373 # plugins: set to 'yes' to build the plugins. Early development builds can
1374 # set this to no in the early stages to have an easier life for a
1376 # swcodec: set 'yes' on swcodec targets
1377 # toolset: lists what particular tools in the tools/ directory that this
1378 # target needs to have built prior to building Rockbox
1381 # *cc: sets up gcc and compiler options for your target builds. Note
1382 # that if you select a simulator build, the compiler selection is
1383 # overridden later in the script.
1389 modelname
="archosplayer"
1390 target
="ARCHOS_PLAYER"
1392 tool
="$rootdir/tools/scramble"
1394 appextra
="player:gui"
1395 archosrom
="$pwd/rombox.ucl"
1396 flash
="$pwd/rockbox.ucl"
1400 # toolset is the tools within the tools directory that we build for
1401 # this particular target.
1402 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1404 # Note: the convbdf is present in the toolset just because: 1) the
1405 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1406 # build the player simulator
1409 t_manufacturer
="archos"
1415 modelname
="archosrecorder"
1416 target
="ARCHOS_RECORDER"
1418 tool
="$rootdir/tools/scramble"
1419 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1420 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1422 appextra
="recorder:gui:radio"
1423 #archosrom="$pwd/rombox.ucl"
1424 flash
="$pwd/rockbox.ucl"
1427 # toolset is the tools within the tools directory that we build for
1428 # this particular target.
1429 toolset
=$archosbitmaptools
1431 t_manufacturer
="archos"
1437 modelname
="archosfmrecorder"
1438 target
="ARCHOS_FMRECORDER"
1440 tool
="$rootdir/tools/scramble -fm"
1441 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1442 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1444 appextra
="recorder:gui:radio"
1445 #archosrom="$pwd/rombox.ucl"
1446 flash
="$pwd/rockbox.ucl"
1449 # toolset is the tools within the tools directory that we build for
1450 # this particular target.
1451 toolset
=$archosbitmaptools
1453 t_manufacturer
="archos"
1459 modelname
="archosrecorderv2"
1460 target
="ARCHOS_RECORDERV2"
1462 tool
="$rootdir/tools/scramble -v2"
1463 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1464 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1466 appextra
="recorder:gui:radio"
1467 #archosrom="$pwd/rombox.ucl"
1468 flash
="$pwd/rockbox.ucl"
1471 # toolset is the tools within the tools directory that we build for
1472 # this particular target.
1473 toolset
=$archosbitmaptools
1475 t_manufacturer
="archos"
1481 modelname
="archosondiosp"
1482 target
="ARCHOS_ONDIOSP"
1484 tool
="$rootdir/tools/scramble -osp"
1485 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1486 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1488 appextra
="recorder:gui:radio"
1489 #archosrom="$pwd/rombox.ucl"
1490 flash
="$pwd/rockbox.ucl"
1493 # toolset is the tools within the tools directory that we build for
1494 # this particular target.
1495 toolset
=$archosbitmaptools
1497 t_manufacturer
="archos"
1503 modelname
="archosondiofm"
1504 target
="ARCHOS_ONDIOFM"
1506 tool
="$rootdir/tools/scramble -ofm"
1507 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1508 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1510 appextra
="recorder:gui:radio"
1511 #archosrom="$pwd/rombox.ucl"
1512 flash
="$pwd/rockbox.ucl"
1515 toolset
=$archosbitmaptools
1517 t_manufacturer
="archos"
1523 modelname
="archosav300"
1524 target
="ARCHOS_AV300"
1527 tool
="$rootdir/tools/scramble -mm=C"
1528 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1529 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1531 appextra
="recorder:gui:radio"
1534 # toolset is the tools within the tools directory that we build for
1535 # this particular target.
1536 toolset
="$toolset scramble descramble bmp2rb"
1537 # architecture, manufacturer and model for the target-tree build
1539 t_manufacturer
="archos"
1545 modelname
="iriverh120"
1546 target
="IRIVER_H120"
1549 tool
="$rootdir/tools/scramble -add=h120"
1550 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1551 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1552 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1553 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1554 output
="rockbox.iriver"
1555 bootoutput
="bootloader.iriver"
1556 appextra
="recorder:gui:radio"
1557 flash
="$pwd/rombox.iriver"
1560 # toolset is the tools within the tools directory that we build for
1561 # this particular target.
1562 toolset
=$iriverbitmaptools
1564 t_manufacturer
="iriver"
1570 modelname
="iriverh300"
1571 target
="IRIVER_H300"
1574 tool
="$rootdir/tools/scramble -add=h300"
1575 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1576 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1577 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1578 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1579 output
="rockbox.iriver"
1580 appextra
="recorder:gui:radio"
1583 # toolset is the tools within the tools directory that we build for
1584 # this particular target.
1585 toolset
=$iriverbitmaptools
1587 t_manufacturer
="iriver"
1593 modelname
="iriverh100"
1594 target
="IRIVER_H100"
1597 tool
="$rootdir/tools/scramble -add=h100"
1598 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1599 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1600 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1601 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1602 output
="rockbox.iriver"
1603 bootoutput
="bootloader.iriver"
1604 appextra
="recorder:gui:radio"
1605 flash
="$pwd/rombox.iriver"
1608 # toolset is the tools within the tools directory that we build for
1609 # this particular target.
1610 toolset
=$iriverbitmaptools
1612 t_manufacturer
="iriver"
1618 modelname
="iriverifp7xx"
1619 target
="IRIVER_IFP7XX"
1623 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1624 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1625 output
="rockbox.wma"
1626 appextra
="recorder:gui:radio"
1629 # toolset is the tools within the tools directory that we build for
1630 # this particular target.
1631 toolset
=$genericbitmaptools
1633 t_manufacturer
="pnx0101"
1634 t_model
="iriver-ifp7xx"
1639 modelname
="iriverh10"
1643 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1644 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1645 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1646 output
="rockbox.mi4"
1647 appextra
="recorder:gui:radio"
1650 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1651 bootoutput
="H10_20GC.mi4"
1652 # toolset is the tools within the tools directory that we build for
1653 # this particular target.
1654 toolset
=$scramblebitmaptools
1655 # architecture, manufacturer and model for the target-tree build
1658 t_manufacturer
="iriver"
1664 modelname
="iriverh10_5gb"
1665 target
="IRIVER_H10_5GB"
1668 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1669 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1670 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1671 output
="rockbox.mi4"
1672 appextra
="recorder:gui:radio"
1675 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1676 bootoutput
="H10.mi4"
1677 # toolset is the tools within the tools directory that we build for
1678 # this particular target.
1679 toolset
=$scramblebitmaptools
1680 # architecture, manufacturer and model for the target-tree build
1683 t_manufacturer
="iriver"
1689 modelname
="ipodcolor"
1693 tool
="$rootdir/tools/scramble -add=ipco"
1694 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1695 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1696 output
="rockbox.ipod"
1697 appextra
="recorder:gui:radio"
1700 bootoutput
="bootloader-$modelname.ipod"
1701 # toolset is the tools within the tools directory that we build for
1702 # this particular target.
1703 toolset
=$ipodbitmaptools
1704 # architecture, manufacturer and model for the target-tree build
1707 t_manufacturer
="ipod"
1713 modelname
="ipodnano1g"
1717 tool
="$rootdir/tools/scramble -add=nano"
1718 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1719 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1720 output
="rockbox.ipod"
1721 appextra
="recorder:gui:radio"
1724 bootoutput
="bootloader-$modelname.ipod"
1725 # toolset is the tools within the tools directory that we build for
1726 # this particular target.
1727 toolset
=$ipodbitmaptools
1728 # architecture, manufacturer and model for the target-tree build
1731 t_manufacturer
="ipod"
1737 modelname
="ipodvideo"
1739 memory
=64 # always. This is reduced at runtime if needed
1741 tool
="$rootdir/tools/scramble -add=ipvd"
1742 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1743 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1744 output
="rockbox.ipod"
1745 appextra
="recorder:gui:radio"
1748 bootoutput
="bootloader-$modelname.ipod"
1749 # toolset is the tools within the tools directory that we build for
1750 # this particular target.
1751 toolset
=$ipodbitmaptools
1752 # architecture, manufacturer and model for the target-tree build
1755 t_manufacturer
="ipod"
1765 tool
="$rootdir/tools/scramble -add=ip3g"
1766 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1767 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1768 output
="rockbox.ipod"
1769 appextra
="recorder:gui:radio"
1772 bootoutput
="bootloader-$modelname.ipod"
1773 # toolset is the tools within the tools directory that we build for
1774 # this particular target.
1775 toolset
=$ipodbitmaptools
1776 # architecture, manufacturer and model for the target-tree build
1779 t_manufacturer
="ipod"
1789 tool
="$rootdir/tools/scramble -add=ip4g"
1790 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1791 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1792 output
="rockbox.ipod"
1793 appextra
="recorder:gui:radio"
1796 bootoutput
="bootloader-$modelname.ipod"
1797 # toolset is the tools within the tools directory that we build for
1798 # this particular target.
1799 toolset
=$ipodbitmaptools
1800 # architecture, manufacturer and model for the target-tree build
1803 t_manufacturer
="ipod"
1809 modelname
="ipodmini1g"
1813 tool
="$rootdir/tools/scramble -add=mini"
1814 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1815 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1816 output
="rockbox.ipod"
1817 appextra
="recorder:gui:radio"
1820 bootoutput
="bootloader-$modelname.ipod"
1821 # toolset is the tools within the tools directory that we build for
1822 # this particular target.
1823 toolset
=$ipodbitmaptools
1824 # architecture, manufacturer and model for the target-tree build
1827 t_manufacturer
="ipod"
1833 modelname
="ipodmini2g"
1834 target
="IPOD_MINI2G"
1837 tool
="$rootdir/tools/scramble -add=mn2g"
1838 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1839 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1840 output
="rockbox.ipod"
1841 appextra
="recorder:gui:radio"
1844 bootoutput
="bootloader-$modelname.ipod"
1845 # toolset is the tools within the tools directory that we build for
1846 # this particular target.
1847 toolset
=$ipodbitmaptools
1848 # architecture, manufacturer and model for the target-tree build
1851 t_manufacturer
="ipod"
1857 modelname
="ipod1g2g"
1861 tool
="$rootdir/tools/scramble -add=1g2g"
1862 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1863 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1864 output
="rockbox.ipod"
1865 appextra
="recorder:gui:radio"
1868 bootoutput
="bootloader-$modelname.ipod"
1869 # toolset is the tools within the tools directory that we build for
1870 # this particular target.
1871 toolset
=$ipodbitmaptools
1872 # architecture, manufacturer and model for the target-tree build
1875 t_manufacturer
="ipod"
1881 modelname
="ipodnano2g"
1882 target
="IPOD_NANO2G"
1885 tool
="$rootdir/tools/scramble -add=nn2g"
1886 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1887 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1888 output
="rockbox.ipod"
1889 appextra
="recorder:gui:radio"
1892 bootoutput
="bootloader-$modelname.ipod"
1893 # toolset is the tools within the tools directory that we build for
1894 # this particular target.
1895 toolset
=$ipodbitmaptools
1896 # architecture, manufacturer and model for the target-tree build
1898 t_manufacturer
="s5l8700"
1899 t_model
="ipodnano2g"
1908 tool
="$rootdir/tools/scramble -add=ip6g"
1909 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1910 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1911 output
="rockbox.ipod"
1912 appextra
="recorder:gui:radio"
1915 bootoutput
="bootloader-$modelname.ipod"
1916 # toolset is the tools within the tools directory that we build for
1917 # this particular target.
1918 toolset
=$ipodbitmaptools
1919 # architecture, manufacturer and model for the target-tree build
1921 t_manufacturer
="s5l8702"
1927 modelname
="iaudiox5"
1931 tool
="$rootdir/tools/scramble -add=iax5"
1932 boottool
="$rootdir/tools/scramble -iaudiox5"
1933 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1934 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1935 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1936 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1937 output
="rockbox.iaudio"
1938 bootoutput
="x5_fw.bin"
1939 appextra
="recorder:gui:radio"
1942 # toolset is the tools within the tools directory that we build for
1943 # this particular target.
1944 toolset
="$iaudiobitmaptools"
1945 # architecture, manufacturer and model for the target-tree build
1947 t_manufacturer
="iaudio"
1953 modelname
="iaudiom5"
1957 tool
="$rootdir/tools/scramble -add=iam5"
1958 boottool
="$rootdir/tools/scramble -iaudiom5"
1959 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1960 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1961 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1962 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1963 output
="rockbox.iaudio"
1964 bootoutput
="m5_fw.bin"
1965 appextra
="recorder:gui:radio"
1968 # toolset is the tools within the tools directory that we build for
1969 # this particular target.
1970 toolset
="$iaudiobitmaptools"
1971 # architecture, manufacturer and model for the target-tree build
1973 t_manufacturer
="iaudio"
1983 tool
="$rootdir/tools/scramble -add=i7"
1984 boottool
="$rootdir/tools/scramble -tcc=crc"
1985 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1986 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1987 output
="rockbox.iaudio"
1988 appextra
="recorder:gui:radio"
1991 bootoutput
="I7_FW.BIN"
1992 # toolset is the tools within the tools directory that we build for
1993 # this particular target.
1994 toolset
="$tccbitmaptools"
1995 # architecture, manufacturer and model for the target-tree build
1997 t_manufacturer
="tcc77x"
2007 tool
="$rootdir/tools/scramble -add=d2"
2009 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2010 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2012 bootoutput
="bootloader-cowond2.bin"
2013 appextra
="recorder:gui:radio"
2016 toolset
="$tccbitmaptools"
2017 # architecture, manufacturer and model for the target-tree build
2019 t_manufacturer
="tcc780x"
2025 modelname
="iaudiom3"
2029 tool
="$rootdir/tools/scramble -add=iam3"
2030 boottool
="$rootdir/tools/scramble -iaudiom3"
2031 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2032 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2033 output
="rockbox.iaudio"
2034 bootoutput
="cowon_m3.bin"
2035 appextra
="recorder:gui:radio"
2038 # toolset is the tools within the tools directory that we build for
2039 # this particular target.
2040 toolset
="$iaudiobitmaptools"
2041 # architecture, manufacturer and model for the target-tree build
2043 t_manufacturer
="iaudio"
2049 modelname
="gigabeatfx"
2053 tool
="$rootdir/tools/scramble -add=giga"
2054 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2055 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2056 output
="rockbox.gigabeat"
2057 appextra
="recorder:gui:radio"
2060 toolset
=$gigabeatbitmaptools
2061 boottool
="$rootdir/tools/scramble -gigabeat"
2062 bootoutput
="FWIMG01.DAT"
2063 # architecture, manufacturer and model for the target-tree build
2065 t_manufacturer
="s3c2440"
2066 t_model
="gigabeat-fx"
2071 modelname
="gigabeats"
2075 tool
="$rootdir/tools/scramble -add=gigs"
2076 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2077 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2078 output
="rockbox.gigabeat"
2079 appextra
="recorder:gui:radio"
2082 toolset
="$gigabeatbitmaptools"
2083 boottool
="$rootdir/tools/scramble -gigabeats"
2085 # architecture, manufacturer and model for the target-tree build
2087 t_manufacturer
="imx31"
2088 t_model
="gigabeat-s"
2093 modelname
="mrobe500"
2097 tool
="$rootdir/tools/scramble -add=m500"
2098 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2099 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
2100 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2101 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2102 output
="rockbox.mrobe500"
2103 appextra
="recorder:gui:radio"
2106 toolset
=$gigabeatbitmaptools
2108 bootoutput
="rockbox.mrboot"
2109 # architecture, manufacturer and model for the target-tree build
2111 t_manufacturer
="tms320dm320"
2117 modelname
="mrobe100"
2121 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
2122 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2123 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2124 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
2125 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
2126 output
="rockbox.mi4"
2127 appextra
="recorder:gui:radio"
2130 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
2131 bootoutput
="pp5020.mi4"
2132 # toolset is the tools within the tools directory that we build for
2133 # this particular target.
2134 toolset
=$scramblebitmaptools
2135 # architecture, manufacturer and model for the target-tree build
2138 t_manufacturer
="olympus"
2144 modelname
="logikdax"
2148 tool
="$rootdir/tools/scramble -add=ldax"
2149 boottool
="$rootdir/tools/scramble -tcc=crc"
2150 bootoutput
="player.rom"
2151 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2152 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2153 output
="rockbox.logik"
2154 appextra
="recorder:gui:radio"
2157 # toolset is the tools within the tools directory that we build for
2158 # this particular target.
2159 toolset
=$tccbitmaptools
2160 # architecture, manufacturer and model for the target-tree build
2162 t_manufacturer
="tcc77x"
2168 modelname
="zenvisionm30gb"
2169 target
="CREATIVE_ZVM"
2172 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2173 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2174 tool
="$rootdir/tools/scramble -creative=zvm"
2176 output
="rockbox.zvm"
2177 appextra
="recorder:gui:radio"
2180 toolset
=$ipodbitmaptools
2181 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
2182 bootoutput
="rockbox.zvmboot"
2183 # architecture, manufacturer and model for the target-tree build
2185 t_manufacturer
="tms320dm320"
2186 t_model
="creative-zvm"
2191 modelname
="zenvisionm60gb"
2192 target
="CREATIVE_ZVM60GB"
2195 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2196 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2197 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
2199 output
="rockbox.zvm60"
2200 appextra
="recorder:gui:radio"
2203 toolset
=$ipodbitmaptools
2204 boottool
="$rootdir/tools/scramble -creative=zvm60"
2205 bootoutput
="rockbox.zvm60boot"
2206 # architecture, manufacturer and model for the target-tree build
2208 t_manufacturer
="tms320dm320"
2209 t_model
="creative-zvm"
2214 modelname
="zenvision"
2215 target
="CREATIVE_ZV"
2218 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2219 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2220 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
2223 appextra
="recorder:gui:radio"
2226 toolset
=$ipodbitmaptools
2227 boottool
="$rootdir/tools/scramble -creative=zenvision"
2228 bootoutput
="rockbox.zvboot"
2229 # architecture, manufacturer and model for the target-tree build
2231 t_manufacturer
="tms320dm320"
2232 t_model
="creative-zvm"
2237 modelname
="sansae200"
2239 memory
=32 # supposedly
2241 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
2242 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2243 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2244 output
="rockbox.mi4"
2245 appextra
="recorder:gui:radio"
2248 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
2249 bootoutput
="PP5022.mi4"
2250 # toolset is the tools within the tools directory that we build for
2251 # this particular target.
2252 toolset
=$scramblebitmaptools
2253 # architecture, manufacturer and model for the target-tree build
2256 t_manufacturer
="sandisk"
2257 t_model
="sansa-e200"
2261 # the e200R model is pretty much identical to the e200, it only has a
2262 # different option to the scramble tool when building a bootloader and
2263 # makes the bootloader output file name in all lower case.
2265 modelname
="sansae200r"
2267 memory
=32 # supposedly
2269 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
2270 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2271 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2272 output
="rockbox.mi4"
2273 appextra
="recorder:gui:radio"
2276 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
2277 bootoutput
="pp5022.mi4"
2278 # toolset is the tools within the tools directory that we build for
2279 # this particular target.
2280 toolset
=$scramblebitmaptools
2281 # architecture, manufacturer and model for the target-tree build
2284 t_manufacturer
="sandisk"
2285 t_model
="sansa-e200"
2290 modelname
="sansac200"
2292 memory
=32 # supposedly
2294 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
2295 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2296 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2297 output
="rockbox.mi4"
2298 appextra
="recorder:gui:radio"
2301 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
2302 bootoutput
="firmware.mi4"
2303 # toolset is the tools within the tools directory that we build for
2304 # this particular target.
2305 toolset
=$scramblebitmaptools
2306 # architecture, manufacturer and model for the target-tree build
2309 t_manufacturer
="sandisk"
2310 t_model
="sansa-c200"
2315 modelname
="sansam200"
2319 tool
="$rootdir/tools/scramble -add=m200"
2320 boottool
="$rootdir/tools/scramble -tcc=crc"
2321 bootoutput
="player.rom"
2322 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2323 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
2324 output
="rockbox.m200"
2325 appextra
="recorder:gui:radio"
2328 # toolset is the tools within the tools directory that we build for
2329 # this particular target.
2330 toolset
=$tccbitmaptools
2331 # architecture, manufacturer and model for the target-tree build
2333 t_manufacturer
="tcc77x"
2339 modelname
="sansac100"
2343 tool
="$rootdir/tools/scramble -add=c100"
2344 boottool
="$rootdir/tools/scramble -tcc=crc"
2345 bootoutput
="player.rom"
2346 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2347 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2348 output
="rockbox.c100"
2349 appextra
="recorder:gui:radio"
2352 # toolset is the tools within the tools directory that we build for
2353 # this particular target.
2354 toolset
=$tccbitmaptools
2355 # architecture, manufacturer and model for the target-tree build
2357 t_manufacturer
="tcc77x"
2363 modelname
="sansaclip"
2366 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2367 bmp2rb_native
="$bmp2rb_mono"
2368 tool
="$rootdir/tools/scramble -add=clip"
2369 output
="rockbox.sansa"
2370 bootoutput
="bootloader-clip.sansa"
2371 appextra
="recorder:gui:radio"
2374 toolset
=$scramblebitmaptools
2376 t_manufacturer
="as3525"
2377 t_model
="sansa-clip"
2378 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2380 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2386 modelname
="sansae200v2"
2387 target
="SANSA_E200V2"
2389 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2390 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2391 tool
="$rootdir/tools/scramble -add=e2v2"
2392 output
="rockbox.sansa"
2393 bootoutput
="bootloader-e200v2.sansa"
2394 appextra
="recorder:gui:radio"
2397 toolset
=$scramblebitmaptools
2399 t_manufacturer
="as3525"
2400 t_model
="sansa-e200v2"
2407 modelname
="sansam200v4"
2408 target
="SANSA_M200V4"
2410 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2411 bmp2rb_native
="$bmp2rb_mono"
2412 tool
="$rootdir/tools/scramble -add=m2v4"
2413 output
="rockbox.sansa"
2414 bootoutput
="bootloader-m200v4.sansa"
2415 appextra
="recorder:gui:radio"
2418 toolset
=$scramblebitmaptools
2420 t_manufacturer
="as3525"
2421 t_model
="sansa-m200v4"
2422 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2424 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2430 modelname
="sansafuze"
2433 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2434 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2435 tool
="$rootdir/tools/scramble -add=fuze"
2436 output
="rockbox.sansa"
2437 bootoutput
="bootloader-fuze.sansa"
2438 appextra
="recorder:gui:radio"
2441 toolset
=$scramblebitmaptools
2443 t_manufacturer
="as3525"
2444 t_model
="sansa-fuze"
2451 modelname
="sansac200v2"
2452 target
="SANSA_C200V2"
2453 memory
=2 # as per OF diagnosis mode
2454 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2455 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2456 tool
="$rootdir/tools/scramble -add=c2v2"
2457 output
="rockbox.sansa"
2458 bootoutput
="bootloader-c200v2.sansa"
2459 appextra
="recorder:gui:radio"
2462 # toolset is the tools within the tools directory that we build for
2463 # this particular target.
2464 toolset
=$scramblebitmaptools
2465 # architecture, manufacturer and model for the target-tree build
2467 t_manufacturer
="as3525"
2468 t_model
="sansa-c200v2"
2469 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB
=1; fi
2471 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2476 modelname
="sansaclipv2"
2477 target
="SANSA_CLIPV2"
2479 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2480 bmp2rb_native
="$bmp2rb_mono"
2481 tool
="$rootdir/tools/scramble -add=clv2"
2482 output
="rockbox.sansa"
2483 bootoutput
="bootloader-clipv2.sansa"
2484 appextra
="recorder:gui:radio"
2487 toolset
=$scramblebitmaptools
2489 t_manufacturer
="as3525"
2490 t_model
="sansa-clipv2"
2495 echo "Sansa View is not yet supported!"
2498 modelname
="sansaview"
2502 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2503 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2504 output
="rockbox.mi4"
2508 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2509 bootoutput
="firmware.mi4"
2510 # toolset is the tools within the tools directory that we build for
2511 # this particular target.
2512 toolset
=$scramblebitmaptools
2515 t_manufacturer
="sandisk"
2516 t_model
="sansa-view"
2521 modelname
="sansaclipplus"
2522 target
="SANSA_CLIPPLUS"
2524 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2525 bmp2rb_native
="$bmp2rb_mono"
2526 tool
="$rootdir/tools/scramble -add=cli+"
2527 output
="rockbox.sansa"
2528 bootoutput
="bootloader-clipplus.sansa"
2529 appextra
="recorder:gui:radio"
2532 toolset
=$scramblebitmaptools
2534 t_manufacturer
="as3525"
2535 t_model
="sansa-clipplus"
2541 modelname
="sansafuzev2"
2542 target
="SANSA_FUZEV2"
2544 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2545 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2546 tool
="$rootdir/tools/scramble -add=fuz2"
2547 output
="rockbox.sansa"
2548 bootoutput
="bootloader-fuzev2.sansa"
2549 appextra
="recorder:gui:radio"
2552 toolset
=$scramblebitmaptools
2554 t_manufacturer
="as3525"
2555 t_model
="sansa-fuzev2"
2561 modelname
="sansafuzeplus"
2562 target
="SANSA_FUZEPLUS"
2564 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2565 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2566 tool
="$rootdir/tools/scramble -add=fuz+"
2567 output
="rockbox.sansa"
2568 bootoutput
="bootloader-fuzeplus.sansa"
2569 appextra
="gui:recorder:radio"
2572 toolset
=$scramblebitmaptools
2574 t_manufacturer
="imx233"
2575 t_model
="sansa-fuzeplus"
2581 modelname
="sansaclipzip"
2582 target
="SANSA_CLIPZIP"
2584 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2585 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2586 tool
="$rootdir/tools/scramble -add=clzp"
2587 output
="rockbox.sansa"
2588 bootoutput
="bootloader-clipzip.sansa"
2589 appextra
="recorder:gui:radio"
2592 toolset
=$scramblebitmaptools
2594 t_manufacturer
="as3525"
2595 t_model
="sansa-clipzip"
2601 modelname
="sansaconnect"
2602 target
="SANSA_CONNECT"
2604 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2605 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2606 tool
="$rootdir/tools/scramble -add=conn"
2607 output
="rockbox.sansa"
2608 bootoutput
="bootloader-connect.sansa"
2609 appextra
="recorder:gui"
2612 toolset
=$scramblebitmaptools
2614 t_manufacturer
="tms320dm320"
2615 t_model
="sansa-connect"
2621 modelname
="tatungtpj1022"
2622 target
="TATUNG_TPJ1022"
2625 tool
="$rootdir/tools/scramble -add tpj2"
2626 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2627 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2628 output
="rockbox.elio"
2629 appextra
="recorder:gui:radio"
2632 boottool
="$rootdir/tools/scramble -mi4v2"
2633 bootoutput
="pp5020.mi4"
2634 # toolset is the tools within the tools directory that we build for
2635 # this particular target.
2636 toolset
=$scramblebitmaptools
2637 # architecture, manufacturer and model for the target-tree build
2640 t_manufacturer
="tatung"
2646 modelname
="gogearsa9200"
2647 target
="PHILIPS_SA9200"
2648 memory
=32 # supposedly
2650 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2651 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2652 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2653 output
="rockbox.mi4"
2654 appextra
="recorder:gui:radio"
2657 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2658 bootoutput
="FWImage.ebn"
2659 # toolset is the tools within the tools directory that we build for
2660 # this particular target.
2661 toolset
=$scramblebitmaptools
2662 # architecture, manufacturer and model for the target-tree build
2665 t_manufacturer
="philips"
2671 modelname
="gogearhdd1630"
2672 target
="PHILIPS_HDD1630"
2673 memory
=32 # supposedly
2675 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2676 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2677 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2678 output
="rockbox.mi4"
2679 appextra
="recorder:gui:radio"
2682 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2683 bootoutput
="FWImage.ebn"
2684 # toolset is the tools within the tools directory that we build for
2685 # this particular target.
2686 toolset
=$scramblebitmaptools
2687 # architecture, manufacturer and model for the target-tree build
2690 t_manufacturer
="philips"
2696 modelname
="gogearhdd6330"
2697 target
="PHILIPS_HDD6330"
2700 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2701 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2702 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2703 output
="rockbox.mi4"
2704 appextra
="recorder:gui:radio"
2707 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2708 bootoutput
="FWImage.ebn"
2709 # toolset is the tools within the tools directory that we build for
2710 # this particular target.
2711 toolset
=$scramblebitmaptools
2712 # architecture, manufacturer and model for the target-tree build
2715 t_manufacturer
="philips"
2721 modelname
="meizum6sl"
2726 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2727 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2728 output
="rockbox.meizu"
2729 appextra
="recorder:gui:radio"
2732 toolset
=$genericbitmaptools
2734 bootoutput
="rockboot.ebn"
2735 # architecture, manufacturer and model for the target-tree build
2737 t_manufacturer
="s5l8700"
2738 t_model
="meizu-m6sl"
2743 modelname
="meizum6sp"
2748 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2749 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2750 output
="rockbox.meizu"
2751 appextra
="recorder:gui:radio"
2754 toolset
=$genericbitmaptools
2756 bootoutput
="rockboot.ebn"
2757 # architecture, manufacturer and model for the target-tree build
2759 t_manufacturer
="s5l8700"
2760 t_model
="meizu-m6sp"
2770 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2771 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2772 output
="rockbox.meizu"
2773 appextra
="recorder:gui:radio"
2776 toolset
=$genericbitmaptools
2778 bootoutput
="rockboot.ebn"
2779 # architecture, manufacturer and model for the target-tree build
2781 t_manufacturer
="s5l8700"
2787 modelname
="ondavx747"
2791 tool
="$rootdir/tools/scramble -add=x747"
2792 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2793 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2794 output
="rockbox.vx747"
2795 appextra
="recorder:gui:radio"
2798 toolset
=$genericbitmaptools
2799 boottool
="$rootdir/tools/scramble -ccpmp"
2800 bootoutput
="ccpmp.bin"
2801 # architecture, manufacturer and model for the target-tree build
2803 t_manufacturer
="ingenic_jz47xx"
2804 t_model
="onda_vx747"
2809 modelname
="ondavx767"
2814 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2815 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2816 output
="rockbox.vx767"
2817 appextra
="recorder:gui:radio"
2820 toolset
=$genericbitmaptools
2821 boottool
="$rootdir/tools/scramble -ccpmp"
2822 bootoutput
="ccpmp.bin"
2823 # architecture, manufacturer and model for the target-tree build
2825 t_manufacturer
="ingenic_jz47xx"
2826 t_model
="onda_vx767"
2831 modelname
="ondavx747p"
2832 target
="ONDA_VX747P"
2835 tool
="$rootdir/tools/scramble -add=747p"
2836 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2837 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2838 output
="rockbox.vx747p"
2839 appextra
="recorder:gui:radio"
2842 toolset
=$genericbitmaptools
2843 boottool
="$rootdir/tools/scramble -ccpmp"
2844 bootoutput
="ccpmp.bin"
2845 # architecture, manufacturer and model for the target-tree build
2847 t_manufacturer
="ingenic_jz47xx"
2848 t_model
="onda_vx747"
2853 modelname
="ondavx777"
2857 tool
="$rootdir/tools/scramble -add=x777"
2858 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2859 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2860 output
="rockbox.vx777"
2861 appextra
="recorder:gui:radio"
2864 toolset
=$genericbitmaptools
2865 boottool
="$rootdir/tools/scramble -ccpmp"
2866 bootoutput
="ccpmp.bin"
2867 # architecture, manufacturer and model for the target-tree build
2869 t_manufacturer
="ingenic_jz47xx"
2870 t_model
="onda_vx747"
2875 modelname
="lyreproto1"
2876 target
="LYRE_PROTO1"
2880 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2881 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2882 output
="rockbox.lyre"
2883 appextra
="recorder:gui:radio"
2886 toolset
=$scramblebitmaptools
2888 bootoutput
="bootloader-proto1.lyre"
2889 # architecture, manufacturer and model for the target-tree build
2891 t_manufacturer
="at91sam"
2892 t_model
="lyre_proto1"
2897 modelname
="mini2440"
2901 tool
="$rootdir/tools/scramble -add=m244"
2902 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2903 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2904 output
="rockbox.mini2440"
2905 appextra
="recorder:gui:radio"
2908 toolset
=$scramblebitmaptools
2910 bootoutput
="bootloader-mini2440.lyre"
2911 # architecture, manufacturer and model for the target-tree build
2913 t_manufacturer
="s3c2440"
2919 modelname
="samsungyh820"
2920 target
="SAMSUNG_YH820"
2923 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2924 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2925 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2926 output
="rockbox.mi4"
2927 appextra
="recorder:gui:radio"
2930 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2931 bootoutput
="FW_YH820.mi4"
2932 # toolset is the tools within the tools directory that we build for
2933 # this particular target.
2934 toolset
=$scramblebitmaptools
2935 # architecture, manufacturer and model for the target-tree build
2938 t_manufacturer
="samsung"
2944 modelname
="samsungyh920"
2945 target
="SAMSUNG_YH920"
2948 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2949 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2950 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2951 output
="rockbox.mi4"
2952 appextra
="recorder:gui:radio"
2955 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2956 bootoutput
="PP5020.mi4"
2957 # toolset is the tools within the tools directory that we build for
2958 # this particular target.
2959 toolset
=$scramblebitmaptools
2960 # architecture, manufacturer and model for the target-tree build
2963 t_manufacturer
="samsung"
2969 modelname
="samsungyh925"
2970 target
="SAMSUNG_YH925"
2973 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2974 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2975 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2976 output
="rockbox.mi4"
2977 appextra
="recorder:gui:radio"
2980 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2981 bootoutput
="FW_YH925.mi4"
2982 # toolset is the tools within the tools directory that we build for
2983 # this particular target.
2984 toolset
=$scramblebitmaptools
2985 # architecture, manufacturer and model for the target-tree build
2988 t_manufacturer
="samsung"
2994 modelname
="samsungyps3"
2995 target
="SAMSUNG_YPS3"
2999 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3000 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3001 output
="rockbox.yps3"
3002 appextra
="recorder:gui:radio"
3005 toolset
=$genericbitmaptools
3007 bootoutput
="rockboot.ebn"
3008 # architecture, manufacturer and model for the target-tree build
3010 t_manufacturer
="s5l8700"
3017 target
="PBELL_VIBE500"
3020 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
3021 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3022 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
3023 output
="rockbox.mi4"
3024 appextra
="recorder:gui:radio"
3027 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
3028 bootoutput
="jukebox.mi4"
3029 # toolset is the tools within the tools directory that we build for
3030 # this particular target.
3031 toolset
=$scramblebitmaptools
3032 # architecture, manufacturer and model for the target-tree build
3035 t_manufacturer
="pbell"
3041 modelname
="mpiohd200"
3045 tool
="$rootdir/tools/scramble -add=hd20"
3046 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3047 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
3048 output
="rockbox.mpio"
3049 bootoutput
="bootloader.mpio"
3050 appextra
="recorder:gui:radio"
3053 # toolset is the tools within the tools directory that we build for
3054 # this particular target.
3055 toolset
="$genericbitmaptools"
3056 # architecture, manufacturer and model for the target-tree build
3058 t_manufacturer
="mpio"
3064 modelname
="mpiohd300"
3068 tool
="$rootdir/tools/scramble -add=hd30"
3069 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3070 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
3071 output
="rockbox.mpio"
3072 bootoutput
="bootloader.mpio"
3073 appextra
="recorder:gui:radio"
3076 # toolset is the tools within the tools directory that we build for
3077 # this particular target.
3078 toolset
="$genericbitmaptools"
3079 # architecture, manufacturer and model for the target-tree build
3081 t_manufacturer
="mpio"
3087 modelname
="rk27generic"
3088 target
="RK27_GENERIC"
3091 tool
="$rootdir/tools/scramble -rkw -modelnum=73"
3092 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3093 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3094 output
="rockbox.rkw"
3095 bootoutput
="bootloader.rkw"
3096 appextra
="recorder:gui:radio"
3099 # toolset is the tools within the tools directory that we build for
3100 # this particular target.
3101 toolset
="$genericbitmaptools"
3102 # architecture, manufacturer and model for the target-tree build
3104 t_manufacturer
="rk27xx"
3105 t_model
="rk27generic"
3110 modelname
="hifimanhm60x"
3114 tool
="$rootdir/tools/scramble -rkw -modelnum=79"
3115 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3116 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3117 output
="rockbox.rkw"
3118 bootoutput
="bootloader.rkw"
3119 appextra
="recorder:gui"
3122 # toolset is the tools within the tools directory that we build for
3123 # this particular target.
3124 toolset
="$genericbitmaptools"
3125 # architecture, manufacturer and model for the target-tree build
3127 t_manufacturer
="rk27xx"
3133 modelname
="hifimanhm801"
3137 tool
="$rootdir/tools/scramble -rkw -modelnum=82"
3138 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3139 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3140 output
="rockbox.rkw"
3141 bootoutput
="bootloader.rkw"
3142 appextra
="recorder:gui"
3145 # toolset is the tools within the tools directory that we build for
3146 # this particular target.
3147 toolset
="$genericbitmaptools"
3148 # architecture, manufacturer and model for the target-tree build
3150 t_manufacturer
="rk27xx"
3166 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3167 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3169 bootoutput
="rockbox"
3170 appextra
="recorder:gui:radio"
3173 # architecture, manufacturer and model for the target-tree build
3175 t_manufacturer
="sdl"
3186 sharedir
="/data/data/org.rockbox/app_rockbox/rockbox"
3187 bindir
="/data/data/org.rockbox/lib"
3188 libdir
="/data/data/org.rockbox/app_rockbox"
3194 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3195 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3196 output
="librockbox.so"
3197 bootoutput
="librockbox.so"
3198 appextra
="recorder:gui:radio:hosted/android"
3201 # architecture, manufacturer and model for the target-tree build
3203 t_manufacturer
="android"
3210 modelname
="nokian8xx"
3213 sharedir
="/opt/rockbox/share/rockbox"
3214 bindir
="/opt/rockbox/bin"
3215 libdir
="/opt/rockbox/lib"
3221 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3222 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3224 bootoutput
="rockbox"
3225 appextra
="recorder:gui:radio"
3228 # architecture, manufacturer and model for the target-tree build
3230 t_manufacturer
="maemo"
3237 modelname
="nokian900"
3240 sharedir
="/opt/rockbox/share/rockbox"
3241 bindir
="/opt/rockbox/bin"
3242 libdir
="/opt/rockbox/lib"
3248 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3249 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3251 bootoutput
="rockbox"
3252 appextra
="recorder:gui:radio"
3255 # architecture, manufacturer and model for the target-tree build
3257 t_manufacturer
="maemo"
3267 sharedir
="rockbox/share/rockbox"
3268 bindir
="rockbox/bin"
3269 libdir
="rockbox/lib"
3275 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3276 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3278 bootoutput
="rockbox"
3279 appextra
="recorder:gui:radio"
3282 # architecture, manufacturer and model for the target-tree build
3284 t_manufacturer
="pandora"
3291 modelname
="samsungypr0"
3292 target
="SAMSUNG_YPR0"
3298 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
3299 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
3301 bootoutput
="rockbox"
3302 appextra
="recorder:gui:radio"
3305 # architecture, manufacturer and model for the target-tree build
3307 t_manufacturer
="ypr0"
3312 echo "Please select a supported target platform!"
3318 echo "Platform set to $modelname"
3322 ############################################################################
3323 # Amount of memory, for those that can differ. They have $memory unset at
3327 if [ -z "$memory" ]; then
3330 if [ "$ARG_RAM" ]; then
3333 echo "Enter size of your RAM (in MB): (Defaults to 32)"
3346 if [ "$ARG_RAM" ]; then
3349 echo "Enter size of your RAM (in MB): (Defaults to 2)"
3362 echo "Memory size selected: $memory MB"
3363 [ "$ARG_TYPE" ] ||
echo ""
3367 ##################################################################
3368 # Figure out build "type"
3371 # the ifp7x0 is the only platform that supports building a gdb stub like
3375 gdbstub
=", (G)DB stub"
3377 sansae200r|sansae200
)
3378 gdbstub
=", (I)nstaller"
3381 gdbstub
=", (E)raser"
3384 gdbstub
=", (E)raser"
3389 if [ "$ARG_TYPE" ]; then
3392 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (W)arble codec tool$gdbstub: (Defaults to N)"
3398 appsdir
='$(ROOTDIR)/bootloader'
3400 extradefines
="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
3402 echo "e200R-installer build selected"
3405 appsdir
='$(ROOTDIR)/bootloader'
3407 extradefines
="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections"
3409 echo "sansa eraser build selected"
3412 if test $t_manufacturer = "archos"; then
3413 # Archos SH-based players do this somewhat differently for
3415 appsdir
='$(ROOTDIR)/flash/bootbox'
3418 appsdir
='$(ROOTDIR)/bootloader'
3421 if test -n "$boottool"; then
3424 if test -n "$bootoutput"; then
3428 extradefines
="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections"
3430 echo "Bootloader build selected"
3433 if [ "$modelname" = "sansae200r" ]; then
3434 echo "Do not use the e200R target for simulator builds. Use e200 instead."
3439 extradefines
="$extradefines -DSIMULATOR"
3442 echo "Simulator build selected"
3445 echo "Advanced build selected"
3446 whichadvanced
$btype
3449 extradefines
="$extradefines -DSTUB" # for target makefile symbol EXTRA_DEFINES
3450 appsdir
='$(ROOTDIR)/gdb'
3459 echo "GDB stub build selected"
3467 extradefines
="$extradefines -DDEBUG"
3468 appsdir
='$(ROOTDIR)/tools/checkwps';
3469 output
='checkwps.'${modelname};
3471 echo "CheckWPS build selected"
3479 appsdir
='$(ROOTDIR)/tools/database';
3484 output
="database_${modelname}.exe"
3487 output
='database.'${modelname};
3491 echo "Database tool build selected"
3499 extradefines
="$extradefines -DDEBUG"
3500 output
='warble.'${modelname};
3502 echo "Warble build selected"
3505 if [ "$modelname" = "sansae200r" ]; then
3506 echo "Do not use the e200R target for regular builds. Use e200 instead."
3510 btype
="N" # set it explicitly since RET only gets here as well
3511 echo "Normal build selected"
3515 # to be able running "make manual" from non-manual configuration
3518 manualdev
="archosfmrecorder"
3521 manualdev
="iriverh100"
3524 manualdev
="ipodmini1g"
3527 manualdev
=$modelname
3531 if [ -z "$debug" ]; then
3532 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
3535 if [ "yes" = "$application" ]; then
3536 echo Building Rockbox as an Application
3537 extradefines
="$extradefines -DAPPLICATION"
3540 echo "Using source code root directory: $rootdir"
3542 # this was once possible to change at build-time, but no more:
3547 if [ "yes" = "$simulator" ]; then
3548 # setup compiler and things for simulator
3551 if [ -d "simdisk" ]; then
3552 echo "Subdirectory 'simdisk' already present"
3555 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
3559 # Now, figure out version number of the (gcc) compiler we are about to use
3560 gccver
=`$CC -dumpversion`;
3562 # figure out the binutil version too and display it, mostly for the build
3563 # system etc to be able to see it easier
3564 if [ $uname = "Darwin" ]; then
3565 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
3567 ldver
=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
3570 if [ -z "$gccver" ]; then
3571 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
3572 echo "[WARNING] this may cause your build to fail since we cannot do the"
3573 echo "[WARNING] checks we want now."
3576 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
3579 num1
=`echo $gccver | cut -d . -f1`
3580 num2
=`echo $gccver | cut -d . -f2`
3581 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
3588 echo "Using $CC $gccver ($gccnum)"
3590 if test "$gccnum" -ge "400"; then
3591 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
3592 # so we ignore that warnings for now
3594 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
3597 if test "$gccnum" -ge "402"; then
3598 # disable warning about "warning: initialized field overwritten" as gcc 4.2
3599 # and later would throw it for several valid cases
3600 GCCOPTS
="$GCCOPTS -Wno-override-init"
3604 ""|
"$CROSS_COMPILE")
3608 # Verify that the cross-compiler is of a recommended version!
3609 if test "$gccver" != "$gccchoice"; then
3610 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
3611 echo "WARNING: version $gccchoice!"
3612 echo "WARNING: This may cause your build to fail since it may be a version"
3613 echo "WARNING: that isn't functional or known to not be the best choice."
3614 echo "WARNING: If you suffer from build problems, you know that this is"
3615 echo "WARNING: a likely source for them..."
3623 echo "Using $LD $ldver"
3625 # check the compiler for SH platforms
3626 if test "$CC" = "sh-elf-gcc"; then
3627 if test "$gccnum" -lt "400"; then
3628 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
3629 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3631 # figure out patch status
3632 gccpatch
=`$CC --version`;
3634 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
3635 echo "gcc $gccver is rockbox patched"
3636 # then convert -O to -Os to get smaller binaries!
3637 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3639 echo "WARNING: You use an unpatched gcc compiler: $gccver"
3640 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
3645 if test "$CC" = "m68k-elf-gcc"; then
3646 # convert -O to -Os to get smaller binaries!
3647 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
3650 if [ "$ARG_CCACHE" = "1" ]; then
3651 echo "Enable ccache for building"
3653 elif [ "$ARG_CCACHE" != "0" ]; then
3654 ccache
=`findtool ccache`
3655 if test -n "$ccache"; then
3656 echo "Found and uses ccache ($ccache)"
3660 # figure out the full path to the various commands if possible
3661 HOSTCC
=`findtool gcc --lit`
3662 HOSTAR
=`findtool ar --lit`
3663 CC
=`findtool ${CC} --lit`
3664 CPP
=`findtool ${CPP} --lit`
3665 LD
=`findtool ${LD} --lit`
3666 AR
=`findtool ${AR} --lit`
3667 AS
=`findtool ${AS} --lit`
3668 OC
=`findtool ${OC} --lit`
3669 WINDRES
=`findtool ${WINDRES} --lit`
3670 DLLTOOL
=`findtool ${DLLTOOL} --lit`
3671 DLLWRAP
=`findtool ${DLLWRAP} --lit`
3672 RANLIB
=`findtool ${RANLIB} --lit`
3675 if [ -z "$arch" ]; then
3676 cpp_defines
=$
(echo "" |
$CPP -dD)
3677 if [ -n "$(echo $cpp_defines | grep -w __sh__)" ]; then
3679 elif [ -n "$(echo $cpp_defines | grep -w __m68k__)" ]; then
3681 elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then
3683 # cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4)
3684 arch_version
="$(echo $cpp_defines | sed s,\ ,\\n,g | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,')"
3685 elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
3686 arch
="mips" # FIXME: autodetect version (32 or 64)
3687 elif [ -n "$(echo $cpp_defines | grep -w _X86_)" ]; then
3689 elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
3693 echo "Warning: Could not determine target arch"
3695 if [ "$arch" != "none" ]; then
3696 if [ -n "$arch_version" ]; then
3697 echo "Automatically selected arch: $arch (ver $arch_version)"
3699 echo "Automatically selected arch: $arch"
3703 if [ -n "$arch_version" ]; then
3704 echo "Manually selected arch: $arch (ver $arch_version)"
3706 echo "Manually selected arch: $arch"
3711 if [ -n "$arch_version" ]; then
3712 Darch_version
="#define ARCH_VERSION $arch_version"
3715 if test -n "$ccache"; then
3719 if test "$ARG_ARM_THUMB" = "1"; then
3720 extradefines
="$extradefines -DUSE_THUMB"
3721 CC
="$toolsdir/thumb-cc.py $CC"
3724 if test "X$endian" = "Xbig"; then
3725 defendian
="ROCKBOX_BIG_ENDIAN"
3727 defendian
="ROCKBOX_LITTLE_ENDIAN"
3730 if [ "$ARG_RBDIR" != "" ]; then
3731 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then
3736 echo "Using alternate rockbox dir: ${rbdir}"
3739 cat > autoconf.h
<<EOF
3740 /* This header was made by configure */
3741 #ifndef __BUILD_AUTOCONF_H
3742 #define __BUILD_AUTOCONF_H
3744 /* lower case names match the what's exported in the Makefile
3745 * upper case name looks nicer in the code */
3765 #define arch_amd64 6
3766 #define ARCH_AMD64 6
3768 /* Define target machine architecture */
3769 #define ARCH ${arch}
3770 /* Optinally define architecture version */
3773 /* Define endianess for the target or simulator platform */
3774 #define ${defendian} 1
3776 /* Define this if you build rockbox to support the logf logging and display */
3779 /* Define this if you want logf to output to the serial port */
3782 /* Define this to record a chart with timings for the stages of boot */
3785 /* optional define for a backlight modded Ondio */
3788 /* optional define for FM radio mod for iAudio M5 */
3791 /* optional define for ATA poweroff on Player */
3792 ${have_ata_poweroff}
3794 /* optional defines for RTC mod for h1x0 */
3798 /* the threading backend we use */
3799 #define ${thread_support}
3801 /* lcd dimensions for application builds from configure */
3805 /* root of Rockbox */
3806 #define ROCKBOX_DIR "${rbdir}"
3807 #define ROCKBOX_SHARE_PATH "${sharedir}"
3808 #define ROCKBOX_BINARY_PATH "${bindir}"
3809 #define ROCKBOX_LIBRARY_PATH "${libdir}"
3811 #endif /* __BUILD_AUTOCONF_H */
3814 if test -n "$t_cpu"; then
3815 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
3817 if [ "$application" = "yes" ] && [ "$t_manufacturer" = "maemo" ]; then
3818 # Maemo needs the SDL port, too
3819 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3820 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3821 elif [ "$application" = "yes" ] && [ "$t_manufacturer" = "pandora" ]; then
3822 # Pandora needs the SDL port, too
3823 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app"
3824 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3825 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
3826 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
3827 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
3830 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
3831 test -n "$t_soc" && TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc"
3832 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
3836 if test "$swcodec" = "yes"; then
3837 voicetoolset
="rbspeexenc voicefont wavtrim"
3839 voicetoolset
="voicefont wavtrim"
3842 if test "$apps" = "apps"; then
3843 # only when we build "real" apps we build the .lng files
3847 #### Fix the cmdline ###
3848 if [ -n "$ARG_PREFIX" ]; then
3849 cmdline
="$cmdline --prefix=\$(PREFIX)"
3851 if [ -n "$ARG_LCDWIDTH" ]; then
3852 cmdline
="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
3855 # remove parts from the cmdline we're going to set unconditionally
3856 cmdline
=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
3857 -e s,--ram=[0-9]\*,,g \
3858 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
3859 -e s,--type=[a-zA-Z]\*,,g`
3860 cmdline
="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3864 cat > Makefile
<<EOF
3865 ## Automatically generated. http://www.rockbox.org/
3867 export ROOTDIR=${rootdir}
3868 export FIRMDIR=\$(ROOTDIR)/firmware
3869 export APPSDIR=${appsdir}
3870 export TOOLSDIR=${toolsdir}
3871 export DOCSDIR=${rootdir}/docs
3872 export MANUALDIR=${rootdir}/manual
3873 export DEBUG=${debug}
3874 export MODELNAME=${modelname}
3875 export ARCHOSROM=${archosrom}
3876 export FLASHFILE=${flash}
3877 export TARGET_ID=${target_id}
3878 export TARGET=-D${target}
3880 export ARCH_VERSION=${arch_version}
3882 export MANUFACTURER=${t_manufacturer}
3883 export OBJDIR=${pwd}
3884 export BUILDDIR=${pwd}
3885 export LANGUAGE=${language}
3886 export VOICELANGUAGE=${voicelanguage}
3887 export MEMORYSIZE=${memory}
3888 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3889 export MKFIRMWARE=${tool}
3890 export BMP2RB_MONO=${bmp2rb_mono}
3891 export BMP2RB_NATIVE=${bmp2rb_native}
3892 export BMP2RB_REMOTEMONO=${bmp2rb_remotemono}
3893 export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative}
3894 export BINARY=${output}
3895 export APPEXTRA=${appextra}
3896 export ENABLEDPLUGINS=${plugins}
3897 export SOFTWARECODECS=${swcodec}
3898 export EXTRA_DEFINES=${extradefines}
3899 export HOSTCC=${HOSTCC}
3900 export HOSTAR=${HOSTAR}
3907 export WINDRES=${WINDRES}
3908 export DLLTOOL=${DLLTOOL}
3909 export DLLWRAP=${DLLWRAP}
3910 export RANLIB=${RANLIB}
3911 export PREFIX=${ARG_PREFIX}
3912 export PROFILE_OPTS=${PROFILE_OPTS}
3913 export APP_TYPE=${app_type}
3914 export APPLICATION=${application}
3915 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3916 export GCCOPTS=${GCCOPTS}
3917 export TARGET_INC=${TARGET_INC}
3918 export LOADADDRESS=${loadaddress}
3919 export SHARED_LDFLAG=${SHARED_LDFLAG}
3920 export SHARED_CFLAGS=${SHARED_CFLAGS}
3921 export LDOPTS=${LDOPTS}
3922 export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}
3923 export GCCVER=${gccver}
3924 export GCCNUM=${gccnum}
3925 export UNAME=${uname}
3926 export MANUALDEV=${manualdev}
3927 export TTS_OPTS=${TTS_OPTS}
3928 export TTS_ENGINE=${TTS_ENGINE}
3929 export ENC_OPTS=${ENC_OPTS}
3930 export ENCODER=${ENCODER}
3931 export USE_ELF=${USE_ELF}
3932 export RBDIR=${rbdir}
3933 export ROCKBOX_SHARE_PATH=${sharedir}
3934 export ROCKBOX_BINARY_PATH=${bindir}
3935 export ROCKBOX_LIBRARY_PATH=${libdir}
3936 export SDLCONFIG=${sdl}
3937 export LCDORIENTATION=${lcd_orientation}
3939 CONFIGURE_OPTIONS=${cmdline}
3941 include \$(TOOLSDIR)/root.make
3944 echo "Created Makefile"