How to build a WiringPI to make it work correctly?

I build from this repository: github

I had to edit the makefiles by adding a flag: -fcommon

The command output is like this: ~/WiringPi # gpio readall +------+-----+-------------------+------+---+----+--- Model Khadas-Edge ---+----+---+------+----------------------------+-----+------+ | GPIO | wPi | Name | Mode | V | DS | PU/PD | Physical | PU/PD | DS | V | Mode | Name | wPi | GPIO | +------+-----+-------------------+------+---+----+-------+----++----+-------+----+---+------+----------------------------+-----+------+ | | | 5V | | | | | 1 || 21 | | | | | GND(0V) | | | Bus Error

Why is the VIM2 S912 board if the gpio -v is showing incorrectly?

   `~/WiringPi # gpio -v
gpio version: 3.11
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: KHADAS-EDGE, Revision: 01, Memory: 4096MB, Maker: ROCKCHIP [Out of Warranty]
  * Device tree is enabled.
  *--> Amlogic Meson GXM (S912) Q200 Development Board`

Why you do this? WiringPi already preinstalled.

Please upgrade the system or use the latest release.

https://dl.khadas.com/Firmware/VIM2/Ubuntu/EMMC/VIM2_Ubuntu-server-bionic_Linux-4.9_arm64_EMMC_V1.0.6-210520.img.xz

https://dl.khadas.com/Firmware/VIM2/Ubuntu/EMMC/VIM2_Ubuntu-xfce-bionic_Linux-4.9_arm64_EMMC_V1.0.6-210520.img.xz

I have a Gentoo system and I have to build it myself.