From patchwork Tue Apr 14 21:48:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3463 Return-Path: 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 9300E60405 for ; Tue, 14 Apr 2020 23:48:34 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="mI9v87jx"; dkim-atps=neutral Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1974D521 for ; Tue, 14 Apr 2020 23:48:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1586900914; bh=loi0mJYDMrA/4bFjAhAQe2VVFVFhzgQp107tgeP5KeM=; h=From:To:Subject:Date:From; b=mI9v87jxUl+LGXVk1zFWZK0zVwRuwq7TUAb4tn3a7+rIyKIn9/e03U0A+Hb57zJeW mcMRfI5TaUezPzPxjmkhBZjX6/At3LOXj8Se25dQKnC41DKsfcPc+gF/gCOKWXZ3zy K2vKh+RAHPogY8YNQf3yxD8CZofD9nnaIXNUxUpU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Wed, 15 Apr 2020 00:48:19 +0300 Message-Id: <20200414214819.14112-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: gen-ipa-pub-key.py: Wrap lines in generated file 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: , X-List-Received-Date: Tue, 14 Apr 2020 21:48:34 -0000 To make the output more readable, break the publicKeyData_ array at 8 bytes boundaries. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/libcamera/gen-ipa-pub-key.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libcamera/gen-ipa-pub-key.py b/src/libcamera/gen-ipa-pub-key.py index ad575b18c922..a4a1f7b79337 100755 --- a/src/libcamera/gen-ipa-pub-key.py +++ b/src/libcamera/gen-ipa-pub-key.py @@ -28,7 +28,9 @@ def main(argv): print('Please install openssl to sign IPA modules') return 1 - ipa_key = ', '.join(['0x%02x' % c for c in ret.stdout]) + ipa_key = ['0x%02x' % c for c in ret.stdout] + ipa_key = [', '.join(ipa_key[bound:bound + 8]) for bound in range(0, len(ipa_key), 8)] + ipa_key = ',\n\t'.join(ipa_key) data = {'ipa_key': ipa_key} template = open(template, 'rb').read()