Bypass pickargs usage for cvm boards to fix GRUB boot hang
An [upstream COS
change](https://cos-review.git.corp.google.com/c/third_party/platform/crosutils/+/142463)
introduced the `pickargs` command into the legacy GRUB configuration
templates to dynamically parse extra command line arguments from
'cmdline_extra.bin'.
However, the minimal GRUB binary used for Confidential VM (cvm) boards
does not include or support the custom 'pickargs' module. As a result,
when the image boots on target hardware, GRUB encounters an 'unknown
command pickargs' error and freezes entirely before the kernel can
start, resulting in a blank serial console.
This fix introduces a conditional check using wildcard matching
(`*cvm-amd64-gdc*`) in `create_legacy_bootloader_templates.sh`. If a cvm variant
board is detected, the script bypasses the pickargs layout and instead
emits the exact, character-for-character legacy GRUB text configuration
that was working previously.
Review Notes:
- The master behavior using `pickargs` remains 100% identical and unchanged
for all other boards.
- This fix successfully restores the serial console stream and lets the
verified boot flow complete cleanly on cvm targets.
BUG=b/504738188 TEST=https://paste.googleplex.com/6162200533270528
Change-Id: I58280281d58b4f2a81eda9eff765defaf90e8678
Reviewed-on: https://cos-review.googlesource.com/c/third_party/platform/crosutils/+/148203
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
1 file changed