blob: 9390fa1bf9400c875a2bc3bca8bdfeed98fca35e [file] [log] [blame]
Jonas Häggqviste5439012006-11-06 11:48:00 +00001#!/bin/sh
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +00002# __________ __ ___.
3# Open \______ \ ____ ____ | | _\_ |__ _______ ___
4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +00008#
9
Daniel Stenberg235b50b2004-10-04 13:02:41 +000010# global CC options for all platforms
Rafaël Carréc168d232010-09-07 14:21:13 +000011CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
Frank Gevaertsb8286d42010-07-03 20:58:22 +000012
Thomas Martitz3414c952012-03-29 08:15:20 +020013# LD options for the core
14LDOPTS=""
15# LD options for the core + plugins
Rafaël Carré94eff152010-07-04 15:02:11 +000016GLOBAL_LDOPTS=""
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +000017
Thomas Martitz240923a2010-08-02 20:34:47 +000018extradefines=""
Daniel Stenbergedc07922005-05-30 13:00:43 +000019use_logf="#undef ROCKBOX_HAS_LOGF"
Torne Wuff52e528e2010-04-01 16:27:21 +000020use_bootchart="#undef DO_BOOTCHART"
Ralf Ertzingerd2f97da2011-09-09 12:28:36 +020021use_logf_serial="#undef LOGF_SERIAL"
Daniel Stenbergedc07922005-05-30 13:00:43 +000022
Daniel Stenberg2af252d2005-07-08 10:19:02 +000023scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
24
Thomas Martitz9c0b2472010-08-01 16:15:27 +000025rbdir="/.rockbox"
Thomas Martitz9c0b2472010-08-01 16:15:27 +000026bindir=
27libdir=
Thomas Martitz7a9fd0b2010-12-06 22:28:14 +000028sharedir=
Thomas Martitz240923a2010-08-02 20:34:47 +000029
Thomas Martitz6d85de32011-02-18 22:46:01 +000030thread_support="ASSEMBLER_THREADS"
Thomas Martitz240923a2010-08-02 20:34:47 +000031app_lcd_width=
32app_lcd_height=
Dominik Riebeling26a92fa2011-06-04 10:36:34 +000033app_lcd_orientation=
Jens Arnold334e6122012-01-08 13:59:15 +000034
35# Properly retain command line arguments containing spaces
36cmdline=
37for arg in "$@"; do
38 case "$arg" in
39 *\ *) cmdline="$cmdline \"$arg\"";;
40 *) cmdline="$cmdline $arg";;
41 esac
42done
43
Robert Hakc3320ae2002-10-17 09:08:05 +000044#
45# Begin Function Definitions
46#
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +000047input() {
48 read response
49 echo $response
50}
51
Daniel Stenbergcdde25b2005-02-18 13:47:17 +000052prefixtools () {
53 prefix="$1"
54 CC=${prefix}gcc
Thomas Martitz8e8e9782012-01-07 19:49:02 +010055 CPP=${prefix}cpp
Daniel Stenbergcdde25b2005-02-18 13:47:17 +000056 WINDRES=${prefix}windres
57 DLLTOOL=${prefix}dlltool
58 DLLWRAP=${prefix}dllwrap
59 RANLIB=${prefix}ranlib
60 LD=${prefix}ld
61 AR=${prefix}ar
62 AS=${prefix}as
63 OC=${prefix}objcopy
64}
65
Dave Chapman9e638c72011-02-11 19:51:29 +000066app_set_paths () {
67 # setup files and paths depending on the platform
68 if [ -z "$ARG_PREFIX" ]; then
69 sharedir="/usr/local/share/rockbox"
70 bindir="/usr/local/bin"
71 libdir="/usr/local/lib"
Björn Stenberga8ed3392010-09-24 12:03:15 +000072 else
Dave Chapman9e638c72011-02-11 19:51:29 +000073 if [ -d "$ARG_PREFIX" ]; then
74 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
75 ARG_PREFIX=`realpath $ARG_PREFIX`
76 if [ "0" != "$?" ]; then
77 echo "ERROR: Could not get prefix path (is realpath installed?)."
78 exit
79 fi
80 fi
81 sharedir="$ARG_PREFIX/share/rockbox"
82 bindir="$ARG_PREFIX/bin"
83 libdir="$ARG_PREFIX/lib"
84 else
Thomas Jaroschec6e64c2011-02-22 20:15:26 +000085 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist"
Dave Chapman9e638c72011-02-11 19:51:29 +000086 exit
87 fi
88 fi
89}
90
91# Set the application LCD size according to the following priorities:
92# 1) If --lcdwidth and --lcdheight are set, use them
93# 2) If a size is passed to the app_set_lcd_size() function, use that
94# 3) Otherwise ask the user
95app_set_lcd_size () {
96 if [ -z "$ARG_LCDWIDTH" ]; then
97 ARG_LCDWIDTH=$1
98 fi
99 if [ -z "$ARG_LCDHEIGHT" ]; then
100 ARG_LCDHEIGHT=$2
Björn Stenberga8ed3392010-09-24 12:03:15 +0000101 fi
102
Rafaël Carré3b0521a42010-08-03 17:44:41 +0000103 echo "Enter the LCD width (default: 320)"
Björn Stenberga8ed3392010-09-24 12:03:15 +0000104 if [ -z "$ARG_LCDWIDTH" ]; then
105 app_lcd_width=`input`
106 else
Teruaki Kawashima900ec8d2010-10-14 13:10:12 +0000107 app_lcd_width="$ARG_LCDWIDTH"
Björn Stenberga8ed3392010-09-24 12:03:15 +0000108 fi
Thomas Martitz240923a2010-08-02 20:34:47 +0000109 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
Rafaël Carré3b0521a42010-08-03 17:44:41 +0000110 echo "Enter the LCD height (default: 480)"
Björn Stenberga8ed3392010-09-24 12:03:15 +0000111 if [ -z "$ARG_LCDHEIGHT" ]; then
112 app_lcd_height=`input`
113 else
114 app_lcd_height="$ARG_LCDHEIGHT"
115 fi
Thomas Martitz240923a2010-08-02 20:34:47 +0000116 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
Dominik Riebeling26a92fa2011-06-04 10:36:34 +0000117 if [ $app_lcd_width -gt $app_lcd_height ]; then
118 lcd_orientation="landscape"
119 else
120 lcd_orientation="portrait"
121 fi
122 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)"
Teruaki Kawashima900ec8d2010-10-14 13:10:12 +0000123 ARG_LCDWIDTH=$app_lcd_width
124 ARG_LCDHEIGHT=$app_lcd_height
Thomas Martitz240923a2010-08-02 20:34:47 +0000125
126 app_lcd_width="#define LCD_WIDTH $app_lcd_width"
127 app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
Thomas Martitz240923a2010-08-02 20:34:47 +0000128}
129
Thomas Martitz45fc5ba2009-11-19 22:47:14 +0000130findarmgcc() {
Rafaël Carré05ebf792012-04-14 19:17:06 -0400131 prefixtools arm-elf-eabi-
132 gccchoice="4.4.4"
Thomas Martitz45fc5ba2009-11-19 22:47:14 +0000133}
134
Daniel Stenbergbea15892006-01-09 12:41:07 +0000135# scan the $PATH for the given command
136findtool(){
137 file="$1"
138
139 IFS=":"
140 for path in $PATH
141 do
142 # echo "checks for $file in $path" >&2
143 if test -f "$path/$file"; then
144 echo "$path/$file"
145 return
146 fi
147 done
Jens Arnold7433f842008-10-06 23:04:31 +0000148 # check whether caller wants literal return value if not found
149 if [ "$2" = "--lit" ]; then
150 echo "$file"
151 fi
Daniel Stenbergbea15892006-01-09 12:41:07 +0000152}
153
Jens Arnolddb2f0ed2010-04-05 15:47:12 +0000154# scan the $PATH for sdl-config - check whether for a (cross-)win32
155# sdl as requested
Jonas Häggqvistb285a772009-10-12 18:49:29 +0000156findsdl(){
Dominik Riebelinge6317d52011-09-08 17:48:18 +0000157 # sdl-config might (not) be prefixed for cross compiles so try both.
Thomas Martitz013cc9d2011-12-23 09:03:31 +0000158 files="${CROSS_COMPILE}sdl-config:sdl-config"
Jens Arnolddb2f0ed2010-04-05 15:47:12 +0000159 winbuild="$1"
Jonas Häggqvistb285a772009-10-12 18:49:29 +0000160
161 IFS=":"
Dominik Riebelinge6317d52011-09-08 17:48:18 +0000162 for file in $files
Jonas Häggqvistb285a772009-10-12 18:49:29 +0000163 do
Dominik Riebelinge6317d52011-09-08 17:48:18 +0000164 for path in $PATH
165 do
166 #echo "checks for $file in $path" >&2
167 if test -f "$path/$file"; then
168 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
169 if [ "yes" = "${winbuild}" ]; then
170 echo "$path/$file"
171 return
172 fi
173 else
174 if [ "yes" != "${winbuild}" ]; then
175 echo "$path/$file"
176 return
177 fi
Jens Arnolddb2f0ed2010-04-05 15:47:12 +0000178 fi
Jonas Häggqvistb285a772009-10-12 18:49:29 +0000179 fi
Dominik Riebelinge6317d52011-09-08 17:48:18 +0000180 done
Jonas Häggqvistb285a772009-10-12 18:49:29 +0000181 done
182}
183
Thomas Martitz6d85de32011-02-18 22:46:01 +0000184# check for availability of sigaltstack to support our thread engine
185check_sigaltstack() {
186 cat >$tmpdir/check_threads.c <<EOF
187#include <signal.h>
188int main(int argc, char **argv)
189{
Thomas Martitz1e391fb2011-02-18 23:17:07 +0000190#ifndef NULL
Thomas Martitz6d85de32011-02-18 22:46:01 +0000191 #define NULL (void*)0
Thomas Martitz1e391fb2011-02-18 23:17:07 +0000192#endif
Thomas Martitz6d85de32011-02-18 22:46:01 +0000193 sigaltstack(NULL, NULL);
194 return 0;
195}
196EOF
197 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 1> /dev/null
198 result=$?
199 rm -rf $tmpdir/check_threads*
200 echo $result
201}
202
203# check for availability of Fiber on Win32 to support our thread engine
204check_fiber() {
205 cat >$tmpdir/check_threads.c <<EOF
206#include <windows.h>
207int main(int argc, char **argv)
208{
209 ConvertThreadToFiber(NULL);
210 return 0;
211}
212EOF
213 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 2>/dev/null
214 result=$?
215 rm -rf $tmpdir/check_threads*
216 echo $result
217}
218
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000219simcc () {
220
221 # default tool setup for native building
Thomas Martitzefbc5df2010-06-05 17:09:04 +0000222 prefixtools "$CROSS_COMPILE"
Rafaël Carréb14c96d2010-06-11 12:16:15 +0000223 ARG_ARM_THUMB=0 # can't use thumb in native builds
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000224
Thomas Martitz3a3f4d62012-03-28 23:24:02 +0200225 # unset arch if already set shcc() and friends
226 arch=
227 arch_version=
228
Thomas Martitz57613ea2010-07-10 13:49:49 +0000229 app_type=$1
Rafaël Carré94eff152010-07-04 15:02:11 +0000230 winbuild=""
Thomas Jarosch949e6392012-01-03 22:33:47 +0000231 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
Thomas Jarosch949e6392012-01-03 22:33:47 +0000232
Thomas Martitz921ac8d2010-12-02 21:20:30 +0000233 GCCOPTS="$GCCOPTS -fno-builtin -g"
Frank Gevaerts9e9a9132009-10-07 14:31:16 +0000234 GCCOPTIMIZE=''
Thomas Martitzb18d76a2012-03-30 22:52:09 +0200235 LDOPTS="$LDOPTS -lm" # button-sdl.c uses sqrt()
Thomas Martitz6d85de32011-02-18 22:46:01 +0000236 sigaltstack=""
237 fibers=""
Thomas Martitzc00938e2011-12-23 09:13:36 +0000238 endian="" # endianess of the dap doesnt matter here
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000239
Thomas Martitz240923a2010-08-02 20:34:47 +0000240 # default output binary name, don't override app_get_platform()
241 if [ "$app_type" != "sdl-app" ]; then
242 output="rockboxui"
243 fi
Daniel Stenbergbea15892006-01-09 12:41:07 +0000244
Daniel Stenberg77854b72007-04-20 11:27:03 +0000245 # default share option, override below if needed
Nils Wallménius331b23d2011-06-07 11:56:23 +0000246 SHARED_LDFLAG="-shared"
247 SHARED_CFLAGS="-fPIC -fvisibility=hidden"
Daniel Stenberg77854b72007-04-20 11:27:03 +0000248
Rafaël Carré94eff152010-07-04 15:02:11 +0000249 if [ "$win32crosscompile" = "yes" ]; then
Thomas Martitz013cc9d2011-12-23 09:03:31 +0000250 # We are crosscompiling
251 # add cross-compiler option(s)
Rafaël Carré94eff152010-07-04 15:02:11 +0000252 LDOPTS="$LDOPTS -mconsole"
Thomas Martitz240923a2010-08-02 20:34:47 +0000253 output="$output.exe"
Rafaël Carré94eff152010-07-04 15:02:11 +0000254 winbuild="yes"
Thomas Martitz013cc9d2011-12-23 09:03:31 +0000255 CROSS_COMPILE=${CROSS_COMPILE:-"i586-mingw32msvc-"}
Andree Buschmanndc0abc72011-06-22 17:46:26 +0000256 SHARED_CFLAGS=''
Thomas Martitz013cc9d2011-12-23 09:03:31 +0000257 prefixtools "$CROSS_COMPILE"
258 fibers=`check_fiber`
259 endian="little" # windows is little endian
260 echo "Enabling MMX support"
261 GCCOPTS="$GCCOPTS -mmmx"
Rafaël Carré94eff152010-07-04 15:02:11 +0000262 else
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000263 case $uname in
264 CYGWIN*)
265 echo "Cygwin host detected"
Daniel Stenberg22b77012005-02-22 12:19:12 +0000266
Thomas Martitz6d85de32011-02-18 22:46:01 +0000267 fibers=`check_fiber`
Rafaël Carré033634f2010-06-24 20:58:07 +0000268 LDOPTS="$LDOPTS -mconsole"
Thomas Martitz240923a2010-08-02 20:34:47 +0000269 output="$output.exe"
Jens Arnolddb2f0ed2010-04-05 15:47:12 +0000270 winbuild="yes"
Andree Buschmanndc0abc72011-06-22 17:46:26 +0000271 SHARED_CFLAGS=''
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000272 ;;
273
Maurus Cuelenaeree8da4472009-02-04 20:59:27 +0000274 MINGW*)
275 echo "MinGW host detected"
276
Thomas Martitz6d85de32011-02-18 22:46:01 +0000277 fibers=`check_fiber`
Rafaël Carré033634f2010-06-24 20:58:07 +0000278 LDOPTS="$LDOPTS -mconsole"
Thomas Martitz240923a2010-08-02 20:34:47 +0000279 output="$output.exe"
Jens Arnolddb2f0ed2010-04-05 15:47:12 +0000280 winbuild="yes"
Maurus Cuelenaeree8da4472009-02-04 20:59:27 +0000281 ;;
282
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000283 Linux)
Thomas Martitz6d85de32011-02-18 22:46:01 +0000284 sigaltstack=`check_sigaltstack`
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000285 echo "Linux host detected"
Rafaël Carré033634f2010-06-24 20:58:07 +0000286 LDOPTS="$LDOPTS -ldl"
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000287 ;;
288
289 FreeBSD)
Thomas Martitz6d85de32011-02-18 22:46:01 +0000290 sigaltstack=`check_sigaltstack`
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000291 echo "FreeBSD host detected"
Kevin Zheng513914c2013-10-14 21:49:54 -0500292 LDOPTS="$LDOPTS"
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000293 ;;
294
Barry Wardell64f949f2006-09-29 16:15:11 +0000295 Darwin)
Thomas Martitz6d85de32011-02-18 22:46:01 +0000296 sigaltstack=`check_sigaltstack`
Barry Wardell64f949f2006-09-29 16:15:11 +0000297 echo "Darwin host detected"
Rafaël Carré033634f2010-06-24 20:58:07 +0000298 LDOPTS="$LDOPTS -ldl"
Nils Wallménius331b23d2011-06-07 11:56:23 +0000299 SHARED_LDFLAG="-dynamiclib -Wl\,-single_module"
Barry Wardell64f949f2006-09-29 16:15:11 +0000300 ;;
301
Jens Arnold43f23822010-03-20 08:57:47 +0000302 SunOS)
Thomas Martitz6d85de32011-02-18 22:46:01 +0000303 sigaltstack=`check_sigaltstack`
Jens Arnold43f23822010-03-20 08:57:47 +0000304 echo "*Solaris host detected"
Jens Arnoldb0126712010-04-05 16:07:39 +0000305
306 GCCOPTS="$GCCOPTS -fPIC"
Rafaël Carré033634f2010-06-24 20:58:07 +0000307 LDOPTS="$LDOPTS -ldl"
Jens Arnold43f23822010-03-20 08:57:47 +0000308 ;;
309
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000310 *)
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +0000311 echo "[ERROR] Unsupported system: $uname, fix configure and retry"
Jens Arnolddb2f0ed2010-04-05 15:47:12 +0000312 exit 1
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000313 ;;
314 esac
Rafaël Carré94eff152010-07-04 15:02:11 +0000315 fi
Greg White355be502007-01-13 02:24:15 +0000316
Thomas Martitz013cc9d2011-12-23 09:03:31 +0000317 if [ "$winbuild" != "yes" ]; then
318 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
319 if [ "`uname -m`" = "i686" ]; then
320 echo "Enabling MMX support"
321 GCCOPTS="$GCCOPTS -mmmx"
322 fi
323 fi
324
Jens Arnolddb2f0ed2010-04-05 15:47:12 +0000325 sdl=`findsdl $winbuild`
326
Thomas Martitz57613ea2010-07-10 13:49:49 +0000327 if [ -n `echo $app_type | grep "sdl"` ]; then
Jens Arnolddb2f0ed2010-04-05 15:47:12 +0000328 if [ -z "$sdl" ]; then
329 echo "configure didn't find sdl-config, which indicates that you"
330 echo "don't have SDL (properly) installed. Please correct and"
331 echo "re-run configure!"
332 exit 2
333 else
334 # generic sdl-config checker
Thomas Martitz36568ed2010-05-09 14:17:35 +0000335 GCCOPTS="$GCCOPTS `$sdl --cflags`"
Jens Arnolddb2f0ed2010-04-05 15:47:12 +0000336 LDOPTS="$LDOPTS `$sdl --libs`"
337 fi
338 fi
Thomas Martitz240923a2010-08-02 20:34:47 +0000339
Jens Arnolddb2f0ed2010-04-05 15:47:12 +0000340
Daniel Stenbergf6209cc2007-04-20 11:58:39 +0000341 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
Thomas Martitz013cc9d2011-12-23 09:03:31 +0000342 # x86_64 supports MMX by default
Daniel Stenbergf6209cc2007-04-20 11:58:39 +0000343
Thomas Martitz013cc9d2011-12-23 09:03:31 +0000344 if [ "$endian" = "" ]; then
345 id=$$
346 cat >$tmpdir/conftest-$id.c <<EOF
Daniel Stenberg6c38d852005-04-26 22:41:48 +0000347#include <stdio.h>
348int main(int argc, char **argv)
349{
Thomas Martitz013cc9d2011-12-23 09:03:31 +0000350int var=0;
351char *varp = (char *)&var;
352*varp=1;
Daniel Stenberg6c38d852005-04-26 22:41:48 +0000353
Thomas Martitz013cc9d2011-12-23 09:03:31 +0000354printf("%d\n", var);
355return 0;
Daniel Stenberg6c38d852005-04-26 22:41:48 +0000356}
357EOF
Thomas Martitz013cc9d2011-12-23 09:03:31 +0000358 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
359 # when cross compiling, the endianess cannot be detected because the above program doesn't run
360 # on the local machine. assume little endian but print a warning
361 endian=`$tmpdir/conftest-$id 2> /dev/null`
362 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
363 # big endian
364 endian="big"
365 else
366 # little endian
367 endian="little"
368 fi
369 fi
Daniel Stenberg6c38d852005-04-26 22:41:48 +0000370
Thomas Martitz013cc9d2011-12-23 09:03:31 +0000371 if [ "$CROSS_COMPILE" != "" ]; then
372 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!"
Daniel Stenberg6c38d852005-04-26 22:41:48 +0000373 fi
Thomas Martitz6d85de32011-02-18 22:46:01 +0000374
Thomas Martitz013cc9d2011-12-23 09:03:31 +0000375 if [ "$app_type" = "sdl-sim" ]; then
376 echo "Simulator environment deemed $endian endian"
377 elif [ "$app_type" = "sdl-app" ]; then
378 echo "Application environment deemed $endian endian"
379 elif [ "$app_type" = "checkwps" ]; then
380 echo "CheckWPS environment deemed $endian endian"
381 fi
382
383 # use wildcard here to make it work even if it was named *.exe like
384 # on cygwin
385 rm -f $tmpdir/conftest-$id*
386
Thomas Martitz6d85de32011-02-18 22:46:01 +0000387 thread_support=
388 if [ -z "$ARG_THREAD_SUPPORT" ] || [ "$ARG_THREAD_SUPPORT" = "0" ]; then
389 if [ "$sigaltstack" = "0" ]; then
390 thread_support="HAVE_SIGALTSTACK_THREADS"
Thomas Martitz66643cf2011-02-19 02:19:04 +0000391 LDOPTS="$LDOPTS -lpthread" # pthread needed
Thomas Martitz6d85de32011-02-18 22:46:01 +0000392 echo "Selected sigaltstack threads"
393 elif [ "$fibers" = "0" ]; then
394 thread_support="HAVE_WIN32_FIBER_THREADS"
395 echo "Selected Win32 Fiber threads"
396 fi
397 fi
398
399 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \
400 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then
401 thread_support="HAVE_SDL_THREADS"
402 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then
403 echo "Selected SDL threads"
404 else
405 echo "WARNING: Falling back to SDL threads"
406 fi
407 fi
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000408}
409
Daniel Stenberg9e8e2702008-02-27 21:37:48 +0000410#
411# functions for setting up cross-compiler names and options
412# also set endianess and what the exact recommended gcc version is
413# the gcc version should most likely match what versions we build with
414# rockboxdev.sh
415#
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000416shcc () {
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000417 prefixtools sh-elf-
Daniel Stenberg235b50b2004-10-04 13:02:41 +0000418 GCCOPTS="$CCOPTS -m1"
Linus Nielsen Feltzingc21e7e72004-10-07 07:08:57 +0000419 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
Daniel Stenberg6c38d852005-04-26 22:41:48 +0000420 endian="big"
Daniel Stenberg9e8e2702008-02-27 21:37:48 +0000421 gccchoice="4.0.3"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000422}
423
Daniel Stenberg72fdf372005-01-04 15:00:06 +0000424calmrisccc () {
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000425 prefixtools calmrisc16-unknown-elf-
Jean-Philippe Bernardydd4ea292005-02-10 22:37:09 +0000426 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
Daniel Stenberg72fdf372005-01-04 15:00:06 +0000427 GCCOPTIMIZE="-fomit-frame-pointer"
Daniel Stenberg6c38d852005-04-26 22:41:48 +0000428 endian="big"
Daniel Stenberg72fdf372005-01-04 15:00:06 +0000429}
430
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000431coldfirecc () {
Daniel Stenbergcdde25b2005-02-18 13:47:17 +0000432 prefixtools m68k-elf-
Nils Wallméniusc8535f22011-01-12 22:28:43 +0000433 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align"
Linus Nielsen Feltzingc21e7e72004-10-07 07:08:57 +0000434 GCCOPTIMIZE="-fomit-frame-pointer"
Daniel Stenberg6c38d852005-04-26 22:41:48 +0000435 endian="big"
Nils Wallméniusc8535f22011-01-12 22:28:43 +0000436 gccchoice="4.5.2"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000437}
438
Dave Chapman38e8fb62005-11-08 00:52:39 +0000439arm7tdmicc () {
Thomas Martitz45fc5ba2009-11-19 22:47:14 +0000440 findarmgcc
Tomasz Malesinski17972c92006-08-12 22:46:34 +0000441 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
Dave Chapman38e8fb62005-11-08 00:52:39 +0000442 GCCOPTIMIZE="-fomit-frame-pointer"
443 endian="little"
444}
445
Marcoen Hirschberg338e2bb2006-02-24 15:42:52 +0000446arm9tdmicc () {
Thomas Martitz45fc5ba2009-11-19 22:47:14 +0000447 findarmgcc
Michael Sevakisca078732009-02-10 09:27:20 +0000448 GCCOPTS="$CCOPTS -mcpu=arm9tdmi"
Marcoen Hirschberg338e2bb2006-02-24 15:42:52 +0000449 GCCOPTIMIZE="-fomit-frame-pointer"
450 endian="little"
451}
452
Marcoen Hirschberg7b10ef92008-06-27 23:24:34 +0000453arm940tbecc () {
Thomas Martitz45fc5ba2009-11-19 22:47:14 +0000454 findarmgcc
Andrew Mahone9656bc92009-11-20 02:51:23 +0000455 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t"
Marcoen Hirschberg7b10ef92008-06-27 23:24:34 +0000456 GCCOPTIMIZE="-fomit-frame-pointer"
457 endian="big"
Marcoen Hirschberg7b10ef92008-06-27 23:24:34 +0000458}
459
Dave Chapmanafe43d32009-07-12 22:16:51 +0000460arm940tcc () {
Thomas Martitz45fc5ba2009-11-19 22:47:14 +0000461 findarmgcc
Andrew Mahone9656bc92009-11-20 02:51:23 +0000462 GCCOPTS="$CCOPTS -mcpu=arm940t"
Dave Chapmanafe43d32009-07-12 22:16:51 +0000463 GCCOPTIMIZE="-fomit-frame-pointer"
464 endian="little"
Dave Chapmanafe43d32009-07-12 22:16:51 +0000465}
466
Dave Chapman28f6ae42007-10-28 11:08:10 +0000467arm946cc () {
Thomas Martitz45fc5ba2009-11-19 22:47:14 +0000468 findarmgcc
Andrew Mahone9656bc92009-11-20 02:51:23 +0000469 GCCOPTS="$CCOPTS -mcpu=arm9e"
Dave Chapman28f6ae42007-10-28 11:08:10 +0000470 GCCOPTIMIZE="-fomit-frame-pointer"
471 endian="little"
Daniel Stenberg65068e22008-02-18 19:08:29 +0000472}
473
Karl Kurbjunb8ddc612007-11-13 04:09:25 +0000474arm926ejscc () {
Thomas Martitz45fc5ba2009-11-19 22:47:14 +0000475 findarmgcc
Andrew Mahone9656bc92009-11-20 02:51:23 +0000476 GCCOPTS="$CCOPTS -mcpu=arm926ej-s"
Karl Kurbjunb8ddc612007-11-13 04:09:25 +0000477 GCCOPTIMIZE="-fomit-frame-pointer"
478 endian="little"
479}
480
Nils Wallménius7b8f4a52008-02-10 17:40:06 +0000481arm1136jfscc () {
Thomas Martitz45fc5ba2009-11-19 22:47:14 +0000482 findarmgcc
Michael Sevakisca078732009-02-10 09:27:20 +0000483 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s"
Nils Wallménius7b8f4a52008-02-10 17:40:06 +0000484 GCCOPTIMIZE="-fomit-frame-pointer"
485 endian="little"
486}
487
Robert Keevileea149b2009-07-13 21:09:39 +0000488arm1176jzscc () {
Thomas Martitz45fc5ba2009-11-19 22:47:14 +0000489 findarmgcc
Andrew Mahone9656bc92009-11-20 02:51:23 +0000490 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s"
Robert Keevileea149b2009-07-13 21:09:39 +0000491 GCCOPTIMIZE="-fomit-frame-pointer"
492 endian="little"
Robert Keevileea149b2009-07-13 21:09:39 +0000493}
494
Marcin Bukat976a1692011-05-30 21:10:37 +0000495arm7ejscc () {
496 findarmgcc
497 GCCOPTS="$CCOPTS -march=armv5te"
498 GCCOPTIMIZE="-fomit-frame-pointer"
499 endian="little"
500}
501
Maurus Cuelenaere0709f0a2008-07-14 15:03:10 +0000502mipselcc () {
Maurus Cuelenaereb89ee322008-07-30 08:28:35 +0000503 prefixtools mipsel-elf-
Thomas Martitz3478bc52010-08-24 13:41:45 +0000504 # mips is predefined, but we want it for paths. use __mips instead
505 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
Maurus Cuelenaere29c87a72009-05-30 16:13:42 +0000506 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses"
Maurus Cuelenaere0709f0a2008-07-14 15:03:10 +0000507 GCCOPTIMIZE="-fomit-frame-pointer"
Maurus Cuelenaere0709f0a2008-07-14 15:03:10 +0000508 endian="little"
509 gccchoice="4.1.2"
510}
511
Thomas Jarosch5f037ac2011-02-08 20:05:25 +0000512maemocc () {
513 # Scratchbox sets up "gcc" based on the active target
514 prefixtools ""
515
516 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
517 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
518 GCCOPTIMIZE=''
519 LDOPTS="-lm -ldl $LDOPTS"
520 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
Nils Wallménius331b23d2011-06-07 11:56:23 +0000521 SHARED_LDFLAG="-shared"
522 SHARED_CFLAGS=''
Thomas Jarosch5f037ac2011-02-08 20:05:25 +0000523 endian="little"
Thomas Jarosch6cbb0e42011-02-19 00:50:12 +0000524 thread_support="HAVE_SIGALTSTACK_THREADS"
Thomas Jarosch5f037ac2011-02-08 20:05:25 +0000525
526 is_n900=0
527 # Determine maemo version
528 if pkg-config --atleast-version=5 maemo-version; then
Dave Chapman9e638c72011-02-11 19:51:29 +0000529 if [ "$1" == "4" ]; then
530 echo "ERROR: Maemo 4 SDK required."
531 exit 1
532 fi
Thomas Jarosch5f037ac2011-02-08 20:05:25 +0000533 extradefines="$extradefines -DMAEMO5"
534 echo "Found N900 maemo version"
535 is_n900=1
536 elif pkg-config --atleast-version=4 maemo-version; then
Dave Chapman9e638c72011-02-11 19:51:29 +0000537 if [ "$1" == "5" ]; then
538 echo "ERROR: Maemo 5 SDK required."
539 exit 1
540 fi
Thomas Jarosch5f037ac2011-02-08 20:05:25 +0000541 extradefines="$extradefines -DMAEMO4"
542 echo "Found N8xx maemo version"
543 else
544 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?"
545 exit 1
546 fi
547
548 # SDL
Thomas Jaroschfb790be2011-02-13 11:57:32 +0000549 if [ $is_n900 -eq 1 ]; then
550 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`"
551 LDOPTS="$LDOPTS `pkg-config --libs sdl`"
552 else
553 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
554 LDOPTS="$LDOPTS `sdl-config --libs`"
555 fi
Thomas Jarosch5f037ac2011-02-08 20:05:25 +0000556
557 # glib and libosso support
558 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`"
559 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`"
560
561 # libhal support: Battery monitoring
562 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`"
563 LDOPTS="$LDOPTS `pkg-config --libs hal`"
564
565 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
566 if [ $is_n900 -eq 1 ]; then
567 # gstreamer support: Audio output.
568 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
569 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`"
570
571 # N900 specific: libplayback support
572 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`"
573 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`"
574
575 # N900 specific: Enable ARMv7 NEON support
Thomas Jaroschcc895b52011-02-27 19:58:38 +0000576 if sb-conf show -A |grep -q -i arm; then
577 echo "Detected ARM target"
Thomas Jarosch5f037ac2011-02-08 20:05:25 +0000578 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
579 extradefines="$extradefines -DMAEMO_ARM_BUILD"
Thomas Jaroschcc895b52011-02-27 19:58:38 +0000580 else
581 echo "Detected x86 target"
Thomas Jarosch5f037ac2011-02-08 20:05:25 +0000582 fi
583 else
584 # N8xx specific: Enable armv5te instructions
Thomas Jaroschcc895b52011-02-27 19:58:38 +0000585 if sb-conf show -A |grep -q -i arm; then
586 echo "Detected ARM target"
Thomas Jarosch5f037ac2011-02-08 20:05:25 +0000587 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp"
588 extradefines="$extradefines -DMAEMO_ARM_BUILD"
Thomas Jaroschcc895b52011-02-27 19:58:38 +0000589 else
590 echo "Detected x86 target"
Thomas Jarosch5f037ac2011-02-08 20:05:25 +0000591 fi
592 fi
593}
594
Thomas Jarosch6e9e6a72011-02-27 23:42:37 +0000595pandoracc () {
596 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox.
597 # You have to use the sebt3 toolchain:
598 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/
599
600 PNDSDK="/usr/local/angstrom/arm"
601 if [ ! -x $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc ]; then
602 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc"
603 exit
604 fi
605
606 PATH=$PNDSDK/bin:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi/usr/bin
607 PKG_CONFIG_PATH=$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib/pkgconfig
608 LDOPTS="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS"
609 PKG_CONFIG="pkg-config"
610
611 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
612 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)"
613 GCCOPTIMIZE=''
614 LDOPTS="-lm -ldl $LDOPTS"
615 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
Nils Wallménius331b23d2011-06-07 11:56:23 +0000616 SHARED_LDFLAG="-shared"
617 SHARED_CFLAGS=''
Thomas Jarosch6e9e6a72011-02-27 23:42:37 +0000618 endian="little"
619 thread_support="HAVE_SIGALTSTACK_THREADS"
620
621 # Include path
Thomas Jaroschc0c5a132011-12-10 19:23:51 +0000622 GCCOPTS="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include"
Thomas Jarosch6e9e6a72011-02-27 23:42:37 +0000623
624 # Set up compiler
625 gccchoice="4.3.3"
626 prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-"
627
628 # Detect SDL
Thomas Jarosch0f440d12011-03-13 12:46:59 +0000629 GCCOPTS="$GCCOPTS `$PNDSDK/bin/sdl-config --cflags`"
630 LDOPTS="$LDOPTS `$PNDSDK/bin/sdl-config --libs`"
Thomas Jarosch6e9e6a72011-02-27 23:42:37 +0000631
632 # Compiler options
633 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing"
634 GCCOPTS="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
635 GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant"
636}
637
Thomas Martitz249bba02011-12-24 11:56:46 +0000638ypr0cc () {
639
640 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//`
641 GCCOPTIMIZE=''
642 LDOPTS="-lasound -lpthread -lm -ldl -lrt $LDOPTS"
643 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
644 SHARED_LDFLAG="-shared"
645 SHARED_CFLAGS=''
646 endian="little"
Thomas Martitz249bba02011-12-24 11:56:46 +0000647 app_type="ypr0"
648
649 # Include path
650 GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT"
651
652 # Set up compiler
653 gccchoice="4.4.6"
654 prefixtools "arm-ypr0-linux-gnueabi-"
655}
656
Thomas Martitz240923a2010-08-02 20:34:47 +0000657androidcc () {
Dave Chapman9e638c72011-02-11 19:51:29 +0000658 if [ -z "$ANDROID_SDK_PATH" ]; then
659 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
660 echo "environment variable point to the root directory of the Android SDK."
661 exit
662 fi
663 if [ -z "$ANDROID_NDK_PATH" ]; then
664 echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
665 echo "environment variable point to the root directory of the Android NDK."
666 exit
667 fi
Dominik Riebelinge9eb5b32011-09-02 21:28:25 +0000668 buildhost=$(uname | tr "[:upper:]" "[:lower:]")
Thomas Martitz8e3c77d2012-11-06 09:25:36 +0100669 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
Thomas Martitz48572c62012-11-06 11:39:49 +0100670 LDOPTS="$LDOPTS -Wl,-soname,librockbox.so -shared -ldl -llog"
671 GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack -shared"
Thomas Martitz8e3c77d2012-11-06 09:25:36 +0100672 ANDROID_ARCH=$1 # for android.make too
673 # arch dependant stuff
674 case $ANDROID_ARCH in
675 armeabi)
676 endian="little"
677 gccchoice="4.4.3"
678 gcctarget="arm-linux-androideabi-"
Thomas Martitz6242d9f2012-11-07 23:29:54 +0100679 # sigaltstack is not available in pre-android-9, however asm
680 # threads work fine so far
681 thread_support="ASSEMBLER_THREADS"
Thomas Martitz8e3c77d2012-11-06 09:25:36 +0100682 GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \
683 --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
684 LDOPTS="$LDOPTS --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm"
685 ;;
686 mips)
687 endian="little"
688 gccchoice="4.4.3"
689 gcctarget="mipsel-linux-android-"
Thomas Martitz6242d9f2012-11-07 23:29:54 +0100690 thread_support="HAVE_SIGALTSTACK_THREADS"
Thomas Martitz8e3c77d2012-11-06 09:25:36 +0100691 GCCOPTS="$GCCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -fomit-frame-pointer \
692 --sysroot=$ANDROID_NDK_PATH/platforms/android-14/arch-mips -fPIC"
693 LDOPTS="$LDOPTS --sysroot=$ANDROID_NDK_PATH/platforms/android-14/arch-mips"
694 ;;
Thomas Martitz48572c62012-11-06 11:39:49 +0100695 x86)
696 endian=little
697 gccchoice="4.4.3"
698 gcctarget="i686-linux-android-"
699 gccdir=x86-$gccchoice
Thomas Martitz6242d9f2012-11-07 23:29:54 +0100700 thread_support="HAVE_SIGALTSTACK_THREADS"
Thomas Martitz48572c62012-11-06 11:39:49 +0100701 GCCOPTS="$GCCOPTS -Wa,--noexecstack -ffunction-sections -fomit-frame-pointer\
702 --sysroot=$ANDROID_NDK_PATH/platforms/android-9/arch-x86"
703 LDOPTS="$LDOPTS --sysroot=$ANDROID_NDK_PATH/platforms/android-9/arch-x86"
704 ;;
Thomas Martitz8e3c77d2012-11-06 09:25:36 +0100705 *)
706 echo "ERROR: androidcc(): Unknown target architecture"
707 exit
708 ;;
709 esac
710 echo "Application environment deemed $endian endian"
Thomas Martitz48572c62012-11-06 11:39:49 +0100711 if [ -z "$gccdir" ]; then
712 gccdir=$gcctarget$gccchoice
713 fi
Bryan Childs1489fa32013-04-26 20:26:40 +0100714 if [ -d $ANDROID_NDK_PATH/toolchains/$gccdir/prebuilt/$buildhost-x86 ]; then
715 gccprefix=$ANDROID_NDK_PATH/toolchains/$gccdir/prebuilt/$buildhost-x86
716 else
717 gccprefix=$ANDROID_NDK_PATH/toolchains/$gccdir/prebuilt/$buildhost-x86_64
718 fi
Dominik Riebeling4f787ba2011-01-23 22:09:44 +0000719 PATH=$PATH:$gccprefix/bin
720 prefixtools $gcctarget
Thomas Martitz240923a2010-08-02 20:34:47 +0000721}
722
Robert Kuklaba366a02007-03-03 00:36:54 +0000723whichadvanced () {
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +0000724 atype=`echo "$1" | cut -c 2-`
Daniel Stenbergedc07922005-05-30 13:00:43 +0000725 ##################################################################
726 # Prompt for specific developer options
727 #
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +0000728 if [ "$atype" ]; then
729 interact=
730 else
731 interact=1
732 echo ""
Thomas Martitzf32bd592010-06-22 18:34:03 +0000733 printf "Enter your developer options (press only enter when done)\n\
734(D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
Ralf Ertzingerd2f97da2011-09-09 12:28:36 +0200735(T)est plugins, S(m)all C lib, Logf to Ser(i)al port:"
Björn Stenbergc0740442009-12-07 12:19:08 +0000736 if [ "$modelname" = "archosplayer" ]; then
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +0000737 printf ", Use (A)TA poweroff"
738 fi
739 if [ "$t_model" = "ondio" ]; then
740 printf ", (B)acklight MOD"
741 fi
Björn Stenbergc0740442009-12-07 12:19:08 +0000742 if [ "$modelname" = "iaudiom5" ]; then
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +0000743 printf ", (F)M radio MOD"
744 fi
Björn Stenbergc0740442009-12-07 12:19:08 +0000745 if [ "$modelname" = "iriverh120" ]; then
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +0000746 printf ", (R)TC MOD"
747 fi
748 echo ""
Robert Kuklaba366a02007-03-03 00:36:54 +0000749 fi
Robert Kuklaba366a02007-03-03 00:36:54 +0000750
Daniel Stenbergedc07922005-05-30 13:00:43 +0000751 cont=1
Daniel Stenbergedc07922005-05-30 13:00:43 +0000752 while [ $cont = "1" ]; do
753
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +0000754 if [ "$interact" ]; then
755 option=`input`
756 else
757 option=`echo "$atype" | cut -c 1`
758 fi
Daniel Stenbergedc07922005-05-30 13:00:43 +0000759
760 case $option in
761 [Dd])
Brandon Low05dccc32006-01-18 20:54:13 +0000762 if [ "yes" = "$profile" ]; then
763 echo "Debug is incompatible with profiling"
764 else
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +0000765 echo "DEBUG build enabled"
Brandon Low05dccc32006-01-18 20:54:13 +0000766 use_debug="yes"
767 fi
Daniel Stenbergedc07922005-05-30 13:00:43 +0000768 ;;
769 [Ll])
Daniel Stenbergedc07922005-05-30 13:00:43 +0000770 echo "logf() support enabled"
Brandon Low05dccc32006-01-18 20:54:13 +0000771 logf="yes"
Daniel Stenbergedc07922005-05-30 13:00:43 +0000772 ;;
Thomas Martitzf32bd592010-06-22 18:34:03 +0000773 [Mm])
774 echo "Using Rockbox' small C library"
775 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY"
776 ;;
Thomas Martitzc06a23d2010-04-05 16:09:47 +0000777 [Tt])
778 echo "Including test plugins"
779 extradefines="$extradefines -DHAVE_TEST_PLUGINS"
780 ;;
Torne Wuff4e5f9482010-04-02 14:19:22 +0000781 [Cc])
Ralf Ertzingerd2f97da2011-09-09 12:28:36 +0200782 echo "bootchart enabled (logf also enabled)"
Torne Wuff52e528e2010-04-01 16:27:21 +0000783 bootchart="yes"
784 logf="yes"
785 ;;
Ralf Ertzingerd2f97da2011-09-09 12:28:36 +0200786 [Ii])
787 echo "Logf to serial port enabled (logf also enabled)"
788 logf="yes"
789 logf_serial="yes"
790 ;;
Daniel Stenbergedc07922005-05-30 13:00:43 +0000791 [Ss])
792 echo "Simulator build enabled"
793 simulator="yes"
794 ;;
Brandon Low05dccc32006-01-18 20:54:13 +0000795 [Pp])
796 if [ "yes" = "$use_debug" ]; then
797 echo "Profiling is incompatible with debug"
798 else
799 echo "Profiling support is enabled"
800 profile="yes"
801 fi
802 ;;
Jonas Häggqvist0ed6fad2007-08-08 22:01:06 +0000803 [Vv])
804 echo "Voice build selected"
805 voice="yes"
806 ;;
Jens Arnoldb76faec2009-06-20 18:37:29 +0000807 [Aa])
Björn Stenbergc0740442009-12-07 12:19:08 +0000808 if [ "$modelname" = "archosplayer" ]; then
Jens Arnoldbeca69b2010-04-11 16:07:36 +0000809 have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
810 echo "ATA power off enabled"
Jens Arnoldb76faec2009-06-20 18:37:29 +0000811 fi
812 ;;
Jens Arnold81b87fe2009-06-12 18:53:44 +0000813 [Bb])
814 if [ "$t_model" = "ondio" ]; then
815 have_backlight="#define HAVE_BACKLIGHT"
816 echo "Backlight functions enabled"
Jens Arnold81b87fe2009-06-12 18:53:44 +0000817 fi
818 ;;
819 [Ff])
Björn Stenbergc0740442009-12-07 12:19:08 +0000820 if [ "$modelname" = "iaudiom5" ]; then
Jens Arnold81b87fe2009-06-12 18:53:44 +0000821 have_fmradio_in="#define HAVE_FMRADIO_IN"
822 echo "FM radio functions enabled"
Jens Arnold81b87fe2009-06-12 18:53:44 +0000823 fi
824 ;;
Robert Kuklaba366a02007-03-03 00:36:54 +0000825 [Rr])
Björn Stenbergc0740442009-12-07 12:19:08 +0000826 if [ "$modelname" = "iriverh120" ]; then
Robert Kuklaba366a02007-03-03 00:36:54 +0000827 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
828 have_rtc_alarm="#define HAVE_RTC_ALARM"
829 echo "RTC functions enabled (DS1339/DS3231)"
Robert Kuklaba366a02007-03-03 00:36:54 +0000830 fi
831 ;;
Jonas Häggqvistb285a772009-10-12 18:49:29 +0000832 [Ww])
833 echo "Enabling Windows 32 cross-compiling"
Rafaël Carré94eff152010-07-04 15:02:11 +0000834 win32crosscompile="yes"
Jonas Häggqvistb285a772009-10-12 18:49:29 +0000835 ;;
Nils Wallménius1aaaa9e2010-07-31 14:52:56 +0000836 "") # Match enter press when finished with advanced options
837 cont=0
838 ;;
Daniel Stenbergedc07922005-05-30 13:00:43 +0000839 *)
Nils Wallménius1aaaa9e2010-07-31 14:52:56 +0000840 echo "[ERROR] Option $option unsupported"
Daniel Stenbergedc07922005-05-30 13:00:43 +0000841 ;;
Greg White355be502007-01-13 02:24:15 +0000842 esac
Jens Arnoldb5ca4892009-12-25 18:33:47 +0000843 if [ "$interact" ]; then
844 btype="$btype$option"
845 else
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +0000846 atype=`echo "$atype" | cut -c 2-`
847 [ "$atype" ] || cont=0
848 fi
Daniel Stenbergedc07922005-05-30 13:00:43 +0000849 done
Robert Kuklaba366a02007-03-03 00:36:54 +0000850 echo "done"
Daniel Stenbergedc07922005-05-30 13:00:43 +0000851
Jonas Häggqvist0ed6fad2007-08-08 22:01:06 +0000852 if [ "yes" = "$voice" ]; then
Jonas Häggqvist58537b42007-08-13 12:21:16 +0000853 # Ask about languages to build
Jonas Häggqvist58537b42007-08-13 12:21:16 +0000854 picklang
855 voicelanguage=`whichlang`
Jonas Häggqvist58537b42007-08-13 12:21:16 +0000856 echo "Voice language set to $voicelanguage"
857
858 # Configure encoder and TTS engine for each language
859 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
860 voiceconfig "$thislang"
861 done
Jonas Häggqvist0ed6fad2007-08-08 22:01:06 +0000862 fi
Brandon Low05dccc32006-01-18 20:54:13 +0000863 if [ "yes" = "$use_debug" ]; then
864 debug="-DDEBUG"
865 GCCOPTS="$GCCOPTS -g -DDEBUG"
866 fi
867 if [ "yes" = "$logf" ]; then
868 use_logf="#define ROCKBOX_HAS_LOGF 1"
869 fi
Ralf Ertzingerd2f97da2011-09-09 12:28:36 +0200870 if [ "yes" = "$logf_serial" ]; then
871 use_logf_serial="#define LOGF_SERIAL 1"
872 fi
Torne Wuff52e528e2010-04-01 16:27:21 +0000873 if [ "yes" = "$bootchart" ]; then
874 use_bootchart="#define DO_BOOTCHART 1"
875 fi
Daniel Stenbergedc07922005-05-30 13:00:43 +0000876 if [ "yes" = "$simulator" ]; then
Linus Nielsen Feltzingdfb00152005-08-30 21:21:06 +0000877 debug="-DDEBUG"
Rafaël Carréb4ca2442013-06-13 18:42:29 +0200878 extradefines="$extradefines -DSIMULATOR -DHAVE_TEST_PLUGINS"
Boris Gjeneroc164b862009-04-21 16:13:00 +0000879 archosrom=""
880 flash=""
Daniel Stenbergedc07922005-05-30 13:00:43 +0000881 fi
Brandon Low05dccc32006-01-18 20:54:13 +0000882 if [ "yes" = "$profile" ]; then
883 extradefines="$extradefines -DRB_PROFILE"
884 PROFILE_OPTS="-finstrument-functions"
Brandon Low05dccc32006-01-18 20:54:13 +0000885 fi
Daniel Stenbergedc07922005-05-30 13:00:43 +0000886}
887
Jonas Häggqvist58537b42007-08-13 12:21:16 +0000888# Configure voice settings
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000889voiceconfig () {
Jonas Häggqvist58537b42007-08-13 12:21:16 +0000890 thislang=$1
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +0000891 if [ ! "$ARG_TTS" ]; then
892 echo "Building $thislang voice for $modelname. Select options"
893 echo ""
894 fi
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000895
Jens Arnold56fa6ae2008-10-08 23:18:23 +0000896 if [ -n "`findtool flite`" ]; then
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000897 FLITE="F(l)ite "
Jonas Häggqvist17e03e72007-08-25 22:00:13 +0000898 FLITE_OPTS=""
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000899 DEFAULT_TTS="flite"
900 DEFAULT_TTS_OPTS=$FLITE_OPTS
901 DEFAULT_NOISEFLOOR="500"
Jens Arnold334e6122012-01-08 13:59:15 +0000902 DEFAULT_CHOICE="l"
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000903 fi
Jens Arnold56fa6ae2008-10-08 23:18:23 +0000904 if [ -n "`findtool espeak`" ]; then
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000905 ESPEAK="(e)Speak "
Jonas Häggqvist17e03e72007-08-25 22:00:13 +0000906 ESPEAK_OPTS=""
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000907 DEFAULT_TTS="espeak"
908 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
909 DEFAULT_NOISEFLOOR="500"
910 DEFAULT_CHOICE="e"
911 fi
Jens Arnold56fa6ae2008-10-08 23:18:23 +0000912 if [ -n "`findtool festival`" ]; then
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000913 FESTIVAL="(F)estival "
Jonas Häggqvist17e03e72007-08-25 22:00:13 +0000914 case "$thislang" in
915 "italiano")
916 FESTIVAL_OPTS="--language italian"
917 ;;
918 "espanol")
919 FESTIVAL_OPTS="--language spanish"
920 ;;
921 "finnish")
922 FESTIVAL_OPTS="--language finnish"
923 ;;
924 "czech")
925 FESTIVAL_OPTS="--language czech"
926 ;;
927 *)
928 FESTIVAL_OPTS=""
929 ;;
930 esac
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000931 DEFAULT_TTS="festival"
932 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
933 DEFAULT_NOISEFLOOR="500"
Jens Arnold334e6122012-01-08 13:59:15 +0000934 DEFAULT_CHOICE="f"
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000935 fi
Jens Arnold56fa6ae2008-10-08 23:18:23 +0000936 if [ -n "`findtool swift`" ]; then
Jonas Häggqvist005699f2007-09-01 20:03:20 +0000937 SWIFT="S(w)ift "
938 SWIFT_OPTS=""
939 DEFAULT_TTS="swift"
940 DEFAULT_TTS_OPTS=$SWIFT_OPTS
941 DEFAULT_NOISEFLOOR="500"
942 DEFAULT_CHOICE="w"
943 fi
Steve Bavin6bc7da72007-08-09 12:07:42 +0000944 # Allow SAPI if Windows is in use
Jens Arnold56fa6ae2008-10-08 23:18:23 +0000945 if [ -n "`findtool winver`" ]; then
Jens Arnold5dbea462007-09-02 22:32:34 +0000946 SAPI="(S)API "
947 SAPI_OPTS=""
948 DEFAULT_TTS="sapi"
949 DEFAULT_TTS_OPTS=$SAPI_OPTS
Steve Bavin6bc7da72007-08-09 12:07:42 +0000950 DEFAULT_NOISEFLOOR="500"
Jens Arnold334e6122012-01-08 13:59:15 +0000951 DEFAULT_CHOICE="s"
Steve Bavin6bc7da72007-08-09 12:07:42 +0000952 fi
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000953
Jens Arnold5dbea462007-09-02 22:32:34 +0000954 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
955 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
Jonas Häggqvistea5457c2008-12-11 17:24:04 +0000956 exit 3
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000957 fi
958
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +0000959 if [ "$ARG_TTS" ]; then
960 option=$ARG_TTS
961 else
962 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
963 option=`input`
Jens Arnold334e6122012-01-08 13:59:15 +0000964 if [ -z "$option" ]; then option=${DEFAULT_CHOICE}; fi
965 advopts="$advopts --tts=$option"
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +0000966 fi
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000967 case "$option" in
968 [Ll])
969 TTS_ENGINE="flite"
970 NOISEFLOOR="500" # TODO: check this value
971 TTS_OPTS=$FLITE_OPTS
972 ;;
973 [Ee])
974 TTS_ENGINE="espeak"
975 NOISEFLOOR="500"
976 TTS_OPTS=$ESPEAK_OPTS
977 ;;
978 [Ff])
979 TTS_ENGINE="festival"
980 NOISEFLOOR="500"
981 TTS_OPTS=$FESTIVAL_OPTS
982 ;;
Steve Bavin6bc7da72007-08-09 12:07:42 +0000983 [Ss])
Jens Arnold5dbea462007-09-02 22:32:34 +0000984 TTS_ENGINE="sapi"
Steve Bavin6bc7da72007-08-09 12:07:42 +0000985 NOISEFLOOR="500"
Jens Arnold5dbea462007-09-02 22:32:34 +0000986 TTS_OPTS=$SAPI_OPTS
Steve Bavin6bc7da72007-08-09 12:07:42 +0000987 ;;
Jonas Häggqvist005699f2007-09-01 20:03:20 +0000988 [Ww])
989 TTS_ENGINE="swift"
990 NOISEFLOOR="500"
991 TTS_OPTS=$SWIFT_OPTS
992 ;;
Jonas Häggqvistda071d02006-11-03 21:47:52 +0000993 *)
994 TTS_ENGINE=$DEFAULT_TTS
995 TTS_OPTS=$DEFAULT_TTS_OPTS
996 NOISEFLOOR=$DEFAULT_NOISEFLOOR
997 esac
998 echo "Using $TTS_ENGINE for TTS"
Greg White355be502007-01-13 02:24:15 +0000999
Jonas Häggqvist839bcdf2009-03-02 21:36:48 +00001000 # Select which voice to use for Festival
1001 if [ "$TTS_ENGINE" = "festival" ]; then
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001002 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort`
1003 for voice in $voicelist; do
1004 TTS_FESTIVAL_VOICE="$voice" # Default choice
1005 break
Jonas Häggqvist839bcdf2009-03-02 21:36:48 +00001006 done
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001007 if [ "$ARG_VOICE" ]; then
1008 CHOICE=$ARG_VOICE
1009 else
1010 i=1
1011 for voice in $voicelist; do
1012 printf "%3d. %s\n" "$i" "$voice"
1013 i=`expr $i + 1`
1014 done
1015 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): "
1016 CHOICE=`input`
1017 fi
Jonas Häggqvist839bcdf2009-03-02 21:36:48 +00001018 i=1
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001019 for voice in $voicelist; do
Jonas Häggqvist839bcdf2009-03-02 21:36:48 +00001020 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then
1021 TTS_FESTIVAL_VOICE="$voice"
1022 fi
1023 i=`expr $i + 1`
1024 done
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001025 advopts="$advopts --voice=$CHOICE"
Jonas Häggqvist839bcdf2009-03-02 21:36:48 +00001026 echo "Festival voice set to $TTS_FESTIVAL_VOICE"
1027 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm
1028 fi
1029
Björn Stenbergf5ef0b92009-12-08 10:24:59 +00001030 # Read custom tts options from command line
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001031 if [ "$ARG_TTSOPTS" ]; then
Jens Arnold60012e12009-12-25 18:35:15 +00001032 TTS_OPTS="$ARG_TTSOPTS"
Björn Stenbergf5ef0b92009-12-08 10:24:59 +00001033 echo "$TTS_ENGINE options set to $TTS_OPTS"
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001034 fi
Jonas Häggqvistda071d02006-11-03 21:47:52 +00001035
Thom Johansen75432612007-11-18 17:10:50 +00001036 if [ "$swcodec" = "yes" ]; then
1037 ENCODER="rbspeexenc"
Thom Johansen75432612007-11-18 17:10:50 +00001038 ENC_OPTS="-q 4 -c 10"
1039 else
Jens Arnold56fa6ae2008-10-08 23:18:23 +00001040 if [ -n "`findtool lame`" ]; then
Thom Johansen75432612007-11-18 17:10:50 +00001041 ENCODER="lame"
Jens Arnold31c279e2009-05-30 00:12:24 +00001042 ENC_OPTS="--resample 12 -t -m m -h -V 9.999 -S -B 64 --vbr-new"
Thom Johansen75432612007-11-18 17:10:50 +00001043 else
1044 echo "You need LAME in the system path to build voice files for"
1045 echo "HWCODEC targets."
Jonas Häggqvistea5457c2008-12-11 17:24:04 +00001046 exit 4
Thom Johansen75432612007-11-18 17:10:50 +00001047 fi
Jonas Häggqvistda071d02006-11-03 21:47:52 +00001048 fi
Thom Johansen75432612007-11-18 17:10:50 +00001049
Jonas Häggqvistda071d02006-11-03 21:47:52 +00001050 echo "Using $ENCODER for encoding voice clips"
Jonas Häggqvist58537b42007-08-13 12:21:16 +00001051
Björn Stenbergf5ef0b92009-12-08 10:24:59 +00001052 # Read custom encoder options from command line
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001053 if [ "$ARG_ENCOPTS" ]; then
Björn Stenbergf5ef0b92009-12-08 10:24:59 +00001054 ENC_OPTS="$ARG_ENCOPTS"
Björn Stenbergf5ef0b92009-12-08 10:24:59 +00001055 echo "$ENCODER options set to $ENC_OPTS"
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001056 fi
Jonas Häggqvist58537b42007-08-13 12:21:16 +00001057
Steve Bavin6bc7da72007-08-09 12:07:42 +00001058 TEMPDIR="${pwd}"
Jens Arnold56fa6ae2008-10-08 23:18:23 +00001059 if [ -n "`findtool cygpath`" ]; then
Steve Bavin6bc7da72007-08-09 12:07:42 +00001060 TEMPDIR=`cygpath . -a -w`
1061 fi
Jonas Häggqvistda071d02006-11-03 21:47:52 +00001062}
1063
Greg White355be502007-01-13 02:24:15 +00001064picklang() {
1065 # figure out which languages that are around
1066 for file in $rootdir/apps/lang/*.lang; do
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001067 clean=`basename $file .lang`
Greg White355be502007-01-13 02:24:15 +00001068 langs="$langs $clean"
1069 done
Jonas Häggqvistda071d02006-11-03 21:47:52 +00001070
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001071 if [ "$ARG_LANG" ]; then
1072 pick=$ARG_LANG
1073 else
1074 echo "Select a number for the language to use (default is english)"
1075 # FIXME The multiple-language feature is currently broken
1076 # echo "You may enter a comma-separated list of languages to build"
Jonas Häggqvistda071d02006-11-03 21:47:52 +00001077
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001078 num=1
1079 for one in $langs; do
1080 echo "$num. $one"
1081 num=`expr $num + 1`
1082 done
1083 pick=`input`
Jens Arnold334e6122012-01-08 13:59:15 +00001084 advopts="$advopts --language=$pick"
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001085 fi
Greg White355be502007-01-13 02:24:15 +00001086}
Jonas Häggqvistda071d02006-11-03 21:47:52 +00001087
Greg White355be502007-01-13 02:24:15 +00001088whichlang() {
Jonas Häggqvist58537b42007-08-13 12:21:16 +00001089 output=""
1090 # Allow the user to pass a comma-separated list of langauges
1091 for thispick in `echo $pick | sed 's/,/ /g'`; do
1092 num=1
1093 for one in $langs; do
1094 # Accept both the language number and name
1095 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
1096 if [ "$output" = "" ]; then
1097 output=$one
1098 else
1099 output=$output,$one
1100 fi
1101 fi
1102 num=`expr $num + 1`
1103 done
Greg White355be502007-01-13 02:24:15 +00001104 done
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001105 if [ -z "$output" ]; then
1106 # pick a default
1107 output="english"
1108 fi
Jonas Häggqvist58537b42007-08-13 12:21:16 +00001109 echo $output
Jonas Häggqvistda071d02006-11-03 21:47:52 +00001110}
1111
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001112help() {
Robert Hakc3320ae2002-10-17 09:08:05 +00001113 echo "Rockbox configure script."
1114 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
1115 echo "Do *NOT* run this within the tools directory!"
Daniel Stenberg2196c892005-06-01 11:42:51 +00001116 echo ""
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001117 cat <<EOF
Daniel Stenbergcdae4932008-04-02 21:28:15 +00001118 Usage: configure [OPTION]...
1119 Options:
1120 --target=TARGET Sets the target, TARGET can be either the target ID or
Jonathan Gordonee27a4f2008-07-17 02:58:53 +00001121 corresponding string. Run without this option to see all
Daniel Stenbergcdae4932008-04-02 21:28:15 +00001122 available targets.
1123
1124 --ram=RAM Sets the RAM for certain targets. Even though any number
1125 is accepted, not every number is correct. The default
1126 value will be applied, if you entered a wrong number
1127 (which depends on the target). Watch the output. Run
1128 without this option if you are not sure which the right
1129 number is.
1130
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001131 --type=TYPE Sets the build type. Shortcuts are also valid.
1132 Run without this option to see all available types.
1133 Multiple values are allowed and managed in the input
1134 order. So --type=b stands for Bootloader build, while
1135 --type=ab stands for "Backlight MOD" build.
1136
Jonas Häggqvisted0f1ae2011-06-29 23:10:41 +00001137 --lcdwidth=X Sets the width of the LCD. Used only for application
1138 targets.
1139
1140 --lcdheight=Y Sets the height of the LCD. Used only for application
1141 targets.
1142
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001143 --language=LANG Set the language used for voice generation (used only if
1144 TYPE is AV).
1145
1146 --tts=ENGINE Set the TTS engine used for voice generation (used only
1147 if TYPE is AV).
1148
1149 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is
1150 AV).
1151
1152 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV).
1153
1154 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV).
Björn Stenbergad8d6032008-11-24 22:16:07 +00001155
1156 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}).
1157 This is useful for having multiple alternate builds on
1158 your device that you can load with ROLO. However as the
1159 bootloader looks for .rockbox you won't be able to boot
1160 into this build.
1161
Daniel Stenbergcdae4932008-04-02 21:28:15 +00001162 --ccache Enable ccache use (done by default these days)
1163 --no-ccache Disable ccache use
Thomas Martitz45fc5ba2009-11-19 22:47:14 +00001164
Rafaël Carré59288622010-06-11 11:19:00 +00001165 --thumb Build with -mthumb (for ARM builds)
Rafaël Carré2da430b2010-06-11 11:50:19 +00001166 --no-thumb The opposite of --thumb (don't use thumb even for targets
1167 where this is the default
Thomas Martitz6d85de32011-02-18 22:46:01 +00001168 --sdl-threads Force use of SDL threads. They have inferior performance,
1169 but are better debuggable with GDB
1170 --no-sdl-threads Disallow use of SDL threads. This prevents the default
1171 behavior of falling back to them if no native thread
1172 support was found.
Thomas Martitz1c3ae922010-07-06 15:06:06 +00001173 --prefix Target installation directory
Daniel Stenbergcdae4932008-04-02 21:28:15 +00001174 --help Shows this message (must not be used with other options)
1175
1176EOF
1177
Robert Hakc3320ae2002-10-17 09:08:05 +00001178 exit
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001179}
1180
1181ARG_CCACHE=
1182ARG_ENCOPTS=
1183ARG_LANG=
1184ARG_RAM=
1185ARG_RBDIR=
1186ARG_TARGET=
1187ARG_TTS=
1188ARG_TTSOPTS=
1189ARG_TYPE=
1190ARG_VOICE=
Rafaël Carré2da430b2010-06-11 11:50:19 +00001191ARG_ARM_THUMB=
Thomas Martitz9321ce32010-11-14 15:29:11 +00001192ARG_PREFIX="$PREFIX"
Thomas Martitz6d85de32011-02-18 22:46:01 +00001193ARG_THREAD_SUPPORT=
Jens Arnold8b480522012-01-08 17:38:40 +00001194err=
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001195for arg in "$@"; do
1196 case "$arg" in
1197 --ccache) ARG_CCACHE=1;;
Thomas Martitz45fc5ba2009-11-19 22:47:14 +00001198 --no-ccache) ARG_CCACHE=0;;
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001199 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
1200 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
Björn Stenberga8ed3392010-09-24 12:03:15 +00001201 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
1202 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001203 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
1204 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
1205 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
1206 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;;
1207 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;;
1208 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;;
1209 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
Rafaël Carré59288622010-06-11 11:19:00 +00001210 --thumb) ARG_ARM_THUMB=1;;
Rafaël Carré2da430b2010-06-11 11:50:19 +00001211 --no-thumb) ARG_ARM_THUMB=0;;
Thomas Martitz6d85de32011-02-18 22:46:01 +00001212 --sdl-threads)ARG_THREAD_SUPPORT=1;;
1213 --no-sdl-threads)
1214 ARG_THREAD_SUPPORT=0;;
Thomas Martitz9321ce32010-11-14 15:29:11 +00001215 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;;
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001216 --help) help;;
1217 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
1218 esac
1219done
1220[ "$err" ] && exit 1
1221
1222advopts=
1223
1224if [ "$TMPDIR" != "" ]; then
1225 tmpdir=$TMPDIR
1226else
1227 tmpdir=/tmp
Robert Hakc3320ae2002-10-17 09:08:05 +00001228fi
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001229echo Using temporary directory $tmpdir
Robert Hakc3320ae2002-10-17 09:08:05 +00001230
1231if test -r "configure"; then
1232 # this is a check for a configure script in the current directory, it there
1233 # is one, try to figure out if it is this one!
1234
1235 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
1236 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
1237 echo "It will only cause you pain and grief. Instead do this:"
1238 echo ""
1239 echo " cd .."
1240 echo " mkdir build-dir"
1241 echo " cd build-dir"
1242 echo " ../tools/configure"
1243 echo ""
1244 echo "Much happiness will arise from this. Enjoy"
Jonas Häggqvistea5457c2008-12-11 17:24:04 +00001245 exit 5
Robert Hakc3320ae2002-10-17 09:08:05 +00001246 fi
1247fi
1248
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +00001249# get our current directory
1250pwd=`pwd`;
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +00001251
Daniel Stenbergef1109a2007-04-20 11:02:16 +00001252if { echo $pwd | grep " "; } then
1253 echo "You're running this script in a path that contains space. The build"
1254 echo "system is unfortunately not clever enough to deal with this. Please"
1255 echo "run the script from a different path, rename the path or fix the build"
1256 echo "system!"
Jonas Häggqvistea5457c2008-12-11 17:24:04 +00001257 exit 6
Daniel Stenbergef1109a2007-04-20 11:02:16 +00001258fi
1259
Daniel Stenberg5c9c16f2004-05-26 11:07:16 +00001260if [ -z "$rootdir" ]; then
1261 ##################################################################
1262 # Figure out where the source code root is!
1263 #
Jonas Häggqvist5970ffc2006-11-18 22:43:55 +00001264 rootdir=`dirname $0`/../
Daniel Stenberg5c9c16f2004-05-26 11:07:16 +00001265
1266 #####################################################################
1267 # Convert the possibly relative directory name to an absolute version
1268 #
1269 now=`pwd`
1270 cd $rootdir
1271 rootdir=`pwd`
1272
1273 # cd back to the build dir
1274 cd $now
Daniel Stenberg31e0cd62003-04-22 22:18:57 +00001275fi
1276
Daniel Stenberg57a09cd2005-05-07 23:16:08 +00001277apps="apps"
Rafaël Carréf56bb4e2011-08-13 20:29:15 +00001278appsdir='$(ROOTDIR)/apps'
1279toolsdir='$(ROOTDIR)/tools'
Christi Scarboroughd68d7c02006-02-06 07:25:25 +00001280
Daniel Stenberg9aac5292005-01-29 00:00:47 +00001281
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001282##################################################################
1283# Figure out target platform
1284#
1285
Thomas Martitz5e1b9cd2009-08-09 19:02:22 +00001286if [ "$ARG_TARGET" ]; then
1287 buildfor=$ARG_TARGET
Daniel Stenbergcdae4932008-04-02 21:28:15 +00001288else
Daniel Stenberg41350462005-05-24 09:19:44 +00001289 echo "Enter target platform:"
Daniel Stenbergc704db62006-08-30 21:53:26 +00001290cat <<EOF
Jonathan Gordon9a9722f2008-09-23 11:32:00 +00001291 ==Archos== ==iriver== ==Apple iPod==
1292 0) Player/Studio 10) H120/H140 20) Color/Photo
Björn Stenbergc0740442009-12-07 12:19:08 +00001293 1) Recorder 11) H320/H340 21) Nano 1G
Jonathan Gordon9a9722f2008-09-23 11:32:00 +00001294 2) FM Recorder 12) iHP-100/110/115 22) Video
1295 3) Recorder v2 13) iFP-790 23) 3G
1296 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
1297 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
1298 6) AV300 26) Mini 2G
Daniel Stenberg89b95f02008-11-05 23:12:14 +00001299 ==Toshiba== 27) 1G, 2G
Björn Stenberg0e74fce2009-12-07 15:07:51 +00001300 ==Cowon/iAudio== 40) Gigabeat F/X 28) Nano 2G
Michael Sparmann15284792011-01-02 23:16:27 +00001301 30) X5/X5V/X5L 41) Gigabeat S 29) Classic/6G
1302 31) M5/M5L
1303 32) 7 ==Olympus= ==SanDisk==
1304 33) D2 70) M:Robe 500 50) Sansa e200
1305 34) M3/M3L 71) M:Robe 100 51) Sansa e200R
1306 52) Sansa c200
1307 ==Creative== ==Philips== 53) Sansa m200
1308 90) Zen Vision:M 30GB 100) GoGear SA9200 54) Sansa c100
1309 91) Zen Vision:M 60GB 101) GoGear HDD1630/ 55) Sansa Clip
1310 92) Zen Vision HDD1830 56) Sansa e200v2
Amaury Pouly12c64a42012-05-19 16:09:46 +02001311 93) Zen X-Fi2 102) GoGear HDD6330 57) Sansa m200v4
1312 94) Zen X-Fi3 58) Sansa Fuze
Amaury Pouly5cfb1482013-10-22 00:42:36 +02001313 96) Zen X-Fi ==Meizu== 59) Sansa c200v2
1314 97) Zen X-Mozaic 110) M6SL 60) Sansa Clipv2
1315 98) Zen 111) M6SP 61) Sansa View
1316 112) M3 62) Sansa Clip+
1317 ==Onda== 63) Sansa Fuze v2
1318 120) VX747 ==Tatung== 64) Sansa Fuze+
1319 121) VX767 150) Elio TPJ-1022 65) Sansa Clip Zip
1320 122) VX747+ 66) Sansa Connect
1321 123) VX777 ==Packard Bell==
1322 160) Vibe 500 ==Logik==
1323 ==Samsung== 80) DAX 1GB MP3/DAB
1324 140) YH-820 ==MPIO==
1325 141) YH-920 170) HD200 ==Lyre project==
1326 142) YH-925 171) HD300 130) Lyre proto 1
1327 143) YP-S3 131) Mini2440
1328 ==ROCKCHIP==
1329 ==Application== 180) rk27xx generic ==HiFiMAN==
1330 200) SDL 190) HM-60x
1331 201) Android ==HiFi E.T.== 191) HM-801
1332 202) Nokia N8xx 210) MA9
Andrew Ryabinind6027172013-10-27 22:34:24 +04001333 203) Nokia N900 211) MA9C ==Sony==
Amaury Pouly776d51c2013-11-13 21:31:18 +00001334 204) Pandora 212) MA8 220) NWZ-E370/E380 series
Andrew Ryabinin3a97e122013-06-02 23:03:26 +04001335 205) Samsung YP-R0 213) MA8C 221) NWZ-E360 series
Amaury Pouly5cfb1482013-10-22 00:42:36 +02001336 206) Android MIPS
1337 207) Android x86
Daniel Stenbergc704db62006-08-30 21:53:26 +00001338EOF
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001339
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001340 buildfor=`input`;
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001341
Daniel Stenbergcdae4932008-04-02 21:28:15 +00001342fi
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001343 # Set of tools built for all target platforms:
Jens Arnold738c37c2007-04-01 13:09:22 +00001344 toolset="rdf2binary convbdf codepages"
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001345
1346 # Toolsets for some target families:
Jens Arnold738c37c2007-04-01 13:09:22 +00001347 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
1348 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
1349 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
Dave Chapmanf5318d52008-01-12 18:11:46 +00001350 ipodbitmaptools="$toolset scramble bmp2rb"
Jens Arnold738c37c2007-04-01 13:09:22 +00001351 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
Dave Chapman48430bf2009-10-28 21:11:43 +00001352 tccbitmaptools="$toolset scramble bmp2rb"
Dave Chapman6bbe66a2008-10-12 19:34:47 +00001353 # generic is used by IFP, Meizu and Onda
Jens Arnold738c37c2007-04-01 13:09:22 +00001354 genericbitmaptools="$toolset bmp2rb"
Dave Chapman6bbe66a2008-10-12 19:34:47 +00001355 # scramble is used by all other targets
1356 scramblebitmaptools="$genericbitmaptools scramble"
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001357
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001358
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001359 # ---- For each target ----
1360 #
1361 # *Variables*
Daniel Stenberg9759c032008-01-23 10:59:17 +00001362 # target_id: a unique number identifying this target, IS NOT the menu number.
1363 # Just use the currently highest number+1 when you add a new
1364 # target.
1365 # modelname: short model name used all over to identify this target
Daniel Stenbergcca0e3d2007-05-19 14:35:11 +00001366 # memory: number of megabytes of RAM this target has. If the amount can
1367 # be selected by the size prompt, let memory be unset here
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001368 # target: -Ddefine passed to the build commands to make the correct
1369 # config-*.h file get included etc
1370 # tool: the tool that takes a plain binary and converts that into a
1371 # working "firmware" file for your target
1372 # output: the final output file name
Dave Chapman6af86032006-08-31 12:31:16 +00001373 # boottool: the tool that takes a plain binary and generates a bootloader
1374 # file for your target (or blank to use $tool)
Greg White355be502007-01-13 02:24:15 +00001375 # bootoutput:the final output file name for the bootloader (or blank to use
Dave Chapman6af86032006-08-31 12:31:16 +00001376 # $output)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001377 # appextra: passed to the APPEXTRA variable in the Makefiles.
1378 # TODO: add proper explanation
1379 # archosrom: used only for Archos targets that build a special flashable .ucl
Daniel Stenberg9759c032008-01-23 10:59:17 +00001380 # image.
1381 # flash: name of output for flashing, for targets where there's a special
1382 # file output for this.
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001383 # plugins: set to 'yes' to build the plugins. Early development builds can
1384 # set this to no in the early stages to have an easier life for a
1385 # while
Daniel Stenberg82199122007-07-16 22:25:41 +00001386 # swcodec: set 'yes' on swcodec targets
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001387 # toolset: lists what particular tools in the tools/ directory that this
1388 # target needs to have built prior to building Rockbox
1389 #
1390 # *Functions*
1391 # *cc: sets up gcc and compiler options for your target builds. Note
1392 # that if you select a simulator build, the compiler selection is
1393 # overridden later in the script.
1394
1395 case $buildfor in
1396
Björn Stenbergc0740442009-12-07 12:19:08 +00001397 0|archosplayer)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001398 target_id=1
Björn Stenbergc0740442009-12-07 12:19:08 +00001399 modelname="archosplayer"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001400 target="ARCHOS_PLAYER"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001401 shcc
Daniel Stenberga97fe252004-10-07 08:08:05 +00001402 tool="$rootdir/tools/scramble"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001403 output="archos.mod"
Linus Nielsen Feltzing7da94772005-10-28 00:00:00 +00001404 appextra="player:gui"
Jens Arnold48201772004-11-20 00:55:25 +00001405 archosrom="$pwd/rombox.ucl"
1406 flash="$pwd/rockbox.ucl"
Daniel Stenberg8e55d0c2004-09-22 21:40:45 +00001407 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001408 swcodec=""
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001409
1410 # toolset is the tools within the tools directory that we build for
1411 # this particular target.
Jens Arnold5a696892007-04-04 00:16:11 +00001412 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
Daniel Stenberg59eb22d2005-12-04 23:25:24 +00001413
1414 # Note: the convbdf is present in the toolset just because: 1) the
1415 # firmware/Makefile assumes it is present always, and 2) we will need it when we
1416 # build the player simulator
1417
Jens Arnold0e6dd7e2006-11-27 02:16:32 +00001418 t_cpu="sh"
1419 t_manufacturer="archos"
1420 t_model="player"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001421 ;;
1422
Björn Stenbergc0740442009-12-07 12:19:08 +00001423 1|archosrecorder)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001424 target_id=2
Björn Stenbergc0740442009-12-07 12:19:08 +00001425 modelname="archosrecorder"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001426 target="ARCHOS_RECORDER"
Daniel Stenberg0482ff52005-06-15 11:27:37 +00001427 shcc
1428 tool="$rootdir/tools/scramble"
Dave Chapman1e7043a22006-01-22 21:30:32 +00001429 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1430 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
Daniel Stenberg0482ff52005-06-15 11:27:37 +00001431 output="ajbrec.ajz"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001432 appextra="recorder:gui:radio"
Daniel Stenberg9759c032008-01-23 10:59:17 +00001433 #archosrom="$pwd/rombox.ucl"
Daniel Stenberg0482ff52005-06-15 11:27:37 +00001434 flash="$pwd/rockbox.ucl"
1435 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001436 swcodec=""
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001437 # toolset is the tools within the tools directory that we build for
1438 # this particular target.
1439 toolset=$archosbitmaptools
Jens Arnold0e6dd7e2006-11-27 02:16:32 +00001440 t_cpu="sh"
1441 t_manufacturer="archos"
1442 t_model="recorder"
Daniel Stenberg0482ff52005-06-15 11:27:37 +00001443 ;;
1444
Björn Stenbergc0740442009-12-07 12:19:08 +00001445 2|archosfmrecorder)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001446 target_id=3
Björn Stenbergc0740442009-12-07 12:19:08 +00001447 modelname="archosfmrecorder"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001448 target="ARCHOS_FMRECORDER"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001449 shcc
Daniel Stenberga97fe252004-10-07 08:08:05 +00001450 tool="$rootdir/tools/scramble -fm"
Dave Chapman1e7043a22006-01-22 21:30:32 +00001451 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1452 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001453 output="ajbrec.ajz"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001454 appextra="recorder:gui:radio"
Daniel Stenberg9759c032008-01-23 10:59:17 +00001455 #archosrom="$pwd/rombox.ucl"
Daniel Stenberg59bec2e2004-10-07 08:20:25 +00001456 flash="$pwd/rockbox.ucl"
Daniel Stenberg8e55d0c2004-09-22 21:40:45 +00001457 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001458 swcodec=""
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001459 # toolset is the tools within the tools directory that we build for
1460 # this particular target.
1461 toolset=$archosbitmaptools
Jens Arnold0e6dd7e2006-11-27 02:16:32 +00001462 t_cpu="sh"
1463 t_manufacturer="archos"
1464 t_model="fm_v2"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001465 ;;
1466
Björn Stenbergc0740442009-12-07 12:19:08 +00001467 3|archosrecorderv2)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001468 target_id=4
Björn Stenbergc0740442009-12-07 12:19:08 +00001469 modelname="archosrecorderv2"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001470 target="ARCHOS_RECORDERV2"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001471 shcc
Daniel Stenberga97fe252004-10-07 08:08:05 +00001472 tool="$rootdir/tools/scramble -v2"
Dave Chapman1e7043a22006-01-22 21:30:32 +00001473 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1474 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001475 output="ajbrec.ajz"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001476 appextra="recorder:gui:radio"
Daniel Stenberg9759c032008-01-23 10:59:17 +00001477 #archosrom="$pwd/rombox.ucl"
Daniel Stenberg59bec2e2004-10-07 08:20:25 +00001478 flash="$pwd/rockbox.ucl"
Daniel Stenberg8e55d0c2004-09-22 21:40:45 +00001479 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001480 swcodec=""
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001481 # toolset is the tools within the tools directory that we build for
1482 # this particular target.
1483 toolset=$archosbitmaptools
Jens Arnold0e6dd7e2006-11-27 02:16:32 +00001484 t_cpu="sh"
1485 t_manufacturer="archos"
1486 t_model="fm_v2"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001487 ;;
1488
Björn Stenbergc0740442009-12-07 12:19:08 +00001489 4|archosondiosp)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001490 target_id=7
Björn Stenbergc0740442009-12-07 12:19:08 +00001491 modelname="archosondiosp"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001492 target="ARCHOS_ONDIOSP"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001493 shcc
Daniel Stenberga97fe252004-10-07 08:08:05 +00001494 tool="$rootdir/tools/scramble -osp"
Dave Chapman1e7043a22006-01-22 21:30:32 +00001495 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1496 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001497 output="ajbrec.ajz"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001498 appextra="recorder:gui:radio"
Frank Gevaerts4ddaee72010-02-21 21:48:47 +00001499 #archosrom="$pwd/rombox.ucl"
Daniel Stenberg59bec2e2004-10-07 08:20:25 +00001500 flash="$pwd/rockbox.ucl"
Jörg Hohensohn86425852004-10-07 06:51:22 +00001501 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001502 swcodec=""
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001503 # toolset is the tools within the tools directory that we build for
1504 # this particular target.
1505 toolset=$archosbitmaptools
Jens Arnold0e6dd7e2006-11-27 02:16:32 +00001506 t_cpu="sh"
1507 t_manufacturer="archos"
1508 t_model="ondio"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001509 ;;
1510
Björn Stenbergc0740442009-12-07 12:19:08 +00001511 5|archosondiofm)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001512 target_id=8
Björn Stenbergc0740442009-12-07 12:19:08 +00001513 modelname="archosondiofm"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001514 target="ARCHOS_ONDIOFM"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001515 shcc
Daniel Stenberga97fe252004-10-07 08:08:05 +00001516 tool="$rootdir/tools/scramble -ofm"
Dave Chapman1e7043a22006-01-22 21:30:32 +00001517 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1518 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001519 output="ajbrec.ajz"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001520 appextra="recorder:gui:radio"
Daniel Stenberg9759c032008-01-23 10:59:17 +00001521 #archosrom="$pwd/rombox.ucl"
Daniel Stenberg59bec2e2004-10-07 08:20:25 +00001522 flash="$pwd/rockbox.ucl"
Jörg Hohensohn86425852004-10-07 06:51:22 +00001523 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001524 swcodec=""
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001525 toolset=$archosbitmaptools
Jens Arnold0e6dd7e2006-11-27 02:16:32 +00001526 t_cpu="sh"
1527 t_manufacturer="archos"
1528 t_model="ondio"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001529 ;;
1530
Björn Stenbergc0740442009-12-07 12:19:08 +00001531 6|archosav300)
Jens Arnoldcdec67c2008-03-10 00:27:00 +00001532 target_id=38
Björn Stenbergc0740442009-12-07 12:19:08 +00001533 modelname="archosav300"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001534 target="ARCHOS_AV300"
Dave Chapmand64e6262007-01-14 13:48:09 +00001535 memory=16 # always
1536 arm7tdmicc
1537 tool="$rootdir/tools/scramble -mm=C"
1538 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1539 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1540 output="cjbm.ajz"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001541 appextra="recorder:gui:radio"
Dave Chapmand64e6262007-01-14 13:48:09 +00001542 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001543 swcodec=""
Dave Chapmand64e6262007-01-14 13:48:09 +00001544 # toolset is the tools within the tools directory that we build for
1545 # this particular target.
Nils Wallménius2ee454a2007-09-07 15:34:54 +00001546 toolset="$toolset scramble descramble bmp2rb"
Dave Chapmand64e6262007-01-14 13:48:09 +00001547 # architecture, manufacturer and model for the target-tree build
1548 t_cpu="arm"
1549 t_manufacturer="archos"
1550 t_model="av300"
1551 ;;
1552
Björn Stenbergc0740442009-12-07 12:19:08 +00001553 10|iriverh120)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001554 target_id=9
Björn Stenbergc0740442009-12-07 12:19:08 +00001555 modelname="iriverh120"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001556 target="IRIVER_H120"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001557 memory=32 # always
1558 coldfirecc
Linus Nielsen Feltzing35c27b82005-01-28 12:27:39 +00001559 tool="$rootdir/tools/scramble -add=h120"
Dave Chapman1e7043a22006-01-22 21:30:32 +00001560 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1561 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1562 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1563 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001564 output="rockbox.iriver"
Alex Parker4b7e5362009-10-24 22:56:00 +00001565 bootoutput="bootloader.iriver"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001566 appextra="recorder:gui:radio"
Miika Pekkarinenb1af4e62007-01-08 18:21:12 +00001567 flash="$pwd/rombox.iriver"
Daniel Stenbergb3272f42005-02-04 12:52:15 +00001568 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001569 swcodec="yes"
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001570 # toolset is the tools within the tools directory that we build for
1571 # this particular target.
1572 toolset=$iriverbitmaptools
Jonathan Gordoncad563b2006-10-29 10:26:41 +00001573 t_cpu="coldfire"
1574 t_manufacturer="iriver"
1575 t_model="h100"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +00001576 ;;
1577
Björn Stenbergc0740442009-12-07 12:19:08 +00001578 11|iriverh300)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001579 target_id=10
Björn Stenbergc0740442009-12-07 12:19:08 +00001580 modelname="iriverh300"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001581 target="IRIVER_H300"
Daniel Stenberg0482ff52005-06-15 11:27:37 +00001582 memory=32 # always
1583 coldfirecc
Daniel Stenberg9a46adc2005-07-01 09:46:23 +00001584 tool="$rootdir/tools/scramble -add=h300"
Dave Chapman1e7043a22006-01-22 21:30:32 +00001585 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1586 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1587 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1588 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
Daniel Stenberg0482ff52005-06-15 11:27:37 +00001589 output="rockbox.iriver"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001590 appextra="recorder:gui:radio"
Daniel Stenberg8e55d0c2004-09-22 21:40:45 +00001591 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001592 swcodec="yes"
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001593 # toolset is the tools within the tools directory that we build for
1594 # this particular target.
1595 toolset=$iriverbitmaptools
Jonathan Gordoncad563b2006-10-29 10:26:41 +00001596 t_cpu="coldfire"
1597 t_manufacturer="iriver"
1598 t_model="h300"
Linus Nielsen Feltzingba056502004-09-22 09:29:58 +00001599 ;;
1600
Björn Stenbergc0740442009-12-07 12:19:08 +00001601 12|iriverh100)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001602 target_id=11
Björn Stenbergc0740442009-12-07 12:19:08 +00001603 modelname="iriverh100"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001604 target="IRIVER_H100"
Daniel Stenberg8493ccb2005-07-08 06:31:13 +00001605 memory=16 # always
1606 coldfirecc
1607 tool="$rootdir/tools/scramble -add=h100"
Dave Chapman1e7043a22006-01-22 21:30:32 +00001608 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1609 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1610 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1611 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
Daniel Stenberg8493ccb2005-07-08 06:31:13 +00001612 output="rockbox.iriver"
Alex Parker4b7e5362009-10-24 22:56:00 +00001613 bootoutput="bootloader.iriver"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001614 appextra="recorder:gui:radio"
Miika Pekkarinen698113d2008-02-09 15:06:09 +00001615 flash="$pwd/rombox.iriver"
Daniel Stenberg8493ccb2005-07-08 06:31:13 +00001616 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001617 swcodec="yes"
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001618 # toolset is the tools within the tools directory that we build for
1619 # this particular target.
1620 toolset=$iriverbitmaptools
Jonathan Gordoncad563b2006-10-29 10:26:41 +00001621 t_cpu="coldfire"
1622 t_manufacturer="iriver"
1623 t_model="h100"
Daniel Stenberg8493ccb2005-07-08 06:31:13 +00001624 ;;
1625
Björn Stenbergc0740442009-12-07 12:19:08 +00001626 13|iriverifp7xx)
Jens Arnold9382e552007-07-26 22:42:31 +00001627 target_id=19
Björn Stenbergc0740442009-12-07 12:19:08 +00001628 modelname="iriverifp7xx"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001629 target="IRIVER_IFP7XX"
Jens Arnold9382e552007-07-26 22:42:31 +00001630 memory=1
1631 arm7tdmicc short
1632 tool="cp"
Dave Chapman1e7043a22006-01-22 21:30:32 +00001633 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
Jens Arnold9382e552007-07-26 22:42:31 +00001634 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1635 output="rockbox.wma"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001636 appextra="recorder:gui:radio"
Daniel Stenberg930dc602005-07-15 21:24:10 +00001637 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001638 swcodec="yes"
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001639 # toolset is the tools within the tools directory that we build for
1640 # this particular target.
Jens Arnold9382e552007-07-26 22:42:31 +00001641 toolset=$genericbitmaptools
1642 t_cpu="arm"
1643 t_manufacturer="pnx0101"
1644 t_model="iriver-ifp7xx"
Daniel Stenberg930dc602005-07-15 21:24:10 +00001645 ;;
1646
Björn Stenbergc0740442009-12-07 12:19:08 +00001647 14|iriverh10)
Jens Arnold9382e552007-07-26 22:42:31 +00001648 target_id=22
Björn Stenbergc0740442009-12-07 12:19:08 +00001649 modelname="iriverh10"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001650 target="IRIVER_H10"
Jens Arnold9382e552007-07-26 22:42:31 +00001651 memory=32 # always
1652 arm7tdmicc
1653 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
Jens Arnoldb4994a02007-03-04 14:09:21 +00001654 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
Jens Arnold8aeed2d2007-10-12 00:28:57 +00001655 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
Jens Arnold9382e552007-07-26 22:42:31 +00001656 output="rockbox.mi4"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001657 appextra="recorder:gui:radio"
Jens Arnoldb4994a02007-03-04 14:09:21 +00001658 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001659 swcodec="yes"
Jens Arnold9382e552007-07-26 22:42:31 +00001660 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1661 bootoutput="H10_20GC.mi4"
Jens Arnoldb4994a02007-03-04 14:09:21 +00001662 # toolset is the tools within the tools directory that we build for
1663 # this particular target.
Dave Chapman6bbe66a2008-10-12 19:34:47 +00001664 toolset=$scramblebitmaptools
Jens Arnoldb4994a02007-03-04 14:09:21 +00001665 # architecture, manufacturer and model for the target-tree build
Jens Arnold9382e552007-07-26 22:42:31 +00001666 t_cpu="arm"
Rafaël Carré4ef988b2012-01-03 04:23:08 +00001667 t_soc="pp"
Jens Arnold9382e552007-07-26 22:42:31 +00001668 t_manufacturer="iriver"
1669 t_model="h10"
1670 ;;
1671
Björn Stenbergc0740442009-12-07 12:19:08 +00001672 15|iriverh10_5gb)
Jens Arnold9382e552007-07-26 22:42:31 +00001673 target_id=24
Björn Stenbergc0740442009-12-07 12:19:08 +00001674 modelname="iriverh10_5gb"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001675 target="IRIVER_H10_5GB"
Jens Arnold9382e552007-07-26 22:42:31 +00001676 memory=32 # always
1677 arm7tdmicc
1678 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1679 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1680 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1681 output="rockbox.mi4"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001682 appextra="recorder:gui:radio"
Jens Arnold9382e552007-07-26 22:42:31 +00001683 plugins="yes"
1684 swcodec="yes"
1685 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1686 bootoutput="H10.mi4"
1687 # toolset is the tools within the tools directory that we build for
1688 # this particular target.
Dave Chapman6bbe66a2008-10-12 19:34:47 +00001689 toolset=$scramblebitmaptools
Jens Arnold9382e552007-07-26 22:42:31 +00001690 # architecture, manufacturer and model for the target-tree build
1691 t_cpu="arm"
Rafaël Carré4ef988b2012-01-03 04:23:08 +00001692 t_soc="pp"
Jens Arnold9382e552007-07-26 22:42:31 +00001693 t_manufacturer="iriver"
1694 t_model="h10"
Jens Arnoldb4994a02007-03-04 14:09:21 +00001695 ;;
1696
Daniel Stenbergc704db62006-08-30 21:53:26 +00001697 20|ipodcolor)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001698 target_id=13
Daniel Stenberg9759c032008-01-23 10:59:17 +00001699 modelname="ipodcolor"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001700 target="IPOD_COLOR"
Dave Chapman38e8fb62005-11-08 00:52:39 +00001701 memory=32 # always
1702 arm7tdmicc
1703 tool="$rootdir/tools/scramble -add=ipco"
Dave Chapman1e7043a22006-01-22 21:30:32 +00001704 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1705 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
Dave Chapman38e8fb62005-11-08 00:52:39 +00001706 output="rockbox.ipod"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001707 appextra="recorder:gui:radio"
Dave Chapman38e8fb62005-11-08 00:52:39 +00001708 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001709 swcodec="yes"
Daniel Stenberg9759c032008-01-23 10:59:17 +00001710 bootoutput="bootloader-$modelname.ipod"
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001711 # toolset is the tools within the tools directory that we build for
1712 # this particular target.
1713 toolset=$ipodbitmaptools
Barry Wardelld4945dc2006-10-05 10:58:51 +00001714 # architecture, manufacturer and model for the target-tree build
1715 t_cpu="arm"
Rafaël Carré4ef988b2012-01-03 04:23:08 +00001716 t_soc="pp"
Barry Wardelld4945dc2006-10-05 10:58:51 +00001717 t_manufacturer="ipod"
1718 t_model="color"
Dave Chapman38e8fb62005-11-08 00:52:39 +00001719 ;;
1720
Björn Stenbergc0740442009-12-07 12:19:08 +00001721 21|ipodnano1g)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001722 target_id=14
Björn Stenbergc0740442009-12-07 12:19:08 +00001723 modelname="ipodnano1g"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001724 target="IPOD_NANO"
Dave Chapman38e8fb62005-11-08 00:52:39 +00001725 memory=32 # always
1726 arm7tdmicc
1727 tool="$rootdir/tools/scramble -add=nano"
Dave Chapman1e7043a22006-01-22 21:30:32 +00001728 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1729 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
Dave Chapman38e8fb62005-11-08 00:52:39 +00001730 output="rockbox.ipod"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001731 appextra="recorder:gui:radio"
Dave Chapman38e8fb62005-11-08 00:52:39 +00001732 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001733 swcodec="yes"
Daniel Stenberg9759c032008-01-23 10:59:17 +00001734 bootoutput="bootloader-$modelname.ipod"
Daniel Stenbergd7b5c5a2005-12-02 08:56:20 +00001735 # toolset is the tools within the tools directory that we build for
1736 # this particular target.
1737 toolset=$ipodbitmaptools
Barry Wardelld4945dc2006-10-05 10:58:51 +00001738 # architecture, manufacturer and model for the target-tree build
1739 t_cpu="arm"
Rafaël Carré4ef988b2012-01-03 04:23:08 +00001740 t_soc="pp"
Barry Wardelld4945dc2006-10-05 10:58:51 +00001741 t_manufacturer="ipod"
1742 t_model="nano"
Dave Chapman38e8fb62005-11-08 00:52:39 +00001743 ;;
1744
Daniel Stenbergc704db62006-08-30 21:53:26 +00001745 22|ipodvideo)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001746 target_id=15
Daniel Stenberg9759c032008-01-23 10:59:17 +00001747 modelname="ipodvideo"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001748 target="IPOD_VIDEO"
Frank Gevaertsa1cf4ce2010-08-31 19:06:04 +00001749 memory=64 # always. This is reduced at runtime if needed
Dave Chapman2a7bd9f2005-12-18 13:04:00 +00001750 arm7tdmicc
1751 tool="$rootdir/tools/scramble -add=ipvd"
Dave Chapman1e7043a22006-01-22 21:30:32 +00001752 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1753 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
Dave Chapman2a7bd9f2005-12-18 13:04:00 +00001754 output="rockbox.ipod"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001755 appextra="recorder:gui:radio"
Dave Chapman2a7bd9f2005-12-18 13:04:00 +00001756 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001757 swcodec="yes"
Daniel Stenberg9759c032008-01-23 10:59:17 +00001758 bootoutput="bootloader-$modelname.ipod"
Dave Chapman2a7bd9f2005-12-18 13:04:00 +00001759 # toolset is the tools within the tools directory that we build for
1760 # this particular target.
1761 toolset=$ipodbitmaptools
Barry Wardelld4945dc2006-10-05 10:58:51 +00001762 # architecture, manufacturer and model for the target-tree build
1763 t_cpu="arm"
Rafaël Carré4ef988b2012-01-03 04:23:08 +00001764 t_soc="pp"
Barry Wardelld4945dc2006-10-05 10:58:51 +00001765 t_manufacturer="ipod"
1766 t_model="video"
Dave Chapman2a7bd9f2005-12-18 13:04:00 +00001767 ;;
1768
Daniel Stenbergc704db62006-08-30 21:53:26 +00001769 23|ipod3g)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001770 target_id=16
Daniel Stenberg9759c032008-01-23 10:59:17 +00001771 modelname="ipod3g"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001772 target="IPOD_3G"
Dave Chapman0d100312006-02-05 18:30:50 +00001773 memory=32 # always
1774 arm7tdmicc
1775 tool="$rootdir/tools/scramble -add=ip3g"
1776 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
Jens Arnold41e1aa82006-02-16 20:03:07 +00001777 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
Dave Chapman0d100312006-02-05 18:30:50 +00001778 output="rockbox.ipod"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001779 appextra="recorder:gui:radio"
Dave Chapman0d100312006-02-05 18:30:50 +00001780 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001781 swcodec="yes"
Daniel Stenberg9759c032008-01-23 10:59:17 +00001782 bootoutput="bootloader-$modelname.ipod"
Dave Chapman0d100312006-02-05 18:30:50 +00001783 # toolset is the tools within the tools directory that we build for
1784 # this particular target.
1785 toolset=$ipodbitmaptools
Barry Wardelld4945dc2006-10-05 10:58:51 +00001786 # architecture, manufacturer and model for the target-tree build
1787 t_cpu="arm"
Rafaël Carré4ef988b2012-01-03 04:23:08 +00001788 t_soc="pp"
Barry Wardelld4945dc2006-10-05 10:58:51 +00001789 t_manufacturer="ipod"
1790 t_model="3g"
Dave Chapman0d100312006-02-05 18:30:50 +00001791 ;;
Greg White355be502007-01-13 02:24:15 +00001792
Daniel Stenbergc704db62006-08-30 21:53:26 +00001793 24|ipod4g)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001794 target_id=17
Daniel Stenberg9759c032008-01-23 10:59:17 +00001795 modelname="ipod4g"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001796 target="IPOD_4G"
Dave Chapman0d100312006-02-05 18:30:50 +00001797 memory=32 # always
1798 arm7tdmicc
1799 tool="$rootdir/tools/scramble -add=ip4g"
1800 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
Jens Arnold41e1aa82006-02-16 20:03:07 +00001801 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
Dave Chapman0d100312006-02-05 18:30:50 +00001802 output="rockbox.ipod"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001803 appextra="recorder:gui:radio"
Dave Chapman0d100312006-02-05 18:30:50 +00001804 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001805 swcodec="yes"
Daniel Stenberg9759c032008-01-23 10:59:17 +00001806 bootoutput="bootloader-$modelname.ipod"
Dave Chapman0d100312006-02-05 18:30:50 +00001807 # toolset is the tools within the tools directory that we build for
1808 # this particular target.
1809 toolset=$ipodbitmaptools
Barry Wardelld4945dc2006-10-05 10:58:51 +00001810 # architecture, manufacturer and model for the target-tree build
1811 t_cpu="arm"
Rafaël Carré4ef988b2012-01-03 04:23:08 +00001812 t_soc="pp"
Barry Wardelld4945dc2006-10-05 10:58:51 +00001813 t_manufacturer="ipod"
1814 t_model="4g"
Dave Chapman0d100312006-02-05 18:30:50 +00001815 ;;
Greg White355be502007-01-13 02:24:15 +00001816
Björn Stenbergc0740442009-12-07 12:19:08 +00001817 25|ipodmini1g)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001818 target_id=18
Björn Stenbergc0740442009-12-07 12:19:08 +00001819 modelname="ipodmini1g"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001820 target="IPOD_MINI"
Dave Chapman8b1297a2006-02-21 15:01:25 +00001821 memory=32 # always
1822 arm7tdmicc
1823 tool="$rootdir/tools/scramble -add=mini"
1824 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1825 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1826 output="rockbox.ipod"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001827 appextra="recorder:gui:radio"
Dave Chapman8b1297a2006-02-21 15:01:25 +00001828 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001829 swcodec="yes"
Daniel Stenberg9759c032008-01-23 10:59:17 +00001830 bootoutput="bootloader-$modelname.ipod"
Dave Chapman8b1297a2006-02-21 15:01:25 +00001831 # toolset is the tools within the tools directory that we build for
1832 # this particular target.
1833 toolset=$ipodbitmaptools
Barry Wardelld4945dc2006-10-05 10:58:51 +00001834 # architecture, manufacturer and model for the target-tree build
1835 t_cpu="arm"
Rafaël Carré4ef988b2012-01-03 04:23:08 +00001836 t_soc="pp"
Barry Wardelld4945dc2006-10-05 10:58:51 +00001837 t_manufacturer="ipod"
1838 t_model="mini"
Dave Chapman8b1297a2006-02-21 15:01:25 +00001839 ;;
Greg White355be502007-01-13 02:24:15 +00001840
Daniel Stenbergc704db62006-08-30 21:53:26 +00001841 26|ipodmini2g)
Daniel Stenberg69c9d622006-08-28 08:46:16 +00001842 target_id=21
Daniel Stenberg9759c032008-01-23 10:59:17 +00001843 modelname="ipodmini2g"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001844 target="IPOD_MINI2G"
Jens Arnoldd3feb782006-03-30 17:29:21 +00001845 memory=32 # always
1846 arm7tdmicc
1847 tool="$rootdir/tools/scramble -add=mn2g"
1848 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1849 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1850 output="rockbox.ipod"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001851 appextra="recorder:gui:radio"
Jens Arnoldd3feb782006-03-30 17:29:21 +00001852 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001853 swcodec="yes"
Daniel Stenberg9759c032008-01-23 10:59:17 +00001854 bootoutput="bootloader-$modelname.ipod"
Jens Arnoldd3feb782006-03-30 17:29:21 +00001855 # toolset is the tools within the tools directory that we build for
1856 # this particular target.
1857 toolset=$ipodbitmaptools
Barry Wardelld4945dc2006-10-05 10:58:51 +00001858 # architecture, manufacturer and model for the target-tree build
1859 t_cpu="arm"
Rafaël Carré4ef988b2012-01-03 04:23:08 +00001860 t_soc="pp"
Barry Wardelld4945dc2006-10-05 10:58:51 +00001861 t_manufacturer="ipod"
1862 t_model="mini2g"
Jens Arnoldd3feb782006-03-30 17:29:21 +00001863 ;;
1864
Jens Arnold9382e552007-07-26 22:42:31 +00001865 27|ipod1g2g)
1866 target_id=29
Daniel Stenberg9759c032008-01-23 10:59:17 +00001867 modelname="ipod1g2g"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001868 target="IPOD_1G2G"
Daniel Stenberg95ea7582006-08-01 22:22:01 +00001869 memory=32 # always
1870 arm7tdmicc
Jens Arnold9382e552007-07-26 22:42:31 +00001871 tool="$rootdir/tools/scramble -add=1g2g"
Daniel Stenberg95ea7582006-08-01 22:22:01 +00001872 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
Jens Arnold9382e552007-07-26 22:42:31 +00001873 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1874 output="rockbox.ipod"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001875 appextra="recorder:gui:radio"
Daniel Stenberg95ea7582006-08-01 22:22:01 +00001876 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001877 swcodec="yes"
Daniel Stenberg9759c032008-01-23 10:59:17 +00001878 bootoutput="bootloader-$modelname.ipod"
Daniel Stenberg95ea7582006-08-01 22:22:01 +00001879 # toolset is the tools within the tools directory that we build for
1880 # this particular target.
Jens Arnold9382e552007-07-26 22:42:31 +00001881 toolset=$ipodbitmaptools
Daniel Stenberg95ea7582006-08-01 22:22:01 +00001882 # architecture, manufacturer and model for the target-tree build
1883 t_cpu="arm"
Rafaël Carré4ef988b2012-01-03 04:23:08 +00001884 t_soc="pp"
Jens Arnold9382e552007-07-26 22:42:31 +00001885 t_manufacturer="ipod"
1886 t_model="1g2g"
Daniel Stenberg95ea7582006-08-01 22:22:01 +00001887 ;;
1888
Dave Chapmanafe43d32009-07-12 22:16:51 +00001889 28|ipodnano2g)
1890 target_id=62
1891 modelname="ipodnano2g"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001892 target="IPOD_NANO2G"
Dave Chapmanafe43d32009-07-12 22:16:51 +00001893 memory=32 # always
1894 arm940tcc
1895 tool="$rootdir/tools/scramble -add=nn2g"
1896 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
Dave Chapmanc30d5092009-07-16 00:38:50 +00001897 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
Dave Chapmanafe43d32009-07-12 22:16:51 +00001898 output="rockbox.ipod"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001899 appextra="recorder:gui:radio"
Dave Chapmanafe43d32009-07-12 22:16:51 +00001900 plugins="yes"
1901 swcodec="yes"
Dave Chapmanb04a7a82009-10-11 01:37:12 +00001902 bootoutput="bootloader-$modelname.ipod"
Dave Chapmanafe43d32009-07-12 22:16:51 +00001903 # toolset is the tools within the tools directory that we build for
1904 # this particular target.
1905 toolset=$ipodbitmaptools
1906 # architecture, manufacturer and model for the target-tree build
1907 t_cpu="arm"
1908 t_manufacturer="s5l8700"
1909 t_model="ipodnano2g"
1910 ;;
1911
Michael Sparmann15284792011-01-02 23:16:27 +00001912 29|ipod6g)
1913 target_id=71
1914 modelname="ipod6g"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001915 target="IPOD_6G"
Michael Sparmann15284792011-01-02 23:16:27 +00001916 memory=64 # always
1917 arm926ejscc
1918 tool="$rootdir/tools/scramble -add=ip6g"
1919 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1920 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1921 output="rockbox.ipod"
1922 appextra="recorder:gui:radio"
1923 plugins="yes"
1924 swcodec="yes"
1925 bootoutput="bootloader-$modelname.ipod"
1926 # toolset is the tools within the tools directory that we build for
1927 # this particular target.
1928 toolset=$ipodbitmaptools
1929 # architecture, manufacturer and model for the target-tree build
1930 t_cpu="arm"
1931 t_manufacturer="s5l8702"
1932 t_model="ipod6g"
1933 ;;
1934
Björn Stenbergc0740442009-12-07 12:19:08 +00001935 30|iaudiox5)
Jens Arnold9382e552007-07-26 22:42:31 +00001936 target_id=12
Björn Stenbergc0740442009-12-07 12:19:08 +00001937 modelname="iaudiox5"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001938 target="IAUDIO_X5"
Jens Arnold9382e552007-07-26 22:42:31 +00001939 memory=16 # always
1940 coldfirecc
1941 tool="$rootdir/tools/scramble -add=iax5"
Jens Arnoldcf985f02010-06-14 17:49:30 +00001942 boottool="$rootdir/tools/scramble -iaudiox5"
Barry Wardell14ed3ca2007-03-16 14:28:00 +00001943 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
Jens Arnold9382e552007-07-26 22:42:31 +00001944 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1945 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1946 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1947 output="rockbox.iaudio"
Jens Arnoldcf985f02010-06-14 17:49:30 +00001948 bootoutput="x5_fw.bin"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001949 appextra="recorder:gui:radio"
Barry Wardell14ed3ca2007-03-16 14:28:00 +00001950 plugins="yes"
Daniel Stenberg82199122007-07-16 22:25:41 +00001951 swcodec="yes"
Barry Wardell14ed3ca2007-03-16 14:28:00 +00001952 # toolset is the tools within the tools directory that we build for
1953 # this particular target.
Jens Arnold9382e552007-07-26 22:42:31 +00001954 toolset="$iaudiobitmaptools"
1955 # architecture, manufacturer and model for the target-tree build
1956 t_cpu="coldfire"
1957 t_manufacturer="iaudio"
1958 t_model="x5"
1959 ;;
1960
Björn Stenbergc0740442009-12-07 12:19:08 +00001961 31|iaudiom5)
Jens Arnold9382e552007-07-26 22:42:31 +00001962 target_id=28
Björn Stenbergc0740442009-12-07 12:19:08 +00001963 modelname="iaudiom5"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001964 target="IAUDIO_M5"
Jens Arnold9382e552007-07-26 22:42:31 +00001965 memory=16 # always
1966 coldfirecc
1967 tool="$rootdir/tools/scramble -add=iam5"
Jens Arnoldcf985f02010-06-14 17:49:30 +00001968 boottool="$rootdir/tools/scramble -iaudiom5"
Jens Arnold9382e552007-07-26 22:42:31 +00001969 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1970 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1971 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1972 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1973 output="rockbox.iaudio"
Jens Arnoldcf985f02010-06-14 17:49:30 +00001974 bootoutput="m5_fw.bin"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001975 appextra="recorder:gui:radio"
Jens Arnold9382e552007-07-26 22:42:31 +00001976 plugins="yes"
1977 swcodec="yes"
1978 # toolset is the tools within the tools directory that we build for
1979 # this particular target.
1980 toolset="$iaudiobitmaptools"
1981 # architecture, manufacturer and model for the target-tree build
1982 t_cpu="coldfire"
1983 t_manufacturer="iaudio"
1984 t_model="m5"
1985 ;;
1986
Jens Arnoldcdec67c2008-03-10 00:27:00 +00001987 32|iaudio7)
1988 target_id=32
1989 modelname="iaudio7"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00001990 target="IAUDIO_7"
Jens Arnoldcdec67c2008-03-10 00:27:00 +00001991 memory=16 # always
1992 arm946cc
Dave Chapmand462a642008-09-06 17:50:59 +00001993 tool="$rootdir/tools/scramble -add=i7"
Jens Arnoldcdec67c2008-03-10 00:27:00 +00001994 boottool="$rootdir/tools/scramble -tcc=crc"
1995 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
Rob Purchase1a08f462008-09-16 08:09:44 +00001996 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
Jens Arnoldcdec67c2008-03-10 00:27:00 +00001997 output="rockbox.iaudio"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00001998 appextra="recorder:gui:radio"
Jens Arnoldcdec67c2008-03-10 00:27:00 +00001999 plugins="yes"
2000 swcodec="yes"
2001 bootoutput="I7_FW.BIN"
2002 # toolset is the tools within the tools directory that we build for
2003 # this particular target.
2004 toolset="$tccbitmaptools"
2005 # architecture, manufacturer and model for the target-tree build
2006 t_cpu="arm"
2007 t_manufacturer="tcc77x"
2008 t_model="iaudio7"
2009 ;;
2010
2011 33|cowond2)
2012 target_id=34
2013 modelname="cowond2"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00002014 target="COWON_D2"
Jens Arnoldcdec67c2008-03-10 00:27:00 +00002015 memory=32
2016 arm926ejscc
2017 tool="$rootdir/tools/scramble -add=d2"
Rob Purchase80ce2c82009-10-29 22:08:47 +00002018 boottool="cp "
Jens Arnoldcdec67c2008-03-10 00:27:00 +00002019 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2020 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
Rob Purchase131c6c22008-11-17 21:16:07 +00002021 output="rockbox.d2"
Rob Purchase80ce2c82009-10-29 22:08:47 +00002022 bootoutput="bootloader-cowond2.bin"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00002023 appextra="recorder:gui:radio"
Rob Purchase554d7ed2008-03-22 22:03:34 +00002024 plugins="yes"
Jens Arnoldcdec67c2008-03-10 00:27:00 +00002025 swcodec="yes"
2026 toolset="$tccbitmaptools"
2027 # architecture, manufacturer and model for the target-tree build
2028 t_cpu="arm"
2029 t_manufacturer="tcc780x"
2030 t_model="cowond2"
2031 ;;
2032
Björn Stenbergc0740442009-12-07 12:19:08 +00002033 34|iaudiom3)
Jens Arnoldcdec67c2008-03-10 00:27:00 +00002034 target_id=37
Björn Stenbergc0740442009-12-07 12:19:08 +00002035 modelname="iaudiom3"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00002036 target="IAUDIO_M3"
Jens Arnoldcdec67c2008-03-10 00:27:00 +00002037 memory=16 # always
2038 coldfirecc
2039 tool="$rootdir/tools/scramble -add=iam3"
Jens Arnoldcf985f02010-06-14 17:49:30 +00002040 boottool="$rootdir/tools/scramble -iaudiom3"
Jens Arnoldcdec67c2008-03-10 00:27:00 +00002041 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2042 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
2043 output="rockbox.iaudio"
Jens Arnoldcf985f02010-06-14 17:49:30 +00002044 bootoutput="cowon_m3.bin"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00002045 appextra="recorder:gui:radio"
Jens Arnoldac5e4ac2008-03-23 01:01:21 +00002046 plugins="yes"
Jens Arnoldcdec67c2008-03-10 00:27:00 +00002047 swcodec="yes"
2048 # toolset is the tools within the tools directory that we build for
2049 # this particular target.
2050 toolset="$iaudiobitmaptools"
2051 # architecture, manufacturer and model for the target-tree build
2052 t_cpu="coldfire"
2053 t_manufacturer="iaudio"
2054 t_model="m3"
2055 ;;
2056
Björn Stenbergc0740442009-12-07 12:19:08 +00002057 40|gigabeatfx)
Jens Arnold9382e552007-07-26 22:42:31 +00002058 target_id=20
Björn Stenbergc0740442009-12-07 12:19:08 +00002059 modelname="gigabeatfx"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00002060 target="GIGABEAT_F"
Jens Arnold9382e552007-07-26 22:42:31 +00002061 memory=32 # always
2062 arm9tdmicc
2063 tool="$rootdir/tools/scramble -add=giga"
2064 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2065 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2066 output="rockbox.gigabeat"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00002067 appextra="recorder:gui:radio"
Jens Arnold9382e552007-07-26 22:42:31 +00002068 plugins="yes"
2069 swcodec="yes"
2070 toolset=$gigabeatbitmaptools
2071 boottool="$rootdir/tools/scramble -gigabeat"
2072 bootoutput="FWIMG01.DAT"
Barry Wardell14ed3ca2007-03-16 14:28:00 +00002073 # architecture, manufacturer and model for the target-tree build
2074 t_cpu="arm"
Jens Arnold9382e552007-07-26 22:42:31 +00002075 t_manufacturer="s3c2440"
2076 t_model="gigabeat-fx"
Barry Wardell14ed3ca2007-03-16 14:28:00 +00002077 ;;
2078
Will Robertson590501c2007-09-21 15:51:53 +00002079 41|gigabeats)
2080 target_id=26
Daniel Stenberg9759c032008-01-23 10:59:17 +00002081 modelname="gigabeats"
Rafaël Carré08fd8ad2011-12-15 17:50:33 +00002082 target="GIGABEAT_S"
Michael Sevakisa07c0342008-02-08 02:20:05 +00002083 memory=64
Nils Wallménius7b8f4a52008-02-10 17:40:06 +00002084 arm1136jfscc
Will Robertson590501c2007-09-21 15:51:53 +00002085 tool="$rootdir/tools/scramble -add=gigs"
2086 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2087 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
2088 output="rockbox.gigabeat"
Jonathan Gordonb6867dc2010-05-17 15:03:59 +00002089 appextra="recorder:gui:radio"
Will Robertson8215b342008-02-17 12:23:02 +00002090 plugins="yes"
Will Robertson26a05af2007-09-22 02:17:08 +00002091 swcodec="yes"
Dominik Riebelingb82963b2009-10-27 21:15:21 +00002092 toolset="$gigabeatbitmaptools"
Will Robertson590501c2007-09-21 15:51:53 +00002093 boottool="$rootdir/tools/scramble -gigabeats"
2094 bootoutput="nk.bin"
2095 # architecture, manufacturer and model for the target-tree build
2096 t_cpu="arm"
2097 t_manufacturer="imx31"
2098 t_model="gigabeat-s"
2099 ;;
2100
Karl Kurbjun7b97fe2