From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 4/5] sandbox: dts: populate $global.machine_id
Date: Mon, 28 Jun 2021 08:40:35 +0200 [thread overview]
Message-ID: <20210628064036.25991-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20210628064036.25991-1-a.fatoum@pengutronix.de>
/etc/machine-id is 0444 by default, so it makes sense to use it for
sandbox machine ID. Do so.
Note that the machine ID will be constant, but not equal as barebox
will hash the ASCII representation.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/sandbox/dts/sandbox.dts | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index 5b2cab219e2a..cd0022f777ed 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -13,6 +13,7 @@
};
chosen {
+ barebox,machine-id-path = &machine_id;
environment {
compatible = "barebox,environment";
device-path = &part_env;
@@ -101,6 +102,33 @@
};
};
+ machine-id {
+ compatible = "barebox,hostfile";
+ barebox,filename = "/etc/machine-id";
+ barebox,read-only;
+ reg = <0 0 0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ compatible = "nvmem-cells";
+ reg = <0x0 0x20>;
+ label = "nvmem";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ machine_id: machine-id@0 {
+ reg = <0x0 0x20>;
+ };
+ };
+ };
+ };
+
power {
compatible = "barebox,sandbox-power";
nvmem-cell-names = "reset-source";
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-06-28 6:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-28 6:40 [PATCH 1/5] common: machine_id: support /chosen/barebox, machine-id-path override Ahmad Fatoum
2021-06-28 6:40 ` [PATCH 2/5] ARM: stm32mp: migrate to barebox,machine-id-path Ahmad Fatoum
2021-06-28 6:40 ` [PATCH 3/5] common: machine_id: deprecate machine_id_set_hashable Ahmad Fatoum
2021-06-28 9:50 ` Bastian Krause
2021-06-28 10:12 ` Ahmad Fatoum
2021-06-28 6:40 ` Ahmad Fatoum [this message]
2021-06-28 6:40 ` [PATCH 5/5] ARM: dts: stm32mp: retire barebox, provide-mac-address in favor of NVMEM Ahmad Fatoum
2021-06-28 9:28 ` [PATCH 1/5] common: machine_id: support /chosen/barebox,machine-id-path override Ahmad Fatoum
2021-06-28 9:35 ` [PATCH 1/5] common: machine_id: support /chosen/barebox, machine-id-path override Bastian Krause
2021-06-28 10:11 ` Ahmad Fatoum
2021-06-28 20:20 ` Sascha Hauer
[not found] ` <CAMHeXxOT__KBUKG6GkNAEkqz4tMBBzuZ7OgnKa0_OX5hz-JEig@mail.gmail.com>
2021-06-30 10:27 ` Ahmad Fatoum
2021-06-30 20:13 ` Trent Piepho
2021-09-15 10:55 ` Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210628064036.25991-4-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox