3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
11 # global CC options for all platforms
12 CCOPTS
="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe"
14 use_logf
="#undef ROCKBOX_HAS_LOGF"
16 scriptver
=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
21 # Begin Function Definitions
31 WINDRES
=${prefix}windres
32 DLLTOOL
=${prefix}dlltool
33 DLLWRAP
=${prefix}dllwrap
34 RANLIB
=${prefix}ranlib
42 if [ "$ARG_ARM_EABI" = "1" ]; then
43 prefixtools arm-elf-eabi-
51 # scan the $PATH for the given command
58 # echo "checks for $file in $path" >&2
59 if test -f "$path/$file"; then
64 # check whether caller wants literal return value if not found
65 if [ "$2" = "--lit" ]; then
70 # scan the $PATH for sdl-config - if crosscompiling, require that it is
71 # a mingw32 sdl-config
78 #echo "checks for $file in $path" >&2
79 if test -f "$path/$file"; then
80 if [ "yes" = "${crosscompile}" ]; then
81 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
95 # default tool setup for native building
99 GCCOPTS
='-W -Wall -g -fno-builtin'
102 output
="rockboxui" # use this as default output binary name
107 if [ $1 = "sdl" ]; then
108 if [ -z "$sdl" ]; then
109 echo "configure didn't find sdl-config, which indicates that you"
110 echo "don't have SDL (properly) installed. Please correct and"
111 echo "re-run configure!"
114 # generic sdl-config checker
115 sdl_cflags
=`$sdl --cflags`
116 sdl_libs
=`$sdl --libs`
120 # default share option, override below if needed
121 SHARED_FLAG
="-shared"
125 echo "Cygwin host detected"
128 GCCOPTS
="$GCCOPTS $sdl_cflags"
129 LDOPTS
="-mconsole $sdl_libs"
131 output
="rockboxui.exe" # use this as output binary name
135 echo "MinGW host detected"
138 GCCOPTS
="$GCCOPTS $sdl_cflags"
139 LDOPTS
="-mconsole $sdl_libs"
141 output
="rockboxui.exe" # use this as output binary name
145 echo "Linux host detected"
146 GCCOPTS
="$GCCOPTS $sdl_cflags"
151 echo "FreeBSD host detected"
153 GCCOPTS
="$GCCOPTS $sdl_cflags"
158 echo "Darwin host detected"
160 GCCOPTS
="$GCCOPTS $sdl_cflags"
162 SHARED_FLAG
="-dynamiclib -Wl\,-single_module"
166 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
171 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
173 if test "X$crosscompile" != "Xyes"; then
174 if [ "`uname -m`" = "x86_64" ] ||
[ "`uname -m`" = "amd64" ]; then
175 # fPIC is needed to make shared objects link
176 # setting visibility to hidden is necessary to avoid strange crashes
177 # due to symbol clashing
178 GCCOPTS
="$GCCOPTS -fPIC -fvisibility=hidden"
182 cat >$tmpdir/conftest-
$id.c
<<EOF
184 int main(int argc, char **argv)
187 char *varp = (char *)&var;
195 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
197 if test `$tmpdir/conftest-$id 2>/dev/null` -gt "1"; then
205 if [ $1 = "sdl" ]; then
206 echo "Simulator environment deemed $endian endian"
207 elif [ $1 = "checkwps" ]; then
208 echo "CheckWPS environment deemed $endian endian"
211 # use wildcard here to make it work even if it was named *.exe like
213 rm -f $tmpdir/conftest-
$id*
215 # We are crosscompiling
216 # add cross-compiler option(s)
217 prefixtools i586-mingw32msvc-
218 LDOPTS
="-mconsole $sdl_libs"
219 output
="rockboxui.exe" # use this as output binary name
220 endian
="little" # windows is little endian
225 # functions for setting up cross-compiler names and options
226 # also set endianess and what the exact recommended gcc version is
227 # the gcc version should most likely match what versions we build with
232 GCCOPTS
="$CCOPTS -m1"
233 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
239 prefixtools calmrisc16-unknown-elf-
240 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
241 GCCOPTIMIZE
="-fomit-frame-pointer"
246 prefixtools m68k-elf-
247 GCCOPTS
="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
248 GCCOPTIMIZE
="-fomit-frame-pointer"
255 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
256 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" != "1"; then
257 GCCOPTS
="$GCCOPTS -mlong-calls"
259 GCCOPTIMIZE
="-fomit-frame-pointer"
265 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
266 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" != "1"; then
267 GCCOPTS
="$GCCOPTS -mlong-calls"
269 GCCOPTIMIZE
="-fomit-frame-pointer"
275 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
276 if test "ARG_ARM_EABI" != "1"; then
277 GCCOPTS
="$GCCOPTS -mlong-calls"
279 GCCOPTIMIZE
="-fomit-frame-pointer"
285 GCCOPTS
="$CCOPTS -mcpu=arm940t"
286 if test "ARG_ARM_EABI" != "1"; then
287 GCCOPTS
="$GCCOPTS -mlong-calls"
289 GCCOPTIMIZE
="-fomit-frame-pointer"
295 GCCOPTS
="$CCOPTS -mcpu=arm9e"
296 if test "ARG_ARM_EABI" != "1"; then
297 GCCOPTS
="$GCCOPTS -mlong-calls"
299 GCCOPTIMIZE
="-fomit-frame-pointer"
305 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
306 if test "ARG_ARM_EABI" != "1"; then
307 GCCOPTS
="$GCCOPTS -mlong-calls"
309 GCCOPTIMIZE
="-fomit-frame-pointer"
315 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
316 if test "$modelname" != "gigabeats" -a "ARG_ARM_EABI" != "1"; then
317 GCCOPTS
="$GCCOPTS -mlong-calls"
319 GCCOPTIMIZE
="-fomit-frame-pointer"
325 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
326 if test "ARG_ARM_EABI" != "1"; then
327 GCCOPTS
="$GCCOPTS -mlong-calls"
329 GCCOPTIMIZE
="-fomit-frame-pointer"
334 prefixtools mipsel-elf-
335 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls"
336 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
337 GCCOPTIMIZE
="-fomit-frame-pointer"
343 atype
=`echo "$1" | cut -c 2-`
344 ##################################################################
345 # Prompt for specific developer options
347 if [ "$atype" ]; then
352 echo "Enter your developer options (press enter when done)"
353 printf "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile"
354 if [ "$memory" = "2" ]; then
357 if [ "$modelname" = "archosplayer" ]; then
358 printf ", Use (A)TA poweroff"
360 if [ "$t_model" = "ondio" ]; then
361 printf ", (B)acklight MOD"
363 if [ "$modelname" = "iaudiom5" ]; then
364 printf ", (F)M radio MOD"
366 if [ "$modelname" = "iriverh120" ]; then
373 while [ $cont = "1" ]; do
375 if [ "$interact" ]; then
378 option
=`echo "$atype" | cut -c 1`
383 if [ "yes" = "$profile" ]; then
384 echo "Debug is incompatible with profiling"
386 echo "DEBUG build enabled"
391 echo "logf() support enabled"
395 echo "Simulator build enabled"
399 if [ "yes" = "$use_debug" ]; then
400 echo "Profiling is incompatible with debug"
402 echo "Profiling support is enabled"
407 echo "Voice build selected"
411 if [ "$memory" = "2" ]; then
413 echo "Memory size selected: 8MB"
417 if [ "$modelname" = "archosplayer" ]; then
418 have_ata_poweroff
="#define HAVE_ATA_POWEROFF"
419 echo "ATA poweroff enabled"
423 if [ "$t_model" = "ondio" ]; then
424 have_backlight
="#define HAVE_BACKLIGHT"
425 echo "Backlight functions enabled"
429 if [ "$modelname" = "iaudiom5" ]; then
430 have_fmradio_in
="#define HAVE_FMRADIO_IN"
431 echo "FM radio functions enabled"
435 if [ "$modelname" = "iriverh120" ]; then
436 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
437 have_rtc_alarm
="#define HAVE_RTC_ALARM"
438 echo "RTC functions enabled (DS1339/DS3231)"
442 echo "Enabling Windows 32 cross-compiling"
446 if [ "$interact" ]; then
449 echo "[ERROR] Option $option unsupported"
453 if [ "$interact" ]; then
454 btype
="$btype$option"
456 atype
=`echo "$atype" | cut -c 2-`
457 [ "$atype" ] || cont
=0
462 if [ "yes" = "$voice" ]; then
463 # Ask about languages to build
465 voicelanguage
=`whichlang`
466 echo "Voice language set to $voicelanguage"
468 # Configure encoder and TTS engine for each language
469 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
470 voiceconfig
"$thislang"
473 if [ "yes" = "$use_debug" ]; then
475 GCCOPTS
="$GCCOPTS -g -DDEBUG"
477 if [ "yes" = "$logf" ]; then
478 use_logf
="#define ROCKBOX_HAS_LOGF 1"
480 if [ "yes" = "$simulator" ]; then
482 extradefines
="$extradefines -DSIMULATOR"
486 if [ "yes" = "$profile" ]; then
487 extradefines
="$extradefines -DRB_PROFILE"
488 PROFILE_OPTS
="-finstrument-functions"
492 # Configure voice settings
495 if [ ! "$ARG_TTS" ]; then
496 echo "Building $thislang voice for $modelname. Select options"
500 if [ -n "`findtool flite`" ]; then
504 DEFAULT_TTS_OPTS
=$FLITE_OPTS
505 DEFAULT_NOISEFLOOR
="500"
508 if [ -n "`findtool espeak`" ]; then
512 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
513 DEFAULT_NOISEFLOOR
="500"
516 if [ -n "`findtool festival`" ]; then
517 FESTIVAL
="(F)estival "
520 FESTIVAL_OPTS
="--language italian"
523 FESTIVAL_OPTS
="--language spanish"
526 FESTIVAL_OPTS
="--language finnish"
529 FESTIVAL_OPTS
="--language czech"
535 DEFAULT_TTS
="festival"
536 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
537 DEFAULT_NOISEFLOOR
="500"
540 if [ -n "`findtool swift`" ]; then
544 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
545 DEFAULT_NOISEFLOOR
="500"
548 # Allow SAPI if Windows is in use
549 if [ -n "`findtool winver`" ]; then
553 DEFAULT_TTS_OPTS
=$SAPI_OPTS
554 DEFAULT_NOISEFLOOR
="500"
558 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
559 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
563 if [ "$ARG_TTS" ]; then
566 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
569 advopts
="$advopts --tts=$option"
573 NOISEFLOOR
="500" # TODO: check this value
579 TTS_OPTS
=$ESPEAK_OPTS
582 TTS_ENGINE
="festival"
584 TTS_OPTS
=$FESTIVAL_OPTS
597 TTS_ENGINE
=$DEFAULT_TTS
598 TTS_OPTS
=$DEFAULT_TTS_OPTS
599 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
601 echo "Using $TTS_ENGINE for TTS"
603 # Select which voice to use for Festival
604 if [ "$TTS_ENGINE" = "festival" ]; then
605 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
606 for voice
in $voicelist; do
607 TTS_FESTIVAL_VOICE
="$voice" # Default choice
610 if [ "$ARG_VOICE" ]; then
614 for voice
in $voicelist; do
615 printf "%3d. %s\n" "$i" "$voice"
618 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
622 for voice
in $voicelist; do
623 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
624 TTS_FESTIVAL_VOICE
="$voice"
628 advopts
="$advopts --voice=$CHOICE"
629 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
630 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
633 # Read custom tts options from command line
634 if [ "$ARG_TTSOPTS" ]; then
635 TTS_OPTS
="$ARG_TTSOPTS"
636 advopts
="$advopts --ttsopts='$TTS_OPTS'"
637 echo "$TTS_ENGINE options set to $TTS_OPTS"
640 if [ "$swcodec" = "yes" ]; then
643 ENC_OPTS
="-q 4 -c 10"
645 if [ -n "`findtool lame`" ]; then
648 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
650 echo "You need LAME in the system path to build voice files for"
651 echo "HWCODEC targets."
656 echo "Using $ENCODER for encoding voice clips"
658 # Read custom encoder options from command line
659 if [ "$ARG_ENCOPTS" ]; then
660 ENC_OPTS
="$ARG_ENCOPTS"
661 advopts
="$advopts --encopts='$ENC_OPTS'"
662 echo "$ENCODER options set to $ENC_OPTS"
666 if [ -n "`findtool cygpath`" ]; then
667 TEMPDIR
=`cygpath . -a -w`
672 # figure out which languages that are around
673 for file in $rootdir/apps
/lang
/*.lang
; do
674 clean
=`basename $file .lang`
675 langs
="$langs $clean"
678 if [ "$ARG_LANG" ]; then
681 echo "Select a number for the language to use (default is english)"
682 # FIXME The multiple-language feature is currently broken
683 # echo "You may enter a comma-separated list of languages to build"
686 for one
in $langs; do
692 advopts
="$advopts --language=$pick"
697 # Allow the user to pass a comma-separated list of langauges
698 for thispick
in `echo $pick | sed 's/,/ /g'`; do
700 for one
in $langs; do
701 # Accept both the language number and name
702 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
703 if [ "$output" = "" ]; then
712 if [ -z "$output" ]; then
720 echo "Rockbox configure script."
721 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
722 echo "Do *NOT* run this within the tools directory!"
725 Usage: configure [OPTION]...
727 --target=TARGET Sets the target, TARGET can be either the target ID or
728 corresponding string. Run without this option to see all
731 --ram=RAM Sets the RAM for certain targets. Even though any number
732 is accepted, not every number is correct. The default
733 value will be applied, if you entered a wrong number
734 (which depends on the target). Watch the output. Run
735 without this option if you are not sure which the right
738 --type=TYPE Sets the build type. Shortcuts are also valid.
739 Run without this option to see all available types.
740 Multiple values are allowed and managed in the input
741 order. So --type=b stands for Bootloader build, while
742 --type=ab stands for "Backlight MOD" build.
744 --language=LANG Set the language used for voice generation (used only if
747 --tts=ENGINE Set the TTS engine used for voice generation (used only
750 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
753 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
755 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
757 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
758 This is useful for having multiple alternate builds on
759 your device that you can load with ROLO. However as the
760 bootloader looks for .rockbox you won't be able to boot
763 --ccache Enable ccache use (done by default these days)
764 --no-ccache Disable ccache use
766 --eabi Make configure prefer toolchains that are able to compile
767 for the new ARM standard abi EABI
768 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
769 --help Shows this message (must not be used with other options)
790 --ccache) ARG_CCACHE
=1;;
791 --no-ccache) ARG_CCACHE
=0;;
792 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
793 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
794 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
795 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
796 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
797 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
798 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
799 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
800 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
801 --eabi) ARG_ARM_EABI
=1;;
802 --no-eabi) ARG_ARM_EABI
=0;;
804 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
811 if [ "$TMPDIR" != "" ]; then
816 echo Using temporary directory
$tmpdir
818 if test -r "configure"; then
819 # this is a check for a configure script in the current directory, it there
820 # is one, try to figure out if it is this one!
822 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
823 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
824 echo "It will only cause you pain and grief. Instead do this:"
827 echo " mkdir build-dir"
829 echo " ../tools/configure"
831 echo "Much happiness will arise from this. Enjoy"
836 # get our current directory
839 if { echo $pwd |
grep " "; } then
840 echo "You're running this script in a path that contains space. The build"
841 echo "system is unfortunately not clever enough to deal with this. Please"
842 echo "run the script from a different path, rename the path or fix the build"
847 if [ -z "$rootdir" ]; then
848 ##################################################################
849 # Figure out where the source code root is!
851 rootdir
=`dirname $0`/..
/
853 #####################################################################
854 # Convert the possibly relative directory name to an absolute version
860 # cd back to the build dir
865 appsdir
='\$(ROOTDIR)/apps'
866 firmdir
='\$(ROOTDIR)/firmware'
867 toolsdir
='\$(ROOTDIR)/tools'
870 ##################################################################
871 # Figure out target platform
874 if [ "$ARG_TARGET" ]; then
877 echo "Enter target platform:"
879 ==Archos== ==iriver== ==Apple iPod==
880 0) Player/Studio 10) H120/H140 20) Color/Photo
881 1) Recorder 11) H320/H340 21) Nano 1G
882 2) FM Recorder 12) iHP-100/110/115 22) Video
883 3) Recorder v2 13) iFP-790 23) 3G
884 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
885 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
887 ==Toshiba== 27) 1G, 2G
888 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
889 30) X5/X5V/X5L 41) Gigabeat S
890 31) M5/M5L ==SanDisk==
891 32) 7 ==Olympus= 50) Sansa e200
892 33) D2 70) M:Robe 500 51) Sansa e200R
893 34) M3/M3L 71) M:Robe 100 52) Sansa c200
895 ==Creative== ==Philips== 54) Sansa c100
896 90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip
897 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2
898 92) Zen Vision HDD1830 57) Sansa m200v4
899 102) GoGear HDD6330 58) Sansa Fuze
900 ==Onda== 59) Sansa c200v2
901 120) VX747 ==Meizu== 60) Sansa Clipv2
902 121) VX767 110) M6SL 61) Sansa View
903 122) VX747+ 111) M6SP 62) Sansa Clip+
906 ==Samsung== ==Tatung== 80) DAX 1GB MP3/DAB
907 140) YH-820 150) Elio TPJ-1022
908 141) YH-920 ==Lyre project==1
909 142) YH-925 ==Packard Bell== 130) Lyre proto 1
910 143) YP-S3 160) Vibe 500 131) Mini2440
916 # Set of tools built for all target platforms:
917 toolset
="rdf2binary convbdf codepages"
919 # Toolsets for some target families:
920 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
921 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
922 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
923 ipodbitmaptools
="$toolset scramble bmp2rb"
924 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
925 tccbitmaptools
="$toolset scramble bmp2rb"
926 # generic is used by IFP, Meizu and Onda
927 genericbitmaptools
="$toolset bmp2rb"
928 # scramble is used by all other targets
929 scramblebitmaptools
="$genericbitmaptools scramble"
932 # ---- For each target ----
935 # target_id: a unique number identifying this target, IS NOT the menu number.
936 # Just use the currently highest number+1 when you add a new
938 # modelname: short model name used all over to identify this target
939 # memory: number of megabytes of RAM this target has. If the amount can
940 # be selected by the size prompt, let memory be unset here
941 # target: -Ddefine passed to the build commands to make the correct
942 # config-*.h file get included etc
943 # tool: the tool that takes a plain binary and converts that into a
944 # working "firmware" file for your target
945 # output: the final output file name
946 # boottool: the tool that takes a plain binary and generates a bootloader
947 # file for your target (or blank to use $tool)
948 # bootoutput:the final output file name for the bootloader (or blank to use
950 # appextra: passed to the APPEXTRA variable in the Makefiles.
951 # TODO: add proper explanation
952 # archosrom: used only for Archos targets that build a special flashable .ucl
954 # flash: name of output for flashing, for targets where there's a special
955 # file output for this.
956 # plugins: set to 'yes' to build the plugins. Early development builds can
957 # set this to no in the early stages to have an easier life for a
959 # swcodec: set 'yes' on swcodec targets
960 # toolset: lists what particular tools in the tools/ directory that this
961 # target needs to have built prior to building Rockbox
964 # *cc: sets up gcc and compiler options for your target builds. Note
965 # that if you select a simulator build, the compiler selection is
966 # overridden later in the script.
972 modelname
="archosplayer"
973 target
="-DARCHOS_PLAYER"
975 tool
="$rootdir/tools/scramble"
977 appextra
="player:gui"
978 archosrom
="$pwd/rombox.ucl"
979 flash
="$pwd/rockbox.ucl"
983 # toolset is the tools within the tools directory that we build for
984 # this particular target.
985 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
987 # Note: the convbdf is present in the toolset just because: 1) the
988 # firmware/Makefile assumes it is present always, and 2) we will need it when we
989 # build the player simulator
992 t_manufacturer
="archos"
998 modelname
="archosrecorder"
999 target
="-DARCHOS_RECORDER"
1001 tool
="$rootdir/tools/scramble"
1002 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1003 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1005 appextra
="recorder:gui"
1006 #archosrom="$pwd/rombox.ucl"
1007 flash
="$pwd/rockbox.ucl"
1010 # toolset is the tools within the tools directory that we build for
1011 # this particular target.
1012 toolset
=$archosbitmaptools
1014 t_manufacturer
="archos"
1020 modelname
="archosfmrecorder"
1021 target
="-DARCHOS_FMRECORDER"
1023 tool
="$rootdir/tools/scramble -fm"
1024 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1025 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1027 appextra
="recorder:gui"
1028 #archosrom="$pwd/rombox.ucl"
1029 flash
="$pwd/rockbox.ucl"
1032 # toolset is the tools within the tools directory that we build for
1033 # this particular target.
1034 toolset
=$archosbitmaptools
1036 t_manufacturer
="archos"
1042 modelname
="archosrecorderv2"
1043 target
="-DARCHOS_RECORDERV2"
1045 tool
="$rootdir/tools/scramble -v2"
1046 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1047 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1049 appextra
="recorder:gui"
1050 #archosrom="$pwd/rombox.ucl"
1051 flash
="$pwd/rockbox.ucl"
1054 # toolset is the tools within the tools directory that we build for
1055 # this particular target.
1056 toolset
=$archosbitmaptools
1058 t_manufacturer
="archos"
1064 modelname
="archosondiosp"
1065 target
="-DARCHOS_ONDIOSP"
1067 tool
="$rootdir/tools/scramble -osp"
1068 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1069 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1071 appextra
="recorder:gui"
1072 archosrom
="$pwd/rombox.ucl"
1073 flash
="$pwd/rockbox.ucl"
1076 # toolset is the tools within the tools directory that we build for
1077 # this particular target.
1078 toolset
=$archosbitmaptools
1080 t_manufacturer
="archos"
1086 modelname
="archosondiofm"
1087 target
="-DARCHOS_ONDIOFM"
1089 tool
="$rootdir/tools/scramble -ofm"
1090 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1091 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1093 appextra
="recorder:gui"
1094 #archosrom="$pwd/rombox.ucl"
1095 flash
="$pwd/rockbox.ucl"
1098 toolset
=$archosbitmaptools
1100 t_manufacturer
="archos"
1106 modelname
="archosav300"
1107 target
="-DARCHOS_AV300"
1110 tool
="$rootdir/tools/scramble -mm=C"
1111 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1112 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1114 appextra
="recorder:gui"
1117 # toolset is the tools within the tools directory that we build for
1118 # this particular target.
1119 toolset
="$toolset scramble descramble bmp2rb"
1120 # architecture, manufacturer and model for the target-tree build
1122 t_manufacturer
="archos"
1128 modelname
="iriverh120"
1129 target
="-DIRIVER_H120"
1132 tool
="$rootdir/tools/scramble -add=h120"
1133 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1134 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1135 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1136 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1137 output
="rockbox.iriver"
1138 bootoutput
="bootloader.iriver"
1139 appextra
="recorder:gui"
1140 flash
="$pwd/rombox.iriver"
1143 # toolset is the tools within the tools directory that we build for
1144 # this particular target.
1145 toolset
=$iriverbitmaptools
1147 t_manufacturer
="iriver"
1153 modelname
="iriverh300"
1154 target
="-DIRIVER_H300"
1157 tool
="$rootdir/tools/scramble -add=h300"
1158 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1159 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1160 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1161 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1162 output
="rockbox.iriver"
1163 appextra
="recorder:gui"
1166 # toolset is the tools within the tools directory that we build for
1167 # this particular target.
1168 toolset
=$iriverbitmaptools
1170 t_manufacturer
="iriver"
1176 modelname
="iriverh100"
1177 target
="-DIRIVER_H100"
1180 tool
="$rootdir/tools/scramble -add=h100"
1181 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1182 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1183 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1184 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1185 output
="rockbox.iriver"
1186 bootoutput
="bootloader.iriver"
1187 appextra
="recorder:gui"
1188 flash
="$pwd/rombox.iriver"
1191 # toolset is the tools within the tools directory that we build for
1192 # this particular target.
1193 toolset
=$iriverbitmaptools
1195 t_manufacturer
="iriver"
1201 modelname
="iriverifp7xx"
1202 target
="-DIRIVER_IFP7XX"
1206 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1207 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1208 output
="rockbox.wma"
1209 appextra
="recorder:gui"
1212 # toolset is the tools within the tools directory that we build for
1213 # this particular target.
1214 toolset
=$genericbitmaptools
1216 t_manufacturer
="pnx0101"
1217 t_model
="iriver-ifp7xx"
1222 modelname
="iriverh10"
1223 target
="-DIRIVER_H10"
1226 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1227 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1228 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1229 output
="rockbox.mi4"
1230 appextra
="recorder:gui"
1233 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1234 bootoutput
="H10_20GC.mi4"
1235 # toolset is the tools within the tools directory that we build for
1236 # this particular target.
1237 toolset
=$scramblebitmaptools
1238 # architecture, manufacturer and model for the target-tree build
1240 t_manufacturer
="iriver"
1246 modelname
="iriverh10_5gb"
1247 target
="-DIRIVER_H10_5GB"
1250 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1251 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1252 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1253 output
="rockbox.mi4"
1254 appextra
="recorder:gui"
1257 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1258 bootoutput
="H10.mi4"
1259 # toolset is the tools within the tools directory that we build for
1260 # this particular target.
1261 toolset
=$scramblebitmaptools
1262 # architecture, manufacturer and model for the target-tree build
1264 t_manufacturer
="iriver"
1270 modelname
="ipodcolor"
1271 target
="-DIPOD_COLOR"
1274 tool
="$rootdir/tools/scramble -add=ipco"
1275 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1276 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1277 output
="rockbox.ipod"
1278 appextra
="recorder:gui"
1281 bootoutput
="bootloader-$modelname.ipod"
1282 # toolset is the tools within the tools directory that we build for
1283 # this particular target.
1284 toolset
=$ipodbitmaptools
1285 # architecture, manufacturer and model for the target-tree build
1287 t_manufacturer
="ipod"
1293 modelname
="ipodnano1g"
1294 target
="-DIPOD_NANO"
1297 tool
="$rootdir/tools/scramble -add=nano"
1298 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1299 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1300 output
="rockbox.ipod"
1301 appextra
="recorder:gui"
1304 bootoutput
="bootloader-$modelname.ipod"
1305 # toolset is the tools within the tools directory that we build for
1306 # this particular target.
1307 toolset
=$ipodbitmaptools
1308 # architecture, manufacturer and model for the target-tree build
1310 t_manufacturer
="ipod"
1316 modelname
="ipodvideo"
1317 target
="-DIPOD_VIDEO"
1319 tool
="$rootdir/tools/scramble -add=ipvd"
1320 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1321 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1322 output
="rockbox.ipod"
1323 appextra
="recorder:gui"
1326 bootoutput
="bootloader-$modelname.ipod"
1327 # toolset is the tools within the tools directory that we build for
1328 # this particular target.
1329 toolset
=$ipodbitmaptools
1330 # architecture, manufacturer and model for the target-tree build
1332 t_manufacturer
="ipod"
1342 tool
="$rootdir/tools/scramble -add=ip3g"
1343 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1344 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1345 output
="rockbox.ipod"
1346 appextra
="recorder:gui"
1349 bootoutput
="bootloader-$modelname.ipod"
1350 # toolset is the tools within the tools directory that we build for
1351 # this particular target.
1352 toolset
=$ipodbitmaptools
1353 # architecture, manufacturer and model for the target-tree build
1355 t_manufacturer
="ipod"
1365 tool
="$rootdir/tools/scramble -add=ip4g"
1366 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1367 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1368 output
="rockbox.ipod"
1369 appextra
="recorder:gui"
1372 bootoutput
="bootloader-$modelname.ipod"
1373 # toolset is the tools within the tools directory that we build for
1374 # this particular target.
1375 toolset
=$ipodbitmaptools
1376 # architecture, manufacturer and model for the target-tree build
1378 t_manufacturer
="ipod"
1384 modelname
="ipodmini1g"
1385 target
="-DIPOD_MINI"
1388 tool
="$rootdir/tools/scramble -add=mini"
1389 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1390 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1391 output
="rockbox.ipod"
1392 appextra
="recorder:gui"
1395 bootoutput
="bootloader-$modelname.ipod"
1396 # toolset is the tools within the tools directory that we build for
1397 # this particular target.
1398 toolset
=$ipodbitmaptools
1399 # architecture, manufacturer and model for the target-tree build
1401 t_manufacturer
="ipod"
1407 modelname
="ipodmini2g"
1408 target
="-DIPOD_MINI2G"
1411 tool
="$rootdir/tools/scramble -add=mn2g"
1412 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1413 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1414 output
="rockbox.ipod"
1415 appextra
="recorder:gui"
1418 bootoutput
="bootloader-$modelname.ipod"
1419 # toolset is the tools within the tools directory that we build for
1420 # this particular target.
1421 toolset
=$ipodbitmaptools
1422 # architecture, manufacturer and model for the target-tree build
1424 t_manufacturer
="ipod"
1430 modelname
="ipod1g2g"
1431 target
="-DIPOD_1G2G"
1434 tool
="$rootdir/tools/scramble -add=1g2g"
1435 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1436 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1437 output
="rockbox.ipod"
1438 appextra
="recorder:gui"
1441 bootoutput
="bootloader-$modelname.ipod"
1442 # toolset is the tools within the tools directory that we build for
1443 # this particular target.
1444 toolset
=$ipodbitmaptools
1445 # architecture, manufacturer and model for the target-tree build
1447 t_manufacturer
="ipod"
1453 modelname
="ipodnano2g"
1454 target
="-DIPOD_NANO2G"
1457 tool
="$rootdir/tools/scramble -add=nn2g"
1458 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1459 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1460 output
="rockbox.ipod"
1461 appextra
="recorder:gui"
1464 bootoutput
="bootloader-$modelname.ipod"
1465 # toolset is the tools within the tools directory that we build for
1466 # this particular target.
1467 toolset
=$ipodbitmaptools
1468 # architecture, manufacturer and model for the target-tree build
1470 t_manufacturer
="s5l8700"
1471 t_model
="ipodnano2g"
1476 modelname
="iaudiox5"
1477 target
="-DIAUDIO_X5"
1480 tool
="$rootdir/tools/scramble -add=iax5"
1481 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1482 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1483 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1484 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1485 output
="rockbox.iaudio"
1486 appextra
="recorder:gui"
1489 # toolset is the tools within the tools directory that we build for
1490 # this particular target.
1491 toolset
="$iaudiobitmaptools"
1492 # architecture, manufacturer and model for the target-tree build
1494 t_manufacturer
="iaudio"
1500 modelname
="iaudiom5"
1501 target
="-DIAUDIO_M5"
1504 tool
="$rootdir/tools/scramble -add=iam5"
1505 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1506 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1507 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1508 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1509 output
="rockbox.iaudio"
1510 appextra
="recorder:gui"
1513 # toolset is the tools within the tools directory that we build for
1514 # this particular target.
1515 toolset
="$iaudiobitmaptools"
1516 # architecture, manufacturer and model for the target-tree build
1518 t_manufacturer
="iaudio"
1528 tool
="$rootdir/tools/scramble -add=i7"
1529 boottool
="$rootdir/tools/scramble -tcc=crc"
1530 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1531 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1532 output
="rockbox.iaudio"
1533 appextra
="recorder:gui"
1536 bootoutput
="I7_FW.BIN"
1537 # toolset is the tools within the tools directory that we build for
1538 # this particular target.
1539 toolset
="$tccbitmaptools"
1540 # architecture, manufacturer and model for the target-tree build
1542 t_manufacturer
="tcc77x"
1552 tool
="$rootdir/tools/scramble -add=d2"
1554 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1555 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1557 bootoutput
="bootloader-cowond2.bin"
1558 appextra
="recorder:gui"
1561 toolset
="$tccbitmaptools"
1562 # architecture, manufacturer and model for the target-tree build
1564 t_manufacturer
="tcc780x"
1570 modelname
="iaudiom3"
1571 target
="-DIAUDIO_M3"
1574 tool
="$rootdir/tools/scramble -add=iam3"
1575 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1576 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
1577 output
="rockbox.iaudio"
1578 appextra
="recorder:gui"
1581 # toolset is the tools within the tools directory that we build for
1582 # this particular target.
1583 toolset
="$iaudiobitmaptools"
1584 # architecture, manufacturer and model for the target-tree build
1586 t_manufacturer
="iaudio"
1592 modelname
="gigabeatfx"
1593 target
="-DGIGABEAT_F"
1596 tool
="$rootdir/tools/scramble -add=giga"
1597 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1598 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1599 output
="rockbox.gigabeat"
1600 appextra
="recorder:gui"
1603 toolset
=$gigabeatbitmaptools
1604 boottool
="$rootdir/tools/scramble -gigabeat"
1605 bootoutput
="FWIMG01.DAT"
1606 # architecture, manufacturer and model for the target-tree build
1608 t_manufacturer
="s3c2440"
1609 t_model
="gigabeat-fx"
1614 modelname
="gigabeats"
1615 target
="-DGIGABEAT_S"
1618 tool
="$rootdir/tools/scramble -add=gigs"
1619 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1620 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1621 output
="rockbox.gigabeat"
1622 appextra
="recorder:gui"
1625 toolset
="$gigabeatbitmaptools"
1626 boottool
="$rootdir/tools/scramble -gigabeats"
1628 # architecture, manufacturer and model for the target-tree build
1630 t_manufacturer
="imx31"
1631 t_model
="gigabeat-s"
1636 modelname
="mrobe500"
1637 target
="-DMROBE_500"
1640 tool
="$rootdir/tools/scramble -add=m500"
1641 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1642 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
1643 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1644 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1645 output
="rockbox.mrobe500"
1646 appextra
="recorder:gui"
1649 toolset
=$gigabeatbitmaptools
1651 bootoutput
="rockbox.mrboot"
1652 # architecture, manufacturer and model for the target-tree build
1654 t_manufacturer
="tms320dm320"
1660 modelname
="mrobe100"
1661 target
="-DMROBE_100"
1664 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1665 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1666 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1667 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1668 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1669 output
="rockbox.mi4"
1670 appextra
="recorder:gui"
1673 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1674 bootoutput
="pp5020.mi4"
1675 # toolset is the tools within the tools directory that we build for
1676 # this particular target.
1677 toolset
=$scramblebitmaptools
1678 # architecture, manufacturer and model for the target-tree build
1680 t_manufacturer
="olympus"
1686 modelname
="logikdax"
1687 target
="-DLOGIK_DAX"
1690 tool
="$rootdir/tools/scramble -add=ldax"
1691 boottool
="$rootdir/tools/scramble -tcc=crc"
1692 bootoutput
="player.rom"
1693 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1694 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1695 output
="rockbox.logik"
1696 appextra
="recorder:gui"
1699 # toolset is the tools within the tools directory that we build for
1700 # this particular target.
1701 toolset
=$tccbitmaptools
1702 # architecture, manufacturer and model for the target-tree build
1704 t_manufacturer
="tcc77x"
1710 modelname
="zenvisionm30gb"
1711 target
="-DCREATIVE_ZVM"
1714 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1715 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1716 tool
="$rootdir/tools/scramble -creative=zvm"
1718 output
="rockbox.zvm"
1719 appextra
="recorder:gui"
1722 toolset
=$ipodbitmaptools
1723 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
1724 bootoutput
="rockbox.zvmboot"
1725 # architecture, manufacturer and model for the target-tree build
1727 t_manufacturer
="tms320dm320"
1728 t_model
="creative-zvm"
1733 modelname
="zenvisionm60gb"
1734 target
="-DCREATIVE_ZVM60GB"
1737 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1738 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1739 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1741 output
="rockbox.zvm60"
1742 appextra
="recorder:gui"
1745 toolset
=$ipodbitmaptools
1746 boottool
="$rootdir/tools/scramble -creative=zvm60"
1747 bootoutput
="rockbox.zvm60boot"
1748 # architecture, manufacturer and model for the target-tree build
1750 t_manufacturer
="tms320dm320"
1751 t_model
="creative-zvm"
1756 modelname
="zenvision"
1757 target
="-DCREATIVE_ZV"
1760 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1761 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1762 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1765 appextra
="recorder:gui"
1768 toolset
=$ipodbitmaptools
1769 boottool
="$rootdir/tools/scramble -creative=zenvision"
1770 bootoutput
="rockbox.zvboot"
1771 # architecture, manufacturer and model for the target-tree build
1773 t_manufacturer
="tms320dm320"
1774 t_model
="creative-zvm"
1779 modelname
="sansae200"
1780 target
="-DSANSA_E200"
1781 memory
=32 # supposedly
1783 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1784 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1785 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1786 output
="rockbox.mi4"
1787 appextra
="recorder:gui"
1790 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1791 bootoutput
="PP5022.mi4"
1792 # toolset is the tools within the tools directory that we build for
1793 # this particular target.
1794 toolset
=$scramblebitmaptools
1795 # architecture, manufacturer and model for the target-tree build
1797 t_manufacturer
="sandisk"
1798 t_model
="sansa-e200"
1802 # the e200R model is pretty much identical to the e200, it only has a
1803 # different option to the scramble tool when building a bootloader and
1804 # makes the bootloader output file name in all lower case.
1806 modelname
="sansae200r"
1807 target
="-DSANSA_E200"
1808 memory
=32 # supposedly
1810 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1811 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1812 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1813 output
="rockbox.mi4"
1814 appextra
="recorder:gui"
1817 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1818 bootoutput
="pp5022.mi4"
1819 # toolset is the tools within the tools directory that we build for
1820 # this particular target.
1821 toolset
=$scramblebitmaptools
1822 # architecture, manufacturer and model for the target-tree build
1824 t_manufacturer
="sandisk"
1825 t_model
="sansa-e200"
1830 modelname
="sansac200"
1831 target
="-DSANSA_C200"
1832 memory
=32 # supposedly
1834 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1835 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1836 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1837 output
="rockbox.mi4"
1838 appextra
="recorder:gui"
1841 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1842 bootoutput
="firmware.mi4"
1843 # toolset is the tools within the tools directory that we build for
1844 # this particular target.
1845 toolset
=$scramblebitmaptools
1846 # architecture, manufacturer and model for the target-tree build
1848 t_manufacturer
="sandisk"
1849 t_model
="sansa-c200"
1854 modelname
="sansam200"
1855 target
="-DSANSA_M200"
1858 tool
="$rootdir/tools/scramble -add=m200"
1859 boottool
="$rootdir/tools/scramble -tcc=crc"
1860 bootoutput
="player.rom"
1861 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1862 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1863 output
="rockbox.m200"
1864 appextra
="recorder:gui"
1867 # toolset is the tools within the tools directory that we build for
1868 # this particular target.
1869 toolset
=$tccbitmaptools
1870 # architecture, manufacturer and model for the target-tree build
1872 t_manufacturer
="tcc77x"
1878 modelname
="sansac100"
1879 target
="-DSANSA_C100"
1882 tool
="$rootdir/tools/scramble -add=c100"
1883 boottool
="$rootdir/tools/scramble -tcc=crc"
1884 bootoutput
="player.rom"
1885 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1886 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1887 output
="rockbox.c100"
1888 appextra
="recorder:gui"
1891 # toolset is the tools within the tools directory that we build for
1892 # this particular target.
1893 toolset
=$tccbitmaptools
1894 # architecture, manufacturer and model for the target-tree build
1896 t_manufacturer
="tcc77x"
1902 modelname
="sansaclip"
1903 target
="-DSANSA_CLIP"
1905 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1906 bmp2rb_native
="$bmp2rb_mono"
1907 tool
="$rootdir/tools/scramble -add=clip"
1908 output
="rockbox.sansa"
1909 bootoutput
="bootloader-clip.sansa"
1910 appextra
="recorder:gui"
1913 toolset
=$scramblebitmaptools
1915 t_manufacturer
="as3525"
1916 t_model
="sansa-clip"
1923 modelname
="sansae200v2"
1924 target
="-DSANSA_E200V2"
1926 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1927 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1928 tool
="$rootdir/tools/scramble -add=e2v2"
1929 output
="rockbox.sansa"
1930 bootoutput
="bootloader-e200v2.sansa"
1931 appextra
="recorder:gui"
1934 toolset
=$scramblebitmaptools
1936 t_manufacturer
="as3525"
1937 t_model
="sansa-e200v2"
1944 modelname
="sansam200v4"
1945 target
="-DSANSA_M200V4"
1947 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1948 bmp2rb_native
="$bmp2rb_mono"
1949 tool
="$rootdir/tools/scramble -add=m2v4"
1950 output
="rockbox.sansa"
1951 bootoutput
="bootloader-m200v4.sansa"
1952 appextra
="recorder:gui"
1955 toolset
=$scramblebitmaptools
1957 t_manufacturer
="as3525"
1958 t_model
="sansa-m200v4"
1965 modelname
="sansafuze"
1966 target
="-DSANSA_FUZE"
1968 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1969 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1970 tool
="$rootdir/tools/scramble -add=fuze"
1971 output
="rockbox.sansa"
1972 bootoutput
="bootloader-fuze.sansa"
1973 appextra
="recorder:gui"
1976 toolset
=$scramblebitmaptools
1978 t_manufacturer
="as3525"
1979 t_model
="sansa-fuze"
1986 modelname
="sansac200v2"
1987 target
="-DSANSA_C200V2"
1988 memory
=2 # as per OF diagnosis mode
1989 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1990 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1991 tool
="$rootdir/tools/scramble -add=c2v2"
1992 output
="rockbox.sansa"
1993 bootoutput
="bootloader-c200v2.sansa"
1994 appextra
="recorder:gui"
1997 # toolset is the tools within the tools directory that we build for
1998 # this particular target.
1999 toolset
=$scramblebitmaptools
2000 # architecture, manufacturer and model for the target-tree build
2002 t_manufacturer
="as3525"
2003 t_model
="sansa-c200v2"
2009 modelname
="sansaclipv2"
2010 target
="-DSANSA_CLIPV2"
2013 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2014 bmp2rb_native
="$bmp2rb_mono"
2015 tool
="$rootdir/tools/scramble -add=clv2"
2016 output
="rockbox.sansa"
2017 bootoutput
="bootloader-clipv2.sansa"
2018 appextra
="recorder:gui"
2021 toolset
=$scramblebitmaptools
2023 t_manufacturer
="as3525"
2024 t_model
="sansa-clipv2"
2028 echo "Sansa View is not yet supported!"
2031 modelname
="sansaview"
2032 target
="-DSANSA_VIEW"
2035 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2036 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2037 output
="rockbox.mi4"
2041 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2042 bootoutput
="firmware.mi4"
2043 # toolset is the tools within the tools directory that we build for
2044 # this particular target.
2045 toolset
=$scramblebitmaptools
2047 t_manufacturer
="sandisk"
2048 t_model
="sansa-view"
2053 modelname
="sansaclipplus"
2054 target
="-DSANSA_CLIPPLUS"
2057 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2058 bmp2rb_native
="$bmp2rb_mono"
2059 tool
="$rootdir/tools/scramble -add=cli+"
2060 output
="rockbox.sansa"
2061 bootoutput
="bootloader-clipplus.sansa"
2062 appextra
="recorder:gui"
2065 toolset
=$scramblebitmaptools
2067 t_manufacturer
="as3525"
2068 t_model
="sansa-clipplus"
2073 modelname
="tatungtpj1022"
2074 target
="-DTATUNG_TPJ1022"
2077 tool
="$rootdir/tools/scramble -add tpj2"
2078 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2079 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2080 output
="rockbox.elio"
2081 appextra
="recorder:gui"
2084 boottool
="$rootdir/tools/scramble -mi4v2"
2085 bootoutput
="pp5020.mi4"
2086 # toolset is the tools within the tools directory that we build for
2087 # this particular target.
2088 toolset
=$scramblebitmaptools
2089 # architecture, manufacturer and model for the target-tree build
2091 t_manufacturer
="tatung"
2097 modelname
="gogearsa9200"
2098 target
="-DPHILIPS_SA9200"
2099 memory
=32 # supposedly
2101 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2102 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2103 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2104 output
="rockbox.mi4"
2105 appextra
="recorder:gui"
2108 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2109 bootoutput
="FWImage.ebn"
2110 # toolset is the tools within the tools directory that we build for
2111 # this particular target.
2112 toolset
=$scramblebitmaptools
2113 # architecture, manufacturer and model for the target-tree build
2115 t_manufacturer
="philips"
2121 modelname
="gogearhdd1630"
2122 target
="-DPHILIPS_HDD1630"
2123 memory
=32 # supposedly
2125 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2126 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2127 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2128 output
="rockbox.mi4"
2129 appextra
="recorder:gui"
2132 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2133 bootoutput
="FWImage.ebn"
2134 # toolset is the tools within the tools directory that we build for
2135 # this particular target.
2136 toolset
=$scramblebitmaptools
2137 # architecture, manufacturer and model for the target-tree build
2139 t_manufacturer
="philips"
2145 modelname
="gogearhdd6330"
2146 target
="-DPHILIPS_HDD6330"
2147 memory
=32 # supposedly
2149 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2150 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2151 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2152 output
="rockbox.mi4"
2153 appextra
="recorder:gui"
2156 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2157 bootoutput
="FWImage.ebn"
2158 # toolset is the tools within the tools directory that we build for
2159 # this particular target.
2160 toolset
=$scramblebitmaptools
2161 # architecture, manufacturer and model for the target-tree build
2163 t_manufacturer
="philips"
2169 modelname
="meizum6sl"
2170 target
="-DMEIZU_M6SL"
2174 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2175 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2176 output
="rockbox.meizu"
2177 appextra
="recorder:gui"
2180 toolset
=$genericbitmaptools
2182 bootoutput
="rockboot.ebn"
2183 # architecture, manufacturer and model for the target-tree build
2185 t_manufacturer
="s5l8700"
2186 t_model
="meizu-m6sl"
2191 modelname
="meizum6sp"
2192 target
="-DMEIZU_M6SP"
2196 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2197 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2198 output
="rockbox.meizu"
2199 appextra
="recorder:gui"
2202 toolset
=$genericbitmaptools
2204 bootoutput
="rockboot.ebn"
2205 # architecture, manufacturer and model for the target-tree build
2207 t_manufacturer
="s5l8700"
2208 t_model
="meizu-m6sp"
2218 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2219 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2220 output
="rockbox.meizu"
2221 appextra
="recorder:gui"
2224 toolset
=$genericbitmaptools
2226 bootoutput
="rockboot.ebn"
2227 # architecture, manufacturer and model for the target-tree build
2229 t_manufacturer
="s5l8700"
2235 modelname
="ondavx747"
2236 target
="-DONDA_VX747"
2239 tool
="$rootdir/tools/scramble -add=x747"
2240 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2241 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2242 output
="rockbox.vx747"
2243 appextra
="recorder:gui"
2246 toolset
=$genericbitmaptools
2247 boottool
="$rootdir/tools/scramble -ccpmp"
2248 bootoutput
="ccpmp.bin"
2249 # architecture, manufacturer and model for the target-tree build
2251 t_manufacturer
="ingenic_jz47xx"
2252 t_model
="onda_vx747"
2257 modelname
="ondavx767"
2258 target
="-DONDA_VX767"
2262 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2263 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2264 output
="rockbox.vx767"
2265 appextra
="recorder:gui"
2268 toolset
=$genericbitmaptools
2269 boottool
="$rootdir/tools/scramble -ccpmp"
2270 bootoutput
="ccpmp.bin"
2271 # architecture, manufacturer and model for the target-tree build
2273 t_manufacturer
="ingenic_jz47xx"
2274 t_model
="onda_vx767"
2279 modelname
="ondavx747p"
2280 target
="-DONDA_VX747P"
2283 tool
="$rootdir/tools/scramble -add=747p"
2284 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2285 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2286 output
="rockbox.vx747p"
2287 appextra
="recorder:gui"
2290 toolset
=$genericbitmaptools
2291 boottool
="$rootdir/tools/scramble -ccpmp"
2292 bootoutput
="ccpmp.bin"
2293 # architecture, manufacturer and model for the target-tree build
2295 t_manufacturer
="ingenic_jz47xx"
2296 t_model
="onda_vx747"
2301 modelname
="ondavx777"
2302 target
="-DONDA_VX777"
2305 tool
="$rootdir/tools/scramble -add=x777"
2306 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2307 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2308 output
="rockbox.vx777"
2309 appextra
="recorder:gui"
2312 toolset
=$genericbitmaptools
2313 boottool
="$rootdir/tools/scramble -ccpmp"
2314 bootoutput
="ccpmp.bin"
2315 # architecture, manufacturer and model for the target-tree build
2317 t_manufacturer
="ingenic_jz47xx"
2318 t_model
="onda_vx747"
2323 modelname
="lyreproto1"
2324 target
="-DLYRE_PROTO1"
2328 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2329 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2330 output
="rockbox.lyre"
2331 appextra
="recorder:gui"
2334 toolset
=$scramblebitmaptools
2336 bootoutput
="bootloader-proto1.lyre"
2337 # architecture, manufacturer and model for the target-tree build
2339 t_manufacturer
="at91sam"
2340 t_model
="lyre_proto1"
2345 modelname
="mini2440"
2349 tool
="$rootdir/tools/scramble -add=m244"
2350 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2351 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2352 output
="rockbox.mini2440"
2353 appextra
="recorder:gui"
2356 toolset
=$scramblebitmaptools
2358 bootoutput
="bootloader-mini2440.lyre"
2359 # architecture, manufacturer and model for the target-tree build
2361 t_manufacturer
="s3c2440"
2367 modelname
="samsungyh820"
2368 target
="-DSAMSUNG_YH820"
2371 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2372 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2373 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2374 output
="rockbox.mi4"
2375 appextra
="recorder:gui"
2378 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2379 bootoutput
="FW_YH820.mi4"
2380 # toolset is the tools within the tools directory that we build for
2381 # this particular target.
2382 toolset
=$scramblebitmaptools
2383 # architecture, manufacturer and model for the target-tree build
2385 t_manufacturer
="samsung"
2391 modelname
="samsungyh920"
2392 target
="-DSAMSUNG_YH920"
2395 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2396 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2397 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2398 output
="rockbox.mi4"
2399 appextra
="recorder:gui"
2402 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2403 bootoutput
="PP5020.mi4"
2404 # toolset is the tools within the tools directory that we build for
2405 # this particular target.
2406 toolset
=$scramblebitmaptools
2407 # architecture, manufacturer and model for the target-tree build
2409 t_manufacturer
="samsung"
2415 modelname
="samsungyh925"
2416 target
="-DSAMSUNG_YH925"
2419 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2420 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2421 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2422 output
="rockbox.mi4"
2423 appextra
="recorder:gui"
2426 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2427 bootoutput
="FW_YH925.mi4"
2428 # toolset is the tools within the tools directory that we build for
2429 # this particular target.
2430 toolset
=$scramblebitmaptools
2431 # architecture, manufacturer and model for the target-tree build
2433 t_manufacturer
="samsung"
2439 modelname
="samsungyps3"
2440 target
="-DSAMSUNG_YPS3"
2444 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2445 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2446 output
="rockbox.yps3"
2447 appextra
="recorder:gui"
2450 toolset
=$genericbitmaptools
2452 bootoutput
="rockboot.ebn"
2453 # architecture, manufacturer and model for the target-tree build
2455 t_manufacturer
="s5l8700"
2462 target
="-DPBELL_VIBE500"
2465 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2466 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2467 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2468 output
="jukebox.mi4"
2469 appextra
="recorder:gui"
2472 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2473 bootoutput
="rockbox.mi4"
2474 # toolset is the tools within the tools directory that we build for
2475 # this particular target.
2476 toolset
=$scramblebitmaptools
2477 # architecture, manufacturer and model for the target-tree build
2479 t_manufacturer
="pbell"
2484 echo "Please select a supported target platform!"
2490 echo "Platform set to $modelname"
2494 ############################################################################
2495 # Amount of memory, for those that can differ. They have $memory unset at
2499 if [ -z "$memory" ]; then
2502 if [ "$ARG_RAM" ]; then
2505 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2518 if [ "$ARG_RAM" ]; then
2521 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2534 echo "Memory size selected: $memory MB"
2535 [ "$ARG_TYPE" ] ||
echo ""
2539 ##################################################################
2540 # Figure out build "type"
2543 # the ifp7x0 is the only platform that supports building a gdb stub like
2547 gdbstub
="(G)DB stub, "
2549 sansae200r|sansae200
)
2550 gdbstub
="(I)nstaller, "
2553 gdbstub
="(E)raser, "
2558 if [ "$ARG_TYPE" ]; then
2561 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2567 appsdir
='\$(ROOTDIR)/bootloader'
2569 extradefines
="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2571 echo "e200R-installer build selected"
2574 appsdir
='\$(ROOTDIR)/bootloader'
2576 echo "C2(4)0 or C2(5)0"
2580 extradefines
="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2581 echo "c240 eraser build selected"
2584 extradefines
="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2585 echo "c240 eraser build selected"
2589 echo "c200 eraser build selected"
2592 if test $t_manufacturer = "archos"; then
2593 # Archos SH-based players do this somewhat differently for
2595 appsdir
='\$(ROOTDIR)/flash/bootbox'
2598 appsdir
='\$(ROOTDIR)/bootloader'
2601 if test -n "$boottool"; then
2604 if test -n "$bootoutput"; then
2608 extradefines
="-DBOOTLOADER -ffunction-sections -fdata-sections"
2610 echo "Bootloader build selected"
2613 if [ "$modelname" = "sansae200r" ]; then
2614 echo "Do not use the e200R target for simulator builds. Use e200 instead."
2619 extradefines
="-DSIMULATOR"
2622 echo "Simulator build selected"
2625 echo "Advanced build selected"
2626 whichadvanced
$btype
2629 extradefines
="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2630 appsdir
='\$(ROOTDIR)/gdb'
2639 echo "GDB stub build selected"
2644 echo "Manual build selected"
2652 appsdir
='\$(ROOTDIR)/tools/checkwps';
2653 output
='checkwps.'${modelname};
2655 echo "CheckWPS build selected"
2663 appsdir
='\$(ROOTDIR)/tools/database';
2664 output
='database.'${modelname};
2666 echo "Database tool build selected"
2669 if [ "$modelname" = "sansae200r" ]; then
2670 echo "Do not use the e200R target for regular builds. Use e200 instead."
2674 btype
="N" # set it explicitly since RET only gets here as well
2675 echo "Normal build selected"
2679 # to be able running "make manual" from non-manual configuration
2682 manualdev
="archosfmrecorder"
2685 manualdev
="iriverh100"
2688 manualdev
="ipodmini1g"
2691 manualdev
=$modelname
2695 if [ -z "$debug" ]; then
2696 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
2699 echo "Using source code root directory: $rootdir"
2701 # this was once possible to change at build-time, but no more:
2706 if [ "yes" = "$simulator" ]; then
2707 # setup compiler and things for simulator
2710 if [ -d "simdisk" ]; then
2711 echo "Subdirectory 'simdisk' already present"
2714 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2718 # Now, figure out version number of the (gcc) compiler we are about to use
2719 gccver
=`$CC -dumpversion`;
2721 # figure out the binutil version too and display it, mostly for the build
2722 # system etc to be able to see it easier
2723 if [ $uname = "Darwin" ]; then
2724 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2726 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2729 if [ -z "$gccver" ]; then
2730 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
2731 echo "[WARNING] this may cause your build to fail since we cannot do the"
2732 echo "[WARNING] checks we want now."
2735 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2738 num1
=`echo $gccver | cut -d . -f1`
2739 num2
=`echo $gccver | cut -d . -f2`
2740 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2747 echo "Using $CC $gccver ($gccnum)"
2749 if test "$gccnum" -ge "400"; then
2750 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2751 # so we ignore that warnings for now
2753 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
2756 if test "$gccnum" -ge "401"; then
2757 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2758 # will break strict-aliasing rules"
2760 GCCOPTS
="$GCCOPTS -fno-strict-aliasing"
2763 if test "$gccnum" -ge "402"; then
2764 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2765 # and later would throw it for several valid cases
2766 GCCOPTS
="$GCCOPTS -Wno-override-init"
2774 # cross-compile for win32
2777 # Verify that the cross-compiler is of a recommended version!
2778 if test "$gccver" != "$gccchoice"; then
2779 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2780 echo "WARNING: version $gccchoice!"
2781 echo "WARNING: This may cause your build to fail since it may be a version"
2782 echo "WARNING: that isn't functional or known to not be the best choice."
2783 echo "WARNING: If you suffer from build problems, you know that this is"
2784 echo "WARNING: a likely source for them..."
2792 echo "Using $LD $ldver"
2794 # check the compiler for SH platforms
2795 if test "$CC" = "sh-elf-gcc"; then
2796 if test "$gccnum" -lt "400"; then
2797 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2798 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2800 # figure out patch status
2801 gccpatch
=`$CC --version`;
2803 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
2804 echo "gcc $gccver is rockbox patched"
2805 # then convert -O to -Os to get smaller binaries!
2806 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2808 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2809 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2814 if test "$CC" = "m68k-elf-gcc"; then
2815 # convert -O to -Os to get smaller binaries!
2816 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2819 if [ "$ARG_CCACHE" = "1" ]; then
2820 echo "Enable ccache for building"
2822 elif [ "$ARG_CCACHE" != "0" ]; then
2823 ccache
=`findtool ccache`
2824 if test -n "$ccache"; then
2825 echo "Found and uses ccache ($ccache)"
2829 # figure out the full path to the various commands if possible
2830 HOSTCC
=`findtool gcc --lit`
2831 HOSTAR
=`findtool ar --lit`
2832 CC
=`findtool ${CC} --lit`
2833 LD
=`findtool ${AR} --lit`
2834 AR
=`findtool ${AR} --lit`
2835 AS
=`findtool ${AS} --lit`
2836 OC
=`findtool ${OC} --lit`
2837 WINDRES
=`findtool ${WINDRES} --lit`
2838 DLLTOOL
=`findtool ${DLLTOOL} --lit`
2839 DLLWRAP
=`findtool ${DLLWRAP} --lit`
2840 RANLIB
=`findtool ${RANLIB} --lit`
2842 if test -n "$ccache"; then
2846 if test "X$endian" = "Xbig"; then
2847 defendian
="ROCKBOX_BIG_ENDIAN"
2849 defendian
="ROCKBOX_LITTLE_ENDIAN"
2852 if [ "$ARG_RBDIR" ]; then
2854 echo "Using alternate rockbox dir: ${rbdir}"
2858 -e "s,@ENDIAN@,${defendian},g" \
2859 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2860 -e "s,@config_rtc@,$config_rtc,g" \
2861 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2862 -e "s,@RBDIR@,${rbdir},g" \
2863 -e "s,@have_backlight@,$have_backlight,g" \
2864 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
2865 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
2867 /* This header was made by configure */
2868 #ifndef __BUILD_AUTOCONF_H
2869 #define __BUILD_AUTOCONF_H
2871 /* Define endianess for the target or simulator platform */
2874 /* Define this if you build rockbox to support the logf logging and display */
2875 #undef ROCKBOX_HAS_LOGF
2877 /* optional define for a backlight modded Ondio */
2880 /* optional define for FM radio mod for iAudio M5 */
2883 /* optional define for ATA poweroff on Player */
2886 /* optional defines for RTC mod for h1x0 */
2890 /* root of Rockbox */
2891 #define ROCKBOX_DIR "/@RBDIR@"
2893 #endif /* __BUILD_AUTOCONF_H */
2896 if test -n "$t_cpu"; then
2897 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2898 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2899 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2903 if test "$simulator" = "yes"; then
2904 # add simul make stuff on the #SIMUL# line
2905 simmagic1
="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2906 simmagic2
="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2908 # delete the lines that match
2909 simmagic1
='/@SIMUL1@/D'
2910 simmagic2
='/@SIMUL2@/D'
2913 if test "$swcodec" = "yes"; then
2914 voicetoolset
="rbspeexenc voicefont wavtrim"
2916 voicetoolset
="voicefont wavtrim"
2919 if test "$apps" = "apps"; then
2920 # only when we build "real" apps we build the .lng files
2924 #### Fix the cmdline ###
2925 if test -n "$ccache"; then
2929 cmdline
="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
2933 -e "s,@ROOTDIR@,${rootdir},g" \
2934 -e "s,@DEBUG@,${debug},g" \
2935 -e "s,@MEMORY@,${memory},g" \
2936 -e "s,@TARGET_ID@,${target_id},g" \
2937 -e "s,@TARGET@,${target},g" \
2938 -e "s,@CPU@,${t_cpu},g" \
2939 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2940 -e "s,@MODELNAME@,${modelname},g" \
2941 -e "s,@LANGUAGE@,${language},g" \
2942 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2943 -e "s,@PWD@,${pwd},g" \
2944 -e "s,@HOSTCC@,${HOSTCC},g" \
2945 -e "s,@HOSTAR@,${HOSTAR},g" \
2946 -e "s,@CC@,${CC},g" \
2947 -e "s,@LD@,${LD},g" \
2948 -e "s,@AR@,${AR},g" \
2949 -e "s,@AS@,${AS},g" \
2950 -e "s,@OC@,${OC},g" \
2951 -e "s,@WINDRES@,${WINDRES},g" \
2952 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2953 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2954 -e "s,@RANLIB@,${RANLIB},g" \
2955 -e "s,@TOOL@,${tool},g" \
2956 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2957 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2958 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2959 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2960 -e "s,@OUTPUT@,${output},g" \
2961 -e "s,@APPEXTRA@,${appextra},g" \
2962 -e "s,@ARCHOSROM@,${archosrom},g" \
2963 -e "s,@FLASHFILE@,${flash},g" \
2964 -e "s,@PLUGINS@,${plugins},g" \
2965 -e "s,@CODECS@,${swcodec},g" \
2966 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2967 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2968 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2969 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2970 -e "s!@LDOPTS@!${LDOPTS}!g" \
2971 -e "s,@LOADADDRESS@,${loadaddress},g" \
2972 -e "s,@EXTRADEF@,${extradefines},g" \
2973 -e "s,@APPSDIR@,${appsdir},g" \
2974 -e "s,@FIRMDIR@,${firmdir},g" \
2975 -e "s,@TOOLSDIR@,${toolsdir},g" \
2976 -e "s,@APPS@,${apps},g" \
2977 -e "s,@SIMVER@,${simver},g" \
2978 -e "s,@GCCVER@,${gccver},g" \
2979 -e "s,@GCCNUM@,${gccnum},g" \
2980 -e "s,@UNAME@,${uname},g" \
2981 -e "s,@ENDIAN@,${defendian},g" \
2982 -e "s,@TOOLSET@,${toolset},g" \
2985 -e "s,@MANUALDEV@,${manualdev},g" \
2986 -e "s,@ENCODER@,${ENC_CMD},g" \
2987 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2988 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2989 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2990 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2991 -e "s,@LANGS@,${buildlangs},g" \
2992 -e "s,@USE_ELF@,${USE_ELF},g" \
2993 -e "s,@RBDIR@,${rbdir},g" \
2994 -e "s,@PREFIX@,$PREFIX,g" \
2995 -e "s,@CMDLINE@,$cmdline,g" \
2997 ## Automatically generated. http://www.rockbox.org/
2999 export ROOTDIR=@ROOTDIR@
3000 export FIRMDIR=@FIRMDIR@
3001 export APPSDIR=@APPSDIR@
3002 export TOOLSDIR=@TOOLSDIR@
3003 export DOCSDIR=\$(ROOTDIR)/docs
3004 export MANUALDIR=\${ROOTDIR}/manual
3005 export DEBUG=@DEBUG@
3006 export MODELNAME=@MODELNAME@
3007 export ARCHOSROM=@ARCHOSROM@
3008 export FLASHFILE=@FLASHFILE@
3009 export TARGET_ID=@TARGET_ID@
3010 export TARGET=@TARGET@
3012 export MANUFACTURER=@MANUFACTURER@
3014 export BUILDDIR=@PWD@
3015 export LANGUAGE=@LANGUAGE@
3016 export VOICELANGUAGE=@VOICELANGUAGE@
3017 export MEMORYSIZE=@MEMORY@
3018 export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
3019 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3020 export MKFIRMWARE=@TOOL@
3021 export BMP2RB_MONO=@BMP2RB_MONO@
3022 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3023 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3024 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3025 export BINARY=@OUTPUT@
3026 export APPEXTRA=@APPEXTRA@
3027 export ENABLEDPLUGINS=@PLUGINS@
3028 export SOFTWARECODECS=@CODECS@
3029 export EXTRA_DEFINES=@EXTRADEF@
3030 export HOSTCC=@HOSTCC@
3031 export HOSTAR=@HOSTAR@
3037 export WINDRES=@WINDRES@
3038 export DLLTOOL=@DLLTOOL@
3039 export DLLWRAP=@DLLWRAP@
3040 export RANLIB=@RANLIB@
3041 export PREFIX=@PREFIX@
3042 export PROFILE_OPTS=@PROFILE_OPTS@
3043 export SIMVER=@SIMVER@
3044 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3045 export GCCOPTS=@GCCOPTS@
3046 export TARGET_INC=@TARGET_INC@
3047 export LOADADDRESS=@LOADADDRESS@
3048 export SHARED_FLAG=@SHARED_FLAG@
3049 export LDOPTS=@LDOPTS@
3050 export GCCVER=@GCCVER@
3051 export GCCNUM=@GCCNUM@
3052 export UNAME=@UNAME@
3053 export MANUALDEV=@MANUALDEV@
3054 export TTS_OPTS=@TTS_OPTS@
3055 export TTS_ENGINE=@TTS_ENGINE@
3056 export ENC_OPTS=@ENC_OPTS@
3057 export ENCODER=@ENCODER@
3058 export USE_ELF=@USE_ELF@
3059 export RBDIR=@RBDIR@
3061 CONFIGURE_OPTIONS=@CMDLINE@
3063 include \$(TOOLSDIR)/root.make
3067 echo "Created Makefile"