Closed geneva1 closed 4 years ago
I have re-compiled QEMU with QEMU_USERNET_ENABLE ?=y
, but eth0
interface still does not show up in ifconfig
. Why ?
rog@rog-GL502VMK:~/Documents/optee-qemu/build$ cat common.mk | grep -C 10 USERNET
CCACHE ?= $(shell which ccache) # Don't remove this comment (space is needed)
# Accessing a shared folder on the host from QEMU:
# # Set QEMU_VIRTFS_ENABLE to 'y' and adjust QEMU_VIRTFS_HOST_DIR
# # Then in QEMU, run:
# # $ mount -t 9p -o trans=virtio host <mount_point>
QEMU_VIRTFS_ENABLE ?= y
QEMU_VIRTFS_HOST_DIR ?= $(ROOT)
QEMU_USERNET_ENABLE ?= y
################################################################################
# Mandatory for autotools (for specifying --host)
################################################################################
ifeq ($(COMPILE_NS_USER),64)
MULTIARCH := aarch64-linux-gnu
else
MULTIARCH := arm-linux-gnueabihf
endif
rog@rog-GL502VMK:~/Documents/optee-qemu/build$
sorry, i can't tell.
Starting network (udhcpc): FAIL
Why the kernel start-up log showed failure in starting udcpc network ?
I also tried to use -device e1000,netdev=vmnic
instead of -device virtio-net-device,netdev=vmnic
in common.mk
, but eth0
interface still does not show up.
@etienne-lms I had added CONFIG_IP_PNP_DHCP=y and CONFIG_IP_PNP=y
to kernel config file, kconfigs/qemu.conf
, but kernel start-up log still show Starting network (udhcpc): FAIL
@etienne-lms For dhcp installation, http://www.linuxfromscratch.org/blfs/view/svn/basicnet/dhcp.html shows more than just kernel config modifications (which I had already done).
Besides, I only have the following dhcp-related files inside QEMU session.
# find / -name "*dhcp*"
/tmp/udhcpc.log
/sbin/udhcpc
/usr/share/udhcpc
/etc/init.d/S50udhcpc
#
# cat /etc/init.d/S50udhcpc
#!/bin/sh
case "$1" in
start)
printf "Starting network (udhcpc): "
udhcpc >> /var/log/udhcpc.log 2>&1
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping network (udhcpc): "
killall udhcpc
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
restart|reload)
"$0" stop
"$0" start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
#
# /etc/init.d/S50udhcpc start
Starting network (udhcpc): FAIL
#
Could you advise ?
Sorry. I never used that on Qemu. Maybe Qemu the not the most handy setup with testing network stuff. I can't tell. I would recommend you start from an unmodified OP-TEE setup (qemu_v8 for example) and change configuration step by step.
@etienne-lms I had actually tried to rebuild everything for the netfilter
and netfilter_queue
issue that I had earlier. And it actually worked well only for qemu_v7, not qemu_v8. I do not know why.
Now, I am adding dhcp feature on top of the successful build of qemu bundled with netfilter
and netfilter_queue
@msa2 @igoropaniuk Do you have any idea about this dhcp issue ?
This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.
I have this problem also, And i had deep research about this problem for one day completely ... . I tested all ways, but still the problem is exist. I have headache ... .
Only dsl.iso (damn small linux iso cd that use KNOPPIX) can bring up network in qemu network user mode, So it is needed to having deep research that how it can bring up this network?
Why QEMU only have
lo
network interface ? What abouteth0
that gives the qemu session internet capability ?I tried to re-compile the kernel with
CONFIG_E1000=y
andCONFIG_E1000E=y
, butlsmod
returns nothing, andeth0
interface still does not show up