$(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk))
endif
include $(board_config_mk)
+ifeq ($(TARGET_ARCH),)
+ $(error TARGET_ARCH not defined by board config: $(board_config_mk))
+endif
TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk)))
board_config_mk :=
ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin
endif
endif
+
+# Add the mips toolchain bin dir if it actually exists
+ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-4.6/bin),)
+ # this should be copied to HOST_OUT_EXECUTABLES instead
+ ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-4.6/bin
+endif
+
ANDROID_BUILD_PATHS := $(ABP)
ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG)
ANDROID_GCC_PREBUILTS := prebuilts/gcc/$(HOST_PREBUILT_TAG)
# ---------------------------------------------------------------
# Set up configuration for host machine. We don't do cross-
-# compiles except for arm, so the HOST is whatever we are
+# compiles except for arm/mips, so the HOST is whatever we are
# running on
UNAME := $(shell uname -sm)
# Set up configuration for target machine.
# The following must be set:
# TARGET_OS = { linux }
-# TARGET_ARCH = { arm | x86 }
+# TARGET_ARCH = { arm | x86 | mips }
-
-ifeq ($(TARGET_ARCH),)
-TARGET_ARCH := arm
-endif
TARGET_OS := linux
+# TARGET_ARCH should be set by BoardConfig.mk and will be checked later
# the target build type defaults to release
ifneq ($(TARGET_BUILD_TYPE),debug)
;;
arm) toolchaindir=arm/arm-linux-androideabi-4.6/bin
;;
+ mips) toolchaindir=mips/mipsel-linux-android-4.6/bin
+ ;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
ARM_EABI_TOOLCHAIN_PATH=":$gccprebuiltdir/$toolchaindir"
fi
;;
+ mips) toolchaindir=mips/mips-eabi-4.4.3/bin
+ ;;
*)
# No need to set ARM_EABI_TOOLCHAIN for other ARCHs
;;
function settitle()
{
if [ "$STAY_OFF_MY_LAWN" = "" ]; then
+ local arch=$(gettargetarch)
local product=$TARGET_PRODUCT
local variant=$TARGET_BUILD_VARIANT
local apps=$TARGET_BUILD_APPS
if [ -z "$apps" ]; then
- export PROMPT_COMMAND="echo -ne \"\033]0;[${product}-${variant}] ${USER}@${HOSTNAME}: ${PWD}\007\""
+ export PROMPT_COMMAND="echo -ne \"\033]0;[${arch}-${product}-${variant}] ${USER}@${HOSTNAME}: ${PWD}\007\""
else
- export PROMPT_COMMAND="echo -ne \"\033]0;[$apps $variant] ${USER}@${HOSTNAME}: ${PWD}\007\""
+ export PROMPT_COMMAND="echo -ne \"\033]0;[$arch $apps $variant] ${USER}@${HOSTNAME}: ${PWD}\007\""
fi
fi
}
add_lunch_combo full-eng
add_lunch_combo full_x86-eng
add_lunch_combo vbox_x86-eng
+add_lunch_combo full_mips-eng
function print_lunch_menu()
{
case "$ARCH" in
x86) GDB=i686-linux-android-gdb;;
arm) GDB=arm-linux-androideabi-gdb;;
+ mips) GDB=mipsel-linux-android-gdb;;
*) echo "Unknown arch $ARCH"; return 1;;
esac
;;
esac
+function gettargetarch
+{
+ get_build_var TARGET_ARCH
+}
+
function jgrep()
{
find . -name .repo -prune -o -name .git -prune -o -type f -name "*\.java" -print0 | xargs -0 grep --color -n "$@"
return
fi
local prebuiltdir=$(getprebuilt)
- local KERNEL=$T/prebuilt/android-arm/kernel/vmlinux-qemu
+ local arch=$(gettargetarch)
+ local KERNEL=$T/prebuilts/qemu-kernel/$arch/vmlinux-qemu
local TRACE=$1
if [ ! "$TRACE" ] ; then