All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 04/13] binman: Add support for u-boot.img as an input binary
Date: Wed, 16 Nov 2016 18:13:26 -0700	[thread overview]
Message-ID: <1479345215-31467-5-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1479345215-31467-1-git-send-email-sjg@chromium.org>

Add an entry type for u-boot.img (a legacy U-Boot image) and a simple test.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

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 <sjg@chromium.org>
+#
+# 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 {
+		};
+	};
+};
-- 
2.8.0.rc3.226.g39d4020

  parent reply	other threads:[~2016-11-17  1:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17  1:13 [U-Boot] [PATCH v5 00/13] binman: A tool for creating firmware images Simon Glass
2016-11-17  1:13 ` [U-Boot] [PATCH v5 01/13] binman: Introduce binman, a tool for building binary images Simon Glass
2016-11-17  1:13 ` [U-Boot] [PATCH v5 02/13] binman: Add basic entry types for U-Boot Simon Glass
2016-11-17  1:13 ` [U-Boot] [PATCH v5 03/13] binman: Add support for building x86 ROMs Simon Glass
2016-11-17  1:13 ` Simon Glass [this message]
2016-11-17  1:13 ` [U-Boot] [PATCH v5 05/13] binman: Add support for building x86 ROMs with SPL Simon Glass
2016-11-17  1:13 ` [U-Boot] [PATCH v5 06/13] binman: Add support for building x86 images with FSP/CMC Simon Glass
2016-11-17  1:13 ` [U-Boot] [PATCH v5 07/13] binman: Add a build rule for binman Simon Glass
2016-11-17  1:13 ` [U-Boot] [PATCH v5 08/13] binman: Allow configuration options to be used in .dts files Simon Glass
2016-11-17  1:13 ` [U-Boot] [PATCH v5 09/13] binman: Automatically include a U-Boot .dtsi file Simon Glass
2016-11-17  1:13 ` [U-Boot] [PATCH v5 10/13] tegra: Use a U-Boot-specific " Simon Glass
2016-11-17 19:45   ` Stephen Warren
2016-11-28 22:09     ` Simon Glass
2016-11-30  4:09       ` Stephen Warren
2016-12-01  2:19         ` Simon Glass
2016-12-02 19:19           ` Stephen Warren
2016-12-05  6:24             ` Simon Glass
2016-11-17  1:13 ` [U-Boot] [PATCH v5 11/13] sunxi: Use binman for sunxi boards Simon Glass
2016-11-17  1:13 ` [U-Boot] [PATCH v5 12/13] x86: Use binman all x86 boards Simon Glass
2016-11-17  1:13 ` [U-Boot] [PATCH v5 13/13] binman: Drop microcode features from ifdtool Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479345215-31467-5-git-send-email-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.