summaryrefslogtreecommitdiff
path: root/tools/binman
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-27 13:38:26 (GMT)
committerSimon Glass <sjg@chromium.org>2017-06-02 16:18:20 (GMT)
commit160a7664252c937d57caf9bc588519ede6e46a34 (patch)
tree3252836f52ed097055995c2f233919102eba611b /tools/binman
parent6d804eafc12263fcba423284d453ca9f4fff639f (diff)
downloadu-boot-160a7664252c937d57caf9bc588519ede6e46a34.tar.xz
fdt: Drop fdt_fallback library
Drop this now-unused library and associated tests. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman')
-rw-r--r--tools/binman/fdt_test.py10
-rw-r--r--tools/binman/func_test.py42
2 files changed, 13 insertions, 39 deletions
diff --git a/tools/binman/fdt_test.py b/tools/binman/fdt_test.py
index 65fb947..df2b0a6 100644
--- a/tools/binman/fdt_test.py
+++ b/tools/binman/fdt_test.py
@@ -82,13 +82,3 @@ class TestFdt(unittest.TestCase):
self.assertEquals(list, type(prop.value))
self.assertEquals(3, len(prop.value))
self.assertEquals(['another', 'multi-word', 'message'], prop.value)
-
- def testFdtFallback(self):
- fname = self.GetCompiled('34_x86_ucode.dts')
- dt = FdtScan(fname, True)
- dt.GetProp('/microcode/update@0', 'data')
- self.assertEqual('fred',
- dt.GetProp('/microcode/update@0', 'none', default='fred'))
- self.assertEqual('12345678 12345679',
- dt.GetProp('/microcode/update@0', 'data', typespec='x'))
- self._DeleteProp(dt)
diff --git a/tools/binman/func_test.py b/tools/binman/func_test.py
index 740fa9e..7328d03 100644
--- a/tools/binman/func_test.py
+++ b/tools/binman/func_test.py
@@ -683,7 +683,7 @@ class TestFunctional(unittest.TestCase):
self.assertEqual('nodtb with microcode' + pos_and_size +
' somewhere in here', first)
- def _RunPackUbootSingleMicrocode(self, collate):
+ def _RunPackUbootSingleMicrocode(self):
"""Test that x86 microcode can be handled correctly
We expect to see the following in the image, in order:
@@ -695,8 +695,6 @@ class TestFunctional(unittest.TestCase):
# We need the libfdt library to run this test since only that allows
# finding the offset of a property. This is required by
# Entry_u_boot_dtb_with_ucode.ObtainContents().
- if not fdt_select.have_libfdt:
- return
data = self._DoReadFile('35_x86_single_ucode.dts', True)
second = data[len(U_BOOT_NODTB_DATA):]
@@ -705,34 +703,22 @@ class TestFunctional(unittest.TestCase):
third = second[fdt_len:]
second = second[:fdt_len]
- if not collate:
- ucode_data = struct.pack('>2L', 0x12345678, 0x12345679)
- self.assertIn(ucode_data, second)
- ucode_pos = second.find(ucode_data) + len(U_BOOT_NODTB_DATA)
+ ucode_data = struct.pack('>2L', 0x12345678, 0x12345679)
+ self.assertIn(ucode_data, second)
+ ucode_pos = second.find(ucode_data) + len(U_BOOT_NODTB_DATA)
- # Check that the microcode pointer was inserted. It should match the
- # expected position and size
- pos_and_size = struct.pack('<2L', 0xfffffe00 + ucode_pos,
- len(ucode_data))
- first = data[:len(U_BOOT_NODTB_DATA)]
- self.assertEqual('nodtb with microcode' + pos_and_size +
- ' somewhere in here', first)
+ # Check that the microcode pointer was inserted. It should match the
+ # expected position and size
+ pos_and_size = struct.pack('<2L', 0xfffffe00 + ucode_pos,
+ len(ucode_data))
+ first = data[:len(U_BOOT_NODTB_DATA)]
+ self.assertEqual('nodtb with microcode' + pos_and_size +
+ ' somewhere in here', first)
def testPackUbootSingleMicrocode(self):
"""Test that x86 microcode can be handled correctly with fdt_normal.
"""
- self._RunPackUbootSingleMicrocode(False)
-
- def testPackUbootSingleMicrocodeFallback(self):
- """Test that x86 microcode can be handled correctly with fdt_fallback.
-
- This only supports collating the microcode.
- """
- try:
- old_val = fdt_select.UseFallback(True)
- self._RunPackUbootSingleMicrocode(True)
- finally:
- fdt_select.UseFallback(old_val)
+ self._RunPackUbootSingleMicrocode()
def testUBootImg(self):
"""Test that u-boot.img can be put in a file"""
@@ -763,14 +749,12 @@ class TestFunctional(unittest.TestCase):
def testMicrocodeWithoutPtrInElf(self):
"""Test that a U-Boot binary without the microcode symbol is detected"""
# ELF file without a '_dt_ucode_base_size' symbol
- if not fdt_select.have_libfdt:
- return
try:
with open(self.TestFile('u_boot_no_ucode_ptr')) as fd:
TestFunctional._MakeInputFile('u-boot', fd.read())
with self.assertRaises(ValueError) as e:
- self._RunPackUbootSingleMicrocode(False)
+ self._RunPackUbootSingleMicrocode()
self.assertIn("Node '/binman/u-boot-with-ucode-ptr': Cannot locate "
"_dt_ucode_base_size symbol in u-boot", str(e.exception))