From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqkgH-00081i-0D for qemu-devel@nongnu.org; Thu, 14 Apr 2016 13:03:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqkgD-0002tC-QY for qemu-devel@nongnu.org; Thu, 14 Apr 2016 13:03:48 -0400 Received: from pm3.irt.drexel.edu ([144.118.29.83]:59627 helo=smtp.mail.drexel.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqkgD-0002so-MB for qemu-devel@nongnu.org; Thu, 14 Apr 2016 13:03:45 -0400 Received: from esa5000-a.irt.drexel.edu (ace-smtp-nat.noc.drexel.edu [144.118.29.70]) by smtp.mail.drexel.edu (Postfix) with ESMTP id 05EA21191359 for ; Thu, 14 Apr 2016 13:03:45 -0400 (EDT) Received: from esa5000-a.irt.drexel.edu (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id D934B24A7CA2_70FCD70B for ; Thu, 14 Apr 2016 17:03:44 +0000 (GMT) Received: from smtp.mail.drexel.edu (ace-smtp-nat.noc.drexel.edu [144.118.29.70]) by esa5000-a.irt.drexel.edu (Sophos Email Appliance) with ESMTP id AE4A024A7CA0_70FCD70F for ; Thu, 14 Apr 2016 17:03:44 +0000 (GMT) Received: from smtp.mail.drexel.edu (localhost.localdomain [127.0.0.1]) by smtp.mail.drexel.edu (Postfix) with SMTP id 65DCF1191077 for ; Thu, 14 Apr 2016 13:03:44 -0400 (EDT) Received: from [129.25.27.90] (n1-27-90.dhcp.drexel.edu [129.25.27.90]) (Authenticated sender: amd435) by smtp.mail.drexel.edu (Postfix) with ESMTP id CEBF711912EA for ; Thu, 14 Apr 2016 13:03:42 -0400 (EDT) From: Alexander Duff Message-ID: <570FCD6E.8090603@drexel.edu> Date: Thu, 14 Apr 2016 13:03:42 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Customizing ARM Emulation boards? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hello, (This is cross-posted from the general discussion mailing list) I'm emulating routers running OpenWrt for ARM using the realview-eb-mpcore machine and I've run into the problem of not being able to create more than one NIC. For what it's worth, when specifying that the NIC should be an smc91c111, qemu-system-arm -M realview-eb-mpcore says that this machine doesn't support that device. When the device is unspecified, it defaults to the smc91c111 once the machine is booted. Every NIC after the first defaults to rtl8139, but emulation of the PCI bus is missing (I am unsure if it's missing due to the OpenWrt kernel built for ARM or something in QEMU) so these devices show in QEMU's monitor, but not on the guest. Since it's a router, I would very much like to have more than one ethernet port. I downloaded the QEMU source and looked through it to see how the devices are created and assigned. In realview.c (lines 265 through 281), I found the following code: for(n = 0; n < nb_nics; n++) { nd = &nd_table[n]; if (!done_nic && (!nd->model || strcmp(nd->model, is_pb ? "lan9118" : "smc91c111") == 0)) { if (is_pb) { lan9118_init(nd, 0x4e000000, pic[28]); } else { smc91c111_init(nd, 0x4e000000, pic[28]); } done_nic = 1; } else { if (pci_bus) { pci_nic_init_nofail(nd, pci_bus, "rtl8139", NULL); } } } So my understanding is that it checks to see if a NIC has been created. If it hasn't, it creates an smc91c111 NIC and maps it to 0x4e000000, then sets "done_nic" to 1 and creates all subsequent NICs as rtl8139 devices. So, I have the following questions: 1) Could I make my own customized board by more-or-less copying the realview.c file and changing this section so that the first 8 or so NICs (however many I can fit in that memory space) are smc91c111 devices and offset them by the space it takes (I want to say 16 but I'll double check first)? The next address on the memory map is 0x4f00000000 (USB, which I don't need anyway). 2) Is there any documentation on programming a custom board? In this case, I don't think I need it, but it would be good to have. I apologize if I've missed it, there are a lot of moving parts in this endeavor. 3) Is there a simpler way to get more than one ethernet port on a virtualized ARM machine? I've been working on this for a long time and I'm afraid I'm getting tunnel vision and missing an obvious solution. 4) Is this the right mailing list?If there's a better place to ask this question or if anyone can point me in the right direction, I would be grateful for that information. I already posted on the OpenWrt forums and received 0 replies. Thank you very much, and I appreciate any help I can get on this. -Alex