#680 [grub] grub.cfg from mkimage improvements (not CBFS one)

Open
opened 1 month ago by swiftgeek · 0 comments
  • (NOT implemented yet) Reuse boot_devices RTC nvram variable to make grubtest.cfg testing more robust - when grubtest.cfg is loaded from grub.cfg, grub.cfg might load some module/perform something in way that was required for device operation, so when user replaces grub.cfg with grubtest.cfg it might lead to different behavior, than one when initially testing it. Also it should be actually sufficient to just use grubtest.cfg this way as there won't be any difference to swapping grub.cfg besides added recovery path that doesn't involve external reflashing - removing RTC battery will make it switch back to grub.cfg as RTC nvram is cleared. Proposed contents of the variable would be just filename without a path, or if impossible to sanitize - simple check whether variable is set to grubtest.cfg exactly

TODO: check for alternative lockable RTC nvram space

TODO: check for possible nvramtool-like dependency

References:

* (NOT implemented yet) Reuse `boot_devices` RTC nvram variable to make `grubtest.cfg` testing more robust - when `grubtest.cfg` is loaded from `grub.cfg`, `grub.cfg` might load some module/perform something in way that was required for device operation, so when user replaces `grub.cfg` with `grubtest.cfg` it might lead to different behavior, than one when initially testing it. Also it should be actually sufficient to just use `grubtest.cfg` this way as there won't be any difference to swapping `grub.cfg` besides added recovery path that doesn't involve external reflashing - removing RTC battery will make it switch back to `grub.cfg` as RTC nvram is cleared. Proposed contents of the variable would be just filename without a path, or if impossible to sanitize - simple check whether variable is set to `grubtest.cfg` exactly TODO: check for alternative lockable RTC nvram space TODO: check for possible nvramtool-like dependency References: * [boot_devices variable use in FILO](https://www.coreboot.org/FILO#NVRAM_Parsing)
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.