aboutsummaryrefslogtreecommitdiff
path: root/board-qemu
diff options
context:
space:
mode:
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2016-03-10 13:30:56 +0530
committerAlexey Kardashevskiy <aik@ozlabs.ru>2016-03-10 19:06:15 +1100
commitd78d7322efbe81027dbc2d11635f5d68fb261c29 (patch)
tree9dda3accfa9d2f7ccca12f0788a312444ad117fc /board-qemu
parent126e458fdc001eb86d2cbac9f782d15d213c9153 (diff)
downloadSLOF-d78d7322efbe81027dbc2d11635f5d68fb261c29.zip
SLOF-d78d7322efbe81027dbc2d11635f5d68fb261c29.tar.gz
SLOF-d78d7322efbe81027dbc2d11635f5d68fb261c29.tar.bz2
virtio-net: initialize to populate mac address
With commit aa9566d2e(virtio-net: move setup-mac to the open routine) local-mac-address property started getting set during open routine. So the netboot workflow was addressed. This was required as the device needs to be probed before reading, after virtio 1.0 changes. While boot from the disk and grub is set to get kernel over network, it breaks. As grub looks for local-mac-address property first, which is not there. Fix this by creating an instance and closing it. setup-mac in the open will populate the local-mac-addres property Reported-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'board-qemu')
-rw-r--r--board-qemu/slof/virtio-net.fs7
1 files changed, 7 insertions, 0 deletions
diff --git a/board-qemu/slof/virtio-net.fs b/board-qemu/slof/virtio-net.fs
index b16fffe..b43d8e9 100644
--- a/board-qemu/slof/virtio-net.fs
+++ b/board-qemu/slof/virtio-net.fs
@@ -91,3 +91,10 @@ virtio-setup-vd VALUE virtiodev
THEN
;
setup-alias
+
+\ Create instance, this will populate the mac address
+: virtio-net-init ( -- )
+ 0 0 get-node open-node ?dup 0= IF ." exiting " cr EXIT THEN
+ close-node
+;
+virtio-net-init