mynode/Makefile

101 lines
3.1 KiB
Makefile
Raw Normal View History

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
.PHONY: rootfs_auto
rootfs_auto: start_file_server
@./make_rootfs_auto.sh
2020-02-14 02:03:21 +00:00
.PHONY: clean_rootfs
clean_rootfs:
@rm -rf out/mynode_rootfs_*
@rm -rf out/rootfs_*
# Start file server to allow downloads to devices
.PHONY: start_file_server
start_file_server:
@/bin/bash scripts/start_http_server.sh
.PHONY: stop_file_server
stop_file_server:
@/bin/bash scripts/stop_http_server.sh
2019-06-16 00:12:11 +00:00
# Download base myNode images
2019-06-30 16:50:05 +00:00
out/base_images/raspi3_base.img.gz:
@mkdir -p out/base_images/
@wget https://mynodebtc.com/device/mynode_images/raspi3_base.img.gz -O out/base_images/raspi3_base.img.gz
2019-07-13 21:46:58 +00:00
out/base_images/raspi4_base.img.gz:
@mkdir -p out/base_images/
@wget https://mynodebtc.com/device/mynode_images/raspi4_base.img.gz -O out/base_images/raspi4_base.img.gz
out/base_images/rock64_base.img.gz:
@mkdir -p out/base_images/
@wget https://mynodebtc.com/device/mynode_images/rock64_base.img.gz -O out/base_images/rock64_base.img.gz
2019-12-05 01:05:52 +00:00
out/base_images/rockpro64_base.img.gz:
@mkdir -p out/base_images/
@wget https://mynodebtc.com/device/mynode_images/rockpro64_base.img.gz -O out/base_images/rockpro64_base.img.gz
2022-02-13 01:32:09 +00:00
out/base_images/rockpi4_base.img.gz:
@mkdir -p out/base_images/
@wget https://mynodebtc.com/device/mynode_images/rockpi4_base.img.gz -O out/base_images/rockpi4_base.img.gz
2019-12-05 01:05:52 +00:00
out/base_images/debian_base.ova:
@mkdir -p out/base_images/
@wget https://mynodebtc.com/device/mynode_images/vm_base.ova -O out/base_images/debian_base.ova
# Setup of New Device
.PHONY: setup_new_rock64
2019-12-05 01:05:52 +00:00
setup_new_rock64: start_file_server out/base_images/rock64_base.img.gz rootfs
2019-06-27 03:02:08 +00:00
@cp -f setup/setup_device.sh out/setup_device.sh
@/bin/bash scripts/setup_new_rock64.sh
2019-06-16 00:12:11 +00:00
2019-12-05 01:05:52 +00:00
.PHONY: setup_new_rockpro64
setup_new_rockpro64: start_file_server out/base_images/rockpro64_base.img.gz rootfs
@cp -f setup/setup_device.sh out/setup_device.sh
@/bin/bash scripts/setup_new_rockpro64.sh
2022-01-25 03:50:13 +00:00
.PHONY: setup_new_rockpi4
setup_new_rockpi4: start_file_server out/base_images/rockpi4_base.img.gz rootfs
@cp -f setup/setup_device.sh out/setup_device.sh
@/bin/bash scripts/setup_new_rockpi4.sh
2019-06-30 16:50:05 +00:00
.PHONY: setup_new_raspi3
2019-12-05 01:05:52 +00:00
setup_new_raspi3: start_file_server out/base_images/raspi3_base.img.gz rootfs
2019-06-27 03:02:08 +00:00
@cp -f setup/setup_device.sh out/setup_device.sh
2019-06-30 16:50:05 +00:00
@/bin/bash scripts/setup_new_raspi3.sh
.PHONY: setup_new_raspi4
2019-12-05 01:05:52 +00:00
setup_new_raspi4: start_file_server out/base_images/raspi4_base.img.gz rootfs
2019-06-30 16:50:05 +00:00
@cp -f setup/setup_device.sh out/setup_device.sh
@/bin/bash scripts/setup_new_raspi4.sh
2019-06-18 02:34:38 +00:00
2019-10-03 03:10:20 +00:00
.PHONY: setup_new_debian
2019-12-05 01:05:52 +00:00
setup_new_debian: start_file_server out/base_images/debian_base.ova rootfs
2019-10-03 03:10:20 +00:00
@cp -f setup/setup_device.sh out/setup_device.sh
@/bin/bash scripts/setup_new_debian.sh
2019-06-18 02:34:38 +00:00
# Clone repo to get release tools
2019-06-16 00:12:11 +00:00
release.sh:
2019-06-28 00:56:58 +00:00
@rm -rf out/mynode_release_tool
2019-06-16 00:12:11 +00:00
@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
2020-02-14 02:03:21 +00:00
release: clean_rootfs rootfs release.sh
@sh release.sh
2019-06-16 00:12:11 +00:00
2020-02-24 00:23:37 +00:00
.PHONY: beta
beta: clean_rootfs rootfs release.sh
2020-02-24 00:23:37 +00:00
@sh release.sh beta
2019-06-18 02:34:38 +00:00
# Clean build files
2019-06-16 00:12:11 +00:00
.PHONY: clean
clean: stop_file_server
2019-06-16 00:12:11 +00:00
@rm -rf out/
@rm -rf release.sh