Add the Android/MIPS target
Change-Id: Iec1d2f08c8a43e486ab1696566a718b18598ff95
This commit is contained in:
parent
268b725c40
commit
d1560e5869
4 changed files with 67 additions and 3 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
PACKAGE=org.rockbox
|
||||
PACKAGE_PATH=org/rockbox
|
||||
BINLIB_DIR=$(BUILDDIR)/libs/armeabi
|
||||
BINLIB_DIR=$(BUILDDIR)/libs/$(ANDROID_ARCH)
|
||||
ANDROID_DIR=$(ROOTDIR)/android
|
||||
|
||||
# this is a glibc compatibility hack to provide a get_nprocs() replacement.
|
||||
|
@ -70,7 +70,7 @@ APK := $(BUILDDIR)/rockbox.apk
|
|||
_DIRS := $(BUILDDIR)/___/$(PACKAGE_PATH)
|
||||
DIRS += $(subst ___,gen,$(_DIRS))
|
||||
DIRS += $(subst ___,data,$(_DIRS))
|
||||
DIRS += $(BUILDDIR)/libs/armeabi
|
||||
DIRS += $(BUILDDIR)/libs/$(ANDROID_ARCH)
|
||||
DIRS += $(CPUFEAT_BUILD)
|
||||
DIRS += $(CLASSPATH)
|
||||
|
||||
|
|
|
@ -634,7 +634,7 @@ target/arm/rk27xx/crt0.S
|
|||
target/arm/crt0.S
|
||||
#endif /* defined(CPU_*) */
|
||||
|
||||
#elif defined(CPU_MIPS)
|
||||
#elif defined(CPU_MIPS) && (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
||||
target/mips/mmu-mips.c
|
||||
#if CONFIG_CPU==JZ4732
|
||||
target/mips/ingenic_jz47xx/crt0.S
|
||||
|
|
|
@ -1133,4 +1133,9 @@ Lyre prototype 1 */
|
|||
#define HAVE_PITCHCONTROL
|
||||
#endif
|
||||
|
||||
#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(CPU_MIPS)
|
||||
/* We don't have our own MIPS hosted threading support yet */
|
||||
#define HAVE_SIGALTSTACK_THREADS
|
||||
#endif
|
||||
|
||||
#endif /* __CONFIG_H__ */
|
||||
|
|
59
tools/configure
vendored
59
tools/configure
vendored
|
@ -681,6 +681,35 @@ androidcc () {
|
|||
LDOPTS="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-5/arch-arm $LDOPTS"
|
||||
endian="little"
|
||||
SHARED_LDFLAG="-shared"
|
||||
ANDROID_ARCH=armeabi
|
||||
}
|
||||
|
||||
androidmipscc () {
|
||||
if [ -z "$ANDROID_SDK_PATH" ]; then
|
||||
echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
|
||||
echo "environment variable point to the root directory of the Android SDK."
|
||||
exit
|
||||
fi
|
||||
if [ -z "$ANDROID_NDK_PATH" ]; then
|
||||
echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
|
||||
echo "environment variable point to the root directory of the Android NDK."
|
||||
exit
|
||||
fi
|
||||
buildhost=$(uname | tr "[:upper:]" "[:lower:]")
|
||||
gccchoice="4.4.3"
|
||||
gcctarget="mipsel-linux-android-"
|
||||
gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
|
||||
arch_version=32 # FIXME: autodetect version (32 or 64)
|
||||
PATH=$PATH:$gccprefix/bin
|
||||
prefixtools $gcctarget
|
||||
GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
|
||||
GCCOPTS="$GCCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -fomit-frame-pointer \
|
||||
--sysroot=$ANDROID_NDK_PATH/platforms/android-14/arch-mips -fPIC"
|
||||
GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack"
|
||||
LDOPTS="-shared -ldl -llog --sysroot=$ANDROID_NDK_PATH/platforms/android-14/arch-mips $LDOPTS"
|
||||
endian="little"
|
||||
SHARED_LDFLAG="-shared"
|
||||
ANDROID_ARCH=mips
|
||||
}
|
||||
|
||||
whichadvanced () {
|
||||
|
@ -1293,6 +1322,7 @@ cat <<EOF
|
|||
203) Nokia N900 190) HM-60x
|
||||
204) Pandora 191) HM-801
|
||||
205) Samsung YP-R0
|
||||
206) Android MIPS
|
||||
EOF
|
||||
|
||||
buildfor=`input`;
|
||||
|
@ -3316,6 +3346,34 @@ fi
|
|||
t_model="app"
|
||||
;;
|
||||
|
||||
206|androidmips)
|
||||
application="yes"
|
||||
target_id=74
|
||||
modelname="androidmips"
|
||||
target="ANDROID"
|
||||
app_type="android"
|
||||
app_set_lcd_size
|
||||
sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
|
||||
bindir="/data/data/org.rockbox/lib"
|
||||
libdir="/data/data/org.rockbox/app_rockbox"
|
||||
memory=8
|
||||
uname=`uname`
|
||||
androidmipscc
|
||||
tool="cp "
|
||||
boottool="cp "
|
||||
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
||||
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
||||
output="librockbox.so"
|
||||
bootoutput="librockbox.so"
|
||||
appextra="recorder:gui:radio:hosted/android"
|
||||
plugins="yes"
|
||||
swcodec="yes"
|
||||
# architecture, manufacturer and model for the target-tree build
|
||||
t_cpu="hosted"
|
||||
t_manufacturer="android"
|
||||
t_model="app"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Please select a supported target platform!"
|
||||
exit 7
|
||||
|
@ -3944,6 +4002,7 @@ export ROCKBOX_BINARY_PATH=${bindir}
|
|||
export ROCKBOX_LIBRARY_PATH=${libdir}
|
||||
export SDLCONFIG=${sdl}
|
||||
export LCDORIENTATION=${lcd_orientation}
|
||||
export ANDROID_ARCH=${ANDROID_ARCH}
|
||||
|
||||
CONFIGURE_OPTIONS=${cmdline}
|
||||
|
||||
|
|
Loading…
Reference in a new issue