Instructions for setting up a Raspberry Pi Zero for running OpenOCD specifically for the purpose of disabling Access Port Protection on nrf52 boards.
The below script builds natively on the RPi0, and will take a very long time.
sudo apt install wget git autoconf libtool make pkg-config libusb-1.0-0 libusb-1.0-0-dev libhidapi-dev libftdi-dev libhidapi-dev telnet
git clone https://github.com/ntfreak/openocd
cd openocd
./bootstrap