Loading core/Makefile +9 −39 Original line number Original line Diff line number Diff line Loading @@ -975,12 +975,10 @@ INTERNAL_BOOTIMAGE_ARGS := \ # TODO(b/229701033): clean up BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK. # TODO(b/229701033): clean up BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK. ifneq ($(BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK),true) ifneq ($(BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK),true) ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) ifneq ($(BUILDING_INIT_BOOT_IMAGE),true) ifneq ($(BUILDING_INIT_BOOT_IMAGE),true) INTERNAL_BOOTIMAGE_ARGS += --ramdisk $(INSTALLED_RAMDISK_TARGET) INTERNAL_BOOTIMAGE_ARGS += --ramdisk $(INSTALLED_RAMDISK_TARGET) endif endif endif endif endif ifndef BUILDING_VENDOR_BOOT_IMAGE ifndef BUILDING_VENDOR_BOOT_IMAGE ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG Loading @@ -990,9 +988,6 @@ endif INTERNAL_BOOTIMAGE_FILES := $(filter-out --%,$(INTERNAL_BOOTIMAGE_ARGS)) INTERNAL_BOOTIMAGE_FILES := $(filter-out --%,$(INTERNAL_BOOTIMAGE_ARGS)) # TODO(b/241346584) Remove this when BOARD_BUILD_SYSTEM_ROOT_IMAGE is deprecated INTERNAL_KERNEL_CMDLINE := $(strip $(INTERNAL_KERNEL_CMDLINE) buildvariant=$(TARGET_BUILD_VARIANT)) # kernel cmdline/base/pagesize in boot. # kernel cmdline/base/pagesize in boot. # - If using GKI, use GENERIC_KERNEL_CMDLINE. Remove kernel base and pagesize because they are # - If using GKI, use GENERIC_KERNEL_CMDLINE. Remove kernel base and pagesize because they are # device-specific. # device-specific. Loading Loading @@ -1989,8 +1984,6 @@ $(if $(BOARD_AVB_ENABLE),\ $(hide) echo "avb_system_dlkm_rollback_index_location=$(BOARD_SYSTEM_SYSTEM_DLKM_ROLLBACK_INDEX_LOCATION)" >> $(1))) $(hide) echo "avb_system_dlkm_rollback_index_location=$(BOARD_SYSTEM_SYSTEM_DLKM_ROLLBACK_INDEX_LOCATION)" >> $(1))) $(if $(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)),\ $(if $(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)),\ $(hide) echo "recovery_as_boot=true" >> $(1)) $(hide) echo "recovery_as_boot=true" >> $(1)) $(if $(filter true,$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)),\ $(hide) echo "system_root_image=true" >> $(1)) $(if $(filter true,$(BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK)),\ $(if $(filter true,$(BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK)),\ $(hide) echo "gki_boot_image_without_ramdisk=true" >> $(1)) $(hide) echo "gki_boot_image_without_ramdisk=true" >> $(1)) $(hide) echo "root_dir=$(TARGET_ROOT_OUT)" >> $(1) $(hide) echo "root_dir=$(TARGET_ROOT_OUT)" >> $(1) Loading Loading @@ -2267,20 +2260,18 @@ endif # (BOARD_USES_FULL_RECOVERY_IMAGE = true); # (BOARD_USES_FULL_RECOVERY_IMAGE = true); # b) We build a single image that contains boot and recovery both - no recovery image to install # b) We build a single image that contains boot and recovery both - no recovery image to install # (BOARD_USES_RECOVERY_AS_BOOT = true); # (BOARD_USES_RECOVERY_AS_BOOT = true); # c) We mount the system image as / and therefore do not have a ramdisk in boot.img # c) We include the recovery DTBO image within recovery - not needing the resource file as we # (BOARD_BUILD_SYSTEM_ROOT_IMAGE = true). # d) We include the recovery DTBO image within recovery - not needing the resource file as we # do bsdiff because boot and recovery will contain different number of entries # do bsdiff because boot and recovery will contain different number of entries # (BOARD_INCLUDE_RECOVERY_DTBO = true). # (BOARD_INCLUDE_RECOVERY_DTBO = true). # e) We include the recovery ACPIO image within recovery - not needing the resource file as we # d) We include the recovery ACPIO image within recovery - not needing the resource file as we # do bsdiff because boot and recovery will contain different number of entries # do bsdiff because boot and recovery will contain different number of entries # (BOARD_INCLUDE_RECOVERY_ACPIO = true). # (BOARD_INCLUDE_RECOVERY_ACPIO = true). # f) We build a single image that contains vendor_boot and recovery both - no recovery image to # e) We build a single image that contains vendor_boot and recovery both - no recovery image to # install # install # (BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT = true). # (BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT = true). ifeq (,$(filter true, $(BOARD_USES_FULL_RECOVERY_IMAGE) $(BOARD_USES_RECOVERY_AS_BOOT) \ ifeq (,$(filter true, $(BOARD_USES_FULL_RECOVERY_IMAGE) $(BOARD_USES_RECOVERY_AS_BOOT) \ $(BOARD_BUILD_SYSTEM_ROOT_IMAGE) $(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO) \ $(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO) \ $(BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT))) $(BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT))) # Named '.dat' so we don't attempt to use imgdiff for patching it. # Named '.dat' so we don't attempt to use imgdiff for patching it. RECOVERY_RESOURCE_ZIP := $(TARGET_OUT_VENDOR)/etc/recovery-resource.dat RECOVERY_RESOURCE_ZIP := $(TARGET_OUT_VENDOR)/etc/recovery-resource.dat Loading Loading @@ -2402,8 +2393,7 @@ $(INTERNAL_RECOVERY_RAMDISK_FILES_TIMESTAMP): $(MKBOOTFS) $(COMPRESSION_COMMAND_ # Use rsync because "cp -Rf" fails to overwrite broken symlinks on Mac. # Use rsync because "cp -Rf" fails to overwrite broken symlinks on Mac. rsync -a --exclude=sdcard $(IGNORE_RECOVERY_SEPOLICY) $(IGNORE_CACHE_LINK) $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT) rsync -a --exclude=sdcard $(IGNORE_RECOVERY_SEPOLICY) $(IGNORE_CACHE_LINK) $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT) # Modifying ramdisk contents... # Modifying ramdisk contents... $(if $(filter true,$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)),, \ ln -sf /system/bin/init $(TARGET_RECOVERY_ROOT_OUT)/init ln -sf /system/bin/init $(TARGET_RECOVERY_ROOT_OUT)/init) # Removes $(TARGET_RECOVERY_ROOT_OUT)/init*.rc EXCEPT init.recovery*.rc. # Removes $(TARGET_RECOVERY_ROOT_OUT)/init*.rc EXCEPT init.recovery*.rc. find $(TARGET_RECOVERY_ROOT_OUT) -maxdepth 1 -name 'init*.rc' -type f -not -name "init.recovery.*.rc" | xargs rm -f find $(TARGET_RECOVERY_ROOT_OUT) -maxdepth 1 -name 'init*.rc' -type f -not -name "init.recovery.*.rc" | xargs rm -f cp $(TARGET_ROOT_OUT)/init.recovery.*.rc $(TARGET_RECOVERY_ROOT_OUT)/ 2> /dev/null || true # Ignore error when the src file doesn't exist. cp $(TARGET_ROOT_OUT)/init.recovery.*.rc $(TARGET_RECOVERY_ROOT_OUT)/ 2> /dev/null || true # Ignore error when the src file doesn't exist. Loading Loading @@ -3156,7 +3146,7 @@ INSTALLED_SYSTEMIMAGE := $(INSTALLED_SYSTEMIMAGE_TARGET) ifneq ($(INSTALLED_BOOTIMAGE_TARGET),) ifneq ($(INSTALLED_BOOTIMAGE_TARGET),) ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),) ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),) ifneq ($(BOARD_USES_FULL_RECOVERY_IMAGE),true) ifneq ($(BOARD_USES_FULL_RECOVERY_IMAGE),true) ifneq (,$(filter true, $(BOARD_BUILD_SYSTEM_ROOT_IMAGE) $(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO))) ifneq (,$(filter true,$(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO))) diff_tool := $(HOST_OUT_EXECUTABLES)/bsdiff diff_tool := $(HOST_OUT_EXECUTABLES)/bsdiff else else diff_tool := $(HOST_OUT_EXECUTABLES)/imgdiff diff_tool := $(HOST_OUT_EXECUTABLES)/imgdiff Loading Loading @@ -4357,18 +4347,6 @@ $(foreach partition,$(BOARD_CUSTOMIMAGES_PARTITION_LIST), \ $(eval $(call check-and-set-custom-avb-chain-args,$(partition)))) $(eval $(call check-and-set-custom-avb-chain-args,$(partition)))) endif endif # Add kernel cmdline descriptor for kernel to mount system.img as root with # dm-verity. This works when system.img is either chained or not-chained: # - chained: The --setup_as_rootfs_from_kernel option will add dm-verity kernel # cmdline descriptor to system.img # - not-chained: The --include_descriptors_from_image option for make_vbmeta_image # will include the kernel cmdline descriptor from system.img into vbmeta.img ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) ifeq ($(filter system, $(BOARD_SUPER_PARTITION_PARTITION_LIST)),) BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS += --setup_as_rootfs_from_kernel endif endif BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --padding_size 4096 BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --padding_size 4096 BOARD_AVB_MAKE_VBMETA_SYSTEM_IMAGE_ARGS += --padding_size 4096 BOARD_AVB_MAKE_VBMETA_SYSTEM_IMAGE_ARGS += --padding_size 4096 BOARD_AVB_MAKE_VBMETA_VENDOR_IMAGE_ARGS += --padding_size 4096 BOARD_AVB_MAKE_VBMETA_VENDOR_IMAGE_ARGS += --padding_size 4096 Loading Loading @@ -5727,10 +5705,8 @@ endif # INSTALLED_RECOVERYIMAGE_TARGET defined or BOARD_USES_RECOVERY_AS_BOOT is $(TARGET_ROOT_OUT),$(zip_root)/ROOT) $(TARGET_ROOT_OUT),$(zip_root)/ROOT) @# If we are using recovery as boot, this is already done when processing recovery. @# If we are using recovery as boot, this is already done when processing recovery. ifneq ($(BOARD_USES_RECOVERY_AS_BOOT),true) ifneq ($(BOARD_USES_RECOVERY_AS_BOOT),true) ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) $(hide) $(call package_files-copy-root, \ $(hide) $(call package_files-copy-root, \ $(TARGET_RAMDISK_OUT),$(zip_root)/BOOT/RAMDISK) $(TARGET_RAMDISK_OUT),$(zip_root)/BOOT/RAMDISK) endif ifdef INSTALLED_KERNEL_TARGET ifdef INSTALLED_KERNEL_TARGET $(hide) cp $(INSTALLED_KERNEL_TARGET) $(zip_root)/BOOT/ $(hide) cp $(INSTALLED_KERNEL_TARGET) $(zip_root)/BOOT/ endif endif Loading Loading @@ -6036,10 +6012,8 @@ ifdef BUILDING_SYSTEM_DLKM_IMAGE endif endif @# ROOT always contains the files for the root under normal boot. @# ROOT always contains the files for the root under normal boot. $(hide) $(call fs_config,$(zip_root)/ROOT,) > $(zip_root)/META/root_filesystem_config.txt $(hide) $(call fs_config,$(zip_root)/ROOT,) > $(zip_root)/META/root_filesystem_config.txt ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true) @# BOOT/RAMDISK contains the first stage and recovery ramdisk. @# BOOT/RAMDISK exists and contains the ramdisk for recovery if using BOARD_USES_RECOVERY_AS_BOOT. $(hide) $(call fs_config,$(zip_root)/BOOT/RAMDISK,) > $(zip_root)/META/boot_filesystem_config.txt $(hide) $(call fs_config,$(zip_root)/BOOT/RAMDISK,) > $(zip_root)/META/boot_filesystem_config.txt endif ifdef BUILDING_INIT_BOOT_IMAGE ifdef BUILDING_INIT_BOOT_IMAGE $(hide) $(call package_files-copy-root, $(TARGET_RAMDISK_OUT),$(zip_root)/INIT_BOOT/RAMDISK) $(hide) $(call package_files-copy-root, $(TARGET_RAMDISK_OUT),$(zip_root)/INIT_BOOT/RAMDISK) $(hide) $(call fs_config,$(zip_root)/INIT_BOOT/RAMDISK,) > $(zip_root)/META/init_boot_filesystem_config.txt $(hide) $(call fs_config,$(zip_root)/INIT_BOOT/RAMDISK,) > $(zip_root)/META/init_boot_filesystem_config.txt Loading @@ -6050,10 +6024,6 @@ endif # BUILDING_INIT_BOOT_IMAGE ifneq ($(INSTALLED_VENDOR_BOOTIMAGE_TARGET),) ifneq ($(INSTALLED_VENDOR_BOOTIMAGE_TARGET),) $(call fs_config,$(zip_root)/VENDOR_BOOT/RAMDISK,) > $(zip_root)/META/vendor_boot_filesystem_config.txt $(call fs_config,$(zip_root)/VENDOR_BOOT/RAMDISK,) > $(zip_root)/META/vendor_boot_filesystem_config.txt endif endif ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) @# BOOT/RAMDISK also exists and contains the first stage ramdisk if not using BOARD_BUILD_SYSTEM_ROOT_IMAGE. $(hide) $(call fs_config,$(zip_root)/BOOT/RAMDISK,) > $(zip_root)/META/boot_filesystem_config.txt endif ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),) ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),) $(hide) $(call fs_config,$(zip_root)/RECOVERY/RAMDISK,) > $(zip_root)/META/recovery_filesystem_config.txt $(hide) $(call fs_config,$(zip_root)/RECOVERY/RAMDISK,) > $(zip_root)/META/recovery_filesystem_config.txt endif endif Loading core/android_soong_config_vars.mk +0 −1 Original line number Original line Diff line number Diff line Loading @@ -34,7 +34,6 @@ $(call add_soong_config_var_value,ANDROID,MIXED_SEPOLICY_VERSION,$(BOARD_SEPOLIC endif endif $(call add_soong_config_var,ANDROID,BOARD_USES_ODMIMAGE) $(call add_soong_config_var,ANDROID,BOARD_USES_ODMIMAGE) $(call add_soong_config_var,ANDROID,BOARD_USES_RECOVERY_AS_BOOT) $(call add_soong_config_var,ANDROID,BOARD_USES_RECOVERY_AS_BOOT) $(call add_soong_config_var,ANDROID,BOARD_BUILD_SYSTEM_ROOT_IMAGE) $(call add_soong_config_var,ANDROID,PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT) $(call add_soong_config_var,ANDROID,PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT) # Default behavior for the tree wrt building modules or using prebuilts. This # Default behavior for the tree wrt building modules or using prebuilts. This Loading core/board_config.mk +2 −22 Original line number Original line Diff line number Diff line Loading @@ -404,12 +404,6 @@ define check_image_config $(eval _lc_name :=) $(eval _lc_name :=) endef endef ########################################### # Now we can substitute with the real value of TARGET_COPY_OUT_RAMDISK ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) TARGET_COPY_OUT_RAMDISK := $(TARGET_COPY_OUT_ROOT) endif ########################################### ########################################### # Configure whether we're building the system image # Configure whether we're building the system image BUILDING_SYSTEM_IMAGE := true BUILDING_SYSTEM_IMAGE := true Loading Loading @@ -559,15 +553,8 @@ endif # Are we building a debug vendor_boot image # Are we building a debug vendor_boot image BUILDING_DEBUG_VENDOR_BOOT_IMAGE := BUILDING_DEBUG_VENDOR_BOOT_IMAGE := # Can't build vendor_boot-debug.img if BOARD_BUILD_SYSTEM_ROOT_IMAGE is true, # because building debug vendor_boot image requires a ramdisk. ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) ifeq ($(PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE),true) $(warning PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE is true, but so is BOARD_BUILD_SYSTEM_ROOT_IMAGE. \ Skip building the debug vendor_boot image.) endif # Can't build vendor_boot-debug.img if we're not building a ramdisk. # Can't build vendor_boot-debug.img if we're not building a ramdisk. else ifndef BUILDING_RAMDISK_IMAGE ifndef BUILDING_RAMDISK_IMAGE ifeq ($(PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE),true) ifeq ($(PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE),true) $(warning PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE is true, but we're not building a ramdisk image. \ $(warning PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE is true, but we're not building a ramdisk image. \ Skip building the debug vendor_boot image.) Skip building the debug vendor_boot image.) Loading Loading @@ -604,15 +591,8 @@ endif # Are we building a debug boot image # Are we building a debug boot image BUILDING_DEBUG_BOOT_IMAGE := BUILDING_DEBUG_BOOT_IMAGE := # Can't build boot-debug.img if BOARD_BUILD_SYSTEM_ROOT_IMAGE is true, # because building debug boot image requires a ramdisk. ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) ifeq ($(PRODUCT_BUILD_DEBUG_BOOT_IMAGE),true) $(warning PRODUCT_BUILD_DEBUG_BOOT_IMAGE is true, but so is BOARD_BUILD_SYSTEM_ROOT_IMAGE. \ Skip building the debug boot image.) endif # Can't build boot-debug.img if we're not building a ramdisk. # Can't build boot-debug.img if we're not building a ramdisk. else ifndef BUILDING_RAMDISK_IMAGE ifndef BUILDING_RAMDISK_IMAGE ifeq ($(PRODUCT_BUILD_DEBUG_BOOT_IMAGE),true) ifeq ($(PRODUCT_BUILD_DEBUG_BOOT_IMAGE),true) $(warning PRODUCT_BUILD_DEBUG_BOOT_IMAGE is true, but we're not building a ramdisk image. \ $(warning PRODUCT_BUILD_DEBUG_BOOT_IMAGE is true, but we're not building a ramdisk image. \ Skip building the debug boot image.) Skip building the debug boot image.) Loading core/config.mk +0 −3 Original line number Original line Diff line number Diff line Loading @@ -872,9 +872,6 @@ ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) endif endif ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true) ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true) ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) $(error BOARD_BUILD_SYSTEM_ROOT_IMAGE cannot be true for devices with dynamic partitions) endif ifneq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true) ifneq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true) $(error PRODUCT_USE_DYNAMIC_PARTITION_SIZE must be true for devices with dynamic partitions) $(error PRODUCT_USE_DYNAMIC_PARTITION_SIZE must be true for devices with dynamic partitions) endif endif Loading core/main.mk +22 −24 Original line number Original line Diff line number Diff line Loading @@ -1846,7 +1846,6 @@ else ifeq ($(TARGET_BUILD_UNBUNDLED),$(TARGET_BUILD_UNBUNDLED_IMAGE)) $(INSTALLED_FILES_JSON_ROOT) \ $(INSTALLED_FILES_JSON_ROOT) \ ) ) ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) $(call dist-for-goals, droidcore-unbundled, \ $(call dist-for-goals, droidcore-unbundled, \ $(INSTALLED_FILES_FILE_RAMDISK) \ $(INSTALLED_FILES_FILE_RAMDISK) \ $(INSTALLED_FILES_JSON_RAMDISK) \ $(INSTALLED_FILES_JSON_RAMDISK) \ Loading @@ -1869,7 +1868,6 @@ else ifeq ($(TARGET_BUILD_UNBUNDLED),$(TARGET_BUILD_UNBUNDLED_IMAGE)) $(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET) \ $(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET) \ $(INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET) \ $(INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET) \ ) ) endif ifeq ($(PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST),true) ifeq ($(PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST),true) $(call dist-for-goals, droidcore-unbundled, $(INSTALLED_BOOTIMAGE_TARGET)) $(call dist-for-goals, droidcore-unbundled, $(INSTALLED_BOOTIMAGE_TARGET)) Loading Loading
core/Makefile +9 −39 Original line number Original line Diff line number Diff line Loading @@ -975,12 +975,10 @@ INTERNAL_BOOTIMAGE_ARGS := \ # TODO(b/229701033): clean up BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK. # TODO(b/229701033): clean up BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK. ifneq ($(BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK),true) ifneq ($(BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK),true) ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) ifneq ($(BUILDING_INIT_BOOT_IMAGE),true) ifneq ($(BUILDING_INIT_BOOT_IMAGE),true) INTERNAL_BOOTIMAGE_ARGS += --ramdisk $(INSTALLED_RAMDISK_TARGET) INTERNAL_BOOTIMAGE_ARGS += --ramdisk $(INSTALLED_RAMDISK_TARGET) endif endif endif endif endif ifndef BUILDING_VENDOR_BOOT_IMAGE ifndef BUILDING_VENDOR_BOOT_IMAGE ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG Loading @@ -990,9 +988,6 @@ endif INTERNAL_BOOTIMAGE_FILES := $(filter-out --%,$(INTERNAL_BOOTIMAGE_ARGS)) INTERNAL_BOOTIMAGE_FILES := $(filter-out --%,$(INTERNAL_BOOTIMAGE_ARGS)) # TODO(b/241346584) Remove this when BOARD_BUILD_SYSTEM_ROOT_IMAGE is deprecated INTERNAL_KERNEL_CMDLINE := $(strip $(INTERNAL_KERNEL_CMDLINE) buildvariant=$(TARGET_BUILD_VARIANT)) # kernel cmdline/base/pagesize in boot. # kernel cmdline/base/pagesize in boot. # - If using GKI, use GENERIC_KERNEL_CMDLINE. Remove kernel base and pagesize because they are # - If using GKI, use GENERIC_KERNEL_CMDLINE. Remove kernel base and pagesize because they are # device-specific. # device-specific. Loading Loading @@ -1989,8 +1984,6 @@ $(if $(BOARD_AVB_ENABLE),\ $(hide) echo "avb_system_dlkm_rollback_index_location=$(BOARD_SYSTEM_SYSTEM_DLKM_ROLLBACK_INDEX_LOCATION)" >> $(1))) $(hide) echo "avb_system_dlkm_rollback_index_location=$(BOARD_SYSTEM_SYSTEM_DLKM_ROLLBACK_INDEX_LOCATION)" >> $(1))) $(if $(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)),\ $(if $(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)),\ $(hide) echo "recovery_as_boot=true" >> $(1)) $(hide) echo "recovery_as_boot=true" >> $(1)) $(if $(filter true,$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)),\ $(hide) echo "system_root_image=true" >> $(1)) $(if $(filter true,$(BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK)),\ $(if $(filter true,$(BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK)),\ $(hide) echo "gki_boot_image_without_ramdisk=true" >> $(1)) $(hide) echo "gki_boot_image_without_ramdisk=true" >> $(1)) $(hide) echo "root_dir=$(TARGET_ROOT_OUT)" >> $(1) $(hide) echo "root_dir=$(TARGET_ROOT_OUT)" >> $(1) Loading Loading @@ -2267,20 +2260,18 @@ endif # (BOARD_USES_FULL_RECOVERY_IMAGE = true); # (BOARD_USES_FULL_RECOVERY_IMAGE = true); # b) We build a single image that contains boot and recovery both - no recovery image to install # b) We build a single image that contains boot and recovery both - no recovery image to install # (BOARD_USES_RECOVERY_AS_BOOT = true); # (BOARD_USES_RECOVERY_AS_BOOT = true); # c) We mount the system image as / and therefore do not have a ramdisk in boot.img # c) We include the recovery DTBO image within recovery - not needing the resource file as we # (BOARD_BUILD_SYSTEM_ROOT_IMAGE = true). # d) We include the recovery DTBO image within recovery - not needing the resource file as we # do bsdiff because boot and recovery will contain different number of entries # do bsdiff because boot and recovery will contain different number of entries # (BOARD_INCLUDE_RECOVERY_DTBO = true). # (BOARD_INCLUDE_RECOVERY_DTBO = true). # e) We include the recovery ACPIO image within recovery - not needing the resource file as we # d) We include the recovery ACPIO image within recovery - not needing the resource file as we # do bsdiff because boot and recovery will contain different number of entries # do bsdiff because boot and recovery will contain different number of entries # (BOARD_INCLUDE_RECOVERY_ACPIO = true). # (BOARD_INCLUDE_RECOVERY_ACPIO = true). # f) We build a single image that contains vendor_boot and recovery both - no recovery image to # e) We build a single image that contains vendor_boot and recovery both - no recovery image to # install # install # (BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT = true). # (BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT = true). ifeq (,$(filter true, $(BOARD_USES_FULL_RECOVERY_IMAGE) $(BOARD_USES_RECOVERY_AS_BOOT) \ ifeq (,$(filter true, $(BOARD_USES_FULL_RECOVERY_IMAGE) $(BOARD_USES_RECOVERY_AS_BOOT) \ $(BOARD_BUILD_SYSTEM_ROOT_IMAGE) $(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO) \ $(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO) \ $(BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT))) $(BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT))) # Named '.dat' so we don't attempt to use imgdiff for patching it. # Named '.dat' so we don't attempt to use imgdiff for patching it. RECOVERY_RESOURCE_ZIP := $(TARGET_OUT_VENDOR)/etc/recovery-resource.dat RECOVERY_RESOURCE_ZIP := $(TARGET_OUT_VENDOR)/etc/recovery-resource.dat Loading Loading @@ -2402,8 +2393,7 @@ $(INTERNAL_RECOVERY_RAMDISK_FILES_TIMESTAMP): $(MKBOOTFS) $(COMPRESSION_COMMAND_ # Use rsync because "cp -Rf" fails to overwrite broken symlinks on Mac. # Use rsync because "cp -Rf" fails to overwrite broken symlinks on Mac. rsync -a --exclude=sdcard $(IGNORE_RECOVERY_SEPOLICY) $(IGNORE_CACHE_LINK) $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT) rsync -a --exclude=sdcard $(IGNORE_RECOVERY_SEPOLICY) $(IGNORE_CACHE_LINK) $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT) # Modifying ramdisk contents... # Modifying ramdisk contents... $(if $(filter true,$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)),, \ ln -sf /system/bin/init $(TARGET_RECOVERY_ROOT_OUT)/init ln -sf /system/bin/init $(TARGET_RECOVERY_ROOT_OUT)/init) # Removes $(TARGET_RECOVERY_ROOT_OUT)/init*.rc EXCEPT init.recovery*.rc. # Removes $(TARGET_RECOVERY_ROOT_OUT)/init*.rc EXCEPT init.recovery*.rc. find $(TARGET_RECOVERY_ROOT_OUT) -maxdepth 1 -name 'init*.rc' -type f -not -name "init.recovery.*.rc" | xargs rm -f find $(TARGET_RECOVERY_ROOT_OUT) -maxdepth 1 -name 'init*.rc' -type f -not -name "init.recovery.*.rc" | xargs rm -f cp $(TARGET_ROOT_OUT)/init.recovery.*.rc $(TARGET_RECOVERY_ROOT_OUT)/ 2> /dev/null || true # Ignore error when the src file doesn't exist. cp $(TARGET_ROOT_OUT)/init.recovery.*.rc $(TARGET_RECOVERY_ROOT_OUT)/ 2> /dev/null || true # Ignore error when the src file doesn't exist. Loading Loading @@ -3156,7 +3146,7 @@ INSTALLED_SYSTEMIMAGE := $(INSTALLED_SYSTEMIMAGE_TARGET) ifneq ($(INSTALLED_BOOTIMAGE_TARGET),) ifneq ($(INSTALLED_BOOTIMAGE_TARGET),) ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),) ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),) ifneq ($(BOARD_USES_FULL_RECOVERY_IMAGE),true) ifneq ($(BOARD_USES_FULL_RECOVERY_IMAGE),true) ifneq (,$(filter true, $(BOARD_BUILD_SYSTEM_ROOT_IMAGE) $(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO))) ifneq (,$(filter true,$(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO))) diff_tool := $(HOST_OUT_EXECUTABLES)/bsdiff diff_tool := $(HOST_OUT_EXECUTABLES)/bsdiff else else diff_tool := $(HOST_OUT_EXECUTABLES)/imgdiff diff_tool := $(HOST_OUT_EXECUTABLES)/imgdiff Loading Loading @@ -4357,18 +4347,6 @@ $(foreach partition,$(BOARD_CUSTOMIMAGES_PARTITION_LIST), \ $(eval $(call check-and-set-custom-avb-chain-args,$(partition)))) $(eval $(call check-and-set-custom-avb-chain-args,$(partition)))) endif endif # Add kernel cmdline descriptor for kernel to mount system.img as root with # dm-verity. This works when system.img is either chained or not-chained: # - chained: The --setup_as_rootfs_from_kernel option will add dm-verity kernel # cmdline descriptor to system.img # - not-chained: The --include_descriptors_from_image option for make_vbmeta_image # will include the kernel cmdline descriptor from system.img into vbmeta.img ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) ifeq ($(filter system, $(BOARD_SUPER_PARTITION_PARTITION_LIST)),) BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS += --setup_as_rootfs_from_kernel endif endif BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --padding_size 4096 BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --padding_size 4096 BOARD_AVB_MAKE_VBMETA_SYSTEM_IMAGE_ARGS += --padding_size 4096 BOARD_AVB_MAKE_VBMETA_SYSTEM_IMAGE_ARGS += --padding_size 4096 BOARD_AVB_MAKE_VBMETA_VENDOR_IMAGE_ARGS += --padding_size 4096 BOARD_AVB_MAKE_VBMETA_VENDOR_IMAGE_ARGS += --padding_size 4096 Loading Loading @@ -5727,10 +5705,8 @@ endif # INSTALLED_RECOVERYIMAGE_TARGET defined or BOARD_USES_RECOVERY_AS_BOOT is $(TARGET_ROOT_OUT),$(zip_root)/ROOT) $(TARGET_ROOT_OUT),$(zip_root)/ROOT) @# If we are using recovery as boot, this is already done when processing recovery. @# If we are using recovery as boot, this is already done when processing recovery. ifneq ($(BOARD_USES_RECOVERY_AS_BOOT),true) ifneq ($(BOARD_USES_RECOVERY_AS_BOOT),true) ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) $(hide) $(call package_files-copy-root, \ $(hide) $(call package_files-copy-root, \ $(TARGET_RAMDISK_OUT),$(zip_root)/BOOT/RAMDISK) $(TARGET_RAMDISK_OUT),$(zip_root)/BOOT/RAMDISK) endif ifdef INSTALLED_KERNEL_TARGET ifdef INSTALLED_KERNEL_TARGET $(hide) cp $(INSTALLED_KERNEL_TARGET) $(zip_root)/BOOT/ $(hide) cp $(INSTALLED_KERNEL_TARGET) $(zip_root)/BOOT/ endif endif Loading Loading @@ -6036,10 +6012,8 @@ ifdef BUILDING_SYSTEM_DLKM_IMAGE endif endif @# ROOT always contains the files for the root under normal boot. @# ROOT always contains the files for the root under normal boot. $(hide) $(call fs_config,$(zip_root)/ROOT,) > $(zip_root)/META/root_filesystem_config.txt $(hide) $(call fs_config,$(zip_root)/ROOT,) > $(zip_root)/META/root_filesystem_config.txt ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true) @# BOOT/RAMDISK contains the first stage and recovery ramdisk. @# BOOT/RAMDISK exists and contains the ramdisk for recovery if using BOARD_USES_RECOVERY_AS_BOOT. $(hide) $(call fs_config,$(zip_root)/BOOT/RAMDISK,) > $(zip_root)/META/boot_filesystem_config.txt $(hide) $(call fs_config,$(zip_root)/BOOT/RAMDISK,) > $(zip_root)/META/boot_filesystem_config.txt endif ifdef BUILDING_INIT_BOOT_IMAGE ifdef BUILDING_INIT_BOOT_IMAGE $(hide) $(call package_files-copy-root, $(TARGET_RAMDISK_OUT),$(zip_root)/INIT_BOOT/RAMDISK) $(hide) $(call package_files-copy-root, $(TARGET_RAMDISK_OUT),$(zip_root)/INIT_BOOT/RAMDISK) $(hide) $(call fs_config,$(zip_root)/INIT_BOOT/RAMDISK,) > $(zip_root)/META/init_boot_filesystem_config.txt $(hide) $(call fs_config,$(zip_root)/INIT_BOOT/RAMDISK,) > $(zip_root)/META/init_boot_filesystem_config.txt Loading @@ -6050,10 +6024,6 @@ endif # BUILDING_INIT_BOOT_IMAGE ifneq ($(INSTALLED_VENDOR_BOOTIMAGE_TARGET),) ifneq ($(INSTALLED_VENDOR_BOOTIMAGE_TARGET),) $(call fs_config,$(zip_root)/VENDOR_BOOT/RAMDISK,) > $(zip_root)/META/vendor_boot_filesystem_config.txt $(call fs_config,$(zip_root)/VENDOR_BOOT/RAMDISK,) > $(zip_root)/META/vendor_boot_filesystem_config.txt endif endif ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) @# BOOT/RAMDISK also exists and contains the first stage ramdisk if not using BOARD_BUILD_SYSTEM_ROOT_IMAGE. $(hide) $(call fs_config,$(zip_root)/BOOT/RAMDISK,) > $(zip_root)/META/boot_filesystem_config.txt endif ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),) ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),) $(hide) $(call fs_config,$(zip_root)/RECOVERY/RAMDISK,) > $(zip_root)/META/recovery_filesystem_config.txt $(hide) $(call fs_config,$(zip_root)/RECOVERY/RAMDISK,) > $(zip_root)/META/recovery_filesystem_config.txt endif endif Loading
core/android_soong_config_vars.mk +0 −1 Original line number Original line Diff line number Diff line Loading @@ -34,7 +34,6 @@ $(call add_soong_config_var_value,ANDROID,MIXED_SEPOLICY_VERSION,$(BOARD_SEPOLIC endif endif $(call add_soong_config_var,ANDROID,BOARD_USES_ODMIMAGE) $(call add_soong_config_var,ANDROID,BOARD_USES_ODMIMAGE) $(call add_soong_config_var,ANDROID,BOARD_USES_RECOVERY_AS_BOOT) $(call add_soong_config_var,ANDROID,BOARD_USES_RECOVERY_AS_BOOT) $(call add_soong_config_var,ANDROID,BOARD_BUILD_SYSTEM_ROOT_IMAGE) $(call add_soong_config_var,ANDROID,PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT) $(call add_soong_config_var,ANDROID,PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT) # Default behavior for the tree wrt building modules or using prebuilts. This # Default behavior for the tree wrt building modules or using prebuilts. This Loading
core/board_config.mk +2 −22 Original line number Original line Diff line number Diff line Loading @@ -404,12 +404,6 @@ define check_image_config $(eval _lc_name :=) $(eval _lc_name :=) endef endef ########################################### # Now we can substitute with the real value of TARGET_COPY_OUT_RAMDISK ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) TARGET_COPY_OUT_RAMDISK := $(TARGET_COPY_OUT_ROOT) endif ########################################### ########################################### # Configure whether we're building the system image # Configure whether we're building the system image BUILDING_SYSTEM_IMAGE := true BUILDING_SYSTEM_IMAGE := true Loading Loading @@ -559,15 +553,8 @@ endif # Are we building a debug vendor_boot image # Are we building a debug vendor_boot image BUILDING_DEBUG_VENDOR_BOOT_IMAGE := BUILDING_DEBUG_VENDOR_BOOT_IMAGE := # Can't build vendor_boot-debug.img if BOARD_BUILD_SYSTEM_ROOT_IMAGE is true, # because building debug vendor_boot image requires a ramdisk. ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) ifeq ($(PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE),true) $(warning PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE is true, but so is BOARD_BUILD_SYSTEM_ROOT_IMAGE. \ Skip building the debug vendor_boot image.) endif # Can't build vendor_boot-debug.img if we're not building a ramdisk. # Can't build vendor_boot-debug.img if we're not building a ramdisk. else ifndef BUILDING_RAMDISK_IMAGE ifndef BUILDING_RAMDISK_IMAGE ifeq ($(PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE),true) ifeq ($(PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE),true) $(warning PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE is true, but we're not building a ramdisk image. \ $(warning PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE is true, but we're not building a ramdisk image. \ Skip building the debug vendor_boot image.) Skip building the debug vendor_boot image.) Loading Loading @@ -604,15 +591,8 @@ endif # Are we building a debug boot image # Are we building a debug boot image BUILDING_DEBUG_BOOT_IMAGE := BUILDING_DEBUG_BOOT_IMAGE := # Can't build boot-debug.img if BOARD_BUILD_SYSTEM_ROOT_IMAGE is true, # because building debug boot image requires a ramdisk. ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) ifeq ($(PRODUCT_BUILD_DEBUG_BOOT_IMAGE),true) $(warning PRODUCT_BUILD_DEBUG_BOOT_IMAGE is true, but so is BOARD_BUILD_SYSTEM_ROOT_IMAGE. \ Skip building the debug boot image.) endif # Can't build boot-debug.img if we're not building a ramdisk. # Can't build boot-debug.img if we're not building a ramdisk. else ifndef BUILDING_RAMDISK_IMAGE ifndef BUILDING_RAMDISK_IMAGE ifeq ($(PRODUCT_BUILD_DEBUG_BOOT_IMAGE),true) ifeq ($(PRODUCT_BUILD_DEBUG_BOOT_IMAGE),true) $(warning PRODUCT_BUILD_DEBUG_BOOT_IMAGE is true, but we're not building a ramdisk image. \ $(warning PRODUCT_BUILD_DEBUG_BOOT_IMAGE is true, but we're not building a ramdisk image. \ Skip building the debug boot image.) Skip building the debug boot image.) Loading
core/config.mk +0 −3 Original line number Original line Diff line number Diff line Loading @@ -872,9 +872,6 @@ ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) endif endif ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true) ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true) ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) $(error BOARD_BUILD_SYSTEM_ROOT_IMAGE cannot be true for devices with dynamic partitions) endif ifneq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true) ifneq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true) $(error PRODUCT_USE_DYNAMIC_PARTITION_SIZE must be true for devices with dynamic partitions) $(error PRODUCT_USE_DYNAMIC_PARTITION_SIZE must be true for devices with dynamic partitions) endif endif Loading
core/main.mk +22 −24 Original line number Original line Diff line number Diff line Loading @@ -1846,7 +1846,6 @@ else ifeq ($(TARGET_BUILD_UNBUNDLED),$(TARGET_BUILD_UNBUNDLED_IMAGE)) $(INSTALLED_FILES_JSON_ROOT) \ $(INSTALLED_FILES_JSON_ROOT) \ ) ) ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) $(call dist-for-goals, droidcore-unbundled, \ $(call dist-for-goals, droidcore-unbundled, \ $(INSTALLED_FILES_FILE_RAMDISK) \ $(INSTALLED_FILES_FILE_RAMDISK) \ $(INSTALLED_FILES_JSON_RAMDISK) \ $(INSTALLED_FILES_JSON_RAMDISK) \ Loading @@ -1869,7 +1868,6 @@ else ifeq ($(TARGET_BUILD_UNBUNDLED),$(TARGET_BUILD_UNBUNDLED_IMAGE)) $(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET) \ $(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET) \ $(INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET) \ $(INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET) \ ) ) endif ifeq ($(PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST),true) ifeq ($(PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST),true) $(call dist-for-goals, droidcore-unbundled, $(INSTALLED_BOOTIMAGE_TARGET)) $(call dist-for-goals, droidcore-unbundled, $(INSTALLED_BOOTIMAGE_TARGET)) Loading