Apalis Image flash commands

I discovered recently that the TK1 flash script flashes both files apalis-tk1_bin/flash_eth.img and flash_eth.img (from the TFTP output directory) when performing a TFTP update. I assumed the apalis-tk1_bin/flash_eth.img to be specific for the TK1 board and the flash_eth.img to be generic for all Toradex boards. Are both required for the TK1?

Hi

Are both required for the TK1?
Yes.

I assumed the apalis-tk1_bin/flash_eth.img to be specific for the TK1 board and the flash_eth.img to be generic for all Toradex boards.
Older images placed all files used for update in the top level directory of the update media. U-Boot versions were configured to read and run the flash_eth.img script. When we moved to use a subdirectory per board we kept changed flash_* scripts in the top level directory which in turn load the boardspecific version from the board specific directory. This allows to update from a module with older U-Boot to something newer.

If you want to do it differently, you would have to also change the relevant U-Boot environment variable to read ${board}/flash_eth.img directly.

Max

flash_* scripts in the top level directory which in turn load the boardspecific version from the board specific directory

The only thing fwd_eth.scr (is converted to flash_eth.img) is doing seems to be tftpbooting the other file:

#the update.sh script renames this. fwd_eth.scr -> ../flash_eth.img
test -z "${board_name}" && test "${soc}" = "vf500" && setenv board_name colibri_vf
test -z "${board_name}" && test "${soc}" = "vf610" && setenv board_name colibri_vf

test -n ${board_name} || echo "board_name env not set!" && exit
tftpboot ${loadaddr} "${board_name}/flash_eth.img" && source ${loadaddr}

As I am using the TK1 and if I do not care about supporting older u-boot versions it should be ok if I just place tftpboot ${loadaddr} "${board_name}/flash_eth.img" && source ${loadaddr} into flash_eth.scr, right?

You are right.