diff options
-rw-r--r-- | Changes.md | 10 | ||||
-rw-r--r-- | CleanSpec.mk | 3 | ||||
-rw-r--r-- | core/Makefile | 4 | ||||
-rw-r--r-- | core/app_certificate_validate.mk | 12 | ||||
-rw-r--r-- | core/binary.mk | 278 | ||||
-rw-r--r-- | core/combo/TARGET_linux-arm.mk | 4 | ||||
-rw-r--r-- | core/config.mk | 1 | ||||
-rw-r--r-- | core/definitions.mk | 3 | ||||
-rw-r--r-- | core/goma.mk | 23 | ||||
-rw-r--r-- | core/main.mk | 9 | ||||
-rw-r--r-- | core/package_internal.mk | 1 | ||||
-rw-r--r-- | core/prebuilt_internal.mk | 2 | ||||
-rw-r--r-- | core/product.mk | 2 | ||||
-rw-r--r-- | core/product_config.mk | 5 | ||||
-rw-r--r-- | core/soong_app_prebuilt.mk | 2 | ||||
-rw-r--r-- | core/soong_config.mk | 3 | ||||
-rw-r--r-- | core/version_defaults.mk | 2 | ||||
-rw-r--r-- | envsetup.sh | 2 | ||||
-rw-r--r-- | target/board/generic_arm64/BoardConfig.mk | 6 | ||||
-rw-r--r-- | target/product/base_system.mk | 6 | ||||
-rw-r--r-- | target/product/handheld_system.mk | 2 | ||||
-rwxr-xr-x | tools/buildinfo.sh | 4 | ||||
-rw-r--r-- | tools/releasetools/OWNERS | 1 | ||||
-rwxr-xr-x | tools/releasetools/build_image.py | 31 | ||||
-rwxr-xr-x | tools/releasetools/sign_target_files_apks.py | 4 |
25 files changed, 236 insertions, 184 deletions
diff --git a/Changes.md b/Changes.md index 2d5cd9766..1ed6bf81d 100644 --- a/Changes.md +++ b/Changes.md | |||
@@ -1,5 +1,15 @@ | |||
1 | # Build System Changes for Android.mk Writers | 1 | # Build System Changes for Android.mk Writers |
2 | 2 | ||
3 | ## `USER` deprecation {#USER} | ||
4 | |||
5 | `USER` will soon be `nobody` in many cases due to the addition of a sandbox | ||
6 | around the Android build. Most of the time you shouldn't need to know the | ||
7 | identity of the user running the build, but if you do, it's available in the | ||
8 | make variable `BUILD_USERNAME` for now. | ||
9 | |||
10 | Similarly, the `hostname` tool will also be returning a more consistent value | ||
11 | of `android-build`. The real value is available as `BUILD_HOSTNAME`. | ||
12 | |||
3 | ## `BUILD_NUMBER` removal from Android.mk {#BUILD_NUMBER} | 13 | ## `BUILD_NUMBER` removal from Android.mk {#BUILD_NUMBER} |
4 | 14 | ||
5 | `BUILD_NUMBER` should not be used directly in Android.mk files, as it would | 15 | `BUILD_NUMBER` should not be used directly in Android.mk files, as it would |
diff --git a/CleanSpec.mk b/CleanSpec.mk index b06a87b12..b32868eab 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk | |||
@@ -529,6 +529,9 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/perfprofd) | |||
529 | $(call add-clean-step, find system/app system/priv-app system/framework system_other -depth -type d -print0 | xargs -0 rmdir) | 529 | $(call add-clean-step, find system/app system/priv-app system/framework system_other -depth -type d -print0 | xargs -0 rmdir) |
530 | $(call add-clean-step, rm -f .d) | 530 | $(call add-clean-step, rm -f .d) |
531 | 531 | ||
532 | # Remove obsolete apps | ||
533 | $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*) | ||
534 | |||
532 | # ************************************************ | 535 | # ************************************************ |
533 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST | 536 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST |
534 | # ************************************************ | 537 | # ************************************************ |
diff --git a/core/Makefile b/core/Makefile index f8cf88200..7d1c7ff20 100644 --- a/core/Makefile +++ b/core/Makefile | |||
@@ -317,7 +317,7 @@ $(intermediate_system_build_prop): PRIVATE_BUILD_DESC := $(build_desc) | |||
317 | # The string used to uniquely identify the combined build and product; used by the OTA server. | 317 | # The string used to uniquely identify the combined build and product; used by the OTA server. |
318 | ifeq (,$(strip $(BUILD_FINGERPRINT))) | 318 | ifeq (,$(strip $(BUILD_FINGERPRINT))) |
319 | ifeq ($(strip $(HAS_BUILD_NUMBER)),false) | 319 | ifeq ($(strip $(HAS_BUILD_NUMBER)),false) |
320 | BF_BUILD_NUMBER := $(USER)$$($(DATE_FROM_FILE) +%m%d%H%M) | 320 | BF_BUILD_NUMBER := $(BUILD_USERNAME)$$($(DATE_FROM_FILE) +%m%d%H%M) |
321 | else | 321 | else |
322 | BF_BUILD_NUMBER := $(file <$(BUILD_NUMBER_FILE)) | 322 | BF_BUILD_NUMBER := $(file <$(BUILD_NUMBER_FILE)) |
323 | endif | 323 | endif |
@@ -420,6 +420,8 @@ endif | |||
420 | BUILD_ID="$(BUILD_ID)" \ | 420 | BUILD_ID="$(BUILD_ID)" \ |
421 | BUILD_DISPLAY_ID="$(BUILD_DISPLAY_ID)" \ | 421 | BUILD_DISPLAY_ID="$(BUILD_DISPLAY_ID)" \ |
422 | DATE="$(DATE_FROM_FILE)" \ | 422 | DATE="$(DATE_FROM_FILE)" \ |
423 | BUILD_USERNAME="$(BUILD_USERNAME)" \ | ||
424 | BUILD_HOSTNAME="$(BUILD_HOSTNAME)" \ | ||
423 | BUILD_NUMBER="$(BUILD_NUMBER_FROM_FILE)" \ | 425 | BUILD_NUMBER="$(BUILD_NUMBER_FROM_FILE)" \ |
424 | BOARD_BUILD_SYSTEM_ROOT_IMAGE="$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)" \ | 426 | BOARD_BUILD_SYSTEM_ROOT_IMAGE="$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)" \ |
425 | AB_OTA_UPDATER="$(AB_OTA_UPDATER)" \ | 427 | AB_OTA_UPDATER="$(AB_OTA_UPDATER)" \ |
diff --git a/core/app_certificate_validate.mk b/core/app_certificate_validate.mk new file mode 100644 index 000000000..15ddd9450 --- /dev/null +++ b/core/app_certificate_validate.mk | |||
@@ -0,0 +1,12 @@ | |||
1 | |||
2 | ifeq (true,$(filter true, \ | ||
3 | $(LOCAL_PRODUCT_MODULE) $(LOCAL_PRODUCT_SERVICES_MODULE) \ | ||
4 | $(LOCAL_VENDOR_MODULE) $(LOCAL_PROPRIETARY_MODULE))) | ||
5 | ifneq (,$(filter $(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))%,$(LOCAL_CERTIFICATE))) | ||
6 | CERTIFICATE_VIOLATION_MODULES += $(LOCAL_MODULE) | ||
7 | ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ENFORCE_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT)) | ||
8 | $(if $(filter $(LOCAL_MODULE),$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT_WHITELIST)),,\ | ||
9 | $(call pretty-error,The module in product partition cannot be signed with certificate in system.)) | ||
10 | endif | ||
11 | endif | ||
12 | endif \ No newline at end of file | ||
diff --git a/core/binary.mk b/core/binary.mk index e7b0c52d6..be10c2d37 100644 --- a/core/binary.mk +++ b/core/binary.mk | |||
@@ -72,6 +72,9 @@ endif | |||
72 | else | 72 | else |
73 | my_native_coverage := false | 73 | my_native_coverage := false |
74 | endif | 74 | endif |
75 | ifneq ($(NATIVE_COVERAGE),true) | ||
76 | my_native_coverage := false | ||
77 | endif | ||
75 | 78 | ||
76 | ifeq ($(strip $(ENABLE_XOM)),true) | 79 | ifeq ($(strip $(ENABLE_XOM)),true) |
77 | ifndef LOCAL_IS_HOST_MODULE | 80 | ifndef LOCAL_IS_HOST_MODULE |
@@ -470,144 +473,6 @@ endif | |||
470 | my_asflags += -D__ASSEMBLY__ | 473 | my_asflags += -D__ASSEMBLY__ |
471 | 474 | ||
472 | ########################################################### | 475 | ########################################################### |
473 | ## Define PRIVATE_ variables from global vars | ||
474 | ########################################################### | ||
475 | ifndef LOCAL_IS_HOST_MODULE | ||
476 | ifdef LOCAL_USE_VNDK | ||
477 | my_target_global_c_includes := \ | ||
478 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_INCLUDES) | ||
479 | my_target_global_c_system_includes := \ | ||
480 | $(TARGET_OUT_HEADERS) \ | ||
481 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_SYSTEM_INCLUDES) | ||
482 | else ifdef LOCAL_SDK_VERSION | ||
483 | my_target_global_c_includes := | ||
484 | my_target_global_c_system_includes := $(my_ndk_stl_include_path) $(my_ndk_sysroot_include) | ||
485 | else ifdef BOARD_VNDK_VERSION | ||
486 | my_target_global_c_includes := $(SRC_HEADERS) \ | ||
487 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_INCLUDES) \ | ||
488 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_INCLUDES) | ||
489 | my_target_global_c_system_includes := $(SRC_SYSTEM_HEADERS) \ | ||
490 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_SYSTEM_INCLUDES) \ | ||
491 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_SYSTEM_INCLUDES) | ||
492 | else | ||
493 | my_target_global_c_includes := $(SRC_HEADERS) \ | ||
494 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_INCLUDES) \ | ||
495 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_INCLUDES) | ||
496 | my_target_global_c_system_includes := $(SRC_SYSTEM_HEADERS) $(TARGET_OUT_HEADERS) \ | ||
497 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_SYSTEM_INCLUDES) \ | ||
498 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_SYSTEM_INCLUDES) | ||
499 | endif | ||
500 | |||
501 | my_target_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CFLAGS) | ||
502 | my_target_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CONLYFLAGS) $(my_c_std_conlyflags) | ||
503 | my_target_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CPPFLAGS) $(my_cpp_std_cppflags) | ||
504 | ifeq ($(my_use_clang_lld),true) | ||
505 | my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LLDFLAGS) | ||
506 | include $(BUILD_SYSTEM)/pack_dyn_relocs_setup.mk | ||
507 | ifeq ($(my_pack_module_relocations),false) | ||
508 | my_target_global_ldflags += -Wl,--pack-dyn-relocs=none | ||
509 | endif | ||
510 | else | ||
511 | my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LDFLAGS) | ||
512 | endif # my_use_clang_lld | ||
513 | |||
514 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_INCLUDES := $(my_target_global_c_includes) | ||
515 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_SYSTEM_INCLUDES := $(my_target_global_c_system_includes) | ||
516 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CFLAGS := $(my_target_global_cflags) | ||
517 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CONLYFLAGS := $(my_target_global_conlyflags) | ||
518 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CPPFLAGS := $(my_target_global_cppflags) | ||
519 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_LDFLAGS := $(my_target_global_ldflags) | ||
520 | |||
521 | else # LOCAL_IS_HOST_MODULE | ||
522 | |||
523 | my_host_global_c_includes := $(SRC_HEADERS) \ | ||
524 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_INCLUDES) | ||
525 | my_host_global_c_system_includes := $(SRC_SYSTEM_HEADERS) \ | ||
526 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_SYSTEM_INCLUDES) | ||
527 | |||
528 | my_host_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CFLAGS) | ||
529 | my_host_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CONLYFLAGS) $(my_c_std_conlyflags) | ||
530 | my_host_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CPPFLAGS) $(my_cpp_std_cppflags) | ||
531 | ifeq ($(my_use_clang_lld),true) | ||
532 | my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LLDFLAGS) | ||
533 | else | ||
534 | my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LDFLAGS) | ||
535 | endif # my_use_clang_lld | ||
536 | |||
537 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_INCLUDES := $(my_host_global_c_includes) | ||
538 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_SYSTEM_INCLUDES := $(my_host_global_c_system_includes) | ||
539 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CFLAGS := $(my_host_global_cflags) | ||
540 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CONLYFLAGS := $(my_host_global_conlyflags) | ||
541 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CPPFLAGS := $(my_host_global_cppflags) | ||
542 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_LDFLAGS := $(my_host_global_ldflags) | ||
543 | endif # LOCAL_IS_HOST_MODULE | ||
544 | |||
545 | # To enable coverage for a given module, set LOCAL_NATIVE_COVERAGE=true and | ||
546 | # build with NATIVE_COVERAGE=true in your enviornment. Note that the build | ||
547 | # system is not sensitive to changes to NATIVE_COVERAGE, so you should do a | ||
548 | # clean build of your module after toggling it. | ||
549 | ifeq ($(NATIVE_COVERAGE),true) | ||
550 | ifeq ($(my_native_coverage),true) | ||
551 | # Note that clang coverage doesn't play nicely with acov out of the box. | ||
552 | # Clang apparently generates .gcno files that aren't compatible with | ||
553 | # gcov-4.8. This can be solved by installing gcc-4.6 and invoking lcov | ||
554 | # with `--gcov-tool /usr/bin/gcov-4.6`. | ||
555 | # | ||
556 | # http://stackoverflow.com/questions/17758126/clang-code-coverage-invalid-output | ||
557 | my_cflags += --coverage -O0 | ||
558 | my_ldflags += --coverage | ||
559 | endif | ||
560 | |||
561 | my_coverage_lib := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)LIBPROFILE_RT) | ||
562 | |||
563 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_COVERAGE_LIB := $(my_coverage_lib) | ||
564 | $(LOCAL_INTERMEDIATE_TARGETS): $(my_coverage_lib) | ||
565 | else | ||
566 | my_native_coverage := false | ||
567 | endif | ||
568 | |||
569 | ########################################################### | ||
570 | ## Define PRIVATE_ variables used by multiple module types | ||
571 | ########################################################### | ||
572 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_NO_DEFAULT_COMPILER_FLAGS := \ | ||
573 | $(strip $(LOCAL_NO_DEFAULT_COMPILER_FLAGS)) | ||
574 | |||
575 | ifeq ($(strip $(WITH_STATIC_ANALYZER)),) | ||
576 | LOCAL_NO_STATIC_ANALYZER := true | ||
577 | endif | ||
578 | |||
579 | ifneq ($(strip $(LOCAL_IS_HOST_MODULE)),) | ||
580 | my_syntax_arch := host | ||
581 | else | ||
582 | my_syntax_arch := $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) | ||
583 | endif | ||
584 | |||
585 | ifeq ($(strip $(my_cc)),) | ||
586 | my_cc := $(my_cc_wrapper) $(CLANG) | ||
587 | endif | ||
588 | |||
589 | SYNTAX_TOOLS_PREFIX := \ | ||
590 | $(LLVM_PREBUILTS_BASE)/$(BUILD_OS)-x86/$(LLVM_PREBUILTS_VERSION)/libexec | ||
591 | |||
592 | ifneq ($(LOCAL_NO_STATIC_ANALYZER),true) | ||
593 | my_cc := CCC_CC=$(CLANG) CLANG=$(CLANG) \ | ||
594 | $(SYNTAX_TOOLS_PREFIX)/ccc-analyzer | ||
595 | endif | ||
596 | |||
597 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CC := $(my_cc) | ||
598 | |||
599 | ifeq ($(strip $(my_cxx)),) | ||
600 | my_cxx := $(my_cxx_wrapper) $(CLANG_CXX) | ||
601 | endif | ||
602 | |||
603 | ifneq ($(LOCAL_NO_STATIC_ANALYZER),true) | ||
604 | my_cxx := CCC_CXX=$(CLANG_CXX) CLANG_CXX=$(CLANG_CXX) \ | ||
605 | $(SYNTAX_TOOLS_PREFIX)/c++-analyzer | ||
606 | endif | ||
607 | |||
608 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_LINKER := $(my_linker) | ||
609 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CXX := $(my_cxx) | ||
610 | |||
611 | # TODO: support a mix of standard extensions so that this isn't necessary | 476 | # TODO: support a mix of standard extensions so that this isn't necessary |
612 | LOCAL_CPP_EXTENSION := $(strip $(LOCAL_CPP_EXTENSION)) | 477 | LOCAL_CPP_EXTENSION := $(strip $(LOCAL_CPP_EXTENSION)) |
613 | ifeq ($(LOCAL_CPP_EXTENSION),) | 478 | ifeq ($(LOCAL_CPP_EXTENSION),) |
@@ -1443,6 +1308,8 @@ normal_objects += $(addprefix $(TOPDIR)$(LOCAL_PATH)/,$(LOCAL_PREBUILT_OBJ_FILES | |||
1443 | 1308 | ||
1444 | all_objects := $(normal_objects) $(gen_o_objects) | 1309 | all_objects := $(normal_objects) $(gen_o_objects) |
1445 | 1310 | ||
1311 | LOCAL_INTERMEDIATE_TARGETS += $(all_objects) | ||
1312 | |||
1446 | # Cleanup file tracking | 1313 | # Cleanup file tracking |
1447 | $(foreach f,$(my_tracked_gen_files),$(eval my_src_file_gen_$(s):=)) | 1314 | $(foreach f,$(my_tracked_gen_files),$(eval my_src_file_gen_$(s):=)) |
1448 | my_tracked_gen_files := | 1315 | my_tracked_gen_files := |
@@ -1736,6 +1603,141 @@ endif | |||
1736 | # (start-group/end-group), so append after the check above. | 1603 | # (start-group/end-group), so append after the check above. |
1737 | my_ldlibs += $(my_cxx_ldlibs) | 1604 | my_ldlibs += $(my_cxx_ldlibs) |
1738 | 1605 | ||
1606 | ########################################################### | ||
1607 | ## Define PRIVATE_ variables from global vars | ||
1608 | ########################################################### | ||
1609 | ifndef LOCAL_IS_HOST_MODULE | ||
1610 | ifdef LOCAL_USE_VNDK | ||
1611 | my_target_global_c_includes := \ | ||
1612 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_INCLUDES) | ||
1613 | my_target_global_c_system_includes := \ | ||
1614 | $(TARGET_OUT_HEADERS) \ | ||
1615 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_SYSTEM_INCLUDES) | ||
1616 | else ifdef LOCAL_SDK_VERSION | ||
1617 | my_target_global_c_includes := | ||
1618 | my_target_global_c_system_includes := $(my_ndk_stl_include_path) $(my_ndk_sysroot_include) | ||
1619 | else ifdef BOARD_VNDK_VERSION | ||
1620 | my_target_global_c_includes := $(SRC_HEADERS) \ | ||
1621 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_INCLUDES) \ | ||
1622 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_INCLUDES) | ||
1623 | my_target_global_c_system_includes := $(SRC_SYSTEM_HEADERS) \ | ||
1624 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_SYSTEM_INCLUDES) \ | ||
1625 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_SYSTEM_INCLUDES) | ||
1626 | else | ||
1627 | my_target_global_c_includes := $(SRC_HEADERS) \ | ||
1628 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_INCLUDES) \ | ||
1629 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_INCLUDES) | ||
1630 | my_target_global_c_system_includes := $(SRC_SYSTEM_HEADERS) $(TARGET_OUT_HEADERS) \ | ||
1631 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_SYSTEM_INCLUDES) \ | ||
1632 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_SYSTEM_INCLUDES) | ||
1633 | endif | ||
1634 | |||
1635 | my_target_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CFLAGS) | ||
1636 | my_target_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CONLYFLAGS) $(my_c_std_conlyflags) | ||
1637 | my_target_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CPPFLAGS) $(my_cpp_std_cppflags) | ||
1638 | ifeq ($(my_use_clang_lld),true) | ||
1639 | my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LLDFLAGS) | ||
1640 | include $(BUILD_SYSTEM)/pack_dyn_relocs_setup.mk | ||
1641 | ifeq ($(my_pack_module_relocations),false) | ||
1642 | my_target_global_ldflags += -Wl,--pack-dyn-relocs=none | ||
1643 | endif | ||
1644 | else | ||
1645 | my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LDFLAGS) | ||
1646 | endif # my_use_clang_lld | ||
1647 | |||
1648 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_INCLUDES := $(my_target_global_c_includes) | ||
1649 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_SYSTEM_INCLUDES := $(my_target_global_c_system_includes) | ||
1650 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CFLAGS := $(my_target_global_cflags) | ||
1651 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CONLYFLAGS := $(my_target_global_conlyflags) | ||
1652 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CPPFLAGS := $(my_target_global_cppflags) | ||
1653 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_LDFLAGS := $(my_target_global_ldflags) | ||
1654 | |||
1655 | else # LOCAL_IS_HOST_MODULE | ||
1656 | |||
1657 | my_host_global_c_includes := $(SRC_HEADERS) \ | ||
1658 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_INCLUDES) | ||
1659 | my_host_global_c_system_includes := $(SRC_SYSTEM_HEADERS) \ | ||
1660 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_SYSTEM_INCLUDES) | ||
1661 | |||
1662 | my_host_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CFLAGS) | ||
1663 | my_host_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CONLYFLAGS) $(my_c_std_conlyflags) | ||
1664 | my_host_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CPPFLAGS) $(my_cpp_std_cppflags) | ||
1665 | ifeq ($(my_use_clang_lld),true) | ||
1666 | my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LLDFLAGS) | ||
1667 | else | ||
1668 | my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LDFLAGS) | ||
1669 | endif # my_use_clang_lld | ||
1670 | |||
1671 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_INCLUDES := $(my_host_global_c_includes) | ||
1672 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_SYSTEM_INCLUDES := $(my_host_global_c_system_includes) | ||
1673 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CFLAGS := $(my_host_global_cflags) | ||
1674 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CONLYFLAGS := $(my_host_global_conlyflags) | ||
1675 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CPPFLAGS := $(my_host_global_cppflags) | ||
1676 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_LDFLAGS := $(my_host_global_ldflags) | ||
1677 | endif # LOCAL_IS_HOST_MODULE | ||
1678 | |||
1679 | # To enable coverage for a given module, set LOCAL_NATIVE_COVERAGE=true and | ||
1680 | # build with NATIVE_COVERAGE=true in your enviornment. | ||
1681 | ifeq ($(NATIVE_COVERAGE),true) | ||
1682 | ifeq ($(my_native_coverage),true) | ||
1683 | # Note that clang coverage doesn't play nicely with acov out of the box. | ||
1684 | # Clang apparently generates .gcno files that aren't compatible with | ||
1685 | # gcov-4.8. This can be solved by installing gcc-4.6 and invoking lcov | ||
1686 | # with `--gcov-tool /usr/bin/gcov-4.6`. | ||
1687 | # | ||
1688 | # http://stackoverflow.com/questions/17758126/clang-code-coverage-invalid-output | ||
1689 | my_cflags += --coverage -O0 | ||
1690 | my_ldflags += --coverage | ||
1691 | endif | ||
1692 | |||
1693 | my_coverage_lib := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)LIBPROFILE_RT) | ||
1694 | |||
1695 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_COVERAGE_LIB := $(my_coverage_lib) | ||
1696 | $(LOCAL_INTERMEDIATE_TARGETS): $(my_coverage_lib) | ||
1697 | endif | ||
1698 | |||
1699 | ########################################################### | ||
1700 | ## Define PRIVATE_ variables used by multiple module types | ||
1701 | ########################################################### | ||
1702 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_NO_DEFAULT_COMPILER_FLAGS := \ | ||
1703 | $(strip $(LOCAL_NO_DEFAULT_COMPILER_FLAGS)) | ||
1704 | |||
1705 | ifeq ($(strip $(WITH_STATIC_ANALYZER)),) | ||
1706 | LOCAL_NO_STATIC_ANALYZER := true | ||
1707 | endif | ||
1708 | |||
1709 | ifneq ($(strip $(LOCAL_IS_HOST_MODULE)),) | ||
1710 | my_syntax_arch := host | ||
1711 | else | ||
1712 | my_syntax_arch := $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) | ||
1713 | endif | ||
1714 | |||
1715 | ifeq ($(strip $(my_cc)),) | ||
1716 | my_cc := $(my_cc_wrapper) $(CLANG) | ||
1717 | endif | ||
1718 | |||
1719 | SYNTAX_TOOLS_PREFIX := \ | ||
1720 | $(LLVM_PREBUILTS_BASE)/$(BUILD_OS)-x86/$(LLVM_PREBUILTS_VERSION)/libexec | ||
1721 | |||
1722 | ifneq ($(LOCAL_NO_STATIC_ANALYZER),true) | ||
1723 | my_cc := CCC_CC=$(CLANG) CLANG=$(CLANG) \ | ||
1724 | $(SYNTAX_TOOLS_PREFIX)/ccc-analyzer | ||
1725 | endif | ||
1726 | |||
1727 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CC := $(my_cc) | ||
1728 | |||
1729 | ifeq ($(strip $(my_cxx)),) | ||
1730 | my_cxx := $(my_cxx_wrapper) $(CLANG_CXX) | ||
1731 | endif | ||
1732 | |||
1733 | ifneq ($(LOCAL_NO_STATIC_ANALYZER),true) | ||
1734 | my_cxx := CCC_CXX=$(CLANG_CXX) CLANG_CXX=$(CLANG_CXX) \ | ||
1735 | $(SYNTAX_TOOLS_PREFIX)/c++-analyzer | ||
1736 | endif | ||
1737 | |||
1738 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_LINKER := $(my_linker) | ||
1739 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CXX := $(my_cxx) | ||
1740 | |||
1739 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_YACCFLAGS := $(LOCAL_YACCFLAGS) | 1741 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_YACCFLAGS := $(LOCAL_YACCFLAGS) |
1740 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASFLAGS := $(my_asflags) | 1742 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASFLAGS := $(my_asflags) |
1741 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CONLYFLAGS := $(my_conlyflags) | 1743 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CONLYFLAGS := $(my_conlyflags) |
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk index c31906a0a..9514edb29 100644 --- a/core/combo/TARGET_linux-arm.mk +++ b/core/combo/TARGET_linux-arm.mk | |||
@@ -34,9 +34,9 @@ TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT := generic | |||
34 | endif | 34 | endif |
35 | 35 | ||
36 | KNOWN_ARMv8_CORES := cortex-a53 cortex-a53.a57 cortex-a55 cortex-a73 cortex-a75 cortex-a76 | 36 | KNOWN_ARMv8_CORES := cortex-a53 cortex-a53.a57 cortex-a55 cortex-a73 cortex-a75 cortex-a76 |
37 | KNOWN_ARMv8_CORES += kryo exynos-m1 exynos-m2 | 37 | KNOWN_ARMv8_CORES += kryo kryo385 exynos-m1 exynos-m2 |
38 | 38 | ||
39 | KNOWN_ARMv82a_CORES := cortex-a55 cortex-a75 | 39 | KNOWN_ARMv82a_CORES := cortex-a55 cortex-a75 kryo385 |
40 | 40 | ||
41 | # Check for cores that implement armv8-2a ISAs. | 41 | # Check for cores that implement armv8-2a ISAs. |
42 | ifneq (,$(filter $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT), $(KNOWN_ARMv82a_CORES))) | 42 | ifneq (,$(filter $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT), $(KNOWN_ARMv82a_CORES))) |
diff --git a/core/config.mk b/core/config.mk index c0a159dce..a3be19441 100644 --- a/core/config.mk +++ b/core/config.mk | |||
@@ -90,6 +90,7 @@ $(KATI_obsolete_var \ | |||
90 | GLOBAL_CFLAGS_NO_OVERRIDE GLOBAL_CPPFLAGS_NO_OVERRIDE \ | 90 | GLOBAL_CFLAGS_NO_OVERRIDE GLOBAL_CPPFLAGS_NO_OVERRIDE \ |
91 | ,GCC support has been removed. Use Clang instead) | 91 | ,GCC support has been removed. Use Clang instead) |
92 | $(KATI_obsolete_var DIST_DIR dist_goal,Use dist-for-goals instead. See $(CHANGES_URL)#dist) | 92 | $(KATI_obsolete_var DIST_DIR dist_goal,Use dist-for-goals instead. See $(CHANGES_URL)#dist) |
93 | $(KATI_deprecated_var USER,Use BUILD_USERNAME instead. See $(CHANGES_URL)#USER) | ||
93 | 94 | ||
94 | # This is marked as obsolete in envsetup.mk after reading the BoardConfig.mk | 95 | # This is marked as obsolete in envsetup.mk after reading the BoardConfig.mk |
95 | $(KATI_deprecate_export It is a global setting. See $(CHANGES_URL)#export_keyword) | 96 | $(KATI_deprecate_export It is a global setting. See $(CHANGES_URL)#export_keyword) |
diff --git a/core/definitions.mk b/core/definitions.mk index a9807f110..d5c7b9113 100644 --- a/core/definitions.mk +++ b/core/definitions.mk | |||
@@ -77,6 +77,9 @@ ALL_FINDBUGS_FILES:= | |||
77 | # GPL module license files | 77 | # GPL module license files |
78 | ALL_GPL_MODULE_LICENSE_FILES:= | 78 | ALL_GPL_MODULE_LICENSE_FILES:= |
79 | 79 | ||
80 | # Packages with certificate violation | ||
81 | CERTIFICATE_VIOLATION_MODULES := | ||
82 | |||
80 | # Target and host installed module's dependencies on shared libraries. | 83 | # Target and host installed module's dependencies on shared libraries. |
81 | # They are list of "<module_name>:<installed_file>:lib1,lib2...". | 84 | # They are list of "<module_name>:<installed_file>:lib1,lib2...". |
82 | TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES := | 85 | TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES := |
diff --git a/core/goma.mk b/core/goma.mk index 3787dfd19..c265259da 100644 --- a/core/goma.mk +++ b/core/goma.mk | |||
@@ -16,41 +16,18 @@ | |||
16 | 16 | ||
17 | # Notice: this works only with Google's Goma build infrastructure. | 17 | # Notice: this works only with Google's Goma build infrastructure. |
18 | ifneq ($(filter-out false,$(USE_GOMA)),) | 18 | ifneq ($(filter-out false,$(USE_GOMA)),) |
19 | # Goma requires a lot of processes and file descriptors. | ||
20 | ifeq ($(shell echo $$(($$(ulimit -u) < 2500 || $$(ulimit -n) < 16000))),1) | ||
21 | $(warning Max user processes and/or open files are insufficient) | ||
22 | ifeq ($(shell uname),Darwin) | ||
23 | $(error See go/ma/how-to-use-goma/how-to-use-goma-for-android to relax the limit) | ||
24 | else | ||
25 | $(error Adjust the limit by ulimit -u and ulimit -n) | ||
26 | endif | ||
27 | endif | ||
28 | |||
29 | ifdef GOMA_DIR | 19 | ifdef GOMA_DIR |
30 | goma_dir := $(GOMA_DIR) | 20 | goma_dir := $(GOMA_DIR) |
31 | else | 21 | else |
32 | goma_dir := $(HOME)/goma | 22 | goma_dir := $(HOME)/goma |
33 | endif | 23 | endif |
34 | goma_ctl := $(goma_dir)/goma_ctl.py | ||
35 | GOMA_CC := $(goma_dir)/gomacc | 24 | GOMA_CC := $(goma_dir)/gomacc |
36 | 25 | ||
37 | $(if $(wildcard $(goma_ctl)),, \ | ||
38 | $(warning You should have goma in $$GOMA_DIR or $(HOME)/goma) \ | ||
39 | $(error See go/ma/how-to-use-goma/how-to-use-goma-for-android for detail)) | ||
40 | |||
41 | # Append gomacc to existing *_WRAPPER variables so it's possible to | 26 | # Append gomacc to existing *_WRAPPER variables so it's possible to |
42 | # use both ccache and gomacc. | 27 | # use both ccache and gomacc. |
43 | CC_WRAPPER := $(strip $(CC_WRAPPER) $(GOMA_CC)) | 28 | CC_WRAPPER := $(strip $(CC_WRAPPER) $(GOMA_CC)) |
44 | CXX_WRAPPER := $(strip $(CXX_WRAPPER) $(GOMA_CC)) | 29 | CXX_WRAPPER := $(strip $(CXX_WRAPPER) $(GOMA_CC)) |
45 | JAVAC_WRAPPER := $(strip $(JAVAC_WRAPPER) $(GOMA_CC)) | 30 | JAVAC_WRAPPER := $(strip $(JAVAC_WRAPPER) $(GOMA_CC)) |
46 | 31 | ||
47 | # gomacc can start goma client's daemon process automatically, but | ||
48 | # it is safer and faster to start up it beforehand. We run this as a | ||
49 | # background process so this won't slow down the build. | ||
50 | ifndef NOSTART_GOMA | ||
51 | $(shell ( $(goma_ctl) ensure_start ) &> /dev/null &) | ||
52 | endif | ||
53 | |||
54 | goma_ctl := | ||
55 | goma_dir := | 32 | goma_dir := |
56 | endif | 33 | endif |
diff --git a/core/main.mk b/core/main.mk index 9fd1c35c5..282821cdb 100644 --- a/core/main.mk +++ b/core/main.mk | |||
@@ -80,7 +80,7 @@ endif | |||
80 | ifeq ($(strip $(HAS_BUILD_NUMBER)),false) | 80 | ifeq ($(strip $(HAS_BUILD_NUMBER)),false) |
81 | # BUILD_NUMBER has a timestamp in it, which means that | 81 | # BUILD_NUMBER has a timestamp in it, which means that |
82 | # it will change every time. Pick a stable value. | 82 | # it will change every time. Pick a stable value. |
83 | FILE_NAME_TAG := eng.$(USER) | 83 | FILE_NAME_TAG := eng.$(BUILD_USERNAME) |
84 | else | 84 | else |
85 | FILE_NAME_TAG := $(file <$(BUILD_NUMBER_FILE)) | 85 | FILE_NAME_TAG := $(file <$(BUILD_NUMBER_FILE)) |
86 | endif | 86 | endif |
@@ -1096,6 +1096,13 @@ ifdef FULL_BUILD | |||
1096 | $(TARGET_OUT_SYSTEM_OTHER)/%.vdex \ | 1096 | $(TARGET_OUT_SYSTEM_OTHER)/%.vdex \ |
1097 | $(TARGET_OUT_SYSTEM_OTHER)/%.art | 1097 | $(TARGET_OUT_SYSTEM_OTHER)/%.art |
1098 | endif | 1098 | endif |
1099 | |||
1100 | CERTIFICATE_VIOLATION_MODULES_FILENAME := $(PRODUCT_OUT)/certificate_violation_modules.txt | ||
1101 | $(CERTIFICATE_VIOLATION_MODULES_FILENAME): | ||
1102 | rm -f $@ | ||
1103 | $(foreach m,$(sort $(CERTIFICATE_VIOLATION_MODULES)), echo $(m) >> $@;) | ||
1104 | $(call dist-for-goals,droidcore,$(CERTIFICATE_VIOLATION_MODULES_FILENAME)) | ||
1105 | |||
1099 | all_offending_files := | 1106 | all_offending_files := |
1100 | $(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\ | 1107 | $(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\ |
1101 | $(eval requirements := $(PRODUCTS.$(makefile).ARTIFACT_PATH_REQUIREMENTS)) \ | 1108 | $(eval requirements := $(PRODUCTS.$(makefile).ARTIFACT_PATH_REQUIREMENTS)) \ |
diff --git a/core/package_internal.mk b/core/package_internal.mk index 75cc547be..c657f2edb 100644 --- a/core/package_internal.mk +++ b/core/package_internal.mk | |||
@@ -535,6 +535,7 @@ endif | |||
535 | ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./) | 535 | ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./) |
536 | LOCAL_CERTIFICATE := $(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))$(LOCAL_CERTIFICATE) | 536 | LOCAL_CERTIFICATE := $(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))$(LOCAL_CERTIFICATE) |
537 | endif | 537 | endif |
538 | include $(BUILD_SYSTEM)/app_certificate_validate.mk | ||
538 | private_key := $(LOCAL_CERTIFICATE).pk8 | 539 | private_key := $(LOCAL_CERTIFICATE).pk8 |
539 | certificate := $(LOCAL_CERTIFICATE).x509.pem | 540 | certificate := $(LOCAL_CERTIFICATE).x509.pem |
540 | additional_certificates := $(foreach c,$(LOCAL_ADDITIONAL_CERTIFICATES), $(c).x509.pem $(c).pk8) | 541 | additional_certificates := $(foreach c,$(LOCAL_ADDITIONAL_CERTIFICATES), $(c).x509.pem $(c).pk8) |
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk index 66913c1ac..960d8d1c5 100644 --- a/core/prebuilt_internal.mk +++ b/core/prebuilt_internal.mk | |||
@@ -306,6 +306,8 @@ else | |||
306 | $(built_module) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem | 306 | $(built_module) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem |
307 | endif | 307 | endif |
308 | 308 | ||
309 | include $(BUILD_SYSTEM)/app_certificate_validate.mk | ||
310 | |||
309 | # Disable dex-preopt of prebuilts to save space, if requested. | 311 | # Disable dex-preopt of prebuilts to save space, if requested. |
310 | ifndef LOCAL_DEX_PREOPT | 312 | ifndef LOCAL_DEX_PREOPT |
311 | ifeq ($(DONT_DEXPREOPT_PREBUILTS),true) | 313 | ifeq ($(DONT_DEXPREOPT_PREBUILTS),true) |
diff --git a/core/product.mk b/core/product.mk index 1420b46e1..2d7ace2fa 100644 --- a/core/product.mk +++ b/core/product.mk | |||
@@ -204,6 +204,8 @@ _product_var_list := \ | |||
204 | PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE \ | 204 | PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE \ |
205 | PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE \ | 205 | PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE \ |
206 | PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS \ | 206 | PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS \ |
207 | PRODUCT_ENFORCE_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT \ | ||
208 | PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT_WHITELIST \ | ||
207 | PRODUCT_ARTIFACT_PATH_REQUIREMENT_HINT \ | 209 | PRODUCT_ARTIFACT_PATH_REQUIREMENT_HINT \ |
208 | PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST \ | 210 | PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST \ |
209 | PRODUCT_USE_DYNAMIC_PARTITION_SIZE \ | 211 | PRODUCT_USE_DYNAMIC_PARTITION_SIZE \ |
diff --git a/core/product_config.mk b/core/product_config.mk index 47b4c7aa0..c58405cb2 100644 --- a/core/product_config.mk +++ b/core/product_config.mk | |||
@@ -367,6 +367,11 @@ PRODUCT_PRODUCT_PROPERTIES := \ | |||
367 | $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_PROPERTIES)) | 367 | $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_PROPERTIES)) |
368 | .KATI_READONLY := PRODUCT_PRODUCT_PROPERTIES | 368 | .KATI_READONLY := PRODUCT_PRODUCT_PROPERTIES |
369 | 369 | ||
370 | ENFORCE_SYSTEM_CERTIFICATE := \ | ||
371 | $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ENFORCE_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT) | ||
372 | |||
373 | ENFORCE_SYSTEM_CERTIFICATE_WHITELIST := \ | ||
374 | $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT_WHITELIST)) | ||
370 | 375 | ||
371 | # A list of property assignments, like "key = value", with zero or more | 376 | # A list of property assignments, like "key = value", with zero or more |
372 | # whitespace characters on either side of the '='. | 377 | # whitespace characters on either side of the '='. |
diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk index 73d934bf9..f7236335b 100644 --- a/core/soong_app_prebuilt.mk +++ b/core/soong_app_prebuilt.mk | |||
@@ -108,7 +108,7 @@ ifdef LOCAL_CERTIFICATE | |||
108 | PACKAGES.$(LOCAL_MODULE).CERTIFICATE := $(LOCAL_CERTIFICATE) | 108 | PACKAGES.$(LOCAL_MODULE).CERTIFICATE := $(LOCAL_CERTIFICATE) |
109 | PACKAGES.$(LOCAL_MODULE).PRIVATE_KEY := $(patsubst %.x509.pem,%.pk8,$(LOCAL_CERTIFICATE)) | 109 | PACKAGES.$(LOCAL_MODULE).PRIVATE_KEY := $(patsubst %.x509.pem,%.pk8,$(LOCAL_CERTIFICATE)) |
110 | endif | 110 | endif |
111 | 111 | include $(BUILD_SYSTEM)/app_certificate_validate.mk | |
112 | PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES)) | 112 | PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES)) |
113 | 113 | ||
114 | ifdef LOCAL_SOONG_BUNDLE | 114 | ifdef LOCAL_SOONG_BUNDLE |
diff --git a/core/soong_config.mk b/core/soong_config.mk index 31c77d4b8..58e1a03ae 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk | |||
@@ -146,6 +146,9 @@ $(call add_json_str, DexpreoptGlobalConfig, $(DEX_PREOPT_CONFIG)) | |||
146 | 146 | ||
147 | $(call add_json_list, ManifestPackageNameOverrides, $(PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES)) | 147 | $(call add_json_list, ManifestPackageNameOverrides, $(PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES)) |
148 | 148 | ||
149 | $(call add_json_bool, EnforceSystemCertificate, $(ENFORCE_SYSTEM_CERTIFICATE)) | ||
150 | $(call add_json_list, EnforceSystemCertificateWhitelist, $(ENFORCE_SYSTEM_CERTIFICATE_WHITELIST)) | ||
151 | |||
149 | $(call add_json_map, VendorVars) | 152 | $(call add_json_map, VendorVars) |
150 | $(foreach namespace,$(SOONG_CONFIG_NAMESPACES),\ | 153 | $(foreach namespace,$(SOONG_CONFIG_NAMESPACES),\ |
151 | $(call add_json_map, $(namespace))\ | 154 | $(call add_json_map, $(namespace))\ |
diff --git a/core/version_defaults.mk b/core/version_defaults.mk index 0fd40db12..c4f9a5229 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk | |||
@@ -314,7 +314,7 @@ ifndef BUILD_NUMBER | |||
314 | # If no BUILD_NUMBER is set, create a useful "I am an engineering build | 314 | # If no BUILD_NUMBER is set, create a useful "I am an engineering build |
315 | # from this date/time" value. Make it start with a non-digit so that | 315 | # from this date/time" value. Make it start with a non-digit so that |
316 | # anyone trying to parse it as an integer will probably get "0". | 316 | # anyone trying to parse it as an integer will probably get "0". |
317 | BUILD_NUMBER := eng.$(shell echo $${USER:0:6}).$(shell $(DATE) +%Y%m%d.%H%M%S) | 317 | BUILD_NUMBER := eng.$(shell echo $${BUILD_USERNAME:0:6}).$(shell $(DATE) +%Y%m%d.%H%M%S) |
318 | HAS_BUILD_NUMBER := false | 318 | HAS_BUILD_NUMBER := false |
319 | endif | 319 | endif |
320 | .KATI_READONLY := BUILD_NUMBER HAS_BUILD_NUMBER | 320 | .KATI_READONLY := BUILD_NUMBER HAS_BUILD_NUMBER |
diff --git a/envsetup.sh b/envsetup.sh index 62a64b605..c4c4972c5 100644 --- a/envsetup.sh +++ b/envsetup.sh | |||
@@ -1711,6 +1711,8 @@ function acloud() | |||
1711 | case $host_os_arch in | 1711 | case $host_os_arch in |
1712 | linux-x86) "$(gettop)"/prebuilts/asuite/acloud/linux-x86/acloud "$@" | 1712 | linux-x86) "$(gettop)"/prebuilts/asuite/acloud/linux-x86/acloud "$@" |
1713 | ;; | 1713 | ;; |
1714 | darwin-x86) "$(gettop)"/prebuilts/asuite/acloud/darwin-x86/acloud "$@" | ||
1715 | ;; | ||
1714 | *) | 1716 | *) |
1715 | echo "acloud is not supported on your host arch: $host_os_arch" | 1717 | echo "acloud is not supported on your host arch: $host_os_arch" |
1716 | ;; | 1718 | ;; |
diff --git a/target/board/generic_arm64/BoardConfig.mk b/target/board/generic_arm64/BoardConfig.mk index 1b6429c31..3331d1827 100644 --- a/target/board/generic_arm64/BoardConfig.mk +++ b/target/board/generic_arm64/BoardConfig.mk | |||
@@ -23,7 +23,7 @@ TARGET_2ND_ARCH := arm | |||
23 | TARGET_2ND_CPU_ABI := armeabi-v7a | 23 | TARGET_2ND_CPU_ABI := armeabi-v7a |
24 | TARGET_2ND_CPU_ABI2 := armeabi | 24 | TARGET_2ND_CPU_ABI2 := armeabi |
25 | 25 | ||
26 | ifneq ($(TARGET_BUILD_APPS)$(filter cts vts sdk,$(MAKECMDGOALS)),) | 26 | ifneq ($(TARGET_BUILD_APPS)$(filter cts sdk vts,$(MAKECMDGOALS)),) |
27 | # DO NOT USE | 27 | # DO NOT USE |
28 | # DO NOT USE | 28 | # DO NOT USE |
29 | # | 29 | # |
@@ -41,7 +41,11 @@ ifneq ($(TARGET_BUILD_APPS)$(filter cts vts sdk,$(MAKECMDGOALS)),) | |||
41 | # | 41 | # |
42 | # DO NOT USE | 42 | # DO NOT USE |
43 | # DO NOT USE | 43 | # DO NOT USE |
44 | ifneq ($(filter cts sdk vts,$(MAKECMDGOALS)),) | ||
45 | TARGET_2ND_ARCH_VARIANT := armv7-a-neon | ||
46 | else | ||
44 | TARGET_2ND_ARCH_VARIANT := armv7-a | 47 | TARGET_2ND_ARCH_VARIANT := armv7-a |
48 | endif | ||
45 | # DO NOT USE | 49 | # DO NOT USE |
46 | # DO NOT USE | 50 | # DO NOT USE |
47 | TARGET_2ND_CPU_VARIANT := generic | 51 | TARGET_2ND_CPU_VARIANT := generic |
diff --git a/target/product/base_system.mk b/target/product/base_system.mk index 63db56425..7c3ac3b3d 100644 --- a/target/product/base_system.mk +++ b/target/product/base_system.mk | |||
@@ -118,14 +118,14 @@ PRODUCT_PACKAGES += \ | |||
118 | libaudioutils \ | 118 | libaudioutils \ |
119 | libbinder \ | 119 | libbinder \ |
120 | libbinder_ndk \ | 120 | libbinder_ndk \ |
121 | libc \ | 121 | libc.bootstrap \ |
122 | libcamera2ndk \ | 122 | libcamera2ndk \ |
123 | libcamera_client \ | 123 | libcamera_client \ |
124 | libcameraservice \ | 124 | libcameraservice \ |
125 | libc_malloc_debug \ | 125 | libc_malloc_debug \ |
126 | libc_malloc_hooks \ | 126 | libc_malloc_hooks \ |
127 | libcutils \ | 127 | libcutils \ |
128 | libdl \ | 128 | libdl.bootstrap \ |
129 | libdrmframework \ | 129 | libdrmframework \ |
130 | libdrmframework_jni \ | 130 | libdrmframework_jni \ |
131 | libEGL \ | 131 | libEGL \ |
@@ -145,7 +145,7 @@ PRODUCT_PACKAGES += \ | |||
145 | libjnigraphics \ | 145 | libjnigraphics \ |
146 | libjpeg \ | 146 | libjpeg \ |
147 | liblog \ | 147 | liblog \ |
148 | libm \ | 148 | libm.bootstrap \ |
149 | libmdnssd \ | 149 | libmdnssd \ |
150 | libmedia \ | 150 | libmedia \ |
151 | libmedia_jni \ | 151 | libmedia_jni \ |
diff --git a/target/product/handheld_system.mk b/target/product/handheld_system.mk index acafe802d..0a763fb2a 100644 --- a/target/product/handheld_system.mk +++ b/target/product/handheld_system.mk | |||
@@ -46,7 +46,6 @@ PRODUCT_PACKAGES += \ | |||
46 | DocumentsUI \ | 46 | DocumentsUI \ |
47 | DownloadProviderUi \ | 47 | DownloadProviderUi \ |
48 | EasterEgg \ | 48 | EasterEgg \ |
49 | ExactCalculator \ | ||
50 | ExternalStorageProvider \ | 49 | ExternalStorageProvider \ |
51 | FusedLocation \ | 50 | FusedLocation \ |
52 | InputDevices \ | 51 | InputDevices \ |
@@ -86,4 +85,3 @@ PRODUCT_PROPERTY_OVERRIDES += \ | |||
86 | ro.carrier=unknown \ | 85 | ro.carrier=unknown \ |
87 | ro.config.notification_sound=OnTheHunt.ogg \ | 86 | ro.config.notification_sound=OnTheHunt.ogg \ |
88 | ro.config.alarm_alert=Alarm_Classic.ogg | 87 | ro.config.alarm_alert=Alarm_Classic.ogg |
89 | |||
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh index b76c08954..7286f95b3 100755 --- a/tools/buildinfo.sh +++ b/tools/buildinfo.sh | |||
@@ -18,8 +18,8 @@ echo "ro.build.version.min_supported_target_sdk=$PLATFORM_MIN_SUPPORTED_TARGET_S | |||
18 | echo "ro.build.date=`$DATE`" | 18 | echo "ro.build.date=`$DATE`" |
19 | echo "ro.build.date.utc=`$DATE +%s`" | 19 | echo "ro.build.date.utc=`$DATE +%s`" |
20 | echo "ro.build.type=$TARGET_BUILD_TYPE" | 20 | echo "ro.build.type=$TARGET_BUILD_TYPE" |
21 | echo "ro.build.user=$USER" | 21 | echo "ro.build.user=$BUILD_USERNAME" |
22 | echo "ro.build.host=`hostname`" | 22 | echo "ro.build.host=$BUILD_HOSTNAME" |
23 | echo "ro.build.tags=$BUILD_VERSION_TAGS" | 23 | echo "ro.build.tags=$BUILD_VERSION_TAGS" |
24 | echo "ro.build.flavor=$TARGET_BUILD_FLAVOR" | 24 | echo "ro.build.flavor=$TARGET_BUILD_FLAVOR" |
25 | if [ -n "$BOARD_BUILD_SYSTEM_ROOT_IMAGE" ] ; then | 25 | if [ -n "$BOARD_BUILD_SYSTEM_ROOT_IMAGE" ] ; then |
diff --git a/tools/releasetools/OWNERS b/tools/releasetools/OWNERS index 39448cf66..766adb4e5 100644 --- a/tools/releasetools/OWNERS +++ b/tools/releasetools/OWNERS | |||
@@ -1 +1,2 @@ | |||
1 | tbao@google.com | 1 | tbao@google.com |
2 | xunchang@google.com | ||
diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py index d71060394..521b319ed 100755 --- a/tools/releasetools/build_image.py +++ b/tools/releasetools/build_image.py | |||
@@ -79,22 +79,26 @@ def GetInodeUsage(path): | |||
79 | return output.count('\n') * 2 | 79 | return output.count('\n') * 2 |
80 | 80 | ||
81 | 81 | ||
82 | def GetFilesystemCharacteristics(sparse_image_path): | 82 | def GetFilesystemCharacteristics(image_path, sparse_image=True): |
83 | """Returns various filesystem characteristics of "sparse_image_path". | 83 | """Returns various filesystem characteristics of "image_path". |
84 | 84 | ||
85 | Args: | 85 | Args: |
86 | sparse_image_path: The file to analyze. | 86 | image_path: The file to analyze. |
87 | sparse_image: Image is sparse | ||
87 | 88 | ||
88 | Returns: | 89 | Returns: |
89 | The characteristics dictionary. | 90 | The characteristics dictionary. |
90 | """ | 91 | """ |
91 | unsparse_image_path = UnsparseImage(sparse_image_path, replace=False) | 92 | unsparse_image_path = image_path |
93 | if sparse_image: | ||
94 | unsparse_image_path = UnsparseImage(image_path, replace=False) | ||
92 | 95 | ||
93 | cmd = ["tune2fs", "-l", unsparse_image_path] | 96 | cmd = ["tune2fs", "-l", unsparse_image_path] |
94 | try: | 97 | try: |
95 | output = common.RunAndCheckOutput(cmd, verbose=False) | 98 | output = common.RunAndCheckOutput(cmd, verbose=False) |
96 | finally: | 99 | finally: |
97 | os.remove(unsparse_image_path) | 100 | if sparse_image: |
101 | os.remove(unsparse_image_path) | ||
98 | fs_dict = {} | 102 | fs_dict = {} |
99 | for line in output.splitlines(): | 103 | for line in output.splitlines(): |
100 | fields = line.split(":") | 104 | fields = line.split(":") |
@@ -280,6 +284,7 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config): | |||
280 | build_command.extend(["-S", prop_dict["hash_seed"]]) | 284 | build_command.extend(["-S", prop_dict["hash_seed"]]) |
281 | if "ext4_share_dup_blocks" in prop_dict: | 285 | if "ext4_share_dup_blocks" in prop_dict: |
282 | build_command.append("-c") | 286 | build_command.append("-c") |
287 | build_command.extend(["--inode_size", "256"]) | ||
283 | if "selinux_fc" in prop_dict: | 288 | if "selinux_fc" in prop_dict: |
284 | build_command.append(prop_dict["selinux_fc"]) | 289 | build_command.append(prop_dict["selinux_fc"]) |
285 | elif fs_type.startswith("squash"): | 290 | elif fs_type.startswith("squash"): |
@@ -413,7 +418,10 @@ def BuildImage(in_dir, prop_dict, out_file, target_out=None): | |||
413 | "First Pass based on estimates of %d MB and %s inodes.", | 418 | "First Pass based on estimates of %d MB and %s inodes.", |
414 | size // BYTES_IN_MB, prop_dict["extfs_inode_count"]) | 419 | size // BYTES_IN_MB, prop_dict["extfs_inode_count"]) |
415 | BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config) | 420 | BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config) |
416 | fs_dict = GetFilesystemCharacteristics(out_file) | 421 | sparse_image = False |
422 | if "extfs_sparse_flag" in prop_dict: | ||
423 | sparse_image = True | ||
424 | fs_dict = GetFilesystemCharacteristics(out_file, sparse_image) | ||
417 | os.remove(out_file) | 425 | os.remove(out_file) |
418 | block_size = int(fs_dict.get("Block size", "4096")) | 426 | block_size = int(fs_dict.get("Block size", "4096")) |
419 | free_size = int(fs_dict.get("Free blocks", "0")) * block_size | 427 | free_size = int(fs_dict.get("Free blocks", "0")) * block_size |
@@ -427,16 +435,21 @@ def BuildImage(in_dir, prop_dict, out_file, target_out=None): | |||
427 | else: | 435 | else: |
428 | size -= free_size | 436 | size -= free_size |
429 | size += reserved_size | 437 | size += reserved_size |
438 | if reserved_size == 0: | ||
439 | # add .2% margin | ||
440 | size = size * 1002 // 1000 | ||
441 | # Use a minimum size, otherwise we will fail to calculate an AVB footer | ||
442 | # or fail to construct an ext4 image. | ||
443 | size = max(size, 256 * 1024) | ||
430 | if block_size <= 4096: | 444 | if block_size <= 4096: |
431 | size = common.RoundUpTo4K(size) | 445 | size = common.RoundUpTo4K(size) |
432 | else: | 446 | else: |
433 | size = ((size + block_size - 1) // block_size) * block_size | 447 | size = ((size + block_size - 1) // block_size) * block_size |
434 | # Use a minimum size, otherwise we will fail to calculate an AVB footer | ||
435 | # or fail to construct an ext4 image. | ||
436 | size = max(size, 256 * 1024) | ||
437 | extfs_inode_count = prop_dict["extfs_inode_count"] | 448 | extfs_inode_count = prop_dict["extfs_inode_count"] |
438 | inodes = int(fs_dict.get("Inode count", extfs_inode_count)) | 449 | inodes = int(fs_dict.get("Inode count", extfs_inode_count)) |
439 | inodes -= int(fs_dict.get("Free inodes", "0")) | 450 | inodes -= int(fs_dict.get("Free inodes", "0")) |
451 | # add .2% margin | ||
452 | inodes = inodes * 1002 // 1000 | ||
440 | prop_dict["extfs_inode_count"] = str(inodes) | 453 | prop_dict["extfs_inode_count"] = str(inodes) |
441 | prop_dict["partition_size"] = str(size) | 454 | prop_dict["partition_size"] = str(size) |
442 | logger.info( | 455 | logger.info( |
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index de3ead61c..a07f67fd4 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py | |||
@@ -309,6 +309,10 @@ def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info, | |||
309 | if filename.startswith("IMAGES/"): | 309 | if filename.startswith("IMAGES/"): |
310 | continue | 310 | continue |
311 | 311 | ||
312 | # Skip split super images, which will be re-generated during signing. | ||
313 | if filename.startswith("OTA/") and filename.endswith(".img"): | ||
314 | continue | ||
315 | |||
312 | data = input_tf_zip.read(filename) | 316 | data = input_tf_zip.read(filename) |
313 | out_info = copy.copy(info) | 317 | out_info = copy.copy(info) |
314 | (is_apk, is_compressed, should_be_skipped) = GetApkFileInfo( | 318 | (is_apk, is_compressed, should_be_skipped) = GetApkFileInfo( |