diff --git a/Makefile b/Makefile index 0d3aa823..be33883f 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,11 @@ setup_new_raspi4: start_file_server out/base_images/raspi4_base.img.gz rootfs @cp -f setup/setup_device.sh out/setup_device.sh @/bin/bash scripts/setup_new_raspi4.sh +.PHONY: setup_new_raspi5 +setup_new_raspi5: start_file_server rootfs + @cp -f setup/setup_device.sh out/setup_device.sh + @/bin/bash scripts/setup_new_raspi5.sh + .PHONY: setup_new_debian setup_new_debian: start_file_server out/base_images/debian_base.ova rootfs @cp -f setup/setup_device.sh out/setup_device.sh diff --git a/doc/development.md b/doc/development.md index b9243b5e..56341a17 100644 --- a/doc/development.md +++ b/doc/development.md @@ -32,6 +32,7 @@ This steps will setup a new device and can be used for making images. These step * `make setup_new_rockpro64` * `make setup_new_raspi3` * `make setup_new_raspi4` + * `make setup_new_raspi5` * `make setup_new_debian` * `make setup_new_other` 3. Follow Instructions diff --git a/make_rootfs.sh b/make_rootfs.sh index b49363f1..88f0014d 100755 --- a/make_rootfs.sh +++ b/make_rootfs.sh @@ -3,16 +3,22 @@ # DEPRECATED DEVICES: raspi3 # Make each device -for i in 'raspi4' 'debian' 'rockpro64' 'rock64' 'rockpi4' ; do +for i in 'raspi4' 'raspi5' 'debian' 'rockpro64' 'rock64' 'rockpi4' ; do echo "Creating root file system for $i" mkdir -p out/rootfs_$i/ + # Raspi4 and Raspi5 share a rootfs + src_rootfs=$i + if [ "$i" = "raspi5" ]; then + src_rootfs="raspi4" + fi + # Clear out data for old apps rm -rf out/rootfs_$i/usr/share/mynode_apps # Make rootfs rsync -r -u rootfs/standard/* out/rootfs_$i/ - rsync -r -u rootfs/$i/* out/rootfs_$i/ + rsync -r -u rootfs/$src_rootfs/* out/rootfs_$i/ rsync -r -u CHANGELOG out/rootfs_$i/usr/share/mynode/changelog cp -f setup/setup_device.sh out/setup_device.sh #cp -f rootfs/standard/usr/share/mynode/mynode_app_versions.sh out/mynode_app_versions.sh diff --git a/scripts/setup_new_raspi5.sh b/scripts/setup_new_raspi5.sh new file mode 100755 index 00000000..17e03743 --- /dev/null +++ b/scripts/setup_new_raspi5.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +LOCAL_IP=$(python3 ./scripts/get_local_ip.py) + +echo "" +echo "Finished updating rootfs and other files!" +echo "" + +clear +echo "Step 1: " +echo " Flash SD Card with Raspberry Pi Image: out/base_images/raspi5_base.img.gz" +echo " OR" +echo " If you would rather create your own base image, follow the" +echo " manual instructions in doc/setup_base_image_raspi5.md" +echo "" +echo "Press a key when complete..." +read -n 1 + +clear +echo "Step 2: " +echo " Insert SD Card into your Raspberry Pi and boot the device" +echo "" +echo "Press a key when complete..." +read -n 1 + +clear +echo "Step 3: " +echo " Login to device with username 'admin' and password 'bolt'" +echo " Run the following commands. Use bolt at password prompts." +echo " wget http://${LOCAL_IP}:8000/setup_device.sh -O setup_device.sh" +echo " chmod +x setup_device.sh" +echo " sudo ./setup_device.sh ${LOCAL_IP}" +echo "" +echo "Press a key when complete..." +read -n 1 + +clear +echo "Step 4:" +echo " Reboot your device." +echo "" +echo "Press a key when complete..." +read -n 1 + +clear +echo "Congratulations! Your device is now ready!" +echo " Access it via a web browser at http://mynode.local/ or http:///" +echo " Access it via SSH using the default credentials: admin / bolt" +echo " You should change your password on the settings page in the web GUI" +echo ""