From: Aijaz.Baig@protonmail.com
To: qemu-devel@nongnu.org
Subject: Unable to log messages into default qemu log
Date: Tue, 24 Dec 2019 09:55:22 +0000 [thread overview]
Message-ID: <000301d5ba40$40ed8980$c2c89c80$@protonmail.com> (raw)
[-- 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 --]
reply other threads:[~2019-12-24 9:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000301d5ba40$40ed8980$c2c89c80$@protonmail.com' \
--to=aijaz.baig@protonmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).