<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 27, 2016 at 8:28 PM, ron minnich <span dir="ltr"><<a href="mailto:rminnich@gmail.com" target="_blank">rminnich@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">yeah, david and nico both make very good points. I like the idea of  JSON file, and further we're working on a Go program<div>on the u-root project that would parse said file (trivial in Go to parse JSON, it's one statement and blam! your Go struct is all</div><div>filled in) and then decide what to configure/what to download/how to validate (we have a gpgv command written in Go by</div><div>Eric Grosse) and then how to kexec it.</div><div><br></div><div>I think what we're doing might be useful?</div></div></blockquote><div><br></div><div>Now we're talkin' - A standardized data format that is human readable/writeable that can be easily parsed and generated using small libraries. It looks like Go can already handle it easily, for C we could maybe use JSMN (<a href="http://zserge.com/jsmn.html">http://zserge.com/jsmn.html</a>) or something similar. I think that addresses Nico's first point.</div><div><br></div><div>For the other points, I imagine we'd have two varieties of the JSON file. One would be generated along with the payload and included as a CBFS file to specify things like capabilities and bootable device priority*. The other would be on the bootable media and specify things like the kernel path and parameters. A tool which is used to generate the latter would verify the capabilities and warn the user if their coreboot payload lacks support for something.</div></div><br clear="all"><div>*Stuff like boot device priority might need some more thought since CMOS may be a preferable way of controlling something like that. However given that CMOS might not exist on a particular platform (especially in the non-x86 world) replacing the config file in CBFS file might not be a bad way to go.</div><div><br></div>-- <br><div class="gmail_signature">David Hendricks (dhendrix)<br>Systems Software Engineer, Google Inc.</div>
</div></div>