Skip to content
Snippets Groups Projects
Commit c49deb83 authored by Simon Glass's avatar Simon Glass
Browse files

binman: Add support for u-boot.img as an input binary


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

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
parent e0ff8551
No related branches found
No related tags found
No related merge requests found
# 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'
...@@ -713,3 +713,8 @@ class TestFunctional(unittest.TestCase): ...@@ -713,3 +713,8 @@ class TestFunctional(unittest.TestCase):
first = data[:len(U_BOOT_NODTB_DATA)] first = data[:len(U_BOOT_NODTB_DATA)]
self.assertEqual('nodtb with microcode' + pos_and_size + self.assertEqual('nodtb with microcode' + pos_and_size +
' somewhere in here', first) ' 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)
/dts-v1/;
/ {
#address-cells = <1>;
#size-cells = <1>;
binman {
u-boot-img {
};
};
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment