mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
binman: Add a new "skip-at-start" property in Section class
Currently binman calculates '_skip_at_start' based on 'end-at-4gb' property and it is used for x86 images. For PowerPC mpc85xx based CPU, CONFIG_SYS_TEXT_BASE is the entry offset of the first entry. It can be 0xeff40000 or 0xfff40000 for nor flash boot, 0x201000 for sd boot etc, so "_skip_at_start" should be set to CONFIG_SYS_TEXT_BASE. 'end-at-4gb' property is not applicable where CONFIG_SYS_TEXT_BASE + Image size != 4gb. Add new property 'skip-at-start' in Section class so that '_skip_at_start' can be calculated either based on 'end-at-4gb' or based on "skip-at-start". Add a test case to check that 'skip-at-start' and 'end-at-4gb' property can't be used together. Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
@@ -711,6 +711,14 @@ class TestFunctional(unittest.TestCase):
|
||||
self.assertIn("Section '/binman': Section size must be provided when "
|
||||
"using end-at-4gb", str(e.exception))
|
||||
|
||||
def test4gbAndSkipAtStartTogether(self):
|
||||
"""Test that the end-at-4gb and skip-at-size property can't be used
|
||||
together"""
|
||||
with self.assertRaises(ValueError) as e:
|
||||
self._DoTestFile('80_4gb_and_skip_at_start_together.dts')
|
||||
self.assertIn("Section '/binman': Provide either 'end-at-4gb' or "
|
||||
"'skip-at-start'", str(e.exception))
|
||||
|
||||
def testPackX86RomOutside(self):
|
||||
"""Test that the end-at-4gb property checks for offset boundaries"""
|
||||
with self.assertRaises(ValueError) as e:
|
||||
|
Reference in New Issue
Block a user