]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Merge tag 'v2023.04-rc4' into next
authorTom Rini <trini@konsulko.com>
Tue, 14 Mar 2023 14:58:41 +0000 (10:58 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 14 Mar 2023 16:06:35 +0000 (12:06 -0400)
Prepare v2023.04-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
1  2 
Makefile
arch/arm/dts/r8a77980-condor-u-boot.dts
arch/arm/dts/r8a77995-draak-u-boot.dts
arch/arm/dts/rk356x-u-boot.dtsi
arch/arm/dts/rk3588-rock-5b-u-boot.dtsi
common/Kconfig
tools/binman/binman.rst
tools/binman/entries.rst
tools/binman/etype/mkimage.py
tools/binman/ftest.py

diff --cc Makefile
Simple merge
index 576a74e6030a11830a539af989319c9e8c91fe39,530abdb72bcc4749cb64c2df3fb4e66c6dd9a043..f4a3b43b8ff1e239992e0653d27dcdb793bafe07
        aliases {
                spi0 = &rpc;
        };
 -              u-boot,dm-pre-reloc;
+       sysinfo {
+               compatible = "renesas,rcar-sysinfo";
+               i2c-eeprom = <&sysinfo_eeprom>;
 -      u-boot,dm-pre-reloc;
++              bootph-all;
+       };
+ };
+ &i2c0 {
 -              u-boot,dm-pre-reloc;
++      bootph-all;
+       sysinfo_eeprom: eeprom@50 {
+               compatible = "rohm,br24t01", "atmel,24c01";
+               reg = <0x50>;
+               pagesize = <8>;
++              bootph-all;
+       };
  };
  
  &rpc {
index 0ea2570c1dc80925faff4df379605033bff5a16d,260bc5da19fd5eda19f748d651fba7bc45a0aa44..41ceae1da775358d6d5a6e1d389e10abebe833e2
@@@ -8,6 -8,25 +8,25 @@@
  #include "r8a77995-draak.dts"
  #include "r8a77995-u-boot.dtsi"
  
 -              u-boot,dm-pre-reloc;
+ / {
+       sysinfo {
+               compatible = "renesas,rcar-sysinfo";
+               i2c-eeprom = <&sysinfo_eeprom>;
 -      u-boot,dm-pre-reloc;
++              bootph-all;
+       };
+ };
+ &i2c0 {
 -              u-boot,dm-pre-reloc;
++      bootph-all;
+       sysinfo_eeprom: eeprom@50 {
+               compatible = "rohm,br24t01", "atmel,24c01";
+               reg = <0x50>;
+               pagesize = <8>;
++              bootph-all;
+       };
+ };
  &rpc {
        reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>;
        status = "disabled";
index 580e5762cf7e15dbe4c5ecdadc9037ac1ae066b4,23316410496d44928ed2347c438049981790a24a..ecf88e084158d1b65db0f4e9282cf98c2a0e7218
  
        dmc: dmc {
                compatible = "rockchip,rk3568-dmc";
 -              u-boot,dm-pre-reloc;
 +              bootph-all;
                status = "okay";
        };
+       otp: nvmem@fe38c000 {
+               compatible = "rockchip,rk3568-otp";
+               reg = <0x0 0xfe38c000 0x0 0x4000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               status = "okay";
+               cpu_id: id@a {
+                       reg = <0x0a 0x10>;
+               };
+       };
+ };
+ &combphy1 {
+       /delete-property/ assigned-clocks;
+       /delete-property/ assigned-clock-rates;
  };
  
  &cru {
index 0000000000000000000000000000000000000000,2386edf90deb95d62d4676f17527bd85d248f8a8..bee4c32e8965e4afc89a4423c998f8c7b470abeb
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,22 +1,22 @@@
 -      u-boot,dm-spl;
+ // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+ /*
+  * Copyright (c) 2023 Collabora Ltd.
+  */
+ #include "rk3588-u-boot.dtsi"
+ / {
+       aliases {
+               mmc0 = &sdmmc;
+       };
+       chosen {
+               u-boot,spl-boot-order = &sdmmc;
+       };
+ };
+ &sdmmc {
+       bus-width = <4>;
++      bootph-pre-ram;
+       status = "okay";
+ };
diff --cc common/Kconfig
Simple merge
Simple merge
Simple merge
Simple merge
index f1e14c6b3dc8bdc1e51c111c9366e7eae52fbb67,d74aa90a620743caad0658dbd0d82c83183e58c0..d455ea02eabe501b12c19b9904efc4e79a13cfd2
@@@ -6443,128 -6388,22 +6445,144 @@@ fdt         fdtmap                Extra
          self.assertEqual(['u-boot', 'atf-2'],
                           fdt_util.GetStringList(node, 'loadables'))
  
 +    def testTooldir(self):
 +        """Test that we can specify the tooldir"""
 +        with test_util.capture_sys_output() as (stdout, stderr):
 +            self.assertEqual(0, self._DoBinman('--tooldir', 'fred',
 +                                               'tool', '-l'))
 +        self.assertEqual('fred', bintool.Bintool.tooldir)
 +
 +        # Check that the toolpath is updated correctly
 +        self.assertEqual(['fred'], tools.tool_search_paths)
 +
 +        # Try with a few toolpaths; the tooldir should be at the end
 +        with test_util.capture_sys_output() as (stdout, stderr):
 +            self.assertEqual(0, self._DoBinman(
 +                '--toolpath', 'mary', '--toolpath', 'anna', '--tooldir', 'fred',
 +                'tool', '-l'))
 +        self.assertEqual(['mary', 'anna', 'fred'], tools.tool_search_paths)
 +
 +    def testReplaceSectionEntry(self):
 +        """Test replacing an entry in a section"""
 +        expect_data = b'w' * len(U_BOOT_DATA + COMPRESS_DATA)
 +        entry_data, expected_fdtmap, image = self._RunReplaceCmd('section/blob',
 +            expect_data, dts='241_replace_section_simple.dts')
 +        self.assertEqual(expect_data, entry_data)
 +
 +        entries = image.GetEntries()
 +        self.assertIn('section', entries)
 +        section = entries['section']
 +
 +        sect_entries = section.GetEntries()
 +        self.assertIn('blob', sect_entries)
 +        entry = sect_entries['blob']
 +        self.assertEqual(len(expect_data), entry.size)
 +
 +        fname = tools.get_output_filename('image-updated.bin')
 +        data = tools.read_file(fname)
 +
 +        new_blob_data = data[entry.image_pos:entry.image_pos + len(expect_data)]
 +        self.assertEqual(expect_data, new_blob_data)
 +
 +        self.assertEqual(U_BOOT_DATA,
 +                         data[entry.image_pos + len(expect_data):]
 +                         [:len(U_BOOT_DATA)])
 +
 +    def testReplaceSectionDeep(self):
 +        """Test replacing an entry in two levels of sections"""
 +        expect_data = b'w' * len(U_BOOT_DATA + COMPRESS_DATA)
 +        entry_data, expected_fdtmap, image = self._RunReplaceCmd(
 +            'section/section/blob', expect_data,
 +            dts='278_replace_section_deep.dts')
 +        self.assertEqual(expect_data, entry_data)
 +
 +        entries = image.GetEntries()
 +        self.assertIn('section', entries)
 +        section = entries['section']
 +
 +        subentries = section.GetEntries()
 +        self.assertIn('section', subentries)
 +        section = subentries['section']
 +
 +        sect_entries = section.GetEntries()
 +        self.assertIn('blob', sect_entries)
 +        entry = sect_entries['blob']
 +        self.assertEqual(len(expect_data), entry.size)
 +
 +        fname = tools.get_output_filename('image-updated.bin')
 +        data = tools.read_file(fname)
 +
 +        new_blob_data = data[entry.image_pos:entry.image_pos + len(expect_data)]
 +        self.assertEqual(expect_data, new_blob_data)
 +
 +        self.assertEqual(U_BOOT_DATA,
 +                         data[entry.image_pos + len(expect_data):]
 +                         [:len(U_BOOT_DATA)])
 +
 +    def testReplaceFitSibling(self):
 +        """Test an image with a FIT inside where we replace its sibling"""
 +        fname = TestFunctional._MakeInputFile('once', b'available once')
 +        self._DoReadFileRealDtb('277_replace_fit_sibling.dts')
 +        os.remove(fname)
 +
 +        try:
 +            tmpdir, updated_fname = self._SetupImageInTmpdir()
 +
 +            fname = os.path.join(tmpdir, 'update-blob')
 +            expected = b'w' * (len(COMPRESS_DATA + U_BOOT_DATA) + 1)
 +            tools.write_file(fname, expected)
 +
 +            self._DoBinman('replace', '-i', updated_fname, 'blob', '-f', fname)
 +            data = tools.read_file(updated_fname)
 +            start = len(U_BOOT_DTB_DATA)
 +            self.assertEqual(expected, data[start:start + len(expected)])
 +            map_fname = os.path.join(tmpdir, 'image-updated.map')
 +            self.assertFalse(os.path.exists(map_fname))
 +        finally:
 +            shutil.rmtree(tmpdir)
 +
 +    def testX509Cert(self):
 +        """Test creating an X509 certificate"""
 +        keyfile = self.TestFile('key.key')
 +        entry_args = {
 +            'keyfile': keyfile,
 +        }
 +        data = self._DoReadFileDtb('279_x509_cert.dts',
 +                                   entry_args=entry_args)[0]
 +        cert = data[:-4]
 +        self.assertEqual(U_BOOT_DATA, data[-4:])
 +
 +        # TODO: verify the signature
 +
 +    def testX509CertMissing(self):
 +        """Test that binman still produces an image if openssl is missing"""
 +        keyfile = self.TestFile('key.key')
 +        entry_args = {
 +            'keyfile': 'keyfile',
 +        }
 +        with test_util.capture_sys_output() as (_, stderr):
 +            self._DoTestFile('279_x509_cert.dts',
 +                             force_missing_bintools='openssl',
 +                             entry_args=entry_args)
 +        err = stderr.getvalue()
 +        self.assertRegex(err, "Image 'image'.*missing bintools.*: openssl")
 +
+     def testPackRockchipTpl(self):
+         """Test that an image with a Rockchip TPL binary can be created"""
+         data = self._DoReadFile('277_rockchip_tpl.dts')
+         self.assertEqual(ROCKCHIP_TPL_DATA, data[:len(ROCKCHIP_TPL_DATA)])
+     def testMkimageMissingBlobMultiple(self):
+         """Test missing blob with mkimage entry and multiple-data-files"""
+         with test_util.capture_sys_output() as (stdout, stderr):
+             self._DoTestFile('278_mkimage_missing_multiple.dts', allow_missing=True)
+         err = stderr.getvalue()
+         self.assertIn("is missing external blobs and is non-functional", err)
+         with self.assertRaises(ValueError) as e:
+             self._DoTestFile('278_mkimage_missing_multiple.dts', allow_missing=False)
+         self.assertIn("not found in input path", str(e.exception))
  
  if __name__ == "__main__":
      unittest.main()