summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-02-18 12:59:21 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-02-18 12:59:21 +0100
commit37fddd1ae02aac9f10eacd16bbd6142198ed7342 (patch)
treee621ad4d7dadc0fa18e267c2414c1032f3ac9963 /common
parent9481ada6ad354cfe38418354afee48ceca438c05 (diff)
parent2efa9e490569f909c6ba796d192b623ec9766b82 (diff)
downloadbarebox-37fddd1ae02aac9f10eacd16bbd6142198ed7342.tar.gz
barebox-37fddd1ae02aac9f10eacd16bbd6142198ed7342.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'common')
-rw-r--r--common/Kconfig8
-rw-r--r--common/imd-barebox.c10
2 files changed, 17 insertions, 1 deletions
diff --git a/common/Kconfig b/common/Kconfig
index 667b0a1e79..f7a6a96e87 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -730,6 +730,12 @@ config IMD
select CRC32
bool "barebox metadata support"
+config IMD_ENDIANNESS
+ bool "add endianness record to metadata"
+ depends on IMD
+ depends on SYS_SUPPORTS_LITTLE_ENDIAN && SYS_SUPPORTS_BIG_ENDIAN
+ default y
+
choice
prompt "console support"
default CONSOLE_FULL
@@ -1044,7 +1050,7 @@ config RESET_SOURCE
config MACHINE_ID
bool "compute unique machine-id"
depends on FLEXIBLE_BOOTARGS
- depends on SHA1
+ depends on HAVE_DIGEST_SHA1
help
Compute a persistent machine-specific id and store it to $global.machine_id.
The id is a hash of device-specific information added via
diff --git a/common/imd-barebox.c b/common/imd-barebox.c
index e11fdca845..7877c8de39 100644
--- a/common/imd-barebox.c
+++ b/common/imd-barebox.c
@@ -23,6 +23,16 @@ __BAREBOX_IMD_SECTION(.barebox_imd_end) = {
.type = cpu_to_le32(IMD_TYPE_END),
};
+#ifdef CONFIG_IMD_ENDIANNESS
+#ifdef CONFIG_CPU_LITTLE_ENDIAN
+#define IMD_ENDIANNESS "little"
+#else
+#define IMD_ENDIANNESS "big"
+#endif
+BAREBOX_IMD_TAG_STRING(imd_endianness_tag, IMD_TYPE_PARAMETER,
+ "endianness=" IMD_ENDIANNESS, 1);
+#endif /* CONFIG_IMD_ENDIANNESS */
+
BAREBOX_IMD_TAG_STRING(imd_build_tag, IMD_TYPE_BUILD, UTS_VERSION, 1);
BAREBOX_IMD_TAG_STRING(imd_release_tag, IMD_TYPE_RELEASE, UTS_RELEASE, 1);
BAREBOX_IMD_TAG_STRING(imd_buildsystem_version_tag, IMD_TYPE_BUILDSYSTEM, BUILDSYSTEM_VERSION, 1);