Yes, because all MMDVM HATs using UART0 rather than other UARTs, we have to use UART0. That is not mistake by design, but really first versions of Rpi had only two UARTs and probably noone want solve switching to UART1.
orangepi-config
System --> Bootenv
replace "console=both"
for "console=none"
and add "extraargs=console=tty1"
systemctl stop serial-getty@ttyS0
systemctl disable serial-getty@ttyS0
System --> Hardware --> enable pi-i2c1, in system it will appear as /dev/i2c-2
apt install git php-fpm php-json php-mbstring php-zip nginx stm32flash shellinabox geoip-database zip avahi-daemon avrdude flashrom
Only needed if you want prebuilt binaries
TODO: Probably create debian packages or podman images with pre-built images for arm64 arch too, also redone update strategy from git checkout to system packages as that will solve also dependencies and architecture
dpkg --add-architecture armhf
apt install libc6:armhf libusb-1.0-0:armhf libgps28:armhf
adduser mmdvm
- check UID 1001 and home /home/mmdvm
usermod -a -G i2c,dialout mmdvm
- TODO spi group, which not exists
configure nginx
TODO: copy site-available files
TODO: copy nginx default.d files
Note: change PHP FPM socket acording to PHP version
Create/copy .htpasswd to /var/www/.htpasswd and give www-data owner
cd /var/www/
git clone --depth 1 https://github.com/AndyTaylorTweet/Pi-Star_DV_Dash.git dashboard
TODO: create some debain packages or container images.
Container is hard for some binaries as they use hardware-specific libraries like wiring pi
TODO: out of dated, binaries are NOT compatible with arm64 and armhf wiringpi is not available to support all MMDVMHost
cd /usr/local/
git clone --depth 1 https://github.com/AndyTaylorTweet/Pi-Star_v4_Binaries_Bin.git bin
TODO: but in common;
- Install build tools like build essential, makefile etc.
- clone required binaries from G4KLX gitbub
- build one by one
cd /usr/local
git clone --depth 1 https://github.com/AndyTaylorTweet/Pi-Star_Binaries_sbin.git sbin
/usr/local/etc chown
Copy /etc pi-star specific files and make them owned by www-data, so web server can write to them :'(
- TODO file list / automatic something
- pistar-release
- mmdvmhost
chown www-data dstar-radio.mmdvmhost dstarrepeater hostname hosts ircddbgateway mobilegps pistar-css.ini pistar-remote starnetserver timeserver
I am not happy web browser have access to hosts file, it allow attacker to redirect IP/DNS to his server
Set up sudo without password to web server (yes, I am not kidding but PHP is really full of sudo commands)
Copy /etc/sudoers.d