[PATCH v2 2/2] sandbox: add a match.of_compatible directory to exercise the feature

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Apr 13 06:43:53 PDT 2026


From: Ahmad Fatoum <a.fatoum at barebox.org>

The match.of_compatible feature is mostly meant to be used with
environments originating outside barebox.

Nevertheless, switch over sandbox to use it so it gets some coverage.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
v1 -> v2:
  - no change
---
 arch/sandbox/board/defaultenv-sandbox/data/last-match           | 1 +
 .../match.of_compatible/barebox,not-sandbox/data/last-match     | 1 +
 .../match.of_compatible/barebox,not-sandbox/nv/autoboot         | 1 +
 .../match.of_compatible/barebox,sandbox/data/last-match         | 1 +
 .../match.of_compatible/barebox,sandbox/nv/autoboot             | 1 +
 arch/sandbox/board/defaultenv-sandbox/nv/autoboot               | 2 +-
 6 files changed, 6 insertions(+), 1 deletion(-)
 create mode 100644 arch/sandbox/board/defaultenv-sandbox/data/last-match
 create mode 100644 arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,not-sandbox/data/last-match
 create mode 100644 arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,not-sandbox/nv/autoboot
 create mode 100644 arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,sandbox/data/last-match
 create mode 100644 arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,sandbox/nv/autoboot

diff --git a/arch/sandbox/board/defaultenv-sandbox/data/last-match b/arch/sandbox/board/defaultenv-sandbox/data/last-match
new file mode 100644
index 000000000000..df967b96a579
--- /dev/null
+++ b/arch/sandbox/board/defaultenv-sandbox/data/last-match
@@ -0,0 +1 @@
+base
diff --git a/arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,not-sandbox/data/last-match b/arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,not-sandbox/data/last-match
new file mode 100644
index 000000000000..b175a503912d
--- /dev/null
+++ b/arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,not-sandbox/data/last-match
@@ -0,0 +1 @@
+barebox,not-sandbox
diff --git a/arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,not-sandbox/nv/autoboot b/arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,not-sandbox/nv/autoboot
new file mode 100644
index 000000000000..36ef4c374d25
--- /dev/null
+++ b/arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,not-sandbox/nv/autoboot
@@ -0,0 +1 @@
+boot
diff --git a/arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,sandbox/data/last-match b/arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,sandbox/data/last-match
new file mode 100644
index 000000000000..80fdf1459eee
--- /dev/null
+++ b/arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,sandbox/data/last-match
@@ -0,0 +1 @@
+barebox,sandbox
diff --git a/arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,sandbox/nv/autoboot b/arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,sandbox/nv/autoboot
new file mode 100644
index 000000000000..f7d13fd04662
--- /dev/null
+++ b/arch/sandbox/board/defaultenv-sandbox/match.of_compatible/barebox,sandbox/nv/autoboot
@@ -0,0 +1 @@
+abort
diff --git a/arch/sandbox/board/defaultenv-sandbox/nv/autoboot b/arch/sandbox/board/defaultenv-sandbox/nv/autoboot
index f7d13fd04662..36ef4c374d25 100644
--- a/arch/sandbox/board/defaultenv-sandbox/nv/autoboot
+++ b/arch/sandbox/board/defaultenv-sandbox/nv/autoboot
@@ -1 +1 @@
-abort
+boot
-- 
2.47.3




More information about the barebox mailing list