diff --git a/build/make/tools/releasetools/add_img_to_target_files.py b/build/make/tools/releasetools/add_img_to_target_files.py
old mode 100644
new mode 100755
index f58b697..fc59134
--- a/build/make/tools/releasetools/add_img_to_target_files.py
+++ b/build/make/tools/releasetools/add_img_to_target_files.py
@@ -538,8 +538,48 @@ def AddCache(output_zip):
common.CheckSize(img.name, "cache.img", OPTIONS.info_dict)
img.Write()
+# jicong.wang modify for task 10588 start
+def CheckAbOtaImagesNonQssi(output_zip, ab_partitions):
+ """Checks that all the listed A/B partitions have their images available.
+
+ The images need to be available under IMAGES/ or RADIO/, with the former takes
+ a priority.
+ Args:
+ output_zip: The output zip file (needs to be already open), or None to
+ find images in OPTIONS.input_tmp/.
+ ab_partitions: The list of A/B partitions.
+
+ Raises:
+ AssertionError: If it can't find an image.
+ """
+ MP_list = {}
+ GetMPI_config(MP_list)
+ for partition in ab_partitions:
+ partition_name = partition.strip()
+ img_name = partition.strip() + ".img"
+ logger.info("radio img_name :%s",img_name)
+ if partition_name in MP_list.keys():
+ radio_src_img_name = MP_list[partition_name]
+ radio_path = os.path.join(OPTIONS.input_tmp, "RADIO", radio_src_img_name)
+ if os.path.exists(radio_path):
+ images_path = os.path.join(OPTIONS.input_tmp, "IMAGES", img_name)
+ shutil.copy(radio_path, images_path)
+ continue
+ # Assert that the image is present under IMAGES/ now.
+ if output_zip:
+ # Zip spec says: All slashes MUST be forward slashes.
+ images_path = "IMAGES/" + img_name
+ radio_path = "RADIO/" + img_name
+ available = (images_path in output_zip.namelist() or
+ radio_path in output_zip.namelist())
+ else:
+ images_path = os.path.join(OPTIONS.input_tmp, "IMAGES", img_name)
+ radio_path = os.path.join(OPTIONS.input_tmp, "RADIO", img_name)
+ available = os.path.exists(images_path) or os.path.exists(radio_path)
+ assert available, "Failed to find " + img_name
+# jicong.wang modify for task 10588 end
def CheckAbOtaImages(output_zip, ab_partitions):
"""Checks that all the listed A/B partitions have their images available.
@@ -707,6 +747,19 @@ def ReplaceUpdatedFiles(zip_filename, files_list):
common.ZipWrite(output_zip, file_path, arcname=item)
common.ZipClose(output_zip)
+#jicong.wang modify add for task 10588 start
+def GetMPI_config(MP_list):
+ MPI_config = os.path.join(OPTIONS.input_tmp, "RADIO", "MPI_config")
+ assert os.path.exists(MPI_config)
+ with open(MPI_config) as f:
+ for line in f.readlines():
+ if line.startswith('#'):
+ logger.info("Note:"+line)
+ continue
+ MP_info=line.strip().split('=')
+ logger.info("partition:" + MP_info[0] + " imagename:" + MP_info[1])
+ MP_list.update({MP_info[0]: MP_info[1]})
+#jicong.wang add for task 10588 end
def AddImagesToTargetFiles(filename):
"""Creates and adds images (boot/recovery/system/...) to a target_files.zip.
@@ -940,8 +993,15 @@ def AddImagesToTargetFiles(filename):
# For devices using A/B update, make sure we have all the needed images
# ready under IMAGES/ or RADIO/.
- CheckAbOtaImages(output_zip, ab_partitions)
-
+ # jicong.wang modify for task 10588 start
+ radio_dir = os.path.join(OPTIONS.input_tmp, "RADIO")
+ if os.path.exists(radio_dir):
+ CheckAbOtaImagesNonQssi(output_zip, ab_partitions)
+ logging.warning(" OTA add image oem project build ...")
+ else:
+ CheckAbOtaImages(output_zip, ab_partitions)
+ logging.warning("OTA add image qssi build ...")
+ # jicong.wang modify for task 10588 end
# Generate care_map.pb for ab_partitions, then write this file to
# target_files package.
AddCareMapForAbOta(output_zip, ab_partitions, partitions)
diff --git a/device/qcom/mc565x/AndroidBoard.mk b/device/qcom/mc565x/AndroidBoard.mk
index fb5c313..9c4e7aa 100755
--- a/device/qcom/mc565x/AndroidBoard.mk
+++ b/device/qcom/mc565x/AndroidBoard.mk
@@ -97,6 +97,14 @@ include device/qcom/vendor-common/MergeConfig.mk
#----------------------------------------------------------------------
# Radio image
#----------------------------------------------------------------------
+
+# jicong.wang add for task 10588 start
+$(warning "current build not qssi should install abl ", $(TARGET_PRODUCT))
+ifneq ($(TARGET_PRODUCT),qssi)
+INSTALLED_RADIOIMAGE_TARGET +=$(addprefix $(PRODUCT_OUT)/,abl.elf)
+endif
+# jicong.wang add for task 10588 end
+
ifeq ($(ADD_RADIO_FILES), true)
radio_dir := $(LOCAL_PATH)/radio
RADIO_FILES := $(shell cd $(radio_dir) ; ls)
diff --git a/device/qcom/mc565x/BoardConfig.mk b/device/qcom/mc565x/BoardConfig.mk
index 5e37c42..0e26153 100755
--- a/device/qcom/mc565x/BoardConfig.mk
+++ b/device/qcom/mc565x/BoardConfig.mk
@@ -49,7 +49,8 @@ AB_OTA_UPDATER := true
# Packages generated by using just the below flag cannot be used for updating a device. You must pass
# in the full set mentioned above as part of your make commandline
#jicong.wang modify for task 8964 start
-AB_OTA_PARTITIONS ?= boot vendor vbmeta dtbo
+AB_OTA_PARTITIONS ?= boot vendor vbmeta dtbo abl
+-include $(LOCAL_PATH)/radio/radio.mk
#jicong.wang modify for task 8964 end
else
# Non-A/B section. Define cache and recovery partition variables.
diff --git a/device/qcom/mc565x/radio/MPI_config b/device/qcom/mc565x/radio/MPI_config
new file mode 100755
index 0000000..99d7092
--- /dev/null
+++ b/device/qcom/mc565x/radio/MPI_config
@@ -0,0 +1,18 @@
+#partition=imagename
+abl=abl.elf
+modem=NON-HLOS.bin
+dsp=dspso.bin
+devcfg=devcfg.mbn
+keymaster=km41.mbn
+rpm=rpm.mbn
+xbl=xbl.elf
+xbl_config=xbl_config.elf
+tz=tz.mbn
+hyp=hyp.mbn
+bluetooth=BTFM.bin
+imagefv=imagefv.elf
+uefisecapp=uefi_sec.mbn
+qupfw=qupv3fw.elf
+featenabler=featenabler.mbn
+cmnlib=cmnlib.mbn
+cmnlib64=cmnlib64.mbn
\ No newline at end of file
diff --git a/device/qcom/mc565x/radio/filesmap b/device/qcom/mc565x/radio/filesmap
old mode 100644
new mode 100755
index 73fa843..f5ec9ef
--- a/device/qcom/mc565x/radio/filesmap
+++ b/device/qcom/mc565x/radio/filesmap
@@ -38,7 +38,7 @@ xbl_config.elf /dev/block/bootdevice/by-name/xbl_config
tz.mbn /dev/block/bootdevice/by-name/tz
aop.mbn /dev/block/bootdevice/by-name/aop
hyp.mbn /dev/block/bootdevice/by-name/hyp
-km4.mbn /dev/block/bootdevice/by-name/keymaster
+km41.mbn /dev/block/bootdevice/by-name/keymaster
cmnlib.mbn /dev/block/bootdevice/by-name/cmnlib
cmnlib64.mbn /dev/block/bootdevice/by-name/cmnlib64
abl.elf /dev/block/bootdevice/by-name/abl
diff --git a/device/qcom/mc565x/radio/radio.mk b/device/qcom/mc565x/radio/radio.mk
new file mode 100755
index 0000000..68296fe
--- /dev/null
+++ b/device/qcom/mc565x/radio/radio.mk
@@ -0,0 +1,121 @@
+RADIO_DIR := $(LOCAL_PATH)/radio
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/NON-HLOS.bin && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter modem, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += modem
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/dspso.bin && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter dsp, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += dsp
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/devcfg.mbn && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter devcfg, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += devcfg
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/km41.mbn && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter keymaster, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += keymaster
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/rpm.mbn && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter rpm, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += rpm
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/xbl.elf && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter xbl, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += xbl
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/xbl_config.elf && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter xbl_config, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += xbl_config
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/tz.mbn && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter tz, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += tz
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/hyp.mbn && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter hyp, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += hyp
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/BTFM.bin && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter bluetooth, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += bluetooth
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/imagefv.elf && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter imagefv, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += imagefv
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/uefi_sec.mbn && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter uefisecapp, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += uefisecapp
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/qupv3fw.elf && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter qupfw, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += qupfw
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/featenabler.mbn && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter featenabler, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += featenabler
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/cmnlib.mbn && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter cmnlib, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += cmnlib
+ endif
+endif
+
+HAVE_FILE := $(shell test -f $(RADIO_DIR)/cmnlib64.mbn && echo yes)
+ifeq ($(HAVE_FILE),yes)
+ ifeq (,$(filter cmnlib64, $(AB_OTA_PARTITIONS)))
+ AB_OTA_PARTITIONS += cmnlib64
+ endif
+endif
+
+$(warning AB_OTA_PARTITIONS : $(AB_OTA_PARTITIONS))
高通Android R ota radio升级修改
最新推荐文章于 2024-03-16 20:06:46 发布