board-status: Implement handling of "Clone of"

Change-Id: Ifb728ebb5d0e98b0c8a59f3bd8803ce193a05e5f
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69184
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Patrick Georgi 2022-11-03 11:59:40 +01:00
parent 52941673b1
commit a6dedb8c22
1 changed files with 8 additions and 0 deletions

View File

@ -536,6 +536,14 @@ func collectBoards(dirs <-chan NamedFS) {
bi["Vendor cooperation score"] = "—" bi["Vendor cooperation score"] = "—"
} }
venboard := vendor + string(filepath.Separator) + board
if bi["Clone of"] != "" {
venboard = bi["Clone of"]
venboard = strings.ReplaceAll(venboard, "/", string(filepath.Separator))
newpath := filepath.Join(dir.Name, "..", "..", venboard)
dir.Name = newpath
}
north, south, superio, cpu, partnum, err := readKconfig(dir) north, south, superio, cpu, partnum, err := readKconfig(dir)
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "'%s' is not a mainboard directory: %v\n", dir.Name, err) fmt.Fprintf(os.Stderr, "'%s' is not a mainboard directory: %v\n", dir.Name, err)