[coreboot] Unique information
mr.nuke.me at gmail.com
Sun Jan 26 01:49:06 CET 2014
On Sunday, January 26, 2014 01:22:46 AM Vladimir 'φ-coder/phcoder' Serbinenko
> Hello, all. There is amount of information that should be unique to each
> machine and is supplied by coreboot. Most common examples are:
> - mobo serial number
> - UUID
> - Internal mac.
There are a few things you will need to go about solving this (in this exact
1. A format for the key-value pairs. Here, you'd use your talk page on the
wiki to make suggestions, and fine something sane. most likely a key (C valid
name, followed by a colon, followed by the value string, followed by either a
newline (easier to read the file as text), or a null character (easier to parse
it as a string). Since you'll probably have to validate these strings at
runtime, there is little value to making them null-terminated.
example 1 (null separator ignore newlines):
example 2 (newline separator):
mainboard_name:Mambo Jumbo #`~!@#$%^&*()-_=+# UBXT
2. A tool to generate and append new key-value pairs to the file. You might
even use "echo >>", but something which verifies the strings for validity is
3. Integrate the new tool into the build system, and allow arbitrary key-
value pairs to be generated. Maybe take inspiration from how we handle "cbfs-
4. Provide an implemented API coreboot-wise which reads these keys. This
should be fairly similar to get_option(). (But of course, instead of a value,
you'd get a string)
5. Convince people on gerrit that your idea is good.
All being said, this is actually pretty simple.
More information about the coreboot