summaryrefslogtreecommitdiffstats
path: root/rules/image-rauc.make
diff options
context:
space:
mode:
authorRoland Hieber <rhi@pengutronix.de>2024-02-20 11:19:09 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2024-03-07 17:35:05 +0100
commit1da289a90f19c4f5aa56cf76c2c7a73aae5f756f (patch)
tree937b92ccdc65b8c5d0418427f1a3a13c95d4b106 /rules/image-rauc.make
parentf6a135620071a856617c50f59ee260a60aaa8e05 (diff)
downloadptxdist-1da289a90f19c4f5aa56cf76c2c7a73aae5f756f.tar.gz
ptxdist-1da289a90f19c4f5aa56cf76c2c7a73aae5f756f.tar.xz
image-rauc: improve error detection for hook script
If config/images/rauc-hooks.sh is not found, genimage will instead try to copy a file with an empty file name from the temporary build folder, resulting in the less helpful error message about "cp: -r not specified; omitting directory". Catch this case early and error out with a better message. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Message-Id: <20240220101909.1090342-1-rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/image-rauc.make')
-rw-r--r--rules/image-rauc.make4
1 files changed, 4 insertions, 0 deletions
diff --git a/rules/image-rauc.make b/rules/image-rauc.make
index def2ade1e..a05c19f61 100644
--- a/rules/image-rauc.make
+++ b/rules/image-rauc.make
@@ -41,6 +41,10 @@ IMAGE_RAUC_BUNDLE_FORMAT := "crypt"
endif
ifdef PTXCONF_IMAGE_RAUC_HOOK
+ifndef IMAGE_RAUC_HOOK_FILE
+$(error IMAGE_RAUC_HOOK is enabled, but config/images/rauc-hooks.sh was not \
+ found in any component of PTXDIST_PATH)
+endif
IMAGE_RAUC_ENV_HOOK = \
RAUC_HOOK_FILE="file hooks.sh { image = \\"$(IMAGE_RAUC_HOOK_FILE)\\" }" \
RAUC_HOOK_MANIFEST="filename=hooks.sh"