Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2edfb71d authored by David 'Digit' Turner's avatar David 'Digit' Turner
Browse files

Support secondary CPU ABI in build.prop

BoardConfig.mk typically defines TARGET_CPU_ABI to the name of the
native machine code CPU ABI supported by the target device. For example,
existing devices today use the value 'armeabi' corresponding to an
ARMv5TE instruction set with soft-float implementation.

This patch allows this file to also define TARGET_CPU_ABI2 to name
a secondary (minor) CPU ABI also supported by the device. This is useful
when the main ABI is ARMv7-A (identified as 'armeabi-v7a') which also
supports ARMv5TE. Such devices should have TARGET_CPU_ABI defined to
'armeabi-v7a' and TARGET_CPU_ABI2 defined to 'armeabi'.

TARGET_CPU_ABI2 will be translated into the ro.product.cpu.abi2 property
in build.prop. This value will be used by the PackageManager to handle
"fat-binaries" generated with the NDK.
parent 357f5bc8
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -133,6 +133,7 @@ $(INSTALLED_BUILD_PROP_TARGET): $(BUILDINFO_SH) $(INTERNAL_BUILD_ID_MAKEFILE)
			BUILD_FINGERPRINT="$(BUILD_FINGERPRINT)" \
			BUILD_FINGERPRINT="$(BUILD_FINGERPRINT)" \
			TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
			TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
			TARGET_CPU_ABI="$(TARGET_CPU_ABI)" \
			TARGET_CPU_ABI="$(TARGET_CPU_ABI)" \
			TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \
	        bash $(BUILDINFO_SH) > $@
	        bash $(BUILDINFO_SH) > $@
	$(hide) if [ -f $(TARGET_DEVICE_DIR)/system.prop ]; then \
	$(hide) if [ -f $(TARGET_DEVICE_DIR)/system.prop ]; then \
	          cat $(TARGET_DEVICE_DIR)/system.prop >> $@; \
	          cat $(TARGET_DEVICE_DIR)/system.prop >> $@; \
+1 −0
Original line number Original line Diff line number Diff line
@@ -136,6 +136,7 @@ TARGET_CPU_ABI := $(strip $(TARGET_CPU_ABI))
ifeq ($(TARGET_CPU_ABI),)
ifeq ($(TARGET_CPU_ABI),)
  $(error No TARGET_CPU_ABI defined by board config: $(board_config_mk))
  $(error No TARGET_CPU_ABI defined by board config: $(board_config_mk))
endif
endif
TARGET_CPU_ABI2 := $(strip $(TARGET_CPU_ABI2))


# $(1): os/arch
# $(1): os/arch
define select-android-config-h
define select-android-config-h
+3 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,9 @@ echo "ro.product.name=$PRODUCT_NAME"
echo "ro.product.device=$TARGET_DEVICE"
echo "ro.product.device=$TARGET_DEVICE"
echo "ro.product.board=$TARGET_BOOTLOADER_BOARD_NAME"
echo "ro.product.board=$TARGET_BOOTLOADER_BOARD_NAME"
echo "ro.product.cpu.abi=$TARGET_CPU_ABI"
echo "ro.product.cpu.abi=$TARGET_CPU_ABI"
if [ -n "$TARGET_CPU_ABI2" ] ; then
  echo "ro.product.cpu.abi2=$TARGET_CPU_ABI2"
fi
echo "ro.product.manufacturer=$PRODUCT_MANUFACTURER"
echo "ro.product.manufacturer=$PRODUCT_MANUFACTURER"
echo "ro.product.locale.language=$PRODUCT_DEFAULT_LANGUAGE"
echo "ro.product.locale.language=$PRODUCT_DEFAULT_LANGUAGE"
echo "ro.product.locale.region=$PRODUCT_DEFAULT_REGION"
echo "ro.product.locale.region=$PRODUCT_DEFAULT_REGION"