From 88291f26e6ff5a090c821415f92d16fac3845d8d Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Thu, 21 Dec 2023 13:01:59 -0300 Subject: [PATCH] refactor!: remove emulator patch version from device tree --- src/dtb.cpp | 2 +- tools/template/machine-c-version.h.template | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dtb.cpp b/src/dtb.cpp index 42341babc..95c8022c5 100644 --- a/src/dtb.cpp +++ b/src/dtb.cpp @@ -75,7 +75,7 @@ void dtb_init(const machine_config &c, unsigned char *dtb_start, uint64_t dtb_le // We add emulator version, so can inspect it from inside the machine by reading the FDT { // cartesi-machine fdt.begin_node("cartesi-machine"); - fdt.prop_string("version", CM_VERSION); + fdt.prop_string("version", CM_VERSION_MAJMIN); fdt.prop_string_data("init", c.dtb.init); fdt.prop_string_data("entrypoint", c.dtb.entrypoint); fdt.end_node(); diff --git a/tools/template/machine-c-version.h.template b/tools/template/machine-c-version.h.template index c2c4e1a68..ee2b0d77f 100644 --- a/tools/template/machine-c-version.h.template +++ b/tools/template/machine-c-version.h.template @@ -29,8 +29,9 @@ #define _CM_STR(x) _CM_STR_HELPER(x) #define CM_VERSION \ _CM_STR(CM_VERSION_MAJOR) "." _CM_STR(CM_VERSION_MINOR) "." _CM_STR(CM_VERSION_PATCH) CM_VERSION_LABEL +#define CM_VERSION_MAJMIN _CM_STR(CM_VERSION_MAJOR) "." _CM_STR(CM_VERSION_MINOR) -#define CM_MIMPID (CM_VERSION_MAJOR * 1000000 + CM_VERSION_MINOR) +#define CM_MIMPID (CM_VERSION_MAJOR * 1000 + CM_VERSION_MINOR) // NOLINTEND #endif // MACHINE_EMULATOR_SDK_MACHINE_C_VERSION_H