Skip to content

Commit

Permalink
Make qemu script work on Arch
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmo committed Jan 17, 2018
1 parent 3a162bb commit cc79d86
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ tftpd_start:
sudo true
@if sudo which atftpd >/dev/null ; then \
echo "Starting aftpd"; \
sudo atftpd --verbose --bind-address $(TFTP_IPRANGE).100 --daemon --logfile /dev/stdout --no-fork --user $(shell whoami) $(TFTPD_DIR) & \
sudo atftpd --verbose --bind-address $(TFTP_IPRANGE).100 --daemon --logfile /dev/stdout --no-fork --user $(shell whoami) --group $(shell whoami) $(TFTPD_DIR) & \
elif sudo which in.tftpd >/dev/null; then \
echo "Starting in.tftpd"; \
sudo in.tftpd --verbose --listen --address $(TFTP_IPRANGE).100 --user $(shell whoami) -s $(TFTPD_DIR) & \
Expand Down
10 changes: 9 additions & 1 deletion scripts/build-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,15 @@ if grep -q ETHMAC_BASE $TARGET_BUILD_DIR/software/include/generated/csr.h; then
exit 1
fi
sudo chown $(whoami) /dev/net/tap0
sudo ifconfig tap0 $TFTP_IPRANGE.100 up
if sudo which ifconifg > /dev/null; then
sudo ifconfig tap0 $TFTP_IPRANGE.100 up
elif sudo which ip > /dev/null; then
sudo ip addr add $TFTP_IPRANGE.100/24 dev tap0
sudo ip link set dev tap0 up
else
echo "Unable to find tool to configure tap0 address"
exit 1
fi
make tftpd_start
fi
EXTRA_ARGS+=("-net nic -net tap,ifname=tap0,script=no,downscript=no")
Expand Down

0 comments on commit cc79d86

Please sign in to comment.