diff --git a/android/android.make b/android/android.make index c0d72a7a05..0be3204535 100644 --- a/android/android.make +++ b/android/android.make @@ -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) diff --git a/firmware/SOURCES b/firmware/SOURCES index aca752b2c2..80267b4320 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -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 diff --git a/firmware/export/config.h b/firmware/export/config.h index f654609966..d9e32ce8cc 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -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__ */ diff --git a/tools/configure b/tools/configure index 2d93b37676..a935d6a598 100755 --- a/tools/configure +++ b/tools/configure @@ -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 <