How to update u-boot from Linux

I am using the ccimx6ul and DEY.
I can update u-boot from u-boot itself (using the “update” command). But when I try to flash it from linux (using flash_eraseall and nandwrite), the system doesn’t boot.

I checked the source code of the “update” command in u-boot and it seems to be using some special tricks to update the bootloader.

Is there an easy way to do the same from Linux?



you can use firmware update utility

This is to update Linux, but how do I update uboot using that utility?