Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. TARGETS := $(shell ls scripts | grep -vE 'clean|run|help|release|build-moby|run-moby')
  2. .dapper:
  3. @echo Downloading dapper
  4. @curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m|sed 's/v7l//'` > .dapper.tmp
  5. @@chmod +x .dapper.tmp
  6. @./.dapper.tmp -v
  7. @mv .dapper.tmp .dapper
  8. $(TARGETS): .dapper
  9. ./.dapper $@
  10. trash: .dapper
  11. ./.dapper -m bind trash
  12. trash-keep: .dapper
  13. ./.dapper -m bind trash -k
  14. deps: trash
  15. build/initrd/.id: .dapper
  16. ./.dapper prepare
  17. run: build/initrd/.id .dapper
  18. ./.dapper -m bind build-target
  19. ./scripts/run
  20. build-moby:
  21. ./scripts/build-moby
  22. run-moby:
  23. ./scripts/run-moby
  24. shell-bind: .dapper
  25. ./.dapper -m bind -s
  26. clean:
  27. @./scripts/clean
  28. release: .dapper release-build qcows
  29. release-build:
  30. mkdir -p dist
  31. ./.dapper release 2>&1 | tee dist/release.log
  32. itest:
  33. mkdir -p dist
  34. ./.dapper integration-test 2>&1 | tee dist/itest.log
  35. grep --binary-files=text FAIL dist/itest.log || true
  36. qcows:
  37. cp dist/artifacts/rancheros.iso scripts/images/openstack/
  38. cd scripts/images/openstack && \
  39. APPEND="console=tty1 console=ttyS0,115200n8 printk.devkmsg=on rancher.autologin=ttyS0 panic=10" \
  40. NAME=openstack ../../../.dapper
  41. cd scripts/images/openstack && \
  42. APPEND="console=tty1 printk.devkmsg=on notsc clocksource=kvm-clock rancher.network.interfaces.eth0.ipv4ll rancher.cloud_init.datasources=[digitalocean] rancher.autologin=tty1 rancher.autologin=ttyS0 panic=10 rancher.resize_device=/dev/vda" \
  43. NAME=digitalocean ../../../.dapper
  44. cp ./scripts/images/openstack/dist/*.img dist/artifacts/
  45. rpi64:
  46. # scripts/images/raspberry-pi-hypriot64/dist/rancheros-raspberry-pi.zip
  47. cp dist/artifacts/rootfs_arm64.tar.gz scripts/images/raspberry-pi-hypriot64/
  48. cd scripts/images/raspberry-pi-hypriot64/ \
  49. && ../../../.dapper
  50. help:
  51. @./scripts/help
  52. .DEFAULT_GOAL := default
  53. .PHONY: $(TARGETS)