From 622fd6199bcb447ec31b8ed210d8bd75e784dd56 Mon Sep 17 00:00:00 2001 From: Gokul Sriram Palanisamy Date: Mon, 3 Jul 2017 14:05:45 +0530 Subject: [PATCH] ARM: qca: Added fdt-fixup for RPM version Added fdt-fixup for patching RPM version string to kernel device-tree that may be required for test automation and build component information. Change-Id: I6dedecbe17ecea1a211e3d0a8d64aa1f3835f821 Signed-off-by: Gokul Sriram Palanisamy --- board/qca/arm/common/fdt_fixup.c | 10 ++++++++++ include/configs/ipq807x.h | 1 + 2 files changed, 11 insertions(+) diff --git a/board/qca/arm/common/fdt_fixup.c b/board/qca/arm/common/fdt_fixup.c index cd169275a8..83a489e9de 100644 --- a/board/qca/arm/common/fdt_fixup.c +++ b/board/qca/arm/common/fdt_fixup.c @@ -119,6 +119,16 @@ void ipq_fdt_fixup_version(void *blob) if (ret) debug("fdt-fixup: unable to set TZ version(%d)\n", ret); } + +#ifdef RPM_VERSION + if (!smem_get_build_version(ver, sizeof(ver), RPM_VERSION)) { + debug("RPM Build Version: %s\n", ver); + ret = fdt_setprop(blob, nodeoff, "rpm_version", + ver, strlen(ver)); + if (ret) + debug("fdt-fixup: unable to set RPM version(%d)\n", ret); + } +#endif /* RPM_VERSION */ } void ipq_fdt_fixup_mtdparts(void *blob, struct flash_node_info *ni) diff --git a/include/configs/ipq807x.h b/include/configs/ipq807x.h index c760a0a64a..5f5928813d 100644 --- a/include/configs/ipq807x.h +++ b/include/configs/ipq807x.h @@ -233,6 +233,7 @@ extern loff_t board_env_size; #define SCM_CMD_TZ_FORCE_DLOAD_ID 0x10 #define BOOT_VERSION 0 #define TZ_VERSION 1 +#define RPM_VERSION 3 #endif #define CONFIG_FDT_FIXUP_PARTITIONS