From patchwork Tue Sep 15 14:20:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 9613 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id D65A3BF01C for ; Tue, 15 Sep 2020 14:21:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A411762E1B; Tue, 15 Sep 2020 16:21:06 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="pyeEXDvp"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F135662D27 for ; Tue, 15 Sep 2020 16:21:02 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 26F4E10C6; Tue, 15 Sep 2020 16:21:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1600179662; bh=IX+V+06FXBOgZFhVffEcGAc+9RgidtxOYH3rGg7MZs8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pyeEXDvp5QykVICsW5dXo0SXc2OrzZXvLUE5KIpbvdE2tIkalTr4seJ9yyZWEOhEM J6jcamDE5OyoHMc/2dQtlmsouF3yWvaxioxnj0Tq8yiedpumXTAggnG15DoftF12Vq 9TXHJOSSfxIt9Qk9X0KHy9rDCFCvowjcvzpl5dq0= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Tue, 15 Sep 2020 23:20:19 +0900 Message-Id: <20200915142038.28757-5-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200915142038.28757-1-paul.elder@ideasonboard.com> References: <20200915142038.28757-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 04/23] utils: ipc: add generator script X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 --- 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