Since Tizen 6.5, a HAL image is mounted on the /hal directory,
which contains hardware-specific configurations and drivers,
for better portability of Tizen.
This is the priority of path searching for configuration file.
1. /etc/
2. /run/
3. /usr/local/lib/
4. /usr/lib/
5. /hal/lib/
When the same file exists, the higher priority file is used.
In this case, "/etc" is the highest priority.
Because hal can never override platform,
hal has a lower priority than platform.
Change-Id: Ie5e6cf98e64b4317bda23d49571b5c0f60084569
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
[ Change search order for /hal to be searched last ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
#define VARLINK_ADDR_PATH_MANAGED_OOM_USER "/run/systemd/oom/io.systemd.ManagedOOM"
#define KERNEL_BASELINE_VERSION "4.15"
+
+#include "tizenhal.h"
--- /dev/null
+/* SPDX-License-Identifier: LGPL-2.1+ */
+
+/* Since Tizen 6.5, a HAL image is mounted on the /hal directory,
+ * which contains hardware-specific configurations and drivers,
+ * for better portability of Tizen.
+ */
+#pragma once
+
+#define CONF_HAL_PATHS(n) \
+ CONF_PATHS(n), \
+ "/hal/lib/" n
+
+#define CONF_HAL_PATHS_NULSTR(n) \
+ CONF_PATHS_NULSTR(n) \
+ "/hal/lib/" n "\0"
+
+#define CONF_HAL_PATHS_STRV(n) \
+ STRV_MAKE(CONF_HAL_PATHS(n))
break;
case RUNTIME_SCOPE_SYSTEM:
- config_dirs = strv_split_nulstr(CONF_PATHS_NULSTR("tmpfiles.d"));
+ config_dirs = strv_split_nulstr(CONF_HAL_PATHS_NULSTR("tmpfiles.d"));
if (!config_dirs)
return log_oom();
break;
#include "user-util.h"
#include "virt.h"
-#define RULES_DIRS ((const char* const*) CONF_PATHS_STRV("udev/rules.d"))
+#define RULES_DIRS (const char* const*) CONF_HAL_PATHS_STRV("udev/rules.d")
typedef enum {
OP_MATCH, /* == */