Create indpendent FW hash generation function.

Pull out the hash generation code from probe() and allow
it to be called independently.  This new function can be
run on arbitrary firmware blobs and it will try to determine
the type of fw (main vs ec) and produce the correct corresponding

TEST=import the probe module and run probe() with arguments ;
     alternatively, wait for the follow-on CL which includes
     the necessary arguments in the gooftool probe command.

Change-Id: Idc43da9a709aa5274bd19377a144a668a5cdada8
Commit-Ready: Tammo Spalink <>
Reviewed-by: Tammo Spalink <>
Tested-by: Tammo Spalink <>
3 files changed