Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

manifesto: add mnfb parser#3

Open
cfriedt wants to merge 1 commit into
projectara:masterfrom
cfriedt:mnfb-parser
Open

manifesto: add mnfb parser#3
cfriedt wants to merge 1 commit into
projectara:masterfrom
cfriedt:mnfb-parser

Conversation

@cfriedt

@cfriedt cfriedt commented Aug 16, 2020

Copy link
Copy Markdown
Contributor

Previously the MnfbParser class was just a stub, so e.g. the following
would fail:

manifesto -I mnfb -O mnfs input.mnfb
Error: 'MnfbParser' object has no attribute 'parse_file'

This change adds a very simple binary file parser.

example output:

Warning: non-incremental id for '[None]'
Warning: non-incremental id for '[None]'
[manifest-header]
version-major = 0
version-minor = 1

[interface-descriptor]
vendor-string-id = 0x1
vendor-product-id = 0x2

; Interface vendor string
[string-descriptor 0x1]
string = Zephyr Project RTOS

; Interface product string
[string-descriptor 0x2]
string = Greybus Service Sample Application

; 'Control' class on Bundle 0
[bundle-descriptor 0x0]
class = 0x0

; 'Bridged PHY' class on Bundle 1
[bundle-descriptor 0x1]
class = 0xa

; 'Bridged PHY' class on Bundle 2
[bundle-descriptor 0x2]
class = 0xa

; 'Bridged PHY' class on Bundle 3
[bundle-descriptor 0x3]
class = 0xa

; 'Control' protocol on CPort 0
[cport-descriptor 0x0]
bundle = 0x0
protocol = 0x0

; 'GPIO' protocol on CPort 1
[cport-descriptor 0x1]
bundle = 0x1
protocol = 0x2

; 'I2C' protocol on CPort 2
[cport-descriptor 0x2]
bundle = 0x2
protocol = 0x3

; 'SPI' protocol on CPort 3
[cport-descriptor 0x3]
bundle = 0x3
protocol = 0xb

Previously the MnfbParser class was just a stub, so e.g. the following
would fail:

manifesto -I mnfb -O mnfs input.mnfb
Error: 'MnfbParser' object has no attribute 'parse_file'

This change adds a very simple binary file parser.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant