# The following lines are to be appended to # /etc/rc.d/rc.local on your Slackware/x86 host. # # This script is taken verbatim from my /etc/rc.d/rc.local # on my Slackware x86 dev box. # # Its configuration is: # eth0 = 192.168.1.2 / 255.255.255.0 # default route = 192.168.1.1 (another server/NAT router) # This IP is statically configured in /etc/rc.d/rc.inet1.conf # (not obtained via DHCP). # # br0 = 192.168.1.3 / 255.255.255.0 # tap0 = 192.168.1.4 / 255.255.255.0 # This tap0 i/f is created by qemu-network-tun.sh # # Please note that you MUST change the IP addresses here since # it's very unlikely that you share the same network settings as # me ;-) # Load tunnel driver: modprobe tun # # # You may prefer to add these lines into an appropriate place # within /etc/rc.d/rc.inet1, but I prefer to keep everything # together so that it speeds up the process of rebuilding a dev box. # ## Begin QEMU setup ## echo 1 > /proc/sys/net/ipv4/ip_forward echo 1024 > /proc/sys/dev/rtc/max-user-freq ifconfig eth0 0.0.0.0 down chmod og+rw /dev/net/tun chmod +s /usr/bin/qemu-system-arm # These need chmod +s, or sudoers configuration so that # the qemu network script can work: chmod +s /sbin/ifconfig chmod +s /sbin/brctl brctl addbr br0 brctl stp br0 off brctl setfd br0 1 brctl addif br0 eth0 brctl show # Turn on the bridge. Note that this is a different IP from # the one specified in your qemu-network-bridge.sh script # in your 'armhost' directory on your Slackware x86 box. # You need a bridge IP, a tunnel (tap0) IP, and then another # IP which is assigned to the Slackware ARM host (by Linux inside QEMU) # to its own eth0. # I tried bringing this up after eth0 but the bridge didn't work. # I don't know why that is! ifconfig br0 192.168.1.3 up # Put back the original IP for eth0: ifconfig eth0 192.168.1.2 up # route del default route add default gw 192.168.1.1 ## End of QEMU setup ##