Files
operating-system/buildroot-external/board/pc/patches/dt-utils/0002-libdt-support-finding-devices-by-partuuid.patch
Stefan Agner 28e3b109b7 Rename Intel NUC machine to Generic x86-64 (#1209)
* Rename Intel NUC machine to Generic x86-64

The Intel NUC machine has evolved and supports various x86-64 machines
today. Rename the board.

Note that this does not address the migration issue. This will be
handled separately.

* Update Scripts/Documentation
2021-03-09 15:25:35 +01:00

40 lines
1.3 KiB
Diff

From 4eb260d97419349320aa688866b4cf1eb177df70 Mon Sep 17 00:00:00 2001
Message-Id: <4eb260d97419349320aa688866b4cf1eb177df70.1606682453.git.stefan@agner.ch>
In-Reply-To: <4e9abe7945370765a9e8e88b01a7ef5f266bf7fd.1606682453.git.stefan@agner.ch>
References: <4e9abe7945370765a9e8e88b01a7ef5f266bf7fd.1606682453.git.stefan@agner.ch>
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Date: Fri, 30 Jun 2017 16:53:17 +0200
Subject: [PATCH dt-utils 2/3] libdt: support finding devices by partuuid
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
src/libdt.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/libdt.c b/src/libdt.c
index 4638678..b52f80c 100644
--- a/src/libdt.c
+++ b/src/libdt.c
@@ -2416,6 +2416,18 @@ int of_get_devicepath(struct device_node *partition_node, char **devpath, off_t
*/
node = partition_node->parent;
+ if (of_device_is_compatible(node, "fixed-partitions")) {
+ const char *uuid;
+
+ /* when partuuid is specified short-circuit the search for the cdev */
+ ret = of_property_read_string(partition_node, "partuuid", &uuid);
+ if (!ret) {
+ *devpath = basprintf("/dev/disk/by-partuuid/%s", uuid);
+
+ return 0;
+ }
+ }
+
/*
* Respect flash "partitions" subnode. Use parent of parent in this
* case.
--
2.29.2