[libcamera-devel] [PATCH 04/23] utils: ipc: add generator script
Paul Elder
paul.elder at ideasonboard.com
Tue Sep 15 16:20:19 CEST 2020
We want to avoid changing our copy of mojo to make updates easier. Some
parameters in the mojo generator script needs to be changed though; add
a wrapper script that sets these parameters.
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
utils/ipc/generate.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100755 utils/ipc/generate.py
diff --git a/utils/ipc/generate.py b/utils/ipc/generate.py
new file mode 100755
index 00000000..39160aa2
--- /dev/null
+++ b/utils/ipc/generate.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python3
+
+import argparse
+import os
+import sys
+import mojo.public.tools.bindings.mojom_bindings_generator as generator
+
+def _GetModulePath(path, output_dir):
+ return os.path.join(output_dir, path.relative_path())
+
+generator._BUILTIN_GENERATORS = {'libcamera': 'mojom_libcamera_generator'}
+generator._GetModulePath = _GetModulePath
+sys.path.append(os.path.join(os.path.dirname(__file__), 'utils/ipc'))
+
+generator.main()
+
+#./bindings/mojom_bindings_generator.py generate -g libcamera --bytecode_path . ./raspberrypi.mojom
--
2.27.0
More information about the libcamera-devel
mailing list