mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
AU_LINUX_QSDK_GINGER_TARGET_ALL.12.4.5.1584.122
-----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQTxBDvDjyiEYwLkeGuhSA9lgKkB8QUCZNxlaAAKCRChSA9lgKkB 8ZeCAKDSIlZVc/G9zOhdJC6rE8Gv/wPHGACffObILMCcgyb4/vWUsVPBy4kqB+I= =gl4N -----END PGP SIGNATURE----- Merge AU_LINUX_QSDK_GINGER_TARGET_ALL.12.4.5.1584.122 on remote branch Change-Id: I136a51511fe38a3e90fb672b319106b99ce3f568 Signed-off-by: Linux Build Service Account <lnxbuild@localhost>
This commit is contained in:
commit
b725f96046
4 changed files with 34 additions and 22 deletions
|
|
@ -38,6 +38,7 @@
|
|||
#include <usb.h>
|
||||
#endif
|
||||
|
||||
#define CONFIG_NAME_MAX_LEN 128
|
||||
#define FLASH_SEL_BIT 7
|
||||
#define LINUX_NAND_DTS "/soc/nand@79b0000/"
|
||||
#define LINUX6_1_NAND_DTS "/soc@0/nand@79b0000/"
|
||||
|
|
@ -833,32 +834,48 @@ unsigned int get_dts_machid(unsigned int machid)
|
|||
|
||||
void ipq_uboot_fdt_fixup(void)
|
||||
{
|
||||
int ret, len;
|
||||
char *config = NULL;
|
||||
int ret, len = 0, config_nos = 0;
|
||||
char config[CONFIG_NAME_MAX_LEN];
|
||||
char *config_list[6] = { NULL };
|
||||
|
||||
switch (gd->bd->bi_arch_number)
|
||||
{
|
||||
case MACH_TYPE_IPQ5332_AP_MI01_3_C2:
|
||||
config = "config@mi01.3-c2";
|
||||
config_list[config_nos++] = "config@mi01.3-c2";
|
||||
config_list[config_nos++] = "config@rdp477";
|
||||
config_list[config_nos++] = "config-rdp477";
|
||||
break;
|
||||
case MACH_TYPE_IPQ5332_AP_MI04_1_C2:
|
||||
config = "config@mi04.1-c2";
|
||||
config_list[config_nos++] = "config@mi04.1-c2";
|
||||
config_list[config_nos++] = "config@rdp478";
|
||||
config_list[config_nos++] = "config-rdp478";
|
||||
break;
|
||||
}
|
||||
|
||||
if (config != NULL)
|
||||
if (config_nos)
|
||||
{
|
||||
len = fdt_totalsize(gd->fdt_blob) + strlen(config) + 1;
|
||||
while (config_nos--) {
|
||||
strlcpy(&config[len], config_list[config_nos],
|
||||
CONFIG_NAME_MAX_LEN - len);
|
||||
len += strnlen(config_list[config_nos],
|
||||
CONFIG_NAME_MAX_LEN) + 1;
|
||||
if (len > CONFIG_NAME_MAX_LEN) {
|
||||
printf("skipping uboot fdt fixup err: "
|
||||
"config name len-overflow\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Open in place with a new length.
|
||||
*/
|
||||
ret = fdt_open_into(gd->fdt_blob, (void *)gd->fdt_blob, len);
|
||||
ret = fdt_open_into(gd->fdt_blob, (void *)gd->fdt_blob,
|
||||
fdt_totalsize(gd->fdt_blob) + len);
|
||||
if (ret)
|
||||
printf("uboot-fdt-fixup: Cannot expand FDT: %s\n", fdt_strerror(ret));
|
||||
|
||||
ret = fdt_setprop((void *)gd->fdt_blob, 0, "config_name",
|
||||
config, (strlen(config)+1));
|
||||
config, len);
|
||||
if (ret)
|
||||
printf("uboot-fdt-fixup: unable to set config_name(%d)\n", ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,15 +118,13 @@ static int do_derive_aes_256_key(cmd_tbl_t *cmdtp, int flag,
|
|||
struct crypto_aes_derive_key_cmd_t *req_ptr = NULL;
|
||||
int ret = CMD_RET_USAGE;
|
||||
uintptr_t *key_handle = NULL;
|
||||
char *context_buf = NULL;
|
||||
uint8_t *context_buf = NULL;
|
||||
int context_len = 0;
|
||||
int i = 0, j = 0;
|
||||
unsigned char temp;
|
||||
|
||||
if (argc != 5)
|
||||
return ret;
|
||||
|
||||
context_buf = argv[3];
|
||||
context_buf = (uint8_t *)simple_strtoul(argv[3], NULL, 16);;
|
||||
context_len = simple_strtoul(argv[4], NULL, 16);
|
||||
if (context_len > 64) {
|
||||
printf("Error: context length should be less than 64\n");
|
||||
|
|
@ -142,19 +140,14 @@ static int do_derive_aes_256_key(cmd_tbl_t *cmdtp, int flag,
|
|||
req_ptr->policy.key_type = DEFAULT_KEY_TYPE;
|
||||
req_ptr->policy.destination = DEFAULT_POLICY_DESTINATION;
|
||||
req_ptr->source = simple_strtoul(argv[1], NULL, 16);
|
||||
req_ptr->hw_key_bindings.bindings = simple_strtoul(argv[2], NULL, 16);;
|
||||
req_ptr->hw_key_bindings.bindings = simple_strtoul(argv[2], NULL, 16);
|
||||
key_handle = (uintptr_t *)memalign(ARCH_DMA_MINALIGN,
|
||||
sizeof(uint64_t));
|
||||
req_ptr->key = (uintptr_t) key_handle;
|
||||
req_ptr->mixing_key = 0;
|
||||
req_ptr->hw_key_bindings.context_len = context_len;
|
||||
|
||||
while(context_buf[i] != '\0' && i < context_len*2) {
|
||||
temp = toBinary(context_buf[i]) << 4;
|
||||
temp += toBinary(context_buf[i+1]);
|
||||
req_ptr->hw_key_bindings.context[j] = temp;
|
||||
j++;
|
||||
i += 2;
|
||||
while (i < context_len) {
|
||||
req_ptr->hw_key_bindings.context[j++] = context_buf[i++];
|
||||
}
|
||||
ret = qca_scm_crypto(TZ_CRYPTO_SERVICE_AES_DERIVE_KEY_ID, (void *)req_ptr,
|
||||
sizeof(struct crypto_aes_derive_key_cmd_t));
|
||||
|
|
|
|||
|
|
@ -411,8 +411,7 @@ static int part_validate(struct mtdids *id, struct part_info *part)
|
|||
}
|
||||
|
||||
if (part->offset + part->size > id->size) {
|
||||
printf("%s: partitioning exceeds flash size\n", id->mtd_id);
|
||||
return 1;
|
||||
printf("%s: partitioning (%s) exceeds flash size\n", id->mtd_id, part->name);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -817,6 +817,9 @@ int fdt_node_set_part_info(void *blob, int parent_offset,
|
|||
|
||||
part = list_entry(pentry, struct part_info, link);
|
||||
|
||||
if (part->offset + part->size > dev->id->size)
|
||||
continue;
|
||||
|
||||
debug("%2d: %-20s0x%08llx\t0x%08llx\t%d\n",
|
||||
part_num, part->name, part->size,
|
||||
part->offset, part->mask_flags);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue