Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. TARGETS := $(shell ls scripts | grep -vE 'clean|run|help|docs|release')
  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. docs:
  21. ./scripts/docs
  22. shell-bind: .dapper
  23. ./.dapper -m bind -s
  24. clean:
  25. @./scripts/clean
  26. release: .dapper release-build qcows
  27. release-build:
  28. mkdir -p dist
  29. ./.dapper release 2>&1 | tee dist/release.log
  30. itest:
  31. mkdir -p dist
  32. ./.dapper integration-test 2>&1 | tee dist/itest.log
  33. qcows:
  34. cp dist/artifacts/rancheros.iso scripts/images/openstack/
  35. cd scripts/images/openstack && \
  36. APPEND="console=tty1 console=ttyS0,115200n8 printk.devkmsg=on rancher.autologin=ttyS0" \
  37. NAME=openstack ../../../.dapper
  38. cd scripts/images/openstack && \
  39. APPEND="console=tty1 rancher.debug=true printk.devkmsg=on notsc clocksource=kvm-clock rancher.network.interfaces.eth0.ipv4ll rancher.cloud_init.datasources=[digitalocean] rancher.autologin=tty1 rancher.autologin=ttyS0" \
  40. NAME=digitalocean ../../../.dapper
  41. cp ./scripts/images/openstack/dist/*.img dist/artifacts/
  42. rpi:
  43. # scripts/images/raspberry-pi-hypriot/dist/rancheros-raspberry-pi.zip
  44. cp dist/artifacts/rootfs_arm.tar.gz scripts/images/raspberry-pi-hypriot/
  45. cd scripts/images/raspberry-pi-hypriot/ \
  46. && ../../../.dapper
  47. rpi64:
  48. # scripts/images/raspberry-pi-hypriot64/dist/rancheros-raspberry-pi.zip
  49. cp dist/artifacts/rootfs_arm64.tar.gz scripts/images/raspberry-pi-hypriot64/
  50. cd scripts/images/raspberry-pi-hypriot64/ \
  51. && ../../../.dapper
  52. help:
  53. @./scripts/help
  54. .DEFAULT_GOAL := default
  55. .PHONY: $(TARGETS)