Deal with the missing MAC address on the Cello Realtek NIC by incorporating an alternative driver that programs a hardcoded MAC address.
The intention was to combine this driver with a PcdsDynamicHii PCD which gets set automatically from a UEFI var, but I could not get this to work, so for now, the MAC is hardcoded in the image.
E.g.,
build -p OpenPlatformPkg/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc \ -D RENESAS_XHCI_FW_DIR=~/Downloads \ -D RTK8169_MAC_OVERRIDE=0x0,0xE0,0x4C,0x97,0x3C,0xDC
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel ard.biesheuvel@linaro.org --- Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc | 7 +++++++ Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf | 4 ++++ 2 files changed, 11 insertions(+)
diff --git a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc index 90cda24ae49d..7e50ac179dc6 100644 --- a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc +++ b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc @@ -698,3 +698,10 @@ DEFINE DO_FLASHER = FALSE ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf } !endif + +!ifdef $(RTK8169_MAC_OVERRIDE) + OpenPlatformPkg/Drivers/Net/Realtek8169MacOverride/Realtek8169MacOverride.inf + +[PcdsFixedAtBuild] + gOpenPlatformTokenSpaceGuid.PcdMacOverride|{$(RTK8169_MAC_OVERRIDE)} +!endif diff --git a/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf b/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf index 6f7428f0c4ca..99becb445301 100644 --- a/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf +++ b/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf @@ -240,6 +240,10 @@ READ_LOCK_STATUS = TRUE } !endif
+!ifdef $(RTK8169_MAC_OVERRIDE) + INF OpenPlatformPkg/Drivers/Net/Realtek8169MacOverride/Realtek8169MacOverride.inf +!endif + [FV.STYX_EFI] FvAlignment = 16 ERASE_POLARITY = 1