How to update u-boot from Linux

Hi
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?

thanks

Xavier

you can use firmware update utility
https://www.digi.com/resources/documentation/digidocs/embedded/dey/3.2/cc6ul/yocto_t_program-firmware-from-linux

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