Skip to content

Commit

Permalink
Minor fixes to create-fw-bundle
Browse files Browse the repository at this point in the history
CL: mos: Minor fixes to create-fw-bundle
  • Loading branch information
rojer committed Dec 19, 2019
1 parent 3aa13f0 commit 463a002
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions common/fwbundle/fw_part.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func (p *FirmwarePart) CalcChecksum() error {
if err != nil {
return errors.Trace(err)
}
p.Size = uint32(len(data))
p.ChecksumSHA1 = computeSHA1(data)
p.ChecksumSHA256 = computeSHA256(data)
return nil
Expand Down
9 changes: 7 additions & 2 deletions mos/create_fw_bundle/create_fw_bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ func CreateFWBundle(ctx context.Context, devConn dev.DevConn) error {
if err != nil {
return errors.Annotatef(err, "error reading existing manifest")
}
fwb.FirmwareManifest = *fm
} else {
}
fwb.FirmwareManifest = *fm
if *flags.Name != "" {
fm.Name = *flags.Name
}
if flags.Platform() != "" {
fm.Platform = flags.Platform()
}
if *flags.Description != "" {
fm.Description = *flags.Description
}
if *flags.BuildInfo != "" {
Expand Down

0 comments on commit 463a002

Please sign in to comment.