From a39fdf2aad51ac8206d855cf958cf5c96b502bb1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 6 Mar 2026 11:12:37 -0700 Subject: binman: test: Move CBFS test files to test/cbfs/ Move about a dozen test files for Coreboot File System entries into a cbfs/ subdirectory. Drop the numeric prefixes and the redundant cbfs_ filename prefix, and update all references. Signed-off-by: Simon Glass Reviewed-by: Quentin Schulz --- tools/binman/ftest.py | 28 +++++++++++----------- tools/binman/test/102_cbfs_raw.dts | 20 ---------------- tools/binman/test/103_cbfs_raw_ppc.dts | 21 ---------------- tools/binman/test/104_cbfs_stage.dts | 19 --------------- tools/binman/test/105_cbfs_raw_compress.dts | 26 -------------------- tools/binman/test/106_cbfs_bad_arch.dts | 15 ------------ tools/binman/test/107_cbfs_no_size.dts | 13 ---------- tools/binman/test/108_cbfs_no_contents.dts | 17 ------------- tools/binman/test/109_cbfs_bad_compress.dts | 18 -------------- tools/binman/test/110_cbfs_name.dts | 24 ------------------- tools/binman/test/114_cbfs_offset.dts | 26 -------------------- tools/binman/test/125_cbfs_update.dts | 21 ---------------- tools/binman/test/126_cbfs_bad_type.dts | 17 ------------- tools/binman/test/142_replace_cbfs.dts | 37 ----------------------------- tools/binman/test/cbfs/bad_arch.dts | 15 ++++++++++++ tools/binman/test/cbfs/bad_compress.dts | 18 ++++++++++++++ tools/binman/test/cbfs/bad_type.dts | 17 +++++++++++++ tools/binman/test/cbfs/name.dts | 24 +++++++++++++++++++ tools/binman/test/cbfs/no_contents.dts | 17 +++++++++++++ tools/binman/test/cbfs/no_size.dts | 13 ++++++++++ tools/binman/test/cbfs/offset.dts | 26 ++++++++++++++++++++ tools/binman/test/cbfs/raw.dts | 20 ++++++++++++++++ tools/binman/test/cbfs/raw_compress.dts | 26 ++++++++++++++++++++ tools/binman/test/cbfs/raw_ppc.dts | 21 ++++++++++++++++ tools/binman/test/cbfs/replace.dts | 37 +++++++++++++++++++++++++++++ tools/binman/test/cbfs/stage.dts | 19 +++++++++++++++ tools/binman/test/cbfs/update.dts | 21 ++++++++++++++++ 27 files changed, 288 insertions(+), 288 deletions(-) delete mode 100644 tools/binman/test/102_cbfs_raw.dts delete mode 100644 tools/binman/test/103_cbfs_raw_ppc.dts delete mode 100644 tools/binman/test/104_cbfs_stage.dts delete mode 100644 tools/binman/test/105_cbfs_raw_compress.dts delete mode 100644 tools/binman/test/106_cbfs_bad_arch.dts delete mode 100644 tools/binman/test/107_cbfs_no_size.dts delete mode 100644 tools/binman/test/108_cbfs_no_contents.dts delete mode 100644 tools/binman/test/109_cbfs_bad_compress.dts delete mode 100644 tools/binman/test/110_cbfs_name.dts delete mode 100644 tools/binman/test/114_cbfs_offset.dts delete mode 100644 tools/binman/test/125_cbfs_update.dts delete mode 100644 tools/binman/test/126_cbfs_bad_type.dts delete mode 100644 tools/binman/test/142_replace_cbfs.dts create mode 100644 tools/binman/test/cbfs/bad_arch.dts create mode 100644 tools/binman/test/cbfs/bad_compress.dts create mode 100644 tools/binman/test/cbfs/bad_type.dts create mode 100644 tools/binman/test/cbfs/name.dts create mode 100644 tools/binman/test/cbfs/no_contents.dts create mode 100644 tools/binman/test/cbfs/no_size.dts create mode 100644 tools/binman/test/cbfs/offset.dts create mode 100644 tools/binman/test/cbfs/raw.dts create mode 100644 tools/binman/test/cbfs/raw_compress.dts create mode 100644 tools/binman/test/cbfs/raw_ppc.dts create mode 100644 tools/binman/test/cbfs/replace.dts create mode 100644 tools/binman/test/cbfs/stage.dts create mode 100644 tools/binman/test/cbfs/update.dts diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 9ceb85f2b28..d43bb9183bb 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -2432,7 +2432,7 @@ class TestFunctional(unittest.TestCase): cbfs_util_test.py. The tests here merely check that the files added to the CBFS can be found in the final image. """ - data = self._DoReadFile('102_cbfs_raw.dts') + data = self._DoReadFile('cbfs/raw.dts') size = 0xb0 cbfs = cbfs_util.CbfsReader(data) @@ -2444,7 +2444,7 @@ class TestFunctional(unittest.TestCase): def testCbfsArch(self): """Test on non-x86 architecture""" - data = self._DoReadFile('103_cbfs_raw_ppc.dts') + data = self._DoReadFile('cbfs/raw_ppc.dts') size = 0x100 cbfs = cbfs_util.CbfsReader(data) @@ -2462,7 +2462,7 @@ class TestFunctional(unittest.TestCase): elf.MakeElf(elf_fname, U_BOOT_DATA, U_BOOT_DTB_DATA) size = 0xb0 - data = self._DoReadFile('104_cbfs_stage.dts') + data = self._DoReadFile('cbfs/stage.dts') cbfs = cbfs_util.CbfsReader(data) self.assertEqual(size, cbfs.rom_size) @@ -2473,7 +2473,7 @@ class TestFunctional(unittest.TestCase): def testCbfsRawCompress(self): """Test handling of compressing raw files""" self._CheckLz4() - data = self._DoReadFile('105_cbfs_raw_compress.dts') + data = self._DoReadFile('cbfs/raw_compress.dts') size = 0x140 cbfs = cbfs_util.CbfsReader(data) @@ -2484,32 +2484,32 @@ class TestFunctional(unittest.TestCase): def testCbfsBadArch(self): """Test handling of a bad architecture""" with self.assertRaises(ValueError) as e: - self._DoReadFile('106_cbfs_bad_arch.dts') + self._DoReadFile('cbfs/bad_arch.dts') self.assertIn("Invalid architecture 'bad-arch'", str(e.exception)) def testCbfsNoSize(self): """Test handling of a missing size property""" with self.assertRaises(ValueError) as e: - self._DoReadFile('107_cbfs_no_size.dts') + self._DoReadFile('cbfs/no_size.dts') self.assertIn('entry must have a size property', str(e.exception)) def testCbfsNoContents(self): """Test handling of a CBFS entry which does not provide contentsy""" with self.assertRaises(ValueError) as e: - self._DoReadFile('108_cbfs_no_contents.dts') + self._DoReadFile('cbfs/no_contents.dts') self.assertIn('Could not complete processing of contents', str(e.exception)) def testCbfsBadCompress(self): """Test handling of a bad architecture""" with self.assertRaises(ValueError) as e: - self._DoReadFile('109_cbfs_bad_compress.dts') + self._DoReadFile('cbfs/bad_compress.dts') self.assertIn("Invalid compression in 'u-boot': 'invalid-algo'", str(e.exception)) def testCbfsNamedEntries(self): """Test handling of named entries""" - data = self._DoReadFile('110_cbfs_name.dts') + data = self._DoReadFile('cbfs/name.dts') cbfs = cbfs_util.CbfsReader(data) self.assertIn('FRED', cbfs.files) @@ -2589,7 +2589,7 @@ class TestFunctional(unittest.TestCase): Like all CFBS tests, this is just checking the logic that calls cbfs_util. See cbfs_util_test for fully tests (e.g. test_cbfs_offset()). """ - data = self._DoReadFile('114_cbfs_offset.dts') + data = self._DoReadFile('cbfs/offset.dts') size = 0x200 cbfs = cbfs_util.CbfsReader(data) @@ -2731,7 +2731,7 @@ class TestFunctional(unittest.TestCase): def testCbfsUpdateFdt(self): """Test that we can update the device tree with CBFS offset/size info""" self._CheckLz4() - data, _, _, out_dtb_fname = self._DoReadFileDtb('125_cbfs_update.dts', + data, _, _, out_dtb_fname = self._DoReadFileDtb('cbfs/update.dts', update_dtb=True) dtb = fdt.Fdt(out_dtb_fname) dtb.Scan() @@ -2755,7 +2755,7 @@ class TestFunctional(unittest.TestCase): def testCbfsBadType(self): """Test an image header with a no specified location is detected""" with self.assertRaises(ValueError) as e: - self._DoReadFile('126_cbfs_bad_type.dts') + self._DoReadFile('cbfs/bad_type.dts') self.assertIn("Unknown cbfs-type 'badtype'", str(e.exception)) def testList(self): @@ -3565,7 +3565,7 @@ class TestFunctional(unittest.TestCase): """Test replacing a single file in CBFS without changing the size""" self._CheckLz4() expected = b'x' * len(U_BOOT_DATA) - data = self._DoReadFileRealDtb('142_replace_cbfs.dts') + data = self._DoReadFileRealDtb('cbfs/replace.dts') updated_fname = tools.get_output_filename('image-updated.bin') tools.write_file(updated_fname, data) entry_name = 'section/cbfs/u-boot' @@ -3578,7 +3578,7 @@ class TestFunctional(unittest.TestCase): """Test replacing a single file in CBFS with one of a different size""" self._CheckLz4() expected = U_BOOT_DATA + b'x' - data = self._DoReadFileRealDtb('142_replace_cbfs.dts') + data = self._DoReadFileRealDtb('cbfs/replace.dts') updated_fname = tools.get_output_filename('image-updated.bin') tools.write_file(updated_fname, data) entry_name = 'section/cbfs/u-boot' diff --git a/tools/binman/test/102_cbfs_raw.dts b/tools/binman/test/102_cbfs_raw.dts deleted file mode 100644 index 779cbc121ad..00000000000 --- a/tools/binman/test/102_cbfs_raw.dts +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - cbfs { - size = <0xb0>; - u-boot { - cbfs-type = "raw"; - }; - u-boot-dtb { - cbfs-type = "raw"; - }; - }; - }; -}; diff --git a/tools/binman/test/103_cbfs_raw_ppc.dts b/tools/binman/test/103_cbfs_raw_ppc.dts deleted file mode 100644 index df1caf092f4..00000000000 --- a/tools/binman/test/103_cbfs_raw_ppc.dts +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - cbfs { - size = <0x100>; - cbfs-arch = "ppc64"; - u-boot { - cbfs-type = "raw"; - }; - u-boot-dtb { - cbfs-type = "raw"; - }; - }; - }; -}; diff --git a/tools/binman/test/104_cbfs_stage.dts b/tools/binman/test/104_cbfs_stage.dts deleted file mode 100644 index 215e2f287a4..00000000000 --- a/tools/binman/test/104_cbfs_stage.dts +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - cbfs { - size = <0xb0>; - u-boot { - type = "blob"; - filename = "cbfs-stage.elf"; - cbfs-type = "stage"; - }; - }; - }; -}; diff --git a/tools/binman/test/105_cbfs_raw_compress.dts b/tools/binman/test/105_cbfs_raw_compress.dts deleted file mode 100644 index 646168d84b4..00000000000 --- a/tools/binman/test/105_cbfs_raw_compress.dts +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - cbfs { - size = <0x140>; - u-boot { - type = "text"; - text = "compress xxxxxxxxxxxxxxxxxxxxxx data"; - cbfs-type = "raw"; - cbfs-compress = "lz4"; - }; - u-boot-dtb { - type = "text"; - text = "compress xxxxxxxxxxxxxxxxxxxxxx data"; - cbfs-type = "raw"; - cbfs-compress = "lzma"; - }; - }; - }; -}; diff --git a/tools/binman/test/106_cbfs_bad_arch.dts b/tools/binman/test/106_cbfs_bad_arch.dts deleted file mode 100644 index 4318d45a7d4..00000000000 --- a/tools/binman/test/106_cbfs_bad_arch.dts +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - cbfs { - size = <0x100>; - cbfs-arch = "bad-arch"; - }; - }; -}; diff --git a/tools/binman/test/107_cbfs_no_size.dts b/tools/binman/test/107_cbfs_no_size.dts deleted file mode 100644 index 3592f62f7e6..00000000000 --- a/tools/binman/test/107_cbfs_no_size.dts +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - cbfs { - }; - }; -}; diff --git a/tools/binman/test/108_cbfs_no_contents.dts b/tools/binman/test/108_cbfs_no_contents.dts deleted file mode 100644 index 623346760d2..00000000000 --- a/tools/binman/test/108_cbfs_no_contents.dts +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - cbfs { - size = <0x100>; - _testing { - return-unknown-contents; - }; - }; - }; -}; diff --git a/tools/binman/test/109_cbfs_bad_compress.dts b/tools/binman/test/109_cbfs_bad_compress.dts deleted file mode 100644 index 9695024ee9b..00000000000 --- a/tools/binman/test/109_cbfs_bad_compress.dts +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - cbfs { - size = <0xb0>; - u-boot { - cbfs-type = "raw"; - cbfs-compress = "invalid-algo"; - }; - }; - }; -}; diff --git a/tools/binman/test/110_cbfs_name.dts b/tools/binman/test/110_cbfs_name.dts deleted file mode 100644 index 98c16f30b41..00000000000 --- a/tools/binman/test/110_cbfs_name.dts +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - cbfs { - size = <0x100>; - u-boot { - cbfs-name = "FRED"; - cbfs-type = "raw"; - }; - - hello { - type = "blob"; - filename = "u-boot.dtb"; - cbfs-type = "raw"; - }; - }; - }; -}; diff --git a/tools/binman/test/114_cbfs_offset.dts b/tools/binman/test/114_cbfs_offset.dts deleted file mode 100644 index 7aa9d9d4bf3..00000000000 --- a/tools/binman/test/114_cbfs_offset.dts +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - sort-by-offset; - end-at-4gb; - size = <0x200>; - cbfs { - size = <0x200>; - offset = <0xfffffe00>; - u-boot { - cbfs-offset = <0x40>; - cbfs-type = "raw"; - }; - u-boot-dtb { - cbfs-offset = <0x140>; - cbfs-type = "raw"; - }; - }; - }; -}; diff --git a/tools/binman/test/125_cbfs_update.dts b/tools/binman/test/125_cbfs_update.dts deleted file mode 100644 index 6d2e8a0b8ff..00000000000 --- a/tools/binman/test/125_cbfs_update.dts +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - cbfs { - size = <0x100>; - u-boot { - cbfs-type = "raw"; - cbfs-compress = "lz4"; - }; - u-boot-dtb { - cbfs-type = "raw"; - }; - }; - }; -}; diff --git a/tools/binman/test/126_cbfs_bad_type.dts b/tools/binman/test/126_cbfs_bad_type.dts deleted file mode 100644 index 2cd6fc6d52d..00000000000 --- a/tools/binman/test/126_cbfs_bad_type.dts +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - cbfs { - size = <0x100>; - u-boot { - cbfs-type = "badtype"; - }; - }; - }; -}; diff --git a/tools/binman/test/142_replace_cbfs.dts b/tools/binman/test/142_replace_cbfs.dts deleted file mode 100644 index d64142f9d5c..00000000000 --- a/tools/binman/test/142_replace_cbfs.dts +++ /dev/null @@ -1,37 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - size = <0xe00>; - allow-repack; - u-boot { - }; - section { - align = <0x100>; - cbfs { - size = <0x400>; - u-boot { - cbfs-type = "raw"; - }; - u-boot-dtb { - cbfs-type = "raw"; - cbfs-compress = "lzma"; - cbfs-offset = <0x80>; - }; - }; - u-boot-dtb { - compress = "lz4"; - }; - }; - fdtmap { - }; - image-header { - location = "end"; - }; - }; -}; diff --git a/tools/binman/test/cbfs/bad_arch.dts b/tools/binman/test/cbfs/bad_arch.dts new file mode 100644 index 00000000000..4318d45a7d4 --- /dev/null +++ b/tools/binman/test/cbfs/bad_arch.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + cbfs { + size = <0x100>; + cbfs-arch = "bad-arch"; + }; + }; +}; diff --git a/tools/binman/test/cbfs/bad_compress.dts b/tools/binman/test/cbfs/bad_compress.dts new file mode 100644 index 00000000000..9695024ee9b --- /dev/null +++ b/tools/binman/test/cbfs/bad_compress.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + cbfs { + size = <0xb0>; + u-boot { + cbfs-type = "raw"; + cbfs-compress = "invalid-algo"; + }; + }; + }; +}; diff --git a/tools/binman/test/cbfs/bad_type.dts b/tools/binman/test/cbfs/bad_type.dts new file mode 100644 index 00000000000..2cd6fc6d52d --- /dev/null +++ b/tools/binman/test/cbfs/bad_type.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + cbfs { + size = <0x100>; + u-boot { + cbfs-type = "badtype"; + }; + }; + }; +}; diff --git a/tools/binman/test/cbfs/name.dts b/tools/binman/test/cbfs/name.dts new file mode 100644 index 00000000000..98c16f30b41 --- /dev/null +++ b/tools/binman/test/cbfs/name.dts @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + cbfs { + size = <0x100>; + u-boot { + cbfs-name = "FRED"; + cbfs-type = "raw"; + }; + + hello { + type = "blob"; + filename = "u-boot.dtb"; + cbfs-type = "raw"; + }; + }; + }; +}; diff --git a/tools/binman/test/cbfs/no_contents.dts b/tools/binman/test/cbfs/no_contents.dts new file mode 100644 index 00000000000..623346760d2 --- /dev/null +++ b/tools/binman/test/cbfs/no_contents.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + cbfs { + size = <0x100>; + _testing { + return-unknown-contents; + }; + }; + }; +}; diff --git a/tools/binman/test/cbfs/no_size.dts b/tools/binman/test/cbfs/no_size.dts new file mode 100644 index 00000000000..3592f62f7e6 --- /dev/null +++ b/tools/binman/test/cbfs/no_size.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + cbfs { + }; + }; +}; diff --git a/tools/binman/test/cbfs/offset.dts b/tools/binman/test/cbfs/offset.dts new file mode 100644 index 00000000000..7aa9d9d4bf3 --- /dev/null +++ b/tools/binman/test/cbfs/offset.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + sort-by-offset; + end-at-4gb; + size = <0x200>; + cbfs { + size = <0x200>; + offset = <0xfffffe00>; + u-boot { + cbfs-offset = <0x40>; + cbfs-type = "raw"; + }; + u-boot-dtb { + cbfs-offset = <0x140>; + cbfs-type = "raw"; + }; + }; + }; +}; diff --git a/tools/binman/test/cbfs/raw.dts b/tools/binman/test/cbfs/raw.dts new file mode 100644 index 00000000000..779cbc121ad --- /dev/null +++ b/tools/binman/test/cbfs/raw.dts @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + cbfs { + size = <0xb0>; + u-boot { + cbfs-type = "raw"; + }; + u-boot-dtb { + cbfs-type = "raw"; + }; + }; + }; +}; diff --git a/tools/binman/test/cbfs/raw_compress.dts b/tools/binman/test/cbfs/raw_compress.dts new file mode 100644 index 00000000000..646168d84b4 --- /dev/null +++ b/tools/binman/test/cbfs/raw_compress.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + cbfs { + size = <0x140>; + u-boot { + type = "text"; + text = "compress xxxxxxxxxxxxxxxxxxxxxx data"; + cbfs-type = "raw"; + cbfs-compress = "lz4"; + }; + u-boot-dtb { + type = "text"; + text = "compress xxxxxxxxxxxxxxxxxxxxxx data"; + cbfs-type = "raw"; + cbfs-compress = "lzma"; + }; + }; + }; +}; diff --git a/tools/binman/test/cbfs/raw_ppc.dts b/tools/binman/test/cbfs/raw_ppc.dts new file mode 100644 index 00000000000..df1caf092f4 --- /dev/null +++ b/tools/binman/test/cbfs/raw_ppc.dts @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + cbfs { + size = <0x100>; + cbfs-arch = "ppc64"; + u-boot { + cbfs-type = "raw"; + }; + u-boot-dtb { + cbfs-type = "raw"; + }; + }; + }; +}; diff --git a/tools/binman/test/cbfs/replace.dts b/tools/binman/test/cbfs/replace.dts new file mode 100644 index 00000000000..d64142f9d5c --- /dev/null +++ b/tools/binman/test/cbfs/replace.dts @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + size = <0xe00>; + allow-repack; + u-boot { + }; + section { + align = <0x100>; + cbfs { + size = <0x400>; + u-boot { + cbfs-type = "raw"; + }; + u-boot-dtb { + cbfs-type = "raw"; + cbfs-compress = "lzma"; + cbfs-offset = <0x80>; + }; + }; + u-boot-dtb { + compress = "lz4"; + }; + }; + fdtmap { + }; + image-header { + location = "end"; + }; + }; +}; diff --git a/tools/binman/test/cbfs/stage.dts b/tools/binman/test/cbfs/stage.dts new file mode 100644 index 00000000000..215e2f287a4 --- /dev/null +++ b/tools/binman/test/cbfs/stage.dts @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + cbfs { + size = <0xb0>; + u-boot { + type = "blob"; + filename = "cbfs-stage.elf"; + cbfs-type = "stage"; + }; + }; + }; +}; diff --git a/tools/binman/test/cbfs/update.dts b/tools/binman/test/cbfs/update.dts new file mode 100644 index 00000000000..6d2e8a0b8ff --- /dev/null +++ b/tools/binman/test/cbfs/update.dts @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + cbfs { + size = <0x100>; + u-boot { + cbfs-type = "raw"; + cbfs-compress = "lz4"; + }; + u-boot-dtb { + cbfs-type = "raw"; + }; + }; + }; +}; -- cgit v1.3.1