實現主機、虛擬機、開發板的相互ping通linux
U-boot下:ide
1. 虛擬機設置爲橋接方式;測試
2. Virtual network editor中選擇本地網卡(非必須,由於小心多網卡時會自動選擇無線網卡);ip
3. 在PC機上把虛擬機的虛擬網卡(2個)設置爲禁用,留下本地鏈接;開發
4. 設置linux系統的ip和PC機的ip在同一網段;虛擬機
如:$ifconfig eth0 169.254.101.120 it
5. 開發板的設置:將開發板、PC機、虛擬機的IP設在同一網段class
如:u-boot>setenv ipaddr 169.254.101.110network
6. 將PC機和linux的防火牆都關掉;防火牆
7. 測試
7.1. PC <-----> linux (雙向通)
7.2. 開發板 ------> PC (單向通)
7.3. 開發板 ------> l inux 通 (單向通)
文件系統下:
1. 進入文件系統後:
$ifconfig eth0 down
$ifconfig eth0 hw ether 08:00:3e:26:0a:5b #設置開發板的MAC地址
$ifconfig eth0 up
$ifconfig eth0 169.254.101.110 #設置開發板的IP地址
2. 測試
2.1. PC <-----> linux (雙向通)
2.2. 開發板 <------> PC (雙向通)
2.3. 開發板 <------> l inux 通 (雙向通)