* Unable to log messages into default qemu log
@ 2019-12-24 9:55 Aijaz.Baig
0 siblings, 0 replies; only message in thread
From: Aijaz.Baig @ 2019-12-24 9:55 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 2390 bytes --]
I’m trying to experiment with adding a Qemu devices (ethernet/NIC) and it’s corresponding Linux driver. I’ve chosen to port the following ‘codeproject’ project:
https://www.codeproject.com/Articles/1087177/Linux-Ethernet-Driver-using-Qemu
Since this was written a couple of years back, it didn’t integrate with latest qemu directly so I modified the code like so:
https://github.com/qemu/qemu/compare/master...redbilledpanda:skel_eth
I am unable to ascertain whether this device is indeed getting realized or not.
I am invoking qemu like so:
‘qemu-system-arm -m 512M -M vexpress-a9 -D qemu.log -kernel buildroot-2019.02.5/output/images/zImage -dtb buildroot-2019.02.5/output/images/vexpress-v2p-ca9.dtb -append "console=ttyAMA0 ip=dhcp" -initrd buildroot-2019.02.5/output/images/rootfs.cpio -nographic -net nic -net bridge,br=mybridge’
On the linux kernel side, if I keep the existing driver for the board (aka lan9118), everything is A-OK and the machine boots up and I can see the log. However when I replace that with the (modified) driver from the aforementioned codeproject link, I get an (expected) kernel panic. Which can only mean that my device backend is still lan9118 and not skel_eth_dev (the one I added). I tried specifying the model explicitly while invoking qemu like so:
‘qemu-system-arm -m 512M -M vexpress-a9 -D qemu.log -kernel buildroot-2019.02.5/output/images/zImage -dtb buildroot-2019.02.5/output/images/vexpress-v2p-ca9.dtb -append "console=ttyAMA0 ip=dhcp" -initrd buildroot-2019.02.5/output/images/rootfs.cpio -nographic -net nic,model=skel_eth_dev -net bridge,br=mybridge’
This is the string I used in the ‘typeinfo’ structure while registering the device
#define TYPE_SKEL_ETH_DEV "skel_eth_dev"
…
static const TypeInfo skel_eth_device_info = {$
.name = TYPE_SKEL_ETH_DEV,$
.parent = TYPE_SYS_BUS_DEVICE,$
.instance_size = sizeof(skel_eth_device_state),$
.class_init = skel_eth_device_class_init,$
};
To which I get the following error:
skel_eth_device: skel_eth_device_register_types
skel_eth_device: skel_eth_device_class_init
qemu-system-arm: Unsupported NIC model: skel_eth_dev
what are the two messages I see in the first two lines? And why does qemu say this model isn’t supported? I am unable to see any log message whatsoever in qemu.log
Keen to hear
Aijaz Baig
[-- Attachment #2: Type: text/html, Size: 3391 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-12-24 9:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-24 9:55 Unable to log messages into default qemu log Aijaz.Baig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).