2019-06-18 02:34:38 +00:00
|
|
|
# Makefile
|
2019-06-16 00:12:11 +00:00
|
|
|
|
2019-06-18 02:34:38 +00:00
|
|
|
# Build rootfs
|
|
|
|
.PHONY: rootfs
|
|
|
|
rootfs:
|
|
|
|
@./make_rootfs.sh
|
2019-06-16 00:12:11 +00:00
|
|
|
|
2019-06-18 02:34:38 +00:00
|
|
|
# Copy rootfs to device
|
|
|
|
.PHONY: copy_to_device
|
|
|
|
copy_to_device:
|
|
|
|
@./scripts/copy_to_device.sh
|
2019-06-16 00:12:11 +00:00
|
|
|
|
|
|
|
|
2019-06-18 02:34:38 +00:00
|
|
|
# Download base images
|
|
|
|
out/base_images/raspi_standard_final.img.gz:
|
|
|
|
@mkdir -p out/base_images/
|
|
|
|
@wget http://mynodebtc.com/device/base_images/raspi_standard_final.img.gz -O out/base_images/raspi_standard_final.img.gz
|
|
|
|
out/base_images/rock64_standard_final.img.gz:
|
|
|
|
@mkdir -p out/base_images/
|
|
|
|
@wget http://mynodebtc.com/device/base_images/rock64_standard_final.img.gz -O out/base_images/rock64_standard_final.img.gz
|
|
|
|
download_base_images: out/base_images/raspi_standard_final.img.gz out/base_images/rock64_standard_final.img.gz
|
2019-06-16 00:12:11 +00:00
|
|
|
|
2019-06-18 02:34:38 +00:00
|
|
|
|
|
|
|
# TODO: Make images programmatically
|
2019-06-16 00:12:11 +00:00
|
|
|
.PHONY: images
|
|
|
|
images: rootfs
|
|
|
|
@echo "TODO"
|
|
|
|
|
2019-06-18 02:34:38 +00:00
|
|
|
|
|
|
|
# Clone repo to get release tools
|
2019-06-16 00:12:11 +00:00
|
|
|
release.sh:
|
|
|
|
@git clone git@github.com:mynodebtc/mynode_release_tool.git out/mynode_release_tool
|
|
|
|
@cp out/mynode_release_tool/release.sh ./release.sh
|
|
|
|
|
2019-06-18 02:34:38 +00:00
|
|
|
# Release package to server
|
2019-06-16 00:12:11 +00:00
|
|
|
.PHONY: release
|
|
|
|
release: rootfs release.sh
|
2019-06-17 00:47:13 +00:00
|
|
|
@sh release.sh
|
2019-06-16 00:12:11 +00:00
|
|
|
|
2019-06-18 02:34:38 +00:00
|
|
|
|
|
|
|
# Clean build files
|
2019-06-16 00:12:11 +00:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
@rm -rf out/
|
|
|
|
@rm -rf out/
|
|
|
|
@rm -rf release.sh
|