|
@@ -76,6 +76,7 @@ FSP_M_DATA = b'fsp_m'
|
|
|
FSP_S_DATA = b'fsp_s'
|
|
|
FSP_T_DATA = b'fsp_t'
|
|
|
ATF_BL31_DATA = b'bl31'
|
|
|
+OPENSBI_DATA = b'opensbi'
|
|
|
SCP_DATA = b'scp'
|
|
|
TEST_FDT1_DATA = b'fdt1'
|
|
|
TEST_FDT2_DATA = b'test-fdt2'
|
|
@@ -178,6 +179,7 @@ class TestFunctional(unittest.TestCase):
|
|
|
TestFunctional._MakeInputFile('compress', COMPRESS_DATA)
|
|
|
TestFunctional._MakeInputFile('compress_big', COMPRESS_DATA_BIG)
|
|
|
TestFunctional._MakeInputFile('bl31.bin', ATF_BL31_DATA)
|
|
|
+ TestFunctional._MakeInputFile('fw_dynamic.bin', OPENSBI_DATA)
|
|
|
TestFunctional._MakeInputFile('scp.bin', SCP_DATA)
|
|
|
|
|
|
# Add a few .dtb files for testing
|
|
@@ -3826,7 +3828,7 @@ class TestFunctional(unittest.TestCase):
|
|
|
'default-dt': 'test-fdt2',
|
|
|
}
|
|
|
data = self._DoReadFileDtb(
|
|
|
- '172_fit_fdt.dts',
|
|
|
+ '170_fit_fdt.dts',
|
|
|
entry_args=entry_args,
|
|
|
extra_indirs=[os.path.join(self._indir, TEST_FDT_SUBDIR)])[0]
|
|
|
self.assertEqual(U_BOOT_NODTB_DATA, data[-len(U_BOOT_NODTB_DATA):])
|
|
@@ -3848,7 +3850,7 @@ class TestFunctional(unittest.TestCase):
|
|
|
def testFitFdtMissingList(self):
|
|
|
"""Test handling of a missing 'of-list' entry arg"""
|
|
|
with self.assertRaises(ValueError) as e:
|
|
|
- self._DoReadFile('172_fit_fdt.dts')
|
|
|
+ self._DoReadFile('170_fit_fdt.dts')
|
|
|
self.assertIn("Generator node requires 'of-list' entry argument",
|
|
|
str(e.exception))
|
|
|
|
|
@@ -3871,7 +3873,7 @@ class TestFunctional(unittest.TestCase):
|
|
|
entry_args = {
|
|
|
'of-list': '',
|
|
|
}
|
|
|
- data = self._DoReadFileDtb('172_fit_fdt.dts', entry_args=entry_args)[0]
|
|
|
+ data = self._DoReadFileDtb('170_fit_fdt.dts', entry_args=entry_args)[0]
|
|
|
|
|
|
def testFitFdtMissing(self):
|
|
|
"""Test handling of a missing 'default-dt' entry arg"""
|
|
@@ -3880,7 +3882,7 @@ class TestFunctional(unittest.TestCase):
|
|
|
}
|
|
|
with self.assertRaises(ValueError) as e:
|
|
|
self._DoReadFileDtb(
|
|
|
- '172_fit_fdt.dts',
|
|
|
+ '170_fit_fdt.dts',
|
|
|
entry_args=entry_args,
|
|
|
extra_indirs=[os.path.join(self._indir, TEST_FDT_SUBDIR)])[0]
|
|
|
self.assertIn("Generated 'default' node requires default-dt entry argument",
|
|
@@ -3894,7 +3896,7 @@ class TestFunctional(unittest.TestCase):
|
|
|
}
|
|
|
with self.assertRaises(ValueError) as e:
|
|
|
self._DoReadFileDtb(
|
|
|
- '172_fit_fdt.dts',
|
|
|
+ '170_fit_fdt.dts',
|
|
|
entry_args=entry_args,
|
|
|
extra_indirs=[os.path.join(self._indir, TEST_FDT_SUBDIR)])[0]
|
|
|
self.assertIn("default-dt entry argument 'test-fdt3' not found in fdt list: test-fdt1, test-fdt2",
|
|
@@ -4535,5 +4537,10 @@ class TestFunctional(unittest.TestCase):
|
|
|
expected += tools.GetBytes(0, 88 - len(expected)) + U_BOOT_NODTB_DATA
|
|
|
self.assertEqual(expected, data)
|
|
|
|
|
|
+ def testPackOpenSBI(self):
|
|
|
+ """Test that an image with an OpenSBI binary can be created"""
|
|
|
+ data = self._DoReadFile('201_opensbi.dts')
|
|
|
+ self.assertEqual(OPENSBI_DATA, data[:len(OPENSBI_DATA)])
|
|
|
+
|
|
|
if __name__ == "__main__":
|
|
|
unittest.main()
|