diff --git a/core/Makefile b/core/Makefile index e2e9ba3aea01a7fbd5febe7e6ba246fcb982cd49..1f0872a242d789d4ecfad374b6ca918063af4a3c 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1378,6 +1378,7 @@ endif # PRODUCT_USE_DYNAMIC_PARTITIONS # $(3): additional "key=value" pairs to append to the dictionary file. define generate-image-prop-dictionary $(if $(filter $(2),system),\ + $(if $(BOARD_SYSTEMIMAGE_AS_SYSTEM),$(hide) echo "system_as_system=$(BOARD_SYSTEMIMAGE_AS_SYSTEM)" >> $(1)) $(if $(BOARD_SYSTEMIMAGE_PARTITION_SIZE),$(hide) echo "system_size=$(BOARD_SYSTEMIMAGE_PARTITION_SIZE)" >> $(1)) $(if $(INTERNAL_SYSTEM_OTHER_PARTITION_SIZE),$(hide) echo "system_other_size=$(INTERNAL_SYSTEM_OTHER_PARTITION_SIZE)" >> $(1)) $(if $(BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE),$(hide) echo "system_fs_type=$(BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE)" >> $(1)) @@ -4159,6 +4160,14 @@ endif # BOARD_PREBUILT_DTBOIMAGE @# INSTALLED_RADIOIMAGE_TARGET. $(hide) $(foreach part,$(BOARD_PACK_RADIOIMAGES), \ echo $(part) >> $(zip_root)/META/pack_radioimages.txt;) + + + + @# The boot image in BOARD_PACK_BOOTIMAGE will be additionally copied from RADIO/ into + @# IMAGES/, which then will be added into -img.zip. + $(hide) $(foreach part,$(BOARD_PACK_BOOTIMAGE), \ + echo $(part) >> $(zip_root)/META/pack_bootimage.txt;) + @# Run fs_config on all the system, vendor, boot ramdisk, @# and recovery ramdisk files in the zip, and save the output ifdef BUILDING_SYSTEM_IMAGE diff --git a/core/tasks/check_boot_jars/package_whitelist.txt b/core/tasks/check_boot_jars/package_whitelist.txt index 610301841a04170b16f4f400893e988a4e0a7428..45266c5f16e13be3b86b0e5ddc8d8a19c4a8afd8 100644 --- a/core/tasks/check_boot_jars/package_whitelist.txt +++ b/core/tasks/check_boot_jars/package_whitelist.txt @@ -258,3 +258,6 @@ org\.codeaurora\.internal.* ################################################### # IFAA Manager used for Alipay and/or WeChat payment org\.ifaa\.android\.manager.* + +vendor\.samsung\.hardware\.radio\.V1_2 +vendor\.mediatek\.hardware\.radio\.V2_0 diff --git a/target/product/full_base_telephony.mk b/target/product/full_base_telephony.mk index e3442147a9a7243e8fc8f32ddd481e8b7a65eb2d..0aa9e7700b5aacd9ff18f61eed9dd2e3240273f2 100644 --- a/target/product/full_base_telephony.mk +++ b/target/product/full_base_telephony.mk @@ -30,10 +30,5 @@ endif PRODUCT_COPY_FILES := \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml -ifeq ($(LINEAGE_BUILD),) -PRODUCT_COPY_FILES += \ - device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml -endif - $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk) diff --git a/target/product/gsi/skip_mount.cfg b/target/product/gsi/skip_mount.cfg index 549767edf272b2f341a9d0e57391bd1364645ae3..3276763844056ecc685c99b8eca91b00a12cfe71 100644 --- a/target/product/gsi/skip_mount.cfg +++ b/target/product/gsi/skip_mount.cfg @@ -1,2 +1,3 @@ /product /product_services +/oem diff --git a/target/product/gsi_common.mk b/target/product/gsi_common.mk index 6507adb95f26ae9f03df60e0c28542747f7cb1d5..ff19f1d3cd3e6ccad134d51baf31345461b04e77 100644 --- a/target/product/gsi_common.mk +++ b/target/product/gsi_common.mk @@ -92,13 +92,6 @@ PRODUCT_PACKAGES += \ WAPPushManager \ WallpaperPicker \ -# Telephony: -# Provide a APN configuration to GSI product -ifeq ($(LINEAGE_BUILD),) -PRODUCT_COPY_FILES += \ - device/sample/etc/apns-full-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml -endif - # NFC: # Provide a libnfc-nci.conf to GSI product PRODUCT_COPY_FILES += \ diff --git a/target/product/mainline.mk b/target/product/mainline.mk index ca16fc6564ff666631c326d39ffa258724f7672c..70da48b2568f3499f24bb19a3ecaca8d94d631aa 100644 --- a/target/product/mainline.mk +++ b/target/product/mainline.mk @@ -40,7 +40,3 @@ endif PRODUCT_PACKAGES += \ PhotoTable \ WallpaperPicker \ - -ifeq ($(LINEAGE_BUILD),) -PRODUCT_COPY_FILES += device/sample/etc/apns-full-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml -endif diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py index 96b7f0b04d448ed082fb81bea0d9c571d1c87a1e..b01eb324f28582ec980fd1a18df83191e932dd01 100755 --- a/tools/releasetools/add_img_to_target_files.py +++ b/tools/releasetools/add_img_to_target_files.py @@ -780,17 +780,24 @@ def AddImagesToTargetFiles(filename): logger.info("\n\n++++ %s ++++\n\n", s) banner("boot") + boot_image = None # common.GetBootableImage() returns the image directly if present. - boot_image = common.GetBootableImage( - "IMAGES/boot.img", "boot.img", OPTIONS.input_tmp, "BOOT") - # boot.img may be unavailable in some targets (e.g. aosp_arm64). - if boot_image: - partitions['boot'] = os.path.join(OPTIONS.input_tmp, "IMAGES", "boot.img") - if not os.path.exists(partitions['boot']): - boot_image.WriteToDir(OPTIONS.input_tmp) - if output_zip: - boot_image.AddToZip(output_zip) - + pack_bootimage_txt = os.path.join( + OPTIONS.input_tmp, "META", "pack_bootimage.txt") + if os.path.exists(pack_bootimage_txt): + with open(pack_bootimage_txt) as f: + AddPackBootImage(output_zip, f.readlines()) + else: + boot_image = common.GetBootableImage( + "IMAGES/boot.img", "boot.img", OPTIONS.input_tmp, "BOOT") + print("OPTIONS.input_tmp "+OPTIONS.input_tmp) + # boot.img may be unavailable in some targets (e.g. aosp_arm64). + if boot_image: + partitions['boot'] = os.path.join(OPTIONS.input_tmp, "IMAGES", "boot.img") + if not os.path.exists(partitions['boot']): + boot_image.WriteToDir(OPTIONS.input_tmp) + if output_zip: + boot_image.AddToZip(output_zip) recovery_image = None if has_recovery: banner("recovery") @@ -924,6 +931,23 @@ def AddImagesToTargetFiles(filename): OPTIONS.replace_updated_files_list) +def AddPackBootImage(output_zip, images): + image = images[0] + img_name = image.strip() + _, ext = os.path.splitext(img_name) + if not ext: + img_name += ".img" + img_boot_path = os.path.join(OPTIONS.input_tmp, "IMAGES", "boot.img") + shutil.copy(img_name, img_boot_path) + prebuilt_path = os.path.join(OPTIONS.input_tmp, "BOOT", "boot.img") + assert os.path.exists(img_boot_path), \ + "Failed to find %s at %s" % (img_name, img_boot_path) + if output_zip: + common.ZipWrite(output_zip, img_boot_path, "IMAGES/" + img_name) + else: + shutil.copy(img_boot_path, prebuilt_path) + + def main(argv): def option_handler(o, a): if o in ("-a", "--add_missing"): diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py index d8a65d2950acaf0ce3b02ca58341a954719a7e7d..9b77167331fdbdb4b7eeda801c2751d43dd6d227 100755 --- a/tools/releasetools/build_image.py +++ b/tools/releasetools/build_image.py @@ -157,6 +157,8 @@ def SetUpInDirAndFsConfig(origin_in, prop_dict): if prop_dict["mount_point"] != "system": return origin_in, fs_config + if "system_as_system" in prop_dict: + return origin_in, fs_config if "first_pass" in prop_dict: prop_dict["mount_point"] = "/" @@ -565,6 +567,8 @@ def ImagePropFromGlobalDict(glob_dict, mount_point): if not copy_prop("system_extfs_rsv_pct", "extfs_rsv_pct"): d["extfs_rsv_pct"] = "0" copy_prop("system_reserved_size", "partition_reserved_size") + + copy_prop("system_as_system", "system_as_system") elif mount_point == "system_other": # We inherit the selinux policies of /system since we contain some of its # files.