Check for file existence in RAM in u-boot

Is it possible to check for the existence of files (e.g. kernel binary, rootfs chunk files) in the RAM after requesting the files via tftp and before writing them into the eMMC from within u-boot? (Following the procedure for the rootfs chunk file copying in flash_eth.scr:)

setenv cp_file_chunk 'tftpboot ${loadaddr} ${board_name}/root.ext3-${filenum}; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'

Loading over tftp will fail if requested file is not on the server.

More generally I guess one could also use CRC checking to make sure stuff is really consistent during an update.

@dominik.tx I discovered that in flash_eth.scr the flash commands like setenv cp_file_chunk 'tftpboot ${loadaddr} ${board_name}/root.ext3-${filenum}; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}' triggered the writing of data even if during the loading with tftpboot something went wrong. The reason seems to be the ; semicolon separator between the commands…