Hello,
I'm trying to fire up an ARM fastmodel using a virtio block device rather than the emulated MMC block device.
UEFI is reading the kernel & DTB off the virtio device, so I know the device is present.
I added this to my kernel config:
diff --git a/linaro/configs/vexpress.conf b/linaro/configs/vexpress.conf index 83acca8..2582450 100644 --- a/linaro/configs/vexpress.conf +++ b/linaro/configs/vexpress.conf @@ -58,3 +58,12 @@ CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_NET_9P=y +CONFIG_NET_9P_VIRTIO=y +CONFIG_VIRTIO_BLK=y +CONFIG_VIRTIO_NET=y +CONFIG_VIRTIO_CONSOLE=y +CONFIG_VIRTIO=y +CONFIG_VIRTIO_BALLOON=y +CONFIG_VIRTIO_MMIO=y +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
So far, I don't see any vda devices being enumerated (or any other virtio messages) and it rootwaits for /dev/vda2.
I'm launching the model like this:
FVP_VE_Cortex-A15x1 -C motherboard.flashloader0.fname=$UEFI -C motherboard.flashloader1.fname=uefi-vars.fd -C motherboard.flashloader1.fnameWrite=uefi-vars.fd -C motherboard.pl011_uart0.unbuffered_output=true -C motherboard.smsc_91c111.enabled=1 -C motherboard.hostbridge.userNetworking=1 -C motherboard.virtioblockdevice.image_path=linaro.img
My kernel boot log is here:
https://pastebin.linaro.org/view/97165b9e
Model version:
Fast Models [8.3.44 (Nov 20 2013)]
Anyone had better luck using virtio on armv7 models and have any insights?
Cheers, Ryan.
On 6 January 2014 19:46, Ryan Harkin ryan.harkin@linaro.org wrote:
Hello,
I'm trying to fire up an ARM fastmodel using a virtio block device rather than the emulated MMC block device.
UEFI is reading the kernel & DTB off the virtio device, so I know the device is present.
So far, I don't see any vda devices being enumerated (or any other virtio messages) and it rootwaits for /dev/vda2.
Stupid question: does the DTB you're passing to the kernel definitely have the virtio-mmio devices in it? (hopefully in the right locations).
I generally when trying to debug QEMU virtio-mmio found the kernel a bit less than chatty about what was happening; if you need to debug this further it might be worth throwing printk statements into the appropriate bits of the kernel, to see if it's not looking for a virtio-mmio transport, or if it is but it doesn't find it (bad magic number) or if it is and finds it but doesn't start the backend for some reason.
thanks -- PMM
On 6 January 2014 20:26, Peter Maydell peter.maydell@linaro.org wrote:
On 6 January 2014 19:46, Ryan Harkin ryan.harkin@linaro.org wrote:
Hello,
I'm trying to fire up an ARM fastmodel using a virtio block device rather than the emulated MMC block device.
UEFI is reading the kernel & DTB off the virtio device, so I know the
device
is present.
So far, I don't see any vda devices being enumerated (or any other virtio messages) and it rootwaits for /dev/vda2.
Stupid question: does the DTB you're passing to the kernel definitely have the virtio-mmio devices in it? (hopefully in the right locations).
OMG, I think my brain has been in deep sleep. No, the DTB doesn't have virtio-mmio.
I'll try it again tomorrow, but I'm pretty sure that's it. Thanks!
I generally when trying to debug QEMU virtio-mmio found the kernel a bit less than chatty about what was happening; if you need to debug this further it might be worth throwing printk statements into the appropriate bits of the kernel, to see if it's not looking for a virtio-mmio transport, or if it is but it doesn't find it (bad magic number) or if it is and finds it but doesn't start the backend for some reason.
thanks -- PMM
Hi Ryan,
On 01/06/2014 05:27 PM, Ryan Harkin wrote:
On 6 January 2014 20:26, Peter Maydell <peter.maydell@linaro.org mailto:peter.maydell@linaro.org> wrote:
On 6 January 2014 19:46, Ryan Harkin <ryan.harkin@linaro.org <mailto:ryan.harkin@linaro.org>> wrote: > Hello, > > I'm trying to fire up an ARM fastmodel using a virtio block device rather > than the emulated MMC block device. > > UEFI is reading the kernel & DTB off the virtio device, so I know the device > is present. > So far, I don't see any vda devices being enumerated (or any other virtio > messages) and it rootwaits for /dev/vda2. Stupid question: does the DTB you're passing to the kernel definitely have the virtio-mmio devices in it? (hopefully in the right locations).
OMG, I think my brain has been in deep sleep. No, the DTB doesn't have virtio-mmio.
I'll try it again tomorrow, but I'm pretty sure that's it. Thanks!
While debugging it may be easier to specify the device with a kernel parameter than make device tree modifications.
virtio_mmio.device=1K@0x0130000:42
Regards, Christopher
On 6 January 2014 22:37, Christopher Covington cov@codeaurora.org wrote:
Hi Ryan,
On 01/06/2014 05:27 PM, Ryan Harkin wrote:
On 6 January 2014 20:26, Peter Maydell <peter.maydell@linaro.org mailto:peter.maydell@linaro.org> wrote:
On 6 January 2014 19:46, Ryan Harkin <ryan.harkin@linaro.org <mailto:ryan.harkin@linaro.org>> wrote: > Hello, > > I'm trying to fire up an ARM fastmodel using a virtio block device
rather
> than the emulated MMC block device. > > UEFI is reading the kernel & DTB off the virtio device, so I know
the device
> is present. > So far, I don't see any vda devices being enumerated (or any other
virtio
> messages) and it rootwaits for /dev/vda2. Stupid question: does the DTB you're passing to the kernel definitely have the virtio-mmio devices in it? (hopefully in the right locations).
OMG, I think my brain has been in deep sleep. No, the DTB doesn't have virtio-mmio.
I'll try it again tomorrow, but I'm pretty sure that's it. Thanks!
While debugging it may be easier to specify the device with a kernel parameter than make device tree modifications.
virtio_mmio.device=1K@0x0130000:42
Thanks for your help, that's a nice tip. It didn't quite work however. The DT entry I added was slightly different:
+ virtio_block@0130000 { + compatible = "virtio,mmio"; + reg = <0x130000 0x1000>; + interrupts = <0x2a>; + };
But, it's working now, so thanks again to Peter for pointing out the obvious mistake.
Regards, Christopher
-- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation.