Error wiringPiSetup

VIM3 hangs on the GPIO read all commands.

khadas@Khadas:~$ gpio readall
err : wiringPiSetup: /dev/gpiomem doesn't exist. Please try again with sudo.
khadas@Khadas:~$ sudo gpio readall
[sudo] password for khadas: 

I use the image VIM3_Ubuntu-gnome-focal_Linux-5.12_arm64_SD-USB_V1.0.5-210430.img.xz

VIM3 hangs I can not do anything.

Please use the 4.9 kernel image, 5.12 does not support it.

When using an image with 4.9 kernels, it not support a touch screen via USB and Qt framework.

I use kernel 5.12, it supports my touch screen and Qt with cross-compile, but it does not support GPIO.

And more, when I use 4.9 kernel the LCD screen 7 inch via HDMI and touch screen does not works.

So I must use 5.12 kenels.

I think GPIO very basic level, why 5.12 not support?

About the USB touch screen maybe the driver is missing for 4.9 kernel, you have to add it yourself. But QT should works.

5.x kernel is a very new kernel and many fucntions are missing, e.g. WiringPi, if you want to use the GPIO, you can use the stand GPIO framwork.

Hmn, so how to find and copy/move LCD+touch screen driver from Ubuntu 20.04 with 5.12 kernel to 4.9 kernel version?

Now, my LCD 7 inch HDMI with touch screen via USB working on 5.12


@Kevin-Nguyen it is not a driver file to copy, you need to enable in the kernel def config and rebuild the kernel

load the 4.9 image and follow instructions from here to build the kernel:

remember you need to open the vim-defconfig file and enable the specific module/driver relevant to your touchscreen

I use LCD 7 inch with HDMI and touch screen via USB.

In 5.12 kernel Ubuntu 20.04 my LCD working normal with resolution and touch screen.

Show dmesg log:

But on the 4.9 kernel version, it missing a driver for screen touch USB.

You said I rebuild the image and kernel but I don’t know select for this driver.

source env/

make kernel-config

Please guide me, thanks.

If you don’t know how to do it. You can try try the 5.12 test image with WiringPi supported.

I installed your image VIM3_Ubuntu-gnome-focal_Linux-5.12_arm64_SD-USB_V1.0.5-210515-develop.img.xz

GPIO is working, but I do not see ttyS3 for UART3

cat /boot/env.txt

overlays=uart3 pwm_f i2c3 i2s os08a10 watchdog otg-device

Overlays does not work on 5.12, need more works…


can you tell me what specific patches you implemented in the 5.12 test build mentioned here to get the GPIO to work? Having a similar issue with accessing the GPIO Pins and wanted to track down the problem. So the changes in kernel might help me.

Thanks and best regards

Which image you used?

no image, installation from scratch (Debian) with vanilla kernel version 5.12.4.

But I think I found it, the patch is fenix/0055-VIMs-add-gpiomem-support.patch at master · khadas/fenix · GitHub right?

@Electr1 The link you provided is broken. I am having the same situation as Kevin. If you can give me a clue of how to fix this issue I would really appreciate it. I am not familiar with kernel modifications so I am really stuck at this point.

Are you using the image with 5.x kernel ?

@Electr1 No. I am using official image 4.9 kernel. Stuck on this issue. I need to stay in 4.9 kernel due I need full access to GPIOs. Thanks a lot for your response.

check this updated link: