Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 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. rpi64:
  47. # scripts/images/raspberry-pi-hypriot64/dist/rancheros-raspberry-pi.zip
  48. cp dist/artifacts/rootfs_arm64.tar.gz scripts/images/raspberry-pi-hypriot64/
  49. cd scripts/images/raspberry-pi-hypriot64/ \
  50. && ../../../.dapper
  51. help:
  52. @./scripts/help
  53. .DEFAULT_GOAL := default
  54. .PHONY: $(TARGETS)