summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorRoland Hieber <rhi@pengutronix.de>2023-08-14 17:52:35 +0200
committerRobert Schwebel <r.schwebel@pengutronix.de>2023-08-15 09:58:58 +0200
commitca6716f808f27ee77d7b09fb04bf89a7ad3c1a22 (patch)
treef41854513023b83602cb13cf99dac20194d85748 /rules
parente0d4408ef8d07546d778e7d2988951445174d4ba (diff)
downloadDistroKit-ca6716f808f27ee77d7b09fb04bf89a7ad3c1a22.tar.gz
DistroKit-ca6716f808f27ee77d7b09fb04bf89a7ad3c1a22.tar.xz
rauc-udev: add a compatibility layer for mapping partitions
When we add RAUC support for different platforms later, we need a way to specify their respective root partitions in RAUC's system.conf; however, the names of the actual partitions can differ on different hardware platforms. Add a short udev rule that can add symlinks to the actual partitions based on the device tree compatible. This way we can refer to the partitions in system.conf using the symlinks on all boards that we want to support. This commit only adds a stub for now; we will add the code that creates the actual symlinks for each hardware in later commits. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'rules')
-rw-r--r--rules/rauc-udev.in10
-rw-r--r--rules/rauc-udev.make37
2 files changed, 47 insertions, 0 deletions
diff --git a/rules/rauc-udev.in b/rules/rauc-udev.in
new file mode 100644
index 0000000..f960c53
--- /dev/null
+++ b/rules/rauc-udev.in
@@ -0,0 +1,10 @@
+## SECTION=project_specific
+
+config RAUC_UDEV
+ tristate
+ prompt "rauc udev rules"
+ select BUSYBOX if RUNTIME
+ select BUSYBOX_TR if RUNTIME
+ select UDEV if RUNTIME
+ help
+ udev rules for cross-hardware-compatible partition symlinks
diff --git a/rules/rauc-udev.make b/rules/rauc-udev.make
new file mode 100644
index 0000000..6a806fc
--- /dev/null
+++ b/rules/rauc-udev.make
@@ -0,0 +1,37 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2021 by Roland Hieber, Pengutronix <rhi@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_RAUC_UDEV) += rauc-udev
+
+RAUC_UDEV_VERSION := 1
+RAUC_UDEV_LICENSE := 0-BSD
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/rauc-udev.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, rauc-udev)
+ @$(call install_fixup,rauc-udev,PRIORITY,optional)
+ @$(call install_fixup,rauc-udev,SECTION,base)
+ @$(call install_fixup,rauc-udev,AUTHOR,"Roland Hieber, Pengutronix <rhi@pengutronix.de>")
+ @$(call install_fixup,rauc-udev,DESCRIPTION,missing)
+
+ @$(call install_alternative, rauc-udev, 0, 0, 0755, /usr/lib/udev/of_base_compatible)
+ @$(call install_alternative, rauc-udev, 0, 0, 0644, /usr/lib/udev/rules.d/90-rauc-partitions.rules)
+
+ @$(call install_finish,rauc-udev)
+
+ @$(call touch)
+
+# vim: syntax=make