How to edit the bootcmd_mfg u-boot variable to run a script when u-boot boots?

I want to run a script to run some commands when u-boot boots. How and where do I modify the bootcmd_mfg variable to achieve the same?

I think the variable you want to change is bootcmd not bootcmd_mfg. You can change it like you change any other variable in u-boot:
setenv bootcmd command

Thanks for your response. The bootcmd_mfg variable is run when mfg tool is used to boot u-boot. I added the command to this variable and it worked.