Easyinstaller erase entire flash before installation of image

Easyinstaller does not erase the flash by default when installing an image. We use the autoinstall option so we cannot click the ‘erase flash’ option before installing our image.
Is there an option to erase the entire NAND flash before starting install of the image?
I know there is the option of “erase”: true but this only applies to partitions and I am trying to erase the entire NAND flash.

One of the reasons I want to do this is to make sure the U-boot environment area is cleared before writing new environment variables since “u_boot_env” does not do this which means there can be environment variables leftover causing boot issues.

You can modify prepare.sh script to run a Linux command before flashing. Like “mtd_debug erase” on u-boot-env

I have added the following line to the prepare.sh script

mtd_debug erase /dev/mtd4 0 0x80000

This erases the u-boot environment and solves my problem.

Thanks!

Perfect. Thanks for the feedback.

Sorry to hijack this question, but i am curious what would be the equivalent command to clear the u-boot environment of an Apalis TK1 board?

You can use U-boot command “env default -a” then “saveenv