2020-08-03 01:05:29 +00:00
|
|
|
# Setup Finalization
|
2020-08-01 17:22:27 +00:00
|
|
|
|
2020-08-03 01:05:29 +00:00
|
|
|
The following will walk through finalizing setup of the base environment.
|
2020-08-01 17:22:27 +00:00
|
|
|
|
|
|
|
``` sh
|
|
|
|
|
2020-08-03 01:05:29 +00:00
|
|
|
# Wait for cloud initi to spew to LCD (this will take a minute, it's prepping the initial config and deploying it, including the default user account)
|
|
|
|
|
|
|
|
# Login as ubuntu / ubuntu and follow the prompts
|
2020-08-01 17:22:27 +00:00
|
|
|
|
2020-08-03 01:05:29 +00:00
|
|
|
sudo -sHu root /bin/bash
|
2020-08-01 17:22:27 +00:00
|
|
|
|
2020-08-03 01:05:29 +00:00
|
|
|
# Disable cloud-init as it's unnecessary for the purposes of this project
|
|
|
|
touch /etc/cloud/cloud-init.disabled
|
2020-08-03 07:31:56 +00:00
|
|
|
nano -w /boot/firmware/cmdline.txt
|
|
|
|
remove console=tty1
|
2020-08-06 21:18:51 +00:00
|
|
|
|
|
|
|
# Setup screen resolution (UNCOMMENT THE RIGHT LINES!!!)
|
|
|
|
cat >> /boot/firmware/usercfg.txt <<EOF
|
|
|
|
|
2020-08-13 18:33:41 +00:00
|
|
|
# Setup GPU general settings
|
2020-08-13 23:53:40 +00:00
|
|
|
gpu_mem=256
|
2020-08-14 05:51:55 +00:00
|
|
|
disable_splash=1
|
2020-08-13 18:33:41 +00:00
|
|
|
disable_overscan=1
|
|
|
|
|
|
|
|
# Screen Settings
|
|
|
|
# Further reading
|
|
|
|
# https://www.raspberrypi.org/documentation/configuration/config-txt/video.md
|
|
|
|
# https://www.raspberrypi.org/forums/viewtopic.php?t=5851
|
|
|
|
# https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=24679
|
|
|
|
|
|
|
|
# CONFU 5.5" 2k (1440x2560)
|
|
|
|
# https://www.alibaba.com/product-detail/CONFU-HDMI-to-MIPI-5-5_62010868927.html
|
|
|
|
#dtoverlay=vc4-kms-v3d-pi4
|
2020-08-06 21:18:51 +00:00
|
|
|
#hdmi_group=2
|
|
|
|
#hdmi_mode=87
|
2020-08-12 21:44:49 +00:00
|
|
|
#hdmi_cvt=1440 2560 50 3 0 0 1
|
2020-08-13 18:33:41 +00:00
|
|
|
|
|
|
|
# Electric Magic 8.9" 2k (2560x1600)
|
|
|
|
# https://www.amazon.com/gp/product/B082YFY8PW
|
2020-08-10 21:29:22 +00:00
|
|
|
#hdmi_group=2
|
2020-08-13 18:33:41 +00:00
|
|
|
#hdmi_mode=76
|
|
|
|
#max_framebuffer_height=2560
|
|
|
|
#max_framebuffer_width=2560
|
|
|
|
#framebuffer_width=2560
|
|
|
|
#framebuffer_height=1600
|
|
|
|
#framebuffer_depth=32
|
|
|
|
#framebuffer_ignore_alpha=1
|
2020-08-06 21:18:51 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
# Reboot to pickup changes
|
2020-08-01 17:22:27 +00:00
|
|
|
systemctl reboot
|
|
|
|
|
2020-08-03 01:05:29 +00:00
|
|
|
# Login
|
|
|
|
|
|
|
|
sudo -sHu root /bin/bash
|
2020-08-01 17:22:27 +00:00
|
|
|
|
2020-08-03 01:05:29 +00:00
|
|
|
# Cleanup timezone
|
|
|
|
dpkg-reconfigure tzdata
|
2020-08-01 17:22:27 +00:00
|
|
|
|
2020-08-03 01:05:29 +00:00
|
|
|
# Full system update
|
|
|
|
apt update && apt upgrade
|
|
|
|
systemctl reboot
|
2020-08-01 17:22:27 +00:00
|
|
|
|
2020-08-03 01:05:29 +00:00
|
|
|
# Login
|
2020-08-01 17:22:27 +00:00
|
|
|
|
2020-08-03 01:05:29 +00:00
|
|
|
sudo -sHu root /bin/bash
|
2020-08-01 17:22:27 +00:00
|
|
|
|
2020-08-03 01:05:29 +00:00
|
|
|
# Useful packages
|
2020-08-03 16:03:07 +00:00
|
|
|
apt install build-essential cmake nano tmux vim htop iotop nload git net-tools
|
2020-08-01 17:22:27 +00:00
|
|
|
|
2020-08-03 01:05:29 +00:00
|
|
|
# Raspberry Pi tools
|
|
|
|
apt install linux-tools-raspi
|
|
|
|
mkdir /opt/raspberry-pi
|
|
|
|
cd /opt/raspberry-pi
|
|
|
|
git clone https://github.com/raspberrypi/userland.git
|
|
|
|
cd userland
|
|
|
|
./buildme --aarch64
|
|
|
|
cat > /etc/profile.d/rpi-tools.sh <<EOF
|
|
|
|
#!/bin/bash
|
2020-08-03 19:44:30 +00:00
|
|
|
export PATH="$PATH:/opt/vc/bin"
|
2020-08-03 01:05:29 +00:00
|
|
|
EOF
|
2020-08-03 19:44:30 +00:00
|
|
|
cat > /etc/ld.so.conf.d/00-vmcs.conf <<EOF
|
|
|
|
/opt/vc/lib
|
|
|
|
EOF
|
|
|
|
ldconfig
|
2020-08-01 17:22:27 +00:00
|
|
|
|
2020-08-03 01:05:29 +00:00
|
|
|
# Finalize basic network config
|
|
|
|
hostnamectl set-hostname piframe
|
2020-08-01 17:22:27 +00:00
|
|
|
|
|
|
|
# Reboot system for all changes to take effect
|
|
|
|
systemctl reboot
|
|
|
|
|
2020-07-31 23:37:43 +00:00
|
|
|
```
|