Documentation ¶
Overview ¶
Package fota implements Flash Over The Air utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitForSDcard ¶
WaitForSDcard checks if an SDcard is present in the system and returns. If card is not found it restarts it by DUT -> TS switch and tries again until number of retryCount is exceeded (then it returns an error).
Types ¶
type FOTA ¶
type FOTA struct { // SDcard is a path to block device images will be flashed to. // Example: "/dev/sda". SDcard string // PartMapping ".img" file -> partition number. // Example: {"boot.img":1} PartMapping map[string]string // contains filtered or unexported fields }
FOTA provides methods to help in the process of flashing an image to sdcard.
func (*FOTA) DownloadAndFlash ¶
DownloadAndFlash downloads images from URLs, uncompresses them, unpacks the archives and writes resulting ".img" files to proper partitions.
Files not mentioned in PartMapping are ignored.
MD5 checksum is calculated and error returned when mismatch occurs. If MD5SUMS URL is not specified or downloaded file is not mentioned in it, calculation results are ignored.
func (*FOTA) Flash ¶
Flash works in a similar way to DownloadAndFlash except that it takes paths to files instead of HTTP addresses.
func (*FOTA) SetVerbose ¶
func (fota *FOTA) SetVerbose()
SetVerbose increases logging of FOTA actions.