Skip to content

Commit

Permalink
Adding setup/teardown for Ethernet on sim target on Ubuntu.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro committed Sep 20, 2016
1 parent 5c85343 commit d927bd9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ opsis_hdmi2usb:
rm -rf build/opsis_hdmi2usb
./opsis_hdmi2usb.py --cpu-type $(CPU)

opsis_sim_setup:
sudo openvpn --mktun --dev tap0
sudo ifconfig tap0 192.168.1.100 up
sudo mknod /dev/net/tap0 c 10 200
sudo chown $(shell whoami) /dev/net/tap0
sudo atftpd --bind-address 192.168.1.100 --daemon --logfile /dev/stdout --no-fork --user $(shell whoami) build/opsis_sim/software/ &

opsis_sim_teardown:
sudo killall atftpd || true # FIXME: This is dangerous...
sudo rm -f /dev/net/tap0
sudo ifconfig tap0 down
sudo openvpn --rmtun --dev tap0

opsis_sim:
rm -rf build/opsis_sim
./opsis_sim.py --with-ethernet --cpu-type $(CPU)
Expand Down

0 comments on commit d927bd9

Please sign in to comment.