How to change android kernel config?

I use vim3, Has anyone changed the vim3 android pie kernel config.
such as,i want enable /dev/mem

I change the .config file in out/target/product/kvim3/obj/KERNEL_OBJ
but it will lost configs i changed when compile
Can anyone give some help? best regards, thanks