[libcamera-devel] [RFC PATCH 03/10] libcamera: ipa_module: add loading error messages
Paul Elder
paul.elder at ideasonboard.com
Thu Jun 6 00:18:10 CEST 2019
Currently, if an IPAModule fails to be constructed due to size mismatch
of struct IPAModuleInfo, the error is simply "symbol not found". Add an
error message to say that the symbol is found, but not valid.
Also add an error message to tell, if an IPA module failed to load, the
path to the IPA module shared object that was attempted to be loaded.
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
src/libcamera/ipa_module.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp
index e1d4b27..84c77f7 100644
--- a/src/libcamera/ipa_module.cpp
+++ b/src/libcamera/ipa_module.cpp
@@ -145,6 +145,12 @@ int elfLoadSymbol(void *dst, size_t size, void *map, size_t soSize,
targetSymbol = sym;
break;
}
+
+ if (!strcmp(name, symbol)) {
+ LOG(IPAModule, Error)
+ << "Symbol " << symbol
+ << " found, but not valid. Check module version.";
+ }
}
if (targetSymbol == nullptr) {
@@ -286,6 +292,12 @@ int IPAModule::loadIPAModuleInfo()
ret = -EINVAL;
}
+ if (ret)
+ LOG(IPAModule, Error)
+ << "Error loading IPA module at "
+ << libPath_;
+
+
unmap:
munmap(map, soSize);
close:
--
2.20.1
More information about the libcamera-devel
mailing list