Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD2DAEB64DC for ; Tue, 11 Jul 2023 15:03:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5FDA0868D8; Tue, 11 Jul 2023 17:00:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="DcQUNcgI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 042C48688B; Tue, 11 Jul 2023 17:00:27 +0200 (CEST) Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A6E00868C2 for ; Tue, 11 Jul 2023 17:00:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12b.google.com with SMTP id e9e14a558f8ab-3464c774f23so15789715ab.1 for ; Tue, 11 Jul 2023 08:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689087599; x=1691679599; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ewGmVOAvLYE5NTMY62Cbo2IFdrL2DPx5WRwRDf1VODY=; b=DcQUNcgIjqKufZGlyTtEAOc7wdNJ2VguPd61U2ZYrS6Q9NVXuHO0rWhF/AoCY2T699 hBUFMkgQFLeIyh0tu+fwDrCZ6wOh57MGIyaeIdGJzONQBwao61RGSGYBNgaKrActGf7X JBnNRENZEFC3avE3xMaBJczKQUG2EEYxXSn5U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689087599; x=1691679599; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ewGmVOAvLYE5NTMY62Cbo2IFdrL2DPx5WRwRDf1VODY=; b=f/F2ma5EjwcwVk6zOZTQrFvI8+uJL0JwwIMs0ZyVPOneasTXDCE3A4AICB4cUV1wvU UdttxZ1BCwZcodGJ44N1H9rm/PXV5xJtHQPqCYhg2EQ/XlbBQFEQpRCWGuDtnvf+2nEA FsIVXMYTIpm7v4LoyskX6H6U1PZzKs7OPqyNlYnS+EiB3vDtUpDDBhv0xl5hKsjd+xo3 y/kEzd33bmnpjCtDToJfLRTvmgdqkxeSW0TVZP2UzgSb9cQYEqG9vXcSoSnPdiB/0apR SR76lhiLl1vlEwMViZaERmg4dL/HDnKwK2ONsnTVfnoWisyBaaceQxBH4DH/2owEbTn4 M63g== X-Gm-Message-State: ABy/qLZbp5xQvvx0xzvt67YDJIFDnY8mmCHnSW6nep3Ve3Pl+e2nPmUl N7Q6FcmHTbpByWkBBN7AdbphRkrbur0p4yf6rVs= X-Google-Smtp-Source: APBJJlGRG4D68nxNCJmuCO9dQ+vwXHM0cL39P993QJZI7kHnn4I3KTBaTPdEXc1qdsVQtARRi+bENQ== X-Received: by 2002:a92:ce84:0:b0:345:cf3f:2fd with SMTP id r4-20020a92ce84000000b00345cf3f02fdmr14023728ilo.13.1689087599325; Tue, 11 Jul 2023 07:59:59 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id v6-20020a92cd46000000b00338a1272ce1sm658881ilq.52.2023.07.11.07.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 07:59:59 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Marek Vasut , Jan Kiszka , Simon Glass , Alper Nebi Yasak , Neha Malcom Francis , Peng Fan , Philippe Reynes , Stefan Herbrechtsmeier Subject: [PATCH v4 17/20] binman: Add a test for templating in a FIT Date: Tue, 11 Jul 2023 08:59:19 -0600 Message-ID: <20230711145935.2289816-18-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.390.g38632f3daf-goog In-Reply-To: <20230711145935.2289816-1-sjg@chromium.org> References: <20230711145935.2289816-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add this as a separate test case. Signed-off-by: Simon Glass --- (no changes since v3) Changes in v3: - Add new test case for templating in a FIT tools/binman/ftest.py | 7 +++++ tools/binman/test/288_template_fit.dts | 37 ++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 tools/binman/test/288_template_fit.dts diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index dd6075b871d4..dfca6316624c 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -6805,6 +6805,13 @@ fdt fdtmap Extract the devicetree blob from the fdtmap data = tools.read_file(image_fname) self.assertEqual(b'blob@@@@other', data) + def testTemplateFit(self): + """Test using a template in a FIT""" + fit_data = self._DoReadFile('288_template_fit.dts') + fname = os.path.join(self._indir, 'fit_data.fit') + tools.write_file(fname, fit_data) + out = tools.run('dumpimage', '-l', fname) + if __name__ == "__main__": unittest.main() diff --git a/tools/binman/test/288_template_fit.dts b/tools/binman/test/288_template_fit.dts new file mode 100644 index 000000000000..d84dca4ea41e --- /dev/null +++ b/tools/binman/test/288_template_fit.dts @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + binman: binman { + multiple-images; + + my_template: template { + fit@0 { + images { + kernel-1 { + }; + kernel-2 { + }; + }; + }; + }; + + image { + filename = "image.bin"; + insert-template = <&my_template>; + + fit@0 { + description = "desc"; + configurations { + }; + images { + kernel-3 { + }; + kernel-4 { + }; + }; + }; + }; + }; +}; -- 2.41.0.390.g38632f3daf-goog