New issue
Advanced search Search tips

Issue 848410 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

netboot doesn't populate /proc/device-tree/firmware/chromeos/firmware-type

Project Member Reported by diand...@chromium.org, May 31 2018

Issue description

In b/79891439 we found a difference in behavior between booting a kernel with netboot and booting it normally.  

The problem was tracked down to the fact that with netboot the file /proc/device-tree/firmware/chromeos/firmware-type isn't populated.  crossystem uses this in the command 'crossystem mainfw_type' and the result of that command apparently changes certain Chrome behaviors.

Is there a good reason why firmware-type isn't populated for netboot?
 
Well, there is actually because /firmware/chromeos contains a bunch of vboot data and vboot doesn't run all the way through in the netboot case. If you use an image.net.bin image, the kernel selection part doesn't run at all. If you press Ctrl+N it runs but is aborted in the middle of the UI loop, without actually selecting a kernel, so at least some of the binary fields in the /firmware/chromeos/vboot-shared-data node would not look the way crossystem expects them to be. For image.net.bin we'd have more problems because even the data that is already available (from the firmware selection parts in coreboot) is still in vboot2 structures... the translation back into the vboot1 structures crossystem expects doesn't happen until kernel selection time (and the current vboot API isn't really suited to running a small part of it but not the whole thing).

I assume you care mostly about the Ctrl+N case, so I can give you https://chromium-review.googlesource.com/1094014 to probably make that mostly work. Anything more would likely be more effort than it's worth.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/depthcharge/+/787d8f6df301f619a15a06583822a2169c6702c7

commit 787d8f6df301f619a15a06583822a2169c6702c7
Author: Julius Werner <jwerner@chromium.org>
Date: Fri Jun 15 17:58:05 2018

netboot: Initialize crossystem data for Ctrl+N

Some people complained about crossyste mainfw_type and other things not
working during netboot. This patch should resolve that problem, although
it's not 100% clean (the VbSharedData passed to crossystem will not have
all values filled out the same way as a normal boot, since we didn't do
the actual kernel selection part).

BRANCH=None
BUG= chromium:848410 
TEST=Netbooted a Cheza, confirmed that 'crossystem mainfw_type' returns
'developer'.

Change-Id: I1da99091bdf7931705d2748c9df6745053ccba34
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1094014
Commit-Ready: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>

[modify] https://crrev.com/787d8f6df301f619a15a06583822a2169c6702c7/src/debug/dev.c

Status: Fixed (was: Untriaged)

Sign in to add a comment