AU_LINUX_QSDK_FIG_TARGET_ALL.12.4.000.2264

-----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQTxBDvDjyiEYwLkeGuhSA9lgKkB8QUCZRrKYgAKCRChSA9lgKkB
 8SYmAJ4zgKB3A1YfCdoGqUSSjlEhzwGahQCgn+Nkiq5wh+Kqcfh+240lhKh9QOM=
 =BZuC
 -----END PGP SIGNATURE-----

Merge AU_LINUX_QSDK_FIG_TARGET_ALL.12.4.000.2264 on remote branch

Signed-off-by: Linux Build Service Account <lnxbuild@localhost>
Change-Id: Ieab7813c6efffd30da773ec84d4b5fa25503ecef
This commit is contained in:
Linux Build Service Account 2023-10-04 01:32:02 -07:00
commit 6445908141
9 changed files with 85 additions and 55 deletions

View file

@ -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;

View file

@ -1171,16 +1171,18 @@ 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_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
#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

View file

@ -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();

View file

@ -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)

View file

@ -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;
@ -825,14 +838,14 @@ 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:
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;
}
@ -846,6 +859,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";
@ -857,13 +875,13 @@ void ipq_uboot_fdt_fixup(void)
config_list[config_nos++] = "config-rdp478";
config_list[config_nos++] = "config@1";
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;

View file

@ -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)

View file

@ -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)
@ -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 == "":
@ -1414,30 +1419,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)

View file

@ -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);

View file

@ -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);