File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ LABS ?= $(shell cd templates && find -mindepth 1 -maxdepth 1 -type d)
44MODS = $(shell cd templates && find $(LABS ) -mindepth 1 -name Kbuild | xargs dirname)
55TODO ?= 0
66
7+ GUEST_IP_CMD ?= $(shell arp -n -i tap0 | tail -1 | cut -d ' ' -f 1)
8+
79include qemu/Makefile
810
911skels :
@@ -31,6 +33,24 @@ copy: $(YOCTO_IMAGE)
3133 sudo umount $(TEMPDIR )
3234 rmdir $(TEMPDIR )
3335
36+ scp : ip
37+ scp -r skels root@$(shell cat .ip) :
38+
39+ ssh : ip
40+ ssh root@$(shell cat .ip)
41+
42+ ip :
43+ if [ ! -e qemu.mon ]; then exit 1; fi
44+ GUEST_IP=$(GUEST_IP_CMD ) ; \
45+ [ " $$ GUEST_IP" = " arp:" ] && echo -n " Waiting for machine" ; \
46+ while [ " $$ GUEST_IP" = " arp:" ]; do \
47+ echo -n " ." ; \
48+ sleep 1; \
49+ GUEST_IP=` arp -e -n -i tap0 | tail -1 | cut -d ' ' -f 1` ; \
50+ done ; \
51+ echo " " ; \
52+ echo -n $$ GUEST_IP > .ip
53+
3454docker-docs :
3555 cd docker && docker-compose build docs-build
3656 cd docker && UID=$(shell id -u) GID=$(shell id -g) docker-compose run docs-build bash -c " cd /linux/tools/labs && make docs"
@@ -57,4 +77,4 @@ clean::
5777clean_skels :
5878 rm -rf skels
5979
60- .PHONY : skels build copy docs docker-docs docker-kernel stop-docker-kernel clean clean_skels
80+ .PHONY : skels build copy scp ssh ip docs docker-docs docker-kernel stop-docker-kernel clean clean_skels
You can’t perform that action at this time.
0 commit comments