327 lines
7.4 KiB
Markdown
327 lines
7.4 KiB
Markdown
# Orange Pi 5 Plus Armbian trixie kernel 6.1.115
|
|
## Debian 12 trixie with HW acceleration OpenCL OpenGL OpenGL-ES Vulkan
|
|
## xfce come desktop - gnome come vnc - samba - costruttore di img ridotte
|
|
|
|
## 01 Prima installazione
|
|
|
|
usare l'immagine con il tool RKdeveloptool per Orange Pi 5 Plus
|
|
|
|
Armbian_25.8.1_Orangepi5-plus_trixie_vendor_6.1.115_xfce_desktop.img.xz
|
|
|
|
collegarsi con ssh (es 192.168.1.3) user root e password 1234
|
|
|
|
ssh root@192.168.1.3
|
|
|
|
partirà la richiesta di modificare password di root e credenziali del nuovo utente
|
|
|
|
inserire come password di root
|
|
|
|
orangepi
|
|
|
|
come nuovo utente
|
|
|
|
orangepi
|
|
|
|
come password per il nuovo utente
|
|
|
|
orangepi
|
|
|
|
avremo così un sistema analogo del Orange Pi in debian
|
|
|
|
## Settare un IP fisso installando Network Manager
|
|
|
|
si installa con
|
|
|
|
sudo apt install network-manager
|
|
|
|
si verifica con
|
|
|
|
sudo systemctl status NetworkManager.service
|
|
|
|
se serve
|
|
|
|
sudo systemctl start NetworkManager.service
|
|
sudo systemctl enable NetworkManager.service
|
|
sudo systemctl restart NetworkManager.service
|
|
|
|
Verificare le reti
|
|
|
|
```sh
|
|
nmcli connection show
|
|
```
|
|
|
|
dall'output si evince che la rete è ***Supervisor enP3p49s0***
|
|
|
|
```sh
|
|
NAME UUID TYPE DEVICE
|
|
Wired connection 1 636841b5-1717-3d7f-a716-85af8427fca7 ethernet enP3p49s0
|
|
lo 58fd2724-b6fc-495e-8283-90555a4094dc loopback lo
|
|
Wired connection 2 aa564ace-25b4-3b71-ad88-68da035ec044 ethernet --
|
|
```
|
|
|
|
si possono vedere i file di configurazioni delle reti anche con un list
|
|
```sh
|
|
ls /etc/NetworkManager/system-connections/
|
|
```
|
|
|
|
con output
|
|
```sh
|
|
'Wired connection 1.nmconnection' 'Wired connection 2.nmconnection'
|
|
```
|
|
|
|
il file lo si può editare o visualizzare con
|
|
|
|
```console
|
|
sudo nano /etc/NetworkManager/system-connections/'Wired connection 1.nmconnection'
|
|
```
|
|
|
|
per modificare in IP statico con gateway and DNS usare
|
|
|
|
|
|
|
|
```sh
|
|
sudo nmcli connection modify "[CONNECTION_NAME]" \
|
|
ipv4.method "manual" \
|
|
ipv4.addresses "[IP_ADDRESS]/[CIDR_NETMASK]" \
|
|
ipv4.gateway "[GATEWAY_IP_ADDRESS]" \
|
|
ipv4.dns "[PRIMARY_DNS_IP],[SECONDARY_DNS_IP]"
|
|
```
|
|
quindi nel nostro caso
|
|
|
|
```sh
|
|
sudo nmcli con mod "Wired connection 1" ipv4.method manual ipv4.addresses 192.168.1.4/24 ipv4.gateway 192.168.1.1 ipv4.dns 8.8.8.8,8.8.4.4
|
|
```
|
|
|
|
poi fare il reboot di sistema
|
|
|
|
```sh
|
|
sudo reboot now
|
|
```
|
|
## Installare disco NVMe
|
|
|
|
Identificare il disco/partizione da formattare:
|
|
|
|
Utilizza il comando
|
|
|
|
lsblk
|
|
|
|
per visualizzare tutti i dispositivi di archiviazione collegati al tuo sistema.
|
|
O il comando
|
|
|
|
lsblk -f
|
|
|
|
che mostra anche il tipo di file system di ogni partizione.
|
|
|
|
Individua il disco o la partizione che desideri formattare, annotando il suo nome (es: nvme0n1p1)
|
|
|
|
/dev/nvme0n1p1
|
|
|
|
ora SE SERVE puoi formattare con
|
|
|
|
sudo mkfs -t ext4 /dev/nvme0n1p1
|
|
|
|
ora si può montare la partizione/disco appena creata
|
|
|
|
si crea prima di tutto una directory (es:/home/nvme)
|
|
|
|
sudo mkdir -p /home/nvme
|
|
|
|
se serve si possono dare tutte le autorizzazioni
|
|
|
|
sudo chmod a+rw /home/nvme
|
|
|
|
ora la si linka
|
|
|
|
sudo mount -t auto /dev/nvme0n1p1 /home/nvme
|
|
|
|
ora la partizione si troverà sempre in /home/nvme
|
|
|
|
per verificare su quali directori sono mappate tutte le partizioni/dischi
|
|
|
|
df
|
|
|
|
per far diventare permanente va caricata nel file
|
|
|
|
/etc/fstab
|
|
|
|
per farlo ci serve l'UUID del disco /dev/nvme0n1p1 usando il comando
|
|
|
|
sudo blkid
|
|
|
|
in questo caso la riposta sarà
|
|
|
|
```sh
|
|
/dev/nvme0n1p1: UUID="250b86e4-a337-49fb-b0f5-5bc4275eb271" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="688d7672-e856-4006-a451-7e6e67834b4e"
|
|
```
|
|
inserire in /etc/fstab
|
|
|
|
```sh
|
|
UUID=250b86e4-a337-49fb-b0f5-5bc4275eb271 /home/nvme ext4 defaults 0 2
|
|
```
|
|
|
|
e poi reboottare per verificare se è tutto corretto
|
|
|
|
sudo reboot now
|
|
|
|
verificare facendo per esempio un
|
|
|
|
ls /home/nvme
|
|
|
|
e/o copiandoci qualcosa
|
|
|
|
## Intallare docker
|
|
|
|
```sh
|
|
# Add Docker's official GPG key:
|
|
sudo apt-get update
|
|
sudo apt-get install ca-certificates curl
|
|
sudo install -m 0755 -d /etc/apt/keyrings
|
|
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
|
|
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
|
|
|
# Add the repository to Apt sources:
|
|
echo \
|
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
|
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
|
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
sudo apt-get update
|
|
```
|
|
|
|
e poi
|
|
|
|
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
|
|
|
testare con
|
|
|
|
sudo docker run hello-world
|
|
|
|
## INSTALLAZIONE PORTAINER
|
|
|
|
```bash
|
|
sudo docker pull portainer/portainer-ce:latest
|
|
sudo docker tag portainer/portainer-ce:latest iamnotportainer
|
|
sudo docker rmi portainer/portainer-ce
|
|
sudo docker run -d -p 8000:8000 -p 9443:9443 -p 9000:9000 --name iamnotportainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data iamnotportainer
|
|
```
|
|
|
|
## Installare samba con portainer
|
|
|
|
prima di tutto disabilitare LLMNR su systemd-resolved editando
|
|
|
|
sudo nano /etc/systemd/resolved.conf
|
|
|
|
e mettendo
|
|
|
|
LLMNR=no
|
|
|
|
disabilitare avahi-daemon
|
|
|
|
sudo systemctl disable avahi-daemon.service avahi-daemon.socket
|
|
sudo systemctl stop avahi-daemon.service avahi-daemon.socket
|
|
sudo systemctl mask avahi-daemon.service avahi-daemon.socket
|
|
|
|
installare samba
|
|
|
|
```bash
|
|
## https://fariszr.com/en/docker-smb-network-discovery/
|
|
version: "3.5"
|
|
|
|
services:
|
|
samba:
|
|
image: crazymax/samba
|
|
container_name: samba
|
|
network_mode: host
|
|
volumes:
|
|
- /home/nvme/dockerdata/smb:/data
|
|
- /home/nvme/plexmediafiles:/plexmediafiles
|
|
- /home/nvme:/nvme
|
|
- /home/orangepi:/home
|
|
environment:
|
|
- "TZ=Europe/Rome"
|
|
- "SAMBA_LOG_LEVEL=0"
|
|
- "WSDD2_ENABLE=1"
|
|
- "WSDD2_HOSTNAME=OrangePiSMB2"
|
|
- "WSDD2_NETBIOS_NAME=OrangePiSMB2"
|
|
restart: unless-stopped
|
|
avahi:
|
|
image: ydkn/avahi
|
|
container_name: avahi
|
|
hostname: OrangePiSMB2
|
|
network_mode: host
|
|
volumes:
|
|
- /home/nvme/dockerdata/avahi-services:/etc/avahi/services:ro
|
|
restart: unless-stopped
|
|
```
|
|
|
|
## 02 Install tools to check HW acceleration
|
|
|
|
#### 2A OpenCL
|
|
|
|
sudo apt install clinfo -y
|
|
clinfo
|
|
|
|
sudo apt clpeak
|
|
clpeak
|
|
|
|
#### 2B Vulkan
|
|
|
|
sudo apt install vulkan-tools
|
|
vulkaninfo
|
|
vulkaninfo --summary
|
|
DISPLAY=:0 vkcube
|
|
|
|
#### 2C OpenGL OpenGL ES
|
|
|
|
sudo apt-get install mesa-utils
|
|
glxinfo
|
|
glxinfo -B
|
|
glxinfo | grep Mesa
|
|
glxinfo | grep "OpenGL version"
|
|
glxgears
|
|
glxdemo
|
|
|
|
sudo apt install glmark2-es2
|
|
glmark2-es2
|
|
DISPLAY=:0 es2_info
|
|
|
|
|
|
## 03 Install OpenCL Mali610
|
|
|
|
[link orig](https://ib.bsb.br/setting-up-gpu-drivers-on-rk3588/#installing-mali-gpu-driver)
|
|
https://github.com/tsukumijima/libmali-rockchip/releases
|
|
|
|
|
|
Download libmali-g610.so (non so se serve)
|
|
|
|
cd /usr/lib
|
|
sudo wget https://github.com/JeffyCN/mirrors/raw/libmali/lib/aarch64-linux-gnu/libmali-valhall-g610-g6p0-x11-wayland-gbm.so -O libmali-g610.so
|
|
|
|
Ensure Firmware File Exists
|
|
|
|
su
|
|
cd /lib/firmware
|
|
ls mali_csffw.bin
|
|
|
|
if not exit
|
|
|
|
sudo wget https://github.com/JeffyCN/mirrors/raw/libmali/firmware/g610/mali_csffw.bin
|
|
|
|
exit form su
|
|
|
|
exit
|
|
|
|
Configuring OpenCL ICD Loader: Install Mesa OpenCL ICD, Create OpenCL Vendors Directory and Add Mali ICD Configuratio
|
|
|
|
sudo apt update
|
|
sudo apt install mesa-opencl-icd -y
|
|
|
|
Installing OpenCL Libraries and their dependencies
|
|
|
|
sudo apt install ocl-icd-opencl-dev -y
|
|
sudo apt install libxcb-dri2-0 libxcb-dri3-0 libwayland-client0 libwayland-server0 libx11-xcb1 -y
|
|
|
|
Verifying Installation with clinfo
|
|
|
|
clinfo
|
|
clpeak
|
|
|