vboot: Explicitly return rollback error from vb2api_load_kernel

Previously, vb2api_load_kernel() collapsed all kernel loading errors
into generic VB2_ERROR_LK_INVALID_KERNEL_FOUND or
VB2_ERROR_LK_NO_KERNEL_FOUND. This prevented the caller from
identifying rollback protection failures.

Modify vb2api_load_kernel() to specifically translate
VB2_ERROR_AVB_ERROR_ROLLBACK_INDEX into a new VB2_ERROR_LK_ROLLBACK
error code. This allows the UI layer to display a specific error
message for rollback violations (e.g., "Outdated recovery image")
instead of a generic failure screen.

BUG=b:488131983
BRANCH=none
TEST=Verified that the "Outdated recovery image" screen is displayed
     when a rollback error occurs during recovery.

Cq-Depend: chromium:7666120
Change-Id: I9c0c090730fdad7dd4acc06bd83fb04919c2e1b7
Signed-off-by: Grzegorz Bernacki <bernacki@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/7666079
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Tomasz Michalec <tmichalec@google.com>
Reviewed-by: Konrad Adamczyk <konrada@google.com>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
5 files changed