Makefile: copy mke2fs.conf to ota root
am: abcec5e0bf
Change-Id: Ia4deec66bf37bd052c811f6057828f27d8428023
diff --git a/core/Makefile b/core/Makefile
index 755f3bb..e2989a0 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -815,11 +815,11 @@
$(hide) zip -qjX $@ $<
$(remove-timestamps-from-package)
-# Carry the public key for update_engine if it's a non-Brillo target that
+# Carry the public key for update_engine if it's a non-IoT target that
# uses the AB updater. We use the same key as otacerts but in RSA public key
# format.
ifeq ($(AB_OTA_UPDATER),true)
-ifeq ($(BRILLO),)
+ifneq ($(PRODUCT_IOT),true)
ALL_DEFAULT_INSTALLED_MODULES += $(TARGET_OUT_ETC)/update_engine/update-payload-key.pub.pem
$(TARGET_OUT_ETC)/update_engine/update-payload-key.pub.pem: $(addsuffix .x509.pem,$(DEFAULT_KEY_CERT_PAIR))
$(hide) rm -f $@
diff --git a/core/binary.mk b/core/binary.mk
index 97f1c6f..3eb7760 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -112,12 +112,12 @@
# that for the generated libraries. Clip the API level to the minimum where
# appropriate.
ifdef LOCAL_USE_VNDK
- my_ndk_api := $(BOARD_VNDK_VERSION)
+ my_ndk_api := current
else
my_ndk_api := $(LOCAL_SDK_VERSION)
- endif
- ifneq ($(my_ndk_api),current)
+ ifneq ($(my_ndk_api),current)
my_ndk_api := $(call math_max,$(my_ndk_api),$(my_min_sdk_version))
+ endif
endif
my_ndk_api_def := $(my_ndk_api)
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 880d310..67ac751 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -255,6 +255,13 @@
endif
endif
+# Check BOARD_VNDK_VERSION
+ifdef BOARD_VNDK_VERSION
+ ifneq ($(BOARD_VNDK_VERSION),current)
+ $(error BOARD_VNDK_VERSION: Only "current" is implemented)
+ endif
+endif
+
# ---------------------------------------------------------------
# Set up configuration for target machine.
# The following must be set:
diff --git a/core/jack-default.args b/core/jack-default.args
index 0232301..433bc53 100644
--- a/core/jack-default.args
+++ b/core/jack-default.args
@@ -5,3 +5,5 @@
-D jack.reporter.level.file=error=--,warning=-
--verbose error
-D jack.jayce.cache=false
+-D jack.lambda.grouping-scope=package
+-D jack.lambda.simplify-stateless=true
diff --git a/core/soong_config.mk b/core/soong_config.mk
index 576c8ab..6416dc6 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -13,6 +13,17 @@
endif
endif
+# Converts a list to a JSON list.
+# $1: List separator.
+# $2: List.
+_json_list = [$(if $(2),"$(subst $(1),"$(comma)",$(2))")]
+
+# Converts a space-separated list to a JSON list.
+json_list = $(call _json_list,$(space),$(1))
+
+# Converts a comma-separated list to a JSON list.
+csv_to_json_list = $(call _json_list,$(comma),$(1))
+
# Create soong.variables with copies of makefile settings. Runs every build,
# but only updates soong.variables if it changes
SOONG_VARIABLES_TMP := $(SOONG_VARIABLES).$$$$
@@ -23,13 +34,14 @@
echo ' "Make_suffix": "-$(TARGET_PRODUCT)",'; \
echo ''; \
echo ' "Platform_sdk_version": $(PLATFORM_SDK_VERSION),'; \
+ echo ' "Platform_version_all_codenames": $(call csv_to_json_list,$(PLATFORM_VERSION_ALL_CODENAMES)),'; \
echo ' "Unbundled_build": $(if $(TARGET_BUILD_APPS),true,false),'; \
echo ' "Brillo": $(if $(BRILLO),true,false),'; \
echo ' "Malloc_not_svelte": $(if $(filter true,$(MALLOC_SVELTE)),false,true),'; \
echo ' "Allow_missing_dependencies": $(if $(TARGET_BUILD_APPS)$(filter true,$(SOONG_ALLOW_MISSING_DEPENDENCIES)),true,false),'; \
- echo ' "SanitizeHost": [$(if $(SANITIZE_HOST),"$(subst $(space),"$(comma)",$(SANITIZE_HOST))")],'; \
- echo ' "SanitizeDevice": [$(if $(SANITIZE_TARGET),"$(subst $(space),"$(comma)",$(SANITIZE_TARGET))")],'; \
- echo ' "SanitizeDeviceArch": [$(if $(SANITIZE_TARGET_ARCH),"$(subst $(space),"$(comma)",$(SANITIZE_TARGET_ARCH))")],'; \
+ echo ' "SanitizeHost": $(call json_list,$(SANITIZE_HOST)),'; \
+ echo ' "SanitizeDevice": $(call json_list,$(SANITIZE_TARGET)),'; \
+ echo ' "SanitizeDeviceArch": $(call json_list,$(SANITIZE_TARGET_ARCH)),'; \
echo ' "HostStaticBinaries": $(if $(strip $(BUILD_HOST_static)),true,false),'; \
echo ' "Binder32bit": $(if $(BINDER32BIT),true,false),'; \
echo ' "DevicePrefer32BitExecutables": $(if $(filter true,$(TARGET_PREFER_32_BIT_EXECUTABLES)),true,false),'; \
@@ -42,8 +54,8 @@
echo ' "TidyChecks": "$(WITH_TIDY_CHECKS)",'; \
echo ''; \
echo ' "NativeCoverage": $(if $(filter true,$(NATIVE_COVERAGE)),true,false),'; \
- echo ' "CoveragePaths": [$(if $(COVERAGE_PATHS),"$(subst $(space),"$(comma)",$(subst $(comma),$(space),$(COVERAGE_PATHS)))")],'; \
- echo ' "CoverageExcludePaths": [$(if $(COVERAGE_EXCLUDE_PATHS),"$(subst $(space),"$(comma)",$(subst $(comma),$(space),$(COVERAGE_EXCLUDE_PATHS)))")],'; \
+ echo ' "CoveragePaths": $(call csv_to_json_list,$(COVERAGE_PATHS)),'; \
+ echo ' "CoverageExcludePaths": $(call csv_to_json_list,$(COVERAGE_EXCLUDE_PATHS)),'; \
echo ''; \
echo ' "DeviceName": "$(TARGET_DEVICE)",'; \
echo ' "DeviceArch": "$(TARGET_ARCH)",'; \
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index b7c93f0..ad8561d 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -76,8 +76,7 @@
PLATFORM_VERSION.OPR1 := O
PLATFORM_VERSION.PPR1 := P
-# This is the current development code-name, if the build is not a final
-# release build. If this is a final release build, it is simply "REL".
+# These are the current development codenames.
PLATFORM_VERSION_CODENAME.OPR1 := O
PLATFORM_VERSION_CODENAME.PPR1 := P
@@ -128,7 +127,22 @@
# This is all of the development codenames that are active. Should be either
# the same as PLATFORM_VERSION_CODENAME or a comma-separated list of additional
# codenames after PLATFORM_VERSION_CODENAME.
- PLATFORM_VERSION_ALL_CODENAMES := $(PLATFORM_VERSION_CODENAME)
+ PLATFORM_VERSION_ALL_CODENAMES :=
+
+ # Build a list of all possible code names. Avoid duplicates, and stop when we
+ # reach a codename that matches PLATFORM_VERSION_CODENAME (anything beyond
+ # that is not included in our build.
+ _versions_in_target := \
+ $(call find_and_earlier,$(ALL_VERSIONS),$(TARGET_PLATFORM_VERSION))
+ $(foreach version,$(_versions_in_target),\
+ $(eval _codename := $(PLATFORM_VERSION_CODENAME.$(version)))\
+ $(if $(filter $(_codename),$(PLATFORM_VERSION_ALL_CODENAMES)),,\
+ $(eval PLATFORM_VERSION_ALL_CODENAMES += $(_codename))))
+
+ # And convert from space separated to comma separated.
+ PLATFORM_VERSION_ALL_CODENAMES := \
+ $(subst $(space),$(comma),$(strip $(PLATFORM_VERSION_ALL_CODENAMES)))
+
endif
ifeq (REL,$(PLATFORM_VERSION_CODENAME))
diff --git a/target/product/embedded.mk b/target/product/embedded.mk
index cfca2c4..37dd1d4 100644
--- a/target/product/embedded.mk
+++ b/target/product/embedded.mk
@@ -34,8 +34,6 @@
dumpsys \
fastboot \
gralloc.default \
- grep \
- gzip \
healthd \
hwservicemanager \
init \
@@ -72,17 +70,13 @@
logcat \
logwrapper \
lshal \
- mkshrc \
- reboot \
recovery \
service \
servicemanager \
- sh \
+ shell_and_utilities \
storaged \
surfaceflinger \
tombstoned \
- toolbox \
- toybox \
tzdatacheck \
# SELinux packages
diff --git a/tools/fs_config/fs_config_generator.py b/tools/fs_config/fs_config_generator.py
index 2cf2fd8..c8d1dd3 100755
--- a/tools/fs_config/fs_config_generator.py
+++ b/tools/fs_config/fs_config_generator.py
@@ -709,7 +709,7 @@
int(cap, 0)
tmp.append('(' + cap + ')')
except ValueError:
- tmp.append('(1ULL << CAP_' + cap.upper() + ')')
+ tmp.append('CAP_MASK_LONG(CAP_' + cap.upper() + ')')
caps = tmp
diff --git a/tools/signapk/Android.mk b/tools/signapk/Android.mk
index 4506e2f..051a51d 100644
--- a/tools/signapk/Android.mk
+++ b/tools/signapk/Android.mk
@@ -30,7 +30,6 @@
include $(BUILD_HOST_JAVA_LIBRARY)
ifeq ($(TARGET_BUILD_APPS),)
-ifeq ($(BRILLO),)
# The post-build signing tools need signapk.jar and its shared libraries,
# but we don't need this if we're just doing unbundled apps.
my_dist_files := $(LOCAL_INSTALLED_MODULE) \
@@ -39,4 +38,3 @@
$(call dist-for-goals,droidcore,$(my_dist_files))
my_dist_files :=
endif
-endif