Project

General

Profile

Actions

Bug #16312

open

loader: VB_NVLIST is missing BOOTENV_VERSION management

Added by Toomas Soome about 2 months ago. Updated about 2 hours ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

While testing #16221, I found the loader nvstore command does not work with existing nvlist in bootenv area. We read out bootenv area, and provide read data as nvlist, but nvstore is expecting to find version data from provided nvlist - so we need to provide it or nvstore_init() will refuse to work with this store.

Since bootenv area can store different types of data (plain string used historically, nvlist is used in current setups), the version number concept was introduced, and to help to distinguish different types of data, te version number (if present) is stored directly as first bytes of bootenv area. Data read from bootenv is packed to nvlist and the version number should be added into the created (or read) nvlist, to make it possible to distinguish about which configuration is used with bootenv area.

This patch is to make sure we always do add version to nvlist read out of bootenv area and likewise, if we store nvlist, we drop version from it (because version is already stored at the beginning of the bootenv area. Both boot loader and kernel need to perform same in regard to bootenv area.

Testing done: used loader nvstore command and userland eeprom (-b -z poolname -p) to insert and verify data.

Actions #1

Updated by Electric Monk about 2 months ago

  • Gerrit CR set to 3314
Actions #2

Updated by Toomas Soome about 2 hours ago

  • Description updated (diff)
Actions

Also available in: Atom PDF