/dev/mem problem when turn off JTAG to free GPIO


i want turn off JTAG to free GPIO,use GPIO0,1,2
follow the Openwrt web:


when run the shell "jtag.to.gpio"
return msg:can't find /dev/mem


Then i do make kernel_menuconfig
And sel Device Drivers --> Character devices -->
[+] /dev/mem virtual device support


Next remake use "make -j8 V=s"
Flash the bin to QCA9531 board

But in the folder /dev/
still have no file named "mem".

What shoud i do next?
i think make kernel_menuconfig
there r some unknow options shoud be sel,but i can't find that?

i find out the bug in the kernel dir: /drivers/char/mem.c
Although do this select [+] /dev/mem virtual device support,and CONFIG_DEVMEM=y is right in config file,The macro CONFIG_DEVMEM have no effect in mem.c;

Next, i remove the Macro , chr_dev_init() -- > device_create() will create the mem and kmem device.

So,where is the bug? why the macro is failure?