-
Notifications
You must be signed in to change notification settings - Fork 0
Operation Air Raspbian image step by step
Based on 2020-02-13-raspbian-buster.img
See:
- raspberry-pi-headless-setup-with-wifi-and-ssh-enabled
- make-your-raspberry-pi-file-system-read-only-raspbian-buster
Check which disk number the sd card has
diskutil list
# or
df -h
For example:
/dev/disk2 (external, physical)
Unmount disk
diskutil unmountDisk /dev/disk2
Copy image to sd card
sudo dd bs=1m if=2020-02-13-raspbian-buster.img of=/dev/rdisk2 conv=sync
Unmount disk
diskutil unmountDisk /dev/disk2
sudo dd bs=1m if=/dev/rdisk2 of=airone_wr.img conv=sync
Add wifi info and touch ssh
in boot dir (on the sd card in your computer)
sudo apt update
sudo apt upgrade
Optional step for virtual on screen keyboard
sudo apt-get install matchbox-keyboard
sudo reboot
Set location and timezone, but check use English language
and US keyboard
checkboxes.
In Network Options set hostname to AIROne
Choose a new password (opair2020
)
sudo raspi-config
-> 5. Interfacing Optons
-> P6. Serial
-> No
-> Yes
-> Exit
sudo apt install vim git
pip3 install matplotlib numpy pyserial crcmod pyyaml gpiozero pygame
git clone https://github.com/OperationAIR/HumanInterface.git
cd HumanInterface
To launch app remote from ssh but on local RPi screen:
export DISPLAY=:0; src/main.py
https://www.freedesktop.org/software/systemd/man/systemd.service.html
- run install script in
scripts
directory.
Thihs will copy airone.service
to the systemd directory and enable the service. Thhis service will always restart the app after 5 seconds.
Replace splash image with custom image (png)
cd /usr/share/plymouth/themes/pix
sudo mv splash.png pix_splash.png
sudo cp ~/Desktop/OperationAIR_800_480.png ./splash.png
Open “/boot/config.txt” as root.
sudo vim /boot/config.txt
Then add below line at the end of the file.
disable_splash=1
/boot/cmdline.txt
Original content
console=tty1 root=PARTUUID=ea7d04d6-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
Change to:
console=tty3 root=PARTUUID=ea7d04d6-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles logo.nologo vt.global_cursor_default=0
sudo vim /etc/lightdm/lightdm.conf
Add to [Seat:*]
section
# don't sleep the screen
xserver-command=X -s 0 dpms
sudo apt install unclutter
sudo vim /etc/xdg/lxsession/LXDE-pi/autostart
# then add the following line:
unclutter -idle 5
NOTE: Don't disable bluetooth like this, It will also disable uart. So just turn it off in the gui. Same for wifi.
In /boot/config.txt
add
dtoverlay=disable-bt