-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable network (eth0) in qemu image? #103
Comments
Did you compile the driver into the kernel or as a module? In the latter case I guess you haven't included the module in the rootfs. |
Ahh, but which driver? I just guessed some and enabled in linux .config
and in boot I see ...
...but, still resulting the "No such device" listed in first message. I'm just looking for some configuration recipe that someone has used (including any additional qemu parameters, if needed). In current try I added line |
Ok, I got the eth0 interface with qemu parameters |
Hi @msa2, |
Configuring
The tail end of the normal world console log looks as follows:
So, no address on eth0 interface, log shows mysterious referencence to 10.0.2.15, but that does not seem to be anywhere. Loopback interface is not up, but if you bring it up, ping to loopback address works.
I assumed that at least plain TCP connections should have worked in this mode? If so, there is something missing in my configuration, and this magical thing is what I'm looking for... perhaps something on the host side? |
I'm afraid I have no solution for you @msa2 , but indeed it would be nice to get this working since it's pretty useful to have network connection from the QEMU environment. |
Some qemu networking docs seems imply that dhcp is used. The root file system does not contain any dchp client program (dhclient needed?) |
That might very well be the case. I just tried on another device (real hardware), but otherwise same setup, i.e., same kernel, same root fs (busybox) and I get no IP-address. The only other devices I've used network with are HiKey and Raspberry Pi3, but in both cases there I've used another root fs (Debian/Ubuntu based) instead of the busybox initramfs based root fs. |
Busybox comes with
The file |
@msa2
|
@jforissier , that did it on the device I'm currently using (DRA7), thanks! |
Well, tricky to get the simple script (would need to add it to filelist). However, I just used
So, the recipe is not yet working for 'qemu' repo..., looks udhcp does not do anything with '-s' switch? |
Yeps, someone should add it to https://github.com/OP-TEE/build/blob/master/common.mk#L288 or probably even better https://github.com/linaro-swg/gen_rootfs/blob/master/filelist.txt. It might be that I'm "the someone" if no-one else does it before me :) |
@msa2 did you try adding debug statements to |
@msa2 BTW, you did not forget to |
Yes, it was executable. HOWEVER, it did work when I actually moved the script into directory /etc/udhcp/ !!! Anyway, all seems ok, except the minor detail in QEMU docs (some places) that claim this is enabled by default without -netdev. This just gives...
...but, works with
So, someone just needs to write simple instructions (and qemu possibly include this script file in root file system). |
I just followed the same steps, and faced the same issue with
This solution works fine |
Issue can be closed then. But hopefully, somewhere documented so that the next person running into this, does not need to spend so much time to find the solution. |
Closing this issue since #104 has been merged (TL;DR: build with |
When qemu boots, I see
Freeing unused kernel memory: 1024K (80900000 - 80a00000) preparing networking... ip: SIOCGIFFLAGS: No such device running rc.d services... mounting tmpfs at /dev ...done mounting pts at /dev/pts ...done creating initial mdev device nodes ...done setting system time from /dev/rtc0
..and once booted
root@Vexpress:/ ls /sys/class/net/ lo root@Vexpress:/ ifconfig eth0 192.168.1.158 up ifconfig: SIOCSIFADDR: No such device root@Vexpress:/ soc_term: read fd EOF
I've searched, and tried multiple "-netdev ..." variations on qemu start, but none seems to help. Anyone? What I'm missing in configuration? This seems to be some basic linux config issue? (I even enabled E1000 and PCI, but it changed nothing).
The text was updated successfully, but these errors were encountered: