Flash to SD card armbian "Ubuntu 24.04 (Noble) Server / CLI", https://www.armbian.com/nanopi-duo-2/
Open SD card on linux machine and change in files:

/etc/netplan/00-default-use-network-manager.yaml
network:
  version: 2
  renderer: NetworkManager
  wifis:
    wlan0:
      dhcp4: true
      dhcp6: true
      access-points:
        "<WiFi SSID>":
          password: "<password>"

/etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=true

[device]
wifi.scan-rand-mac-address=no

Insert SD card in nanopi duo 2
Connect via SSH (root, 1234)

apt update
apt upgrade
apt install gcc g++ clang llvm libasound2-dev libssl-dev
apt install modemmanager usb-modeswitch usb-modeswitch-data
tar -xzvf /usr/share/usb_modeswitch/configPack.tar.gz -C /etc/usb_modeswitch.d/

In armbian-config enable in hardware analog-codec (or in /boot/armbianEnv.txt add analog-codec to overlays: overlays=analog-codec usbhost1 usbhost2)
In alsamixer turn on mic1 (F4, you can switch mic1 via space key)
alsactl store

On macos should be installed llvm and lld
brew install lld
brew install llvm

Run copy_sysroot.sh
Run build.sh

Turn off radio module:
/etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=true

[device]
wifi.scan-rand-mac-address=no
wifi.disabled=true