manually add a gateway
route add default gw 192.168.1.1 dev eth0 => add default gateway
The following configuration in /etc/network/interfaces does all above:
#iface eth0 inet dhcp iface eth0 inet static address 192.168.1.2 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 dns-nameservers 192.168.1.1
Finally, add nameserver in /etc/resolf.conf
echo "nameserver 192.168.1.1" > /etc/resolv.conf
Restart network now: /etc/init.d/networking restart => restart network or
ifdown eth0; ifup eth0
toolchain for BBB is arm-linux-gnueabihf
Problem solved!
extract and cross compiled with CC=arm-linux-gnueabihf-gcc ./configue --target=arm-linux
沒有留言:
張貼留言