diff options
author | Simon Glass <sjg@chromium.org> | 2016-11-25 20:15:52 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-12-20 08:09:55 +1300 |
commit | 4f44304b0bd881f79252c7b7d2fb796e31ca3b0a (patch) | |
tree | 50c4140da8f12dd9a145707b3b186d8a39a471e8 /tools/binman/etype/_testing.py | |
parent | bf7fd50b3ba56b53dc13a681d19c845be903c3e0 (diff) | |
download | u-boot-4f44304b0bd881f79252c7b7d2fb796e31ca3b0a.zip u-boot-4f44304b0bd881f79252c7b7d2fb796e31ca3b0a.tar.gz u-boot-4f44304b0bd881f79252c7b7d2fb796e31ca3b0a.tar.bz2 |
binman: Add basic entry types for U-Boot
Add entries to support some standard U-Boot binaries, such as u-boot.bin,
u-boot.dtb, etc. Also add some tests for these.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'tools/binman/etype/_testing.py')
-rw-r--r-- | tools/binman/etype/_testing.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/binman/etype/_testing.py b/tools/binman/etype/_testing.py new file mode 100644 index 0000000..1783098 --- /dev/null +++ b/tools/binman/etype/_testing.py @@ -0,0 +1,26 @@ +# Copyright (c) 2016 Google, Inc +# Written by Simon Glass <sjg@chromium.org> +# +# SPDX-License-Identifier: GPL-2.0+ +# +# Entry-type module for testing purposes. Not used in real images. +# + +from entry import Entry +import fdt_util +import tools + +class Entry__testing(Entry): + def __init__(self, image, etype, node): + Entry.__init__(self, image, etype, node) + + def ObtainContents(self): + self.data = 'a' + self.contents_size = len(self.data) + return True + + def ReadContents(self): + return True + + def GetPositions(self): + return {'invalid-entry': [1, 2]} |