Hi,I want to use network on FVP, I added "--network=nat" when starting the FVPbut there was not an ip addr when I booted into the kernel, ifconfig shows as below:
FVP host is ubuntu-16.04 inside VirtualBox
I am not familiar with network. is there anyone can help me ? thanks a lot!
I have just done the test with the latest Foundation model (1) and latest images from Linaro (2) and I do get the expected output from ifconfig (3).
(1): the model is from https://developer.arm.com/products/system-design/fixed-virtual-platforms and started with this command line:
Foundation_Platform --cores=1 --no-secure-memory --visualization --use-real-time --gicv3 --data=bl1.bin@0x0 --data=fip.bin@0x8000000 --data=Image@0x80080000 --data=foundation-v8-gicv3.dtb@0x82000000 --data=ramdisk.img@0x84000000 --block-device=/media/simini01/Data2/linaro/17.10/lt-vexpress64-openembedded_lamp-armv8-gcc-4.9_20150912-729.img --network=nat
(2): https://community.arm.com/dev-platforms/b/documents/posts/using-linaros-deliverables-on-an-fvp and I have done the test with the pre-built image "latest-armlt + OpenEmbedded LAMP 15.09"
(3): This is the output I am getting:
...Configuring network interfaces... [ 75.230401] smc91x 1a000000.ethernet eth0: link up, 10Mbps, half-duplex, lpa 0x0000udhcpc (v1.23.2) startedSending discover...Sending select for 172.20.51.1...Lease of 172.20.51.1 obtained, lease time 86400/etc/udhcpc.d/50default: Adding DNS 172.20.51.254/etc/udhcpc.d/50default: Adding DNS 172.20.51.25...root@genericarmv8:~# ifconfig eth0 Link encap:Ethernet HWaddr 00:02:F7:EF:DE:7A inet addr:172.20.51.1 Bcast:172.20.51.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:24 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:654 (654.0 B) TX bytes:4505 (4.3 KiB) Interrupt:11 Base address:0xb000 DMA chan:ff lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:10 errors:0 dropped:0 overruns:0 frame:0 TX packets:10 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:700 (700.0 B) TX bytes:700 (700.0 B)
Could you confirm which version of the Foundation model, what command line and which SW stack you are using?
From a quick look, the version displayed for udhcp is more recent than mine, so it could be a SW issue.
Also note that to be able to communicate with the outside world using the "nat" network, you will also need to map ports from the host to the target with this option:
--network-nat-ports=M optional comma separated list of NAT port mappings in the form: host_port=model_port e.g. 8022=22
my FVP version is Linux64_GCC-4.7, "ARM V8 Foundation Platformr0p0 (platform build 10.3.26)".
command line :
run-only: @cd $(FOUNDATION_PATH); \ $(FOUNDATION_PATH)/models/Linux64_GCC-4.9/Foundation_Platform \ --arm-v8.0 \ --cores=4 \ --secure-memory \ --visualization \ --gicv3 \ --data="$(ARM_TF_BIN_PATH)/bl1.bin"@0x0 \ --data="$(ARM_TF_BIN_PATH)/fip.bin"@0x8000000 \ --block-device=$(BOOT_IMG) \ --network=nat \ --network-nat-subnet=10.0.2.0/2300 \ --network-nat-ports=8022=22
As I am not familiar with linux and net development, I just use a All in one script for building and running the
software stack based on optee, linux, fvp, uefi, etc.
As you can see, the default FVP version required by the script is "Linux64_GCC-4.9". I work around this by just adding a
directory named "Linux64_GCC-4.9" and copying the actual executable file under directory "Linux64_GCC-4.7"
Also, my FVP host is standard ubuntu 16.04 with a IP 10.0.2.15,
I have tried several combinations of the following parameters, and nothing changed.
--network=nat \--network-nat-subnet=10.0.2.0/2300 \ --network-nat-ports=8022=22
according to your analysis, maybe I should try another FVP
I am very appreciative if you can give some more advice based on the info above.
I would recommend updating the model to the latest version (from https://developer.arm.com/products/system-design/fixed-virtual-platforms, it will be verison 11.2) but I doubt this is causing your issue, it is much more likely to be a SW issue.
I've followed the same instructions and had the same output, so I can confirm you are not doing anything wrong but network support on this particular SW stack is not working.Based on the fact that the configuration does not allow for the --network option to be provided by default, I would assume this configuration has not been tested and is not the purpose of this script.
If you really need this SW stack, I would suggest contacting Linaro, otherwise you could use the SW stack described in https://community.arm.com/dev-platforms/b/documents/posts/using-linaros-deliverables-on-an-fvp .