Installing OpenBSD/riscv64 on Mango Pi MQ-Pro
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

OpenBSD:
  doas pkg_add bison git gmake riscv-elf-gcc py3-setuptools swig
  export CROSS_COMPILE=riscv64-unknown-elf-
  alias make=gmake
  alias sudo=doas

ArchLinux/Manjaro:
  pamac install base-devel git python-setuptools riscv64-linux-gnu-gcc swig
  export CROSS_COMPILE=riscv64-linux-gnu-

Debian:
  sudo apt install bison flex gcc-riscv64-linux-gnu git libssl-dev make
  sudo apt install python3-dev python3-setuptools swig
  export CROSS_COMPILE=riscv64-linux-gnu-

git clone https://github.com/riscv-software-src/opensbi
cd opensbi
make PLATFORM=generic FW_PIC=y

cd ..
git clone https://github.com/smaeul/u-boot -b d1-wip
cd u-boot
sed -i 's/SWIG_Python_AppendOutput/SWIG_AppendOutput/g' \
    scripts/dtc/pylibfdt/libfdt.i_shipped
make mangopi_mq_pro_defconfig
make OPENSBI=../opensbi/build/platform/generic/firmware/fw_dynamic.bin

sudo dd if=install79.img of=/dev/${card} bs=1M
sudo dd if=u-boot-sunxi-with-spl.bin of=${card} bs=1024 seek=8
