package/dt-utils: install barebox-state lock file
PATCH 1/1 package/dt-utils: install barebox-state lock file
By default there is no /var/lock/barebox-state file what causes the following error when we try to execute barebox-state command:
# barebox-state Failed to open lock-file /var/lock/barebox-state
Fix it by adding an empty file in post install hook.
--- package/dt-utils/dt-utils.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/dt-utils/dt-utils.mk +7 -0
@@ -12,4 +12,11 @@ DT_UTILS_LICENSE_FILES = COPYING DT_UTILS_DEPENDENCIES = udev DT_UTILS_AUTORECONF = YES +define DT_UTILS_INSTALL_LOCK_FILE + rm -f $(TARGET_DIR)/var/lock/barebox-state + mkdir -p $(TARGET_DIR)/var/lock + touch $(TARGET_DIR)/var/lock/barebox-state +endef +DT_UTILS_POST_INSTALL_TARGET_HOOKS += DT_UTILS_INSTALL_LOCK_FILE + $(eval $(autotools-package))
Signature · 1 line
2.29.2
PATCH 1/1 package/dt-utils: install barebox-state lock file
Hi Bartosz,
Quoted 18 lines · Bartosz Bilas
By default there is no
/var/lock/barebox-statefile what causes the following error when we try to execute barebox-state command:# barebox-state Failed to open lock-file /var/lock/barebox-stateFix it by adding an empty file in post install hook.
Signed-off-by Bartosz Bilas <[email protected]>--- package/dt-utils/dt-utils.mk | 7 +++++++ 1 file changed, 7 insertions(+)package/dt-utils/dt-utils.mk +0
-0
package/dt-utils/dt-utils.mk DT_UTILS_LICENSE_FILES = COPYING · line 20
Quoted 9 lines
package/dt-utils/dt-utils.mk +6
-0@@ -12,4 +12,11 @@ DT_UTILS_LICENSE_FILES = COPYING DT_UTILS_DEPENDENCIES = udev DT_UTILS_AUTORECONF = YES +define DT_UTILS_INSTALL_LOCK_FILE + rm -f $(TARGET_DIR)/var/lock/barebox-state + mkdir -p $(TARGET_DIR)/var/lock + touch $(TARGET_DIR)/var/lock/barebox-state +endef +DT_UTILS_POST_INSTALL_TARGET_HOOKS += DT_UTILS_INSTALL_LOCK_FILE
I'm afraid this won't help for minimal rootfs images, where /var/lock is a symlink at /tmp. What is the type of rootfs skeleton that you tested your changes with?
Quoted 2 lines
package/dt-utils/dt-utils.mk +1
-0+ $(eval $(autotools-package))
Signature · 2 lines
Regards, Marcin
PATCH 1/1 package/dt-utils: install barebox-state lock file
Hello Marcin,
Quoted 25 lines · Marcin Niestr?j
Hi Bartosz,
Quoted 21 lines · Bartosz Bilas
By default there is no
/var/lock/barebox-statefile what causes the following error when we try to execute barebox-state command:# barebox-state Failed to open lock-file /var/lock/barebox-stateFix it by adding an empty file in post install hook.
Signed-off-by Bartosz Bilas <[email protected]>--- package/dt-utils/dt-utils.mk | 7 +++++++ 1 file changed, 7 insertions(+)package/dt-utils/dt-utils.mk +0
-0@@ -12,4 +12,11 @@ DT_UTILS_LICENSE_FILES = COPYING DT_UTILS_DEPENDENCIES = udev DT_UTILS_AUTORECONF = YES
Quoted 9 lines
package/dt-utils/dt-utils.mk DT_UTILS_LICENSE_FILES = COPYING · line 20
Quoted 6 lines
package/dt-utils/dt-utils.mk +6
-0+define DT_UTILS_INSTALL_LOCK_FILE + rm -f $(TARGET_DIR)/var/lock/barebox-state + mkdir -p $(TARGET_DIR)/var/lock + touch $(TARGET_DIR)/var/lock/barebox-state +endef +DT_UTILS_POST_INSTALL_TARGET_HOOKS += DT_UTILS_INSTALL_LOCK_FILEI'm afraid this won't help for minimal rootfs images, where
/var/lockis a symlink at /tmp. What is the type of rootfs skeleton that you tested your changes with?
I've been testing this patch using skeleton-init-systemd.
Quoted 3 lines
package/dt-utils/dt-utils.mk DT_UTILS_LICENSE_FILES = COPYING · line 22
Quoted 3 lines
package/dt-utils/dt-utils.mk +1
-0+ $(eval $(autotools-package))
Best
Bartek