From 21b446487dae3622c75bde4bb4c2f18dc43f5c7b Mon Sep 17 00:00:00 2001 From: Gokul Sriram Palanisamy Date: Thu, 14 Sep 2023 15:00:07 +0530 Subject: [PATCH 1/9] ipq5332: TINY NOR: add compressed_art fixup For tiny profiles, ART partition is compressed. Indicate the same to the Linux kernel with an fdt entry. Change-Id: I9c3a21fc2c8350487fc100dedc79480fec5d462f Signed-off-by: Gokul Sriram Palanisamy --- board/qca/arm/common/fdt_fixup.c | 12 ++++++------ board/qca/arm/ipq5018/ipq5018.c | 2 +- board/qca/arm/ipq5332/ipq5332.c | 13 +++++++++++++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/board/qca/arm/common/fdt_fixup.c b/board/qca/arm/common/fdt_fixup.c index 7999e495fc..72b63741f4 100644 --- a/board/qca/arm/common/fdt_fixup.c +++ b/board/qca/arm/common/fdt_fixup.c @@ -876,11 +876,6 @@ __weak void fdt_fixup_for_atf(void *blob) return; } -__weak void fdt_fixup_art_format(void *blob) -{ - return; -} - #ifdef CONFIG_IPQ_BT_SUPPORT __weak void fdt_fixup_bt_running(void *blob) { @@ -963,6 +958,11 @@ __weak void fdt_fixup_auto_restart(void *blob) } #endif +__weak void fdt_fixup_art_format(void *blob) +{ + return; +} + __weak void ipq_fdt_fixup_socinfo(void *blob) { uint32_t cpu_type; @@ -1196,13 +1196,13 @@ int ft_board_setup(void *blob, bd_t *bd) fdt_fixup_bt_running(blob); #endif fdt_fixup_sdx65_gpio(blob); +#endif /* || This features fixup compressed_art in || dts if its 16M profile build. */ fdt_fixup_art_format(blob); -#endif #ifdef CONFIG_QCA_MMC board_mmc_deinit(); diff --git a/board/qca/arm/ipq5018/ipq5018.c b/board/qca/arm/ipq5018/ipq5018.c index 1f611987be..825e482c93 100644 --- a/board/qca/arm/ipq5018/ipq5018.c +++ b/board/qca/arm/ipq5018/ipq5018.c @@ -2055,6 +2055,7 @@ void fdt_fixup_bt_debug(void *blob) parse_fdt_fixup("/soc/serial@78b0000/%status%?ok", blob); parse_fdt_fixup("/soc/usb3@8A00000/%delete%device-power-gpio", blob); } +#endif #ifdef CONFIG_IPQ_TINY void fdt_fixup_art_format(void *blob) @@ -2065,7 +2066,6 @@ void fdt_fixup_art_format(void *blob) } #endif -#endif #ifndef CONFIG_CMD_DISABLE_EXECTZT void run_tzt(void *address) diff --git a/board/qca/arm/ipq5332/ipq5332.c b/board/qca/arm/ipq5332/ipq5332.c index ef2c93a61f..7ee5c41868 100644 --- a/board/qca/arm/ipq5332/ipq5332.c +++ b/board/qca/arm/ipq5332/ipq5332.c @@ -131,6 +131,19 @@ void fdt_fixup_flash(void *blob) } #endif +#ifdef CONFIG_IPQ_TINY_SPI_NOR +void fdt_fixup_art_format(void *blob) +{ + int nodeoffset; + int ret; + + nodeoffset = fdt_path_offset(blob, "/"); + ret = fdt_setprop(blob, nodeoffset, "compressed_art", NULL, 0); + if (ret != 0) + printf("fdt-fixup: unable to set property 'compressed_art'\n"); +} +#endif + void qca_serial_init(struct ipq_serial_platdata *plat) { int ret; From 2229c3c63cb5afbc79bd4b17af61d01ec5e8dcc2 Mon Sep 17 00:00:00 2001 From: Saahil Tomar Date: Thu, 21 Sep 2023 10:46:19 +0530 Subject: [PATCH 2/9] arm: dts: Rename RDP479 to MI01.12 & RDP481 to MI01.14 This change renames all the affect files from rdp479/rdp481 to mi01.12/mi01.14 respectively Change-Id: Ia06a17b9c34bf7e49fe43721db1e83bd4f5a7e3e Signed-off-by: Saahil Tomar --- arch/arm/include/asm/mach-types.h | 4 ++-- board/qca/arm/ipq5332/ipq5332.c | 14 ++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index d32969ddba..1432a08ff1 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -1179,8 +1179,8 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_IPQ5332_AP_MI01_3_C2 0x8060102 #define MACH_TYPE_IPQ5332_AP_MI04_1 0x8060004 #define MACH_TYPE_IPQ5332_AP_MI04_1_C2 0x8060007 -#define MACH_TYPE_IPQ5332_AP_RDP_479 0x8060202 -#define MACH_TYPE_IPQ5332_AP_RDP_481 0x8060302 +#define MACH_TYPE_IPQ5332_AP_MI01_12 0x8060202 +#define MACH_TYPE_IPQ5332_AP_MI01_14 0x8060302 #ifdef CONFIG_ARCH_EBSA110 # ifdef machine_arch_type diff --git a/board/qca/arm/ipq5332/ipq5332.c b/board/qca/arm/ipq5332/ipq5332.c index 09ad7636fb..9158f2635d 100644 --- a/board/qca/arm/ipq5332/ipq5332.c +++ b/board/qca/arm/ipq5332/ipq5332.c @@ -824,13 +824,11 @@ unsigned int get_dts_machid(unsigned int machid) switch (machid) { case MACH_TYPE_IPQ5332_AP_MI01_3_C2: + case MACH_TYPE_IPQ5332_AP_MI01_12: + case MACH_TYPE_IPQ5332_AP_MI01_14: return MACH_TYPE_IPQ5332_AP_MI01_3; case MACH_TYPE_IPQ5332_AP_MI04_1_C2: return MACH_TYPE_IPQ5332_AP_MI04_1; - case MACH_TYPE_IPQ5332_AP_RDP_479: - return MACH_TYPE_IPQ5332_AP_MI01_3; - case MACH_TYPE_IPQ5332_AP_RDP_481: - return MACH_TYPE_IPQ5332_AP_MI01_3; default: return machid; } @@ -854,13 +852,13 @@ void ipq_uboot_fdt_fixup(void) config_list[config_nos++] = "config@rdp478"; config_list[config_nos++] = "config-rdp478"; break; - case MACH_TYPE_IPQ5332_AP_RDP_479: - config_list[config_nos++] = "config@ap-rdp479"; + case MACH_TYPE_IPQ5332_AP_MI01_12: + config_list[config_nos++] = "config@mi01.12"; config_list[config_nos++] = "config@rdp479"; config_list[config_nos++] = "config-rdp479"; break; - case MACH_TYPE_IPQ5332_AP_RDP_481: - config_list[config_nos++] = "config@ap-rdp481"; + case MACH_TYPE_IPQ5332_AP_MI01_14: + config_list[config_nos++] = "config@mi01.14"; config_list[config_nos++] = "config@rdp481"; config_list[config_nos++] = "config-rdp481"; break; From c61b701c041757575aa535bba7e16f469775e41f Mon Sep 17 00:00:00 2001 From: Gurumoorthy Santhakumar Date: Wed, 2 Aug 2023 12:22:42 +0530 Subject: [PATCH 3/9] arch: smem: removed end_magic check in bootconfig This patch is to support bootconfig with crc32 Change-Id: I49a7c5e3a578a166d25b8c7387a9a5ffd21652a8 Signed-off-by: Gurumoorthy Santhakumar --- arch/arm/cpu/armv7/qca/common/smem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/qca/common/smem.c b/arch/arm/cpu/armv7/qca/common/smem.c index 6ca4ce2850..f74dc4e4a1 100644 --- a/arch/arm/cpu/armv7/qca/common/smem.c +++ b/arch/arm/cpu/armv7/qca/common/smem.c @@ -517,8 +517,7 @@ int smem_bootconfig_info(void) &qca_smem_bootconfig_info, sizeof(qca_smem_bootconfig_info_t)); if ((ret != 0) || ((qca_smem_bootconfig_info.magic_start != _SMEM_DUAL_BOOTINFO_MAGIC_START) && - (qca_smem_bootconfig_info.magic_start != _SMEM_DUAL_BOOTINFO_MAGIC_START_TRYMODE)) || - (qca_smem_bootconfig_info.magic_end != _SMEM_DUAL_BOOTINFO_MAGIC_END)) + (qca_smem_bootconfig_info.magic_start != _SMEM_DUAL_BOOTINFO_MAGIC_START_TRYMODE))) return -ENOMSG; return 0; From 39bc05eace5da478d9253b82dbe4a292d61a293c Mon Sep 17 00:00:00 2001 From: Hariharan K Date: Tue, 19 Sep 2023 13:06:14 +0530 Subject: [PATCH 4/9] ipq9574: Add support for AL02-C20 Changing RDP467 to AL02-C20. Also updating the return machid type for AL02-C11 similar to AL02-C12, since AL02-C11 is converted to RDP455 configuration. Change-Id: I87e3b954d1ea9f38b24504f5b5754f9fef38df83 Signed-off-by: Hariharan K --- arch/arm/include/asm/mach-types.h | 2 +- board/qca/arm/ipq9574/ipq9574.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index d32969ddba..33df12fe03 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -1171,9 +1171,9 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_IPQ9574_AP_AL02_C14 0x8050D01 #define MACH_TYPE_IPQ9574_AP_AL02_C15 0x8050E01 #define MACH_TYPE_IPQ9574_AP_AL02_C16 0x8050F01 +#define MACH_TYPE_IPQ9574_AP_AL02_C20 0x8051301 #define MACH_TYPE_IPQ9574_AP_AL03_C1 0x8050002 #define MACH_TYPE_IPQ9574_AP_AL03_C2 0x8050102 -#define MACH_TYPE_IPQ9574_RDP467 0x8051301 #define MACH_TYPE_IPQ5332_EMULATION 0xF060000 #define MACH_TYPE_IPQ5332_AP_MI01_3 0x8060002 #define MACH_TYPE_IPQ5332_AP_MI01_3_C2 0x8060102 diff --git a/board/qca/arm/ipq9574/ipq9574.c b/board/qca/arm/ipq9574/ipq9574.c index 509b92b720..6552875790 100644 --- a/board/qca/arm/ipq9574/ipq9574.c +++ b/board/qca/arm/ipq9574/ipq9574.c @@ -1382,7 +1382,7 @@ unsigned int get_dts_machid(unsigned int machid) case MACH_TYPE_IPQ9574_AP_AL02_C6: return MACH_TYPE_IPQ9574_AP_AL02_C1; case MACH_TYPE_IPQ9574_AP_AL02_C11: - return MACH_TYPE_IPQ9574_AP_AL02_C13; + return MACH_TYPE_IPQ9574_AP_AL02_C4; case MACH_TYPE_IPQ9574_AP_AL02_C12: return MACH_TYPE_IPQ9574_AP_AL02_C4; case MACH_TYPE_IPQ9574_AP_AL02_C14: @@ -1391,10 +1391,10 @@ unsigned int get_dts_machid(unsigned int machid) return MACH_TYPE_IPQ9574_AP_AL02_C1; case MACH_TYPE_IPQ9574_AP_AL02_C16: return MACH_TYPE_IPQ9574_AP_AL02_C13; + case MACH_TYPE_IPQ9574_AP_AL02_C20: + return MACH_TYPE_IPQ9574_AP_AL02_C13; case MACH_TYPE_IPQ9574_AP_AL03_C2: return MACH_TYPE_IPQ9574_AP_AL03_C1; - case MACH_TYPE_IPQ9574_RDP467: - return MACH_TYPE_IPQ9574_AP_AL02_C13; default: return machid; } @@ -1442,16 +1442,16 @@ void ipq_uboot_fdt_fixup(void) config_list[config_nos++] = "config@rdp456"; config_list[config_nos++] = "config-rdp456"; break; + case MACH_TYPE_IPQ9574_AP_AL02_C20: + config_list[config_nos++] = "config@al02-c20"; + config_list[config_nos++] = "config@rdp467"; + config_list[config_nos++] = "config-rdp467"; + break; case MACH_TYPE_IPQ9574_AP_AL03_C2: config_list[config_nos++] = "config@al03-c2"; config_list[config_nos++] = "config@rdp458"; config_list[config_nos++] = "config-rdp458"; break; - case MACH_TYPE_IPQ9574_RDP467: - config_list[config_nos++] = "config@rdp467"; - config_list[config_nos++] = "config@rdp467"; - config_list[config_nos++] = "config-rdp467"; - break; } if (config_nos) From 8104d4526513e57fcea9589206bee93c153a7fd1 Mon Sep 17 00:00:00 2001 From: Ram Kumar D Date: Mon, 25 Sep 2023 14:35:37 +0530 Subject: [PATCH 5/9] tools: pack_v2: resolving wifi fw section name mis-match This patch resolves the wififw section name mis-match for the nor flash types. In image info, wififw-SHA-HASH is used, whereas in the scripts wifi_fw_ipq5332_qcn6432-SHA-HASH is used. It occur on nor-only build. For nand/nor+nand, wifi usually in the ubi volume. Incase of emmc, it is properly taken care. So, handled all nor-only cases (including tiny-nor) as similar as emmc case. Change-Id: I3741a8255da487ad0546d9706933d19f1b1a3a93 Signed-off-by: Ram Kumar D --- tools/pack_v2.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tools/pack_v2.py b/tools/pack_v2.py index 4c71b1f48a..834f1023dd 100644 --- a/tools/pack_v2.py +++ b/tools/pack_v2.py @@ -1414,30 +1414,30 @@ class Pack(object): filename = img.text; else: - # wififw images specific for RDP based on machid - if section_conf == "wififw": - if ver_check: - for k, v in wifi_fws_avail.items(): - self.__gen_script_append_images(k, soc_version, 1, images, flinfo, root, section_conf, partition) - else: - for wifi_fw_type in wifi_fw_list: - fw_name = wifi_fw_type - if fw_name == "": - continue - if not os.path.exists(os.path.join(self.images_dname, fw_name)): - return 0 - self.__gen_script_append_images(fw_name, soc_version, wifi_fw_type, images, flinfo, root, section_conf, partition) - wifi_fw_type = "" - fw_name = "" - - continue - if section != None and filename != "" and section.get('filename_mem' + memory_size) != None: filename = section.get('filename_mem' + memory_size) if section != None and atf == "true" and section.get('filename_atf') != None: filename = section.get('filename_atf') + # wififw images specific for RDP based on machid + if self.flash_type in [ "emmc" , "tiny-nor", "tiny-nor-debug", "nor" ] and section_conf == "wififw": + if ver_check: + for k, v in wifi_fws_avail.items(): + self.__gen_script_append_images(k, soc_version, 1, images, flinfo, root, section_conf, partition) + else: + for wifi_fw_type in wifi_fw_list: + fw_name = wifi_fw_type + if fw_name == "": + continue + if not os.path.exists(os.path.join(self.images_dname, fw_name)): + return 0 + self.__gen_script_append_images(fw_name, soc_version, wifi_fw_type, images, flinfo, root, section_conf, partition) + wifi_fw_type = "" + fw_name = "" + + continue + if filename != "": self.__gen_script_append_images(filename, soc_version, wifi_fw_type, images, flinfo, root, section_conf, partition) From 34c2bbf2d87d66920388dd04109213810b00bde8 Mon Sep 17 00:00:00 2001 From: Saahil Tomar Date: Fri, 22 Sep 2023 14:09:50 +0530 Subject: [PATCH 6/9] arm: dts: Add MI01.2-C2 dts support This change adds MI01.2-C2 (RDP484) which is a derivative of RDP441 with PON SFP connected and ethernet SFP plugged out. Change-Id: I2075b3a4f09e510bbc5f188209435b97b06e5ba7 Signed-off-by: Saahil Tomar --- arch/arm/include/asm/mach-types.h | 2 ++ board/qca/arm/ipq5332/ipq5332.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index d32969ddba..62a65c9986 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -1175,6 +1175,8 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_IPQ9574_AP_AL03_C2 0x8050102 #define MACH_TYPE_IPQ9574_RDP467 0x8051301 #define MACH_TYPE_IPQ5332_EMULATION 0xF060000 +#define MACH_TYPE_IPQ5332_AP_MI01_2 0x8060001 +#define MACH_TYPE_IPQ5332_AP_MI01_2_C2 0x8060201 #define MACH_TYPE_IPQ5332_AP_MI01_3 0x8060002 #define MACH_TYPE_IPQ5332_AP_MI01_3_C2 0x8060102 #define MACH_TYPE_IPQ5332_AP_MI04_1 0x8060004 diff --git a/board/qca/arm/ipq5332/ipq5332.c b/board/qca/arm/ipq5332/ipq5332.c index 09ad7636fb..dc25a18abd 100644 --- a/board/qca/arm/ipq5332/ipq5332.c +++ b/board/qca/arm/ipq5332/ipq5332.c @@ -823,6 +823,8 @@ unsigned int get_dts_machid(unsigned int machid) { switch (machid) { + case MACH_TYPE_IPQ5332_AP_MI01_2_C2: + return MACH_TYPE_IPQ5332_AP_MI01_2; case MACH_TYPE_IPQ5332_AP_MI01_3_C2: return MACH_TYPE_IPQ5332_AP_MI01_3; case MACH_TYPE_IPQ5332_AP_MI04_1_C2: @@ -844,6 +846,11 @@ void ipq_uboot_fdt_fixup(void) switch (gd->bd->bi_arch_number) { + case MACH_TYPE_IPQ5332_AP_MI01_2_C2: + config_list[config_nos++] = "config@mi01.2-c2"; + config_list[config_nos++] = "config@rdp484"; + config_list[config_nos++] = "config-rdp484"; + break; case MACH_TYPE_IPQ5332_AP_MI01_3_C2: config_list[config_nos++] = "config@mi01.3-c2"; config_list[config_nos++] = "config@rdp477"; From 04a18622ddb62cc1f1e585070d830e36d6579760 Mon Sep 17 00:00:00 2001 From: Vijay Balaji Date: Wed, 6 Sep 2023 10:38:11 +0530 Subject: [PATCH 7/9] sysupgrade-helper : Fix warnings during compilation This change will fix warnings occurred during compilation of sysupgrade source files Change-Id: I0526da607b383064b4c5cea7462fe4c12c669a3b Signed-off-by: Vijay Balaji (cherry picked from commit 6a7c18c463ad605c7ea9cf3e1c1226bf2bc403fa) --- tools/sysupgrade.c | 14 +++++++++----- tools/sysupgrade.h | 4 +++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/sysupgrade.c b/tools/sysupgrade.c index a74705e807..e195c9efc0 100644 --- a/tools/sysupgrade.c +++ b/tools/sysupgrade.c @@ -794,7 +794,7 @@ int get_ubi_volume_id(char *vol_name) fgets(ubi_vol_name, sizeof(ubi_vol_name), fp); if (strstr(ubi_vol_name, vol_name)) { printf("%s volume id = %d\n", vol_name, i); - close(fp); + fclose(fp); return i; } } @@ -811,10 +811,11 @@ int get_ubi_volume_id(char *vol_name) * to get the ELF header of rootfs metadata. */ -void extract_binary(struct image_section *section) +int extract_binary(struct image_section *section) { extract_kernel_binary(section, "kernel"); parse_elf_image_phdr(section); + return 1; } /** @@ -1013,7 +1014,7 @@ int extract_rootfs_binary(char *filename) fp = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, ifd, 0); if (fp == MAP_FAILED) { perror("mmap"); - close(fp); + close(ifd); return 0; } @@ -1049,13 +1050,16 @@ int compute_sha_hash(struct image_section *section) int retval; #ifdef USE_SHA384 - snprintf(command, sizeof(command), + retval = snprintf(command, sizeof(command), "openssl dgst -sha384 -binary -out %s %s", sha_hash, section->tmp_file); #endif #ifdef USE_SHA256 - snprintf(command, sizeof(command), + retval = snprintf(command, sizeof(command), "openssl dgst -sha256 -binary -out %s %s", sha_hash, section->tmp_file); #endif + if (retval < 0) { + return retval; + } retval = system(command); if (retval != 0) { printf("Error generating sha-hash, command : %s\n",command); diff --git a/tools/sysupgrade.h b/tools/sysupgrade.h index f0bd19a67e..bdca2405bf 100644 --- a/tools/sysupgrade.h +++ b/tools/sysupgrade.h @@ -113,8 +113,10 @@ int is_version_check_enabled(void); int get_sw_id_from_component_bin(struct image_section *); int get_sw_id_from_component_bin_elf(struct image_section *); int get_sw_id_from_component_bin_elf64(struct image_section *); -void extract_binary(struct image_section *); +int extract_binary(struct image_section *); int extract_kernel_binary(struct image_section *, char *); +int extract_ubi_volume(char *, char *, char *); +int extract_rootfs_binary(char *); int is_image_version_higher(void); int update_version(void); int check_image_version(void); From f52ebe8b10fdd2d9ad348374005f6e1d4f36b37a Mon Sep 17 00:00:00 2001 From: Gokul Sriram Palanisamy Date: Wed, 27 Sep 2023 19:16:44 +0530 Subject: [PATCH 8/9] tools: pack_v2: fix wififw image flashing script tiny-nor was using ubi volume name "wifi_fw" instead of partition name "0:WIFIFW". This change fixes the same. Change-Id: I55dc83a2cc40178ffffdfa25fe20a739f21040ad Signed-off-by: Gokul Sriram Palanisamy --- tools/pack_v2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/pack_v2.py b/tools/pack_v2.py index 4c71b1f48a..b62aea9fc8 100644 --- a/tools/pack_v2.py +++ b/tools/pack_v2.py @@ -630,12 +630,12 @@ class Pack(object): if ver_check == True: combs = self.__find_wifi_fw_ver_combinations(filename) for k, v in combs.items(): - if flinfo.type != "emmc": + if self.flash_type in ["nand", "nand-4k", "norplusnand", "norplusnand-4k"]: self.__gen_flash_script_for_ubi_wififw(k, script, v) else: self.__gen_flash_script_for_non_ubi_wififw(partition, k, flinfo, script, v) else: - if flinfo.type != "emmc": + if self.flash_type in ["nand", "nand-4k", "norplusnand", "norplusnand-4k"]: self.__gen_flash_script_for_ubi_wififw(filename, script, None) else: self.__gen_flash_script_for_non_ubi_wififw(partition, filename, flinfo, script, None) From b2c1ec334dd3ed358a014472fb0c22b966e59e46 Mon Sep 17 00:00:00 2001 From: Timple Raj M Date: Fri, 29 Sep 2023 19:43:34 +0530 Subject: [PATCH 9/9] pack_v2: Update the image_type condition check for 0:WIFIFW This patch updates the image_type condition check for 0:WIFIFW since emmc-partition.xml each partition information is parsed in single xml tag but for other partition.xml files each partition information is mentioned in multiple xml tags For Example ipq5332/flash_partition/tiny-nor-partition.xml 0:WIFIFW 5500 0 0 0xFF 0xFF 0x00 0xFF wifi_fw_ipq5332_qcn6432_squashfs.img ipq5332/flash_partition/emmc-partition.xml Change-Id: I1b5835b0835f2c05958924ad6ce5f403e934aac4 Signed-off-by: Timple Raj M --- tools/pack_v2.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/pack_v2.py b/tools/pack_v2.py index 46f0186a26..a647c7b1f7 100644 --- a/tools/pack_v2.py +++ b/tools/pack_v2.py @@ -1046,7 +1046,12 @@ class Pack(object): if no_fw_mach_ids and filename != "": self.__gen_flash_script_update_for_wififw(partition, filename, flinfo, script, no_fw_mach_ids) - if image_type == "all" or section.attrib['image_type'] == image_type: + if flinfo.type == "emmc": + section_img_type = section.attrib['image_type'] + else: + section_img_type = section[8].attrib['image_type'] + + if image_type == "all" or section_img_type == image_type: for wifi_fw_type in wifi_fw_list: fw_name = wifi_fw_type if fw_name == "":