mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
Merge "ipq806x: support to add the boot version to the device tree"
This commit is contained in:
commit
ff83336bcd
2 changed files with 22 additions and 0 deletions
|
|
@ -366,6 +366,20 @@ int smem_get_boot_flash(uint32_t *flash_type,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ipq_smem_get_boot_version(char *version_name, int buf_size)
|
||||
{
|
||||
int ret;
|
||||
qca_platform_v1 platform_info;
|
||||
|
||||
ret = smem_read_alloc_entry(SMEM_HW_SW_BUILD_ID, &platform_info,
|
||||
sizeof(qca_platform_v1));
|
||||
if (ret != 0)
|
||||
return -ENOMSG;
|
||||
|
||||
snprintf(version_name, buf_size, "%s\n", platform_info.build_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int smem_get_build_version(char *version_name, int buf_size, int index)
|
||||
{
|
||||
int ret;
|
||||
|
|
|
|||
|
|
@ -122,6 +122,14 @@ void ipq_fdt_fixup_version(void *blob)
|
|||
if (ret)
|
||||
debug("fdt-fixup: unable to set Boot version(%d)\n", ret);
|
||||
}
|
||||
/* ipq806x doesn't have image version table in SMEM */
|
||||
else if (!ipq_smem_get_boot_version(ver, sizeof(ver))) {
|
||||
debug("BOOT Build Version: %s\n", ver);
|
||||
ret = fdt_setprop(blob, nodeoff, "boot_version",
|
||||
ver, strlen(ver));
|
||||
if (ret)
|
||||
debug("fdt-fixup: unable to set Boot version(%d)\n", ret);
|
||||
}
|
||||
|
||||
if (!smem_get_build_version(ver, sizeof(ver), TZ_VERSION)) {
|
||||
debug("TZ Build Version: %s\n", ver);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue