A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 5268 lines 155 kB view raw
1#!/bin/sh 2# __________ __ ___. 3# Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7# \/ \/ \/ \/ \/ 8# 9 10# global CC options for all platforms 11CCOPTS="-W -Wall -Wextra -Wundef -Os -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99 -funit-at-a-time -fno-delete-null-pointer-checks -fno-strict-overflow -fno-common" 12 13# LD options for the core 14LDOPTS="" 15# LD options for the core + plugins 16GLOBAL_LDOPTS="" 17LDMAP_OPT="-Map" 18 19extradefines="" 20use_logf="#undef ROCKBOX_HAS_LOGF" 21use_bootchart="#undef DO_BOOTCHART" 22use_logf_serial="#undef LOGF_SERIAL" 23 24scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'` 25 26rbdir="/.rockbox" 27bindir= 28libdir= 29sharedir= 30sdl_config=sdl2-config 31arm_thumb_boot= 32thread_support="ASSEMBLER_THREADS" 33sysfont="08-Schumacher-Clean" 34app_lcd_width= 35app_lcd_height= 36app_lcd_orientation= 37 38# Properly retain command line arguments containing spaces 39cmdline= 40for arg in "$@"; do 41 case "$arg" in 42 *\ *) cmdline="$cmdline \"$arg\"";; 43 *) cmdline="$cmdline $arg";; 44 esac 45done 46 47# 48# Begin Function Definitions 49# 50input() { 51 read response 52 echo $response 53} 54 55prefixtools () { 56 prefix="$1" 57 if [ -n "$ARG_COMPILER_PREFIX" ]; then 58 echo "WARNING: asked to override target toolchain $1 with $ARG_COMPILER_PREFIX" 59 echo "WARNING: overriding the toolchain means you are running an untested configuration" 60 echo "WARNING: you build might be broken because of that" 61 prefix="$ARG_COMPILER_PREFIX" 62 fi 63 CC=${prefix}gcc 64 CPP=${prefix}cpp 65 WINDRES=${prefix}windres 66 DLLTOOL=${prefix}dlltool 67 DLLWRAP=${prefix}dllwrap 68 RANLIB=${prefix}gcc-ranlib 69 LD=${prefix}ld 70 AR=${prefix}gcc-ar 71 AS=${prefix}as 72 OC=${prefix}objcopy 73} 74 75app_set_paths () { 76 # setup files and paths depending on the platform 77 if [ -z "$ARG_PREFIX" ]; then 78 sharedir="/usr/local/share/rockbox" 79 bindir="/usr/local/bin" 80 libdir="/usr/local/lib" 81 else 82 if [ -d "$ARG_PREFIX" ]; then 83 if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then 84 ARG_PREFIX=`realpath $ARG_PREFIX` 85 if [ "0" != "$?" ]; then 86 echo "ERROR: Could not get prefix path (is realpath installed?)." 87 exit 88 fi 89 fi 90 sharedir="$ARG_PREFIX/share/rockbox" 91 bindir="$ARG_PREFIX/bin" 92 libdir="$ARG_PREFIX/lib" 93 else 94 echo "ERROR: PREFIX directory $ARG_PREFIX does not exist" 95 exit 96 fi 97 fi 98} 99 100# Set the application LCD size according to the following priorities: 101# 1) If --lcdwidth and --lcdheight are set, use them 102# 2) If a size is passed to the app_set_lcd_size() function, use that 103# 3) Otherwise ask the user 104app_set_lcd_size () { 105 if [ -z "$ARG_LCDWIDTH" ]; then 106 ARG_LCDWIDTH=$1 107 fi 108 if [ -z "$ARG_LCDHEIGHT" ]; then 109 ARG_LCDHEIGHT=$2 110 fi 111 112 echo "Enter the LCD width (default: 320)" 113 if [ -z "$ARG_LCDWIDTH" ]; then 114 app_lcd_width=`input` 115 else 116 app_lcd_width="$ARG_LCDWIDTH" 117 fi 118 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi 119 echo "Enter the LCD height (default: 480)" 120 if [ -z "$ARG_LCDHEIGHT" ]; then 121 app_lcd_height=`input` 122 else 123 app_lcd_height="$ARG_LCDHEIGHT" 124 fi 125 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi 126 if [ $app_lcd_width -gt $app_lcd_height ]; then 127 lcd_orientation="landscape" 128 else 129 lcd_orientation="portrait" 130 fi 131 echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)" 132 ARG_LCDWIDTH=$app_lcd_width 133 ARG_LCDHEIGHT=$app_lcd_height 134 135 app_lcd_width="#define LCD_WIDTH $app_lcd_width" 136 app_lcd_height="#define LCD_HEIGHT $app_lcd_height" 137} 138 139findarmgcc() { 140 prefixtools arm-elf-eabi- 141 gccchoice="9.5.0" 142} 143 144# scan the $PATH for the given command 145findtool(){ 146 file="$1" 147 148 IFS=":" 149 for path in $PATH 150 do 151 # echo "checks for $file in $path" >&2 152 if test -f "$path/$file"; then 153 echo "$path/$file" 154 return 155 fi 156 done 157 # check whether caller wants literal return value if not found 158 if [ "$2" = "--lit" ]; then 159 echo "$file" 160 fi 161} 162 163# scan the $PATH for ${sdl_config} - check whether for a (cross-)win32 164# sdl as requested 165findsdl(){ 166 files=${sdl_config} 167 if [ -n "$CROSS_COMPILE" ]; then 168 # ${sdl_config} might (not) be prefixed for cross compiles so try both. 169 files="${CROSS_COMPILE}${sdl_config}:${files}" 170 fi 171 winbuild="$1" 172 173 paths2check="$PATH" 174 175 if [ -n "$CROSS_COMPILE" ]; then 176 # add cross compile sys-root-directories to search in: 177 sysroot=$($CPP --print-sysroot 2>&1) 178 if [ $? -eq 0 ]; 179 then 180 subdirs="bin:mingw/bin:sbin:mingw/sbin" 181 IFS=":" 182 for subdir in $subdirs 183 do 184 if [ -e "${sysroot}/${subdir}" ]; then 185 paths2check="${sysroot}/${subdir}:${paths2check}" 186 fi 187 done 188 else 189 echo "WARNING: unable to get sys-root directory from your cross-compiler" >&2 190 echo "WARNING: $CPP --print-sysroot returns" >&2 191 echo "WARNING: ${sysroot}" >&2 192 fi 193 fi 194 195 # search for the correct ${sdl_config} 196 IFS=":" 197 for path in $paths2check 198 do 199 for file in $files 200 do 201 if test -f "$path/$file"; then 202 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then 203 if [ "yes" = "${winbuild}" ]; then 204 echo "$path/$file" 205 return 206 fi 207 else 208 if [ "yes" != "${winbuild}" ]; then 209 echo "$path/$file" 210 return 211 fi 212 fi 213 fi 214 done 215 done 216} 217 218# check for availability of sigaltstack to support our thread engine 219check_sigaltstack() { 220 cat >$tmpdir/check_threads.c <<EOF 221#include <signal.h> 222int main(int argc, char **argv) 223{ 224#ifndef NULL 225 #define NULL (void*)0 226#endif 227 sigaltstack(NULL, NULL); 228 return 0; 229} 230EOF 231 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 1> /dev/null 232 result=$? 233 rm -rf $tmpdir/check_threads* 234 echo $result 235} 236 237# check for availability of Fiber on Win32 to support our thread engine 238check_fiber() { 239 cat >$tmpdir/check_threads.c <<EOF 240#include <windows.h> 241int main(int argc, char **argv) 242{ 243 ConvertThreadToFiber(NULL); 244 return 0; 245} 246EOF 247 $CC -o $tmpdir/check_threads $tmpdir/check_threads.c 2>/dev/null 248 result=$? 249 rm -rf $tmpdir/check_threads* 250 echo $result 251} 252 253simcc () { 254 # default tool setup for native building 255 prefixtools "$CROSS_COMPILE" 256 ARG_ARM_THUMB=0 # can't use thumb in native builds 257 258 # unset arch if already set shcc() and friends 259 arch= 260 arch_version= 261 262 app_type=$1 263 winbuild="" 264 macbuild="" 265 GCCOPTS=`echo $CCOPTS | sed -e s/\ -ffreestanding// -e s/\ -nostdlib//` 266 267 if [ "yes" = "$use_debug" ]; then 268 GCCOPTS=`echo $GCCOPTS | sed -e s/\ -Os/\ -Og/` 269 fi 270 271 GCCOPTS="$GCCOPTS -fno-builtin -g" 272 273 if [ "$ARG_ADDR_SAN" = "1" ] ; then 274 # Use AddressSanitizer! 275 echo "Using AddressSanitizer" 276 GCCOPTS="$GCCOPTS -fsanitize=address -fPIC" 277 LDOPTS="$LDOPTS -fsanitize=address -lasan" 278 fi 279 280 if [ "$ARG_UBSAN" = "1" ] ; then 281 echo "Using UBSan" 282 GCCOPTS="$GCCOPTS -fsanitize=undefined -fPIC" 283 LDOPTS="$LDOPTS -fsanitize=undefined" 284 fi 285 286 # Clear FUNKEY_SDK SDL1.2 path from LDOPTS 287 if [ "$modelname" = "rgnano" ]; then 288 LDOPTS="" 289 fi 290 291 # Some linux setups like to warn about unused results. They are correct, 292 # but cleaning this up is a lot of work. 293 GCCOPTS="$GCCOPTS -Wno-unused-result" 294 GCCOPTIMIZE='' 295 LDOPTS="$LDOPTS -lm" # button-sdl.c uses sqrt() 296 sigaltstack="" 297 fibers="" 298 endian="" # endianess of the dap doesnt matter here 299 300 # build a 32-bit simulator 301 if [ "$ARG_32BIT" = "1" ]; then 302 echo "Building 32-bit simulator" 303 GCCOPTS="$GCCOPTS -m32" 304 LDOPTS="$LDOPTS -m32" 305 fi 306 307 # default output binary name, don't override app_get_platform() 308 if [ "$app_type" != "sdl-app" ]; then 309 output="rockboxui" 310 fi 311 312 # default share option, override below if needed 313 SHARED_LDFLAGS="-shared" 314 SHARED_CFLAGS="-fPIC -fvisibility=hidden" 315 316 if [ "$win32crosscompile" = "yes" ]; then 317 # We are crosscompiling 318 # add cross-compiler option(s) 319 GCCOPTS="$GCCOPTS -Wno-format" 320 LDOPTS="$LDOPTS -mconsole -static" 321 GLOBAL_LDOPTS=`echo $GLOBAL_LDOPTS | sed -e s/\-Wl,-z,defs//` 322 LDOPTS=`echo $LDOPTS | sed -e s/-ldl// -e s/-lrt// -e s/-lasound//` 323 output="$output.exe" 324 winbuild="yes" 325 326 if [ -z "$CROSS_COMPILE" ]; then 327 if [ "$win64" = "yes" ]; then 328 CROSS_COMPILE=${CROSS_COMPILE:-"x86_64-w64-mingw32-"} 329 else 330 # different possible names; try to find the correct one: 331 names="i686-w64-mingw32 i686-pc-mingw32 i586-mingw32msvc" 332 333 for name in $names 334 do 335 if which "${name}-gcc" >/dev/null 2>&1 ; then 336 CROSS_COMPILE="${name}-" 337 break 338 fi 339 done 340 341 if [ -z "$CROSS_COMPILE" ]; then 342 echo "WARNING: unable to find cross-compiler for 32-bit Windows environment!" 343 echo "WARNING: it's none of \"$names\"." 344 echo "WARNING: set your compiler prefix with CROSS_COMPILE=\"your-prefix-\" and" 345 echo "WARNING: re-run configure again!" 346 exit 2 347 fi 348 fi 349 fi 350 SHARED_CFLAGS='' 351 prefixtools "$CROSS_COMPILE" 352 fibers=`check_fiber` 353 endian="little" # windows is little endian 354 echo "Enabling MMX support" 355 # -mno-ms-bitfields is a workaround for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991 356 # mingw-gcc >= 4.7 defaults to -mms-bitfields which breaks __attribute__((packed)) 357 # disable it explicitly for the time being (it doesn't appear to be required for us) 358 GCCOPTS="$GCCOPTS -mmmx -mno-ms-bitfields" 359 else 360 case $uname in 361 CYGWIN*) 362 echo "Cygwin host detected" 363 364 fibers=`check_fiber` 365 LDOPTS="$LDOPTS -mconsole" 366 output="$output.exe" 367 winbuild="yes" 368 SHARED_CFLAGS='' 369 ;; 370 371 MINGW*) 372 echo "MinGW host detected" 373 374 fibers=`check_fiber` 375 LDOPTS="$LDOPTS -mconsole" 376 output="$output.exe" 377 winbuild="yes" 378 ;; 379 380 Linux) 381 sigaltstack=`check_sigaltstack` 382 echo "Linux host detected" 383 LDOPTS="$LDOPTS -ldl" 384 # newer glibc implementations use byteswap.h 385 if echo "#include <byteswap.h>" | gcc -E - > /dev/null 2>&1; then 386 echo "Using byteswap.h" 387 extradefines="$extradefines -DOS_USE_BYTESWAP_H" 388 fi 389 ;; 390 391 FreeBSD) 392 sigaltstack=`check_sigaltstack` 393 echo "FreeBSD host detected" 394 LDOPTS="$LDOPTS" 395 ;; 396 397 Darwin) 398 sigaltstack=`check_sigaltstack` 399 echo "Darwin host detected" 400 if $CC --version | grep -q "clang"; then 401 CC=gcc-15 402 AR=gcc-ar-15 403 CPP=cpp-15 404 fi 405 LDOPTS="$LDOPTS -ldl" 406 SHARED_LDFLAGS="-dynamiclib -Wl,-no_warn_duplicate_libraries" 407 LDMAP_OPT="-map" 408 macbuild="yes" 409 ;; 410 411 SunOS) 412 sigaltstack=`check_sigaltstack` 413 echo "*Solaris host detected" 414 415 GCCOPTS="$GCCOPTS -fPIC" 416 LDOPTS="$LDOPTS -ldl" 417 ;; 418 419 *) 420 echo "[ERROR] Unsupported system: $uname, fix configure and retry" 421 exit 1 422 ;; 423 esac 424 fi 425 426 if [ "$winbuild" != "yes" ] && [ "$macbuild" != "yes" ]; then 427 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" 428 if [ "`uname -m`" = "i686" ]; then 429 echo "Enabling MMX support" 430 GCCOPTS="$GCCOPTS -mmmx" 431 fi 432 fi 433 434 sdl=`findsdl $winbuild` 435 436 if [ -n `echo $app_type | grep "sdl"` ]; then 437 if [ -z "$sdl" ]; then 438 echo "configure didn't find ${sdl_config}, which indicates that you" 439 echo "don't have SDL (properly) installed. Please correct and" 440 echo "re-run configure!" 441 exit 2 442 else 443 echo Using $sdl - version `$sdl --version` 444 445 # generic ${sdl_config} checker 446 sdlccopts=$($sdl --cflags) 447 if $sdl --static-libs > /dev/null 2>&1 ; then 448 sdlldopts=$(CC="$CC" $sdl --static-libs) 449 else 450 echo "Your ${sdl_config} does not know about static libs, falling back to shared library" 451 sdlldopts=$($sdl --libs) 452# if [ "$win32crosscompile" = "yes" ] ; then 453 LDOPTS=`echo $LDOPTS | sed -e s/-static//` 454# fi 455 fi 456 GCCOPTS="$GCCOPTS ${sdlccopts}" 457 LDOPTS="$LDOPTS ${sdlldopts}" 458 fi 459 fi 460 461 462 GCCOPTS="$GCCOPTS -I\$(SIMDIR)" 463 # x86_64 supports MMX by default 464 465 if [ "$endian" = "" ]; then 466 id=$$ 467 cat >$tmpdir/conftest-$id.c <<EOF 468#include <stdio.h> 469int main(int argc, char **argv) 470{ 471int var=0; 472char *varp = (char *)&var; 473*varp=1; 474 475printf("%d\n", var); 476return 0; 477} 478EOF 479 $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null 480 # when cross compiling, the endianess cannot be detected because the above program doesn't run 481 # on the local machine. assume little endian but print a warning 482 endian=`$tmpdir/conftest-$id 2> /dev/null` 483 if [ "$endian" != "" ] && [ $endian -gt "1" ]; then 484 # big endian 485 endian="big" 486 else 487 # little endian 488 endian="little" 489 fi 490 fi 491 492 if [ "$CROSS_COMPILE" != "" ]; then 493 echo "WARNING: Cross Compiling, cannot detect endianess. Assuming $endian endian!" 494 fi 495 496 if [ "$app_type" = "sdl-sim" ]; then 497 echo "Simulator environment deemed $endian endian" 498 elif [ "$app_type" = "sdl-app" ]; then 499 echo "Application environment deemed $endian endian" 500 elif [ "$app_type" = "checkwps" ]; then 501 echo "CheckWPS environment deemed $endian endian" 502 fi 503 504 # use wildcard here to make it work even if it was named *.exe like 505 # on cygwin 506 rm -f $tmpdir/conftest-$id* 507 508 # AddressSanitizer requires SDL threads 509 if [ "$ARG_ADDR_SAN" = "1" ] ; then 510 ARG_THREAD_SUPPORT=1 511 fi 512 if [ "$ARG_UBSAN" = "1" ] ; then 513 ARG_THREAD_SUPPORT=1 514 fi 515 516 thread_support= 517 if [ -z "$ARG_THREAD_SUPPORT" ] || [ "$ARG_THREAD_SUPPORT" = "0" ]; then 518 if [ "$sigaltstack" = "0" ]; then 519 thread_support="HAVE_SIGALTSTACK_THREADS" 520 LDOPTS="$LDOPTS -lpthread" # pthread needed 521 echo "Selected sigaltstack threads" 522 elif [ "$fibers" = "0" ]; then 523 thread_support="HAVE_WIN32_FIBER_THREADS" 524 echo "Selected Win32 Fiber threads" 525 fi 526 fi 527 528 if [ -n `echo $app_type | grep "sdl"` ] && [ -z "$thread_support" ] \ 529 && [ "$ARG_THREAD_SUPPORT" != "0" ]; then 530 thread_support="HAVE_SDL_THREADS" 531 if [ "$ARG_THREAD_SUPPORT" = "1" ]; then 532 echo "Selected SDL threads" 533 else 534 echo "WARNING: Falling back to SDL threads" 535 fi 536 fi 537} 538 539# 540# functions for setting up cross-compiler names and options 541# also set endianess and what the exact recommended gcc version is 542# the gcc version should most likely match what versions we build with 543# rockboxdev.sh 544# 545 546coldfirecc () { 547 prefixtools m68k-elf- 548 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align" 549 GCCOPTIMIZE="-fomit-frame-pointer" 550 endian="big" 551 gccchoice="9.5.0" 552} 553 554arm7tdmicc () { 555 findarmgcc 556 GCCOPTS="$CCOPTS -mcpu=arm7tdmi" 557 GCCOPTIMIZE="-fomit-frame-pointer" 558 endian="little" 559} 560 561arm9tdmicc () { 562 findarmgcc 563 GCCOPTS="$CCOPTS -mcpu=arm9tdmi" 564 GCCOPTIMIZE="-fomit-frame-pointer" 565 endian="little" 566} 567 568arm940tbecc () { 569 findarmgcc 570 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t" 571 GCCOPTIMIZE="-fomit-frame-pointer" 572 endian="big" 573} 574 575arm940tcc () { 576 findarmgcc 577 GCCOPTS="$CCOPTS -mcpu=arm940t" 578 GCCOPTIMIZE="-fomit-frame-pointer" 579 endian="little" 580} 581 582arm926ejscc () { 583 findarmgcc 584 GCCOPTS="$CCOPTS -mcpu=arm926ej-s" 585 GCCOPTIMIZE="-fomit-frame-pointer" 586 endian="little" 587} 588 589arm1136jfscc () { 590 findarmgcc 591 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp" 592 GCCOPTIMIZE="-fomit-frame-pointer" 593 endian="little" 594} 595 596arm1176jzscc () { 597 findarmgcc 598 GCCOPTS="$CCOPTS -mcpu=arm1176jz-s" 599 GCCOPTIMIZE="-fomit-frame-pointer" 600 endian="little" 601} 602 603arm7ejscc () { 604 findarmgcc 605 GCCOPTS="$CCOPTS -march=armv5te" 606 GCCOPTIMIZE="-fomit-frame-pointer" 607 endian="little" 608} 609 610armcortexm7cc () { 611 findarmgcc 612 GCCOPTS="$CCOPTS -march=armv7e-m -mcpu=cortex-m7" 613 GCCOPTIMIZE="-fomit-frame-pointer" 614 endian="little" 615} 616 617mipselcc () { 618 prefixtools mipsel-elf- 619 # mips is predefined, but we want it for paths. use __mips instead 620 GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips" 621 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses" 622 GCCOPTIMIZE="-fomit-frame-pointer" 623 endian="little" 624 gccchoice="9.5.0" 625} 626 627mipsr2elcc () { 628 prefixtools mipsel-elf- 629 # mips is predefined, but we want it for paths. use __mips instead 630 GCCOPTS="$CCOPTS -march=mips32r2 -mno-mips16 -mno-long-calls -Umips" 631 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses" 632 GCCOPTIMIZE="-fomit-frame-pointer" 633 endian="little" 634 gccchoice="9.5.0" 635} 636 637maemocc () { 638 # Scratchbox sets up "gcc" based on the active target 639 prefixtools "" 640 641 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//` 642 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)" 643 GCCOPTIMIZE='' 644 LDOPTS="-lm -ldl $LDOPTS" 645 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" 646 SHARED_LDFLAGS="-shared" 647 SHARED_CFLAGS='' 648 endian="little" 649 thread_support="HAVE_SIGALTSTACK_THREADS" 650 651 is_n900=0 652 # Determine maemo version 653 if pkg-config --atleast-version=5 maemo-version; then 654 if [ "$1" == "4" ]; then 655 echo "ERROR: Maemo 4 SDK required." 656 exit 1 657 fi 658 extradefines="$extradefines -DMAEMO5" 659 echo "Found N900 maemo version" 660 is_n900=1 661 elif pkg-config --atleast-version=4 maemo-version; then 662 if [ "$1" == "5" ]; then 663 echo "ERROR: Maemo 5 SDK required." 664 exit 1 665 fi 666 extradefines="$extradefines -DMAEMO4" 667 echo "Found N8xx maemo version" 668 else 669 echo "Unable to determine maemo version. Is the maemo-version-dev package installed?" 670 exit 1 671 fi 672 673 # SDL 674 if [ $is_n900 -eq 1 ]; then 675 GCCOPTS="$GCCOPTS `pkg-config --cflags sdl`" 676 LDOPTS="$LDOPTS `pkg-config --libs sdl`" 677 else 678 GCCOPTS="$GCCOPTS `${sdl_config} --cflags`" 679 LDOPTS="$LDOPTS `${sdl_config} --libs`" 680 fi 681 682 # glib and libosso support 683 GCCOPTS="$GCCOPTS `pkg-config --cflags libosso glib-2.0 gthread-2.0`" 684 LDOPTS="$LDOPTS `pkg-config --libs libosso glib-2.0 gthread-2.0`" 685 686 # libhal support: Battery monitoring 687 GCCOPTS="$GCCOPTS `pkg-config --cflags hal`" 688 LDOPTS="$LDOPTS `pkg-config --libs hal`" 689 690 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing" 691 if [ $is_n900 -eq 1 ]; then 692 # gstreamer support: Audio output. 693 GCCOPTS="$GCCOPTS `pkg-config --cflags gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`" 694 LDOPTS="$LDOPTS `pkg-config --libs gstreamer-base-0.10 gstreamer-plugins-base-0.10 gstreamer-app-0.10`" 695 696 # N900 specific: libplayback support 697 GCCOPTS="$GCCOPTS `pkg-config --cflags libplayback-1`" 698 LDOPTS="$LDOPTS `pkg-config --libs libplayback-1`" 699 700 # N900 specific: Enable ARMv7 NEON support 701 if sb-conf show -A |grep -q -i arm; then 702 echo "Detected ARM target" 703 GCCOPTS="$GCCOPTS -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp" 704 extradefines="$extradefines -DMAEMO_ARM_BUILD" 705 else 706 echo "Detected x86 target" 707 fi 708 else 709 # N8xx specific: Enable armv5te instructions 710 if sb-conf show -A |grep -q -i arm; then 711 echo "Detected ARM target" 712 GCCOPTS="$GCCOPTS -mcpu=arm1136jf-s -mfloat-abi=softfp -mfpu=vfp" 713 extradefines="$extradefines -DMAEMO_ARM_BUILD" 714 else 715 echo "Detected x86 target" 716 fi 717 fi 718} 719 720pandoracc () { 721 # Note: The new "Ivanovic" pandora toolchain is not able to compile rockbox. 722 # You have to use the sebt3 toolchain: 723 # http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/ 724 725 PNDSDK="/usr/local/angstrom/arm" 726 if [ ! -x $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc ]; then 727 echo "Pandora SDK gcc not found in $PNDSDK/bin/arm-angstrom-linux-gnueabi-gcc" 728 exit 729 fi 730 731 PATH=$PNDSDK/bin:$PATH:$PNDSDK/arm-angstrom-linux-gnueabi/usr/bin 732 PKG_CONFIG_PATH=$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib/pkgconfig 733 LDOPTS="-L$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,$PNDSDK/arm-angstrom-linux-gnueabi/usr/lib $LDOPTS" 734 PKG_CONFIG="pkg-config" 735 736 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//` 737 GCCOPTS="$GCCOPTS -fno-builtin -g -I\$(SIMDIR)" 738 GCCOPTIMIZE='' 739 LDOPTS="-lm -ldl $LDOPTS" 740 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" 741 SHARED_LDFLAGS="-shared" 742 SHARED_CFLAGS='' 743 endian="little" 744 thread_support="HAVE_SIGALTSTACK_THREADS" 745 746 # Include path 747 GCCOPTS="$GCCOPTS -I$PNDSDK/arm-angstrom-linux-gnueabi/usr/include" 748 749 # Set up compiler 750 gccchoice="4.3.3" 751 prefixtools "$PNDSDK/bin/arm-angstrom-linux-gnueabi-" 752 753 # Detect SDL 754 GCCOPTS="$GCCOPTS `$PNDSDK/bin/${sdl_config} --cflags`" 755 LDOPTS="$LDOPTS `$PNDSDK/bin/${sdl_config} --libs`" 756 757 # Compiler options 758 GCCOPTS="$GCCOPTS -O2 -fno-strict-aliasing" 759 GCCOPTS="$GCCOPTS -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp" 760 GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant" 761} 762 763arm1176jzlinuxcc () { 764 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//` 765 # Although the ARM1176JZ-S supports unaligned accesses, those seems to disabled 766 # by the kernel. Since GCC emits unaligned accesses by default on ARMv6, we 767 # need to disable that 768 GCCOPTS="$GCCOPTS -mcpu=arm1176jz-s -mno-unaligned-access -mfloat-abi=softfp" 769 GCCOPTIMIZE='' 770 LDOPTS="-lasound -lpthread -lm -ldl -lrt $LDOPTS" 771 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" # warn about undefined symbols in shared libraries 772 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs -Wl,-z,noexecstack" # Stack is not executable 773 SHARED_LDFLAGS="-shared" 774 SHARED_CFLAGS='' 775 endian="little" 776 app_type="ypr0" 777 778 # Include path 779 GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT" 780 781 # Set up compiler 782 gccchoice="9.5.0" 783 prefixtools "arm-rockbox-linux-gnueabi-" 784} 785 786ypr0cc () { 787 arm1176jzlinuxcc 788 app_type="ypr0" 789} 790 791sonynwzcc () { 792 arm1176jzlinuxcc 793 app_type="sonynwz" 794} 795 796androidcc () { 797 if [ -z "$ANDROID_SDK_PATH" ]; then 798 echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH" 799 echo "environment variable point to the root directory of the Android SDK." 800 exit 801 fi 802 if [ -z "$ANDROID_NDK_PATH" ]; then 803 echo "ERROR: You need the Android NDK installed (r10e to r17) and have the ANDROID_NDK_PATH" 804 echo "environment variable point to the root directory of the Android NDK." 805 exit 806 fi 807 make_toolchain="${ANDROID_NDK_PATH}/build/tools/make-standalone-toolchain.sh" 808 if [ ! -f "$make_toolchain" ]; then 809 echo "ERROR: You need the Android NDK installed (r10e to r17). Please note that" 810 echo "versions newer than r17 are not supported because they do not contain GCC." 811 exit 812 fi 813 814 # the prebuilt android NDK only supports x86_64 architecture anyway, so we can take shortcuts 815 buildhost=$(uname | tr "[:upper:]" "[:lower:]")-x86_64 816 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//` 817 LDOPTS="$LDOPTS -ldl -llog" 818 if [ "$modelname" != "ibassodx50" ] && [ "$modelname" != "ibassodx90" ]; then 819 LDOPTS="$LDOPTS -Wl,-soname,librockbox.so -shared" 820 fi 821 SHARED_LDFLAGS="-shared" 822 SHARED_CFLAGS='' 823 GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack" 824 thread_support="HAVE_SIGALTSTACK_THREADS" 825 ANDROID_ARCH=$2 # for android.make too 826 ANDROID_PLATFORM_VERSION=$1 827 GCCOPTS="$GCCOPTS $3" 828 gccchoice="4.9" 829 rm -rf "${pwd}/android-toolchain" # old toolchain must be removed before running script 830 # arch dependant stuff 831 case $ANDROID_ARCH in 832 armeabi) 833 endian="little" 834 gcctarget="arm-linux-androideabi-" 835 echo "${make_toolchain} --toolchain=arm-linux-androideabi-${gccchoice} --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain" 836 ${make_toolchain} --toolchain=arm-linux-androideabi-${gccchoice} --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain 837 if [ ${?} != 0 ]; then 838 exit 839 fi 840 # Android 4.4 (API 19) doesn't support anything older than armv7. 841 GCCOPTS="$GCCOPTS -fomit-frame-pointer -fuse-ld=bfd" 842 ;; 843 aarch64) 844 endian="little" 845 gcctarget="arm-linux-androideabi-" 846 echo "${make_toolchain} --toolchain=aarch64-linux-android-${gccchoice} --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain" 847 ${make_toolchain} --toolchain=aarch64-linux-android-${gccchoice} --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain 848 if [ ${?} != 0 ]; then 849 exit 850 fi 851 GCCOPTS="$GCCOPTS -fomit-frame-pointer -fuse-ld=bfd" # what default cpu arch/tune to use? 852 ;; 853 mips) 854 endian="little" 855 gcctarget="mipsel-linux-android-" 856 echo "${make_toolchain} --toolchain=mipsel-linux-android-${gccchoice} --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain" 857 ${make_toolchain} --toolchain=mipsel-linux-android-${gccchoice} --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain 858 if [ ${?} != 0 ]; then 859 exit 860 fi 861 GCCOPTS="$GCCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -fomit-frame-pointer -fPIC" 862 ;; 863 x86) 864 endian="little" 865 gcctarget="i686-linux-android-" 866 echo "${make_toolchain} --toolchain=x86-${gccchoice} --platform=android-android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain" 867 ${make_toolchain} --toolchain=x86-${gccchoice} --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain 868 if [ ${?} != 0 ]; then 869 exit 870 fi 871 GCCOPTS="$GCCOPTS -Wa,--noexecstack -ffunction-sections -fomit-frame-pointer" 872 ;; 873 *) 874 echo "ERROR: androidcc(): Unknown target architecture" 875 exit 876 ;; 877 esac 878 879 LDOPTS="$LDOPTS -fuse-ld=bfd --sysroot=${pwd}/android-toolchain/sysroot" 880 GCCOPTS="$GCCOPTS --sysroot=${pwd}/android-toolchain/sysroot" 881 echo "Using endian ${endian}" 882 echo "Using gccchoice ${gccchoice}" 883 echo "Using gcctarget ${gcctarget}" 884 PATH=$PATH:${pwd}/android-toolchain/bin 885 prefixtools $gcctarget 886} 887 888androidndkcc() 889{ 890 if ! [ -d "$ANDROID_NDK_PATH" ]; then 891 echo "ERROR: You need the Android NDK installed (r10e or higher) and have the ANDROID_NDK_PATH" 892 echo "environment variable point to the root directory of the Android NDK." 893 exit 894 fi 895 896 make_toolchain="${ANDROID_NDK_PATH}/build/tools/make-standalone-toolchain.sh" 897 898 if ! [ -e "${make_toolchain}" ]; then 899 echo "ERROR: ${make_toolchain} could not be found." 900 exit 901 fi 902 903 # the prebuilt android NDK only supports x86_64 architecture anyway, so we can take shortcuts 904 buildhost=$(uname -s | tr "[:upper:]" "[:lower:]")-x86_64 905 906 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//` 907 LDOPTS="$LDOPTS -ldl -llog" 908 SHARED_LDFLAGS="-shared" 909 SHARED_CFLAGS='' 910 GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack" 911 912 ANDROID_PLATFORM_VERSION=$1 913 GCCOPTS="$GCCOPTS $3" 914 915 # arch dependant stuff 916 case $2 in 917 armeabi) 918 endian="little" 919 gccchoice="4.9" 920 gcctarget="arm-linux-androideabi-" 921 echo "${make_toolchain} --toolchain=arm-linux-androideabi-4.9 --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain" 922 ${make_toolchain} --toolchain=arm-linux-androideabi-4.9 --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain 923 if [ ${?} != 0 ]; then 924 exit 925 fi 926 GCCOPTS="$GCCOPTS -fomit-frame-pointer" 927 ;; 928 *) 929 echo "ERROR: androidndkcc(): Unknown target architecture" 930 exit 931 ;; 932 esac 933 934 # -fuse-ld=bfd is needed because toolchain defaults to 'gold' 935 # which often crashes when linking. 936 LDOPTS="$LDOPTS -fuse-ld=bfd --sysroot=${pwd}/android-toolchain/sysroot" 937 GCCOPTS="$GCCOPTS -fuse-ld=bfd --sysroot=${pwd}/android-toolchain/sysroot" 938 939 echo "Using endian ${endian}" 940 echo "Using gccchoice ${gccchoice}" 941 echo "Using gcctarget ${gcctarget}" 942 943 PATH=$PATH:${pwd}/android-toolchain/bin 944 prefixtools $gcctarget 945} 946 947mipsellinuxcc () { 948 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//` 949 GCCOPTS="$GCCOPTS -march=mips32r2 -mhard-float -mno-mips16 -mno-long-calls -Umips -fPIC" 950 GCCOPTIMIZE='' 951 LDOPTS="-lasound -lpthread -lm -ldl -lrt $LDOPTS" 952 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" 953 SHARED_LDFLAGS="-shared" 954 SHARED_CFLAGS='-fPIC -fvisibility=hidden' 955 endian="little" 956 thread_support="HAVE_SIGALTSTACK_THREADS" 957 958 # Include path 959 GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT" 960 961 # Set up compiler 962 gccchoice="9.5.0" 963 prefixtools "mipsel-rockbox-linux-gnu-" 964} 965 966rgnanocc () { 967 if [ -z "$FUNKEY_SDK_PATH" ]; then 968 echo "ERROR: You need the FunKey-SDK installed and have the FUNKEY_SDK_PATH" 969 echo "environment variable point to the root directory of the FunKey-SDK." 970 echo "More info at https://wiki.funkey-project.com/wiki/Setting_up_the_SDK" 971 exit 972 fi 973 974 $FUNKEY_SDK_PATH/relocate-sdk.sh 975 976 arch="arm" 977 arch_version="7" 978 arch_profile="classic" 979 980 CC=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-gcc 981 CPP=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-cpp 982 LD=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-ld 983 AR=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-gcc-ar 984 AS=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-as 985 OC=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-objcopy 986 WINDRES=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-windres 987 DLLTOOL=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-dlltool 988 DLLWRAP=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-dllwrap 989 RANLIB=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-gcc-ranlib 990 991 GCCOPTS=`echo $CCOPTS | sed -e s/\ -ffreestanding// -e s/\ -nostdlib//` 992 993 if [ "yes" = "$use_debug" ]; then 994 GCCOPTS=`echo $GCCOPTS | sed -e s/\ -Os/\ -Og/` 995 fi 996 997 GCCOPTS="$GCCOPTS -fno-builtin -g -Wno-unused-result" 998 GCCOPTS="$GCCOPTS -I$FUNKEY_SDK_PATH/arm-funkey-linux-musleabihf/sysroot/usr/include/SDL" 999 GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -D_REENTRANT -masm-syntax-unified" 1000 1001 SHARED_LDFLAGS="-shared" 1002 SHARED_CFLAGS="-fPIC -fvisibility=hidden" 1003 1004 LDOPTS="-lm -ldl $LDOPTS -L$FUNKEY_SDK_PATH/arm-funkey-linux-musleabihf/sysroot/usr/lib -lSDL -lpthread" 1005 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" 1006 1007 thread_support="HAVE_SDL_THREADS" 1008 sdl="$FUNKEY_SDK_PATH/arm-funkey-linux-musleabihf/sysroot/usr/bin/sdl-config" 1009 rbdir="/FunKey/.rockbox" 1010} 1011 1012devkitarmcc () { 1013 if [ -z "$DEVKITPRO" ]; then 1014 echo "ERROR: You need a devkitPro toolchain and libraries installed" 1015 echo "and have the DEVKITPRO environment variable point to the root" 1016 echo "of the devkitPro installation." 1017 echo "More info at https://devkitpro.org/wiki/Getting_Started" 1018 exit 1019 fi 1020 1021 if [ -z "$DEVKITARM" ]; then 1022 echo "ERROR: You need devkitARM toolchain installed and have the DEVKITARM" 1023 echo "environment variable point to the root directory of the sdk." 1024 exit 1025 fi 1026 1027 # check for additional dependencies 1028 if [ ! -e "$DEVKITPRO/portlibs/3ds/lib/libCTRL.a" ]; then 1029 echo "ERROR: You need to install libCTRL utility library." 1030 echo "https://github.com/kynex7510/CTRL" 1031 exit 1032 fi 1033 1034 if [ ! -e "$DEVKITPRO/portlibs/3ds/lib/libdl.a" ]; then 1035 echo "ERROR: You need to install libdl implementation for 3ds (CTRDL)" 1036 echo "https://github.com/kynex7510/CTRDL" 1037 exit 1038 fi 1039 1040 if [ ! -n "`findtool makerom`" ]; then 1041 echo "ERROR: makerom not found, please install and run configure again." 1042 echo "https://github.com/3DSGuy/Project_CTR" 1043 exit 1044 fi 1045 1046 if [ ! -n "`findtool bannertool`" ]; then 1047 echo "ERROR: bannertool not found, please install and run configure again." 1048 echo "https://github.com/carstene1ns/3ds-bannertool" 1049 exit 1050 fi 1051 1052 arch="arm" 1053 arch_version="6" 1054 arch_profile="classic" 1055 1056 CC=$DEVKITARM/bin/arm-none-eabi-gcc 1057 CPP=$DEVKITARM/bin/arm-none-eabi-cpp 1058 LD=$DEVKITARM/bin/arm-none-eabi-ld 1059 AR=$DEVKITARM/bin/arm-none-eabi-gcc-ar 1060 AS=$DEVKITARM/bin/arm-none-eabi-as 1061 OC=$DEVKITARM/bin/arm-none-eabi-objcopy 1062 WINDRES=windres 1063 DLLTOOL=dlltool 1064 DLLWRAP=dllwrap 1065 RANLIB=$DEVKITARM/bin/arm-none-eabi-gcc-ranlib 1066 1067 # default cflags, we need -nostdlib and -ffreestanding for shared libraries to work in devkitARM 1068 GCCOPTS="$CCOPTS" 1069 1070 if [ "yes" = "$use_debug" ]; then 1071 GCCOPTS=`echo $GCCOPTS | sed -e s/\ -Os/\ -Og/` 1072 fi 1073 1074 GCCOPTS="$GCCOPTS -fno-builtin -g -Wno-unused-result" 1075 GCCOPTS="$GCCOPTS -I$DEVKITPRO/libctru/include -I$DEVKITPRO/portlibs/3ds/include" 1076 GCCOPTS="$GCCOPTS -mword-relocations -ffunction-sections -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft" 1077 GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -D_REENTRANT -masm-syntax-unified" 1078 1079 SHARED_LDFLAGS="-shared" 1080 SHARED_CFLAGS="-fPIC -fvisibility=hidden" 1081 1082 LDOPTS="-specs=3dsx.specs -L$DEVKITPRO/libctru/lib -L$DEVKITPRO/portlibs/3ds/lib -ldl -lCTRL -lctru -lm" 1083 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft" 1084 1085 # let's allow building shared libraries even if unresolved symbols are found, 1086 # CTRDL (libdl) implementation will use a custom resolver for resolve symbols at runtime. 1087 # TODO: use ResGen command to automatically detect unresolved symbols. 1088 GLOBAL_LDOPTS=`echo $GLOBAL_LDOPTS | sed -e s/\-Wl,-z,defs//` 1089 1090 # devkitarm already defines getcwd 1091 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-wrap,getcwd" 1092 1093 ARG_PREFIX="romfs" 1094 1095 extradefines="-D__3DS__" 1096 rbdir="/3ds/.rockbox" 1097} 1098 1099 1100do_bootloader() { 1101 appsdir='$(ROOTDIR)/bootloader' 1102 apps="bootloader" 1103 flash="" 1104 if test -n "$boottool"; then 1105 tool="$boottool" 1106 fi 1107 if test -n "$bootoutput"; then 1108 output=$bootoutput 1109 fi 1110 if test -n "$arm_thumb_boot" && test -z "$ARG_ARM_THUMB"; then 1111 ARG_ARM_THUMB=1 1112 fi 1113 extradefines="$extradefines -DBOOTLOADER -ffunction-sections -fdata-sections" 1114 bootloader="1" 1115 if [ -n "${sysfontbl}" ] ; then sysfont=$sysfontbl ; fi 1116} 1117 1118whichadvanced () { 1119 atype=`echo "$1" | cut -c 2-` 1120 ################################################################## 1121 # Prompt for specific developer options 1122 # 1123 if [ "$atype" ]; then 1124 interact= 1125 else 1126 interact=1 1127 echo "" 1128 printf "Enter your developer options (press only enter when done)\n\ 1129(D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (B)ootloader, (P)rofiling, (V)oice, (U)SB Serial,\n\ 1130(W)in32 crosscompile, Win(6)4 crosscompile, (T)est plugins, (O)mit plugins, \n\ 1131S(m)all C lib, Logf to Ser(i)al port, LTO Build(X), (E)rror on warnings" 1132 if [ "$modelname" = "iaudiom5" ]; then 1133 printf ", (F)M radio MOD" 1134 fi 1135 if [ "$modelname" = "iriverh120" ]; then 1136 printf ", (R)TC MOD" 1137 fi 1138 printf ":" 1139 echo "" 1140 fi 1141 1142 cont=1 1143 while [ $cont = "1" ]; do 1144 1145 if [ "$interact" ]; then 1146 option=`input` 1147 else 1148 option=`echo "$atype" | cut -c 1` 1149 fi 1150 1151 case $option in 1152 [Dd]) 1153 if [ "yes" = "$profile" ]; then 1154 echo "Debug is incompatible with profiling" 1155 else 1156 echo "DEBUG build enabled" 1157 use_debug="yes" 1158 fi 1159 ;; 1160 [Ll]) 1161 echo "logf() support enabled" 1162 logf="yes" 1163 ;; 1164 [Mm]) 1165 echo "Using Rockbox' small C library" 1166 extradefines="$extradefines -DHAVE_ROCKBOX_C_LIBRARY" 1167 ;; 1168 [Tt]) 1169 echo "Including test plugins" 1170 extradefines="$extradefines -DHAVE_TEST_PLUGINS" 1171 ;; 1172 [Oo]) 1173 echo "Disabling building of plugins" 1174 plugins="no" 1175 ;; 1176 [Cc]) 1177 echo "bootchart enabled (logf also enabled)" 1178 bootchart="yes" 1179 logf="yes" 1180 ;; 1181 [Ii]) 1182 echo "Logf to serial port enabled (logf also enabled)" 1183 logf="yes" 1184 logf_serial="yes" 1185 ;; 1186 [Ss]) 1187 echo "Simulator build enabled" 1188 simulator="yes" 1189 ;; 1190 [Bb]) 1191 echo "Bootloader build selected" 1192 do_bootloader 1193 ;; 1194 [Pp]) 1195 if [ "yes" = "$use_debug" ]; then 1196 echo "Profiling is incompatible with debug" 1197 else 1198 echo "Profiling support is enabled" 1199 profile="yes" 1200 fi 1201 ;; 1202 [Vv]) 1203 echo "Voice build selected" 1204 voice="yes" 1205 ;; 1206 [Ff]) 1207 if [ "$modelname" = "iaudiom5" ]; then 1208 have_fmradio_in="#define HAVE_FMRADIO_IN" 1209 echo "FM radio functions enabled" 1210 fi 1211 ;; 1212 [Rr]) 1213 if [ "$modelname" = "iriverh120" ]; then 1214 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231" 1215 have_rtc_alarm="#define HAVE_RTC_ALARM" 1216 echo "RTC functions enabled (DS1339/DS3231)" 1217 fi 1218 ;; 1219 [Uu]) 1220 echo "USB Serial support enabled" 1221 use_usb_serial="#define USB_ENABLE_SERIAL" 1222 logf="yes" 1223 ;; 1224 [Ww]) 1225 echo "Enabling Windows cross-compiling (32-bit)" 1226 win32crosscompile="yes" 1227 win64="" 1228 ;; 1229 [6]) 1230 echo "Enabling Windows cross-compiling (64-bit)" 1231 win32crosscompile="yes" 1232 win64="yes" 1233 ;; 1234 [Xx]) 1235 echo "LTO build enabled" 1236 LTO_ARG="export USE_LTO=y" 1237# GCCOPTS=`echo $GCCOPTS | sed -e s/-funit-at-a-time/-flto/` 1238 GCCOPTS="$GCCOPTS -flto" 1239 GLOBAL_LDOPTS="-flto $GLOBAL_LDOPTS" 1240 ;; 1241 [Ee]) 1242 echo "Treating all warnings as errors" 1243 GCCOPTS="$GCCOPTS -Werror" 1244 CCOPTS="$CCOPTS -Werror" 1245 ;; 1246 "") # Match enter press when finished with advanced options 1247 cont=0 1248 ;; 1249 *) 1250 echo "[ERROR] Option $option unsupported" 1251 ;; 1252 esac 1253 if [ "$interact" ]; then 1254 btype="$btype$option" 1255 else 1256 atype=`echo "$atype" | cut -c 2-` 1257 [ "$atype" ] || cont=0 1258 fi 1259 done 1260 echo "done" 1261 1262 if [ "yes" = "$voice" ]; then 1263 # Ask about languages to build 1264 picklang 1265 voicelanguage=`whichlang` 1266 echo "Voice language set to $voicelanguage" 1267 1268 # Configure encoder and TTS engine for each language 1269 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do 1270 voiceconfig "$thislang" 1271 done 1272 if [ -z "$POOL" ] ; then 1273 echo " \$POOL is not set, will use <builddir>/voice-pool by default" 1274 fi 1275 fi 1276 if [ "yes" = "$use_debug" ]; then 1277 debug="-DDEBUG" 1278 GCCOPTS="$GCCOPTS -g -DDEBUG" 1279 fi 1280 if [ "yes" = "$logf" ]; then 1281 use_logf="#define ROCKBOX_HAS_LOGF 1" 1282 fi 1283 if [ "yes" = "$logf_serial" ]; then 1284 use_logf_serial="#define LOGF_SERIAL 1" 1285 fi 1286 if [ "yes" = "$bootchart" ]; then 1287 use_bootchart="#define DO_BOOTCHART 1" 1288 fi 1289 if [ "yes" = "$simulator" ]; then 1290 debug="-DDEBUG" 1291 extradefines="$extradefines -DSIMULATOR -DHAVE_TEST_PLUGINS" 1292 flash="" 1293 fi 1294 if [ "yes" = "$profile" ]; then 1295 extradefines="$extradefines -DRB_PROFILE" 1296 PROFILE_OPTS="-finstrument-functions" 1297 fi 1298} 1299 1300# Configure voice settings 1301voiceconfig () { 1302 thislang=$1 1303 if [ ! "$ARG_TTS" ]; then 1304 echo "Building $thislang voice for $modelname. Select options" 1305 echo "" 1306 fi 1307 1308 if [ -n "`findtool flite`" ]; then 1309 FLITE="F(l)ite " 1310 FLITE_OPTS="" 1311 DEFAULT_TTS="flite" 1312 DEFAULT_TTS_OPTS=$FLITE_OPTS 1313 DEFAULT_CHOICE="l" 1314 fi 1315 if [ -n "`findtool espeak`" ]; then 1316 ESPEAK="(e)Speak " 1317 ESPEAK_OPTS="" 1318 DEFAULT_TTS="espeak" 1319 DEFAULT_TTS_OPTS=$ESPEAK_OPTS 1320 DEFAULT_CHOICE="e" 1321 fi 1322 if [ -n "`findtool espeak-ng`" ]; then 1323 ESPEAK="(e)Speak-ng " 1324 ESPEAK_OPTS="" 1325 DEFAULT_TTS="espeak-ng" 1326 DEFAULT_TTS_OPTS=$ESPEAK_OPTS 1327 DEFAULT_CHOICE="e" 1328 fi 1329 if [ -n "`findtool festival`" ]; then 1330 FESTIVAL="(F)estival " 1331 FESTIVAL_OPTS="" 1332 DEFAULT_TTS="festival" 1333 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS 1334 DEFAULT_CHOICE="f" 1335 fi 1336 if [ -n "`findtool mimic`" ]; then 1337 MIMIC="(M)imic " 1338 MIMIC_OPTS="" 1339 DEFAULT_TTS="mimic" 1340 DEFAULT_TTS_OPTS=$MIMIC_OPTS 1341 DEFAULT_CHOICE="M" 1342 fi 1343 if [ -n "`findtool swift`" ]; then 1344 SWIFT="S(w)ift " 1345 SWIFT_OPTS="" 1346 DEFAULT_TTS="swift" 1347 DEFAULT_TTS_OPTS=$SWIFT_OPTS 1348 DEFAULT_CHOICE="w" 1349 fi 1350 # Allow SAPI if Windows is in use 1351 if [ -n "`findtool winver`" ]; then 1352 SAPI="(S)API " 1353 SAPI_OPTS="" 1354 DEFAULT_TTS="sapi" 1355 DEFAULT_TTS_OPTS=$SAPI_OPTS 1356 DEFAULT_CHOICE="S" 1357 fi 1358 if [ -n "`findtool gtts-cli`" ]; then 1359 GTTS="(g)tts " 1360 GTTS_OPTS="" 1361 DEFAULT_TTS="gtts" 1362 DEFAULT_TTS_OPTS=$GTTS_OPTS 1363 DEFAULT_CHOICE="g" 1364 fi 1365 if [ -n "`findtool piper`" ]; then 1366 PIPER="(p)iper " 1367 PIPER_OPTS="" 1368 DEFAULT_TTS="piper" 1369 DEFAULT_TTS_OPTS=$PIPER_OPTS 1370 DEFAULT_CHOICE="p" 1371 fi 1372 if [ -n "`findtool rbspeak`" ]; then 1373 RBSPEAK="(O)ther " 1374 RBSPEAK_OPTS="" 1375 DEFAULT_TTS="rbspeak" 1376 DEFAULT_TTS_OPTS=$RBSPEAK_OPTS 1377 DEFAULT_CHOICE="O" 1378 fi 1379 1380 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$MIMIC" ] && [ "$MIMIC" = "$SWIFT" ] && [ "$SWIFT" = "$GTTS" ] && [ "$GTTS" = "$PIPER" ] && [ "$PIPER" = "$RBSPEAK" ] ; then 1381 echo "You need Festival, eSpeak, Mimic, Flite, piper, gtts, or rbspeak in your path, or SAPI available to build voice files" 1382 exit 3 1383 fi 1384 1385 if [ "$ARG_TTS" ]; then 1386 option=$ARG_TTS 1387 else 1388 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${MIMIC}${SAPI}${SWIFT}${GTTS}${RBSPEAK}${PIPER}(${DEFAULT_CHOICE})?" 1389 option=`input` 1390 if [ -z "$option" ]; then option=${DEFAULT_CHOICE}; fi 1391 advopts="$advopts --tts=$option" 1392 fi 1393 case "$option" in 1394 [Ll]|flite) 1395 TTS_ENGINE="flite" 1396 TTS_OPTS=$FLITE_OPTS 1397 ;; 1398 [Ee]|espeak) 1399 TTS_ENGINE="espeak" 1400 TTS_OPTS=$ESPEAK_OPTS 1401 ;; 1402 [Ff]|festival) 1403 TTS_ENGINE="festival" 1404 TTS_OPTS=$FESTIVAL_OPTS 1405 ;; 1406 [Mm]|mimic) 1407 TTS_ENGINE="mimic" 1408 TTS_OPTS=$MIMIC_OPTS 1409 ;; 1410 [Ss]|sapi) 1411 TTS_ENGINE="sapi" 1412 TTS_OPTS=$SAPI_OPTS 1413 ;; 1414 [Ww]|swift) 1415 TTS_ENGINE="swift" 1416 TTS_OPTS=$SWIFT_OPTS 1417 ;; 1418 [Gg]|gtts) 1419 TTS_ENGINE="gtts" 1420 TTS_OPTS=$GTTS_OPTS 1421 ;; 1422 [Pp]|piper) 1423 TTS_ENGINE="piper" 1424 TTS_OPTS=$PIPER_OPTS 1425 ;; 1426 [Oo]|rbspeak) 1427 TTS_ENGINE="rbspeak" 1428 TTS_OPTS=$RBSPEAK_OPTS 1429 ;; 1430 *) 1431 TTS_ENGINE=$DEFAULT_TTS 1432 TTS_OPTS=$DEFAULT_TTS_OPTS 1433 esac 1434 echo "Using $TTS_ENGINE for TTS" 1435 1436 # Select which voice to use for Festival 1437 if [ "$TTS_ENGINE" = "festival" ]; then 1438 voicelist=`echo "(voice.list)"|festival -i 2>/dev/null |tr "\n" " "|sed -e 's/.*festival> (\(.*\)) festival>/\1/'|sort` 1439 for voice in $voicelist; do 1440 TTS_FESTIVAL_VOICE="$voice" # Default choice 1441 break 1442 done 1443 if [ "$ARG_VOICE" ]; then 1444 CHOICE=$ARG_VOICE 1445 else 1446 i=1 1447 for voice in $voicelist; do 1448 printf "%3d. %s\n" "$i" "$voice" 1449 i=`expr $i + 1` 1450 done 1451 printf "Please select which Festival voice to use (default is $TTS_FESTIVAL_VOICE): " 1452 CHOICE=`input` 1453 fi 1454 i=1 1455 for voice in $voicelist; do 1456 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then 1457 TTS_FESTIVAL_VOICE="$voice" 1458 fi 1459 i=`expr $i + 1` 1460 done 1461 advopts="$advopts --voice=$CHOICE" 1462 echo "Festival voice set to $TTS_FESTIVAL_VOICE" 1463 echo "(voice_$TTS_FESTIVAL_VOICE)" > festival-prolog.scm 1464 elif [ "$TTS_ENGINE" = "piper" ]; then 1465 if [ -z "$PIPER_MODEL_DIR" ]; then 1466 echo "Please set PIPER_MODEL_DIR!"; 1467 exit 1 1468 fi 1469 models=`(cd $PIPER_MODEL_DIR ; ls -1 *onnx)` 1470 for model in $models; do 1471 PIPER_MODEL="$model" # Default 1472 break; 1473 done 1474 if [ "$ARG_VOICE" ]; then 1475 CHOICE=$ARG_VOICE 1476 else 1477 i=1 1478 for model in $models; do 1479 printf "%3d. %s\n" "$i" "$model" 1480 i=`expr $i + 1` 1481 done 1482 printf "Please select which piper model to use (default is $PIPER_MODEL): " 1483 CHOICE=`input` 1484 fi 1485 i=1 1486 for model in $models; do 1487 if [ "$i" = "$CHOICE" -o "$model" = "$CHOICE" ]; then 1488 PIPER_MODEL="$model" 1489 break; 1490 fi 1491 i=`expr $i + 1` 1492 done 1493 1494 TTS_OPTS="$TTS_OPTS --model $PIPER_MODEL_DIR/$PIPER_MODEL" 1495 advopts="$advopts --voice=$PIPER_MODEL" 1496 echo "Piper model set to $PIPER_MODEL" 1497 elif [ "$TTS_ENGINE" = "mimic" ]; then 1498 voicelist=`mimic -lv | cut -d':' -f2` 1499 for voice in $voicelist; do 1500 TTS_MIMIC_VOICE="$voice" # Default choice 1501 break 1502 done 1503 if [ "$ARG_VOICE" ]; then 1504 CHOICE=$ARG_VOICE 1505 else 1506 i=1 1507 for voice in $voicelist; do 1508 printf "%3d. %s\n" "$i" "$voice" 1509 i=`expr $i + 1` 1510 done 1511 printf "Please select which Mimic voice to use (default is $TTS_MIMIC_VOICE): " 1512 CHOICE=`input` 1513 fi 1514 i=1 1515 for voice in $voicelist; do 1516 if [ "$i" = "$CHOICE" -o "$voice" = "$CHOICE" ]; then 1517 TTS_MIMIC_VOICE="$voice" 1518 break 1519 fi 1520 i=`expr $i + 1` 1521 done 1522 advopts="$advopts --voice=$CHOICE" 1523 echo "Mimic voice set to $TTS_MIMIC_VOICE" 1524 TTS_OPTS="$TTS_OPTS -voice $TTS_MIMIC_VOICE" 1525 elif [ "$TTS_ENGINE" = "espeak" ] ; then 1526 if [ -n "`findtool espeak-ng`" ] ; then 1527 TTS_ENGINE="espeak-ng" 1528 fi 1529 fi 1530 1531 # Read custom tts options from command line 1532 if [ "$ARG_TTSOPTS" ]; then 1533 TTS_OPTS="$ARG_TTSOPTS" 1534 echo "$TTS_ENGINE options set to $TTS_OPTS" 1535 fi 1536 1537 ENCODER="rbspeexenc" 1538 ENC_OPTS="-q 7 -c 10" 1539 1540 echo "Using $ENCODER for encoding voice clips" 1541 1542 # Read custom encoder options from command line 1543 if [ "$ARG_ENCOPTS" ]; then 1544 ENC_OPTS="$ARG_ENCOPTS" 1545 echo "$ENCODER options set to $ENC_OPTS" 1546 fi 1547 1548 TEMPDIR="${pwd}" 1549 if [ -n "`findtool cygpath`" ]; then 1550 TEMPDIR=`cygpath . -a -w` 1551 fi 1552} 1553 1554picklang() { 1555 # figure out which languages that are around 1556 for file in $rootdir/apps/lang/*.lang; do 1557 clean=`basename $file .lang` 1558 langs="$langs $clean" 1559 done 1560 1561 if [ "$ARG_LANG" ]; then 1562 pick=$ARG_LANG 1563 else 1564 echo "Select a number for the language to use (default is english)" 1565 # FIXME The multiple-language feature is currently broken 1566 # echo "You may enter a comma-separated list of languages to build" 1567 1568 num=1 1569 for one in $langs; do 1570 echo "$num. $one" 1571 num=`expr $num + 1` 1572 done 1573 pick=`input` 1574 advopts="$advopts --language=$pick" 1575 fi 1576} 1577 1578whichlang() { 1579 output="" 1580 # Allow the user to pass a comma-separated list of langauges 1581 for thispick in `echo $pick | sed 's/,/ /g'`; do 1582 num=1 1583 for one in $langs; do 1584 # Accept both the language number and name 1585 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then 1586 if [ "$output" = "" ]; then 1587 output=$one 1588 else 1589 output=$output,$one 1590 fi 1591 fi 1592 num=`expr $num + 1` 1593 done 1594 done 1595 if [ -z "$output" ]; then 1596 # pick a default 1597 output="english" 1598 fi 1599 echo $output 1600} 1601 1602help() { 1603 echo "Rockbox configure script." 1604 echo "Invoke this in a directory to generate a Makefile to build Rockbox" 1605 echo "Do *NOT* run this within the tools directory!" 1606 echo "" 1607 cat <<EOF 1608 Usage: configure [OPTION]... 1609 Options: 1610 --target=TARGET Sets the target, TARGET can be either the target ID or 1611 corresponding string. Run without this option to see all 1612 available targets. 1613 1614 --ram=RAM Sets the RAM for certain targets. Even though any number 1615 is accepted, not every number is correct. The default 1616 value will be applied, if you entered a wrong number 1617 (which depends on the target). Watch the output. Run 1618 without this option if you are not sure which the right 1619 number is. 1620 1621 --type=TYPE Sets the build type. Shortcuts are also valid. 1622 Run without this option to see all available types. 1623 Multiple values are allowed and managed in the input 1624 order. So --type=b stands for Bootloader build, while 1625 --type=ab stands for "Backlight MOD" build. 1626 1627 --lcdwidth=X Sets the width of the LCD. Used only for application 1628 targets. 1629 1630 --lcdheight=Y Sets the height of the LCD. Used only for application 1631 targets. 1632 1633 --language=LANG Set the language used for voice generation (used only if 1634 TYPE is AV). 1635 1636 --tts=ENGINE Set the TTS engine used for voice generation (used only 1637 if TYPE is AV). 1638 1639 --voice=VOICE Set voice to use with selected TTS (used only if TYPE is 1640 AV). 1641 1642 --ttsopts=OPTS Set TTS engine manual options (used only if TYPE is AV). 1643 1644 --encopts=OPTS Set encoder manual options (used only if ATYPE is AV). 1645 1646 --rbdir=dir Use alternative rockbox directory (default: ${rbdir}). 1647 This is useful for having multiple alternate builds on 1648 your device that you can load with ROLO. However as the 1649 bootloader looks for .rockbox you won't be able to boot 1650 into this build. 1651 1652 --ccache Enable ccache use (done by default these days) 1653 --no-ccache Disable ccache use 1654 1655 --thumb Build with -mthumb (for ARM builds) 1656 --no-thumb The opposite of --thumb (don't use thumb even for targets 1657 where this is the default 1658 --sdl-threads Force use of SDL threads. They have inferior performance, 1659 but are better debuggable with GDB and valgrind 1660 --no-sdl-threads Disallow use of SDL threads. This prevents the default 1661 behavior of falling back to them if no native thread 1662 support was found. 1663 --with-address-sanitizer 1664 Enables the AddressSanitizer feature. Forces SDL threads. 1665 --with-ubsan Enables the UB Sanitizer feature. Forces SDL threads. 1666 --32-bit Force a 32-bit simulator (use with --sdl-threads for duke3d) 1667 --prefix Target installation directory 1668 --compiler-prefix Override compiler prefix (inherently dangerous) 1669 --help Shows this message (must not be used with other options) 1670 1671EOF 1672 1673 exit 1674} 1675 1676ARG_CCACHE= 1677ARG_ENCOPTS= 1678ARG_LANG= 1679ARG_RAM= 1680ARG_RBDIR= 1681ARG_TARGET= 1682ARG_TTS= 1683ARG_TTSOPTS= 1684ARG_TYPE= 1685ARG_VOICE= 1686ARG_ARM_THUMB= 1687ARG_PREFIX="$PREFIX" 1688ARG_THREAD_SUPPORT= 1689ARG_32BIT= 1690ARG_ADDR_SAN= 1691ARG_UBSAN= 1692err= 1693for arg in "$@"; do 1694 case "$arg" in 1695 --ccache) ARG_CCACHE=1;; 1696 --no-ccache) ARG_CCACHE=0;; 1697 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;; 1698 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;; 1699 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;; 1700 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;; 1701 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;; 1702 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;; 1703 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;; 1704 --tts=*) ARG_TTS=`echo "$arg" | cut -d = -f 2`;; 1705 --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;; 1706 --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;; 1707 --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;; 1708 --thumb) ARG_ARM_THUMB=1;; 1709 --no-thumb) ARG_ARM_THUMB=0;; 1710 --32-bit) ARG_32BIT=1;; 1711 --sdl-threads)ARG_THREAD_SUPPORT=1;; 1712 --no-sdl-threads) 1713 ARG_THREAD_SUPPORT=0;; 1714 --with-address-sanitizer) ARG_ADDR_SAN=1;; 1715 --with-ubsan) ARG_UBSAN=1;; 1716 --prefix=*) ARG_PREFIX=`echo "$arg" | cut -d = -f 2`;; 1717 --compiler-prefix=*) ARG_COMPILER_PREFIX=`echo "$arg" | cut -d = -f 2`;; 1718 --help) help;; 1719 *) err=1; echo "[ERROR] Option '$arg' unsupported";; 1720 esac 1721done 1722[ "$err" ] && exit 1 1723 1724advopts= 1725 1726if [ "$TMPDIR" != "" ]; then 1727 tmpdir=$TMPDIR 1728else 1729 tmpdir=/tmp 1730fi 1731echo Using temporary directory $tmpdir 1732 1733if test -r "configure"; then 1734 # this is a check for a configure script in the current directory, if there 1735 # is one, try to figure out if it is this one! 1736 1737 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then 1738 echo "WEEEEEEEEP. Don't run this configure script within the tools directory." 1739 echo "It will only cause you pain and grief. Instead do this:" 1740 echo "" 1741 echo " cd .." 1742 echo " mkdir build-dir" 1743 echo " cd build-dir" 1744 echo " ../tools/configure" 1745 echo "" 1746 echo "Much happiness will arise from this. Enjoy" 1747 exit 5 1748 fi 1749fi 1750 1751if test -r "tools/configure"; then 1752 # this is a check for a configure script in the tools/ directory, if there 1753 # is one, try to figure out if it is this one! 1754 1755 if { grep "^# Jukebox" tools/configure >/dev/null 2>&1 ; } then 1756 echo "WEEEEEEEEP. Don't run this configure script in the root of the tree." 1757 echo "It will only cause you pain and grief. Instead do this:" 1758 echo "" 1759 echo " mkdir build-dir" 1760 echo " cd build-dir" 1761 echo " ../tools/configure" 1762 echo "" 1763 echo "Much happiness will arise from this. Enjoy" 1764 exit 5 1765 fi 1766fi 1767 1768# get our current directory 1769pwd=`pwd`; 1770 1771if { echo $pwd | grep " "; } then 1772 echo "You're running this script in a path that contains space. The build" 1773 echo "system is unfortunately not clever enough to deal with this. Please" 1774 echo "run the script from a different path, rename the path or fix the build" 1775 echo "system!" 1776 exit 6 1777fi 1778 1779if [ -z "$rootdir" ]; then 1780 ################################################################## 1781 # Figure out where the source code root is! 1782 # 1783 rootdir=`dirname $0`/../ 1784 1785 ##################################################################### 1786 # Convert the possibly relative directory name to an absolute version 1787 # 1788 now=`pwd` 1789 cd $rootdir 1790 rootdir=`pwd` 1791 1792 # cd back to the build dir 1793 cd $now 1794fi 1795 1796apps="apps" 1797appsdir='$(ROOTDIR)/apps' 1798toolsdir='$(ROOTDIR)/tools' 1799 1800 1801################################################################## 1802# Figure out target platform 1803# 1804 1805if [ "$ARG_TARGET" ]; then 1806 buildfor=$ARG_TARGET 1807else 1808 echo "Enter target platform:" 1809cat <<EOF 1810 ==iriver== ==Apple iPod== ==Cowon/iAudio== 1811 10) H120/H140 20) Color/Photo 30) X5/X5V/X5L 1812 11) H320/H340 21) Nano 1G 31) M5/M5L 1813 12) iHP-100/110/115 22) Video 32) D2 1814 13) H10 20Gb 23) 3G 33) M3/M3L 1815 14) H10 5/6Gb 24) 4G Grayscale 1816 25) Mini 1G ==SanDisk== 1817 ==Toshiba== 26) Mini 2G 50) Sansa e200 1818 40) Gigabeat F/X 27) 1G, 2G 51) Sansa e200R 1819 41) Gigabeat S 28) Nano 2G 52) Sansa c200 1820 29) Classic/6G 55) Sansa Clip 1821 ==Olympus= 80) Nano 3G (WIP) 56) Sansa e200v2 1822 70) M:Robe 50 81) Nano 4G (WIP) 57) Sansa m200v4 1823 71) M:Robe 100 58) Sansa Fuze 1824 ==Creative== 59) Sansa c200v2 1825 ==Philips== 89) Zen X-Fi Style 60) Sansa Clipv2 1826 100) GoGear SA9200 90) Zen Vision:M 30GB 61) Sansa View 1827 101) GoGear HDD1630/ 91) Zen Vision:M 60GB 62) Sansa Clip+ 1828 HDD1830 92) Zen Vision 63) Sansa Fuze v2 1829 102) GoGear HDD6330 93) Zen X-Fi2 64) Sansa Fuze+ 1830 94) Zen X-Fi3 65) Sansa Clip Zip 1831 ==Meizu== 95) Zen V 66) Sansa Connect 1832 110) M6SL 96) Zen X-Fi 1833 111) M6SP 97) Zen Mozaic ==Lyre project== 1834 112) M3 98) Zen 130) Lyre proto 1 1835 131) Mini2440 1836 ==Samsung== ==Onda== 1837 140) YH-820 120) VX747 ==Packard Bell== 1838 141) YH-920 122) VX747+ 160) Vibe 500 1839 142) YH-925 121) VX767 1840 143) YP-S3 123) VX777 ==ROCKCHIP== 1841 144) YP-R0 180) rk27xx generic 1842 145) YP-R1 (WIP) ==MPIO== 1843 170) HD200 ==HiFi E.T.== 1844 ==HiFiMAN== 171) HD300 210) MA9 1845 190) HM-60x 211) MA9C 1846 191) HM-801 ==Application== 212) MA8 1847 200) SDL (Generic) 213) MA8C 1848 ==Sony== 201) Android (ARM) 1849 219) NWZ-E350 series 202) Android (MIPS) ==IHIFI== 1850 220) NWZ-E370/E380 series 203) Android (x86) 230) 760 1851 221) NWZ-E360 series 204) Pandora 231) 770 1852 222) NWZ-E450 series 205) Nokia N8xx 232) 770C 1853 223) NWZ-E460 series 206) Nokia N900 233) 800 1854 224) NWZ-E470 series 209) Anbernic RG Nano 234) 960 1855 225) NWZ-E580 series 1856 226) NWZ-A10 series ==AgpTek== ==AIGO== 1857 227) NW-A20 series 240) Rocker 245) Eros Q / K (hosted) 1858 228) NWZ-A860 series 247) Eros Q / K native 1859 229) NWZ-S750 series ==iBasso== (hw1/hw2 bl, all hw rb) 1860 250) DX50 248) Eros Q / K native 1861 ==FiiO== 251) DX90 (hw3 bl only) 1862 244) M3K Linux 249) Eros Q / K native 1863 246) M3K baremetal ==xDuoo== (hw4 bl only) 1864 241) X3 1865 ==Shanling== 242) X3II ==Nintendo== 1866 260) Q1 243) X20 290) Nintendo 3DS (WIP) 1867 1868 ==Echo project== ==Surfans== 1869 270) Echo R1 (WIP) 280) F28 (WIP) 1870EOF 1871 1872 buildfor=`input`; 1873 1874fi 1875 # Set of tools built for all target platforms: 1876 toolset="rdf2binary convbdf codepages" 1877 1878 # Toolsets for some target families: 1879 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb" 1880 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb" 1881 ipodbitmaptools="$toolset scramble bmp2rb" 1882 gigabeatbitmaptools="$toolset scramble descramble bmp2rb" 1883 tccbitmaptools="$toolset scramble bmp2rb" 1884 # generic is used by IFP, Meizu and Onda 1885 genericbitmaptools="$toolset bmp2rb" 1886 # scramble is used by all other targets 1887 scramblebitmaptools="$genericbitmaptools scramble" 1888 # used by X1000 targets 1889 x1000tools="$genericbitmaptools scramble mkspl-x1000 uclpack" 1890 1891 # ---- For each target ---- 1892 # 1893 # *Variables* 1894 # target_id: a unique number identifying this target, IS NOT the menu number. 1895 # Just use the currently highest number+1 when you add a new 1896 # target. 1897 # modelname: short model name used all over to identify this target 1898 # memory: number of megabytes of RAM this target has. If the amount can 1899 # be selected by the size prompt, let memory be unset here 1900 # Note for hosted/application builds, (memory-1) defines the 1901 # audiobuffer size; actual memory usage will likely be 1902 # larger and is found in rockbox-info.txt after compilation. 1903 # target: -Ddefine passed to the build commands to make the correct 1904 # config-*.h file get included etc 1905 # tool: the tool that takes a plain binary and converts that into a 1906 # working "firmware" file for your target 1907 # output: the final output file name 1908 # boottool: the tool that takes a plain binary and generates a bootloader 1909 # file for your target (or blank to use $tool) 1910 # bootoutput:the final output file name for the bootloader (or blank to use 1911 # $output) 1912 # appextra: passed to the APPEXTRA variable in the Makefiles. 1913 # TODO: add proper explanation 1914 # flash: name of output for flashing, for targets where there's a special 1915 # file output for this. 1916 # plugins: set to 'yes' to build the plugins. Early development builds can 1917 # set this to no in the early stages to have an easier life for a 1918 # while 1919 # toolset: lists what particular tools in the tools/ directory that this 1920 # target needs to have built prior to building Rockbox 1921 # 1922 # *Functions* 1923 # *cc: sets up gcc and compiler options for your target builds. Note 1924 # that if you select a simulator build, the compiler selection is 1925 # overridden later in the script. 1926 1927 case $buildfor in 1928 1929 10|iriverh120) 1930 target_id=9 1931 modelname="iriverh120" 1932 target="IRIVER_H120" 1933 memory=32 # always 1934 coldfirecc 1935 tool="$rootdir/tools/scramble -add=h120" 1936 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 1937 bmp2rb_native="$rootdir/tools/bmp2rb -f 2" 1938 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 1939 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0" 1940 output="rockbox.iriver" 1941 bootoutput="bootloader.iriver" 1942 appextra="recorder:gui:radio" 1943 flash="$pwd/rombox.iriver" 1944 plugins="yes" 1945 # toolset is the tools within the tools directory that we build for 1946 # this particular target. 1947 toolset=$iriverbitmaptools 1948 t_cpu="coldfire" 1949 t_manufacturer="iriver" 1950 t_model="h100" 1951 ;; 1952 1953 11|iriverh300) 1954 target_id=10 1955 modelname="iriverh300" 1956 target="IRIVER_H300" 1957 memory=32 # always 1958 coldfirecc 1959 tool="$rootdir/tools/scramble -add=h300" 1960 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 1961 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 1962 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 1963 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0" 1964 output="rockbox.iriver" 1965 bootoutput="bootloader.iriver" 1966 appextra="recorder:gui:radio" 1967 flash="$pwd/rombox.iriver" 1968 plugins="yes" 1969 # toolset is the tools within the tools directory that we build for 1970 # this particular target. 1971 toolset=$iriverbitmaptools 1972 t_cpu="coldfire" 1973 t_manufacturer="iriver" 1974 t_model="h300" 1975 ;; 1976 1977 12|iriverh100) 1978 target_id=11 1979 modelname="iriverh100" 1980 target="IRIVER_H100" 1981 memory=16 # always 1982 coldfirecc 1983 tool="$rootdir/tools/scramble -add=h100" 1984 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 1985 bmp2rb_native="$rootdir/tools/bmp2rb -f 2" 1986 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 1987 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0" 1988 output="rockbox.iriver" 1989 bootoutput="bootloader.iriver" 1990 appextra="recorder:gui:radio" 1991 flash="$pwd/rombox.iriver" 1992 plugins="yes" 1993 # toolset is the tools within the tools directory that we build for 1994 # this particular target. 1995 toolset=$iriverbitmaptools 1996 t_cpu="coldfire" 1997 t_manufacturer="iriver" 1998 t_model="h100" 1999 ;; 2000 2001 13|iriverh10) 2002 target_id=22 2003 modelname="iriverh10" 2004 target="IRIVER_H10" 2005 memory=32 # always 2006 arm7tdmicc 2007 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS" 2008 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2009 bmp2rb_native="$rootdir/tools/bmp2rb -f 5" 2010 output="rockbox.mi4" 2011 appextra="recorder:gui:radio" 2012 plugins="yes" 2013 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL" 2014 bootoutput="H10_20GC.mi4" 2015 # toolset is the tools within the tools directory that we build for 2016 # this particular target. 2017 toolset=$scramblebitmaptools 2018 # architecture, manufacturer and model for the target-tree build 2019 t_cpu="arm" 2020 t_soc="pp" 2021 t_manufacturer="iriver" 2022 t_model="h10" 2023 ;; 2024 2025 14|iriverh10_5gb) 2026 target_id=24 2027 modelname="iriverh10_5gb" 2028 target="IRIVER_H10_5GB" 2029 memory=32 # always 2030 arm7tdmicc 2031 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS" 2032 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2033 bmp2rb_native="$rootdir/tools/bmp2rb -f 5" 2034 output="rockbox.mi4" 2035 appextra="recorder:gui:radio" 2036 plugins="yes" 2037 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL" 2038 bootoutput="H10.mi4" 2039 # toolset is the tools within the tools directory that we build for 2040 # this particular target. 2041 toolset=$scramblebitmaptools 2042 # architecture, manufacturer and model for the target-tree build 2043 t_cpu="arm" 2044 t_soc="pp" 2045 t_manufacturer="iriver" 2046 t_model="h10" 2047 ;; 2048 2049 20|ipodcolor) 2050 target_id=13 2051 modelname="ipodcolor" 2052 target="IPOD_COLOR" 2053 memory=32 # always 2054 arm7tdmicc 2055 tool="$rootdir/tools/scramble -add=ipco" 2056 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2057 bmp2rb_native="$rootdir/tools/bmp2rb -f 5" 2058 output="rockbox.ipod" 2059 appextra="recorder:gui:radio" 2060 plugins="yes" 2061 bootoutput="bootloader-$modelname.ipod" 2062 # toolset is the tools within the tools directory that we build for 2063 # this particular target. 2064 toolset=$ipodbitmaptools 2065 # architecture, manufacturer and model for the target-tree build 2066 t_cpu="arm" 2067 t_soc="pp" 2068 t_manufacturer="ipod" 2069 t_model="color" 2070 ;; 2071 2072 21|ipodnano1g) 2073 target_id=14 2074 modelname="ipodnano1g" 2075 target="IPOD_NANO" 2076 memory=32 # always 2077 arm7tdmicc 2078 tool="$rootdir/tools/scramble -add=nano" 2079 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2080 bmp2rb_native="$rootdir/tools/bmp2rb -f 5" 2081 output="rockbox.ipod" 2082 appextra="recorder:gui:radio" 2083 plugins="yes" 2084 bootoutput="bootloader-$modelname.ipod" 2085 # toolset is the tools within the tools directory that we build for 2086 # this particular target. 2087 toolset=$ipodbitmaptools 2088 # architecture, manufacturer and model for the target-tree build 2089 t_cpu="arm" 2090 t_soc="pp" 2091 t_manufacturer="ipod" 2092 t_model="nano" 2093 ;; 2094 2095 22|ipodvideo) 2096 target_id=15 2097 modelname="ipodvideo" 2098 target="IPOD_VIDEO" 2099 memory=64 # always. This is reduced at runtime if needed 2100 arm7tdmicc 2101 tool="$rootdir/tools/scramble -add=ipvd" 2102 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2103 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2104 output="rockbox.ipod" 2105 appextra="recorder:gui:radio" 2106 plugins="yes" 2107 bootoutput="bootloader-$modelname.ipod" 2108 # toolset is the tools within the tools directory that we build for 2109 # this particular target. 2110 toolset=$ipodbitmaptools 2111 # architecture, manufacturer and model for the target-tree build 2112 t_cpu="arm" 2113 t_soc="pp" 2114 t_manufacturer="ipod" 2115 t_model="video" 2116 ;; 2117 2118 23|ipod3g) 2119 target_id=16 2120 modelname="ipod3g" 2121 target="IPOD_3G" 2122 memory=32 # always 2123 arm7tdmicc 2124 tool="$rootdir/tools/scramble -add=ip3g" 2125 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2126 bmp2rb_native="$rootdir/tools/bmp2rb -f 6" 2127 output="rockbox.ipod" 2128 appextra="recorder:gui:radio" 2129 plugins="yes" 2130 bootoutput="bootloader-$modelname.ipod" 2131 # toolset is the tools within the tools directory that we build for 2132 # this particular target. 2133 toolset=$ipodbitmaptools 2134 # architecture, manufacturer and model for the target-tree build 2135 t_cpu="arm" 2136 t_soc="pp" 2137 t_manufacturer="ipod" 2138 t_model="3g" 2139 ;; 2140 2141 24|ipod4g) 2142 target_id=17 2143 modelname="ipod4g" 2144 target="IPOD_4G" 2145 memory=32 # always 2146 arm7tdmicc 2147 tool="$rootdir/tools/scramble -add=ip4g" 2148 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2149 bmp2rb_native="$rootdir/tools/bmp2rb -f 6" 2150 output="rockbox.ipod" 2151 appextra="recorder:gui:radio" 2152 plugins="yes" 2153 bootoutput="bootloader-$modelname.ipod" 2154 # toolset is the tools within the tools directory that we build for 2155 # this particular target. 2156 toolset=$ipodbitmaptools 2157 # architecture, manufacturer and model for the target-tree build 2158 t_cpu="arm" 2159 t_soc="pp" 2160 t_manufacturer="ipod" 2161 t_model="4g" 2162 ;; 2163 2164 25|ipodmini1g) 2165 target_id=18 2166 modelname="ipodmini1g" 2167 target="IPOD_MINI" 2168 memory=32 # always 2169 arm7tdmicc 2170 tool="$rootdir/tools/scramble -add=mini" 2171 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2172 bmp2rb_native="$rootdir/tools/bmp2rb -f 6" 2173 output="rockbox.ipod" 2174 appextra="recorder:gui:radio" 2175 plugins="yes" 2176 bootoutput="bootloader-$modelname.ipod" 2177 # toolset is the tools within the tools directory that we build for 2178 # this particular target. 2179 toolset=$ipodbitmaptools 2180 # architecture, manufacturer and model for the target-tree build 2181 t_cpu="arm" 2182 t_soc="pp" 2183 t_manufacturer="ipod" 2184 t_model="mini" 2185 ;; 2186 2187 26|ipodmini2g) 2188 target_id=21 2189 modelname="ipodmini2g" 2190 target="IPOD_MINI2G" 2191 memory=32 # always 2192 arm7tdmicc 2193 tool="$rootdir/tools/scramble -add=mn2g" 2194 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2195 bmp2rb_native="$rootdir/tools/bmp2rb -f 6" 2196 output="rockbox.ipod" 2197 appextra="recorder:gui:radio" 2198 plugins="yes" 2199 bootoutput="bootloader-$modelname.ipod" 2200 # toolset is the tools within the tools directory that we build for 2201 # this particular target. 2202 toolset=$ipodbitmaptools 2203 # architecture, manufacturer and model for the target-tree build 2204 t_cpu="arm" 2205 t_soc="pp" 2206 t_manufacturer="ipod" 2207 t_model="mini2g" 2208 ;; 2209 2210 27|ipod1g2g) 2211 target_id=29 2212 modelname="ipod1g2g" 2213 target="IPOD_1G2G" 2214 memory=32 # always 2215 arm7tdmicc 2216 tool="$rootdir/tools/scramble -add=1g2g" 2217 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2218 bmp2rb_native="$rootdir/tools/bmp2rb -f 6" 2219 output="rockbox.ipod" 2220 appextra="recorder:gui:radio" 2221 plugins="yes" 2222 bootoutput="bootloader-$modelname.ipod" 2223 # toolset is the tools within the tools directory that we build for 2224 # this particular target. 2225 toolset=$ipodbitmaptools 2226 # architecture, manufacturer and model for the target-tree build 2227 t_cpu="arm" 2228 t_soc="pp" 2229 t_manufacturer="ipod" 2230 t_model="1g2g" 2231 ;; 2232 2233 28|ipodnano2g) 2234 target_id=62 2235 modelname="ipodnano2g" 2236 target="IPOD_NANO2G" 2237 memory=32 # always 2238 arm940tcc 2239 tool="$rootdir/tools/scramble -add=nn2g" 2240 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2241 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2242 output="rockbox.ipod" 2243 appextra="recorder:gui:radio" 2244 plugins="yes" 2245 bootoutput="bootloader-$modelname.ipod" 2246 # toolset is the tools within the tools directory that we build for 2247 # this particular target. 2248 toolset=$ipodbitmaptools 2249 # architecture, manufacturer and model for the target-tree build 2250 t_cpu="arm" 2251 t_manufacturer="s5l8700" 2252 t_model="ipodnano2g" 2253 ;; 2254 2255 29|ipod6g) 2256 target_id=71 2257 modelname="ipod6g" 2258 target="IPOD_6G" 2259 memory=64 # always 2260 arm926ejscc 2261 tool="$rootdir/tools/scramble -add=ip6g" 2262 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2263 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2264 output="rockbox.ipod" 2265 appextra="recorder:gui:radio" 2266 plugins="yes" 2267 bootoutput="bootloader-$modelname.ipod" 2268 # toolset is the tools within the tools directory that we build for 2269 # this particular target. 2270 toolset=$ipodbitmaptools 2271 # architecture, manufacturer and model for the target-tree build 2272 t_cpu="arm" 2273 t_manufacturer="s5l8702" 2274 t_model="ipod6g" 2275 ;; 2276 2277 30|iaudiox5) 2278 target_id=12 2279 modelname="iaudiox5" 2280 target="IAUDIO_X5" 2281 memory=16 # always 2282 coldfirecc 2283 tool="$rootdir/tools/scramble -add=iax5" 2284 boottool="$rootdir/tools/scramble -iaudiox5" 2285 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2286 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2287 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 2288 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7" 2289 output="rockbox.iaudio" 2290 bootoutput="x5_fw.bin" 2291 appextra="recorder:gui:radio" 2292 plugins="yes" 2293 # toolset is the tools within the tools directory that we build for 2294 # this particular target. 2295 toolset="$iaudiobitmaptools" 2296 # architecture, manufacturer and model for the target-tree build 2297 t_cpu="coldfire" 2298 t_manufacturer="iaudio" 2299 t_model="x5" 2300 ;; 2301 2302 31|iaudiom5) 2303 target_id=28 2304 modelname="iaudiom5" 2305 target="IAUDIO_M5" 2306 memory=16 # always 2307 coldfirecc 2308 tool="$rootdir/tools/scramble -add=iam5" 2309 boottool="$rootdir/tools/scramble -iaudiom5" 2310 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2311 bmp2rb_native="$rootdir/tools/bmp2rb -f 2" 2312 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 2313 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7" 2314 output="rockbox.iaudio" 2315 bootoutput="m5_fw.bin" 2316 appextra="recorder:gui:radio" 2317 plugins="yes" 2318 # toolset is the tools within the tools directory that we build for 2319 # this particular target. 2320 toolset="$iaudiobitmaptools" 2321 # architecture, manufacturer and model for the target-tree build 2322 t_cpu="coldfire" 2323 t_manufacturer="iaudio" 2324 t_model="m5" 2325 ;; 2326 2327 32|cowond2) 2328 target_id=34 2329 modelname="cowond2" 2330 target="COWON_D2" 2331 memory=32 2332 arm926ejscc 2333 tool="$rootdir/tools/scramble -add=d2" 2334 boottool="cp " 2335 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2336 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2337 output="rockbox.d2" 2338 bootoutput="bootloader-cowond2.bin" 2339 appextra="recorder:gui:radio" 2340 plugins="yes" 2341 toolset="$tccbitmaptools" 2342 # architecture, manufacturer and model for the target-tree build 2343 t_cpu="arm" 2344 t_manufacturer="tcc780x" 2345 t_model="cowond2" 2346 ;; 2347 2348 33|iaudiom3) 2349 target_id=37 2350 modelname="iaudiom3" 2351 target="IAUDIO_M3" 2352 memory=16 # always 2353 coldfirecc 2354 tool="$rootdir/tools/scramble -add=iam3" 2355 boottool="$rootdir/tools/scramble -iaudiom3" 2356 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2357 bmp2rb_native="$rootdir/tools/bmp2rb -f 7" 2358 output="rockbox.iaudio" 2359 bootoutput="cowon_m3.bin" 2360 appextra="recorder:gui:radio" 2361 plugins="yes" 2362 # toolset is the tools within the tools directory that we build for 2363 # this particular target. 2364 toolset="$iaudiobitmaptools" 2365 # architecture, manufacturer and model for the target-tree build 2366 t_cpu="coldfire" 2367 t_manufacturer="iaudio" 2368 t_model="m3" 2369 ;; 2370 2371 40|gigabeatfx) 2372 target_id=20 2373 modelname="gigabeatfx" 2374 target="GIGABEAT_F" 2375 memory=32 # always 2376 arm9tdmicc 2377 tool="$rootdir/tools/scramble -add=giga" 2378 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2379 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2380 output="rockbox.gigabeat" 2381 appextra="recorder:gui:radio" 2382 plugins="yes" 2383 toolset=$gigabeatbitmaptools 2384 boottool="$rootdir/tools/scramble -gigabeat" 2385 bootoutput="FWIMG01.DAT" 2386 # architecture, manufacturer and model for the target-tree build 2387 t_cpu="arm" 2388 t_manufacturer="s3c2440" 2389 t_model="gigabeat-fx" 2390 ;; 2391 2392 41|gigabeats) 2393 target_id=26 2394 modelname="gigabeats" 2395 target="GIGABEAT_S" 2396 memory=64 2397 arm1136jfscc 2398 tool="$rootdir/tools/scramble -add=gigs" 2399 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2400 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2401 output="rockbox.gigabeat" 2402 appextra="recorder:gui:radio" 2403 plugins="yes" 2404 toolset="$gigabeatbitmaptools" 2405 boottool="$rootdir/tools/scramble -gigabeats" 2406 bootoutput="nk.bin" 2407 # architecture, manufacturer and model for the target-tree build 2408 t_cpu="arm" 2409 t_manufacturer="imx31" 2410 t_model="gigabeat-s" 2411 ;; 2412 2413 50|sansae200) 2414 target_id=23 2415 modelname="sansae200" 2416 target="SANSA_E200" 2417 memory=32 # supposedly 2418 arm7tdmicc 2419 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS" 2420 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2421 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2422 output="rockbox.mi4" 2423 appextra="recorder:gui:radio" 2424 plugins="yes" 2425 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL" 2426 bootoutput="PP5022.mi4" 2427 # toolset is the tools within the tools directory that we build for 2428 # this particular target. 2429 toolset=$scramblebitmaptools 2430 # architecture, manufacturer and model for the target-tree build 2431 t_cpu="arm" 2432 t_soc="pp" 2433 t_manufacturer="sandisk" 2434 t_model="sansa-e200" 2435 ;; 2436 2437 51|sansae200r) 2438 # the e200R model is pretty much identical to the e200, it only has a 2439 # different option to the scramble tool when building a bootloader and 2440 # makes the bootloader output file name in all lower case. 2441 target_id=27 2442 modelname="sansae200r" 2443 target="SANSA_E200" 2444 memory=32 # supposedly 2445 arm7tdmicc 2446 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS" 2447 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2448 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2449 output="rockbox.mi4" 2450 appextra="recorder:gui:radio" 2451 plugins="yes" 2452 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL" 2453 bootoutput="pp5022.mi4" 2454 # toolset is the tools within the tools directory that we build for 2455 # this particular target. 2456 toolset=$scramblebitmaptools 2457 # architecture, manufacturer and model for the target-tree build 2458 t_cpu="arm" 2459 t_soc="pp" 2460 t_manufacturer="sandisk" 2461 t_model="sansa-e200" 2462 ;; 2463 2464 52|sansac200) 2465 target_id=30 2466 modelname="sansac200" 2467 target="SANSA_C200" 2468 memory=32 # supposedly 2469 arm7tdmicc 2470 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS" 2471 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2472 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2473 output="rockbox.mi4" 2474 appextra="recorder:gui:radio" 2475 plugins="yes" 2476 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL" 2477 bootoutput="firmware.mi4" 2478 # toolset is the tools within the tools directory that we build for 2479 # this particular target. 2480 toolset=$scramblebitmaptools 2481 # architecture, manufacturer and model for the target-tree build 2482 t_cpu="arm" 2483 t_soc="pp" 2484 t_manufacturer="sandisk" 2485 t_model="sansa-c200" 2486 ;; 2487 2488 55|sansaclip) 2489 target_id=50 2490 modelname="sansaclip" 2491 target="SANSA_CLIP" 2492 memory=2 2493 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2494 bmp2rb_native="$bmp2rb_mono" 2495 tool="$rootdir/tools/scramble -add=clip" 2496 output="rockbox.sansa" 2497 bootoutput="bootloader-clip.sansa" 2498 appextra="recorder:gui:radio" 2499 plugins="yes" 2500 toolset=$scramblebitmaptools 2501 t_cpu="arm" 2502 t_manufacturer="as3525" 2503 t_model="sansa-clip" 2504 sysfont="08-Rockfont" 2505 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi 2506 arm9tdmicc 2507 ;; 2508 2509 56|sansae200v2) 2510 target_id=51 2511 modelname="sansae200v2" 2512 target="SANSA_E200V2" 2513 memory=8 2514 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2515 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2516 tool="$rootdir/tools/scramble -add=e2v2" 2517 output="rockbox.sansa" 2518 bootoutput="bootloader-e200v2.sansa" 2519 appextra="recorder:gui:radio" 2520 plugins="yes" 2521 toolset=$scramblebitmaptools 2522 arm_thumb_boot=1 2523 t_cpu="arm" 2524 t_manufacturer="as3525" 2525 t_model="sansa-e200v2" 2526 arm9tdmicc 2527 ;; 2528 2529 57|sansam200v4) 2530 target_id=52 2531 modelname="sansam200v4" 2532 target="SANSA_M200V4" 2533 memory=2 2534 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2535 bmp2rb_native="$bmp2rb_mono" 2536 tool="$rootdir/tools/scramble -add=m2v4" 2537 output="rockbox.sansa" 2538 bootoutput="bootloader-m200v4.sansa" 2539 appextra="recorder:gui:radio" 2540 plugins="yes" 2541 toolset=$scramblebitmaptools 2542 t_cpu="arm" 2543 t_manufacturer="as3525" 2544 t_model="sansa-m200v4" 2545 sysfont="08-Rockfont" 2546 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi 2547 arm9tdmicc 2548 ;; 2549 2550 58|sansafuze) 2551 target_id=53 2552 modelname="sansafuze" 2553 target="SANSA_FUZE" 2554 memory=8 2555 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2556 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2557 tool="$rootdir/tools/scramble -add=fuze" 2558 output="rockbox.sansa" 2559 bootoutput="bootloader-fuze.sansa" 2560 appextra="recorder:gui:radio" 2561 plugins="yes" 2562 toolset=$scramblebitmaptools 2563 t_cpu="arm" 2564 t_manufacturer="as3525" 2565 t_model="sansa-fuze" 2566 arm9tdmicc 2567 ;; 2568 2569 59|sansac200v2) 2570 target_id=55 2571 modelname="sansac200v2" 2572 target="SANSA_C200V2" 2573 memory=2 # as per OF diagnosis mode 2574 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2575 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2576 tool="$rootdir/tools/scramble -add=c2v2" 2577 output="rockbox.sansa" 2578 bootoutput="bootloader-c200v2.sansa" 2579 appextra="recorder:gui:radio" 2580 plugins="yes" 2581 # toolset is the tools within the tools directory that we build for 2582 # this particular target. 2583 toolset=$scramblebitmaptools 2584 # architecture, manufacturer and model for the target-tree build 2585 t_cpu="arm" 2586 t_manufacturer="as3525" 2587 t_model="sansa-c200v2" 2588 if [ "$ARG_ARM_THUMB" != 0 ]; then ARG_ARM_THUMB=1; fi 2589 arm9tdmicc 2590 ;; 2591 2592 60|sansaclipv2) 2593 target_id=60 2594 modelname="sansaclipv2" 2595 target="SANSA_CLIPV2" 2596 memory=8 2597 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2598 bmp2rb_native="$bmp2rb_mono" 2599 tool="$rootdir/tools/scramble -add=clv2" 2600 output="rockbox.sansa" 2601 bootoutput="bootloader-clipv2.sansa" 2602 appextra="recorder:gui:radio" 2603 plugins="yes" 2604 toolset=$scramblebitmaptools 2605 t_cpu="arm" 2606 t_manufacturer="as3525" 2607 t_model="sansa-clipv2" 2608 sysfont="08-Rockfont" 2609 arm926ejscc 2610 ;; 2611 2612 61|sansaview) 2613 target_id=63 2614 modelname="sansaview" 2615 target="SANSA_VIEW" 2616 memory=32 2617 arm1176jzscc 2618 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2619 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2620 output="rockbox.mi4" 2621 appextra="gui" 2622 plugins="" 2623 boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL" 2624 bootoutput="firmware.mi4" 2625 # toolset is the tools within the tools directory that we build for 2626 # this particular target. 2627 toolset=$scramblebitmaptools 2628 t_cpu="arm" 2629 t_soc="pp" 2630 t_manufacturer="sandisk" 2631 t_model="sansa-view" 2632 ;; 2633 2634 62|sansaclipplus) 2635 target_id=66 2636 modelname="sansaclipplus" 2637 target="SANSA_CLIPPLUS" 2638 memory=8 2639 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2640 bmp2rb_native="$bmp2rb_mono" 2641 tool="$rootdir/tools/scramble -add=cli+" 2642 output="rockbox.sansa" 2643 bootoutput="bootloader-clipplus.sansa" 2644 appextra="recorder:gui:radio" 2645 plugins="yes" 2646 toolset=$scramblebitmaptools 2647 t_cpu="arm" 2648 t_manufacturer="as3525" 2649 t_model="sansa-clipplus" 2650 sysfont="08-Rockfont" 2651 arm926ejscc 2652 ;; 2653 2654 63|sansafuzev2) 2655 target_id=68 2656 modelname="sansafuzev2" 2657 target="SANSA_FUZEV2" 2658 memory=8 # not sure 2659 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2660 bmp2rb_native="$rootdir/tools/bmp2rb -f 5" 2661 tool="$rootdir/tools/scramble -add=fuz2" 2662 output="rockbox.sansa" 2663 bootoutput="bootloader-fuzev2.sansa" 2664 appextra="recorder:gui:radio" 2665 plugins="yes" 2666 toolset=$scramblebitmaptools 2667 t_cpu="arm" 2668 t_manufacturer="as3525" 2669 t_model="sansa-fuzev2" 2670 arm926ejscc 2671 ;; 2672 2673 64|sansafuzeplus) 2674 target_id=80 2675 modelname="sansafuzeplus" 2676 target="SANSA_FUZEPLUS" 2677 memory=64 2678 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2679 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2680 tool="$rootdir/tools/scramble -add=fuz+" 2681 output="rockbox.sansa" 2682 bootoutput="bootloader-fuzeplus.sansa" 2683 appextra="gui:recorder:radio" 2684 plugins="yes" 2685 toolset=$scramblebitmaptools 2686 t_cpu="arm" 2687 t_manufacturer="imx233" 2688 t_model="sansa-fuzeplus" 2689 arm926ejscc 2690 ;; 2691 2692 65|sansaclipzip) 2693 target_id=68 2694 modelname="sansaclipzip" 2695 target="SANSA_CLIPZIP" 2696 memory=8 # not sure 2697 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2698 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2699 tool="$rootdir/tools/scramble -add=clzp" 2700 output="rockbox.sansa" 2701 bootoutput="bootloader-clipzip.sansa" 2702 appextra="recorder:gui:radio" 2703 plugins="yes" 2704 toolset=$scramblebitmaptools 2705 t_cpu="arm" 2706 t_manufacturer="as3525" 2707 t_model="sansa-clipzip" 2708 arm926ejscc 2709 ;; 2710 2711 66|sansaconnect) 2712 target_id=81 2713 modelname="sansaconnect" 2714 target="SANSA_CONNECT" 2715 memory=64 2716 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2717 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2718 tool="$rootdir/tools/scramble -add=conn" 2719 output="rockbox.sansa" 2720 bootoutput="bootloader-connect.sansa" 2721 appextra="recorder:gui" 2722 plugins="yes" 2723 toolset=$scramblebitmaptools 2724 t_cpu="arm" 2725 t_manufacturer="tms320dm320" 2726 t_model="sansa-connect" 2727 arm926ejscc 2728 ;; 2729 2730 70|mrobe500) 2731 target_id=36 2732 modelname="mrobe500" 2733 target="MROBE_500" 2734 memory=64 # always 2735 arm926ejscc 2736 tool="$rootdir/tools/scramble -add=m500" 2737 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2738 bmp2rb_native="$rootdir/tools/bmp2rb -f 8" 2739 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 2740 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0" 2741 output="rockbox.mrobe500" 2742 appextra="recorder:gui:radio" 2743 plugins="yes" 2744 toolset=$gigabeatbitmaptools 2745 boottool="cp " 2746 bootoutput="rockbox.mrboot" 2747 # architecture, manufacturer and model for the target-tree build 2748 t_cpu="arm" 2749 t_manufacturer="tms320dm320" 2750 t_model="mrobe-500" 2751 ;; 2752 2753 71|mrobe100) 2754 target_id=33 2755 modelname="mrobe100" 2756 target="MROBE_100" 2757 memory=32 # always 2758 arm7tdmicc 2759 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS" 2760 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2761 bmp2rb_native="$rootdir/tools/bmp2rb -f 0" 2762 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 2763 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0" 2764 output="rockbox.mi4" 2765 appextra="recorder:gui:radio" 2766 plugins="yes" 2767 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL" 2768 bootoutput="pp5020.mi4" 2769 # toolset is the tools within the tools directory that we build for 2770 # this particular target. 2771 toolset=$scramblebitmaptools 2772 # architecture, manufacturer and model for the target-tree build 2773 t_cpu="arm" 2774 t_soc="pp" 2775 t_manufacturer="olympus" 2776 t_model="mrobe-100" 2777 ;; 2778 2779 80|ipodnano3g) 2780 target_id=117 2781 modelname="ipodnano3g" 2782 blonly="yes" 2783 target="IPOD_NANO3G" 2784 memory=32 # always 2785 arm926ejscc 2786 tool="$rootdir/tools/scramble -add=nn3g" 2787 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2788 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2789 output="rockbox.ipod" 2790 appextra="recorder:gui:radio" 2791 plugins="yes" 2792 bootoutput="bootloader-$modelname.ipod" 2793 # toolset is the tools within the tools directory that we build for 2794 # this particular target. 2795 toolset=$ipodbitmaptools 2796 # architecture, manufacturer and model for the target-tree build 2797 t_cpu="arm" 2798 t_manufacturer="s5l8702" 2799 t_model="ipodnano3g" 2800 ;; 2801 2802 81|ipodnano4g) 2803 target_id=118 2804 modelname="ipodnano4g" 2805 blonly="yes" 2806 target="IPOD_NANO4G" 2807 memory=32 # always 2808 arm1176jzscc 2809 tool="$rootdir/tools/scramble -add=nn4g" 2810 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2811 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2812 output="rockbox.ipod" 2813 appextra="recorder:gui:radio" 2814 plugins="yes" 2815 bootoutput="bootloader-$modelname.ipod" 2816 # toolset is the tools within the tools directory that we build for 2817 # this particular target. 2818 toolset=$ipodbitmaptools 2819 # architecture, manufacturer and model for the target-tree build 2820 t_cpu="arm" 2821 t_manufacturer="s5l8702" 2822 t_model="ipodnano4g" 2823 ;; 2824 2825 89|creativezenxfistyle) 2826 target_id=94 2827 modelname="creativezenxfistyle" 2828 target="CREATIVE_ZENXFISTYLE" 2829 memory=64 2830 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2831 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2832 tool="$rootdir/tools/scramble -add=zxfs" 2833 output="rockbox.creative" 2834 bootoutput="bootloader-zenxfistyle.creative" 2835 appextra="gui:recorder:radio" 2836 plugins="yes" 2837 toolset=$scramblebitmaptools 2838 t_cpu="arm" 2839 t_manufacturer="imx233" 2840 t_model="creative-zen" 2841 arm926ejscc 2842 ;; 2843 2844 90|zenvisionm30gb) 2845 target_id=35 2846 modelname="zenvisionm30gb" 2847 target="CREATIVE_ZVM" 2848 memory=64 2849 arm926ejscc 2850 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2851 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2852 tool="$rootdir/tools/scramble -creative=zvm" 2853 USE_ELF="yes" 2854 output="rockbox.zvm" 2855 appextra="recorder:gui:radio" 2856 plugins="yes" 2857 toolset=$ipodbitmaptools 2858 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff" 2859 bootoutput="rockbox.zvmboot" 2860 # architecture, manufacturer and model for the target-tree build 2861 t_cpu="arm" 2862 t_manufacturer="tms320dm320" 2863 t_model="creative-zvm" 2864 ;; 2865 2866 91|zenvisionm60gb) 2867 target_id=40 2868 modelname="zenvisionm60gb" 2869 target="CREATIVE_ZVM60GB" 2870 memory=64 2871 arm926ejscc 2872 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2873 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2874 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff" 2875 USE_ELF="yes" 2876 output="rockbox.zvm60" 2877 appextra="recorder:gui:radio" 2878 plugins="yes" 2879 toolset=$ipodbitmaptools 2880 boottool="$rootdir/tools/scramble -creative=zvm60" 2881 bootoutput="rockbox.zvm60boot" 2882 # architecture, manufacturer and model for the target-tree build 2883 t_cpu="arm" 2884 t_manufacturer="tms320dm320" 2885 t_model="creative-zvm" 2886 ;; 2887 2888 92|zenvision) 2889 target_id=39 2890 modelname="zenvision" 2891 target="CREATIVE_ZV" 2892 memory=64 2893 arm926ejscc 2894 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2895 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2896 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff" 2897 USE_ELF="yes" 2898 output="rockbox.zv" 2899 appextra="recorder:gui:radio" 2900 plugins="" 2901 toolset=$ipodbitmaptools 2902 boottool="$rootdir/tools/scramble -creative=zenvision" 2903 bootoutput="rockbox.zvboot" 2904 # architecture, manufacturer and model for the target-tree build 2905 t_cpu="arm" 2906 t_manufacturer="tms320dm320" 2907 t_model="creative-zvm" 2908 ;; 2909 2910 93|creativezenxfi2) 2911 target_id=80 2912 modelname="creativezenxfi2" 2913 target="CREATIVE_ZENXFI2" 2914 memory=64 2915 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2916 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2917 tool="$rootdir/tools/scramble -add=zxf2" 2918 output="rockbox.creative" 2919 bootoutput="bootloader-zenxfi2.creative" 2920 appextra="gui:recorder:radio" 2921 plugins="yes" 2922 toolset=$scramblebitmaptools 2923 t_cpu="arm" 2924 t_manufacturer="imx233" 2925 t_model="creative-zenxfi2" 2926 arm926ejscc 2927 ;; 2928 2929 94|creativezenxfi3) 2930 target_id=81 2931 modelname="creativezenxfi3" 2932 target="CREATIVE_ZENXFI3" 2933 memory=64 2934 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2935 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2936 tool="$rootdir/tools/scramble -add=zxf3" 2937 output="rockbox.creative" 2938 bootoutput="bootloader-zenxfi3.creative" 2939 appextra="gui:recorder:radio" 2940 plugins="yes" 2941 toolset=$scramblebitmaptools 2942 t_cpu="arm" 2943 t_manufacturer="imx233" 2944 t_model="creative-zenxfi3" 2945 arm926ejscc 2946 ;; 2947 2948 95|creativezenv) 2949 target_id=92 2950 modelname="creativezenv" 2951 target="CREATIVE_ZENV" 2952 memory=32 2953 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2954 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2955 tool="$rootdir/tools/scramble -add=zenv" 2956 output="rockbox.creative" 2957 bootoutput="bootloader-zenv.creative" 2958 appextra="radio:gui:recorder" 2959 plugins="" 2960 toolset=$scramblebitmaptools 2961 t_cpu="arm" 2962 t_manufacturer="imx233" 2963 t_model="creative-zen" 2964 arm926ejscc 2965 ;; 2966 2967 96|creativezenxfi) 2968 target_id=86 2969 modelname="creativezenxfi" 2970 target="CREATIVE_ZENXFI" 2971 memory=64 2972 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2973 bmp2rb_native="$rootdir/tools/bmp2rb -f 9" 2974 tool="$rootdir/tools/scramble -add=zxfi" 2975 output="rockbox.creative" 2976 bootoutput="bootloader-zenxfi.creative" 2977 appextra="gui:recorder:radio" 2978 plugins="yes" 2979 toolset=$scramblebitmaptools 2980 t_cpu="arm" 2981 t_manufacturer="imx233" 2982 t_model="creative-zen" 2983 arm926ejscc 2984 ;; 2985 2986 97|creativezenmozaic) 2987 target_id=87 2988 modelname="creativezenmozaic" 2989 target="CREATIVE_ZENMOZAIC" 2990 memory=32 2991 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 2992 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 2993 tool="$rootdir/tools/scramble -add=zmoz" 2994 output="rockbox.creative" 2995 bootoutput="bootloader-zenmozaic.creative" 2996 appextra="gui:recorder:radio" 2997 plugins="yes" 2998 toolset=$scramblebitmaptools 2999 t_cpu="arm" 3000 t_manufacturer="imx233" 3001 t_model="creative-zen" 3002 arm926ejscc 3003 ;; 3004 3005 98|creativezen) 3006 target_id=90 3007 modelname="creativezen" 3008 target="CREATIVE_ZEN" 3009 memory=32 3010 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3011 bmp2rb_native="$rootdir/tools/bmp2rb -f 9" 3012 tool="$rootdir/tools/scramble -add=zen" 3013 output="rockbox.creative" 3014 bootoutput="bootloader-zen.creative" 3015 appextra="gui:recorder:radio" 3016 plugins="yes" 3017 toolset=$scramblebitmaptools 3018 t_cpu="arm" 3019 t_manufacturer="imx233" 3020 t_model="creative-zen" 3021 arm926ejscc 3022 ;; 3023 3024 100|gogearsa9200) 3025 target_id=41 3026 modelname="gogearsa9200" 3027 target="PHILIPS_SA9200" 3028 memory=32 # supposedly 3029 arm7tdmicc 3030 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS" 3031 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3032 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3033 output="rockbox.mi4" 3034 appextra="recorder:gui:radio" 3035 plugins="yes" 3036 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL" 3037 bootoutput="FWImage.ebn" 3038 # toolset is the tools within the tools directory that we build for 3039 # this particular target. 3040 toolset=$scramblebitmaptools 3041 # architecture, manufacturer and model for the target-tree build 3042 t_cpu="arm" 3043 t_soc="pp" 3044 t_manufacturer="philips" 3045 t_model="sa9200" 3046 ;; 3047 3048 101|gogearhdd1630) 3049 target_id=43 3050 modelname="gogearhdd1630" 3051 target="PHILIPS_HDD1630" 3052 memory=32 # supposedly 3053 arm7tdmicc 3054 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS" 3055 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3056 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3057 output="rockbox.mi4" 3058 appextra="recorder:gui:radio" 3059 plugins="yes" 3060 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL" 3061 bootoutput="FWImage.ebn" 3062 # toolset is the tools within the tools directory that we build for 3063 # this particular target. 3064 toolset=$scramblebitmaptools 3065 # architecture, manufacturer and model for the target-tree build 3066 t_cpu="arm" 3067 t_soc="pp" 3068 t_manufacturer="philips" 3069 t_model="hdd1630" 3070 ;; 3071 3072 102|gogearhdd6330) 3073 target_id=65 3074 modelname="gogearhdd6330" 3075 target="PHILIPS_HDD6330" 3076 memory=64 # always 3077 arm7tdmicc 3078 tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS" 3079 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3080 bmp2rb_native="$rootdir/tools/bmp2rb -f 5" 3081 output="rockbox.mi4" 3082 appextra="recorder:gui:radio" 3083 plugins="yes" 3084 boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL" 3085 bootoutput="FWImage.ebn" 3086 # toolset is the tools within the tools directory that we build for 3087 # this particular target. 3088 toolset=$scramblebitmaptools 3089 # architecture, manufacturer and model for the target-tree build 3090 t_cpu="arm" 3091 t_soc="pp" 3092 t_manufacturer="philips" 3093 t_model="hdd6330" 3094 ;; 3095 3096 110|meizum6sl) 3097 target_id=49 3098 modelname="meizum6sl" 3099 blonly="yes" 3100 target="MEIZU_M6SL" 3101 memory=16 # always 3102 arm940tbecc 3103 tool="cp" 3104 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3105 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3106 output="rockbox.meizu" 3107 appextra="recorder:gui:radio" 3108 plugins="no" #FIXME 3109 toolset=$genericbitmaptools 3110 boottool="cp" 3111 bootoutput="rockboot.ebn" 3112 # architecture, manufacturer and model for the target-tree build 3113 t_cpu="arm" 3114 t_manufacturer="s5l8700" 3115 t_model="meizu-m6sl" 3116 ;; 3117 3118 111|meizum6sp) 3119 target_id=46 3120 modelname="meizum6sp" 3121 blonly="yes" 3122 target="MEIZU_M6SP" 3123 memory=16 # always 3124 arm940tbecc 3125 tool="cp" 3126 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3127 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3128 output="rockbox.meizu" 3129 appextra="recorder:gui:radio" 3130 plugins="no" #FIXME 3131 toolset=$genericbitmaptools 3132 boottool="cp" 3133 bootoutput="rockboot.ebn" 3134 # architecture, manufacturer and model for the target-tree build 3135 t_cpu="arm" 3136 t_manufacturer="s5l8700" 3137 t_model="meizu-m6sp" 3138 ;; 3139 3140 112|meizum3) 3141 target_id=47 3142 modelname="meizum3" 3143 target="MEIZU_M3" 3144 memory=16 # always 3145 arm940tbecc 3146 tool="cp" 3147 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3148 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3149 output="rockbox.meizu" 3150 appextra="recorder:gui:radio" 3151 plugins="no" #FIXME 3152 toolset=$genericbitmaptools 3153 boottool="cp" 3154 bootoutput="rockboot.ebn" 3155 # architecture, manufacturer and model for the target-tree build 3156 t_cpu="arm" 3157 t_manufacturer="s5l8700" 3158 t_model="meizu-m3" 3159 ;; 3160 3161 120|ondavx747) 3162 target_id=45 3163 modelname="ondavx747" 3164 target="ONDA_VX747" 3165 memory=16 3166 mipselcc 3167 tool="$rootdir/tools/scramble -add=x747" 3168 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3169 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3170 output="rockbox.vx747" 3171 appextra="recorder:gui:radio" 3172 plugins="yes" 3173 toolset=$genericbitmaptools 3174 boottool="$rootdir/tools/scramble -ccpmp" 3175 bootoutput="ccpmp.bin" 3176 # architecture, manufacturer and model for the target-tree build 3177 t_cpu="mips" 3178 t_manufacturer="ingenic_jz47xx" 3179 t_model="onda_vx747" 3180 ;; 3181 3182 121|ondavx767) 3183 target_id=64 3184 modelname="ondavx767" 3185 target="ONDA_VX767" 3186 memory=16 #FIXME 3187 mipselcc 3188 tool="cp" 3189 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3190 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3191 output="rockbox.vx767" 3192 appextra="recorder:gui:radio" 3193 plugins="" #FIXME 3194 toolset=$genericbitmaptools 3195 boottool="$rootdir/tools/scramble -ccpmp" 3196 bootoutput="ccpmp.bin" 3197 # architecture, manufacturer and model for the target-tree build 3198 t_cpu="mips" 3199 t_manufacturer="ingenic_jz47xx" 3200 t_model="onda_vx767" 3201 ;; 3202 3203 122|ondavx747p) 3204 target_id=54 3205 modelname="ondavx747p" 3206 target="ONDA_VX747P" 3207 memory=16 3208 mipselcc 3209 tool="$rootdir/tools/scramble -add=747p" 3210 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3211 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3212 output="rockbox.vx747p" 3213 appextra="recorder:gui:radio" 3214 plugins="yes" 3215 toolset=$genericbitmaptools 3216 boottool="$rootdir/tools/scramble -ccpmp" 3217 bootoutput="ccpmp.bin" 3218 # architecture, manufacturer and model for the target-tree build 3219 t_cpu="mips" 3220 t_manufacturer="ingenic_jz47xx" 3221 t_model="onda_vx747" 3222 ;; 3223 3224 123|ondavx777) 3225 target_id=61 3226 modelname="ondavx777" 3227 target="ONDA_VX777" 3228 memory=16 3229 mipselcc 3230 tool="$rootdir/tools/scramble -add=x777" 3231 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3232 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3233 output="rockbox.vx777" 3234 appextra="recorder:gui:radio" 3235 plugins="yes" 3236 toolset=$genericbitmaptools 3237 boottool="$rootdir/tools/scramble -ccpmp" 3238 bootoutput="ccpmp.bin" 3239 # architecture, manufacturer and model for the target-tree build 3240 t_cpu="mips" 3241 t_manufacturer="ingenic_jz47xx" 3242 t_model="onda_vx747" 3243 ;; 3244 3245 130|lyreproto1) 3246 target_id=56 3247 modelname="lyreproto1" 3248 target="LYRE_PROTO1" 3249 memory=64 3250 arm926ejscc 3251 tool="cp" 3252 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3253 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3254 output="rockbox.lyre" 3255 appextra="recorder:gui:radio" 3256 plugins="" 3257 toolset=$scramblebitmaptools 3258 boottool="cp" 3259 bootoutput="bootloader-proto1.lyre" 3260 # architecture, manufacturer and model for the target-tree build 3261 t_cpu="arm" 3262 t_manufacturer="at91sam" 3263 t_model="lyre_proto1" 3264 ;; 3265 3266 131|mini2440) 3267 target_id=99 3268 modelname="mini2440" 3269 target="MINI2440" 3270 memory=64 3271 arm9tdmicc 3272 tool="$rootdir/tools/scramble -add=m244" 3273 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3274 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3275 output="rockbox.mini2440" 3276 appextra="recorder:gui:radio" 3277 plugins="" 3278 toolset=$scramblebitmaptools 3279 boottool="cp" 3280 bootoutput="bootloader-mini2440.lyre" 3281 # architecture, manufacturer and model for the target-tree build 3282 t_cpu="arm" 3283 t_manufacturer="s3c2440" 3284 t_model="mini2440" 3285 ;; 3286 3287 140|samsungyh820) 3288 target_id=57 3289 modelname="samsungyh820" 3290 target="SAMSUNG_YH820" 3291 memory=32 # always 3292 arm7tdmicc 3293 tool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBOS" 3294 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3295 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3296 output="rockbox.mi4" 3297 appextra="recorder:gui:radio" 3298 plugins="yes" 3299 boottool="$rootdir/tools/scramble -mi4v2 -model=y820 -type=RBBL" 3300 bootoutput="FW_YH820.mi4" 3301 # toolset is the tools within the tools directory that we build for 3302 # this particular target. 3303 toolset=$scramblebitmaptools 3304 # architecture, manufacturer and model for the target-tree build 3305 t_cpu="arm" 3306 t_soc="pp" 3307 t_manufacturer="samsung" 3308 t_model="yh820" 3309 ;; 3310 3311 141|samsungyh920) 3312 target_id=58 3313 modelname="samsungyh920" 3314 target="SAMSUNG_YH920" 3315 memory=32 # always 3316 arm7tdmicc 3317 tool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBOS" 3318 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3319 bmp2rb_native="$rootdir/tools/bmp2rb -f 2" 3320 output="rockbox.mi4" 3321 appextra="recorder:gui:radio" 3322 plugins="yes" 3323 boottool="$rootdir/tools/scramble -mi4v2 -model=y920 -type=RBBL" 3324 bootoutput="PP5020.mi4" 3325 # toolset is the tools within the tools directory that we build for 3326 # this particular target. 3327 toolset=$scramblebitmaptools 3328 # architecture, manufacturer and model for the target-tree build 3329 t_cpu="arm" 3330 t_soc="pp" 3331 t_manufacturer="samsung" 3332 t_model="yh920" 3333 ;; 3334 3335 142|samsungyh925) 3336 target_id=59 3337 modelname="samsungyh925" 3338 target="SAMSUNG_YH925" 3339 memory=32 # always 3340 arm7tdmicc 3341 tool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBOS" 3342 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3343 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3344 output="rockbox.mi4" 3345 appextra="recorder:gui:radio" 3346 plugins="yes" 3347 boottool="$rootdir/tools/scramble -mi4v2 -model=y925 -type=RBBL" 3348 bootoutput="FW_YH925.mi4" 3349 # toolset is the tools within the tools directory that we build for 3350 # this particular target. 3351 toolset=$scramblebitmaptools 3352 # architecture, manufacturer and model for the target-tree build 3353 t_cpu="arm" 3354 t_soc="pp" 3355 t_manufacturer="samsung" 3356 t_model="yh925" 3357 ;; 3358 3359 143|samsungyps3) 3360 target_id=72 3361 modelname="samsungyps3" 3362 target="SAMSUNG_YPS3" 3363 memory=16 # always 3364 arm940tbecc 3365 tool="cp" 3366 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3367 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3368 output="rockbox.yps3" 3369 appextra="recorder:gui:radio" 3370 plugins="no" #FIXME 3371 toolset=$genericbitmaptools 3372 boottool="cp" 3373 bootoutput="rockboot.ebn" 3374 # architecture, manufacturer and model for the target-tree build 3375 t_cpu="arm" 3376 t_manufacturer="s5l8700" 3377 t_model="yps3" 3378 ;; 3379 3380 160|vibe500) 3381 target_id=67 3382 modelname="vibe500" 3383 target="PBELL_VIBE500" 3384 memory=32 # always 3385 arm7tdmicc 3386 tool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBOS" 3387 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3388 bmp2rb_native="$rootdir/tools/bmp2rb -f 5" 3389 output="rockbox.mi4" 3390 appextra="recorder:gui:radio" 3391 plugins="yes" 3392 boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL" 3393 bootoutput="jukebox.mi4" 3394 # toolset is the tools within the tools directory that we build for 3395 # this particular target. 3396 toolset=$scramblebitmaptools 3397 # architecture, manufacturer and model for the target-tree build 3398 t_cpu="arm" 3399 t_soc="pp" 3400 t_manufacturer="pbell" 3401 t_model="vibe500" 3402 ;; 3403 3404 170|mpiohd200) 3405 target_id=69 3406 modelname="mpiohd200" 3407 target="MPIO_HD200" 3408 memory=16 # always 3409 coldfirecc 3410 tool="$rootdir/tools/scramble -add=hd20" 3411 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3412 bmp2rb_native="$rootdir/tools/bmp2rb -f 7" 3413 output="rockbox.mpio" 3414 bootoutput="bootloader.mpio" 3415 appextra="recorder:gui:radio" 3416 plugins="yes" 3417 # toolset is the tools within the tools directory that we build for 3418 # this particular target. 3419 toolset="$genericbitmaptools" 3420 # architecture, manufacturer and model for the target-tree build 3421 t_cpu="coldfire" 3422 t_manufacturer="mpio" 3423 t_model="hd200" 3424 ;; 3425 3426 171|mpiohd300) 3427 target_id=70 3428 modelname="mpiohd300" 3429 target="MPIO_HD300" 3430 memory=16 # always 3431 coldfirecc 3432 tool="$rootdir/tools/scramble -add=hd30" 3433 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3434 bmp2rb_native="$rootdir/tools/bmp2rb -f 2" 3435 output="rockbox.mpio" 3436 bootoutput="bootloader.mpio" 3437 appextra="recorder:gui:radio" 3438 plugins="yes" 3439 # toolset is the tools within the tools directory that we build for 3440 # this particular target. 3441 toolset="$genericbitmaptools" 3442 # architecture, manufacturer and model for the target-tree build 3443 t_cpu="coldfire" 3444 t_manufacturer="mpio" 3445 t_model="hd300" 3446 ;; 3447 3448 180|rk27generic) 3449 target_id=78 3450 modelname="rk27generic" 3451 target="RK27_GENERIC" 3452 memory=16 # always 3453 arm7ejscc 3454 tool="$rootdir/tools/scramble -rkw -modelnum=73" 3455 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3456 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3457 output="rockbox.rkw" 3458 bootoutput="bootloader.rkw" 3459 appextra="recorder:gui:radio" 3460 plugins="" 3461 # toolset is the tools within the tools directory that we build for 3462 # this particular target. 3463 toolset="$genericbitmaptools" 3464 # architecture, manufacturer and model for the target-tree build 3465 t_cpu="arm" 3466 t_manufacturer="rk27xx" 3467 t_model="rk27generic" 3468 ;; 3469 3470 190|hifimanhm60x) 3471 target_id=79 3472 modelname="hifimanhm60x" 3473 target="HM60X" 3474 memory=16 3475 arm7ejscc 3476 tool="$rootdir/tools/scramble -rkw -modelnum=79" 3477 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3478 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3479 output="rockbox.rkw" 3480 bootoutput="bootloader.rkw" 3481 appextra="recorder:gui" 3482 plugins="yes" 3483 # toolset is the tools within the tools directory that we build for 3484 # this particular target. 3485 toolset="$genericbitmaptools" 3486 # architecture, manufacturer and model for the target-tree build 3487 t_cpu="arm" 3488 t_manufacturer="rk27xx" 3489 t_model="hm60x" 3490 ;; 3491 3492 191|hifimanhm801) 3493 target_id=82 3494 modelname="hifimanhm801" 3495 target="HM801" 3496 memory=16 3497 arm7ejscc 3498 tool="$rootdir/tools/scramble -rkw -modelnum=82" 3499 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3500 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3501 output="rockbox.rkw" 3502 bootoutput="bootloader.rkw" 3503 appextra="recorder:gui" 3504 plugins="yes" 3505 # toolset is the tools within the tools directory that we build for 3506 # this particular target. 3507 toolset="$genericbitmaptools" 3508 # architecture, manufacturer and model for the target-tree build 3509 t_cpu="arm" 3510 t_manufacturer="rk27xx" 3511 t_model="hm801" 3512 ;; 3513 3514 200|sdlapp) 3515 application="yes" 3516 target_id=73 3517 modelname="sdlapp" 3518 target="SDLAPP" 3519 app_set_paths 3520 app_set_lcd_size 3521 memory=8 3522 uname=`uname` 3523 simcc "sdl-app" 3524 tool="cp " 3525 boottool="cp " 3526 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3527 bmp2rb_native="$rootdir/tools/bmp2rb -f 9" 3528 output="rockbox" 3529 bootoutput="rockbox" 3530 appextra="recorder:gui:radio" 3531 plugins="yes" 3532 # architecture, manufacturer and model for the target-tree build 3533 t_cpu="hosted" 3534 t_manufacturer="sdl" 3535 t_model="app" 3536 ;; 3537 3538 201|android) 3539 application="yes" 3540 target_id=74 3541 modelname="android" 3542 target="ANDROID" 3543 app_type="android" 3544 app_set_lcd_size 3545 sharedir="/data/data/org.rockbox/app_rockbox/rockbox" 3546 bindir="/data/data/org.rockbox/lib" 3547 libdir="/data/data/org.rockbox/app_rockbox" 3548 memory=8 3549 uname=`uname` 3550 androidcc 19 armeabi "-march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp" 3551 tool="cp " 3552 boottool="cp " 3553 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3554 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3555 output="librockbox.so" 3556 bootoutput="librockbox.so" 3557 appextra="recorder:gui:radio:hosted/android" 3558 plugins="yes" 3559 # architecture, manufacturer and model for the target-tree build 3560 t_cpu="hosted" 3561 t_manufacturer="android" 3562 t_model="app" 3563 ;; 3564 3565 205|nokian8xx) 3566 application="yes" 3567 target_id=75 3568 modelname="nokian8xx" 3569 app_type="sdl-app" 3570 target="NOKIAN8XX" 3571 sharedir="/opt/rockbox/share/rockbox" 3572 bindir="/opt/rockbox/bin" 3573 libdir="/opt/rockbox/lib" 3574 memory=8 3575 uname=`uname` 3576 maemocc 4 3577 tool="cp " 3578 boottool="cp " 3579 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3580 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3581 output="rockbox" 3582 bootoutput="rockbox" 3583 appextra="recorder:gui:radio" 3584 plugins="yes" 3585 # architecture, manufacturer and model for the target-tree build 3586 t_cpu="hosted" 3587 t_manufacturer="maemo" 3588 t_model="app" 3589 ;; 3590 3591 206|nokian900) 3592 application="yes" 3593 target_id=76 3594 modelname="nokian900" 3595 app_type="sdl-app" 3596 target="NOKIAN900" 3597 sharedir="/opt/rockbox/share/rockbox" 3598 bindir="/opt/rockbox/bin" 3599 libdir="/opt/rockbox/lib" 3600 memory=8 3601 uname=`uname` 3602 maemocc 5 3603 tool="cp " 3604 boottool="cp " 3605 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3606 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3607 output="rockbox" 3608 bootoutput="rockbox" 3609 appextra="recorder:gui:radio" 3610 plugins="yes" 3611 # architecture, manufacturer and model for the target-tree build 3612 t_cpu="hosted" 3613 t_manufacturer="maemo" 3614 t_model="app" 3615 ;; 3616 3617 204|pandora) 3618 application="yes" 3619 target_id=77 3620 modelname="pandora" 3621 app_type="sdl-app" 3622 target="PANDORA" 3623 sharedir="rockbox/share/rockbox" 3624 bindir="rockbox/bin" 3625 libdir="rockbox/lib" 3626 memory=8 3627 uname=`uname` 3628 pandoracc 3629 tool="cp " 3630 boottool="cp " 3631 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3632 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3633 output="rockbox" 3634 bootoutput="rockbox" 3635 appextra="recorder:gui:radio" 3636 plugins="yes" 3637 # architecture, manufacturer and model for the target-tree build 3638 t_cpu="hosted" 3639 t_manufacturer="pandora" 3640 t_model="app" 3641 ;; 3642 3643 144|samsungypr0) 3644 application="yes" 3645 target_id=78 3646 modelname="samsungypr0" 3647 target="SAMSUNG_YPR0" 3648 memory=24 3649 uname=`uname` 3650 ypr0cc 3651 tool="cp " 3652 boottool="cp " 3653 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3654 bmp2rb_native="$rootdir/tools/bmp2rb -f 9" 3655 output="rockbox" 3656 bootoutput="rockbox" 3657 appextra="recorder:gui:radio" 3658 plugins="yes" 3659 # architecture, manufacturer and model for the target-tree build 3660 t_cpu="hosted" 3661 t_manufacturer="samsungypr" 3662 t_model="ypr0" 3663 ;; 3664 3665 202|androidmips) 3666 application="yes" 3667 target_id=74 3668 modelname="androidmips" 3669 target="ANDROID" 3670 app_type="android" 3671 app_set_lcd_size 3672 sharedir="/data/data/org.rockbox/app_rockbox/rockbox" 3673 bindir="/data/data/org.rockbox/lib" 3674 libdir="/data/data/org.rockbox/app_rockbox" 3675 memory=8 3676 uname=`uname` 3677 androidcc 19 mips 3678 tool="cp " 3679 boottool="cp " 3680 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3681 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3682 output="librockbox.so" 3683 bootoutput="librockbox.so" 3684 appextra="recorder:gui:radio:hosted/android" 3685 plugins="yes" 3686 # architecture, manufacturer and model for the target-tree build 3687 t_cpu="hosted" 3688 t_manufacturer="android" 3689 t_model="app" 3690 ;; 3691 3692 203|androidx86) 3693 application="yes" 3694 target_id=74 3695 modelname="androidx86" 3696 target="ANDROID" 3697 app_type="android" 3698 app_set_lcd_size 3699 sharedir="/data/data/org.rockbox/app_rockbox/rockbox" 3700 bindir="/data/data/org.rockbox/lib" 3701 libdir="/data/data/org.rockbox/app_rockbox" 3702 memory=8 3703 uname=`uname` 3704 androidcc 19 x86 3705 tool="cp " 3706 boottool="cp " 3707 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3708 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3709 output="librockbox.so" 3710 bootoutput="librockbox.so" 3711 appextra="recorder:gui:radio:hosted/android" 3712 plugins="yes" 3713 # architecture, manufacturer and model for the target-tree build 3714 t_cpu="hosted" 3715 t_manufacturer="android" 3716 t_model="app" 3717 ;; 3718 3719 145|samsungypr1) 3720 application="yes" 3721 target_id=93 3722 modelname="samsungypr1" 3723 target="SAMSUNG_YPR1" 3724 memory=24 3725 uname=`uname` 3726 # Linux environment and CPU are the same as for R0, use the same gcc options 3727 ypr0cc 3728 tool="cp " 3729 boottool="cp " 3730 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3731 bmp2rb_native="$rootdir/tools/bmp2rb -f 9" 3732 output="rockbox" 3733 bootoutput="rockbox" 3734 appextra="recorder:gui:radio" 3735 plugins="yes" 3736 # architecture, manufacturer and model for the target-tree build 3737 t_cpu="hosted" 3738 t_manufacturer="samsungypr" 3739 t_model="ypr1" 3740 ;; 3741 3742 209|rgnano) 3743 target_id=121 3744 application="yes" 3745 modelname="rgnano" 3746 app_type="sdl-app" 3747 target="RG_NANO" 3748 memory=32 3749 uname=`uname` 3750 rgnanocc 3751 tool="cp " 3752 boottool="cp " 3753 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3754 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3755 output="rockbox" 3756 bootoutput="rockbox" 3757 appextra="recorder:gui" 3758 plugins="yes" 3759 t_cpu="hosted" 3760 t_manufacturer="anbernic" 3761 t_model="rgnano" 3762 ;; 3763 3764 210|hifietma9) 3765 target_id=83 3766 modelname="hifietma9" 3767 target="MA9" 3768 memory=16 3769 arm7ejscc 3770 tool="$rootdir/tools/scramble -rkw -modelnum=83" 3771 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3772 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3773 output="rockbox.rkw" 3774 bootoutput="bootloader.rkw" 3775 appextra="recorder:gui" 3776 plugins="yes" 3777 # toolset is the tools within the tools directory that we build for 3778 # this particular target. 3779 toolset="$genericbitmaptools" 3780 # architecture, manufacturer and model for the target-tree build 3781 t_cpu="arm" 3782 t_manufacturer="rk27xx" 3783 t_model="ma" 3784 ;; 3785 3786 211|hifietma9c) 3787 target_id=84 3788 modelname="hifietma9c" 3789 target="MA9C" 3790 memory=16 3791 arm7ejscc 3792 tool="$rootdir/tools/scramble -rkw -modelnum=84" 3793 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3794 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3795 output="rockbox.rkw" 3796 bootoutput="bootloader.rkw" 3797 appextra="recorder:gui" 3798 plugins="yes" 3799 # toolset is the tools within the tools directory that we build for 3800 # this particular target. 3801 toolset="$genericbitmaptools" 3802 # architecture, manufacturer and model for the target-tree build 3803 t_cpu="arm" 3804 t_manufacturer="rk27xx" 3805 t_model="ma" 3806 ;; 3807 3808 212|hifietma8) 3809 target_id=85 3810 modelname="hifietma8" 3811 target="MA8" 3812 memory=16 3813 arm7ejscc 3814 tool="$rootdir/tools/scramble -rkw -modelnum=85" 3815 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3816 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3817 output="rockbox.rkw" 3818 bootoutput="bootloader.rkw" 3819 appextra="recorder:gui" 3820 plugins="yes" 3821 # toolset is the tools within the tools directory that we build for 3822 # this particular target. 3823 toolset="$genericbitmaptools" 3824 # architecture, manufacturer and model for the target-tree build 3825 t_cpu="arm" 3826 t_manufacturer="rk27xx" 3827 t_model="ma" 3828 ;; 3829 3830 213|hifietma8c) 3831 target_id=91 3832 modelname="hifietma8c" 3833 target="MA8C" 3834 memory=16 3835 arm7ejscc 3836 tool="$rootdir/tools/scramble -rkw -modelnum=91" 3837 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3838 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3839 output="rockbox.rkw" 3840 bootoutput="bootloader.rkw" 3841 appextra="recorder:gui" 3842 plugins="yes" 3843 # toolset is the tools within the tools directory that we build for 3844 # this particular target. 3845 toolset="$genericbitmaptools" 3846 # architecture, manufacturer and model for the target-tree build 3847 t_cpu="arm" 3848 t_manufacturer="rk27xx" 3849 t_model="ma" 3850 ;; 3851 3852 219|sonynwze350) 3853 application="yes" 3854 target_id=105 3855 modelname="sonynwze350" 3856 target="SONY_NWZE350" 3857 memory=16 3858 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3859 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3860 tool="cp" 3861 output="rockbox.sony" 3862 boottool="$rootdir/tools/scramble -add=e350" 3863 bootoutput="bootloader-nwze350.sony" 3864 appextra="gui:recorder:radio" 3865 plugins="yes" 3866 toolset=$genericbitmaptools 3867 t_cpu="hosted" 3868 t_manufacturer="sonynwz" 3869 t_model="nwze350" 3870 uname=`uname` 3871 sonynwzcc 3872 ;; 3873 3874 220|sonynwze370) 3875 target_id=88 3876 modelname="sonynwze370" 3877 target="SONY_NWZE370" 3878 memory=32 3879 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3880 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3881 tool="$rootdir/tools/scramble -add=e370" 3882 output="rockbox.sony" 3883 bootoutput="bootloader-nwze370.sony" 3884 appextra="gui:recorder:radio" 3885 plugins="yes" 3886 toolset=$scramblebitmaptools 3887 t_cpu="arm" 3888 t_manufacturer="imx233" 3889 t_model="sony-nwz" 3890 arm926ejscc 3891 ;; 3892 3893 221|sonynwze360) 3894 target_id=89 3895 modelname="sonynwze360" 3896 target="SONY_NWZE360" 3897 memory=32 3898 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3899 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3900 tool="$rootdir/tools/scramble -add=e360" 3901 output="rockbox.sony" 3902 bootoutput="bootloader-nwze360.sony" 3903 appextra="gui:recorder:radio" 3904 plugins="yes" 3905 toolset=$scramblebitmaptools 3906 t_cpu="arm" 3907 t_manufacturer="imx233" 3908 t_model="sony-nwz" 3909 arm926ejscc 3910 ;; 3911 3912 222|sonynwze450) 3913 application="yes" 3914 target_id=96 3915 modelname="sonynwze450" 3916 target="SONY_NWZE450" 3917 memory=16 3918 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3919 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3920 tool="cp" 3921 output="rockbox.sony" 3922 boottool="$rootdir/tools/scramble -add=e450" 3923 bootoutput="bootloader-nwze450.sony" 3924 appextra="gui:recorder:radio" 3925 plugins="yes" 3926 toolset=$genericbitmaptools 3927 t_cpu="hosted" 3928 t_manufacturer="sonynwz" 3929 t_model="nwze450" 3930 uname=`uname` 3931 sonynwzcc 3932 ;; 3933 3934 223|sonynwze460) 3935 application="yes" 3936 target_id=97 3937 modelname="sonynwze460" 3938 target="SONY_NWZE460" 3939 memory=16 3940 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3941 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3942 tool="cp" 3943 output="rockbox.sony" 3944 boottool="$rootdir/tools/scramble -add=e460" 3945 bootoutput="bootloader-nwze460.sony" 3946 appextra="gui:recorder:radio" 3947 plugins="yes" 3948 toolset=$genericbitmaptools 3949 t_cpu="hosted" 3950 t_manufacturer="sonynwz" 3951 t_model="nwze460" 3952 uname=`uname` 3953 sonynwzcc 3954 ;; 3955 3956 224|sonynwze470) 3957 application="yes" 3958 target_id=100 3959 modelname="sonynwze470" 3960 target="SONY_NWZE470" 3961 memory=16 3962 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3963 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3964 tool="cp" 3965 output="rockbox.sony" 3966 boottool="$rootdir/tools/scramble -add=e470" 3967 bootoutput="bootloader-nwze470.sony" 3968 appextra="gui:recorder:radio" 3969 plugins="yes" 3970 toolset=$genericbitmaptools 3971 t_cpu="hosted" 3972 t_manufacturer="sonynwz" 3973 t_model="nwze470" 3974 uname=`uname` 3975 sonynwzcc 3976 ;; 3977 3978 225|sonynwze580) 3979 application="yes" 3980 target_id=98 3981 modelname="sonynwze580" 3982 target="SONY_NWZE580" 3983 memory=16 3984 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3985 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3986 tool="cp" 3987 output="rockbox.sony" 3988 boottool="$rootdir/tools/scramble -add=e580" 3989 bootoutput="bootloader-nwze580.sony" 3990 appextra="gui:recorder:radio" 3991 plugins="yes" 3992 toolset=$genericbitmaptools 3993 t_cpu="hosted" 3994 t_manufacturer="sonynwz" 3995 t_model="nwze580" 3996 uname=`uname` 3997 sonynwzcc 3998 ;; 3999 4000 226|sonynwza10) 4001 application="yes" 4002 target_id=101 4003 modelname="sonynwza10" 4004 target="SONY_NWZA10" 4005 memory=16 4006 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4007 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4008 tool="cp" 4009 output="rockbox.sony" 4010 boottool="$rootdir/tools/scramble -add=a10" 4011 bootoutput="bootloader-nwza10.sony" 4012 appextra="gui:recorder:radio" 4013 plugins="yes" 4014 toolset=$genericbitmaptools 4015 t_cpu="hosted" 4016 t_manufacturer="sonynwz" 4017 t_model="nwza10" 4018 uname=`uname` 4019 sonynwzcc 4020 ;; 4021 4022 227|sonynwa20) 4023 application="yes" 4024 target_id=102 4025 modelname="sonynwa20" 4026 target="SONY_NWA20" 4027 memory=16 4028 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4029 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4030 tool="cp" 4031 output="rockbox.sony" 4032 boottool="$rootdir/tools/scramble -add=a20" 4033 bootoutput="bootloader-nwa20.sony" 4034 appextra="gui:recorder:radio" 4035 plugins="yes" 4036 toolset=$genericbitmaptools 4037 t_cpu="hosted" 4038 t_manufacturer="sonynwz" 4039 t_model="nwa20" 4040 uname=`uname` 4041 sonynwzcc 4042 ;; 4043 4044 228|sonynwza860) 4045 application="yes" 4046 target_id=103 4047 modelname="sonynwza860" 4048 target="SONY_NWZA860" 4049 memory=16 4050 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4051 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4052 tool="cp" 4053 output="rockbox.sony" 4054 boottool="$rootdir/tools/scramble -add=a860" 4055 bootoutput="bootloader-nwza860.sony" 4056 appextra="gui:recorder:radio" 4057 plugins="" 4058 toolset=$genericbitmaptools 4059 t_cpu="hosted" 4060 t_manufacturer="sonynwz" 4061 t_model="nwza860" 4062 uname=`uname` 4063 sonynwzcc 4064 ;; 4065 4066 229|sonynwzs750) 4067 application="yes" 4068 target_id=104 4069 modelname="sonynwzs750" 4070 target="SONY_NWZS750" 4071 memory=16 4072 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4073 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4074 tool="cp" 4075 output="rockbox.sony" 4076 boottool="$rootdir/tools/scramble -add=s750" 4077 bootoutput="bootloader-nwzs750.sony" 4078 appextra="gui:recorder:radio" 4079 plugins="yes" 4080 toolset=$genericbitmaptools 4081 t_cpu="hosted" 4082 t_manufacturer="sonynwz" 4083 t_model="nwzs750" 4084 uname=`uname` 4085 sonynwzcc 4086 ;; 4087 4088 230|ihifi760) 4089 target_id=92 4090 modelname="ihifi760" 4091 target="IHIFI760" 4092 memory=16 4093 arm7ejscc 4094 tool="$rootdir/tools/scramble -rkw -modelnum=92" 4095 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4096 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4097 output="rockbox.rkw" 4098 bootoutput="bootloader.rkw" 4099 appextra="recorder:gui" 4100 plugins="" 4101 # toolset is the tools within the tools directory that we build for 4102 # this particular target. 4103 toolset="$genericbitmaptools" 4104 # architecture, manufacturer and model for the target-tree build 4105 t_cpu="arm" 4106 t_manufacturer="rk27xx" 4107 t_model="ihifi" 4108 ;; 4109 4110 234|ihifi960) 4111 target_id=93 4112 modelname="ihifi960" 4113 target="IHIFI960" 4114 memory=16 4115 arm7ejscc 4116 tool="$rootdir/tools/scramble -rkw -modelnum=93" 4117 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4118 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4119 output="rockbox.rkw" 4120 bootoutput="bootloader.rkw" 4121 appextra="recorder:gui" 4122 plugins="" 4123 # toolset is the tools within the tools directory that we build for 4124 # this particular target. 4125 toolset="$genericbitmaptools" 4126 # architecture, manufacturer and model for the target-tree build 4127 t_cpu="arm" 4128 t_manufacturer="rk27xx" 4129 t_model="ihifi" 4130 ;; 4131 4132 250|ibassodx50) 4133 application="yes" 4134 target_id=94 4135 modelname="ibassodx50" 4136 target="DX50" 4137 app_type="android_ndk" 4138 lcd_orientation="landscape" 4139 # Actually 408260kB 4140 memory=192 4141 uname=`uname` 4142 androidndkcc 16 armeabi "-mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=softfp" 4143 tool="cp " 4144 boottool="cp " 4145 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4146 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4147 output="rockbox" 4148 bootoutput="rockbox" 4149 appextra="recorder:gui:hosted" 4150 plugins="yes" 4151 tinyalsa="yes" 4152 # architecture, manufacturer and model for the target-tree build 4153 t_cpu="hosted" 4154 t_manufacturer="ibasso" 4155 t_model="dx50" 4156 ;; 4157 4158 251|ibassodx90) 4159 application="yes" 4160 target_id=95 4161 modelname="ibassodx90" 4162 target="DX90" 4163 app_type="android_ndk" 4164 lcd_orientation="landscape" 4165 memory=192 4166 uname=`uname` 4167 androidndkcc 16 armeabi "-mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=softfp" 4168 tool="cp " 4169 boottool="cp " 4170 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4171 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4172 output="rockbox" 4173 bootoutput="rockbox" 4174 appextra="recorder:gui:hosted" 4175 plugins="yes" 4176 tinyalsa="yes" 4177 # architecture, manufacturer and model for the target-tree build 4178 t_cpu="hosted" 4179 t_manufacturer="ibasso" 4180 t_model="dx90" 4181 ;; 4182 4183 240|agptekrocker) 4184 application="yes" 4185 app_type="hibyos" 4186 target_id=97 4187 modelname="agptekrocker" 4188 target="AGPTEK_ROCKER" 4189 memory=8 4190 tool="cp " 4191 boottool="cp " 4192 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4193 bmp2rb_native="$rootdir/tools/bmp2rb -f 10" 4194 output="rockbox.rocker" 4195 bootoutput="bootloader.rocker" 4196 appextra="recorder:gui:hosted" 4197 plugins="yes" 4198 # architecture, manufacturer and model for the target-tree build 4199 t_cpu="hosted" 4200 t_manufacturer="agptek" 4201 t_model="rocker" 4202 mipsellinuxcc 4203 ;; 4204 4205 241|xduoox3) 4206 target_id=106 4207 modelname="xduoox3" 4208 target="XDUOO_X3" 4209 memory=64 4210 mipselcc 4211 tool="$rootdir/tools/scramble -add=xdx3" 4212 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4213 bmp2rb_native="$bmp2rb_mono" 4214 output="rockbox.x3" 4215 appextra="recorder:gui" 4216 plugins="yes" 4217 toolset=$genericbitmaptools 4218 boottool="cp" 4219 bootoutput="bootloader-x3.bin" 4220 # architecture, manufacturer and model for the target-tree build 4221 t_cpu="mips" 4222 t_manufacturer="ingenic_jz47xx" 4223 t_model="xduoo_x3" 4224 sysfont="08-Rockfont" 4225 ;; 4226 4227 242|xduoox3ii) 4228 target_id=110 4229 application=yes 4230 app_type="hibyos" 4231 modelname="xduoox3ii" 4232 target="XDUOO_X3II" 4233 memory=8 4234 mipsellinuxcc 4235 tool="cp " 4236 boottool="cp " 4237 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4238 bmp2rb_native="$rootdir/tools/bmp2rb -f 10" 4239 output="rockbox.x3ii" 4240 bootoutput="bootloader.x3ii" 4241 appextra="recorder:gui:hosted" 4242 plugins="yes" 4243 # architecture, manufacturer and model for the target-tree build 4244 t_cpu="hosted" 4245 t_manufacturer="xduoo" 4246 t_model="xduoo_x3ii" 4247 sysfontbl="16-Terminus" 4248 ;; 4249 4250 243|xduoox20) 4251 target_id=111 4252 application=yes 4253 app_type="hibyos" 4254 modelname="xduoox20" 4255 target="XDUOO_X20" 4256 memory=8 4257 mipsellinuxcc 4258 tool="cp " 4259 boottool="cp " 4260 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4261 bmp2rb_native="$rootdir/tools/bmp2rb -f 10" 4262 output="rockbox.x20" 4263 bootoutput="bootloader.x20" 4264 appextra="recorder:gui:hosted" 4265 plugins="yes" 4266 # architecture, manufacturer and model for the target-tree build 4267 t_cpu="hosted" 4268 t_manufacturer="xduoo" 4269 t_model="xduoo_x20" 4270 sysfontbl="16-Terminus" 4271 ;; 4272 4273 244|fiiom3klinux) 4274 application="yes" 4275 app_type="fiio" 4276 target_id=112 4277 modelname="fiiom3klinux" 4278 target="FIIO_M3K_LINUX" 4279 memory=16 # XXX Can probably go over 32? 4280 tool="cp " 4281 boottool="cp " 4282 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4283 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4284 output="rockbox.m3k" 4285 bootoutput="bootloader.m3k" 4286 appextra="recorder:gui:hosted" 4287 plugins="yes" 4288 # architecture, manufacturer and model for the target-tree build 4289 t_cpu="hosted" 4290 t_manufacturer="fiio" 4291 t_model="m3k" 4292 mipsellinuxcc 4293 sysfontbl="16-Terminus" 4294 ;; 4295 4296 245|aigoerosq|erosq) 4297 target_id=113 4298 application=yes 4299 app_type="hibyos" 4300 modelname="aigoerosq" 4301 target="EROS_Q" 4302 memory=8 4303 mipsellinuxcc 4304 tool="cp " 4305 boottool="cp " 4306 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4307 bmp2rb_native="$rootdir/tools/bmp2rb -f 10" 4308 output="rockbox.erosq" 4309 bootoutput="bootloader.erosq" 4310 appextra="recorder:gui:hosted" 4311 plugins="yes" 4312 # architecture, manufacturer and model for the target-tree build 4313 t_cpu="hosted" 4314 t_manufacturer="aigo" 4315 t_model="erosq" 4316 sysfontbl="16-Terminus" 4317 ;; 4318 4319 246|fiiom3k) 4320 target_id=114 4321 modelname="fiiom3k" 4322 target="FIIO_M3K" 4323 memory=64 4324 mipsr2elcc 4325 appextra="recorder:gui" 4326 plugins="yes" 4327 tool="$rootdir/tools/scramble -add=fiiom3k " 4328 boottool="$rootdir/tools/mkspl-x1000 -type=nand -ppb=2 -bpp=2 " 4329 output="rockbox.m3k" 4330 bootoutput="bootloader.m3k" 4331 sysfontbl="16-Terminus" 4332 # toolset is the tools within the tools directory that we build for 4333 # this particular target. 4334 toolset="$x1000tools" 4335 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4336 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4337 # architecture, manufacturer and model for the target-tree build 4338 t_cpu="mips" 4339 t_manufacturer="ingenic_x1000" 4340 t_model="fiiom3k" 4341 ;; 4342 4343 247|erosqnative) 4344 target_id=116 4345 modelname="erosqnative" 4346 target="EROS_QN" 4347 memory=32 4348 mipsr2elcc 4349 appextra="recorder:gui" 4350 plugins="yes" 4351 tool="$rootdir/tools/scramble -add=erosqnative " 4352 boottool="$rootdir/tools/mkspl-x1000 -type=nand -ppb=2 -bpp=2 " 4353 output="rockbox.erosq" 4354 bootoutput="bootloader.erosq" 4355 sysfontbl="16-Terminus" 4356 # toolset is the tools within the tools directory that we build for 4357 # this particular target. 4358 toolset="$x1000tools" 4359 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4360 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4361 # architecture, manufacturer and model for the target-tree build 4362 t_cpu="mips" 4363 t_manufacturer="ingenic_x1000" 4364 t_model="erosqnative" 4365 # player version, for bootloader usage 4366 # versions 1 and 2 both use 1 4367 extradefines="$extradefines -DEROSQN_VER=1" 4368 ;; 4369 4370 248|erosqnative_v3) 4371 target_id=116 4372 modelname="erosqnative_v3" 4373 blonly="yes" 4374 target="EROS_QN" 4375 memory=32 4376 mipsr2elcc 4377 appextra="recorder:gui" 4378 plugins="yes" 4379 tool="$rootdir/tools/scramble -add=erosqnative " 4380 boottool="$rootdir/tools/mkspl-x1000 -type=nand -ppb=2 -bpp=2 " 4381 output="rockbox.erosq" 4382 bootoutput="bootloader.erosq" 4383 sysfontbl="16-Terminus" 4384 # toolset is the tools within the tools directory that we build for 4385 # this particular target. 4386 toolset="$x1000tools" 4387 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4388 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4389 # architecture, manufacturer and model for the target-tree build 4390 t_cpu="mips" 4391 t_manufacturer="ingenic_x1000" 4392 t_model="erosqnative" 4393 # player version, for bootloader usage 4394 # version 3 4395 extradefines="$extradefines -DEROSQN_VER=3" 4396 ;; 4397 4398 249|erosqnative_v4) 4399 target_id=116 4400 modelname="erosqnative_v4" 4401 blonly="yes" 4402 target="EROS_QN" 4403 memory=32 4404 mipsr2elcc 4405 appextra="recorder:gui" 4406 plugins="yes" 4407 tool="$rootdir/tools/scramble -add=erosqnative " 4408 boottool="$rootdir/tools/mkspl-x1000 -type=nand -ppb=2 -bpp=2 " 4409 output="rockbox.erosq" 4410 bootoutput="bootloader.erosq" 4411 sysfontbl="16-Terminus" 4412 # toolset is the tools within the tools directory that we build for 4413 # this particular target. 4414 toolset="$x1000tools" 4415 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4416 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4417 # architecture, manufacturer and model for the target-tree build 4418 t_cpu="mips" 4419 t_manufacturer="ingenic_x1000" 4420 t_model="erosqnative" 4421 # player version, for bootloader usage 4422 # version 4 4423 extradefines="$extradefines -DEROSQN_VER=4" 4424 ;; 4425 4426 250|ihifi770c) 4427 target_id=107 4428 modelname="ihifi770c" 4429 target="IHIFI770C" 4430 memory=16 4431 arm7ejscc 4432 tool="$rootdir/tools/scramble -rkw -modelnum=97" 4433 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4434 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4435 output="rockbox.rkw" 4436 bootoutput="bootloader.rkw" 4437 appextra="recorder:gui" 4438 plugins="yes" 4439 # toolset is the tools within the tools directory that we build for 4440 # this particular target. 4441 toolset="$genericbitmaptools" 4442 # architecture, manufacturer and model for the target-tree build 4443 t_cpu="arm" 4444 t_manufacturer="rk27xx" 4445 t_model="ihifi2" 4446 ;; 4447 4448 232|ihifi770) 4449 target_id=108 4450 modelname="ihifi770" 4451 target="IHIFI770" 4452 memory=16 4453 arm7ejscc 4454 tool="$rootdir/tools/scramble -rkw -modelnum=98" 4455 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4456 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4457 output="rockbox.rkw" 4458 bootoutput="bootloader.rkw" 4459 appextra="recorder:gui" 4460 plugins="yes" 4461 # toolset is the tools within the tools directory that we build for 4462 # this particular target. 4463 toolset="$genericbitmaptools" 4464 # architecture, manufacturer and model for the target-tree build 4465 t_cpu="arm" 4466 t_manufacturer="rk27xx" 4467 t_model="ihifi2" 4468 ;; 4469 4470 233|ihifi800) 4471 target_id=109 4472 modelname="ihifi800" 4473 target="IHIFI800" 4474 memory=16 4475 arm7ejscc 4476 tool="$rootdir/tools/scramble -rkw -modelnum=99" 4477 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4478 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4479 output="rockbox.rkw" 4480 bootoutput="bootloader.rkw" 4481 appextra="recorder:gui" 4482 plugins="yes" 4483 # toolset is the tools within the tools directory that we build for 4484 # this particular target. 4485 toolset="$genericbitmaptools" 4486 # architecture, manufacturer and model for the target-tree build 4487 t_cpu="arm" 4488 t_manufacturer="rk27xx" 4489 t_model="ihifi2" 4490 ;; 4491 4492 260|shanlingq1) 4493 target_id=115 4494 modelname="shanlingq1" 4495 target="SHANLING_Q1" 4496 memory=64 4497 mipsr2elcc 4498 appextra="recorder:gui" 4499 plugins="yes" 4500 tool="$rootdir/tools/scramble -add=shq1 " 4501 boottool="$rootdir/tools/mkspl-x1000 -type=nand -ppb=2 -bpp=2 " 4502 output="rockbox.q1" 4503 bootoutput="bootloader.q1" 4504 sysfontbl="16-Terminus" 4505 # toolset is the tools within the tools directory that we build for 4506 # this particular target. 4507 toolset="$x1000tools" 4508 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4509 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4510 # architecture, manufacturer and model for the target-tree build 4511 t_cpu="mips" 4512 t_manufacturer="ingenic_x1000" 4513 t_model="shanlingq1" 4514 ;; 4515 4516 270|echor1) 4517 target_id=119 4518 modelname="echor1" 4519 target="ECHO_R1" 4520 memory=32 4521 armcortexm7cc 4522 appextra="recorder:gui" 4523 plugins="no" 4524 tool="cp " 4525 boottool="cp " 4526 output="rockbox.echo" 4527 bootoutput="bootloader.echo" 4528 sysfontbl="16-Terminus" 4529 sysfont="14-Rockbox-Mix" 4530 # toolset is the tools within the tools directory that we build for 4531 # this particular target. 4532 toolset="$genericbitmaptools scramble uclpack" 4533 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4534 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4535 # architecture, manufacturer and model for the target-tree build 4536 t_cpu="arm" 4537 t_manufacturer="stm32" 4538 t_model="echoplayer" 4539 ;; 4540 4541 280|surfansf28) 4542 target_id=120 4543 application=yes 4544 app_type="hibyos" 4545 modelname="surfansf28" 4546 target="SURFANS_F28" 4547 memory=32 # 64 total! 4548 mipsellinuxcc 4549 tool="cp " 4550 boottool="cp " 4551 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4552 bmp2rb_native="$rootdir/tools/bmp2rb -f 10" 4553 output="rockbox.f28" 4554 bootoutput="bootloader.f28" 4555 appextra="recorder:gui:hosted" 4556 plugins="no" 4557 # architecture, manufacturer and model for the target-tree build 4558 t_cpu="hosted" 4559 t_manufacturer="surfans" 4560 t_model="f28" 4561 sysfontbl="16-Terminus" 4562 ;; 4563 4564 290|ctru) 4565 target_id=122 4566 application="yes" 4567 modelname="ctru" 4568 app_type="ctru-app" 4569 target="CTRU" 4570 memory=16 4571 uname=`uname` 4572 devkitarmcc 4573 tool="cp " 4574 boottool="cp " 4575 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 4576 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 4577 output="rockbox" 4578 bootoutput="rockbox" 4579 appextra="recorder:gui" 4580 plugins="no" 4581 t_cpu="hosted" 4582 t_manufacturer="ctru" 4583 t_model="app" 4584 ;; 4585 4586 *) 4587 echo "Please select a supported target platform!" 4588 exit 7 4589 ;; 4590 4591 esac 4592 4593 echo "Platform set to $modelname" 4594 4595 4596#remove start 4597############################################################################ 4598# Amount of memory, for those that can differ. They have $memory unset at 4599# this point. 4600# 4601 4602if [ -z "$memory" ]; then 4603 case $target_id in 4604 15) 4605 if [ "$ARG_RAM" ]; then 4606 size=$ARG_RAM 4607 else 4608 echo "Enter size of your RAM (in MB): (Defaults to 32)" 4609 size=`input`; 4610 fi 4611 case $size in 4612 60|64) 4613 memory="64" 4614 ;; 4615 *) 4616 memory="32" 4617 ;; 4618 esac 4619 ;; 4620 *) 4621 if [ "$ARG_RAM" ]; then 4622 size=$ARG_RAM 4623 else 4624 echo "Enter size of your RAM (in MB): (Defaults to 2)" 4625 size=`input`; 4626 fi 4627 case $size in 4628 8) 4629 memory="8" 4630 ;; 4631 *) 4632 memory="2" 4633 ;; 4634 esac 4635 ;; 4636 esac 4637 echo "Memory size selected: $memory MB" 4638 [ "$ARG_TYPE" ] || echo "" 4639fi 4640#remove end 4641 4642################################################################## 4643# Figure out build "type" 4644# 4645 4646case $modelname in 4647 sansae200r|sansae200) 4648 gdbstub=", (I)nstaller" 4649 ;; 4650 sansac200) 4651 gdbstub=", (E)raser" 4652 ;; 4653 sansae200) 4654 gdbstub=", (E)raser" 4655 ;; 4656 *) 4657 ;; 4658esac 4659if [ "$ARG_TYPE" ]; then 4660 btype=$ARG_TYPE 4661else 4662 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (W)arble codec tool$gdbstub: (Defaults to N)" 4663 btype=`input`; 4664fi 4665 4666 case $btype in 4667 [Ii]) 4668 appsdir='$(ROOTDIR)/bootloader' 4669 apps="bootloader" 4670 extradefines="$extradefines -DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections" 4671 bootloader="1" 4672 echo "e200R-installer build selected" 4673 ;; 4674 [Ee]) 4675 appsdir='$(ROOTDIR)/bootloader' 4676 apps="bootloader" 4677 extradefines="$extradefines -DBOOTLOADER -DSANSA_PP_ERASE -ffunction-sections -fdata-sections" 4678 bootloader="1" 4679 echo "sansa eraser build selected" 4680 ;; 4681 [Bb]) 4682 do_bootloader 4683 echo "Bootloader build selected" 4684 ;; 4685 [Ss]) 4686 if [ "$modelname" = "sansae200r" ]; then 4687 echo "Do not use the e200R target for simulator builds. Use e200 instead." 4688 exit 8 4689 elif [ "$modelname" = "sdlapp" ]; then 4690 echo "Do not use sdlapp for simulator builds; it is already a native SDL application." 4691 exit 8 4692 fi 4693 debug="-DDEBUG" 4694 simulator="yes" 4695 extradefines="$extradefines -DSIMULATOR -DHAVE_TEST_PLUGINS" 4696 flash="" 4697 echo "Simulator build selected" 4698 ;; 4699 [Aa]*) 4700 echo "Advanced build selected" 4701 whichadvanced $btype 4702 ;; 4703 [Cc]) 4704 uname=`uname` 4705 simcc "checkwps" 4706 toolset=''; 4707 GCCOPTS=''; 4708 LDOPTS=''; 4709 rbdir='.' 4710 extradefines="$extradefines -DDEBUG" 4711 appsdir='$(ROOTDIR)/tools/checkwps'; 4712 output='checkwps.'${modelname}; 4713 echo "CheckWPS build selected" 4714 ;; 4715 [Dd]) 4716 uname=`uname` 4717 simcc "database-sdl" 4718 toolset=''; 4719 appsdir='$(ROOTDIR)/tools/database'; 4720 4721 case $uname in 4722 CYGWIN*|MINGW*) 4723 output="database_${modelname}.exe" 4724 ;; 4725 *) 4726 output='database.'${modelname}; 4727 ;; 4728 esac 4729 # architecture, manufacturer and model for the target-tree build 4730 t_cpu="hosted" 4731 t_manufacturer="sdl" 4732 t_model="database" 4733 echo "Database tool build selected" 4734 ;; 4735 [Ww]) 4736 uname=`uname` 4737 simcc "warble" 4738 toolset=''; 4739 t_cpu=''; 4740 GCCOPTS=''; 4741 extradefines="$extradefines -DDEBUG -DWARBLE" 4742 output='warble.'${modelname}; 4743 echo "Warble build selected" 4744 ;; 4745 *) 4746 if [ "$modelname" = "sansae200r" ]; then 4747 echo "Do not use the e200R target for regular builds. Use e200 instead." 4748 exit 8 4749 fi 4750 debug="" 4751 btype="N" # set it explicitly since RET only gets here as well 4752 echo "Normal build selected" 4753 ;; 4754 4755 esac 4756 # to be able running "make manual" from non-manual configuration 4757 case $modelname in 4758 iriverh1??) 4759 manualdev="iriverh100" 4760 ;; 4761 ipodmini2g) 4762 manualdev="ipodmini1g" 4763 ;; 4764 *) 4765 manualdev=$modelname 4766 ;; 4767 esac 4768 4769if [ -z "$debug" ]; then 4770 GCCOPTS="$GCCOPTS $GCCOPTIMIZE" 4771fi 4772 4773# if building a simulator for an hosted port, APPLICATION 4774# define clashes with SIMULATOR define 4775 4776if [ "yes" = "$simulator" ]; then 4777 echo Unsetting APPLICATION define for SIMULATOR build 4778 unset application 4779fi 4780 4781if [ "yes" = "$application" ]; then 4782 echo Building Rockbox as an Application 4783 extradefines="$extradefines -DAPPLICATION" 4784fi 4785 4786echo "Using source code root directory: $rootdir" 4787 4788uname=`uname` 4789 4790if [ "yes" = "$simulator" ]; then 4791 # setup compiler and things for simulator 4792 simcc "sdl-sim" 4793 4794 if [ -d "simdisk" ]; then 4795 echo "Subdirectory 'simdisk' already present" 4796 else 4797 mkdir simdisk 4798 echo "Created a 'simdisk' subdirectory for simulating the hard disk" 4799 fi 4800fi 4801 4802# Now, figure out version number of the (gcc) compiler we are about to use 4803gccver=`$CC -dumpversion`; 4804 4805# figure out the binutil version too 4806if [ "yes" = "$simulator" ] || [ "yes" = "$application" ] && [ $uname = "Darwin" ]; then 4807 ldnum=0 4808else 4809 ldnum=`$LD --version | sed -n '1p' | sed -e 's/.* \([0-9]*\)\.\([0-9]*\).*/\1\2/'` 4810fi 4811 4812if test "$ldnum" -ge "239"; then 4813 GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,--no-warn-rwx-segments" 4814fi 4815 4816if test "$ldnum" -ge "227"; then 4817 have_nocrossrefs_to="#define HAVE_NOCROSSREFS_TO" 4818else 4819 have_nocrossrefs_to="#undef HAVE_NOCROSSREFS_TO" 4820fi 4821 4822if [ -z "$gccver" ]; then 4823 echo "[WARNING] The compiler you must use ($CC) is not in your path!" 4824 echo "[WARNING] this may cause your build to fail since we cannot do the" 4825 echo "[WARNING] checks we want now." 4826else 4827 4828 # convert gcc version to a number (major*100 + minor). 4829 # Newer compilers may only return the major number, so we neen to fetch the 4830 # version using -dumpfullversion. MinGW compilers may return names like 4831 # "7.3-win32", so me must strip off the last part. 4832 gccver2=`$CC -dumpfullversion -dumpversion | cut -d "-" -f1`; 4833 num1=`echo $gccver2 | cut -d . -f1` 4834 num2=`echo $gccver2 | cut -d . -f2` 4835 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null` 4836 4837 # This makes: 4838 # 3.3.X => 303 4839 # 3.4.X => 304 4840 # 2.95.3 => 295 4841 # 7.3-win32 => 703 4842 4843 echo "Using $CC $gccver ($gccnum)" 4844 4845 if test "$gccnum" -ge "400"; then 4846 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness 4847 # so we ignore that warnings for now 4848 # -Wno-pointer-sign 4849 GCCOPTS="$GCCOPTS -Wno-pointer-sign" 4850 fi 4851 4852 if test "$gccnum" -ge "402"; then 4853 # disable warning about "warning: initialized field overwritten" as gcc 4.2 4854 # and later would throw it for several valid cases 4855 GCCOPTS="$GCCOPTS -Wno-override-init" 4856 fi 4857 4858 if test "$gccnum" -ge "700"; then 4859 # gcc 7 spews a bunch of warnings by default 4860 GCCOPTS="$GCCOPTS -Wimplicit-fallthrough=0" 4861 fi 4862 4863 case "$GCCOPTS" in 4864 *-mcpu=cortex-m7*) 4865 # Cortex-M7 support wasn't added until GCC 5. Since we don't use any 4866 # M7-specific features, we can compile as Cortex-M4 when on GCC 4.9. 4867 if test "$gccnum" -lt "500"; then 4868 GCCOPTS=$(echo "$GCCOPTS" | sed -e "s/-mcpu=cortex-m7/-mcpu=cortex-m4 -mthumb/") 4869 fi 4870 ;; 4871 esac 4872 4873 case $prefix in 4874 ""|"$CROSS_COMPILE") 4875 # simulator 4876 ;; 4877 *) 4878 # Verify that the cross-compiler is of a recommended version! 4879 if test "$gccver" != "$gccchoice"; then 4880 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended" 4881 echo "WARNING: version $gccchoice!" 4882 echo "WARNING: This may cause your build to fail since it may be a version" 4883 echo "WARNING: that isn't functional or known to not be the best choice." 4884 echo "WARNING: If you suffer from build problems, you know that this is" 4885 echo "WARNING: a likely source for them..." 4886 fi 4887 ;; 4888 esac 4889 4890fi 4891 4892 4893echo "Using $LD" 4894 4895makever=`make --version | head -1` 4896echo "Detected make $makever" 4897 4898if [ "$ARG_CCACHE" = "1" ]; then 4899 echo "Enable ccache for building" 4900 ccache="ccache" 4901elif [ "$ARG_CCACHE" != "0" ]; then 4902 ccache=`findtool ccache` 4903 if test -n "$ccache"; then 4904 echo "Found and uses ccache ($ccache)" 4905 fi 4906else 4907 CCACHE_ARG="export CCACHE_DISABLE=true" 4908fi 4909 4910# figure out the full path to the various commands if possible 4911HOSTCC=`findtool gcc --lit` 4912HOSTAR=`findtool ar --lit` 4913CC=`findtool ${CC} --lit` 4914CPP=`findtool ${CPP} --lit` 4915LD=`findtool ${LD} --lit` 4916AR=`findtool ${AR} --lit` 4917AS=`findtool ${AS} --lit` 4918OC=`findtool ${OC} --lit` 4919WINDRES=`findtool ${WINDRES} --lit` 4920DLLTOOL=`findtool ${DLLTOOL} --lit` 4921DLLWRAP=`findtool ${DLLWRAP} --lit` 4922RANLIB=`findtool ${RANLIB} --lit` 4923 4924# in pure cross-compiler environments without own native compiler this helps: 4925HOSTCC=${HOSTCC:-${CC}} 4926HOSTAR=${HOSTAR:-${AR}} 4927 4928if [ -z "$arch" ]; then 4929 cpp_defines=$(echo "" | $CPP $GCCOPTS -dD) 4930 if [ -n "$(echo $cpp_defines | grep -w __m68k__)" ]; then 4931 arch="m68k" 4932 elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then 4933 arch="arm" 4934 # cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4) 4935 arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,' | grep -v __ARM_ARCH | head -1)" 4936 arch_profile="$(echo "$cpp_defines" | grep 'define __ARM_ARCH_PROFILE' | sed -e 's,.* \([0-9]\+\)$,\1,')" 4937 if test "$gccnum" -ge "800"; then 4938 # GCC8+ can natively emit unified asm syntax 4939 GCCOPTS="$GCCOPTS -masm-syntax-unified" 4940 fi 4941 case "$arch_profile" in 4942 77) 4943 arch_profile=micro 4944 4945 # We have a lot of assembly written for ARM32, which won't 4946 # successfully assemble on a Thumb-only core due to missing 4947 # IT blocks. The recommended practice for portable assembly 4948 # is to add explicit IT blocks nowadays. 4949 # 4950 # This option instructs the assembler to add IT blocks 4951 # automatically as needed, which allows the old assembly to 4952 # compile unchanged (although it might be sub-optimal). 4953 GCCOPTS="$GCCOPTS -Wa,-mimplicit-it=thumb" 4954 4955 # Disable this option -- it only makes sense for cores that 4956 # support both ARM and Thumb instruction sets. 4957 if [ "$ARG_ARM_THUMB" = "1" ]; then 4958 echo "Warning: --thumb option has no effect on ARM M profile cores" 4959 ARG_ARM_THUMB=0 4960 fi 4961 ;; 4962 *) 4963 # On classic ARM we expect an empty string, so only warn if it's nonempty 4964 if [ -n "$arch_profile" ]; then 4965 echo "Warning: Cannot determine target ARM profile, assuming classic" 4966 fi 4967 4968 arch_profile=classic 4969 ;; 4970 esac 4971 elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then 4972 arch="mips" 4973 arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep _MIPS_ARCH_MIPS | sed -e 's,.*\([0-9][0-9]\).*,\1,' | grep -v _MIPS_ARCH_MIPS)" 4974 elif [ -n "$(echo $cpp_defines | grep -w __i386__)" ]; then 4975 arch="x86" 4976 elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then 4977 arch="amd64" 4978 else 4979 arch="none" 4980 echo "Warning: Could not determine target arch" 4981 fi 4982 if [ "$arch" != "none" ]; then 4983 if [ -n "$arch_version" ]; then 4984 if [ -n "$arch_profile" ]; then 4985 echo "Automatically selected arch: $arch (ver $arch_version, profile $arch_profile)" 4986 else 4987 echo "Automatically selected arch: $arch (ver $arch_version)" 4988 fi 4989 else 4990 echo "Automatically selected arch: $arch" 4991 fi 4992 fi; 4993else 4994 if [ -n "$arch_version" ]; then 4995 echo "Manually selected arch: $arch (ver $arch_version)" 4996 else 4997 echo "Manually selected arch: $arch" 4998 fi 4999fi 5000 5001Darch="#define ARCH arch_$arch" 5002if [ -n "$arch_version" ]; then 5003 Darch_version="#define ARCH_VERSION $arch_version" 5004fi 5005if [ -n "$arch_profile" ]; then 5006 Darch_profile="#define ARCH_PROFILE $(echo ${arch}_PROFILE_${arch_profile} | tr [a-z] [A-Z])" 5007fi 5008 5009if test -n "$ccache"; then 5010 CC="$ccache $CC" 5011fi 5012 5013if test "$ARG_ARM_THUMB" = "1"; then 5014 extradefines="$extradefines -DUSE_THUMB" 5015 CC="$toolsdir/thumb-cc.py $CC" 5016fi 5017 5018if test "X$endian" = "Xbig"; then 5019 defendian="ROCKBOX_BIG_ENDIAN" 5020else 5021 defendian="ROCKBOX_LITTLE_ENDIAN" 5022fi 5023 5024if [ "$ARG_RBDIR" != "" ]; then 5025 if [ -z `echo $ARG_RBDIR | grep '^/'` ]; then 5026 rbdir="/"$ARG_RBDIR 5027 else 5028 rbdir=$ARG_RBDIR 5029 fi 5030 echo "Using alternate rockbox dir: ${rbdir}" 5031fi 5032 5033cat > autoconf.h.new <<EOF 5034/* This header was made by configure */ 5035#ifndef __BUILD_AUTOCONF_H 5036#define __BUILD_AUTOCONF_H 5037 5038/* lower case names match the what's exported in the Makefile 5039 * upper case name looks nicer in the code */ 5040 5041#define arch_none 0 5042#define ARCH_NONE 0 5043 5044#define arch_sh 1 5045#define ARCH_SH 1 5046 5047#define arch_m68k 2 5048#define ARCH_M68K 2 5049 5050#define arch_arm 3 5051#define ARCH_ARM 3 5052 5053#define arch_mips 4 5054#define ARCH_MIPS 4 5055 5056#define arch_x86 5 5057#define ARCH_X86 5 5058 5059#define arch_amd64 6 5060#define ARCH_AMD64 6 5061 5062#define ARM_PROFILE_CLASSIC 0 /* Classic ARM cores (<= ARMv6) */ 5063#define ARM_PROFILE_MICRO 1 /* ARMv6/ARMv7+ M-profile cores */ 5064 5065/* Define target machine architecture */ 5066${Darch} 5067/* Optionally define architecture version and/or profile */ 5068${Darch_version} 5069${Darch_profile} 5070 5071/* Define endianess for the target or simulator platform */ 5072#define ${defendian} 1 5073 5074/* Define the GCC version used for the build */ 5075#define GCCNUM ${gccnum} 5076 5077/* Define this if you build rockbox to support the logf logging and display */ 5078${use_logf} 5079 5080/* Define this if you want logf to output to the serial port */ 5081${use_logf_serial} 5082 5083/* Define this to record a chart with timings for the stages of boot */ 5084${use_bootchart} 5085 5086/* optional define for FM radio mod for iAudio M5 */ 5087${have_fmradio_in} 5088 5089/* optional define for USB Serial */ 5090${use_usb_serial} 5091 5092/* optional defines for RTC mod for h1x0 */ 5093${config_rtc} 5094${have_rtc_alarm} 5095 5096/* the threading backend we use */ 5097#define ${thread_support} 5098 5099/* lcd dimensions for application builds from configure */ 5100${app_lcd_width} 5101${app_lcd_height} 5102 5103/* root of Rockbox */ 5104#define ROCKBOX_DIR "${rbdir}" 5105#define ROCKBOX_SHARE_PATH "${sharedir}" 5106#define ROCKBOX_BINARY_PATH "${bindir}" 5107#define ROCKBOX_LIBRARY_PATH "${libdir}" 5108 5109/* linker feature test macro for validating cross-section references */ 5110${have_nocrossrefs_to} 5111 5112#endif /* __BUILD_AUTOCONF_H */ 5113EOF 5114 5115# Make sure the file is different. 5116if ! diff -q autoconf.h.new autoconf.h > /dev/null 2>&1 ; then 5117 mv autoconf.h.new autoconf.h 5118 echo "Created autoconf.h" 5119else 5120 rm -f autoconf.h.new 5121fi 5122 5123if test -n "$t_cpu"; then 5124 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model" 5125 5126 if [ "$application" = "yes" ] && [ "$t_manufacturer" = "maemo" ]; then 5127 # Maemo needs the SDL port, too 5128 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app" 5129 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl" 5130 elif [ "$application" = "yes" ] && [ "$t_manufacturer" = "pandora" ]; then 5131 # Pandora needs the SDL port, too 5132 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/app" 5133 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl" 5134 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree 5135 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl" 5136 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted" 5137 elif [ "$application" = "yes" ] && [ "$t_manufacturer" = "ctru" ]; then 5138 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/ctru/lib" 5139 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/ctru/lib/bfile" 5140 fi 5141 5142 if [ "$tinyalsa" = "yes" ]; then 5143 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/tinyalsa/include" 5144 extradefines="$extradefines -DUSE_TINYALSA" 5145 fi 5146 5147 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer" 5148 test -n "$t_soc" && TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_soc" 5149 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu" 5150 GCCOPTS="$GCCOPTS" 5151fi 5152 5153voicetoolset="rbspeexenc voicefont wavtrim" 5154 5155if test "$apps" = "apps"; then 5156 # only when we build "real" apps we build the .lng files 5157 buildlangs="langs" 5158fi 5159 5160#### Fix the cmdline ### 5161if [ -n "$ARG_PREFIX" ]; then 5162 cmdline="$cmdline --prefix=\$(PREFIX)" 5163fi 5164if [ -n "$ARG_LCDWIDTH" ]; then 5165 cmdline="$cmdline --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT " 5166fi 5167 5168# remove parts from the cmdline we're going to set unconditionally 5169cmdline=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \ 5170 -e s,--ram=[0-9]\*,,g \ 5171 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \ 5172 -e s,--voice=[-_./a-zA-Z0-9]\*,,g \ 5173 -e s,--type=[a-zA-Z0-9]\*,,g` 5174cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts" 5175 5176### end of cmdline 5177 5178cat > Makefile <<EOF 5179## Automatically generated. http://www.rockbox.org/ 5180 5181export ROOTDIR=${rootdir} 5182export FIRMDIR=\$(ROOTDIR)/firmware 5183export APPSDIR=${appsdir} 5184export TOOLSDIR=${toolsdir} 5185export DOCSDIR=${rootdir}/docs 5186export MANUALDIR=${rootdir}/manual 5187export DEBUG=${debug} 5188export MODELNAME=${modelname} 5189export FLASHFILE=${flash} 5190export TARGET_ID=${target_id} 5191export TARGET=-D${target} 5192export SYSFONT=${sysfont} 5193export ARCH=arch_${arch} 5194export ARCH_VERSION=${arch_version} 5195export ARCH_PROFILE=${arch_profile} 5196export CPU=${t_cpu} 5197export MANUFACTURER=${t_manufacturer} 5198export OBJDIR=${pwd} 5199export BUILDDIR=${pwd} 5200export RBCODEC_BLD=${pwd}/lib/rbcodec 5201export VOICELANGUAGE=${voicelanguage} 5202export MEMORYSIZE=${memory} 5203export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d') 5204export MKFIRMWARE=${tool} 5205export BMP2RB_MONO=${bmp2rb_mono} 5206export BMP2RB_NATIVE=${bmp2rb_native} 5207export BMP2RB_REMOTEMONO=${bmp2rb_remotemono} 5208export BMP2RB_REMOTENATIVE=${bmp2rb_remotenative} 5209export BINARY=${output} 5210export APPEXTRA=${appextra} 5211export ENABLEDPLUGINS=${plugins} 5212export EXTRA_DEFINES=${extradefines} 5213export HOSTCC=${HOSTCC} 5214export HOSTAR=${HOSTAR} 5215export CC=${CC} 5216export CPP=${CPP} 5217export LD=${LD} 5218export AR=${AR} 5219export AS=${AS} 5220export OC=${OC} 5221export WINDRES=${WINDRES} 5222export DLLTOOL=${DLLTOOL} 5223export DLLWRAP=${DLLWRAP} 5224export RANLIB=${RANLIB} 5225export PREFIX=${ARG_PREFIX} 5226export PROFILE_OPTS=${PROFILE_OPTS} 5227export APP_TYPE=${app_type} 5228export APPLICATION=${application} 5229export SIMDIR=\$(ROOTDIR)/uisimulator/sdl 5230export GCCOPTS=${GCCOPTS} 5231export TARGET_INC=${TARGET_INC} 5232export LOADADDRESS=${loadaddress} 5233export SHARED_LDFLAGS=${SHARED_LDFLAGS} 5234export SHARED_CFLAGS=${SHARED_CFLAGS} 5235export LDOPTS=${LDOPTS} 5236export GLOBAL_LDOPTS=${GLOBAL_LDOPTS} 5237export LDMAP_OPT=${LDMAP_OPT} 5238export GCCVER=${gccver} 5239export GCCNUM=${gccnum} 5240export UNAME=${uname} 5241export MANUALDEV=${manualdev} 5242export TTS_OPTS=${TTS_OPTS} 5243export TTS_ENGINE=${TTS_ENGINE} 5244export ENC_OPTS=${ENC_OPTS} 5245export ENCODER=${ENCODER} 5246export USE_ELF=${USE_ELF} 5247export RBDIR=${rbdir} 5248export ROCKBOX_SHARE_PATH=${sharedir} 5249export ROCKBOX_BINARY_PATH=${bindir} 5250export ROCKBOX_LIBRARY_PATH=${libdir} 5251export SDLCONFIG=${sdl} 5252export LCDORIENTATION=${lcd_orientation} 5253export ANDROID_ARCH=${ANDROID_ARCH} 5254export ANDROID_NDK_PATH=${ANDROID_NDK_PATH} 5255export ANDROID_SDK_PATH=${ANDROID_SDK_PATH} 5256export FUNKEY_SDK_PATH=${FUNKEY_SDK_PATH} 5257export ANDROID_PLATFORM_VERSION=${ANDROID_PLATFORM_VERSION} 5258export TOOLSET=${toolset} 5259export PIPER_MODEL_DIR=${PIPER_MODEL_DIR} 5260$CCACHE_ARG 5261$LTO_ARG 5262 5263CONFIGURE_OPTIONS=${cmdline} 5264 5265include \$(TOOLSDIR)/root.make 5266EOF 5267 5268echo "Created Makefile"