Bootimage header size for header version 2 was being populated
incorrectly. Also, throw an error when an unsupported boot header
version is passed in as an argument.
Test: can see correct header size using unpack_bootimg.py
Bug: 111136242
Change-Id: Ia4ed7b2469a5296546627c91f441c496d67f5ce3
Boot image with header version 2 supports inclusion of
DTB image within the boot image.
Bug: 111136242
Test: unpack_bootimg.py is able to extract DTB added by
mkbootimg.py
Change-Id: Ie6ae2507aa0c1960c73077d618aacafb83ae8459
For non-A/B devices, the recovery partition should be
self-sufficient and not depend on any other partition.
Since recovery may need load ACPIO before access to devices,
we need to make sure that the the recovery image also contains
the information from the ACPIO image.
Test: can generate image with acpio/acpi
Fixes: 111871613
Change-Id: I77b95a4c78a7e967f5e682ba7053f9d03f4ca51c
Also, remove recovery_dtbo_offset argument
for mkbootimg as this is calculated based
on sizes of kernel, ramdisk and second
binaries.
Also, modify unpack_bootimg to use the recovery_dtbo_offset
field to extract recovery_dtbo.
Test: make recoveryimage showcommands -j32
unpack_bootimg --boot_img $OUT/recovery.img
diff recovery_dtbo dtbo.img
Change-Id: I588ccc8b739c169b6f78c17ffe554c5562397d98
Also move -c to --cmdline to match the python mkbootimg tool. Remove
the short options for these rarely-used options.
Remove #if 0 cruft from <bootimg/bootimg.h>.
Bug: http://b/77340848
Test: manual testing (need to fix http://b/77809061 for unit tests)
Change-Id: Ieaa795566611bd89ba3fee39a1d9f6ad0713a587
The script prints out the boot image header
contents and extracts the kernel, ramdisk,
second bootloader and recovery DTBO images.
Bug: 74763691
Test: unpack_bootimg --boot_img $OUT/recovery.img
Change-Id: Iadbca81c157d9e4607f808a14468ab5542347507
For non-A/B devices, the recovery partition should
be self-sufficient and not depend on any other
partition. Since recovery may need access to devices
added to the DT by overlays(for eg.display), we need to
make sure that the the recovery image also contains
the information from the DTBO image.
The following fields are added to the boot image
header for this purpose:
-boot header version
-header size
-recovery dtbo size
-recovery dtbo address
Bug: 74763691
Test: unpack_bootimage --boot_img $OUT/recovery.img
diff out/extracted_dtbo $TOP/device/google/wahoo-kernel/dtbo.img
Change-Id: I1969859038b84fac1e4a71f79f2f546b9cacffc8
The parse_int function attempts to interpret the string to detect
base, which leads to it assuming strings starting with 0 are base
8. This obviously fails for certain dates, so use int instead.
Bug: 27498078
Bug: 22914603
Change-Id: I50b1fb3d7876f2ec17d00649cc9a2d23af2aec2b
Adds operating system version and security patch level to the boot
image header. This change take into use one of the existing unused
fields to preserve compatibility.
Note: All information is packed into a single field, because there
are a lot of existing devices that break if the first unused field
is set to a non-zero value.
Bug: 27498078
Bug: 22914603
Change-Id: I24953129e06019b95014a050e916fe4f5c199286
Adds operating system version and security patch level to the boot
image header. This change takes over two existing unused fields to
preserve compatibility with existing devices.
Bug: 27498078
Bug: 22914603
Change-Id: I57682611e0c27fec5ed284da7d9a788383ff98b1
Allow the scripts to run with both python 2.x and 3.x
Change-Id: I911118bcf370d09bdb2fb46afa21af64257f1ffb
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
We can't simply increase the value of BOOT_ARGS_SIZE since that
would break past binary compatibility; the offset of 'id' would
change. This can cause serious problems with incremental OTA updates.
Instead, define a supplemental field which stores command line
information beyond the first 512 bytes. A value of 1024 was chosen
to keep the total size of struct boot_img_hdr under the smallest
page size of 2048 bytes.
Even if the extra_cmdline field is used, the original cmdline
field is still always NULL-terminated to avoid issues with older
bootloaders that haven't been updated.
Change-Id: I887e6f1db351a5b71a61e3a03363cf8856123d74
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
By now these sizes are very common, so make sure we support them.
Change-Id: Ib1963fbabc4ec0b4623f2045a3cbeedffbad7ee8
Signed-off-by: Ithamar R. Adema <ithamar@upgrade-android.com>
Add the --base flag to mkbootimg and -b flag to fastboot, to allow
the default kernel base address (0x10000000) to be changed.
Signed-off-by: Brian Swetland <swetland@google.com>