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" != "gigabeatf" -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" = "player" ]; then
358 printf ", Use (A)TA poweroff"
360 if [ "$t_model" = "ondio" ]; then
361 printf ", (B)acklight MOD"
363 if [ "$modelname" = "m5" ]; then
364 printf ", (F)M radio MOD"
366 if [ "$modelname" = "h120" ]; 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" = "player" ]; 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" = "m5" ]; then
430 have_fmradio_in
="#define HAVE_FMRADIO_IN"
431 echo "FM radio functions enabled"
435 if [ "$modelname" = "h120" ]; 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 atype
=`echo "$atype" | cut -c 2-`
455 [ "$atype" ] || cont
=0
460 if [ "yes" = "$voice" ]; then
461 # Ask about languages to build
463 voicelanguage
=`whichlang`
464 echo "Voice language set to $voicelanguage"
466 # Configure encoder and TTS engine for each language
467 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
468 voiceconfig
"$thislang"
471 if [ "yes" = "$use_debug" ]; then
473 GCCOPTS
="$GCCOPTS -g -DDEBUG"
475 if [ "yes" = "$logf" ]; then
476 use_logf
="#define ROCKBOX_HAS_LOGF 1"
478 if [ "yes" = "$simulator" ]; then
480 extradefines
="$extradefines -DSIMULATOR"
484 if [ "yes" = "$profile" ]; then
485 extradefines
="$extradefines -DRB_PROFILE"
486 PROFILE_OPTS
="-finstrument-functions"
490 # Configure voice settings
493 if [ ! "$ARG_TTS" ]; then
494 echo "Building $thislang voice for $modelname. Select options"
498 if [ -n "`findtool flite`" ]; then
502 DEFAULT_TTS_OPTS
=$FLITE_OPTS
503 DEFAULT_NOISEFLOOR
="500"
506 if [ -n "`findtool espeak`" ]; then
510 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
511 DEFAULT_NOISEFLOOR
="500"
514 if [ -n "`findtool festival`" ]; then
515 FESTIVAL
="(F)estival "
518 FESTIVAL_OPTS
="--language italian"
521 FESTIVAL_OPTS
="--language spanish"
524 FESTIVAL_OPTS
="--language finnish"
527 FESTIVAL_OPTS
="--language czech"
533 DEFAULT_TTS
="festival"
534 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
535 DEFAULT_NOISEFLOOR
="500"
538 if [ -n "`findtool swift`" ]; then
542 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
543 DEFAULT_NOISEFLOOR
="500"
546 # Allow SAPI if Windows is in use
547 if [ -n "`findtool winver`" ]; then
551 DEFAULT_TTS_OPTS
=$SAPI_OPTS
552 DEFAULT_NOISEFLOOR
="500"
556 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
557 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
561 if [ "$ARG_TTS" ]; then
564 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
567 advopts
="$advopts --tts=$option"
571 NOISEFLOOR
="500" # TODO: check this value
577 TTS_OPTS
=$ESPEAK_OPTS
580 TTS_ENGINE
="festival"
582 TTS_OPTS
=$FESTIVAL_OPTS
595 TTS_ENGINE
=$DEFAULT_TTS
596 TTS_OPTS
=$DEFAULT_TTS_OPTS
597 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
599 echo "Using $TTS_ENGINE for TTS"
601 # Select which voice to use for Festival
602 if [ "$TTS_ENGINE" = "festival" ]; then
603 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
604 for voice
in $voicelist; do
605 TTS_FESTIVAL_VOICE
="$voice" # Default choice
608 if [ "$ARG_VOICE" ]; then
612 for voice
in $voicelist; do
613 printf "%3d. %s\n" "$i" "$voice"
616 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
620 for voice
in $voicelist; do
621 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
622 TTS_FESTIVAL_VOICE
="$voice"
626 advopts
="$advopts --voice=$CHOICE"
627 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
628 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
631 # Allow the user to input manual commandline options
632 if [ "$ARG_TTSOPTS" ]; then
633 USER_TTS_OPTS
=$ARG_TTSOPTS
635 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
636 USER_TTS_OPTS
=`input`
639 advopts
="$advopts --ttsopts='$USER_TTS_OPTS'"
640 if [ -n "$USER_TTS_OPTS" ]; then
641 TTS_OPTS
="$USER_TTS_OPTS"
643 echo "$TTS_ENGINE options set to $TTS_OPTS"
645 if [ "$swcodec" = "yes" ]; then
648 ENC_OPTS
="-q 4 -c 10"
650 if [ -n "`findtool lame`" ]; then
653 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
655 echo "You need LAME in the system path to build voice files for"
656 echo "HWCODEC targets."
661 echo "Using $ENCODER for encoding voice clips"
663 # Allow the user to input manual commandline options
664 if [ "$ARG_ENCOPTS" ]; then
665 USER_ENC_OPTS
=$ARG_ENCOPTS
667 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
668 USER_ENC_OPTS
=`input`
670 advopts
="$advopts --encopts='$USER_ENC_OPTS'"
671 if [ -n "$USER_ENC_OPTS" ]; then
672 ENC_OPTS
=$USER_ENC_OPTS
674 echo "$ENCODER options set to $ENC_OPTS"
677 if [ -n "`findtool cygpath`" ]; then
678 TEMPDIR
=`cygpath . -a -w`
683 # figure out which languages that are around
684 for file in $rootdir/apps
/lang
/*.lang
; do
685 clean
=`basename $file .lang`
686 langs
="$langs $clean"
689 if [ "$ARG_LANG" ]; then
692 echo "Select a number for the language to use (default is english)"
693 # FIXME The multiple-language feature is currently broken
694 # echo "You may enter a comma-separated list of languages to build"
697 for one
in $langs; do
703 advopts
="$advopts --language=$pick"
708 # Allow the user to pass a comma-separated list of langauges
709 for thispick
in `echo $pick | sed 's/,/ /g'`; do
711 for one
in $langs; do
712 # Accept both the language number and name
713 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
714 if [ "$output" = "" ]; then
723 if [ -z "$output" ]; then
731 echo "Rockbox configure script."
732 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
733 echo "Do *NOT* run this within the tools directory!"
736 Usage: configure [OPTION]...
738 --target=TARGET Sets the target, TARGET can be either the target ID or
739 corresponding string. Run without this option to see all
742 --ram=RAM Sets the RAM for certain targets. Even though any number
743 is accepted, not every number is correct. The default
744 value will be applied, if you entered a wrong number
745 (which depends on the target). Watch the output. Run
746 without this option if you are not sure which the right
749 --type=TYPE Sets the build type. Shortcuts are also valid.
750 Run without this option to see all available types.
751 Multiple values are allowed and managed in the input
752 order. So --type=b stands for Bootloader build, while
753 --type=ab stands for "Backlight MOD" build.
755 --language=LANG Set the language used for voice generation (used only if
758 --tts=ENGINE Set the TTS engine used for voice generation (used only
761 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
764 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
766 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
768 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
769 This is useful for having multiple alternate builds on
770 your device that you can load with ROLO. However as the
771 bootloader looks for .rockbox you won't be able to boot
774 --ccache Enable ccache use (done by default these days)
775 --no-ccache Disable ccache use
777 --eabi Make configure prefer toolchains that are able to compile
778 for the new ARM standard abi EABI
779 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
780 --help Shows this message (must not be used with other options)
801 --ccache) ARG_CCACHE
=1;;
802 --no-ccache) ARG_CCACHE
=0;;
803 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
804 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
805 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
806 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
807 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
808 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
809 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
810 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
811 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
812 --eabi) ARG_ARM_EABI
=1;;
813 --no-eabi) ARG_ARM_EABI
=0;;
815 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
822 if [ "$TMPDIR" != "" ]; then
827 echo Using temporary directory
$tmpdir
829 if test -r "configure"; then
830 # this is a check for a configure script in the current directory, it there
831 # is one, try to figure out if it is this one!
833 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
834 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
835 echo "It will only cause you pain and grief. Instead do this:"
838 echo " mkdir build-dir"
840 echo " ../tools/configure"
842 echo "Much happiness will arise from this. Enjoy"
847 # get our current directory
850 if { echo $pwd |
grep " "; } then
851 echo "You're running this script in a path that contains space. The build"
852 echo "system is unfortunately not clever enough to deal with this. Please"
853 echo "run the script from a different path, rename the path or fix the build"
858 if [ -z "$rootdir" ]; then
859 ##################################################################
860 # Figure out where the source code root is!
862 rootdir
=`dirname $0`/..
/
864 #####################################################################
865 # Convert the possibly relative directory name to an absolute version
871 # cd back to the build dir
876 appsdir
='\$(ROOTDIR)/apps'
877 firmdir
='\$(ROOTDIR)/firmware'
878 toolsdir
='\$(ROOTDIR)/tools'
881 ##################################################################
882 # Figure out target platform
885 if [ "$ARG_TARGET" ]; then
888 echo "Enter target platform:"
890 ==Archos== ==iriver== ==Apple iPod==
891 0) Player/Studio 10) H120/H140 20) Color/Photo
892 1) Recorder 11) H320/H340 21) Nano
893 2) FM Recorder 12) iHP-100/110/115 22) Video
894 3) Recorder v2 13) iFP-790 23) 3G
895 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
896 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
898 ==Toshiba== 27) 1G, 2G
899 ==Cowon/iAudio== 40) Gigabeat F 28) Nano 2G
900 30) X5/X5V/X5L 41) Gigabeat S
901 31) M5/M5L ==SanDisk==
902 32) 7 ==Olympus= 50) Sansa e200
903 33) D2 70) M:Robe 500 51) Sansa e200R
904 34) M3/M3L 71) M:Robe 100 52) Sansa c200
906 ==Creative== ==Philips== 54) Sansa c100
907 90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip
908 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2
909 92) Zen Vision HDD1830 57) Sansa m200v4
911 ==Onda== ==Meizu== 59) Sansa c200v2
912 120) VX747 110) M6SL 60) Sansa Clipv2
913 121) VX767 111) M6SP 61) Sansa View
917 ==Samsung== ==Tatung==
918 140) YH-820 150) Elio TPJ-1022 ==Lyre project==
919 141) YH-920 130) Lyre proto 1
920 142) YH-925 131) Mini2440
927 # Set of tools built for all target platforms:
928 toolset
="rdf2binary convbdf codepages"
930 # Toolsets for some target families:
931 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
932 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
933 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
934 ipodbitmaptools
="$toolset scramble bmp2rb"
935 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
936 tccbitmaptools
="$toolset scramble bmp2rb"
937 # generic is used by IFP, Meizu and Onda
938 genericbitmaptools
="$toolset bmp2rb"
939 # scramble is used by all other targets
940 scramblebitmaptools
="$genericbitmaptools scramble"
943 # ---- For each target ----
946 # target_id: a unique number identifying this target, IS NOT the menu number.
947 # Just use the currently highest number+1 when you add a new
949 # modelname: short model name used all over to identify this target
950 # memory: number of megabytes of RAM this target has. If the amount can
951 # be selected by the size prompt, let memory be unset here
952 # target: -Ddefine passed to the build commands to make the correct
953 # config-*.h file get included etc
954 # tool: the tool that takes a plain binary and converts that into a
955 # working "firmware" file for your target
956 # output: the final output file name
957 # boottool: the tool that takes a plain binary and generates a bootloader
958 # file for your target (or blank to use $tool)
959 # bootoutput:the final output file name for the bootloader (or blank to use
961 # appextra: passed to the APPEXTRA variable in the Makefiles.
962 # TODO: add proper explanation
963 # archosrom: used only for Archos targets that build a special flashable .ucl
965 # flash: name of output for flashing, for targets where there's a special
966 # file output for this.
967 # plugins: set to 'yes' to build the plugins. Early development builds can
968 # set this to no in the early stages to have an easier life for a
970 # swcodec: set 'yes' on swcodec targets
971 # toolset: lists what particular tools in the tools/ directory that this
972 # target needs to have built prior to building Rockbox
975 # *cc: sets up gcc and compiler options for your target builds. Note
976 # that if you select a simulator build, the compiler selection is
977 # overridden later in the script.
984 target
="-DARCHOS_PLAYER"
986 tool
="$rootdir/tools/scramble"
988 appextra
="player:gui"
989 archosrom
="$pwd/rombox.ucl"
990 flash
="$pwd/rockbox.ucl"
994 # toolset is the tools within the tools directory that we build for
995 # this particular target.
996 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
998 # Note: the convbdf is present in the toolset just because: 1) the
999 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1000 # build the player simulator
1003 t_manufacturer
="archos"
1009 modelname
="recorder"
1010 target
="-DARCHOS_RECORDER"
1012 tool
="$rootdir/tools/scramble"
1013 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1014 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1016 appextra
="recorder:gui"
1017 #archosrom="$pwd/rombox.ucl"
1018 flash
="$pwd/rockbox.ucl"
1021 # toolset is the tools within the tools directory that we build for
1022 # this particular target.
1023 toolset
=$archosbitmaptools
1025 t_manufacturer
="archos"
1031 modelname
="fmrecorder"
1032 target
="-DARCHOS_FMRECORDER"
1034 tool
="$rootdir/tools/scramble -fm"
1035 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1036 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1038 appextra
="recorder:gui"
1039 #archosrom="$pwd/rombox.ucl"
1040 flash
="$pwd/rockbox.ucl"
1043 # toolset is the tools within the tools directory that we build for
1044 # this particular target.
1045 toolset
=$archosbitmaptools
1047 t_manufacturer
="archos"
1053 modelname
="recorderv2"
1054 target
="-DARCHOS_RECORDERV2"
1056 tool
="$rootdir/tools/scramble -v2"
1057 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1058 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1060 appextra
="recorder:gui"
1061 #archosrom="$pwd/rombox.ucl"
1062 flash
="$pwd/rockbox.ucl"
1065 # toolset is the tools within the tools directory that we build for
1066 # this particular target.
1067 toolset
=$archosbitmaptools
1069 t_manufacturer
="archos"
1076 target
="-DARCHOS_ONDIOSP"
1078 tool
="$rootdir/tools/scramble -osp"
1079 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1080 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1082 appextra
="recorder:gui"
1083 archosrom
="$pwd/rombox.ucl"
1084 flash
="$pwd/rockbox.ucl"
1087 # toolset is the tools within the tools directory that we build for
1088 # this particular target.
1089 toolset
=$archosbitmaptools
1091 t_manufacturer
="archos"
1098 target
="-DARCHOS_ONDIOFM"
1100 tool
="$rootdir/tools/scramble -ofm"
1101 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1102 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1104 appextra
="recorder:gui"
1105 #archosrom="$pwd/rombox.ucl"
1106 flash
="$pwd/rockbox.ucl"
1109 toolset
=$archosbitmaptools
1111 t_manufacturer
="archos"
1118 target
="-DARCHOS_AV300"
1121 tool
="$rootdir/tools/scramble -mm=C"
1122 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1123 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1125 appextra
="recorder:gui"
1128 # toolset is the tools within the tools directory that we build for
1129 # this particular target.
1130 toolset
="$toolset scramble descramble bmp2rb"
1131 # architecture, manufacturer and model for the target-tree build
1133 t_manufacturer
="archos"
1140 target
="-DIRIVER_H120"
1143 tool
="$rootdir/tools/scramble -add=h120"
1144 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1145 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1146 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1147 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1148 output
="rockbox.iriver"
1149 bootoutput
="bootloader.iriver"
1150 appextra
="recorder:gui"
1151 flash
="$pwd/rombox.iriver"
1154 # toolset is the tools within the tools directory that we build for
1155 # this particular target.
1156 toolset
=$iriverbitmaptools
1158 t_manufacturer
="iriver"
1165 target
="-DIRIVER_H300"
1168 tool
="$rootdir/tools/scramble -add=h300"
1169 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1170 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1171 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1172 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1173 output
="rockbox.iriver"
1174 appextra
="recorder:gui"
1177 # toolset is the tools within the tools directory that we build for
1178 # this particular target.
1179 toolset
=$iriverbitmaptools
1181 t_manufacturer
="iriver"
1188 target
="-DIRIVER_H100"
1191 tool
="$rootdir/tools/scramble -add=h100"
1192 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1193 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1194 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1195 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1196 output
="rockbox.iriver"
1197 bootoutput
="bootloader.iriver"
1198 appextra
="recorder:gui"
1199 flash
="$pwd/rombox.iriver"
1202 # toolset is the tools within the tools directory that we build for
1203 # this particular target.
1204 toolset
=$iriverbitmaptools
1206 t_manufacturer
="iriver"
1213 target
="-DIRIVER_IFP7XX"
1217 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1218 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1219 output
="rockbox.wma"
1220 appextra
="recorder:gui"
1223 # toolset is the tools within the tools directory that we build for
1224 # this particular target.
1225 toolset
=$genericbitmaptools
1227 t_manufacturer
="pnx0101"
1228 t_model
="iriver-ifp7xx"
1234 target
="-DIRIVER_H10"
1237 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1238 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1239 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1240 output
="rockbox.mi4"
1241 appextra
="recorder:gui"
1244 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1245 bootoutput
="H10_20GC.mi4"
1246 # toolset is the tools within the tools directory that we build for
1247 # this particular target.
1248 toolset
=$scramblebitmaptools
1249 # architecture, manufacturer and model for the target-tree build
1251 t_manufacturer
="iriver"
1258 target
="-DIRIVER_H10_5GB"
1261 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1262 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1263 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1264 output
="rockbox.mi4"
1265 appextra
="recorder:gui"
1268 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1269 bootoutput
="H10.mi4"
1270 # toolset is the tools within the tools directory that we build for
1271 # this particular target.
1272 toolset
=$scramblebitmaptools
1273 # architecture, manufacturer and model for the target-tree build
1275 t_manufacturer
="iriver"
1281 modelname
="ipodcolor"
1282 target
="-DIPOD_COLOR"
1285 tool
="$rootdir/tools/scramble -add=ipco"
1286 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1287 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1288 output
="rockbox.ipod"
1289 appextra
="recorder:gui"
1292 bootoutput
="bootloader-$modelname.ipod"
1293 # toolset is the tools within the tools directory that we build for
1294 # this particular target.
1295 toolset
=$ipodbitmaptools
1296 # architecture, manufacturer and model for the target-tree build
1298 t_manufacturer
="ipod"
1304 modelname
="ipodnano"
1305 target
="-DIPOD_NANO"
1308 tool
="$rootdir/tools/scramble -add=nano"
1309 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1310 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1311 output
="rockbox.ipod"
1312 appextra
="recorder:gui"
1315 bootoutput
="bootloader-$modelname.ipod"
1316 # toolset is the tools within the tools directory that we build for
1317 # this particular target.
1318 toolset
=$ipodbitmaptools
1319 # architecture, manufacturer and model for the target-tree build
1321 t_manufacturer
="ipod"
1327 modelname
="ipodvideo"
1328 target
="-DIPOD_VIDEO"
1330 tool
="$rootdir/tools/scramble -add=ipvd"
1331 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1332 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1333 output
="rockbox.ipod"
1334 appextra
="recorder:gui"
1337 bootoutput
="bootloader-$modelname.ipod"
1338 # toolset is the tools within the tools directory that we build for
1339 # this particular target.
1340 toolset
=$ipodbitmaptools
1341 # architecture, manufacturer and model for the target-tree build
1343 t_manufacturer
="ipod"
1353 tool
="$rootdir/tools/scramble -add=ip3g"
1354 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1355 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1356 output
="rockbox.ipod"
1357 appextra
="recorder:gui"
1360 bootoutput
="bootloader-$modelname.ipod"
1361 # toolset is the tools within the tools directory that we build for
1362 # this particular target.
1363 toolset
=$ipodbitmaptools
1364 # architecture, manufacturer and model for the target-tree build
1366 t_manufacturer
="ipod"
1376 tool
="$rootdir/tools/scramble -add=ip4g"
1377 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1378 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1379 output
="rockbox.ipod"
1380 appextra
="recorder:gui"
1383 bootoutput
="bootloader-$modelname.ipod"
1384 # toolset is the tools within the tools directory that we build for
1385 # this particular target.
1386 toolset
=$ipodbitmaptools
1387 # architecture, manufacturer and model for the target-tree build
1389 t_manufacturer
="ipod"
1395 modelname
="ipodmini"
1396 target
="-DIPOD_MINI"
1399 tool
="$rootdir/tools/scramble -add=mini"
1400 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1401 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1402 output
="rockbox.ipod"
1403 appextra
="recorder:gui"
1406 bootoutput
="bootloader-$modelname.ipod"
1407 # toolset is the tools within the tools directory that we build for
1408 # this particular target.
1409 toolset
=$ipodbitmaptools
1410 # architecture, manufacturer and model for the target-tree build
1412 t_manufacturer
="ipod"
1418 modelname
="ipodmini2g"
1419 target
="-DIPOD_MINI2G"
1422 tool
="$rootdir/tools/scramble -add=mn2g"
1423 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1424 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1425 output
="rockbox.ipod"
1426 appextra
="recorder:gui"
1429 bootoutput
="bootloader-$modelname.ipod"
1430 # toolset is the tools within the tools directory that we build for
1431 # this particular target.
1432 toolset
=$ipodbitmaptools
1433 # architecture, manufacturer and model for the target-tree build
1435 t_manufacturer
="ipod"
1441 modelname
="ipod1g2g"
1442 target
="-DIPOD_1G2G"
1445 tool
="$rootdir/tools/scramble -add=1g2g"
1446 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1447 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1448 output
="rockbox.ipod"
1449 appextra
="recorder:gui"
1452 bootoutput
="bootloader-$modelname.ipod"
1453 # toolset is the tools within the tools directory that we build for
1454 # this particular target.
1455 toolset
=$ipodbitmaptools
1456 # architecture, manufacturer and model for the target-tree build
1458 t_manufacturer
="ipod"
1464 modelname
="ipodnano2g"
1465 target
="-DIPOD_NANO2G"
1468 tool
="$rootdir/tools/scramble -add=nn2g"
1469 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1470 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1471 output
="rockbox.ipod"
1472 appextra
="recorder:gui"
1475 bootoutput
="bootloader-$modelname.ipod"
1476 # toolset is the tools within the tools directory that we build for
1477 # this particular target.
1478 toolset
=$ipodbitmaptools
1479 # architecture, manufacturer and model for the target-tree build
1481 t_manufacturer
="s5l8700"
1482 t_model
="ipodnano2g"
1488 target
="-DIAUDIO_X5"
1491 tool
="$rootdir/tools/scramble -add=iax5"
1492 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1493 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1494 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1495 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1496 output
="rockbox.iaudio"
1497 appextra
="recorder:gui"
1500 # toolset is the tools within the tools directory that we build for
1501 # this particular target.
1502 toolset
="$iaudiobitmaptools"
1503 # architecture, manufacturer and model for the target-tree build
1505 t_manufacturer
="iaudio"
1512 target
="-DIAUDIO_M5"
1515 tool
="$rootdir/tools/scramble -add=iam5"
1516 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1517 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1518 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1519 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1520 output
="rockbox.iaudio"
1521 appextra
="recorder:gui"
1524 # toolset is the tools within the tools directory that we build for
1525 # this particular target.
1526 toolset
="$iaudiobitmaptools"
1527 # architecture, manufacturer and model for the target-tree build
1529 t_manufacturer
="iaudio"
1539 tool
="$rootdir/tools/scramble -add=i7"
1540 boottool
="$rootdir/tools/scramble -tcc=crc"
1541 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1542 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1543 output
="rockbox.iaudio"
1544 appextra
="recorder:gui"
1547 bootoutput
="I7_FW.BIN"
1548 # toolset is the tools within the tools directory that we build for
1549 # this particular target.
1550 toolset
="$tccbitmaptools"
1551 # architecture, manufacturer and model for the target-tree build
1553 t_manufacturer
="tcc77x"
1563 tool
="$rootdir/tools/scramble -add=d2"
1565 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1566 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1568 bootoutput
="bootloader-cowond2.bin"
1569 appextra
="recorder:gui"
1572 toolset
="$tccbitmaptools"
1573 # architecture, manufacturer and model for the target-tree build
1575 t_manufacturer
="tcc780x"
1582 target
="-DIAUDIO_M3"
1585 tool
="$rootdir/tools/scramble -add=iam3"
1586 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1587 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
1588 output
="rockbox.iaudio"
1589 appextra
="recorder:gui"
1592 # toolset is the tools within the tools directory that we build for
1593 # this particular target.
1594 toolset
="$iaudiobitmaptools"
1595 # architecture, manufacturer and model for the target-tree build
1597 t_manufacturer
="iaudio"
1603 modelname
="gigabeatf"
1604 target
="-DGIGABEAT_F"
1607 tool
="$rootdir/tools/scramble -add=giga"
1608 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1609 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1610 output
="rockbox.gigabeat"
1611 appextra
="recorder:gui"
1614 toolset
=$gigabeatbitmaptools
1615 boottool
="$rootdir/tools/scramble -gigabeat"
1616 bootoutput
="FWIMG01.DAT"
1617 # architecture, manufacturer and model for the target-tree build
1619 t_manufacturer
="s3c2440"
1620 t_model
="gigabeat-fx"
1625 modelname
="gigabeats"
1626 target
="-DGIGABEAT_S"
1629 tool
="$rootdir/tools/scramble -add=gigs"
1630 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1631 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1632 output
="rockbox.gigabeat"
1633 appextra
="recorder:gui"
1636 toolset
="$gigabeatbitmaptools"
1637 boottool
="$rootdir/tools/scramble -gigabeats"
1639 # architecture, manufacturer and model for the target-tree build
1641 t_manufacturer
="imx31"
1642 t_model
="gigabeat-s"
1647 modelname
="mrobe500"
1648 target
="-DMROBE_500"
1651 tool
="$rootdir/tools/scramble -add=m500"
1652 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1653 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
1654 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1655 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1656 output
="rockbox.mrobe500"
1657 appextra
="recorder:gui"
1660 toolset
=$gigabeatbitmaptools
1662 bootoutput
="rockbox.mrboot"
1663 # architecture, manufacturer and model for the target-tree build
1665 t_manufacturer
="tms320dm320"
1671 modelname
="mrobe100"
1672 target
="-DMROBE_100"
1675 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1676 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1677 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1678 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1679 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1680 output
="rockbox.mi4"
1681 appextra
="recorder:gui"
1684 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1685 bootoutput
="pp5020.mi4"
1686 # toolset is the tools within the tools directory that we build for
1687 # this particular target.
1688 toolset
=$scramblebitmaptools
1689 # architecture, manufacturer and model for the target-tree build
1691 t_manufacturer
="olympus"
1697 modelname
="logikdax"
1698 target
="-DLOGIK_DAX"
1701 tool
="$rootdir/tools/scramble -add=ldax"
1702 boottool
="$rootdir/tools/scramble -tcc=crc"
1703 bootoutput
="player.rom"
1704 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1705 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1706 output
="rockbox.logik"
1707 appextra
="recorder:gui"
1710 # toolset is the tools within the tools directory that we build for
1711 # this particular target.
1712 toolset
=$tccbitmaptools
1713 # architecture, manufacturer and model for the target-tree build
1715 t_manufacturer
="tcc77x"
1721 modelname
="creativezvm30gb"
1722 target
="-DCREATIVE_ZVM"
1725 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1726 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1727 tool
="$rootdir/tools/scramble -creative=zvm"
1729 output
="rockbox.zvm"
1730 appextra
="recorder:gui"
1733 toolset
=$ipodbitmaptools
1734 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
1735 bootoutput
="rockbox.zvmboot"
1736 # architecture, manufacturer and model for the target-tree build
1738 t_manufacturer
="tms320dm320"
1739 t_model
="creative-zvm"
1744 modelname
="creativezvm60gb"
1745 target
="-DCREATIVE_ZVM60GB"
1748 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1749 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1750 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1752 output
="rockbox.zvm60"
1753 appextra
="recorder:gui"
1756 toolset
=$ipodbitmaptools
1757 boottool
="$rootdir/tools/scramble -creative=zvm60"
1758 bootoutput
="rockbox.zvm60boot"
1759 # architecture, manufacturer and model for the target-tree build
1761 t_manufacturer
="tms320dm320"
1762 t_model
="creative-zvm"
1765 92|creativezenvision
)
1767 modelname
="creativezenvision"
1768 target
="-DCREATIVE_ZV"
1771 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1772 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1773 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1776 appextra
="recorder:gui"
1779 toolset
=$ipodbitmaptools
1780 boottool
="$rootdir/tools/scramble -creative=zenvision"
1781 bootoutput
="rockbox.zvboot"
1782 # architecture, manufacturer and model for the target-tree build
1784 t_manufacturer
="tms320dm320"
1785 t_model
="creative-zvm"
1791 target
="-DSANSA_E200"
1792 memory
=32 # supposedly
1794 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1795 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1796 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1797 output
="rockbox.mi4"
1798 appextra
="recorder:gui"
1801 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1802 bootoutput
="PP5022.mi4"
1803 # toolset is the tools within the tools directory that we build for
1804 # this particular target.
1805 toolset
=$scramblebitmaptools
1806 # architecture, manufacturer and model for the target-tree build
1808 t_manufacturer
="sandisk"
1809 t_model
="sansa-e200"
1813 # the e200R model is pretty much identical to the e200, it only has a
1814 # different option to the scramble tool when building a bootloader and
1815 # makes the bootloader output file name in all lower case.
1818 target
="-DSANSA_E200"
1819 memory
=32 # supposedly
1821 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1822 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1823 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1824 output
="rockbox.mi4"
1825 appextra
="recorder:gui"
1828 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1829 bootoutput
="pp5022.mi4"
1830 # toolset is the tools within the tools directory that we build for
1831 # this particular target.
1832 toolset
=$scramblebitmaptools
1833 # architecture, manufacturer and model for the target-tree build
1835 t_manufacturer
="sandisk"
1836 t_model
="sansa-e200"
1842 target
="-DSANSA_C200"
1843 memory
=32 # supposedly
1845 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1846 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1847 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1848 output
="rockbox.mi4"
1849 appextra
="recorder:gui"
1852 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1853 bootoutput
="firmware.mi4"
1854 # toolset is the tools within the tools directory that we build for
1855 # this particular target.
1856 toolset
=$scramblebitmaptools
1857 # architecture, manufacturer and model for the target-tree build
1859 t_manufacturer
="sandisk"
1860 t_model
="sansa-c200"
1866 target
="-DSANSA_M200"
1869 tool
="$rootdir/tools/scramble -add=m200"
1870 boottool
="$rootdir/tools/scramble -tcc=crc"
1871 bootoutput
="player.rom"
1872 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1873 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1874 output
="rockbox.m200"
1875 appextra
="recorder:gui"
1878 # toolset is the tools within the tools directory that we build for
1879 # this particular target.
1880 toolset
=$tccbitmaptools
1881 # architecture, manufacturer and model for the target-tree build
1883 t_manufacturer
="tcc77x"
1890 target
="-DSANSA_C100"
1893 tool
="$rootdir/tools/scramble -add=c100"
1894 boottool
="$rootdir/tools/scramble -tcc=crc"
1895 bootoutput
="player.rom"
1896 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1897 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1898 output
="rockbox.c100"
1899 appextra
="recorder:gui"
1902 # toolset is the tools within the tools directory that we build for
1903 # this particular target.
1904 toolset
=$tccbitmaptools
1905 # architecture, manufacturer and model for the target-tree build
1907 t_manufacturer
="tcc77x"
1914 target
="-DSANSA_CLIP"
1916 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1917 bmp2rb_native
="$bmp2rb_mono"
1918 tool
="$rootdir/tools/scramble -add=clip"
1919 output
="rockbox.sansa"
1920 bootoutput
="bootloader-clip.sansa"
1921 appextra
="recorder:gui"
1924 toolset
=$scramblebitmaptools
1926 t_manufacturer
="as3525"
1927 t_model
="sansa-clip"
1935 target
="-DSANSA_E200V2"
1937 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1938 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1939 tool
="$rootdir/tools/scramble -add=e2v2"
1940 output
="rockbox.sansa"
1941 bootoutput
="bootloader-e200v2.sansa"
1942 appextra
="recorder:gui"
1945 toolset
=$scramblebitmaptools
1947 t_manufacturer
="as3525"
1948 t_model
="sansa-e200v2"
1956 target
="-DSANSA_M200V4"
1958 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1959 bmp2rb_native
="$bmp2rb_mono"
1960 tool
="$rootdir/tools/scramble -add=m2v4"
1961 output
="rockbox.sansa"
1962 bootoutput
="bootloader-m200v4.sansa"
1963 appextra
="recorder:gui"
1966 toolset
=$scramblebitmaptools
1968 t_manufacturer
="as3525"
1969 t_model
="sansa-m200v4"
1977 target
="-DSANSA_FUZE"
1979 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1980 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1981 tool
="$rootdir/tools/scramble -add=fuze"
1982 output
="rockbox.sansa"
1983 bootoutput
="bootloader-fuze.sansa"
1984 appextra
="recorder:gui"
1987 toolset
=$scramblebitmaptools
1989 t_manufacturer
="as3525"
1990 t_model
="sansa-fuze"
1998 target
="-DSANSA_C200V2"
1999 memory
=2 # as per OF diagnosis mode
2000 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2001 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2002 tool
="$rootdir/tools/scramble -add=c2v2"
2003 output
="rockbox.sansa"
2004 bootoutput
="bootloader-c200v2.sansa"
2005 appextra
="recorder:gui"
2008 # toolset is the tools within the tools directory that we build for
2009 # this particular target.
2010 toolset
=$scramblebitmaptools
2011 # architecture, manufacturer and model for the target-tree build
2013 t_manufacturer
="as3525"
2014 t_model
="sansa-c200v2"
2019 echo "Sansa Clipv2 is not yet supported !"
2023 target
="-DSANSA_CLIPV2"
2026 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2027 bmp2rb_native
="$bmp2rb_mono"
2028 tool
="$rootdir/tools/scramble -add=clv2"
2029 output
="rockbox.sansa"
2030 bootoutput
="bootloader-clipv2.sansa"
2031 appextra
="recorder:gui"
2034 toolset
=$scramblebitmaptools
2036 t_manufacturer
="as3525"
2037 t_model
="sansa-clipv2"
2041 echo "Sansa View is not yet supported!"
2045 target
="-DSANSA_VIEW"
2048 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2049 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2050 output
="rockbox.mi4"
2054 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2055 bootoutput
="firmware.mi4"
2056 # toolset is the tools within the tools directory that we build for
2057 # this particular target.
2058 toolset
=$scramblebitmaptools
2060 t_manufacturer
="sandisk"
2061 t_model
="sansa-view"
2067 target
="-DELIO_TPJ1022"
2070 tool
="$rootdir/tools/scramble -add tpj2"
2071 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2072 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2073 output
="rockbox.elio"
2074 appextra
="recorder:gui"
2077 boottool
="$rootdir/tools/scramble -mi4v2"
2078 bootoutput
="pp5020.mi4"
2079 # toolset is the tools within the tools directory that we build for
2080 # this particular target.
2081 toolset
=$scramblebitmaptools
2082 # architecture, manufacturer and model for the target-tree build
2084 t_manufacturer
="tatung"
2091 target
="-DPHILIPS_SA9200"
2092 memory
=32 # supposedly
2094 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2095 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2096 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2097 output
="rockbox.mi4"
2098 appextra
="recorder:gui"
2101 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2102 bootoutput
="FWImage.ebn"
2103 # toolset is the tools within the tools directory that we build for
2104 # this particular target.
2105 toolset
=$scramblebitmaptools
2106 # architecture, manufacturer and model for the target-tree build
2108 t_manufacturer
="philips"
2115 target
="-DPHILIPS_HDD1630"
2116 memory
=32 # supposedly
2118 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2119 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2120 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2121 output
="rockbox.mi4"
2122 appextra
="recorder:gui"
2125 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2126 bootoutput
="FWImage.ebn"
2127 # toolset is the tools within the tools directory that we build for
2128 # this particular target.
2129 toolset
=$scramblebitmaptools
2130 # architecture, manufacturer and model for the target-tree build
2132 t_manufacturer
="philips"
2138 modelname
="meizum6sl"
2139 target
="-DMEIZU_M6SL"
2143 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2144 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2145 output
="rockbox.meizu"
2146 appextra
="recorder:gui"
2149 toolset
=$genericbitmaptools
2151 bootoutput
="rockboot.ebn"
2152 # architecture, manufacturer and model for the target-tree build
2154 t_manufacturer
="s5l8700"
2155 t_model
="meizu-m6sl"
2160 modelname
="meizum6sp"
2161 target
="-DMEIZU_M6SP"
2165 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2166 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2167 output
="rockbox.meizu"
2168 appextra
="recorder:gui"
2171 toolset
=$genericbitmaptools
2173 bootoutput
="rockboot.ebn"
2174 # architecture, manufacturer and model for the target-tree build
2176 t_manufacturer
="s5l8700"
2177 t_model
="meizu-m6sp"
2187 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2188 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2189 output
="rockbox.meizu"
2190 appextra
="recorder:gui"
2193 toolset
=$genericbitmaptools
2195 bootoutput
="rockboot.ebn"
2196 # architecture, manufacturer and model for the target-tree build
2198 t_manufacturer
="s5l8700"
2204 modelname
="ondavx747"
2205 target
="-DONDA_VX747"
2208 tool
="$rootdir/tools/scramble -add=x747"
2209 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2210 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2211 output
="rockbox.vx747"
2212 appextra
="recorder:gui"
2215 toolset
=$genericbitmaptools
2216 boottool
="$rootdir/tools/scramble -ccpmp"
2217 bootoutput
="ccpmp.bin"
2218 # architecture, manufacturer and model for the target-tree build
2220 t_manufacturer
="ingenic_jz47xx"
2221 t_model
="onda_vx747"
2226 modelname
="ondavx767"
2227 target
="-DONDA_VX767"
2231 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2232 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2233 output
="rockbox.vx767"
2234 appextra
="recorder:gui"
2237 toolset
=$genericbitmaptools
2238 boottool
="$rootdir/tools/scramble -ccpmp"
2239 bootoutput
="ccpmp.bin"
2240 # architecture, manufacturer and model for the target-tree build
2242 t_manufacturer
="ingenic_jz47xx"
2243 t_model
="onda_vx767"
2248 modelname
="ondavx747p"
2249 target
="-DONDA_VX747P"
2252 tool
="$rootdir/tools/scramble -add=747p"
2253 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2254 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2255 output
="rockbox.vx747p"
2256 appextra
="recorder:gui"
2259 toolset
=$genericbitmaptools
2260 boottool
="$rootdir/tools/scramble -ccpmp"
2261 bootoutput
="ccpmp.bin"
2262 # architecture, manufacturer and model for the target-tree build
2264 t_manufacturer
="ingenic_jz47xx"
2265 t_model
="onda_vx747"
2270 modelname
="ondavx777"
2271 target
="-DONDA_VX777"
2274 tool
="$rootdir/tools/scramble -add=x777"
2275 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2276 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2277 output
="rockbox.vx777"
2278 appextra
="recorder:gui"
2281 toolset
=$genericbitmaptools
2282 boottool
="$rootdir/tools/scramble -ccpmp"
2283 bootoutput
="ccpmp.bin"
2284 # architecture, manufacturer and model for the target-tree build
2286 t_manufacturer
="ingenic_jz47xx"
2287 t_model
="onda_vx747"
2292 modelname
="lyre_proto1"
2293 target
="-DLYRE_PROTO1"
2297 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2298 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2299 output
="rockbox.lyre"
2300 appextra
="recorder:gui"
2303 toolset
=$scramblebitmaptools
2305 bootoutput
="bootloader-proto1.lyre"
2306 # architecture, manufacturer and model for the target-tree build
2308 t_manufacturer
="at91sam"
2309 t_model
="lyre_proto1"
2314 modelname
="mini2440"
2318 tool
="$rootdir/tools/scramble -add=m244"
2319 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2320 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2321 output
="rockbox.mini2440"
2322 appextra
="recorder:gui"
2325 toolset
=$scramblebitmaptools
2327 bootoutput
="bootloader-mini2440.lyre"
2328 # architecture, manufacturer and model for the target-tree build
2330 t_manufacturer
="s3c2440"
2337 target
="-DSAMSUNG_YH820"
2340 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2341 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2342 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2343 output
="rockbox.mi4"
2344 appextra
="recorder:gui"
2347 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2348 bootoutput
="FW_YH820.mi4"
2349 # toolset is the tools within the tools directory that we build for
2350 # this particular target.
2351 toolset
=$scramblebitmaptools
2352 # architecture, manufacturer and model for the target-tree build
2354 t_manufacturer
="samsung"
2361 target
="-DSAMSUNG_YH920"
2364 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2365 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2366 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2367 output
="rockbox.mi4"
2368 appextra
="recorder:gui"
2371 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2372 bootoutput
="PP5020.mi4"
2373 # toolset is the tools within the tools directory that we build for
2374 # this particular target.
2375 toolset
=$scramblebitmaptools
2376 # architecture, manufacturer and model for the target-tree build
2378 t_manufacturer
="samsung"
2385 target
="-DSAMSUNG_YH925"
2388 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2389 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2390 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2391 output
="rockbox.mi4"
2392 appextra
="recorder:gui"
2395 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2396 bootoutput
="FW_YH925.mi4"
2397 # toolset is the tools within the tools directory that we build for
2398 # this particular target.
2399 toolset
=$scramblebitmaptools
2400 # architecture, manufacturer and model for the target-tree build
2402 t_manufacturer
="samsung"
2409 target
="-DSAMSUNG_YPS3"
2413 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2414 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2415 output
="rockbox.yps3"
2416 appextra
="recorder:gui"
2419 toolset
=$genericbitmaptools
2421 bootoutput
="rockboot.ebn"
2422 # architecture, manufacturer and model for the target-tree build
2424 t_manufacturer
="s5l8700"
2430 echo "Please select a supported target platform!"
2436 echo "Platform set to $modelname"
2440 ############################################################################
2441 # Amount of memory, for those that can differ. They have $memory unset at
2445 if [ -z "$memory" ]; then
2448 if [ "$ARG_RAM" ]; then
2451 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2464 if [ "$ARG_RAM" ]; then
2467 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2480 echo "Memory size selected: $memory MB"
2481 [ "$ARG_TYPE" ] ||
echo ""
2485 ##################################################################
2486 # Figure out build "type"
2489 # the ifp7x0 is the only platform that supports building a gdb stub like
2493 gdbstub
="(G)DB stub, "
2496 gdbstub
="(I)nstaller, "
2499 gdbstub
="(E)raser, "
2504 if [ "$ARG_TYPE" ]; then
2507 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2513 appsdir
='\$(ROOTDIR)/bootloader'
2515 extradefines
="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2517 echo "e200R-installer build selected"
2520 appsdir
='\$(ROOTDIR)/bootloader'
2522 echo "C2(4)0 or C2(5)0"
2526 extradefines
="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2527 echo "c240 eraser build selected"
2530 extradefines
="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2531 echo "c240 eraser build selected"
2535 echo "c200 eraser build selected"
2538 if test $t_manufacturer = "archos"; then
2539 # Archos SH-based players do this somewhat differently for
2541 appsdir
='\$(ROOTDIR)/flash/bootbox'
2544 appsdir
='\$(ROOTDIR)/bootloader'
2547 if test -n "$boottool"; then
2550 if test -n "$bootoutput"; then
2554 extradefines
="-DBOOTLOADER -ffunction-sections -fdata-sections"
2556 echo "Bootloader build selected"
2561 extradefines
="-DSIMULATOR"
2564 echo "Simulator build selected"
2567 echo "Advanced build selected"
2568 whichadvanced
$btype
2571 extradefines
="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2572 appsdir
='\$(ROOTDIR)/gdb'
2581 echo "GDB stub build selected"
2586 echo "Manual build selected"
2594 appsdir
='\$(ROOTDIR)/tools/checkwps';
2595 output
='checkwps.'${modelname};
2597 echo "CheckWPS build selected"
2605 appsdir
='\$(ROOTDIR)/tools/database';
2606 output
='database.'${modelname};
2608 echo "Database tool build selected"
2611 if [ "$modelname" = "e200r" ]; then
2612 echo "Do not use the e200R target for regular builds. Use e200 instead."
2616 btype
="N" # set it explicitly since RET only gets here as well
2617 echo "Normal build selected"
2621 # to be able running "make manual" from non-manual configuration
2624 manualdev
="recorderv2fm"
2627 manualdev
="recorderv2fm"
2633 manualdev
="ipodmini"
2636 manualdev
=$modelname
2640 if [ -z "$debug" ]; then
2641 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
2644 echo "Using source code root directory: $rootdir"
2646 # this was once possible to change at build-time, but no more:
2651 if [ "yes" = "$simulator" ]; then
2652 # setup compiler and things for simulator
2655 if [ -d "simdisk" ]; then
2656 echo "Subdirectory 'simdisk' already present"
2659 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2663 # Now, figure out version number of the (gcc) compiler we are about to use
2664 gccver
=`$CC -dumpversion`;
2666 # figure out the binutil version too and display it, mostly for the build
2667 # system etc to be able to see it easier
2668 if [ $uname = "Darwin" ]; then
2669 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2671 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2674 if [ -z "$gccver" ]; then
2675 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
2676 echo "[WARNING] this may cause your build to fail since we cannot do the"
2677 echo "[WARNING] checks we want now."
2680 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2683 num1
=`echo $gccver | cut -d . -f1`
2684 num2
=`echo $gccver | cut -d . -f2`
2685 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2692 echo "Using $CC $gccver ($gccnum)"
2694 if test "$gccnum" -ge "400"; then
2695 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2696 # so we ignore that warnings for now
2698 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
2701 if test "$gccnum" -ge "401"; then
2702 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2703 # will break strict-aliasing rules"
2705 GCCOPTS
="$GCCOPTS -fno-strict-aliasing"
2708 if test "$gccnum" -ge "402"; then
2709 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2710 # and later would throw it for several valid cases
2711 GCCOPTS
="$GCCOPTS -Wno-override-init"
2719 # cross-compile for win32
2722 # Verify that the cross-compiler is of a recommended version!
2723 if test "$gccver" != "$gccchoice"; then
2724 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2725 echo "WARNING: version $gccchoice!"
2726 echo "WARNING: This may cause your build to fail since it may be a version"
2727 echo "WARNING: that isn't functional or known to not be the best choice."
2728 echo "WARNING: If you suffer from build problems, you know that this is"
2729 echo "WARNING: a likely source for them..."
2737 echo "Using $LD $ldver"
2739 # check the compiler for SH platforms
2740 if test "$CC" = "sh-elf-gcc"; then
2741 if test "$gccnum" -lt "400"; then
2742 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2743 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2745 # figure out patch status
2746 gccpatch
=`$CC --version`;
2748 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
2749 echo "gcc $gccver is rockbox patched"
2750 # then convert -O to -Os to get smaller binaries!
2751 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2753 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2754 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2759 if test "$CC" = "m68k-elf-gcc"; then
2760 # convert -O to -Os to get smaller binaries!
2761 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2764 if [ "$ARG_CCACHE" = "1" ]; then
2765 echo "Enable ccache for building"
2767 elif [ "$ARG_CCACHE" != "0" ]; then
2768 ccache
=`findtool ccache`
2769 if test -n "$ccache"; then
2770 echo "Found and uses ccache ($ccache)"
2774 # figure out the full path to the various commands if possible
2775 HOSTCC
=`findtool gcc --lit`
2776 HOSTAR
=`findtool ar --lit`
2777 CC
=`findtool ${CC} --lit`
2778 LD
=`findtool ${AR} --lit`
2779 AR
=`findtool ${AR} --lit`
2780 AS
=`findtool ${AS} --lit`
2781 OC
=`findtool ${OC} --lit`
2782 WINDRES
=`findtool ${WINDRES} --lit`
2783 DLLTOOL
=`findtool ${DLLTOOL} --lit`
2784 DLLWRAP
=`findtool ${DLLWRAP} --lit`
2785 RANLIB
=`findtool ${RANLIB} --lit`
2787 if test -n "$ccache"; then
2791 if test "X$endian" = "Xbig"; then
2792 defendian
="ROCKBOX_BIG_ENDIAN"
2794 defendian
="ROCKBOX_LITTLE_ENDIAN"
2797 if [ "$ARG_RBDIR" ]; then
2799 echo "Using alternate rockbox dir: ${rbdir}"
2803 -e "s,@ENDIAN@,${defendian},g" \
2804 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2805 -e "s,@config_rtc@,$config_rtc,g" \
2806 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2807 -e "s,@RBDIR@,${rbdir},g" \
2808 -e "s,@have_backlight@,$have_backlight,g" \
2809 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
2810 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
2812 /* This header was made by configure */
2813 #ifndef __BUILD_AUTOCONF_H
2814 #define __BUILD_AUTOCONF_H
2816 /* Define endianess for the target or simulator platform */
2819 /* Define this if you build rockbox to support the logf logging and display */
2820 #undef ROCKBOX_HAS_LOGF
2822 /* optional define for a backlight modded Ondio */
2825 /* optional define for FM radio mod for iAudio M5 */
2828 /* optional define for ATA poweroff on Player */
2831 /* optional defines for RTC mod for h1x0 */
2835 /* root of Rockbox */
2836 #define ROCKBOX_DIR "/@RBDIR@"
2838 #endif /* __BUILD_AUTOCONF_H */
2841 if test -n "$t_cpu"; then
2842 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2843 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2844 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2848 if test "$simulator" = "yes"; then
2849 # add simul make stuff on the #SIMUL# line
2850 simmagic1
="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2851 simmagic2
="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2853 # delete the lines that match
2854 simmagic1
='/@SIMUL1@/D'
2855 simmagic2
='/@SIMUL2@/D'
2858 if test "$swcodec" = "yes"; then
2859 voicetoolset
="rbspeexenc voicefont wavtrim"
2861 voicetoolset
="voicefont wavtrim"
2864 if test "$apps" = "apps"; then
2865 # only when we build "real" apps we build the .lng files
2869 #### Fix the cmdline ###
2870 if test -n "$ccache"; then
2874 cmdline
="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
2878 -e "s,@ROOTDIR@,${rootdir},g" \
2879 -e "s,@DEBUG@,${debug},g" \
2880 -e "s,@MEMORY@,${memory},g" \
2881 -e "s,@TARGET_ID@,${target_id},g" \
2882 -e "s,@TARGET@,${target},g" \
2883 -e "s,@CPU@,${t_cpu},g" \
2884 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2885 -e "s,@MODELNAME@,${modelname},g" \
2886 -e "s,@LANGUAGE@,${language},g" \
2887 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2888 -e "s,@PWD@,${pwd},g" \
2889 -e "s,@HOSTCC@,${HOSTCC},g" \
2890 -e "s,@HOSTAR@,${HOSTAR},g" \
2891 -e "s,@CC@,${CC},g" \
2892 -e "s,@LD@,${LD},g" \
2893 -e "s,@AR@,${AR},g" \
2894 -e "s,@AS@,${AS},g" \
2895 -e "s,@OC@,${OC},g" \
2896 -e "s,@WINDRES@,${WINDRES},g" \
2897 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2898 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2899 -e "s,@RANLIB@,${RANLIB},g" \
2900 -e "s,@TOOL@,${tool},g" \
2901 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2902 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2903 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2904 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2905 -e "s,@OUTPUT@,${output},g" \
2906 -e "s,@APPEXTRA@,${appextra},g" \
2907 -e "s,@ARCHOSROM@,${archosrom},g" \
2908 -e "s,@FLASHFILE@,${flash},g" \
2909 -e "s,@PLUGINS@,${plugins},g" \
2910 -e "s,@CODECS@,${swcodec},g" \
2911 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2912 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2913 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2914 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2915 -e "s!@LDOPTS@!${LDOPTS}!g" \
2916 -e "s,@LOADADDRESS@,${loadaddress},g" \
2917 -e "s,@EXTRADEF@,${extradefines},g" \
2918 -e "s,@APPSDIR@,${appsdir},g" \
2919 -e "s,@FIRMDIR@,${firmdir},g" \
2920 -e "s,@TOOLSDIR@,${toolsdir},g" \
2921 -e "s,@APPS@,${apps},g" \
2922 -e "s,@SIMVER@,${simver},g" \
2923 -e "s,@GCCVER@,${gccver},g" \
2924 -e "s,@GCCNUM@,${gccnum},g" \
2925 -e "s,@UNAME@,${uname},g" \
2926 -e "s,@ENDIAN@,${defendian},g" \
2927 -e "s,@TOOLSET@,${toolset},g" \
2930 -e "s,@MANUALDEV@,${manualdev},g" \
2931 -e "s,@ENCODER@,${ENC_CMD},g" \
2932 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2933 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2934 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2935 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2936 -e "s,@LANGS@,${buildlangs},g" \
2937 -e "s,@USE_ELF@,${USE_ELF},g" \
2938 -e "s,@RBDIR@,${rbdir},g" \
2939 -e "s,@PREFIX@,$PREFIX,g" \
2940 -e "s,@CMDLINE@,$cmdline,g" \
2942 ## Automatically generated. http://www.rockbox.org/
2944 export ROOTDIR=@ROOTDIR@
2945 export FIRMDIR=@FIRMDIR@
2946 export APPSDIR=@APPSDIR@
2947 export TOOLSDIR=@TOOLSDIR@
2948 export DOCSDIR=\$(ROOTDIR)/docs
2949 export MANUALDIR=\${ROOTDIR}/manual
2950 export DEBUG=@DEBUG@
2951 export MODELNAME=@MODELNAME@
2952 export ARCHOSROM=@ARCHOSROM@
2953 export FLASHFILE=@FLASHFILE@
2954 export TARGET_ID=@TARGET_ID@
2955 export TARGET=@TARGET@
2957 export MANUFACTURER=@MANUFACTURER@
2959 export BUILDDIR=@PWD@
2960 export LANGUAGE=@LANGUAGE@
2961 export VOICELANGUAGE=@VOICELANGUAGE@
2962 export MEMORYSIZE=@MEMORY@
2963 export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
2964 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2965 export MKFIRMWARE=@TOOL@
2966 export BMP2RB_MONO=@BMP2RB_MONO@
2967 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2968 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2969 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2970 export BINARY=@OUTPUT@
2971 export APPEXTRA=@APPEXTRA@
2972 export ENABLEDPLUGINS=@PLUGINS@
2973 export SOFTWARECODECS=@CODECS@
2974 export EXTRA_DEFINES=@EXTRADEF@
2975 export HOSTCC=@HOSTCC@
2976 export HOSTAR=@HOSTAR@
2982 export WINDRES=@WINDRES@
2983 export DLLTOOL=@DLLTOOL@
2984 export DLLWRAP=@DLLWRAP@
2985 export RANLIB=@RANLIB@
2986 export PREFIX=@PREFIX@
2987 export PROFILE_OPTS=@PROFILE_OPTS@
2988 export SIMVER=@SIMVER@
2989 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2990 export GCCOPTS=@GCCOPTS@
2991 export TARGET_INC=@TARGET_INC@
2992 export LOADADDRESS=@LOADADDRESS@
2993 export SHARED_FLAG=@SHARED_FLAG@
2994 export LDOPTS=@LDOPTS@
2995 export GCCVER=@GCCVER@
2996 export GCCNUM=@GCCNUM@
2997 export UNAME=@UNAME@
2998 export MANUALDEV=@MANUALDEV@
2999 export TTS_OPTS=@TTS_OPTS@
3000 export TTS_ENGINE=@TTS_ENGINE@
3001 export ENC_OPTS=@ENC_OPTS@
3002 export ENCODER=@ENCODER@
3003 export USE_ELF=@USE_ELF@
3004 export RBDIR=@RBDIR@
3006 CONFIGURE_OPTIONS=@CMDLINE@
3008 include \$(TOOLSDIR)/root.make
3012 echo "Created Makefile"