From patchwork Thu Nov 17 01:13:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 695940 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3tK37X3XNtz9t0J for ; Thu, 17 Nov 2016 12:14:32 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="PebmB9m1"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DF3A5B385A; Thu, 17 Nov 2016 02:14:20 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GDa95-Twf5mx; Thu, 17 Nov 2016 02:14:20 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5DD7EB3868; Thu, 17 Nov 2016 02:14:16 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AE3BAB3832 for ; Thu, 17 Nov 2016 02:13:59 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2DZLv31UXbUB for ; Thu, 17 Nov 2016 02:13:59 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) by theia.denx.de (Postfix) with ESMTPS id 14EC5B3838 for ; Thu, 17 Nov 2016 02:13:55 +0100 (CET) Received: by mail-it0-f45.google.com with SMTP id j191so8570084ita.1 for ; Wed, 16 Nov 2016 17:13:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=HHAveEfBjF2MOqOSl3KF9lCJEzMtYGVyF2QYTH4YclM=; b=PebmB9m14UglqR1q7kVh4G/d3lI/xt2ipOd/7nw0JkVkeTwUh7pNd7D387pf1XEQb+ V97LrogmfaCj3DLki0rFCePSdsr87nZFuC48WNQbHo2e4YFEFonL+9MOu7slmEiE/L8o zVmjWAOTl8qdVirgM9828U8fNMZBtHg/zWpjMbePF8LTA2pE43RvywymdleyYGB6VaTr 5pz56a6dtymCQVvix36ilxf6y+Foi1R8nXz7iJu3N9T4SjYTQvIY79q40yw/QRswWI6z 1qha6hlJpSkFBwgBT7rs9jZeb/wzi7TmHcoM/Bv2BFwCgWytjNbl+mNotGXee8D1vct7 5FMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=HHAveEfBjF2MOqOSl3KF9lCJEzMtYGVyF2QYTH4YclM=; b=VDqmkFhF1rAA4MtUmRmucQY3xWkD289SAlJLUDZZnl7hX8wmiQHrITBgXehAZkN3E5 SqRO5PS0ronaRrY+xYrSPwGi60qZDMbxuMbF1iQAi4yCuGKtolE22uraP9uZs32Vvbew iLImJSj1yEy3VGYuzJsMviF2MMi6bivcdF5Wtlx/1bZxAAWnlHfROAhkRwIiOXscnZPu 7KXPf/dkvcbpY1OeRkNsVS1m2bUyFe+Yo9IRRqDlvgcmIIuhAzDspA2qOrrhKAS1WM6M l3Y6PltX4/Z8wGiE4uqG3xStd/8tpYx50rC21aMg7dE+dxX+roWJ2WliHjN3FXFC6cAA eLDw== X-Gm-Message-State: ABUngve736/C8j+Ovr78rwNpx8TOutFwpFVF2/wKuQAAKHow0XUPU+7OfJcyyf6YWUYz7wU5 X-Received: by 10.157.41.210 with SMTP id g18mr225489otd.176.1479345234148; Wed, 16 Nov 2016 17:13:54 -0800 (PST) Received: from kaki.bld.corp.google.com ([2620:0:10f2:12:755b:8fb7:e1d7:4c1f]) by smtp.gmail.com with ESMTPSA id q66sm201312oic.8.2016.11.16.17.13.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Nov 2016 17:13:53 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 2E082403A3; Wed, 16 Nov 2016 18:13:53 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Wed, 16 Nov 2016 18:13:26 -0700 Message-Id: <1479345215-31467-5-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1479345215-31467-1-git-send-email-sjg@chromium.org> References: <1479345215-31467-1-git-send-email-sjg@chromium.org> Cc: Tom Rini Subject: [U-Boot] [PATCH v5 04/13] binman: Add support for u-boot.img as an input binary X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add an entry type for u-boot.img (a legacy U-Boot image) and a simple test. Signed-off-by: Simon Glass --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None tools/binman/etype/u_boot_img.py | 17 +++++++++++++++++ tools/binman/func_test.py | 5 +++++ tools/binman/test/36_u_boot_img.dts | 11 +++++++++++ 3 files changed, 33 insertions(+) create mode 100644 tools/binman/etype/u_boot_img.py create mode 100644 tools/binman/test/36_u_boot_img.dts diff --git a/tools/binman/etype/u_boot_img.py b/tools/binman/etype/u_boot_img.py new file mode 100644 index 0000000..744f1b4 --- /dev/null +++ b/tools/binman/etype/u_boot_img.py @@ -0,0 +1,17 @@ +# Copyright (c) 2016 Google, Inc +# Written by Simon Glass +# +# SPDX-License-Identifier: GPL-2.0+ +# +# Entry-type module for U-Boot binary +# + +from entry import Entry +from blob import Entry_blob + +class Entry_u_boot_img(Entry_blob): + def __init__(self, image, etype, node): + Entry_blob.__init__(self, image, etype, node) + + def GetDefaultFilename(self): + return 'u-boot.img' diff --git a/tools/binman/func_test.py b/tools/binman/func_test.py index 341957b..8dd118b 100644 --- a/tools/binman/func_test.py +++ b/tools/binman/func_test.py @@ -713,3 +713,8 @@ class TestFunctional(unittest.TestCase): first = data[:len(U_BOOT_NODTB_DATA)] self.assertEqual('nodtb with microcode' + pos_and_size + ' somewhere in here', first) + + def testUBootImg(self): + """Test that u-boot.img can be put in a file""" + data = self._DoReadFile('36_u_boot_img.dts') + self.assertEqual(U_BOOT_IMG_DATA, data) diff --git a/tools/binman/test/36_u_boot_img.dts b/tools/binman/test/36_u_boot_img.dts new file mode 100644 index 0000000..aa5a3fe --- /dev/null +++ b/tools/binman/test/36_u_boot_img.dts @@ -0,0 +1,11 @@ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + u-boot-img { + }; + }; +};