Re: host's kernel boot cmd line ip configure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 2012-9-13, at 下午6:58, Peter Maydell  
> <peter.maydell@xxxxxxxxxx<mailto:peter.maydell@xxxxxxxxxx>> wrote: 
>  
> On 13 September 2012 08:47, shi roger  
> <rogershijicheng@xxxxxxxxx<mailto:rogershijicheng@xxxxxxxxx>> wrote: 
> My nfs is hosting on the same machine where the simulator is running. Its ip 
> is 10.131.250.61. 
> Can I assign a different ip such as 10.131.250.62 for the simulator's 
> kernel? Because the user 
> guide's example is dhcp configured, I'm not sure whether it's correct here. 
>  
> params file: 
> motherboard.smsc_91c111.enabled=1 
> motherboard.hostbridge.userNetworking=1 
> cluster.cpu0.semihosting-cmd_line="--kernel 
> ./linux-kvm-arm/arch/arm/boot/uImage --fdt 
> ./linux-kvm-arm/rtsm_ve-cortex_a15x1.dtb -- console=ttyAMA0 mem=256M 
> earlyprintk=serial,ttyAMA0,keep root=/dev/nfs 
> nfsroot=10.131.250.61:/srv/nfsroot rw 
> ip=10.131.250.62::10.131.250.1:255.255.254.0:arm-kvm::off" 
>  
> I'm afraid this won't work. The Fast Model's 'userNetworking' creates 
> a little (emulated) network with the ARM system on it and also a 
> simulated router/DHCP server. So the IP address for the ARM system 
> should be in 172.20.51.x -- it has nothing to do with the IP address 
> ranges your host system uses. 
>  
> You could in theory use explicit static IP assignment on the kernel 
> command line, but it is much easier just to make your guest kernel 
> use DHCP as the HOWTO recommends -- the model's built in emulated 
> DHCP server will assign the ARM kernel a working IP address. 
>  
> (If you really need 'bridged' networking where the emulated 
> ARM system appears directly on your host network you will need 
> to investigate the TUN/TAP networking support. However this is 
> more complicated to configure and you probably don't need it.) 

I use scripts supplied with the ARM simulator to set up tun/tap networking on the host. 

They are located under ARM/FastModelsPortfolio_7.1/ModelNetworking/add_adapter_[32|64].sh

Running the script is straight-forward. The script creates a tap device (here now called "ARMusername") and then you simply put that in your model configuration file. Like this:

motherboard.hostbridge.interfaceName="ARMusername"

It will also create a bridge on your system, in my case called armbr0, and that would need to have the IP of your NFS server. In my case that is 172.31.252.70.
Then the kernel command like needs to look roughly like this, specifying that IP and a static IP in that same network for the kernel running inside the simulator.

root=/dev/nfs nfsroot=172.31.252.70:/srv/xxx,tcp rw ip=172.31.252.129 nfsrootdebug

That way your kernel inside the simulator can even reach the external network.

Jess
 		 	   		  
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux