Permalink
Browse files

FirmwareImage.ps1: add method for "one-liner" to extract "kernel.image"

  • Loading branch information...
PeterPawn committed Dec 7, 2018
1 parent 7d7bdf9 commit 7e0d0ab7d019d97aca4aa0d328896c9f46ab5fe5
Showing with 8 additions and 0 deletions.
  1. +8 −0 signimage/FirmwareImage.ps1
@@ -2574,6 +2574,14 @@ Class FirmwareImage : TarFile
return $memberStream;
}

# get the specified member (by name) and remove a TI checksum, if any - save data to $outputName
[void] extractMemberAndRemoveChecksum([string] $member, [string] $outputName)
{
[System.IO.FileStream] $file = [System.IO.File]::Create($outputName);
$this.extractMemberAndRemoveChecksum($this.getMemberByName($member)).WriteTo($file);
$file.Close();
}

# get the specified member data after removing the TI checksum, if any - save data to $outputName
[void] extractMemberAndRemoveChecksum([TarMember] $member, [string] $outputName)
{

0 comments on commit 7e0d0ab

Please sign in to comment.