You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2019/01/04 18:21:20 UTC

[mynewt-newt] 15/17: Include BSP name in mfg manifest

This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git

commit 987f96007e8e1390489d5aefb2af20411649f93f
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Thu Dec 20 13:49:01 2018 -0800

    Include BSP name in mfg manifest
---
 artifact/manifest/mfg_manifest.go | 1 +
 newt/mfg/emit.go                  | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/artifact/manifest/mfg_manifest.go b/artifact/manifest/mfg_manifest.go
index 25cf9b7..bb27adc 100644
--- a/artifact/manifest/mfg_manifest.go
+++ b/artifact/manifest/mfg_manifest.go
@@ -39,6 +39,7 @@ type MfgManifest struct {
 	Version    string            `json:"version"`
 	Device     int               `json:"device"`
 	BinPath    string            `json:"bin_path"`
+	Bsp        string            `json:"bsp"`
 	FlashAreas []flash.FlashArea `json:"flash_map"`
 
 	Targets []MfgManifestTarget `json:"targets"`
diff --git a/newt/mfg/emit.go b/newt/mfg/emit.go
index 9eb8cf3..3974fda 100644
--- a/newt/mfg/emit.go
+++ b/newt/mfg/emit.go
@@ -80,6 +80,7 @@ type MfgEmitter struct {
 	Mfg      mfg.Mfg
 	Device   int
 	FlashMap flashmap.FlashMap
+	BspName  string
 }
 
 // Calculates the source path of a target's binary.  Boot loader targets use
@@ -150,6 +151,7 @@ func NewMfgEmitter(mb MfgBuilder, name string, ver image.ImageVersion,
 		Ver:      ver,
 		Device:   device,
 		FlashMap: mb.Bsp.FlashMap,
+		BspName:  mb.Bsp.FullName(),
 	}
 
 	m, err := mb.Build()
@@ -248,6 +250,7 @@ func (me *MfgEmitter) emitManifest() ([]byte, error) {
 		Device:     me.Device,
 		BinPath:    mfg.MFG_IMG_FILENAME,
 		FlashAreas: me.FlashMap.SortedAreas(),
+		Bsp:        me.BspName,
 	}
 
 	for i, t := range me.Targets {