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"
15 use_bootchart
="#undef DO_BOOTCHART"
17 scriptver
=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
22 # Begin Function Definitions
32 WINDRES
=${prefix}windres
33 DLLTOOL
=${prefix}dlltool
34 DLLWRAP
=${prefix}dllwrap
35 RANLIB
=${prefix}ranlib
43 if [ "$ARG_ARM_EABI" = "1" ]; then
44 prefixtools arm-elf-eabi-
52 # scan the $PATH for the given command
59 # echo "checks for $file in $path" >&2
60 if test -f "$path/$file"; then
65 # check whether caller wants literal return value if not found
66 if [ "$2" = "--lit" ]; then
71 # scan the $PATH for sdl-config - check whether for a (cross-)win32
80 #echo "checks for $file in $path" >&2
81 if test -f "$path/$file"; then
82 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
83 if [ "yes" = "${winbuild}" ]; then
88 if [ "yes" != "${winbuild}" ]; then
99 # default tool setup for native building
103 winbuild
="$crosscompile"
104 GCCOPTS
='-W -Wall -g -fno-builtin'
108 # default output binary name
111 # default share option, override below if needed
112 SHARED_FLAG
="-shared"
116 echo "Cygwin host detected"
119 output
="rockboxui.exe"
124 echo "MinGW host detected"
127 output
="rockboxui.exe"
132 echo "Linux host detected"
136 echo "FreeBSD host detected"
140 echo "Darwin host detected"
142 SHARED_FLAG
="-dynamiclib -Wl\,-single_module"
146 echo "*Solaris host detected"
148 GCCOPTS
="$GCCOPTS -fPIC"
153 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
158 sdl
=`findsdl $winbuild`
160 if [ $1 = "sdl" ]; then
161 if [ -z "$sdl" ]; then
162 echo "configure didn't find sdl-config, which indicates that you"
163 echo "don't have SDL (properly) installed. Please correct and"
164 echo "re-run configure!"
167 # generic sdl-config checker
168 #ignore the -D_GNU_SOURCE=1 inserted by sdl
169 GCCOPTS
="$GCCOPTS `$sdl --cflags` -U_GNU_SOURCE"
170 LDOPTS
="$LDOPTS `$sdl --libs`"
174 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
176 if test "X$crosscompile" != "Xyes"; then
179 # fPIC is needed to make shared objects link
180 # setting visibility to hidden is necessary to avoid strange crashes
181 # due to symbol clashing
182 GCCOPTS
="$GCCOPTS -fPIC -fvisibility=hidden"
183 # x86_64 supports MMX by default
187 echo "Enabling MMX support"
188 GCCOPTS
="$GCCOPTS -mmmx"
193 cat >$tmpdir/conftest-
$id.c
<<EOF
195 int main(int argc, char **argv)
198 char *varp = (char *)&var;
206 $CC -o $tmpdir/conftest-
$id $tmpdir/conftest-
$id.c
2>/dev
/null
208 if test `$tmpdir/conftest-$id 2>/dev/null` -gt "1"; then
216 if [ $1 = "sdl" ]; then
217 echo "Simulator environment deemed $endian endian"
218 elif [ $1 = "checkwps" ]; then
219 echo "CheckWPS environment deemed $endian endian"
222 # use wildcard here to make it work even if it was named *.exe like
224 rm -f $tmpdir/conftest-
$id*
226 # We are crosscompiling
227 # add cross-compiler option(s)
228 prefixtools i586-mingw32msvc-
229 LDOPTS
="$LDOPTS -mconsole"
230 output
="rockboxui.exe"
231 endian
="little" # windows is little endian
232 echo "Enabling MMX support"
233 GCCOPTS
="$GCCOPTS -mmmx"
238 # functions for setting up cross-compiler names and options
239 # also set endianess and what the exact recommended gcc version is
240 # the gcc version should most likely match what versions we build with
245 GCCOPTS
="$CCOPTS -m1"
246 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
252 prefixtools calmrisc16-unknown-elf-
253 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
254 GCCOPTIMIZE
="-fomit-frame-pointer"
259 prefixtools m68k-elf-
260 GCCOPTS
="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
261 GCCOPTIMIZE
="-fomit-frame-pointer"
268 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
269 if test "X$1" != "Xshort" -a "$ARG_ARM_EABI" != "1"; then
270 GCCOPTS
="$GCCOPTS -mlong-calls"
272 GCCOPTIMIZE
="-fomit-frame-pointer"
278 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi"
279 if test "$modelname" != "gigabeatfx" -a "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" != "1"; then
280 GCCOPTS
="$GCCOPTS -mlong-calls"
282 GCCOPTIMIZE
="-fomit-frame-pointer"
288 GCCOPTS
="$CCOPTS -mbig-endian -mcpu=arm940t"
289 if test "$ARG_ARM_EABI" != "1"; then
290 GCCOPTS
="$GCCOPTS -mlong-calls"
292 GCCOPTIMIZE
="-fomit-frame-pointer"
298 GCCOPTS
="$CCOPTS -mcpu=arm940t"
299 if test "$ARG_ARM_EABI" != "1"; then
300 GCCOPTS
="$GCCOPTS -mlong-calls"
302 GCCOPTIMIZE
="-fomit-frame-pointer"
308 GCCOPTS
="$CCOPTS -mcpu=arm9e"
309 if test "$ARG_ARM_EABI" != "1"; then
310 GCCOPTS
="$GCCOPTS -mlong-calls"
312 GCCOPTIMIZE
="-fomit-frame-pointer"
318 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s"
319 if test "$t_manufacturer" != "as3525" -a "$ARG_ARM_EABI" != "1"; then
320 GCCOPTS
="$GCCOPTS -mlong-calls"
322 GCCOPTIMIZE
="-fomit-frame-pointer"
328 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s"
329 if test "$modelname" != "gigabeats" -a "$ARG_ARM_EABI" != "1"; then
330 GCCOPTS
="$GCCOPTS -mlong-calls"
332 GCCOPTIMIZE
="-fomit-frame-pointer"
338 GCCOPTS
="$CCOPTS -mcpu=arm1176jz-s"
339 if test "$ARG_ARM_EABI" != "1"; then
340 GCCOPTS
="$GCCOPTS -mlong-calls"
342 GCCOPTIMIZE
="-fomit-frame-pointer"
347 prefixtools mipsel-elf-
348 GCCOPTS
="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls"
349 GCCOPTS
="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
350 GCCOPTIMIZE
="-fomit-frame-pointer"
356 atype
=`echo "$1" | cut -c 2-`
357 ##################################################################
358 # Prompt for specific developer options
360 if [ "$atype" ]; then
365 echo "Enter your developer options (press enter when done)"
366 printf "(D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile, (T)est plugins"
367 if [ "$memory" = "2" ]; then
370 if [ "$modelname" = "archosplayer" ]; then
371 printf ", Use (A)TA poweroff"
373 if [ "$t_model" = "ondio" ]; then
374 printf ", (B)acklight MOD"
376 if [ "$modelname" = "iaudiom5" ]; then
377 printf ", (F)M radio MOD"
379 if [ "$modelname" = "iriverh120" ]; then
386 while [ $cont = "1" ]; do
388 if [ "$interact" ]; then
391 option
=`echo "$atype" | cut -c 1`
396 if [ "yes" = "$profile" ]; then
397 echo "Debug is incompatible with profiling"
399 echo "DEBUG build enabled"
404 echo "logf() support enabled"
408 echo "Including test plugins"
409 extradefines
="$extradefines -DHAVE_TEST_PLUGINS"
412 echo "bootchart enabled (logf also enabled)"
417 echo "Simulator build enabled"
421 if [ "yes" = "$use_debug" ]; then
422 echo "Profiling is incompatible with debug"
424 echo "Profiling support is enabled"
429 echo "Voice build selected"
433 if [ "$memory" = "2" ]; then
435 echo "Memory size selected: 8MB"
439 if [ "$modelname" = "archosplayer" ]; then
440 have_ata_poweroff
="#define HAVE_ATA_POWER_OFF"
441 echo "ATA power off enabled"
445 if [ "$t_model" = "ondio" ]; then
446 have_backlight
="#define HAVE_BACKLIGHT"
447 echo "Backlight functions enabled"
451 if [ "$modelname" = "iaudiom5" ]; then
452 have_fmradio_in
="#define HAVE_FMRADIO_IN"
453 echo "FM radio functions enabled"
457 if [ "$modelname" = "iriverh120" ]; then
458 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
459 have_rtc_alarm
="#define HAVE_RTC_ALARM"
460 echo "RTC functions enabled (DS1339/DS3231)"
464 echo "Enabling Windows 32 cross-compiling"
468 if [ "$interact" ]; then
471 echo "[ERROR] Option $option unsupported"
475 if [ "$interact" ]; then
476 btype
="$btype$option"
478 atype
=`echo "$atype" | cut -c 2-`
479 [ "$atype" ] || cont
=0
484 if [ "yes" = "$voice" ]; then
485 # Ask about languages to build
487 voicelanguage
=`whichlang`
488 echo "Voice language set to $voicelanguage"
490 # Configure encoder and TTS engine for each language
491 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
492 voiceconfig
"$thislang"
495 if [ "yes" = "$use_debug" ]; then
497 GCCOPTS
="$GCCOPTS -g -DDEBUG"
499 if [ "yes" = "$logf" ]; then
500 use_logf
="#define ROCKBOX_HAS_LOGF 1"
502 if [ "yes" = "$bootchart" ]; then
503 use_bootchart
="#define DO_BOOTCHART 1"
505 if [ "yes" = "$simulator" ]; then
507 extradefines
="$extradefines -DSIMULATOR"
511 if [ "yes" = "$profile" ]; then
512 extradefines
="$extradefines -DRB_PROFILE"
513 PROFILE_OPTS
="-finstrument-functions"
517 # Configure voice settings
520 if [ ! "$ARG_TTS" ]; then
521 echo "Building $thislang voice for $modelname. Select options"
525 if [ -n "`findtool flite`" ]; then
529 DEFAULT_TTS_OPTS
=$FLITE_OPTS
530 DEFAULT_NOISEFLOOR
="500"
533 if [ -n "`findtool espeak`" ]; then
537 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
538 DEFAULT_NOISEFLOOR
="500"
541 if [ -n "`findtool festival`" ]; then
542 FESTIVAL
="(F)estival "
545 FESTIVAL_OPTS
="--language italian"
548 FESTIVAL_OPTS
="--language spanish"
551 FESTIVAL_OPTS
="--language finnish"
554 FESTIVAL_OPTS
="--language czech"
560 DEFAULT_TTS
="festival"
561 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
562 DEFAULT_NOISEFLOOR
="500"
565 if [ -n "`findtool swift`" ]; then
569 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
570 DEFAULT_NOISEFLOOR
="500"
573 # Allow SAPI if Windows is in use
574 if [ -n "`findtool winver`" ]; then
578 DEFAULT_TTS_OPTS
=$SAPI_OPTS
579 DEFAULT_NOISEFLOOR
="500"
583 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
584 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
588 if [ "$ARG_TTS" ]; then
591 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
594 advopts
="$advopts --tts=$option"
598 NOISEFLOOR
="500" # TODO: check this value
604 TTS_OPTS
=$ESPEAK_OPTS
607 TTS_ENGINE
="festival"
609 TTS_OPTS
=$FESTIVAL_OPTS
622 TTS_ENGINE
=$DEFAULT_TTS
623 TTS_OPTS
=$DEFAULT_TTS_OPTS
624 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
626 echo "Using $TTS_ENGINE for TTS"
628 # Select which voice to use for Festival
629 if [ "$TTS_ENGINE" = "festival" ]; then
630 voicelist
=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
631 for voice
in $voicelist; do
632 TTS_FESTIVAL_VOICE
="$voice" # Default choice
635 if [ "$ARG_VOICE" ]; then
639 for voice
in $voicelist; do
640 printf "%3d. %s\n" "$i" "$voice"
643 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
647 for voice
in $voicelist; do
648 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
649 TTS_FESTIVAL_VOICE
="$voice"
653 advopts
="$advopts --voice=$CHOICE"
654 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
655 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
658 # Read custom tts options from command line
659 if [ "$ARG_TTSOPTS" ]; then
660 TTS_OPTS
="$ARG_TTSOPTS"
661 advopts
="$advopts --ttsopts='$TTS_OPTS'"
662 echo "$TTS_ENGINE options set to $TTS_OPTS"
665 if [ "$swcodec" = "yes" ]; then
668 ENC_OPTS
="-q 4 -c 10"
670 if [ -n "`findtool lame`" ]; then
673 ENC_OPTS
="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
675 echo "You need LAME in the system path to build voice files for"
676 echo "HWCODEC targets."
681 echo "Using $ENCODER for encoding voice clips"
683 # Read custom encoder options from command line
684 if [ "$ARG_ENCOPTS" ]; then
685 ENC_OPTS
="$ARG_ENCOPTS"
686 advopts
="$advopts --encopts='$ENC_OPTS'"
687 echo "$ENCODER options set to $ENC_OPTS"
691 if [ -n "`findtool cygpath`" ]; then
692 TEMPDIR
=`cygpath . -a -w`
697 # figure out which languages that are around
698 for file in $rootdir/apps
/lang
/*.lang
; do
699 clean
=`basename $file .lang`
700 langs
="$langs $clean"
703 if [ "$ARG_LANG" ]; then
706 echo "Select a number for the language to use (default is english)"
707 # FIXME The multiple-language feature is currently broken
708 # echo "You may enter a comma-separated list of languages to build"
711 for one
in $langs; do
717 advopts
="$advopts --language=$pick"
722 # Allow the user to pass a comma-separated list of langauges
723 for thispick
in `echo $pick | sed 's/,/ /g'`; do
725 for one
in $langs; do
726 # Accept both the language number and name
727 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
728 if [ "$output" = "" ]; then
737 if [ -z "$output" ]; then
745 echo "Rockbox configure script."
746 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
747 echo "Do *NOT* run this within the tools directory!"
750 Usage: configure [OPTION]...
752 --target=TARGET Sets the target, TARGET can be either the target ID or
753 corresponding string. Run without this option to see all
756 --ram=RAM Sets the RAM for certain targets. Even though any number
757 is accepted, not every number is correct. The default
758 value will be applied, if you entered a wrong number
759 (which depends on the target). Watch the output. Run
760 without this option if you are not sure which the right
763 --type=TYPE Sets the build type. Shortcuts are also valid.
764 Run without this option to see all available types.
765 Multiple values are allowed and managed in the input
766 order. So --type=b stands for Bootloader build, while
767 --type=ab stands for "Backlight MOD" build.
769 --language=LANG Set the language used for voice generation (used only if
772 --tts=ENGINE Set the TTS engine used for voice generation (used only
775 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
778 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
780 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
782 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
783 This is useful for having multiple alternate builds on
784 your device that you can load with ROLO. However as the
785 bootloader looks for .rockbox you won't be able to boot
788 --ccache Enable ccache use (done by default these days)
789 --no-ccache Disable ccache use
791 --eabi Make configure prefer toolchains that are able to compile
792 for the new ARM standard abi EABI
793 --no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
794 --help Shows this message (must not be used with other options)
815 --ccache) ARG_CCACHE
=1;;
816 --no-ccache) ARG_CCACHE
=0;;
817 --encopts=*) ARG_ENCOPTS
=`echo "$arg" | cut -d = -f 2`;;
818 --language=*) ARG_LANG
=`echo "$arg" | cut -d = -f 2`;;
819 --ram=*) ARG_RAM
=`echo "$arg" | cut -d = -f 2`;;
820 --rbdir=*) ARG_RBDIR
=`echo "$arg" | cut -d = -f 2`;;
821 --target=*) ARG_TARGET
=`echo "$arg" | cut -d = -f 2`;;
822 --tts=*) ARG_TTS
=`echo "$arg" | cut -d = -f 2`;;
823 --ttsopts=*) ARG_TTSOPTS
=`echo "$arg" | cut -d = -f 2`;;
824 --type=*) ARG_TYPE
=`echo "$arg" | cut -d = -f 2`;;
825 --voice=*) ARG_VOICE
=`echo "$arg" | cut -d = -f 2`;;
826 --eabi) ARG_ARM_EABI
=1;;
827 --no-eabi) ARG_ARM_EABI
=0;;
829 *) err
=1; echo "[ERROR] Option '$arg' unsupported";;
836 if [ "$TMPDIR" != "" ]; then
841 echo Using temporary directory
$tmpdir
843 if test -r "configure"; then
844 # this is a check for a configure script in the current directory, it there
845 # is one, try to figure out if it is this one!
847 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
848 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
849 echo "It will only cause you pain and grief. Instead do this:"
852 echo " mkdir build-dir"
854 echo " ../tools/configure"
856 echo "Much happiness will arise from this. Enjoy"
861 # get our current directory
864 if { echo $pwd |
grep " "; } then
865 echo "You're running this script in a path that contains space. The build"
866 echo "system is unfortunately not clever enough to deal with this. Please"
867 echo "run the script from a different path, rename the path or fix the build"
872 if [ -z "$rootdir" ]; then
873 ##################################################################
874 # Figure out where the source code root is!
876 rootdir
=`dirname $0`/..
/
878 #####################################################################
879 # Convert the possibly relative directory name to an absolute version
885 # cd back to the build dir
890 appsdir
='\$(ROOTDIR)/apps'
891 firmdir
='\$(ROOTDIR)/firmware'
892 toolsdir
='\$(ROOTDIR)/tools'
895 ##################################################################
896 # Figure out target platform
899 if [ "$ARG_TARGET" ]; then
902 echo "Enter target platform:"
904 ==Archos== ==iriver== ==Apple iPod==
905 0) Player/Studio 10) H120/H140 20) Color/Photo
906 1) Recorder 11) H320/H340 21) Nano 1G
907 2) FM Recorder 12) iHP-100/110/115 22) Video
908 3) Recorder v2 13) iFP-790 23) 3G
909 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
910 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
912 ==Toshiba== 27) 1G, 2G
913 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
914 30) X5/X5V/X5L 41) Gigabeat S
915 31) M5/M5L ==SanDisk==
916 32) 7 ==Olympus= 50) Sansa e200
917 33) D2 70) M:Robe 500 51) Sansa e200R
918 34) M3/M3L 71) M:Robe 100 52) Sansa c200
920 ==Creative== ==Philips== 54) Sansa c100
921 90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip
922 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2
923 92) Zen Vision HDD1830 57) Sansa m200v4
924 102) GoGear HDD6330 58) Sansa Fuze
925 ==Onda== 59) Sansa c200v2
926 120) VX747 ==Meizu== 60) Sansa Clipv2
927 121) VX767 110) M6SL 61) Sansa View
928 122) VX747+ 111) M6SP 62) Sansa Clip+
929 123) VX777 112) M3 63) Sansa Fuze v2
932 ==Samsung== ==Tatung== 80) DAX 1GB MP3/DAB
933 140) YH-820 150) Elio TPJ-1022
934 141) YH-920 ==Lyre project==
935 142) YH-925 ==Packard Bell== 130) Lyre proto 1
936 143) YP-S3 160) Vibe 500 131) Mini2440
945 # Set of tools built for all target platforms:
946 toolset
="rdf2binary convbdf codepages"
948 # Toolsets for some target families:
949 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
950 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
951 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
952 ipodbitmaptools
="$toolset scramble bmp2rb"
953 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
954 tccbitmaptools
="$toolset scramble bmp2rb"
955 # generic is used by IFP, Meizu and Onda
956 genericbitmaptools
="$toolset bmp2rb"
957 # scramble is used by all other targets
958 scramblebitmaptools
="$genericbitmaptools scramble"
961 # ---- For each target ----
964 # target_id: a unique number identifying this target, IS NOT the menu number.
965 # Just use the currently highest number+1 when you add a new
967 # modelname: short model name used all over to identify this target
968 # memory: number of megabytes of RAM this target has. If the amount can
969 # be selected by the size prompt, let memory be unset here
970 # target: -Ddefine passed to the build commands to make the correct
971 # config-*.h file get included etc
972 # tool: the tool that takes a plain binary and converts that into a
973 # working "firmware" file for your target
974 # output: the final output file name
975 # boottool: the tool that takes a plain binary and generates a bootloader
976 # file for your target (or blank to use $tool)
977 # bootoutput:the final output file name for the bootloader (or blank to use
979 # appextra: passed to the APPEXTRA variable in the Makefiles.
980 # TODO: add proper explanation
981 # archosrom: used only for Archos targets that build a special flashable .ucl
983 # flash: name of output for flashing, for targets where there's a special
984 # file output for this.
985 # plugins: set to 'yes' to build the plugins. Early development builds can
986 # set this to no in the early stages to have an easier life for a
988 # swcodec: set 'yes' on swcodec targets
989 # toolset: lists what particular tools in the tools/ directory that this
990 # target needs to have built prior to building Rockbox
993 # *cc: sets up gcc and compiler options for your target builds. Note
994 # that if you select a simulator build, the compiler selection is
995 # overridden later in the script.
1001 modelname
="archosplayer"
1002 target
="-DARCHOS_PLAYER"
1004 tool
="$rootdir/tools/scramble"
1006 appextra
="player:gui"
1007 archosrom
="$pwd/rombox.ucl"
1008 flash
="$pwd/rockbox.ucl"
1012 # toolset is the tools within the tools directory that we build for
1013 # this particular target.
1014 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
1016 # Note: the convbdf is present in the toolset just because: 1) the
1017 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1018 # build the player simulator
1021 t_manufacturer
="archos"
1027 modelname
="archosrecorder"
1028 target
="-DARCHOS_RECORDER"
1030 tool
="$rootdir/tools/scramble"
1031 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1032 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1034 appextra
="recorder:gui"
1035 #archosrom="$pwd/rombox.ucl"
1036 flash
="$pwd/rockbox.ucl"
1039 # toolset is the tools within the tools directory that we build for
1040 # this particular target.
1041 toolset
=$archosbitmaptools
1043 t_manufacturer
="archos"
1049 modelname
="archosfmrecorder"
1050 target
="-DARCHOS_FMRECORDER"
1052 tool
="$rootdir/tools/scramble -fm"
1053 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1054 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1056 appextra
="recorder:gui"
1057 #archosrom="$pwd/rombox.ucl"
1058 flash
="$pwd/rockbox.ucl"
1061 # toolset is the tools within the tools directory that we build for
1062 # this particular target.
1063 toolset
=$archosbitmaptools
1065 t_manufacturer
="archos"
1071 modelname
="archosrecorderv2"
1072 target
="-DARCHOS_RECORDERV2"
1074 tool
="$rootdir/tools/scramble -v2"
1075 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1076 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1078 appextra
="recorder:gui"
1079 #archosrom="$pwd/rombox.ucl"
1080 flash
="$pwd/rockbox.ucl"
1083 # toolset is the tools within the tools directory that we build for
1084 # this particular target.
1085 toolset
=$archosbitmaptools
1087 t_manufacturer
="archos"
1093 modelname
="archosondiosp"
1094 target
="-DARCHOS_ONDIOSP"
1096 tool
="$rootdir/tools/scramble -osp"
1097 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1098 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1100 appextra
="recorder:gui"
1101 #archosrom="$pwd/rombox.ucl"
1102 flash
="$pwd/rockbox.ucl"
1105 # toolset is the tools within the tools directory that we build for
1106 # this particular target.
1107 toolset
=$archosbitmaptools
1109 t_manufacturer
="archos"
1115 modelname
="archosondiofm"
1116 target
="-DARCHOS_ONDIOFM"
1118 tool
="$rootdir/tools/scramble -ofm"
1119 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1120 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1122 appextra
="recorder:gui"
1123 #archosrom="$pwd/rombox.ucl"
1124 flash
="$pwd/rockbox.ucl"
1127 toolset
=$archosbitmaptools
1129 t_manufacturer
="archos"
1135 modelname
="archosav300"
1136 target
="-DARCHOS_AV300"
1139 tool
="$rootdir/tools/scramble -mm=C"
1140 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1141 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1143 appextra
="recorder:gui"
1146 # toolset is the tools within the tools directory that we build for
1147 # this particular target.
1148 toolset
="$toolset scramble descramble bmp2rb"
1149 # architecture, manufacturer and model for the target-tree build
1151 t_manufacturer
="archos"
1157 modelname
="iriverh120"
1158 target
="-DIRIVER_H120"
1161 tool
="$rootdir/tools/scramble -add=h120"
1162 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1163 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1164 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1165 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1166 output
="rockbox.iriver"
1167 bootoutput
="bootloader.iriver"
1168 appextra
="recorder:gui"
1169 flash
="$pwd/rombox.iriver"
1172 # toolset is the tools within the tools directory that we build for
1173 # this particular target.
1174 toolset
=$iriverbitmaptools
1176 t_manufacturer
="iriver"
1182 modelname
="iriverh300"
1183 target
="-DIRIVER_H300"
1186 tool
="$rootdir/tools/scramble -add=h300"
1187 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1188 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1189 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1190 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1191 output
="rockbox.iriver"
1192 appextra
="recorder:gui"
1195 # toolset is the tools within the tools directory that we build for
1196 # this particular target.
1197 toolset
=$iriverbitmaptools
1199 t_manufacturer
="iriver"
1205 modelname
="iriverh100"
1206 target
="-DIRIVER_H100"
1209 tool
="$rootdir/tools/scramble -add=h100"
1210 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1211 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1212 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1213 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1214 output
="rockbox.iriver"
1215 bootoutput
="bootloader.iriver"
1216 appextra
="recorder:gui"
1217 flash
="$pwd/rombox.iriver"
1220 # toolset is the tools within the tools directory that we build for
1221 # this particular target.
1222 toolset
=$iriverbitmaptools
1224 t_manufacturer
="iriver"
1230 modelname
="iriverifp7xx"
1231 target
="-DIRIVER_IFP7XX"
1235 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1236 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1237 output
="rockbox.wma"
1238 appextra
="recorder:gui"
1241 # toolset is the tools within the tools directory that we build for
1242 # this particular target.
1243 toolset
=$genericbitmaptools
1245 t_manufacturer
="pnx0101"
1246 t_model
="iriver-ifp7xx"
1251 modelname
="iriverh10"
1252 target
="-DIRIVER_H10"
1255 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1256 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1257 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1258 output
="rockbox.mi4"
1259 appextra
="recorder:gui"
1262 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1263 bootoutput
="H10_20GC.mi4"
1264 # toolset is the tools within the tools directory that we build for
1265 # this particular target.
1266 toolset
=$scramblebitmaptools
1267 # architecture, manufacturer and model for the target-tree build
1269 t_manufacturer
="iriver"
1275 modelname
="iriverh10_5gb"
1276 target
="-DIRIVER_H10_5GB"
1279 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1280 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1281 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1282 output
="rockbox.mi4"
1283 appextra
="recorder:gui"
1286 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1287 bootoutput
="H10.mi4"
1288 # toolset is the tools within the tools directory that we build for
1289 # this particular target.
1290 toolset
=$scramblebitmaptools
1291 # architecture, manufacturer and model for the target-tree build
1293 t_manufacturer
="iriver"
1299 modelname
="ipodcolor"
1300 target
="-DIPOD_COLOR"
1303 tool
="$rootdir/tools/scramble -add=ipco"
1304 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1305 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1306 output
="rockbox.ipod"
1307 appextra
="recorder:gui"
1310 bootoutput
="bootloader-$modelname.ipod"
1311 # toolset is the tools within the tools directory that we build for
1312 # this particular target.
1313 toolset
=$ipodbitmaptools
1314 # architecture, manufacturer and model for the target-tree build
1316 t_manufacturer
="ipod"
1322 modelname
="ipodnano1g"
1323 target
="-DIPOD_NANO"
1326 tool
="$rootdir/tools/scramble -add=nano"
1327 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1328 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1329 output
="rockbox.ipod"
1330 appextra
="recorder:gui"
1333 bootoutput
="bootloader-$modelname.ipod"
1334 # toolset is the tools within the tools directory that we build for
1335 # this particular target.
1336 toolset
=$ipodbitmaptools
1337 # architecture, manufacturer and model for the target-tree build
1339 t_manufacturer
="ipod"
1345 modelname
="ipodvideo"
1346 target
="-DIPOD_VIDEO"
1348 tool
="$rootdir/tools/scramble -add=ipvd"
1349 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1350 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1351 output
="rockbox.ipod"
1352 appextra
="recorder:gui"
1355 bootoutput
="bootloader-$modelname.ipod"
1356 # toolset is the tools within the tools directory that we build for
1357 # this particular target.
1358 toolset
=$ipodbitmaptools
1359 # architecture, manufacturer and model for the target-tree build
1361 t_manufacturer
="ipod"
1371 tool
="$rootdir/tools/scramble -add=ip3g"
1372 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1373 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1374 output
="rockbox.ipod"
1375 appextra
="recorder:gui"
1378 bootoutput
="bootloader-$modelname.ipod"
1379 # toolset is the tools within the tools directory that we build for
1380 # this particular target.
1381 toolset
=$ipodbitmaptools
1382 # architecture, manufacturer and model for the target-tree build
1384 t_manufacturer
="ipod"
1394 tool
="$rootdir/tools/scramble -add=ip4g"
1395 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1396 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1397 output
="rockbox.ipod"
1398 appextra
="recorder:gui"
1401 bootoutput
="bootloader-$modelname.ipod"
1402 # toolset is the tools within the tools directory that we build for
1403 # this particular target.
1404 toolset
=$ipodbitmaptools
1405 # architecture, manufacturer and model for the target-tree build
1407 t_manufacturer
="ipod"
1413 modelname
="ipodmini1g"
1414 target
="-DIPOD_MINI"
1417 tool
="$rootdir/tools/scramble -add=mini"
1418 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1419 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1420 output
="rockbox.ipod"
1421 appextra
="recorder:gui"
1424 bootoutput
="bootloader-$modelname.ipod"
1425 # toolset is the tools within the tools directory that we build for
1426 # this particular target.
1427 toolset
=$ipodbitmaptools
1428 # architecture, manufacturer and model for the target-tree build
1430 t_manufacturer
="ipod"
1436 modelname
="ipodmini2g"
1437 target
="-DIPOD_MINI2G"
1440 tool
="$rootdir/tools/scramble -add=mn2g"
1441 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1442 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1443 output
="rockbox.ipod"
1444 appextra
="recorder:gui"
1447 bootoutput
="bootloader-$modelname.ipod"
1448 # toolset is the tools within the tools directory that we build for
1449 # this particular target.
1450 toolset
=$ipodbitmaptools
1451 # architecture, manufacturer and model for the target-tree build
1453 t_manufacturer
="ipod"
1459 modelname
="ipod1g2g"
1460 target
="-DIPOD_1G2G"
1463 tool
="$rootdir/tools/scramble -add=1g2g"
1464 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1465 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1466 output
="rockbox.ipod"
1467 appextra
="recorder:gui"
1470 bootoutput
="bootloader-$modelname.ipod"
1471 # toolset is the tools within the tools directory that we build for
1472 # this particular target.
1473 toolset
=$ipodbitmaptools
1474 # architecture, manufacturer and model for the target-tree build
1476 t_manufacturer
="ipod"
1482 modelname
="ipodnano2g"
1483 target
="-DIPOD_NANO2G"
1486 tool
="$rootdir/tools/scramble -add=nn2g"
1487 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1488 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1489 output
="rockbox.ipod"
1490 appextra
="recorder:gui"
1493 bootoutput
="bootloader-$modelname.ipod"
1494 # toolset is the tools within the tools directory that we build for
1495 # this particular target.
1496 toolset
=$ipodbitmaptools
1497 # architecture, manufacturer and model for the target-tree build
1499 t_manufacturer
="s5l8700"
1500 t_model
="ipodnano2g"
1505 modelname
="iaudiox5"
1506 target
="-DIAUDIO_X5"
1509 tool
="$rootdir/tools/scramble -add=iax5"
1510 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1511 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1512 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1513 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1514 output
="rockbox.iaudio"
1515 appextra
="recorder:gui"
1518 # toolset is the tools within the tools directory that we build for
1519 # this particular target.
1520 toolset
="$iaudiobitmaptools"
1521 # architecture, manufacturer and model for the target-tree build
1523 t_manufacturer
="iaudio"
1529 modelname
="iaudiom5"
1530 target
="-DIAUDIO_M5"
1533 tool
="$rootdir/tools/scramble -add=iam5"
1534 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1535 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1536 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1537 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1538 output
="rockbox.iaudio"
1539 appextra
="recorder:gui"
1542 # toolset is the tools within the tools directory that we build for
1543 # this particular target.
1544 toolset
="$iaudiobitmaptools"
1545 # architecture, manufacturer and model for the target-tree build
1547 t_manufacturer
="iaudio"
1557 tool
="$rootdir/tools/scramble -add=i7"
1558 boottool
="$rootdir/tools/scramble -tcc=crc"
1559 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1560 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1561 output
="rockbox.iaudio"
1562 appextra
="recorder:gui"
1565 bootoutput
="I7_FW.BIN"
1566 # toolset is the tools within the tools directory that we build for
1567 # this particular target.
1568 toolset
="$tccbitmaptools"
1569 # architecture, manufacturer and model for the target-tree build
1571 t_manufacturer
="tcc77x"
1581 tool
="$rootdir/tools/scramble -add=d2"
1583 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1584 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1586 bootoutput
="bootloader-cowond2.bin"
1587 appextra
="recorder:gui"
1590 toolset
="$tccbitmaptools"
1591 # architecture, manufacturer and model for the target-tree build
1593 t_manufacturer
="tcc780x"
1599 modelname
="iaudiom3"
1600 target
="-DIAUDIO_M3"
1603 tool
="$rootdir/tools/scramble -add=iam3"
1604 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1605 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
1606 output
="rockbox.iaudio"
1607 appextra
="recorder:gui"
1610 # toolset is the tools within the tools directory that we build for
1611 # this particular target.
1612 toolset
="$iaudiobitmaptools"
1613 # architecture, manufacturer and model for the target-tree build
1615 t_manufacturer
="iaudio"
1621 modelname
="gigabeatfx"
1622 target
="-DGIGABEAT_F"
1625 tool
="$rootdir/tools/scramble -add=giga"
1626 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1627 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1628 output
="rockbox.gigabeat"
1629 appextra
="recorder:gui"
1632 toolset
=$gigabeatbitmaptools
1633 boottool
="$rootdir/tools/scramble -gigabeat"
1634 bootoutput
="FWIMG01.DAT"
1635 # architecture, manufacturer and model for the target-tree build
1637 t_manufacturer
="s3c2440"
1638 t_model
="gigabeat-fx"
1643 modelname
="gigabeats"
1644 target
="-DGIGABEAT_S"
1647 tool
="$rootdir/tools/scramble -add=gigs"
1648 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1649 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1650 output
="rockbox.gigabeat"
1651 appextra
="recorder:gui"
1654 toolset
="$gigabeatbitmaptools"
1655 boottool
="$rootdir/tools/scramble -gigabeats"
1657 # architecture, manufacturer and model for the target-tree build
1659 t_manufacturer
="imx31"
1660 t_model
="gigabeat-s"
1665 modelname
="mrobe500"
1666 target
="-DMROBE_500"
1669 tool
="$rootdir/tools/scramble -add=m500"
1670 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1671 bmp2rb_native
="$rootdir/tools/bmp2rb -f 8"
1672 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1673 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1674 output
="rockbox.mrobe500"
1675 appextra
="recorder:gui"
1678 toolset
=$gigabeatbitmaptools
1680 bootoutput
="rockbox.mrboot"
1681 # architecture, manufacturer and model for the target-tree build
1683 t_manufacturer
="tms320dm320"
1689 modelname
="mrobe100"
1690 target
="-DMROBE_100"
1693 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1694 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1695 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1696 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1697 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1698 output
="rockbox.mi4"
1699 appextra
="recorder:gui"
1702 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1703 bootoutput
="pp5020.mi4"
1704 # toolset is the tools within the tools directory that we build for
1705 # this particular target.
1706 toolset
=$scramblebitmaptools
1707 # architecture, manufacturer and model for the target-tree build
1709 t_manufacturer
="olympus"
1715 modelname
="logikdax"
1716 target
="-DLOGIK_DAX"
1719 tool
="$rootdir/tools/scramble -add=ldax"
1720 boottool
="$rootdir/tools/scramble -tcc=crc"
1721 bootoutput
="player.rom"
1722 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1723 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1724 output
="rockbox.logik"
1725 appextra
="recorder:gui"
1728 # toolset is the tools within the tools directory that we build for
1729 # this particular target.
1730 toolset
=$tccbitmaptools
1731 # architecture, manufacturer and model for the target-tree build
1733 t_manufacturer
="tcc77x"
1739 modelname
="zenvisionm30gb"
1740 target
="-DCREATIVE_ZVM"
1743 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1744 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1745 tool
="$rootdir/tools/scramble -creative=zvm"
1747 output
="rockbox.zvm"
1748 appextra
="recorder:gui"
1751 toolset
=$ipodbitmaptools
1752 boottool
="$rootdir/tools/scramble -creative=zvm -no-ciff"
1753 bootoutput
="rockbox.zvmboot"
1754 # architecture, manufacturer and model for the target-tree build
1756 t_manufacturer
="tms320dm320"
1757 t_model
="creative-zvm"
1762 modelname
="zenvisionm60gb"
1763 target
="-DCREATIVE_ZVM60GB"
1766 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1767 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1768 tool
="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1770 output
="rockbox.zvm60"
1771 appextra
="recorder:gui"
1774 toolset
=$ipodbitmaptools
1775 boottool
="$rootdir/tools/scramble -creative=zvm60"
1776 bootoutput
="rockbox.zvm60boot"
1777 # architecture, manufacturer and model for the target-tree build
1779 t_manufacturer
="tms320dm320"
1780 t_model
="creative-zvm"
1785 modelname
="zenvision"
1786 target
="-DCREATIVE_ZV"
1789 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1790 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1791 tool
="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1794 appextra
="recorder:gui"
1797 toolset
=$ipodbitmaptools
1798 boottool
="$rootdir/tools/scramble -creative=zenvision"
1799 bootoutput
="rockbox.zvboot"
1800 # architecture, manufacturer and model for the target-tree build
1802 t_manufacturer
="tms320dm320"
1803 t_model
="creative-zvm"
1808 modelname
="sansae200"
1809 target
="-DSANSA_E200"
1810 memory
=32 # supposedly
1812 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1813 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1814 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1815 output
="rockbox.mi4"
1816 appextra
="recorder:gui"
1819 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1820 bootoutput
="PP5022.mi4"
1821 # toolset is the tools within the tools directory that we build for
1822 # this particular target.
1823 toolset
=$scramblebitmaptools
1824 # architecture, manufacturer and model for the target-tree build
1826 t_manufacturer
="sandisk"
1827 t_model
="sansa-e200"
1831 # the e200R model is pretty much identical to the e200, it only has a
1832 # different option to the scramble tool when building a bootloader and
1833 # makes the bootloader output file name in all lower case.
1835 modelname
="sansae200r"
1836 target
="-DSANSA_E200"
1837 memory
=32 # supposedly
1839 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1840 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1841 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1842 output
="rockbox.mi4"
1843 appextra
="recorder:gui"
1846 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1847 bootoutput
="pp5022.mi4"
1848 # toolset is the tools within the tools directory that we build for
1849 # this particular target.
1850 toolset
=$scramblebitmaptools
1851 # architecture, manufacturer and model for the target-tree build
1853 t_manufacturer
="sandisk"
1854 t_model
="sansa-e200"
1859 modelname
="sansac200"
1860 target
="-DSANSA_C200"
1861 memory
=32 # supposedly
1863 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1864 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1865 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1866 output
="rockbox.mi4"
1867 appextra
="recorder:gui"
1870 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1871 bootoutput
="firmware.mi4"
1872 # toolset is the tools within the tools directory that we build for
1873 # this particular target.
1874 toolset
=$scramblebitmaptools
1875 # architecture, manufacturer and model for the target-tree build
1877 t_manufacturer
="sandisk"
1878 t_model
="sansa-c200"
1883 modelname
="sansam200"
1884 target
="-DSANSA_M200"
1887 tool
="$rootdir/tools/scramble -add=m200"
1888 boottool
="$rootdir/tools/scramble -tcc=crc"
1889 bootoutput
="player.rom"
1890 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1891 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1892 output
="rockbox.m200"
1893 appextra
="recorder:gui"
1896 # toolset is the tools within the tools directory that we build for
1897 # this particular target.
1898 toolset
=$tccbitmaptools
1899 # architecture, manufacturer and model for the target-tree build
1901 t_manufacturer
="tcc77x"
1907 modelname
="sansac100"
1908 target
="-DSANSA_C100"
1911 tool
="$rootdir/tools/scramble -add=c100"
1912 boottool
="$rootdir/tools/scramble -tcc=crc"
1913 bootoutput
="player.rom"
1914 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1915 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1916 output
="rockbox.c100"
1917 appextra
="recorder:gui"
1920 # toolset is the tools within the tools directory that we build for
1921 # this particular target.
1922 toolset
=$tccbitmaptools
1923 # architecture, manufacturer and model for the target-tree build
1925 t_manufacturer
="tcc77x"
1931 modelname
="sansaclip"
1932 target
="-DSANSA_CLIP"
1934 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1935 bmp2rb_native
="$bmp2rb_mono"
1936 tool
="$rootdir/tools/scramble -add=clip"
1937 output
="rockbox.sansa"
1938 bootoutput
="bootloader-clip.sansa"
1939 appextra
="recorder:gui"
1942 toolset
=$scramblebitmaptools
1944 t_manufacturer
="as3525"
1945 t_model
="sansa-clip"
1952 modelname
="sansae200v2"
1953 target
="-DSANSA_E200V2"
1955 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1956 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1957 tool
="$rootdir/tools/scramble -add=e2v2"
1958 output
="rockbox.sansa"
1959 bootoutput
="bootloader-e200v2.sansa"
1960 appextra
="recorder:gui"
1963 toolset
=$scramblebitmaptools
1965 t_manufacturer
="as3525"
1966 t_model
="sansa-e200v2"
1973 modelname
="sansam200v4"
1974 target
="-DSANSA_M200V4"
1976 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1977 bmp2rb_native
="$bmp2rb_mono"
1978 tool
="$rootdir/tools/scramble -add=m2v4"
1979 output
="rockbox.sansa"
1980 bootoutput
="bootloader-m200v4.sansa"
1981 appextra
="recorder:gui"
1984 toolset
=$scramblebitmaptools
1986 t_manufacturer
="as3525"
1987 t_model
="sansa-m200v4"
1994 modelname
="sansafuze"
1995 target
="-DSANSA_FUZE"
1997 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1998 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1999 tool
="$rootdir/tools/scramble -add=fuze"
2000 output
="rockbox.sansa"
2001 bootoutput
="bootloader-fuze.sansa"
2002 appextra
="recorder:gui"
2005 toolset
=$scramblebitmaptools
2007 t_manufacturer
="as3525"
2008 t_model
="sansa-fuze"
2015 modelname
="sansac200v2"
2016 target
="-DSANSA_C200V2"
2017 memory
=2 # as per OF diagnosis mode
2018 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2019 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2020 tool
="$rootdir/tools/scramble -add=c2v2"
2021 output
="rockbox.sansa"
2022 bootoutput
="bootloader-c200v2.sansa"
2023 appextra
="recorder:gui"
2026 # toolset is the tools within the tools directory that we build for
2027 # this particular target.
2028 toolset
=$scramblebitmaptools
2029 # architecture, manufacturer and model for the target-tree build
2031 t_manufacturer
="as3525"
2032 t_model
="sansa-c200v2"
2038 modelname
="sansaclipv2"
2039 target
="-DSANSA_CLIPV2"
2041 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2042 bmp2rb_native
="$bmp2rb_mono"
2043 tool
="$rootdir/tools/scramble -add=clv2"
2044 output
="rockbox.sansa"
2045 bootoutput
="bootloader-clipv2.sansa"
2046 appextra
="recorder:gui"
2049 toolset
=$scramblebitmaptools
2051 t_manufacturer
="as3525"
2052 t_model
="sansa-clipv2"
2057 echo "Sansa View is not yet supported!"
2060 modelname
="sansaview"
2061 target
="-DSANSA_VIEW"
2064 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2065 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2066 output
="rockbox.mi4"
2070 boottool
="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
2071 bootoutput
="firmware.mi4"
2072 # toolset is the tools within the tools directory that we build for
2073 # this particular target.
2074 toolset
=$scramblebitmaptools
2076 t_manufacturer
="sandisk"
2077 t_model
="sansa-view"
2082 modelname
="sansaclipplus"
2083 target
="-DSANSA_CLIPPLUS"
2085 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2086 bmp2rb_native
="$bmp2rb_mono"
2087 tool
="$rootdir/tools/scramble -add=cli+"
2088 output
="rockbox.sansa"
2089 bootoutput
="bootloader-clipplus.sansa"
2090 appextra
="recorder:gui"
2093 toolset
=$scramblebitmaptools
2095 t_manufacturer
="as3525"
2096 t_model
="sansa-clipplus"
2102 modelname
="sansafuzev2"
2103 target
="-DSANSA_FUZEV2"
2105 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2106 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2107 tool
="$rootdir/tools/scramble -add=fuz2"
2108 output
="rockbox.sansa"
2109 bootoutput
="bootloader-fuzev2.sansa"
2110 appextra
="recorder:gui"
2113 toolset
=$scramblebitmaptools
2115 t_manufacturer
="as3525"
2116 t_model
="sansa-fuzev2"
2122 modelname
="tatungtpj1022"
2123 target
="-DTATUNG_TPJ1022"
2126 tool
="$rootdir/tools/scramble -add tpj2"
2127 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2128 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2129 output
="rockbox.elio"
2130 appextra
="recorder:gui"
2133 boottool
="$rootdir/tools/scramble -mi4v2"
2134 bootoutput
="pp5020.mi4"
2135 # toolset is the tools within the tools directory that we build for
2136 # this particular target.
2137 toolset
=$scramblebitmaptools
2138 # architecture, manufacturer and model for the target-tree build
2140 t_manufacturer
="tatung"
2146 modelname
="gogearsa9200"
2147 target
="-DPHILIPS_SA9200"
2148 memory
=32 # supposedly
2150 tool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
2151 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2152 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2153 output
="rockbox.mi4"
2154 appextra
="recorder:gui"
2157 boottool
="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
2158 bootoutput
="FWImage.ebn"
2159 # toolset is the tools within the tools directory that we build for
2160 # this particular target.
2161 toolset
=$scramblebitmaptools
2162 # architecture, manufacturer and model for the target-tree build
2164 t_manufacturer
="philips"
2170 modelname
="gogearhdd1630"
2171 target
="-DPHILIPS_HDD1630"
2172 memory
=32 # supposedly
2174 tool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
2175 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2176 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2177 output
="rockbox.mi4"
2178 appextra
="recorder:gui"
2181 boottool
="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
2182 bootoutput
="FWImage.ebn"
2183 # toolset is the tools within the tools directory that we build for
2184 # this particular target.
2185 toolset
=$scramblebitmaptools
2186 # architecture, manufacturer and model for the target-tree build
2188 t_manufacturer
="philips"
2194 modelname
="gogearhdd6330"
2195 target
="-DPHILIPS_HDD6330"
2196 memory
=32 # supposedly
2198 tool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
2199 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2200 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2201 output
="rockbox.mi4"
2202 appextra
="recorder:gui"
2205 boottool
="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
2206 bootoutput
="FWImage.ebn"
2207 # toolset is the tools within the tools directory that we build for
2208 # this particular target.
2209 toolset
=$scramblebitmaptools
2210 # architecture, manufacturer and model for the target-tree build
2212 t_manufacturer
="philips"
2218 modelname
="meizum6sl"
2219 target
="-DMEIZU_M6SL"
2223 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2224 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2225 output
="rockbox.meizu"
2226 appextra
="recorder:gui"
2229 toolset
=$genericbitmaptools
2231 bootoutput
="rockboot.ebn"
2232 # architecture, manufacturer and model for the target-tree build
2234 t_manufacturer
="s5l8700"
2235 t_model
="meizu-m6sl"
2240 modelname
="meizum6sp"
2241 target
="-DMEIZU_M6SP"
2245 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2246 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2247 output
="rockbox.meizu"
2248 appextra
="recorder:gui"
2251 toolset
=$genericbitmaptools
2253 bootoutput
="rockboot.ebn"
2254 # architecture, manufacturer and model for the target-tree build
2256 t_manufacturer
="s5l8700"
2257 t_model
="meizu-m6sp"
2267 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2268 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2269 output
="rockbox.meizu"
2270 appextra
="recorder:gui"
2273 toolset
=$genericbitmaptools
2275 bootoutput
="rockboot.ebn"
2276 # architecture, manufacturer and model for the target-tree build
2278 t_manufacturer
="s5l8700"
2284 modelname
="ondavx747"
2285 target
="-DONDA_VX747"
2288 tool
="$rootdir/tools/scramble -add=x747"
2289 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2290 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2291 output
="rockbox.vx747"
2292 appextra
="recorder:gui"
2295 toolset
=$genericbitmaptools
2296 boottool
="$rootdir/tools/scramble -ccpmp"
2297 bootoutput
="ccpmp.bin"
2298 # architecture, manufacturer and model for the target-tree build
2300 t_manufacturer
="ingenic_jz47xx"
2301 t_model
="onda_vx747"
2306 modelname
="ondavx767"
2307 target
="-DONDA_VX767"
2311 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2312 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2313 output
="rockbox.vx767"
2314 appextra
="recorder:gui"
2317 toolset
=$genericbitmaptools
2318 boottool
="$rootdir/tools/scramble -ccpmp"
2319 bootoutput
="ccpmp.bin"
2320 # architecture, manufacturer and model for the target-tree build
2322 t_manufacturer
="ingenic_jz47xx"
2323 t_model
="onda_vx767"
2328 modelname
="ondavx747p"
2329 target
="-DONDA_VX747P"
2332 tool
="$rootdir/tools/scramble -add=747p"
2333 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2334 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2335 output
="rockbox.vx747p"
2336 appextra
="recorder:gui"
2339 toolset
=$genericbitmaptools
2340 boottool
="$rootdir/tools/scramble -ccpmp"
2341 bootoutput
="ccpmp.bin"
2342 # architecture, manufacturer and model for the target-tree build
2344 t_manufacturer
="ingenic_jz47xx"
2345 t_model
="onda_vx747"
2350 modelname
="ondavx777"
2351 target
="-DONDA_VX777"
2354 tool
="$rootdir/tools/scramble -add=x777"
2355 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2356 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2357 output
="rockbox.vx777"
2358 appextra
="recorder:gui"
2361 toolset
=$genericbitmaptools
2362 boottool
="$rootdir/tools/scramble -ccpmp"
2363 bootoutput
="ccpmp.bin"
2364 # architecture, manufacturer and model for the target-tree build
2366 t_manufacturer
="ingenic_jz47xx"
2367 t_model
="onda_vx747"
2372 modelname
="lyreproto1"
2373 target
="-DLYRE_PROTO1"
2377 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2378 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2379 output
="rockbox.lyre"
2380 appextra
="recorder:gui"
2383 toolset
=$scramblebitmaptools
2385 bootoutput
="bootloader-proto1.lyre"
2386 # architecture, manufacturer and model for the target-tree build
2388 t_manufacturer
="at91sam"
2389 t_model
="lyre_proto1"
2394 modelname
="mini2440"
2398 tool
="$rootdir/tools/scramble -add=m244"
2399 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2400 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2401 output
="rockbox.mini2440"
2402 appextra
="recorder:gui"
2405 toolset
=$scramblebitmaptools
2407 bootoutput
="bootloader-mini2440.lyre"
2408 # architecture, manufacturer and model for the target-tree build
2410 t_manufacturer
="s3c2440"
2416 modelname
="samsungyh820"
2417 target
="-DSAMSUNG_YH820"
2420 tool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS"
2421 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2422 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2423 output
="rockbox.mi4"
2424 appextra
="recorder:gui"
2427 boottool
="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL"
2428 bootoutput
="FW_YH820.mi4"
2429 # toolset is the tools within the tools directory that we build for
2430 # this particular target.
2431 toolset
=$scramblebitmaptools
2432 # architecture, manufacturer and model for the target-tree build
2434 t_manufacturer
="samsung"
2440 modelname
="samsungyh920"
2441 target
="-DSAMSUNG_YH920"
2444 tool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS"
2445 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2446 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
2447 output
="rockbox.mi4"
2448 appextra
="recorder:gui"
2451 boottool
="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL"
2452 bootoutput
="PP5020.mi4"
2453 # toolset is the tools within the tools directory that we build for
2454 # this particular target.
2455 toolset
=$scramblebitmaptools
2456 # architecture, manufacturer and model for the target-tree build
2458 t_manufacturer
="samsung"
2464 modelname
="samsungyh925"
2465 target
="-DSAMSUNG_YH925"
2468 tool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS"
2469 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2470 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2471 output
="rockbox.mi4"
2472 appextra
="recorder:gui"
2475 boottool
="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL"
2476 bootoutput
="FW_YH925.mi4"
2477 # toolset is the tools within the tools directory that we build for
2478 # this particular target.
2479 toolset
=$scramblebitmaptools
2480 # architecture, manufacturer and model for the target-tree build
2482 t_manufacturer
="samsung"
2488 modelname
="samsungyps3"
2489 target
="-DSAMSUNG_YPS3"
2493 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2494 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
2495 output
="rockbox.yps3"
2496 appextra
="recorder:gui"
2499 toolset
=$genericbitmaptools
2501 bootoutput
="rockboot.ebn"
2502 # architecture, manufacturer and model for the target-tree build
2504 t_manufacturer
="s5l8700"
2511 target
="-DPBELL_VIBE500"
2514 tool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS"
2515 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2516 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
2517 output
="rockbox.mi4"
2518 appextra
="recorder:gui"
2521 boottool
="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL"
2522 bootoutput
="jukebox.mi4"
2523 # toolset is the tools within the tools directory that we build for
2524 # this particular target.
2525 toolset
=$scramblebitmaptools
2526 # architecture, manufacturer and model for the target-tree build
2528 t_manufacturer
="pbell"
2534 modelname
="mpiohd200"
2535 target
="-DMPIO_HD200"
2538 tool
="$rootdir/tools/scramble -add=hd20"
2539 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
2540 bmp2rb_native
="$rootdir/tools/bmp2rb -f 7"
2541 output
="rockbox.mpio"
2542 bootoutput
="bootloader.mpio"
2543 appextra
="recorder:gui"
2546 # toolset is the tools within the tools directory that we build for
2547 # this particular target.
2548 toolset
="$genericbitmaptools"
2549 # architecture, manufacturer and model for the target-tree build
2551 t_manufacturer
="mpio"
2556 echo "Please select a supported target platform!"
2562 echo "Platform set to $modelname"
2566 ############################################################################
2567 # Amount of memory, for those that can differ. They have $memory unset at
2571 if [ -z "$memory" ]; then
2574 if [ "$ARG_RAM" ]; then
2577 echo "Enter size of your RAM (in MB): (Defaults to 32)"
2590 if [ "$ARG_RAM" ]; then
2593 echo "Enter size of your RAM (in MB): (Defaults to 2)"
2606 echo "Memory size selected: $memory MB"
2607 [ "$ARG_TYPE" ] ||
echo ""
2611 ##################################################################
2612 # Figure out build "type"
2615 # the ifp7x0 is the only platform that supports building a gdb stub like
2619 gdbstub
="(G)DB stub, "
2621 sansae200r|sansae200
)
2622 gdbstub
="(I)nstaller, "
2625 gdbstub
="(E)raser, "
2630 if [ "$ARG_TYPE" ]; then
2633 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, $gdbstub(M)anual: (Defaults to N)"
2639 appsdir
='\$(ROOTDIR)/bootloader'
2641 extradefines
="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
2643 echo "e200R-installer build selected"
2646 appsdir
='\$(ROOTDIR)/bootloader'
2648 echo "C2(4)0 or C2(5)0"
2652 extradefines
="-DBOOTLOADER -DC200_ERASE -DC240_ERASE -ffunction-sections -fdata-sections"
2653 echo "c240 eraser build selected"
2656 extradefines
="-DBOOTLOADER -DC200_ERASE -DC250_ERASE -ffunction-sections -fdata-sections"
2657 echo "c240 eraser build selected"
2661 echo "c200 eraser build selected"
2664 if test $t_manufacturer = "archos"; then
2665 # Archos SH-based players do this somewhat differently for
2667 appsdir
='\$(ROOTDIR)/flash/bootbox'
2670 appsdir
='\$(ROOTDIR)/bootloader'
2673 if test -n "$boottool"; then
2676 if test -n "$bootoutput"; then
2680 extradefines
="-DBOOTLOADER -ffunction-sections -fdata-sections"
2682 echo "Bootloader build selected"
2685 if [ "$modelname" = "sansae200r" ]; then
2686 echo "Do not use the e200R target for simulator builds. Use e200 instead."
2691 extradefines
="-DSIMULATOR"
2694 echo "Simulator build selected"
2697 echo "Advanced build selected"
2698 whichadvanced
$btype
2701 extradefines
="-DSTUB" # for target makefile symbol EXTRA_DEFINES
2702 appsdir
='\$(ROOTDIR)/gdb'
2711 echo "GDB stub build selected"
2716 echo "Manual build selected"
2724 extradefines
="-DDEBUG"
2725 appsdir
='\$(ROOTDIR)/tools/checkwps';
2726 output
='checkwps.'${modelname};
2728 echo "CheckWPS build selected"
2736 appsdir
='\$(ROOTDIR)/tools/database';
2741 output
="database_${modelname}.exe"
2744 output
='database.'${modelname};
2748 echo "Database tool build selected"
2751 if [ "$modelname" = "sansae200r" ]; then
2752 echo "Do not use the e200R target for regular builds. Use e200 instead."
2756 btype
="N" # set it explicitly since RET only gets here as well
2757 echo "Normal build selected"
2761 # to be able running "make manual" from non-manual configuration
2764 manualdev
="archosfmrecorder"
2767 manualdev
="iriverh100"
2770 manualdev
="ipodmini1g"
2773 manualdev
=$modelname
2777 if [ -z "$debug" ]; then
2778 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
2781 echo "Using source code root directory: $rootdir"
2783 # this was once possible to change at build-time, but no more:
2788 if [ "yes" = "$simulator" ]; then
2789 # setup compiler and things for simulator
2792 if [ -d "simdisk" ]; then
2793 echo "Subdirectory 'simdisk' already present"
2796 echo "Created a 'simdisk' subdirectory for simulating the hard disk"
2800 # Now, figure out version number of the (gcc) compiler we are about to use
2801 gccver
=`$CC -dumpversion`;
2803 # figure out the binutil version too and display it, mostly for the build
2804 # system etc to be able to see it easier
2805 if [ $uname = "Darwin" ]; then
2806 ldver
=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
2808 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
2811 if [ -z "$gccver" ]; then
2812 echo "[WARNING] The compiler you must use ($CC) is not in your path!"
2813 echo "[WARNING] this may cause your build to fail since we cannot do the"
2814 echo "[WARNING] checks we want now."
2817 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
2820 num1
=`echo $gccver | cut -d . -f1`
2821 num2
=`echo $gccver | cut -d . -f2`
2822 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
2829 echo "Using $CC $gccver ($gccnum)"
2831 if test "$gccnum" -ge "400"; then
2832 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2833 # so we ignore that warnings for now
2835 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
2838 if test "$gccnum" -ge "401"; then
2839 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2840 # will break strict-aliasing rules"
2842 GCCOPTS
="$GCCOPTS -fno-strict-aliasing"
2845 if test "$gccnum" -ge "402"; then
2846 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2847 # and later would throw it for several valid cases
2848 GCCOPTS
="$GCCOPTS -Wno-override-init"
2856 # cross-compile for win32
2859 # Verify that the cross-compiler is of a recommended version!
2860 if test "$gccver" != "$gccchoice"; then
2861 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2862 echo "WARNING: version $gccchoice!"
2863 echo "WARNING: This may cause your build to fail since it may be a version"
2864 echo "WARNING: that isn't functional or known to not be the best choice."
2865 echo "WARNING: If you suffer from build problems, you know that this is"
2866 echo "WARNING: a likely source for them..."
2874 echo "Using $LD $ldver"
2876 # check the compiler for SH platforms
2877 if test "$CC" = "sh-elf-gcc"; then
2878 if test "$gccnum" -lt "400"; then
2879 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2880 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2882 # figure out patch status
2883 gccpatch
=`$CC --version`;
2885 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
2886 echo "gcc $gccver is rockbox patched"
2887 # then convert -O to -Os to get smaller binaries!
2888 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2890 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2891 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2896 if test "$CC" = "m68k-elf-gcc"; then
2897 # convert -O to -Os to get smaller binaries!
2898 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2901 if [ "$ARG_CCACHE" = "1" ]; then
2902 echo "Enable ccache for building"
2904 elif [ "$ARG_CCACHE" != "0" ]; then
2905 ccache
=`findtool ccache`
2906 if test -n "$ccache"; then
2907 echo "Found and uses ccache ($ccache)"
2911 # figure out the full path to the various commands if possible
2912 HOSTCC
=`findtool gcc --lit`
2913 HOSTAR
=`findtool ar --lit`
2914 CC
=`findtool ${CC} --lit`
2915 LD
=`findtool ${AR} --lit`
2916 AR
=`findtool ${AR} --lit`
2917 AS
=`findtool ${AS} --lit`
2918 OC
=`findtool ${OC} --lit`
2919 WINDRES
=`findtool ${WINDRES} --lit`
2920 DLLTOOL
=`findtool ${DLLTOOL} --lit`
2921 DLLWRAP
=`findtool ${DLLWRAP} --lit`
2922 RANLIB
=`findtool ${RANLIB} --lit`
2924 if test -n "$ccache"; then
2928 if test "X$endian" = "Xbig"; then
2929 defendian
="ROCKBOX_BIG_ENDIAN"
2931 defendian
="ROCKBOX_LITTLE_ENDIAN"
2934 if [ "$ARG_RBDIR" ]; then
2936 echo "Using alternate rockbox dir: ${rbdir}"
2940 -e "s,@ENDIAN@,${defendian},g" \
2941 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2942 -e "s,^#undef DO_BOOTCHART,$use_bootchart,g" \
2943 -e "s,@config_rtc@,$config_rtc,g" \
2944 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2945 -e "s,@RBDIR@,${rbdir},g" \
2946 -e "s,@have_backlight@,$have_backlight,g" \
2947 -e "s,@have_fmradio_in@,$have_fmradio_in,g" \
2948 -e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
2950 /* This header was made by configure */
2951 #ifndef __BUILD_AUTOCONF_H
2952 #define __BUILD_AUTOCONF_H
2954 /* Define endianess for the target or simulator platform */
2957 /* Define this if you build rockbox to support the logf logging and display */
2958 #undef ROCKBOX_HAS_LOGF
2960 /* Define this to record a chart with timings for the stages of boot */
2963 /* optional define for a backlight modded Ondio */
2966 /* optional define for FM radio mod for iAudio M5 */
2969 /* optional define for ATA poweroff on Player */
2972 /* optional defines for RTC mod for h1x0 */
2976 /* root of Rockbox */
2977 #define ROCKBOX_DIR "/@RBDIR@"
2979 #endif /* __BUILD_AUTOCONF_H */
2982 if test -n "$t_cpu"; then
2983 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2984 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2985 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2989 if test "$simulator" = "yes"; then
2990 # add simul make stuff on the #SIMUL# line
2991 simmagic1
="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2992 simmagic2
="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2994 # delete the lines that match
2995 simmagic1
='/@SIMUL1@/D'
2996 simmagic2
='/@SIMUL2@/D'
2999 if test "$swcodec" = "yes"; then
3000 voicetoolset
="rbspeexenc voicefont wavtrim"
3002 voicetoolset
="voicefont wavtrim"
3005 if test "$apps" = "apps"; then
3006 # only when we build "real" apps we build the .lng files
3010 #### Fix the cmdline ###
3011 if test -n "$ccache"; then
3014 if [ "$ARG_ARM_EABI" = "1" ]; then
3015 cmdline
="$cmdline--eabi "
3018 cmdline
="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
3022 -e "s,@ROOTDIR@,${rootdir},g" \
3023 -e "s,@DEBUG@,${debug},g" \
3024 -e "s,@MEMORY@,${memory},g" \
3025 -e "s,@TARGET_ID@,${target_id},g" \
3026 -e "s,@TARGET@,${target},g" \
3027 -e "s,@CPU@,${t_cpu},g" \
3028 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
3029 -e "s,@MODELNAME@,${modelname},g" \
3030 -e "s,@LANGUAGE@,${language},g" \
3031 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
3032 -e "s,@PWD@,${pwd},g" \
3033 -e "s,@HOSTCC@,${HOSTCC},g" \
3034 -e "s,@HOSTAR@,${HOSTAR},g" \
3035 -e "s,@CC@,${CC},g" \
3036 -e "s,@LD@,${LD},g" \
3037 -e "s,@AR@,${AR},g" \
3038 -e "s,@AS@,${AS},g" \
3039 -e "s,@OC@,${OC},g" \
3040 -e "s,@WINDRES@,${WINDRES},g" \
3041 -e "s,@DLLTOOL@,${DLLTOOL},g" \
3042 -e "s,@DLLWRAP@,${DLLWRAP},g" \
3043 -e "s,@RANLIB@,${RANLIB},g" \
3044 -e "s,@TOOL@,${tool},g" \
3045 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
3046 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
3047 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
3048 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
3049 -e "s,@OUTPUT@,${output},g" \
3050 -e "s,@APPEXTRA@,${appextra},g" \
3051 -e "s,@ARCHOSROM@,${archosrom},g" \
3052 -e "s,@FLASHFILE@,${flash},g" \
3053 -e "s,@PLUGINS@,${plugins},g" \
3054 -e "s,@CODECS@,${swcodec},g" \
3055 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
3056 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
3057 -e "s,@GCCOPTS@,${GCCOPTS},g" \
3058 -e "s,@TARGET_INC@,${TARGET_INC},g" \
3059 -e "s!@LDOPTS@!${LDOPTS}!g" \
3060 -e "s,@LOADADDRESS@,${loadaddress},g" \
3061 -e "s,@EXTRADEF@,${extradefines},g" \
3062 -e "s,@APPSDIR@,${appsdir},g" \
3063 -e "s,@FIRMDIR@,${firmdir},g" \
3064 -e "s,@TOOLSDIR@,${toolsdir},g" \
3065 -e "s,@APPS@,${apps},g" \
3066 -e "s,@SIMVER@,${simver},g" \
3067 -e "s,@GCCVER@,${gccver},g" \
3068 -e "s,@GCCNUM@,${gccnum},g" \
3069 -e "s,@UNAME@,${uname},g" \
3070 -e "s,@ENDIAN@,${defendian},g" \
3071 -e "s,@TOOLSET@,${toolset},g" \
3074 -e "s,@MANUALDEV@,${manualdev},g" \
3075 -e "s,@ENCODER@,${ENC_CMD},g" \
3076 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
3077 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
3078 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
3079 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
3080 -e "s,@LANGS@,${buildlangs},g" \
3081 -e "s,@USE_ELF@,${USE_ELF},g" \
3082 -e "s,@RBDIR@,${rbdir},g" \
3083 -e "s,@PREFIX@,$PREFIX,g" \
3084 -e "s,@CMDLINE@,$cmdline,g" \
3085 -e "s,@SDLCONFIG@,$sdl,g" \
3087 ## Automatically generated. http://www.rockbox.org/
3089 export ROOTDIR=@ROOTDIR@
3090 export FIRMDIR=@FIRMDIR@
3091 export APPSDIR=@APPSDIR@
3092 export TOOLSDIR=@TOOLSDIR@
3093 export DOCSDIR=\$(ROOTDIR)/docs
3094 export MANUALDIR=\${ROOTDIR}/manual
3095 export DEBUG=@DEBUG@
3096 export MODELNAME=@MODELNAME@
3097 export ARCHOSROM=@ARCHOSROM@
3098 export FLASHFILE=@FLASHFILE@
3099 export TARGET_ID=@TARGET_ID@
3100 export TARGET=@TARGET@
3102 export MANUFACTURER=@MANUFACTURER@
3104 export BUILDDIR=@PWD@
3105 export LANGUAGE=@LANGUAGE@
3106 export VOICELANGUAGE=@VOICELANGUAGE@
3107 export MEMORYSIZE=@MEMORY@
3108 export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
3109 export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
3110 export MKFIRMWARE=@TOOL@
3111 export BMP2RB_MONO=@BMP2RB_MONO@
3112 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
3113 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
3114 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
3115 export BINARY=@OUTPUT@
3116 export APPEXTRA=@APPEXTRA@
3117 export ENABLEDPLUGINS=@PLUGINS@
3118 export SOFTWARECODECS=@CODECS@
3119 export EXTRA_DEFINES=@EXTRADEF@
3120 export HOSTCC=@HOSTCC@
3121 export HOSTAR=@HOSTAR@
3127 export WINDRES=@WINDRES@
3128 export DLLTOOL=@DLLTOOL@
3129 export DLLWRAP=@DLLWRAP@
3130 export RANLIB=@RANLIB@
3131 export PREFIX=@PREFIX@
3132 export PROFILE_OPTS=@PROFILE_OPTS@
3133 export SIMVER=@SIMVER@
3134 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3135 export GCCOPTS=@GCCOPTS@
3136 export TARGET_INC=@TARGET_INC@
3137 export LOADADDRESS=@LOADADDRESS@
3138 export SHARED_FLAG=@SHARED_FLAG@
3139 export LDOPTS=@LDOPTS@
3140 export GCCVER=@GCCVER@
3141 export GCCNUM=@GCCNUM@
3142 export UNAME=@UNAME@
3143 export MANUALDEV=@MANUALDEV@
3144 export TTS_OPTS=@TTS_OPTS@
3145 export TTS_ENGINE=@TTS_ENGINE@
3146 export ENC_OPTS=@ENC_OPTS@
3147 export ENCODER=@ENCODER@
3148 export USE_ELF=@USE_ELF@
3149 export RBDIR=@RBDIR@
3150 export SDLCONFIG=@SDLCONFIG@
3152 CONFIGURE_OPTIONS=@CMDLINE@
3154 include \$(TOOLSDIR)/root.make
3158 echo "Created Makefile"