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

try:
    print (mraa.getVersion())
except:
    print("no mraa available")
for GPIO in range(1,254):
    try:
        gpio = mraa.Gpio(GPIO)
        gpio.dir(mraa.DIR_OUT)
        gpio.write(1)
        time.sleep(2)
        gpio.write(0)
        print("GPIO"+str(GPIO)+" worked")
    except:
        print("GPIO"+str(GPIO)+" exeption")

prints:

v2.0.0
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
echo "CONFIG_BUSYBOX_CONFIG_DEVMEM=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: https://pastebin.com/g2iBWh8V

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