]> git.dujemihanovic.xyz Git - u-boot.git/commit
android_ab: Fixes: Fix backup offset calculation
authorJoshua Watt <jpewhacker@gmail.com>
Wed, 28 Aug 2024 14:37:57 +0000 (08:37 -0600)
committerMattijs Korpershoek <mkorpershoek@baylibre.com>
Thu, 5 Sep 2024 06:55:04 +0000 (08:55 +0200)
commitcc2f60c13f6aaf1bd277cf10c8b375c2e4a695b7
tree03909474db52042b7745961c51bb3743fd439bd6
parent1312faac5f52d27cfb45dfe1a5a93a2944ca5c21
android_ab: Fixes: Fix backup offset calculation

The backup offset is in bytes, but was incorrectly be interpreted as
blocks, leading to it being written to the wrong location. Fix the
calculation, clarify that ANDROID_AB_BACKUP_OFFSET is in bytes and must
be a multiple of the block size, and add a runtime check to validate the
offset.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Fixes: 3430f24bc69d ("android_ab: Try backup booloader_message")
Link: https://lore.kernel.org/r/20240828143924.3987331-1-JPEWhacker@gmail.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
boot/android_ab.c
common/Kconfig