Message ID | 1457596856-32458-1-git-send-email-nikunj@linux.vnet.ibm.com |
---|---|
State | Accepted |
Headers | show |
On 03/10/2016 07:00 PM, Nikunj A Dadhania wrote: > 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 > > Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Thanks, applied and pushed to github. > --- > board-qemu/slof/virtio-net.fs | 7 +++++++ > 1 file changed, 7 insertions(+) > > 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 >
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
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 Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> --- board-qemu/slof/virtio-net.fs | 7 +++++++ 1 file changed, 7 insertions(+)