2019-02-26 20:34:03 +08:00
#
# Copyright (C) 2019 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ###############################################################
# This file includes BoardConfig.mk for the device being built,
# and sanity-checks the variable defined therein.
# ###############################################################
2019-02-26 23:49:25 +08:00
_board_strip_readonly_list := \
BOARD_EGL_CFG \
BOARD_HAVE_BLUETOOTH \
BOARD_INSTALLER_CMDLINE \
BOARD_KERNEL_CMDLINE \
BOARD_KERNEL_BASE \
BOARD_USES_GENERIC_AUDIO \
BOARD_VENDOR_USE_AKMD \
BOARD_WPA_SUPPLICANT_DRIVER \
BOARD_WLAN_DEVICE \
TARGET_ARCH \
TARGET_ARCH_VARIANT \
TARGET_CPU_ABI \
TARGET_CPU_ABI2 \
TARGET_CPU_VARIANT \
TARGET_CPU_VARIANT_RUNTIME \
TARGET_2ND_ARCH \
TARGET_2ND_ARCH_VARIANT \
TARGET_2ND_CPU_ABI \
TARGET_2ND_CPU_ABI2 \
TARGET_2ND_CPU_VARIANT \
TARGET_2ND_CPU_VARIANT_RUNTIME \
TARGET_BOARD_PLATFORM \
TARGET_BOARD_PLATFORM_GPU \
TARGET_BOOTLOADER_BOARD_NAME \
2019-04-11 03:25:07 +08:00
TARGET_FS_CONFIG_GEN \
2019-02-26 23:49:25 +08:00
TARGET_NO_BOOTLOADER \
TARGET_NO_KERNEL \
TARGET_NO_RECOVERY \
TARGET_NO_RADIOIMAGE \
TARGET_HARDWARE_3D \
WITH_DEXPREOPT \
# File system variables
_board_strip_readonly_list += \
BOARD_FLASH_BLOCK_SIZE \
BOARD_BOOTIMAGE_PARTITION_SIZE \
BOARD_RECOVERYIMAGE_PARTITION_SIZE \
BOARD_SYSTEMIMAGE_PARTITION_SIZE \
BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE \
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE \
BOARD_USERDATAIMAGE_PARTITION_SIZE \
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE \
BOARD_CACHEIMAGE_PARTITION_SIZE \
BOARD_VENDORIMAGE_PARTITION_SIZE \
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE \
BOARD_PRODUCTIMAGE_PARTITION_SIZE \
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE \
2019-06-25 14:58:13 +08:00
BOARD_SYSTEM_EXTIMAGE_PARTITION_SIZE \
BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE \
2019-02-26 23:49:25 +08:00
BOARD_ODMIMAGE_PARTITION_SIZE \
BOARD_ODMIMAGE_FILE_SYSTEM_TYPE \
# Logical partitions related variables.
_dynamic_partitions_var_list += \
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE \
BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE \
BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE \
BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE \
2019-06-25 14:58:13 +08:00
BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE \
2019-02-26 23:49:25 +08:00
BOARD_SUPER_PARTITION_SIZE \
BOARD_SUPER_PARTITION_GROUPS \
_board_strip_readonly_list += $( _dynamic_partitions_var_list)
_build_broken_var_list := \
BUILD_BROKEN_DUP_RULES \
2019-09-18 00:45:09 +08:00
BUILD_BROKEN_PREBUILT_ELF_FILES \
2019-10-17 18:32:59 +08:00
BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW \
2019-04-10 00:56:48 +08:00
BUILD_BROKEN_USES_NETWORK \
2019-11-26 09:51:18 +08:00
BUILD_BROKEN_OUTSIDE_INCLUDE_DIRS \
2019-02-26 23:49:25 +08:00
2019-04-18 03:25:09 +08:00
_build_broken_var_list += \
$( foreach m,$( AVAILABLE_BUILD_MODULE_TYPES) \
$( DEFAULT_WARNING_BUILD_MODULE_TYPES) \
$( DEFAULT_ERROR_BUILD_MODULE_TYPES) , \
BUILD_BROKEN_USES_$( m) )
2019-02-26 23:49:25 +08:00
_board_true_false_vars := $( _build_broken_var_list)
2020-01-03 12:08:10 +08:00
_board_strip_readonly_list += $( _build_broken_var_list) \
BUILD_BROKEN_NINJA_USES_ENV_VARS
2019-02-26 23:49:25 +08:00
2019-02-27 22:38:27 +08:00
# Conditional to building on linux, as dex2oat currently does not work on darwin.
i f e q ( $( HOST_OS ) , l i n u x )
WITH_DEXPREOPT := true
e n d i f
2019-02-26 21:37:28 +08:00
# ###############################################################
# Broken build defaults
# ###############################################################
2019-04-10 00:56:48 +08:00
$(foreach v,$(_build_broken_var_list),$(eval $(v) : =))
2020-01-03 12:08:10 +08:00
BUILD_BROKEN_NINJA_USES_ENV_VARS :=
2019-02-26 21:37:28 +08:00
2019-02-26 20:34:03 +08:00
# Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)
# or under vendor/*/$(TARGET_DEVICE). Search in both places, but
# make sure only one exists.
# Real boards should always be associated with an OEM vendor.
i f d e f T A R G E T _ D E V I C E _ D I R
ifneq ( $( origin TARGET_DEVICE_DIR) ,command line)
$( error TARGET_DEVICE_DIR may not be set manually)
endif
board_config_mk := $( TARGET_DEVICE_DIR) /BoardConfig.mk
e l s e
board_config_mk := \
$( strip $( sort $( wildcard \
$( SRC_TARGET_DIR) /board/$( TARGET_DEVICE) /BoardConfig.mk \
$( shell test -d device && find -L device -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk' ) \
$( shell test -d vendor && find -L vendor -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk' ) \
) ) )
ifeq ( $( board_config_mk) ,)
$( error No config file found for TARGET_DEVICE $( TARGET_DEVICE) )
endif
ifneq ( $( words $( board_config_mk) ) ,1)
$( error Multiple board config files for TARGET_DEVICE $( TARGET_DEVICE) : $( board_config_mk) )
endif
TARGET_DEVICE_DIR := $( patsubst %/,%,$( dir $( board_config_mk) ) )
.KATI_READONLY := TARGET_DEVICE_DIR
e n d i f
i n c l u d e $( board_config_mk )
i f e q ( $( TARGET_ARCH ) , )
$( error TARGET_ARCH not defined by board config: $( board_config_mk) )
e n d i f
i f n e q ( $( MALLOC_IMPL ) , )
$( warning *** Unsupported option MALLOC_IMPL defined by board config: $( board_config_mk) .)
$( error Use ` MALLOC_SVELTE := true ` to configure jemalloc for low-memory)
e n d i f
board_config_mk :=
2019-02-26 23:49:25 +08:00
# Clean up and verify BoardConfig variables
$(foreach var,$(_board_strip_readonly_list),$(eval $(var) : = $$( strip $ $ ( $ ( var ) ) ) ))
$( foreach var ,$ ( _board_true_false_vars ) , \
$( if $( filter-out true false,$( $( var) ) ) , \
$( error Valid values of $( var) are "true" , "false" , and "" . Not " $( $( var) ) " ) ) )
2019-02-26 21:37:28 +08:00
# Default *_CPU_VARIANT_RUNTIME to CPU_VARIANT if unspecified.
TARGET_CPU_VARIANT_RUNTIME := $( or $( TARGET_CPU_VARIANT_RUNTIME) ,$( TARGET_CPU_VARIANT) )
TARGET_2ND_CPU_VARIANT_RUNTIME := $( or $( TARGET_2ND_CPU_VARIANT_RUNTIME) ,$( TARGET_2ND_CPU_VARIANT) )
2019-03-01 01:15:57 +08:00
# The combo makefiles sanity-check and set defaults for various CPU configuration
combo_target := TARGET_
combo_2nd_arch_prefix :=
i n c l u d e $( BUILD_SYSTEM ) / c o m b o / s e l e c t . m k
i f d e f T A R G E T _ 2 N D _ A R C H
combo_2nd_arch_prefix := $( TARGET_2ND_ARCH_VAR_PREFIX)
include $( BUILD_SYSTEM) /combo/select.mk
e n d i f
2019-02-26 23:49:25 +08:00
.KATI_READONLY := $( _board_strip_readonly_list)
INTERNAL_KERNEL_CMDLINE := $( BOARD_KERNEL_CMDLINE)
2019-02-26 21:37:28 +08:00
i f e q ( $( TARGET_CPU_ABI ) , )
$( error No TARGET_CPU_ABI defined by board config: $( board_config_mk) )
e n d i f
i f n e q ( $( filter %64,$ ( TARGET_ARCH ) ) , )
TARGET_IS_64_BIT := true
e n d i f
i f e q ( , $( filter true ,$ ( TARGET_SUPPORTS_ 32_BIT_APPS ) $ ( TARGET_SUPPORTS_ 64_BIT_APPS ) ) )
TARGET_SUPPORTS_32_BIT_APPS := true
e n d i f
# Sanity check to warn about likely cryptic errors later in the build.
i f e q ( $( TARGET_IS_ 64_BIT ) , t r u e )
ifeq ( ,$( filter true false,$( TARGET_SUPPORTS_64_BIT_APPS) ) )
2019-05-10 22:29:28 +08:00
$( error Building a 32-bit-app-only product on a 64-bit device. \
2019-02-26 21:37:28 +08:00
If this is intentional, set TARGET_SUPPORTS_64_BIT_APPS := false )
endif
e n d i f
# "ro.product.cpu.abilist32" and "ro.product.cpu.abilist64" are
# comma separated lists of the 32 and 64 bit ABIs (in order of
# preference) that the target supports. If TARGET_CPU_ABI_LIST_{32,64}_BIT
# are defined by the board config, we use them. Else, we construct
# these lists based on whether TARGET_IS_64_BIT is set.
#
# Note that this assumes that the 2ND_CPU_ABI for a 64 bit target
# is always 32 bits. If this isn't the case, these variables should
# be overriden in the board configuration.
Add native bridge abis to corresponding abilists
This uses TARGET_NATIVE_BRIDGE_*_ABI variable to automatically generate
abi lists.
Sample properties for x86+arm:
ro.product.cpu.abilist=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=
Sample properties for x86_64+arm64:
ro.product.cpu.abilist=x86_64,x86,arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=x86_64,arm64-v8a
Bug: http://b/77159578
Bug: http://b/28684022
Test: make cf_x86_64_phone, deploys, check adb shell getprop | grep abi
Change-Id: I42a73f5c627b9d9f44e31cc5ad84238e1050f52a
2019-07-29 22:23:19 +08:00
#
# Similarly, TARGET_NATIVE_BRIDGE_2ND_ABI for a 64 bit target is always
# 32 bits. Note that all CPU_ABIs are preferred over all NATIVE_BRIDGE_ABIs.
_target_native_bridge_abi_list_32_bit :=
_target_native_bridge_abi_list_64_bit :=
2019-02-26 21:37:28 +08:00
i f e q ( , $( TARGET_CPU_ABI_LIST_ 64_BIT ) )
ifeq ( true| true,$( TARGET_IS_64_BIT) | $( TARGET_SUPPORTS_64_BIT_APPS) )
TARGET_CPU_ABI_LIST_64_BIT := $( TARGET_CPU_ABI) $( TARGET_CPU_ABI2)
Add native bridge abis to corresponding abilists
This uses TARGET_NATIVE_BRIDGE_*_ABI variable to automatically generate
abi lists.
Sample properties for x86+arm:
ro.product.cpu.abilist=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=
Sample properties for x86_64+arm64:
ro.product.cpu.abilist=x86_64,x86,arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=x86_64,arm64-v8a
Bug: http://b/77159578
Bug: http://b/28684022
Test: make cf_x86_64_phone, deploys, check adb shell getprop | grep abi
Change-Id: I42a73f5c627b9d9f44e31cc5ad84238e1050f52a
2019-07-29 22:23:19 +08:00
_target_native_bridge_abi_list_64_bit := $( TARGET_NATIVE_BRIDGE_ABI)
2019-02-26 21:37:28 +08:00
endif
e n d i f
2019-05-17 05:09:35 +08:00
# "arm64-v8a-hwasan", the ABI for libraries compiled with HWASAN, is supported
# in all builds with SANITIZE_TARGET=hwaddress.
i f n e q ( $( filter hwaddress ,$ ( SANITIZE_TARGET ) ) , )
ifneq ( $( filter arm64-v8a,$( TARGET_CPU_ABI_LIST_64_BIT) ) ,)
TARGET_CPU_ABI_LIST_64_BIT := arm64-v8a-hwasan $( TARGET_CPU_ABI_LIST_64_BIT)
endif
e n d i f
2019-02-26 21:37:28 +08:00
i f e q ( , $( TARGET_CPU_ABI_LIST_ 32_BIT ) )
ifneq ( true,$( TARGET_IS_64_BIT) )
TARGET_CPU_ABI_LIST_32_BIT := $( TARGET_CPU_ABI) $( TARGET_CPU_ABI2)
Add native bridge abis to corresponding abilists
This uses TARGET_NATIVE_BRIDGE_*_ABI variable to automatically generate
abi lists.
Sample properties for x86+arm:
ro.product.cpu.abilist=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=
Sample properties for x86_64+arm64:
ro.product.cpu.abilist=x86_64,x86,arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=x86_64,arm64-v8a
Bug: http://b/77159578
Bug: http://b/28684022
Test: make cf_x86_64_phone, deploys, check adb shell getprop | grep abi
Change-Id: I42a73f5c627b9d9f44e31cc5ad84238e1050f52a
2019-07-29 22:23:19 +08:00
_target_native_bridge_abi_list_32_bit := $( TARGET_NATIVE_BRIDGE_ABI)
2019-02-26 21:37:28 +08:00
else
ifeq ( true,$( TARGET_SUPPORTS_32_BIT_APPS) )
# For a 64 bit target, assume that the 2ND_CPU_ABI
# is a 32 bit ABI.
TARGET_CPU_ABI_LIST_32_BIT := $( TARGET_2ND_CPU_ABI) $( TARGET_2ND_CPU_ABI2)
Add native bridge abis to corresponding abilists
This uses TARGET_NATIVE_BRIDGE_*_ABI variable to automatically generate
abi lists.
Sample properties for x86+arm:
ro.product.cpu.abilist=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=
Sample properties for x86_64+arm64:
ro.product.cpu.abilist=x86_64,x86,arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=x86_64,arm64-v8a
Bug: http://b/77159578
Bug: http://b/28684022
Test: make cf_x86_64_phone, deploys, check adb shell getprop | grep abi
Change-Id: I42a73f5c627b9d9f44e31cc5ad84238e1050f52a
2019-07-29 22:23:19 +08:00
_target_native_bridge_abi_list_32_bit := $( TARGET_NATIVE_BRIDGE_2ND_ABI)
2019-02-26 21:37:28 +08:00
endif
endif
e n d i f
# "ro.product.cpu.abilist" is a comma separated list of ABIs (in order
# of preference) that the target supports. If a TARGET_CPU_ABI_LIST
# is specified by the board configuration, we use that. If not, we
# build a list out of the TARGET_CPU_ABIs specified by the config.
Add native bridge abis to corresponding abilists
This uses TARGET_NATIVE_BRIDGE_*_ABI variable to automatically generate
abi lists.
Sample properties for x86+arm:
ro.product.cpu.abilist=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=
Sample properties for x86_64+arm64:
ro.product.cpu.abilist=x86_64,x86,arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=x86_64,arm64-v8a
Bug: http://b/77159578
Bug: http://b/28684022
Test: make cf_x86_64_phone, deploys, check adb shell getprop | grep abi
Change-Id: I42a73f5c627b9d9f44e31cc5ad84238e1050f52a
2019-07-29 22:23:19 +08:00
# Add NATIVE_BRIDGE_ABIs at the end to keep order of preference.
2019-02-26 21:37:28 +08:00
i f e q ( , $( TARGET_CPU_ABI_LIST ) )
ifeq ( $( TARGET_IS_64_BIT) | $( TARGET_PREFER_32_BIT_APPS) ,true| true )
Add native bridge abis to corresponding abilists
This uses TARGET_NATIVE_BRIDGE_*_ABI variable to automatically generate
abi lists.
Sample properties for x86+arm:
ro.product.cpu.abilist=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=
Sample properties for x86_64+arm64:
ro.product.cpu.abilist=x86_64,x86,arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=x86_64,arm64-v8a
Bug: http://b/77159578
Bug: http://b/28684022
Test: make cf_x86_64_phone, deploys, check adb shell getprop | grep abi
Change-Id: I42a73f5c627b9d9f44e31cc5ad84238e1050f52a
2019-07-29 22:23:19 +08:00
TARGET_CPU_ABI_LIST := $( TARGET_CPU_ABI_LIST_32_BIT) $( TARGET_CPU_ABI_LIST_64_BIT) \
$( _target_native_bridge_abi_list_32_bit) $( _target_native_bridge_abi_list_64_bit)
2019-02-26 21:37:28 +08:00
else
Add native bridge abis to corresponding abilists
This uses TARGET_NATIVE_BRIDGE_*_ABI variable to automatically generate
abi lists.
Sample properties for x86+arm:
ro.product.cpu.abilist=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=
Sample properties for x86_64+arm64:
ro.product.cpu.abilist=x86_64,x86,arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=x86_64,arm64-v8a
Bug: http://b/77159578
Bug: http://b/28684022
Test: make cf_x86_64_phone, deploys, check adb shell getprop | grep abi
Change-Id: I42a73f5c627b9d9f44e31cc5ad84238e1050f52a
2019-07-29 22:23:19 +08:00
TARGET_CPU_ABI_LIST := $( TARGET_CPU_ABI_LIST_64_BIT) $( TARGET_CPU_ABI_LIST_32_BIT) \
$( _target_native_bridge_abi_list_64_bit) $( _target_native_bridge_abi_list_32_bit)
2019-02-26 21:37:28 +08:00
endif
e n d i f
Add native bridge abis to corresponding abilists
This uses TARGET_NATIVE_BRIDGE_*_ABI variable to automatically generate
abi lists.
Sample properties for x86+arm:
ro.product.cpu.abilist=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=
Sample properties for x86_64+arm64:
ro.product.cpu.abilist=x86_64,x86,arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=x86_64,arm64-v8a
Bug: http://b/77159578
Bug: http://b/28684022
Test: make cf_x86_64_phone, deploys, check adb shell getprop | grep abi
Change-Id: I42a73f5c627b9d9f44e31cc5ad84238e1050f52a
2019-07-29 22:23:19 +08:00
# Add NATIVE_BRIDGE_ABIs at the end of 32 and 64 bit CPU_ABIs to keep order of preference.
TARGET_CPU_ABI_LIST_32_BIT += $( _target_native_bridge_abi_list_32_bit)
TARGET_CPU_ABI_LIST_64_BIT += $( _target_native_bridge_abi_list_64_bit)
2019-02-26 21:37:28 +08:00
# Strip whitespace from the ABI list string.
TARGET_CPU_ABI_LIST := $( subst $( space) ,$( comma) ,$( strip $( TARGET_CPU_ABI_LIST) ) )
TARGET_CPU_ABI_LIST_32_BIT := $( subst $( space) ,$( comma) ,$( strip $( TARGET_CPU_ABI_LIST_32_BIT) ) )
TARGET_CPU_ABI_LIST_64_BIT := $( subst $( space) ,$( comma) ,$( strip $( TARGET_CPU_ABI_LIST_64_BIT) ) )
2019-07-12 11:51:37 +08:00
# Check if config about image building is valid or not.
d e f i n e c h e c k _ i m a g e _ c o n f i g
$( eval _uc_name := $( call to-upper,$( 1) ) ) \
$( eval _lc_name := $( call to-lower,$( 1) ) ) \
$( if $( filter $( _lc_name) ,$( TARGET_COPY_OUT_$( _uc_name) ) ) , \
$( if $( BOARD_USES_$( _uc_name) IMAGE) ,, \
$( error If TARGET_COPY_OUT_$( _uc_name) is '$(_lc_name)' , either BOARD_PREBUILT_$( _uc_name) IMAGE or BOARD_$( _uc_name) IMAGE_FILE_SYSTEM_TYPE must be set ) ) , \
$( if $( BOARD_USES_$( _uc_name) IMAGE) , \
$( error TARGET_COPY_OUT_$( _uc_name) must be set to '$(_lc_name)' to use a $( _lc_name) image) ) ) \
$( eval _uc_name := ) \
$( eval _lc_name := )
e n d e f
2019-02-26 20:34:03 +08:00
###########################################
# Now we can substitute with the real value of TARGET_COPY_OUT_RAMDISK
i f e q ( $( BOARD_BUILD_SYSTEM_ROOT_IMAGE ) , t r u e )
TARGET_COPY_OUT_RAMDISK := $( TARGET_COPY_OUT_ROOT)
e n d i f
Adding boot-debug.img and ramdisk-debug.img
The two new debugging images adds additional files based on
boot.img and ramdisk.img/ramdisk-recovery.img, respectively.
File /force_debuggable is to trigger special logic in /init to load an
userdebug version of sepolicy and an additional property file from this
ramdisk to allow adb root, if the device is unlocked.
It's intentional to skip signing for boot-debug.img, as it can
only be used if the device is unlocked, where verification error
is allowed.
Those debugging images allows adb root on user build
system.img, vendor.img, product.img, etc. This can facilitate more
automated testings on user builds and is helpful to narrow down the
delta between what's being tested v.s. what's being shipped.
Bug: 126493225
Test: `make dist`, checks both boot-debug.img and ramdisk-debug.img
are in $OUT/ and out/dist.
Test: `make dist`, checks installed-files-ramdisk-debug.{json,txt} are
in out/dist.
Test: `system/core/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-debug.img`,
checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
$OUT/boot-debug.img and $OUT/boot.img, respectively.
Then compare the root dirs of both, e.g.,
`diff -rq --no-dereference ./ramdisk ./ramdisk-debug`
Test: `make ramdisk_debug-nodeps` and `make bootimage_debug-nodeps`
Change-Id: I30137c3caef91805d9143d404e5e4d06c0fccc30
2019-03-20 17:59:52 +08:00
###########################################
# Now we can substitute with the real value of TARGET_COPY_OUT_DEBUG_RAMDISK
i f e q ( $( BOARD_USES_RECOVERY_AS_BOOT ) , t r u e )
TARGET_COPY_OUT_DEBUG_RAMDISK := debug_ramdisk/first_stage_ramdisk
Adding boot-test-harness.img
In commit I30137c3caef91805d9143d404e5e4d06c0fccc30, we added
a boot-debug.img to allow adb root when using an user build GSI image.
However, to run automated tests, it requires additional properties,
which are not needed for GSI compliance:
ro.audio.silent=1
ro.test_harness=1
This CL adds an additional boot-test-harness.img for automated tests,
and keeps the original boot-debug.img for GSI compliance.
Note: boot-test-harness.img won't be built by default, it needs
explicit `make bootimage_test_harness`.
Bug: 140036184
Test: `m bootimage_test_harness`, flashes boot-test-harness.img and checks
adb root works and test harness props are set.
Test: `m bootimage_test_harness dist -j32`, checks both
boot-test-harness.img and ramdisk-test-harness.img are under ./out/dist/.
Test: `system/tools/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-test-harness.img --out ramdisk-test-harness`,
checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
$OUT/boot-test-harness.img and $OUT/boot-debug.img, respectively.
Then compare the root dirs of both, e.g.,
`diff -rq --no-dereference ./ramdisk-test-harness ./ramdisk-debug`
Test: `m ramdisk_test_harness-nodeps` and `m bootimage_test_harness-nodeps`
Change-Id: Iadea0b5c933c3b7fa10dcf3d9e85596916b3333d
2019-10-08 10:22:19 +08:00
TARGET_COPY_OUT_TEST_HARNESS_RAMDISK := test_harness_ramdisk/first_stage_ramdisk
Adding boot-debug.img and ramdisk-debug.img
The two new debugging images adds additional files based on
boot.img and ramdisk.img/ramdisk-recovery.img, respectively.
File /force_debuggable is to trigger special logic in /init to load an
userdebug version of sepolicy and an additional property file from this
ramdisk to allow adb root, if the device is unlocked.
It's intentional to skip signing for boot-debug.img, as it can
only be used if the device is unlocked, where verification error
is allowed.
Those debugging images allows adb root on user build
system.img, vendor.img, product.img, etc. This can facilitate more
automated testings on user builds and is helpful to narrow down the
delta between what's being tested v.s. what's being shipped.
Bug: 126493225
Test: `make dist`, checks both boot-debug.img and ramdisk-debug.img
are in $OUT/ and out/dist.
Test: `make dist`, checks installed-files-ramdisk-debug.{json,txt} are
in out/dist.
Test: `system/core/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-debug.img`,
checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
$OUT/boot-debug.img and $OUT/boot.img, respectively.
Then compare the root dirs of both, e.g.,
`diff -rq --no-dereference ./ramdisk ./ramdisk-debug`
Test: `make ramdisk_debug-nodeps` and `make bootimage_debug-nodeps`
Change-Id: I30137c3caef91805d9143d404e5e4d06c0fccc30
2019-03-20 17:59:52 +08:00
e n d i f
2019-02-26 20:34:03 +08:00
###########################################
# Configure whether we're building the system image
BUILDING_SYSTEM_IMAGE := true
i f e q ( $( PRODUCT_BUILD_SYSTEM_IMAGE ) , )
ifndef PRODUCT_USE_DYNAMIC_PARTITION_SIZE
ifndef BOARD_SYSTEMIMAGE_PARTITION_SIZE
BUILDING_SYSTEM_IMAGE :=
endif
endif
e l s e i f e q ( $( PRODUCT_BUILD_SYSTEM_IMAGE ) , f a l s e )
BUILDING_SYSTEM_IMAGE :=
e n d i f
.KATI_READONLY := BUILDING_SYSTEM_IMAGE
# Are we building a system_other image
BUILDING_SYSTEM_OTHER_IMAGE :=
i f e q ( $( PRODUCT_BUILD_SYSTEM_OTHER_IMAGE ) , )
ifdef BUILDING_SYSTEM_IMAGE
ifeq ( $( BOARD_USES_SYSTEM_OTHER_ODEX) ,true)
BUILDING_SYSTEM_OTHER_IMAGE := true
endif
endif
e l s e i f e q ( $( PRODUCT_BUILD_SYSTEM_OTHER_IMAGE ) , t r u e )
BUILDING_SYSTEM_OTHER_IMAGE := true
ifndef BUILDING_SYSTEM_IMAGE
$( error PRODUCT_BUILD_SYSTEM_OTHER_IMAGE = true requires building the system image)
endif
e n d i f
.KATI_READONLY := BUILDING_SYSTEM_OTHER_IMAGE
# Are we building a cache image
BUILDING_CACHE_IMAGE :=
i f e q ( $( PRODUCT_BUILD_CACHE_IMAGE ) , )
ifdef BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE
BUILDING_CACHE_IMAGE := true
endif
e l s e i f e q ( $( PRODUCT_BUILD_CACHE_IMAGE ) , t r u e )
BUILDING_CACHE_IMAGE := true
ifndef BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE
$( error PRODUCT_BUILD_CACHE_IMAGE set to true, but BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE not defined)
endif
e n d i f
.KATI_READONLY := BUILDING_CACHE_IMAGE
2019-04-23 02:09:57 +08:00
# Are we building a boot image
BUILDING_BOOT_IMAGE :=
i f e q ( $( BOARD_USES_RECOVERY_AS_BOOT ) , t r u e )
BUILDING_BOOT_IMAGE :=
e l s e i f e q ( $( PRODUCT_BUILD_BOOT_IMAGE ) , )
ifdef BOARD_BOOTIMAGE_PARTITION_SIZE
BUILDING_BOOT_IMAGE := true
endif
e l s e i f e q ( $( PRODUCT_BUILD_BOOT_IMAGE ) , t r u e )
BUILDING_BOOT_IMAGE := true
e n d i f
.KATI_READONLY := BUILDING_BOOT_IMAGE
# Are we building a recovery image
BUILDING_RECOVERY_IMAGE :=
i f e q ( $( BOARD_USES_RECOVERY_AS_BOOT ) , t r u e )
BUILDING_RECOVERY_IMAGE := true
e l s e i f e q ( $( PRODUCT_BUILD_RECOVERY_IMAGE ) , )
ifdef BOARD_RECOVERYIMAGE_PARTITION_SIZE
ifeq ( ,$( filter true, $( TARGET_NO_KERNEL) $( TARGET_NO_RECOVERY) ) )
BUILDING_RECOVERY_IMAGE := true
endif
endif
e l s e i f e q ( $( PRODUCT_BUILD_RECOVERY_IMAGE ) , t r u e )
BUILDING_RECOVERY_IMAGE := true
e n d i f
.KATI_READONLY := BUILDING_RECOVERY_IMAGE
2019-02-26 20:34:03 +08:00
2019-07-11 01:49:37 +08:00
# Are we building a vendor boot image
BUILDING_VENDOR_BOOT_IMAGE :=
i f d e f B O A R D _ B O O T _ H E A D E R _ V E R S I O N
ifneq ( $( call math_gt_or_eq,$( BOARD_BOOT_HEADER_VERSION) ,3) ,)
BUILDING_VENDOR_BOOT_IMAGE := true
ifdef BUILDING_RECOVERY_IMAGE
ifneq ( $( BOARD_USES_RECOVERY_AS_BOOT) ,true)
$( error Boot header version >= 3 requires recovery as boot)
endif
endif
endif
e n d i f
.KATI_READONLY := BUILDING_VENDOR_BOOT_IMAGE
2019-02-26 20:34:03 +08:00
# Are we building a ramdisk image
BUILDING_RAMDISK_IMAGE := true
i f e q ( $( PRODUCT_BUILD_RAMDISK_IMAGE ) , )
# TODO: Be smarter about this. This probably only needs to happen when one of the follow is true:
# BUILDING_BOOT_IMAGE
# BUILDING_RECOVERY_IMAGE
e l s e i f e q ( $( PRODUCT_BUILD_RAMDISK_IMAGE ) , f a l s e )
BUILDING_RAMDISK_IMAGE :=
e n d i f
.KATI_READONLY := BUILDING_RAMDISK_IMAGE
# Are we building a userdata image
BUILDING_USERDATA_IMAGE :=
i f e q ( $( PRODUCT_BUILD_USERDATA_IMAGE ) , )
ifdef BOARD_USERDATAIMAGE_PARTITION_SIZE
BUILDING_USERDATA_IMAGE := true
endif
e l s e i f e q ( $( PRODUCT_BUILD_USERDATA_IMAGE ) , t r u e )
BUILDING_USERDATA_IMAGE := true
e n d i f
.KATI_READONLY := BUILDING_USERDATA_IMAGE
2019-08-13 15:30:57 +08:00
# Are we building a vbmeta image
BUILDING_VBMETA_IMAGE := true
i f e q ( $( PRODUCT_BUILD_VBMETA_IMAGE ) , f a l s e )
BUILDING_VBMETA_IMAGE :=
e n d i f
.KATI_READONLY := BUILDING_VBMETA_IMAGE
2019-02-26 20:34:03 +08:00
###########################################
# Now we can substitute with the real value of TARGET_COPY_OUT_VENDOR
i f e q ( $( TARGET_COPY_OUT_VENDOR ) , $( _vendor_path_placeholder ) )
TARGET_COPY_OUT_VENDOR := system/vendor
e l s e i f e q ( $( filter vendor system /vendor ,$ ( TARGET_COPY_OUT_VENDOR ) ) , )
$( error TARGET_COPY_OUT_VENDOR must be either 'vendor' or 'system/vendor' , seeing '$(TARGET_COPY_OUT_VENDOR)' .)
e n d i f
PRODUCT_COPY_FILES := $( subst $( _vendor_path_placeholder) ,$( TARGET_COPY_OUT_VENDOR) ,$( PRODUCT_COPY_FILES) )
BOARD_USES_VENDORIMAGE :=
i f d e f B O A R D _ P R E B U I L T _ V E N D O R I M A G E
BOARD_USES_VENDORIMAGE := true
e n d i f
i f d e f B O A R D _ V E N D O R I M A G E _ F I L E _ S Y S T E M _ T Y P E
BOARD_USES_VENDORIMAGE := true
e n d i f
2019-07-12 11:51:37 +08:00
# TODO(b/137169253): For now, some AOSP targets build with prebuilt vendor image.
# But target's BOARD_PREBUILT_VENDORIMAGE is not filled.
2019-02-26 20:34:03 +08:00
i f e q ( $( TARGET_COPY_OUT_VENDOR ) , v e n d o r )
BOARD_USES_VENDORIMAGE := true
e l s e i f d e f B O A R D _ U S E S _ V E N D O R I M A G E
$( error TARGET_COPY_OUT_VENDOR must be set to 'vendor' to use a vendor image)
e n d i f
.KATI_READONLY := BOARD_USES_VENDORIMAGE
BUILDING_VENDOR_IMAGE :=
i f e q ( $( PRODUCT_BUILD_VENDOR_IMAGE ) , )
ifdef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE
BUILDING_VENDOR_IMAGE := true
endif
e l s e i f e q ( $( PRODUCT_BUILD_VENDOR_IMAGE ) , t r u e )
BUILDING_VENDOR_IMAGE := true
ifndef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE
$( error PRODUCT_BUILD_VENDOR_IMAGE set to true, but BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE not defined)
endif
e n d i f
i f d e f B O A R D _ P R E B U I L T _ V E N D O R I M A G E
BUILDING_VENDOR_IMAGE :=
e n d i f
.KATI_READONLY := BUILDING_VENDOR_IMAGE
###########################################
# Now we can substitute with the real value of TARGET_COPY_OUT_PRODUCT
i f e q ( $( TARGET_COPY_OUT_PRODUCT ) , $( _product_path_placeholder ) )
TARGET_COPY_OUT_PRODUCT := system/product
e l s e i f e q ( $( filter product system /product ,$ ( TARGET_COPY_OUT_PRODUCT ) ) , )
$( error TARGET_COPY_OUT_PRODUCT must be either 'product ' or 'system /product ', seeing '$ ( TARGET_COPY_OUT_PRODUCT ) '.)
e n d i f
PRODUCT_COPY_FILES := $( subst $( _product_path_placeholder) ,$( TARGET_COPY_OUT_PRODUCT) ,$( PRODUCT_COPY_FILES) )
BOARD_USES_PRODUCTIMAGE :=
i f d e f B O A R D _ P R E B U I L T _ P R O D U C T I M A G E
BOARD_USES_PRODUCTIMAGE := true
e n d i f
i f d e f B O A R D _ P R O D U C T I M A G E _ F I L E _ S Y S T E M _ T Y P E
BOARD_USES_PRODUCTIMAGE := true
e n d i f
2019-07-12 11:51:37 +08:00
$( call check_image_config ,product )
2019-02-26 20:34:03 +08:00
.KATI_READONLY := BOARD_USES_PRODUCTIMAGE
BUILDING_PRODUCT_IMAGE :=
i f e q ( $( PRODUCT_BUILD_PRODUCT_IMAGE ) , )
ifdef BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE
BUILDING_PRODUCT_IMAGE := true
endif
e l s e i f e q ( $( PRODUCT_BUILD_PRODUCT_IMAGE ) , t r u e )
BUILDING_PRODUCT_IMAGE := true
ifndef BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE
$( error PRODUCT_BUILD_PRODUCT_IMAGE set to true, but BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE not defined)
endif
e n d i f
i f d e f B O A R D _ P R E B U I L T _ P R O D U C T I M A G E
BUILDING_PRODUCT_IMAGE :=
e n d i f
.KATI_READONLY := BUILDING_PRODUCT_IMAGE
###########################################
2019-06-25 14:58:13 +08:00
# TODO(b/135957588) TARGET_COPY_OUT_PRODUCT_SERVICES will be set to
# TARGET_COPY_OUT_PRODUCT as a workaround.
TARGET_COPY_OUT_PRODUCT_SERVICES := $( TARGET_COPY_OUT_PRODUCT)
###########################################
# Now we can substitute with the real value of TARGET_COPY_OUT_SYSTEM_EXT
i f e q ( $( TARGET_COPY_OUT_SYSTEM_EXT ) , $( _system_ext_path_placeholder ) )
TARGET_COPY_OUT_SYSTEM_EXT := system/system_ext
e l s e i f e q ( $( filter system_ext system /system_ext ,$ ( TARGET_COPY_OUT_SYSTEM_EXT ) ) , )
$( error TARGET_COPY_OUT_SYSTEM_EXT must be either 'system_ext ' or 'system /system_ext ', seeing '$ ( TARGET_COPY_OUT_SYSTEM_EXT ) '.)
e n d i f
PRODUCT_COPY_FILES := $( subst $( _system_ext_path_placeholder) ,$( TARGET_COPY_OUT_SYSTEM_EXT) ,$( PRODUCT_COPY_FILES) )
BOARD_USES_SYSTEM_EXTIMAGE :=
i f d e f B O A R D _ P R E B U I L T _ S Y S T E M _ E X T I M A G E
BOARD_USES_SYSTEM_EXTIMAGE := true
e n d i f
i f d e f B O A R D _ S Y S T E M _ E X T I M A G E _ F I L E _ S Y S T E M _ T Y P E
BOARD_USES_SYSTEM_EXTIMAGE := true
e n d i f
2019-07-12 11:51:37 +08:00
$( call check_image_config ,system_ext )
2019-06-25 14:58:13 +08:00
.KATI_READONLY := BOARD_USES_SYSTEM_EXTIMAGE
BUILDING_SYSTEM_EXT_IMAGE :=
i f e q ( $( PRODUCT_BUILD_SYSTEM_EXT_IMAGE ) , )
ifdef BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE
BUILDING_SYSTEM_EXT_IMAGE := true
2019-02-26 20:34:03 +08:00
endif
2019-06-25 14:58:13 +08:00
e l s e i f e q ( $( PRODUCT_BUILD_SYSTEM_EXT_IMAGE ) , t r u e )
BUILDING_SYSTEM_EXT_IMAGE := true
ifndef BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE
$( error PRODUCT_BUILD_SYSTEM_EXT_IMAGE set to true, but BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE not defined)
2019-02-26 20:34:03 +08:00
endif
e n d i f
2019-06-25 14:58:13 +08:00
i f d e f B O A R D _ P R E B U I L T _ S Y S T E M _ E X T I M A G E
BUILDING_SYSTEM_EXT_IMAGE :=
2019-02-26 20:34:03 +08:00
e n d i f
2019-06-25 14:58:13 +08:00
.KATI_READONLY := BUILDING_SYSTEM_EXT_IMAGE
2019-02-26 20:34:03 +08:00
###########################################
# Now we can substitute with the real value of TARGET_COPY_OUT_ODM
i f e q ( $( TARGET_COPY_OUT_ODM ) , $( _odm_path_placeholder ) )
2019-10-10 09:26:00 +08:00
TARGET_COPY_OUT_ODM := $( TARGET_COPY_OUT_VENDOR) /odm
e l s e i f e q ( $( filter odm system /vendor /odm vendor /odm ,$ ( TARGET_COPY_OUT_ODM ) ) , )
$( error TARGET_COPY_OUT_ODM must be either 'odm' , 'system/vendor/odm' or 'vendor/odm' , seeing '$(TARGET_COPY_OUT_ODM)' .)
2019-02-26 20:34:03 +08:00
e n d i f
PRODUCT_COPY_FILES := $( subst $( _odm_path_placeholder) ,$( TARGET_COPY_OUT_ODM) ,$( PRODUCT_COPY_FILES) )
BOARD_USES_ODMIMAGE :=
i f d e f B O A R D _ P R E B U I L T _ O D M I M A G E
BOARD_USES_ODMIMAGE := true
e n d i f
i f d e f B O A R D _ O D M I M A G E _ F I L E _ S Y S T E M _ T Y P E
BOARD_USES_ODMIMAGE := true
e n d i f
2019-07-12 11:51:37 +08:00
$( call check_image_config ,odm )
2019-02-26 20:34:03 +08:00
BUILDING_ODM_IMAGE :=
2019-04-20 06:00:12 +08:00
i f e q ( $( PRODUCT_BUILD_ODM_IMAGE ) , )
2019-02-26 20:34:03 +08:00
ifdef BOARD_ODMIMAGE_FILE_SYSTEM_TYPE
BUILDING_ODM_IMAGE := true
endif
e l s e i f e q ( $( PRODUCT_BUILD_ODM_IMAGE ) , t r u e )
BUILDING_ODM_IMAGE := true
ifndef BOARD_ODMIMAGE_FILE_SYSTEM_TYPE
$( error PRODUCT_BUILD_ODM_IMAGE set to true, but BOARD_ODMIMAGE_FILE_SYSTEM_TYPE not defined)
endif
e n d i f
i f d e f B O A R D _ P R E B U I L T _ O D M I M A G E
BUILDING_ODM_IMAGE :=
e n d i f
.KATI_READONLY := BUILDING_ODM_IMAGE
###########################################
# Ensure that only TARGET_RECOVERY_UPDATER_LIBS *or* AB_OTA_UPDATER is set.
TARGET_RECOVERY_UPDATER_LIBS ?=
AB_OTA_UPDATER ?=
.KATI_READONLY := TARGET_RECOVERY_UPDATER_LIBS AB_OTA_UPDATER
i f e q ( $( AB_OTA_UPDATER ) , t r u e )
ifneq ( $( strip $( TARGET_RECOVERY_UPDATER_LIBS) ) ,)
$( error Do not use TARGET_RECOVERY_UPDATER_LIBS when using AB_OTA_UPDATER)
endif
e n d i f
2019-04-09 12:11:59 +08:00
# Sanity check for building generic OTA packages. Currently it only supports A/B OTAs.
i f e q ( $( PRODUCT_BUILD_GENERIC_OTA_PACKAGE ) , t r u e )
ifneq ( $( AB_OTA_UPDATER) ,true)
$( error PRODUCT_BUILD_GENERIC_OTA_PACKAGE with 'AB_OTA_UPDATER != true' is not supported)
endif
e n d i f
2019-05-21 02:10:24 +08:00
i f d e f B O A R D _ P R E B U I L T _ D T B I M A G E _ D I R
ifneq ( $( BOARD_INCLUDE_DTB_IN_BOOTIMG) ,true)
$( error BOARD_PREBUILT_DTBIMAGE_DIR with 'BOARD_INCLUDE_DTB_IN_BOOTIMG != true' is not supported)
endif
e n d i f
2019-02-26 20:34:03 +08:00
# Check BOARD_VNDK_VERSION
d e f i n e c h e c k _ v n d k _ v e r s i o n
$( eval vndk_path := prebuilts/vndk/v$( 1) ) \
$( if $( wildcard $( vndk_path) /*/Android.bp) ,,$( error VNDK version $( 1) not found) )
e n d e f
i f d e f B O A R D _ V N D K _ V E R S I O N
ifneq ( $( BOARD_VNDK_VERSION) ,current)
$( error BOARD_VNDK_VERSION: Only "current" is implemented)
endif
TARGET_VENDOR_TEST_SUFFIX := /vendor
e l s e
TARGET_VENDOR_TEST_SUFFIX :=
e n d i f
2019-05-08 19:23:42 +08:00
###########################################
# APEXes are by default flattened, i.e. non-updatable.
# It can be unflattened (and updatable) by inheriting from
# updatable_apex.mk
2019-10-04 21:06:26 +08:00
#
# APEX flattening can also be forcibly enabled (resp. disabled) by
# setting OVERRIDE_TARGET_FLATTEN_APEX to true (resp. false), e.g. by
# setting the OVERRIDE_TARGET_FLATTEN_APEX environment variable.
i f d e f O V E R R I D E _ T A R G E T _ F L A T T E N _ A P E X
TARGET_FLATTEN_APEX := $( OVERRIDE_TARGET_FLATTEN_APEX)
e l s e
ifeq ( ,$( TARGET_FLATTEN_APEX) )
TARGET_FLATTEN_APEX := true
endif
2019-05-08 19:23:42 +08:00
e n d i f
2019-02-26 20:34:03 +08:00
i f e q ( , $( TARGET_BUILD_APPS ) )
i f d e f P R O D U C T _ E X T R A _ V N D K _ V E R S I O N S
$( foreach v,$( PRODUCT_EXTRA_VNDK_VERSIONS) ,$( call check_vndk_version,$( v) ) )
e n d i f
e n d i f
# Ensure that BOARD_SYSTEMSDK_VERSIONS are all within PLATFORM_SYSTEMSDK_VERSIONS
_unsupported_systemsdk_versions := $( filter-out $( PLATFORM_SYSTEMSDK_VERSIONS) ,$( BOARD_SYSTEMSDK_VERSIONS) )
i f n e q ( , $( _unsupported_systemsdk_versions ) )
$( error System SDK versions '$(_unsupported_systemsdk_versions)' in BOARD_SYSTEMSDK_VERSIONS are not supported.\
Supported versions are $( PLATFORM_SYSTEMSDK_VERSIONS) )
e n d i f
2019-04-18 03:25:09 +08:00
###########################################
# Handle BUILD_BROKEN_USES_BUILD_*
$( foreach m ,$ ( DEFAULT_WARNING_BUILD_MODULE_TYPES ) ,\
$( if $( filter false,$( BUILD_BROKEN_USES_$( m) ) ) ,\
$( KATI_obsolete_var $( m) ,Please convert to Soong) ,\
$( KATI_deprecated_var $( m) ,Please convert to Soong) ) )
$( foreach m ,$ ( DEFAULT_ERROR_BUILD_MODULE_TYPES ) ,\
$( if $( filter true,$( BUILD_BROKEN_USES_$( m) ) ) ,\
$( KATI_deprecated_var $( m) ,Please convert to Soong) ,\
$( KATI_obsolete_var $( m) ,Please convert to Soong) ) )