ppl-os/Makefile

22 lines
965 B
Makefile
Raw Normal View History

2018-08-10 14:02:05 +00:00
CHANNEL=stable
2018-08-10 15:30:16 +00:00
ENV=dev
2018-08-10 14:02:05 +00:00
clean:
rm -rf *.img *.model *.manifest
2018-08-10 14:17:10 +00:00
%.model: boards/%.yaml # sign a model file
cat definition.yaml $< | python -c "import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=2)" | sed "s|TIMESTAMP|$(shell date -Iseconds --utc)|g" | snap sign -k default > $@
2018-08-10 15:30:16 +00:00
snaps/%:
node build-tool.js --env $(ENV) --channel $(CHANNEL) --board $*
%.img: %.model snaps/% # build an image
2018-08-10 14:02:05 +00:00
sudo ubuntu-image snap -o $@ -c $(CHANNEL) $<
# VM stuff
vm.img: amd64.img # make a copy of the newest clean image
cp amd64.img vm.img
start: vm.img # launch the image with kvm
kvm -smp 2 -m 1500 -netdev user,id=mynet0,hostfwd=tcp::8022-:22,hostfwd=tcp::8090-:80 -device virtio-net-pci,netdev=mynet0 -drive file=vm.img,format=raw
ssh: # ssh into it (don't check the key because that one changes after every rebuild)
ssh mkg20001@localhost -p 8022 -o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null