section.SetAllowMissing(allow_missing)
def AddBintools(self, tools):
+ for section in self._fit_sections.values():
+ section.AddBintools(tools)
self.mkimage = self.AddBintool(tools, 'mkimage')
+
+ def check_missing_bintools(self, missing_list):
+ """Check if any entries in this section have missing bintools
+
+ If there are missing bintools, these are added to the list
+
+ Args:
+ missing_list: List of Bintool objects to be added to
+ """
+ super().check_missing_bintools(missing_list)
+ for entry in self._fit_sections.values():
+ entry.check_missing_bintools(missing_list)
finally:
shutil.rmtree(tmpdir)
+ def testFitSubentryUsesBintool(self):
+ """Test that binman FIT subentries can use bintools"""
+ command.test_result = self._HandleGbbCommand
+ entry_args = {
+ 'keydir': 'devkeys',
+ 'bmpblk': 'bmpblk.bin',
+ }
+ data, _, _, _ = self._DoReadFileDtb('220_fit_subentry_bintool.dts',
+ entry_args=entry_args)
+
+ expected = (GBB_DATA + GBB_DATA + tools.GetBytes(0, 8) +
+ tools.GetBytes(0, 0x2180 - 16))
+ self.assertIn(expected, data)
+
+ def testFitSubentryMissingBintool(self):
+ """Test that binman reports missing bintools for FIT subentries"""
+ entry_args = {
+ 'keydir': 'devkeys',
+ }
+ with test_util.capture_sys_output() as (_, stderr):
+ self._DoTestFile('220_fit_subentry_bintool.dts',
+ force_missing_bintools='futility', entry_args=entry_args)
+ err = stderr.getvalue()
+ self.assertRegex(err,
+ "Image 'main-section'.*missing bintools.*: futility")
if __name__ == "__main__":
unittest.main()
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ fit {
+ description = "test-desc";
+ #address-cells = <1>;
+
+ images {
+ test {
+ description = "Something using a bintool";
+ type = "kernel";
+ arch = "arm";
+ os = "linux";
+ compression = "gzip";
+ load = <00000000>;
+ entry = <00000000>;
+
+ gbb {
+ size = <0x2180>;
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-1";
+ conf-1 {
+ description = "Boot bintool output";
+ kernel = "kernel";
+ };
+ };
+ };
+ };
+};