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

Background

Hardware:QCA9531
Firmware:OpenWrt18.06.04
i want turn off JTAG to free GPIO,use GPIO0,1,2
follow the Openwrt web:
https://openwrt.org/docs/guide-user/hardware/turnoff.jtag.to.gpio

1

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

2

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

3

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

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

#4
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?