Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. qcows:
  33. cp dist/artifacts/rancheros.iso scripts/images/openstack/
  34. cd scripts/images/openstack && \
  35. APPEND="console=tty1 console=ttyS0,115200n8 printk.devkmsg=on rancher.autologin=ttyS0 panic=10" \
  36. NAME=openstack ../../../.dapper
  37. cd scripts/images/openstack && \
  38. 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" \
  39. NAME=digitalocean ../../../.dapper
  40. cp ./scripts/images/openstack/dist/*.img dist/artifacts/
  41. rpi64:
  42. # scripts/images/raspberry-pi-hypriot64/dist/rancheros-raspberry-pi.zip
  43. cp dist/artifacts/rootfs_arm64.tar.gz scripts/images/raspberry-pi-hypriot64/
  44. cd scripts/images/raspberry-pi-hypriot64/ \
  45. && ../../../.dapper
  46. vmware: .dapper
  47. mkdir -p dist
  48. ./.dapper vmware-release 2>&1 | tee dist/release.log
  49. help:
  50. @./scripts/help
  51. .DEFAULT_GOAL := default
  52. .PHONY: $(TARGETS)