Linkit 7688 OpenWrt 18.06 pinmux definition

I built a 18.6 openWRT for Linkit Smart 7688 and selected libmraa to be installed but got invalid GPIO pin specified on every GPIO. A search shows that Mediatek has a pinmux program that is not present in openWRT 18.6 for Linkit Smart 7688.

How can I specify my pin's?

i found this pinmux file. Link
But i read that its loaded to kernel by startup.

A test program from me shows that i have libmraa available, but the pins are not exposed:

import mraa

    print (mraa.getVersion())
    print("no mraa available")
for GPIO in range(1,254):
        gpio = mraa.Gpio(GPIO)
        print("GPIO"+str(GPIO)+" worked")
        print("GPIO"+str(GPIO)+" exeption")


GPIO1(-254) exception

how can i compile libmraa with pinmux from linkit?

I'm facing the same issue, how did you manage to solve the problem?

Yes, but I can’t say how.
Did you select the dev/mem sysfs package?
I can have a look in to my build tomorrow to point you to the deeply nested location but you can also search in menuconfig for dev/mem i think...
Let me know if you don’t find it.

I found /dev/mem in menuconfig as per below

Global build settings -> Kernel build options -> /dev/mem virtual device support

Which did not help much, then I tried the below:

echo "CONFIG_KERNEL_DEVMEM=y" >> .config
echo "CONFIG_BUSYBOX_CUSTOM=y" >> .config
make defconfig

now when I run /dev/mem i get permission denied issue

root@OpenWrt:/# /dev/mem
/bin/ash: /dev/mem: Permission denied

Not sure where to go from here

Isn‘t there a KDEV/MEM to be activates as well?
I don‘t have time to look in to it, but here is a config of mine that worked:

And i think this could help:

May be you have to export the GPIO first!
See this line in link above:
echo "229" > /sys/class/gpio/export