1Android NDK MIPS32 instruction set support 2=== 3 4Introduction: 5------------- 6 7Android NDK r8 added support for the 'mips' ABI, that allows native code to 8run on Android-based devices running on CPUs supporting the MIPS32 instruction 9set. 10 11The Android 'mips' ABI itself is fully specified in d/CPU-ARCH-ABIS. 12 13Overview: 14--------- 15 16Generating mips machine code is simple: just add 'mips' to your APP_ABI 17definition in your Application.mk file, for example: 18 19 APP_ABI := armeabi armeabi-v7a mips 20 21Alternatively, since NDK r7, you can use: 22 23 APP_ABI := all 24 25will generate machine code for all supported ABIs with this NDK. Doing so 26will ensure that your application package contains libraries for all target 27ABIs. Note that this has an impact on package size, since each ABI will 28correspond to its own set of native libraries built from the same sources. 29 30As you would expect, generated libraries will go into $PROJECT/libs/mips/, and 31will be embedded into your .apk under /lib/mips/. 32 33And just like other ABIs, the Android package manager will extract these 34libraries on a *compatible* mips-based device automatically at install time, 35to put them under `<dataPath>/lib`, where `<dataPath>` is the 36application's private data directory. 37 38Similarly, the Android Market server is capable of filtering applications 39based on the native libraries they embed and your device's target CPU. 40 41Debugging with ndk-gdb should work exactly as described under docs/NDK-GDB.html. 42 43Standalone-toolchain: 44--------------------- 45 46It is possible to use the mips toolchain with NDK r8 in stand-alone mode. 47See docs/STANDALONE-TOOLCHAIN.html for more details. Briefly speaking, 48it is now possible to run: 49 50 $NDK/build/tools/make-standalone-toolchain.sh --arch=mips --install-dir=<path> 51 52The toolchain binaries have the mipsel-linux-android- prefix. 53 54Compatibility: 55-------------- 56 57The minimal native API level provided by official Android mips platform builds 58is 9, which corresponds to all the native APIs provided by Android 2.3, i.e. 59Gingerbread (note also that no new native APIs were introduced by Honeycomb). 60 61You won't have to change anything to your project files if you target an older 62API level: the NDK build script will automatically select the right set of 63native platform headers/libraries for you. For mips, this still corresponds 64to API level 9 and higher. 65 66