my colleague has given you very clear example.
you use the "setenv ncip 192.168.100.98" in imx8mm_evk.h
because you think you are still at runtime in front of i.mx8mm board's debug console. and type the command
"setenv ncip 192.168.100.98" to change the variable ncip using setenv command.
now you are at compile time, you should use the "=" as my colleague's previous reply.
in the header file imx8mm_evk.h , you should use "ncip=192.168.100.98".
If you want to use the command, you should create your own command then chain to the bootcmd.
like this, "set_ncip=setenv ncip 192.168.100.98". then use the "run set_ncip" in bootcmd chain.
or directly use setenv ncip 192.168.100.98 in bootcmd.
u-boot only runs bootcmd. and like mmcboot is in the chain of the bootcmd.
run mmcargs of mmc boot is an example
"mmcargs=setenv bootargs ${jh_clk} console=${console} root=${mmcroot}\0 " \
"loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bsp_script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"if test ${boot_fit} = yes || test ${boot_fit} = try; then " \