Improve Makefile and Instructions
This commit is contained in:
parent
5c305b6ab6
commit
bd5c3a3ae3
29
Makefile
29
Makefile
|
@ -1,23 +1,44 @@
|
||||||
|
# Makefile
|
||||||
|
|
||||||
|
# Build rootfs
|
||||||
|
|
||||||
|
|
||||||
.PHONY: rootfs
|
.PHONY: rootfs
|
||||||
rootfs:
|
rootfs:
|
||||||
@sh make_rootfs.sh
|
@./make_rootfs.sh
|
||||||
|
|
||||||
|
# Copy rootfs to device
|
||||||
|
.PHONY: copy_to_device
|
||||||
|
copy_to_device:
|
||||||
|
@./scripts/copy_to_device.sh
|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: Make images programmatically
|
||||||
.PHONY: images
|
.PHONY: images
|
||||||
images: rootfs
|
images: rootfs
|
||||||
@echo "TODO"
|
@echo "TODO"
|
||||||
|
|
||||||
|
|
||||||
|
# Clone repo to get release tools
|
||||||
release.sh:
|
release.sh:
|
||||||
@git clone git@github.com:mynodebtc/mynode_release_tool.git out/mynode_release_tool
|
@git clone git@github.com:mynodebtc/mynode_release_tool.git out/mynode_release_tool
|
||||||
@cp out/mynode_release_tool/release.sh ./release.sh
|
@cp out/mynode_release_tool/release.sh ./release.sh
|
||||||
|
|
||||||
|
# Release package to server
|
||||||
.PHONY: release
|
.PHONY: release
|
||||||
release: rootfs release.sh
|
release: rootfs release.sh
|
||||||
@sh release.sh
|
@sh release.sh
|
||||||
|
|
||||||
|
|
||||||
|
# Clean build files
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@rm -rf out/
|
@rm -rf out/
|
||||||
|
|
12
README.md
12
README.md
|
@ -48,7 +48,17 @@ We currently support images for the following devices:
|
||||||
- Rock64
|
- Rock64
|
||||||
|
|
||||||
## Running myNode
|
## Running myNode
|
||||||
TODO (explain how to download pre-built images)
|
You can run myNode on your own device in just a few easy steps!
|
||||||
|
|
||||||
|
1. Download an Image
|
||||||
|
1.1 Raspberry Pi 3B+ | http://mynodebtc.com/device/base_images/raspi_standard_final.img.gz
|
||||||
|
1.2 Rock64 | http://mynodebtc.com/device/base_images/rock64_standard_final.img.gz
|
||||||
|
2. Flash Image onto SD Card
|
||||||
|
2.1 Download Etcher | https://www.balena.io/etcher/
|
||||||
|
2.2 Flash Downloaded Image
|
||||||
|
3. Insert SD Card and Boot your Device
|
||||||
|
4. Attach 500GB+ External HD to Device
|
||||||
|
5. Visit http://mynode.local/ or http://<ip of device>/
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
![](images/2.png)
|
![](images/2.png)
|
||||||
|
|
|
@ -1,31 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
### Clear existing rootfs ###
|
### Clear existing rootfs ###
|
||||||
rm -rf out/rootfs*
|
rm -rf out/rootfs*
|
||||||
mkdir -p out/rootfs_rock64/
|
mkdir -p out/rootfs_rock64/
|
||||||
mkdir -p out/rootfs_raspi/
|
mkdir -p out/rootfs_raspi/
|
||||||
#mkdir -p out/rootfs_free/
|
|
||||||
|
|
||||||
|
### Make rock64 rootfs ###
|
||||||
### Make standard rootfs ###
|
|
||||||
# Copy Base
|
|
||||||
cp -rf rootfs/standard/* out/rootfs_rock64/
|
cp -rf rootfs/standard/* out/rootfs_rock64/
|
||||||
|
|
||||||
|
#### Make raspi rootfs ###
|
||||||
#### Make mini rootfs ###
|
|
||||||
# Copy base
|
|
||||||
cp -rf rootfs/standard/* out/rootfs_raspi/
|
cp -rf rootfs/standard/* out/rootfs_raspi/
|
||||||
cp -rf rootfs/raspi/* out/rootfs_raspi/
|
cp -rf rootfs/raspi/* out/rootfs_raspi/
|
||||||
|
|
||||||
# Remove unnecessary files
|
|
||||||
#rm -rf out/rootfs_raspi/etc/systemd/system/electrs.service
|
|
||||||
#rm -rf out/rootfs_raspi/var/www/mynode/static/electrum_server.html
|
|
||||||
#rm -rf out/rootfs_raspi/var/www/mynode/static/bitcoind_address.html
|
|
||||||
#rm -rf out/rootfs_raspi/var/www/mynode/static/bitcoind_block.html
|
|
||||||
#rm -rf out/rootfs_raspi/var/www/mynode/static/bitcoind_explorer.html
|
|
||||||
#rm -rf out/rootfs_raspi/var/www/mynode/static/bitcoind_tx.html
|
|
||||||
#rm -rf out/rootfs_raspi/var/www/mynode/electrum_server.py
|
|
||||||
|
|
||||||
#### Make free rootfs ###
|
|
||||||
#cp -rf rootfs/free/* out/rootfs_free/
|
|
12
scripts/copy_to_device.sh
Executable file
12
scripts/copy_to_device.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo -n "Device Type (raspi/rock64): "
|
||||||
|
read device_type
|
||||||
|
echo -n "Device IP: "
|
||||||
|
read device_ip
|
||||||
|
echo -n "Device User: "
|
||||||
|
read device_user
|
||||||
|
|
||||||
|
#scp ...
|
||||||
|
|
||||||
|
#ssh ...
|
Loading…
Reference in New Issue
Block a user