pmb.parse.bootimg: Add preliminary support for header v2 (MR 2194)

This includes setting header_version="2" as well as dtb_offset
according to the input boot.img when header v2 is detected.

Also adds the following previously missed deviceinfo_attributes:

* "header_version"
* "bootimg_custom_args"

And fixes failing tests now that header_version is always parsed from
boot.img files.
This commit is contained in:
Jami Kettunen 2022-07-15 17:10:04 +03:00 committed by Clayton Craft
parent c36e4a43ac
commit 255e69be5e
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A
4 changed files with 21 additions and 8 deletions

View file

@ -91,7 +91,8 @@ def test_questions_bootimg(args, monkeypatch):
bootimg_path = pmb_test.const.testdata + "/bootimg/normal-boot.img"
fake_answers(monkeypatch, [bootimg_path])
output = {"base": "0x80000000",
output = {"header_version": "0",
"base": "0x80000000",
"kernel_offset": "0x00008000",
"ramdisk_offset": "0x04000000",
"second_offset": "0x00f00000",