Message ID | 20210407043228.2268429-8-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Bin Meng |
Headers | show |
Series | misc: Some more misc patches | expand |
Hi Simon, On Wed, Apr 7, 2021 at 12:33 PM Simon Glass <sjg@chromium.org> wrote: > > The BIOS version may not be present, e.g. on a Chrome OS build. Add the > BIOS date as well, so we get some sort of indication of coreboot's > vintage. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > board/coreboot/coreboot/coreboot.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/board/coreboot/coreboot/coreboot.c b/board/coreboot/coreboot/coreboot.c > index 175d3ce691a..93f897893eb 100644 > --- a/board/coreboot/coreboot/coreboot.c > +++ b/board/coreboot/coreboot/coreboot.c > @@ -39,6 +39,7 @@ int show_board_info(void) > const char *bios_ver = smbios_string(bios, t0->bios_ver); I would insert the line here and name the variable as bios_date: const char *bios_date = smbios_string(bios, t0->bios_release_date); > const char *model = smbios_string(system, t1->product_name); > const char *manufacturer = smbios_string(system, t1->manufacturer); > + const char *date = smbios_string(bios, t0->bios_release_date); > > if (!model || !manufacturer || !bios_ver) > goto fallback; > @@ -46,6 +47,8 @@ int show_board_info(void) > printf("Vendor: %s\n", manufacturer); > printf("Model: %s\n", model); > printf("BIOS Version: %s\n", bios_ver); > + if (date) > + printf("BIOS date: %s\n", date); > > return 0; Regards, Bin
diff --git a/board/coreboot/coreboot/coreboot.c b/board/coreboot/coreboot/coreboot.c index 175d3ce691a..93f897893eb 100644 --- a/board/coreboot/coreboot/coreboot.c +++ b/board/coreboot/coreboot/coreboot.c @@ -39,6 +39,7 @@ int show_board_info(void) const char *bios_ver = smbios_string(bios, t0->bios_ver); const char *model = smbios_string(system, t1->product_name); const char *manufacturer = smbios_string(system, t1->manufacturer); + const char *date = smbios_string(bios, t0->bios_release_date); if (!model || !manufacturer || !bios_ver) goto fallback; @@ -46,6 +47,8 @@ int show_board_info(void) printf("Vendor: %s\n", manufacturer); printf("Model: %s\n", model); printf("BIOS Version: %s\n", bios_ver); + if (date) + printf("BIOS date: %s\n", date); return 0;
The BIOS version may not be present, e.g. on a Chrome OS build. Add the BIOS date as well, so we get some sort of indication of coreboot's vintage. Signed-off-by: Simon Glass <sjg@chromium.org> --- board/coreboot/coreboot/coreboot.c | 3 +++ 1 file changed, 3 insertions(+)