Merge "MIPS support to *.mk files and envsetup.sh"
This commit is contained in:
@@ -148,6 +148,9 @@ ifneq ($(words $(board_config_mk)),1)
|
|||||||
$(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk))
|
$(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk))
|
||||||
endif
|
endif
|
||||||
include $(board_config_mk)
|
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)))
|
TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk)))
|
||||||
board_config_mk :=
|
board_config_mk :=
|
||||||
|
|
||||||
|
@@ -23,6 +23,13 @@ else ifeq ($(TARGET_ARCH),x86)
|
|||||||
ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin
|
ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin
|
||||||
endif
|
endif
|
||||||
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_BUILD_PATHS := $(ABP)
|
||||||
ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG)
|
ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG)
|
||||||
ANDROID_GCC_PREBUILTS := prebuilts/gcc/$(HOST_PREBUILT_TAG)
|
ANDROID_GCC_PREBUILTS := prebuilts/gcc/$(HOST_PREBUILT_TAG)
|
||||||
|
@@ -33,7 +33,7 @@ endif
|
|||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# Set up configuration for host machine. We don't do cross-
|
# 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
|
# running on
|
||||||
|
|
||||||
UNAME := $(shell uname -sm)
|
UNAME := $(shell uname -sm)
|
||||||
@@ -124,13 +124,10 @@ endif
|
|||||||
# Set up configuration for target machine.
|
# Set up configuration for target machine.
|
||||||
# The following must be set:
|
# The following must be set:
|
||||||
# TARGET_OS = { linux }
|
# TARGET_OS = { linux }
|
||||||
# TARGET_ARCH = { arm | x86 }
|
# TARGET_ARCH = { arm | x86 | mips }
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH),)
|
|
||||||
TARGET_ARCH := arm
|
|
||||||
endif
|
|
||||||
TARGET_OS := linux
|
TARGET_OS := linux
|
||||||
|
# TARGET_ARCH should be set by BoardConfig.mk and will be checked later
|
||||||
|
|
||||||
# the target build type defaults to release
|
# the target build type defaults to release
|
||||||
ifneq ($(TARGET_BUILD_TYPE),debug)
|
ifneq ($(TARGET_BUILD_TYPE),debug)
|
||||||
|
@@ -112,6 +112,7 @@ GRANDFATHERED_USER_MODULES += \
|
|||||||
emmalib \
|
emmalib \
|
||||||
emulator \
|
emulator \
|
||||||
emulator-arm \
|
emulator-arm \
|
||||||
|
emulator-mips \
|
||||||
emulator-core \
|
emulator-core \
|
||||||
emulator-elff \
|
emulator-elff \
|
||||||
emulator-hw \
|
emulator-hw \
|
||||||
@@ -209,6 +210,7 @@ GRANDFATHERED_USER_MODULES += \
|
|||||||
libebl \
|
libebl \
|
||||||
libebl_arm \
|
libebl_arm \
|
||||||
libebl_sh \
|
libebl_sh \
|
||||||
|
libebl_mips \
|
||||||
libedify \
|
libedify \
|
||||||
libeffects \
|
libeffects \
|
||||||
libEGL \
|
libEGL \
|
||||||
|
19
envsetup.sh
19
envsetup.sh
@@ -122,6 +122,8 @@ function setpaths()
|
|||||||
;;
|
;;
|
||||||
arm) toolchaindir=arm/arm-linux-androideabi-4.6/bin
|
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"
|
echo "Can't find toolchain for unknown architecture: $ARCH"
|
||||||
toolchaindir=xxxxxxxxx
|
toolchaindir=xxxxxxxxx
|
||||||
@@ -140,6 +142,8 @@ function setpaths()
|
|||||||
ARM_EABI_TOOLCHAIN_PATH=":$gccprebuiltdir/$toolchaindir"
|
ARM_EABI_TOOLCHAIN_PATH=":$gccprebuiltdir/$toolchaindir"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
mips) toolchaindir=mips/mips-eabi-4.4.3/bin
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# No need to set ARM_EABI_TOOLCHAIN for other ARCHs
|
# No need to set ARM_EABI_TOOLCHAIN for other ARCHs
|
||||||
;;
|
;;
|
||||||
@@ -203,13 +207,14 @@ function set_sequence_number()
|
|||||||
function settitle()
|
function settitle()
|
||||||
{
|
{
|
||||||
if [ "$STAY_OFF_MY_LAWN" = "" ]; then
|
if [ "$STAY_OFF_MY_LAWN" = "" ]; then
|
||||||
|
local arch=$(gettargetarch)
|
||||||
local product=$TARGET_PRODUCT
|
local product=$TARGET_PRODUCT
|
||||||
local variant=$TARGET_BUILD_VARIANT
|
local variant=$TARGET_BUILD_VARIANT
|
||||||
local apps=$TARGET_BUILD_APPS
|
local apps=$TARGET_BUILD_APPS
|
||||||
if [ -z "$apps" ]; then
|
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
|
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
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -416,6 +421,7 @@ function add_lunch_combo()
|
|||||||
add_lunch_combo full-eng
|
add_lunch_combo full-eng
|
||||||
add_lunch_combo full_x86-eng
|
add_lunch_combo full_x86-eng
|
||||||
add_lunch_combo vbox_x86-eng
|
add_lunch_combo vbox_x86-eng
|
||||||
|
add_lunch_combo full_mips-eng
|
||||||
|
|
||||||
function print_lunch_menu()
|
function print_lunch_menu()
|
||||||
{
|
{
|
||||||
@@ -738,6 +744,7 @@ function gdbclient()
|
|||||||
case "$ARCH" in
|
case "$ARCH" in
|
||||||
x86) GDB=i686-linux-android-gdb;;
|
x86) GDB=i686-linux-android-gdb;;
|
||||||
arm) GDB=arm-linux-androideabi-gdb;;
|
arm) GDB=arm-linux-androideabi-gdb;;
|
||||||
|
mips) GDB=mipsel-linux-android-gdb;;
|
||||||
*) echo "Unknown arch $ARCH"; return 1;;
|
*) echo "Unknown arch $ARCH"; return 1;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -804,6 +811,11 @@ case `uname -s` in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
function gettargetarch
|
||||||
|
{
|
||||||
|
get_build_var TARGET_ARCH
|
||||||
|
}
|
||||||
|
|
||||||
function jgrep()
|
function jgrep()
|
||||||
{
|
{
|
||||||
find . -name .repo -prune -o -name .git -prune -o -type f -name "*\.java" -print0 | xargs -0 grep --color -n "$@"
|
find . -name .repo -prune -o -name .git -prune -o -type f -name "*\.java" -print0 | xargs -0 grep --color -n "$@"
|
||||||
@@ -859,7 +871,8 @@ function tracedmdump()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
local prebuiltdir=$(getprebuilt)
|
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
|
local TRACE=$1
|
||||||
if [ ! "$TRACE" ] ; then
|
if [ ! "$TRACE" ] ; then
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
# The generic product target doesn't have any hardware-specific pieces.
|
# The generic product target doesn't have any hardware-specific pieces.
|
||||||
TARGET_NO_BOOTLOADER := true
|
TARGET_NO_BOOTLOADER := true
|
||||||
TARGET_NO_KERNEL := true
|
TARGET_NO_KERNEL := true
|
||||||
|
TARGET_ARCH := arm
|
||||||
|
|
||||||
# Note: we build the platform images for ARMv7-A _without_ NEON.
|
# Note: we build the platform images for ARMv7-A _without_ NEON.
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user