The cbi console command is used to inspect, modify, or reinitialize the
Chromium OS Board Information (CBI) stored in the EC's non-volatile storage
(EEPROM or internal flash).
cbi
cbi set <tag> <value> <size> [init | skip_write]
cbi set <tag> <hex_string> [init | skip_write] (For UFSC)
cbi remove <tag> [init | skip_write]
Running the command without any arguments dumps all parsed CBI fields and displays a hexadecimal dump of the raw CBI structure currently cached in memory.
Example Output:
> cbi
CBI_VERSION: 0x0000
TOTAL_SIZE: 60
BOARD_VERSION: 1 (0x1)
OEM_ID: 2 (0x2)
MODEL_ID: 5 (0x5)
SKU_ID: 0 (0x0)
FW_CONFIG: 0 (0x0)
PCB_SUPPLIER: 0 (0x0)
SSFC: 0 (0x0)
REWORK_ID: 0 (0x0)
UFSC: (Error -3)
00000000 5f 43 42 49 3c 00 00 00 7f 00 01 00 01 00 00 01 |_CBI<...........|
00000010 01 00 01 00 02 00 00 05 01 00 01 00 00 00 00 00 |................|
...
Sets a specific CBI tag to a given value.
-
Standard Fields:
cbi set <tag> <value> <size><tag>: The integer ID of the CBI tag (see CBI Tags Reference).<value>: The value to set (can be decimal or hex with0xprefix).<size>: The size of the field in bytes (typically 1, 2, or 4).- Example:
cbi set 2 0x12 4(Sets SKU ID to 0x12, size 4 bytes).
-
String Fields (DRAM Part Number, OEM Name):
cbi set <tag> <string> <size_arg>- Although the size is determined by the string length, a size argument must still be provided to satisfy command parsing (it will be ignored).
- Example:
cbi set 3 "DRAM_PART_XYZ" 0
-
Unified Firmware and Second-source Config (UFSC):
cbi set 29 <128-bit_hex_string>- UFSC (Tag 29) expects a 32-character hex string (representing 16 bytes / 128 bits).
- Example:
cbi set 29 0102030405060708090a0b0c0d0e0f10
NOTE: After modifying CBI data using
cbi set(orcbi remove), it is highly recommended to reboot the EC (e.g., using therebootconsole command). Many EC subsystems and drivers query CBI data only once during boot-time initialization (e.g., inHOOK_INIT). Rebooting ensures that the EC runtime setup is fully synchronized with the updated CBI data.
Removes a specific tag from the CBI structure.
- Example:
cbi remove 6(Removes FW_CONFIG).
The Unified Firmware and Second-source Configuration (UFSC) value is a 128-bit (16-byte) value.
-
Source of Truth: The UFSC configuration is defined in the Boxster configuration system and stored in a JSON proto file (typically under the program's configuration directory).
-
Format in JSON: In the JSON configuration, it is represented as an array of four 32-bit decimal integers under the
unifiedFwConfigkey.-
Example:
"unifiedFwConfig": { "value": [ 105123905, 2113, 0, 0 ] }
-
Example:
-
Conversion to Hex for
cbiCommand: To use this value with thecbi set 29command, you must convert each of the four decimal words to hexadecimal, endian-swap each word, and concatenate them into a single 32-character hexadecimal string.Conversion Steps for the Example:
-
Word 0:
105123905(decimal)$\rightarrow$ 0x06441041(hex)$\rightarrow$ Endian-swapped:41104406 -
Word 1:
2113(decimal)$\rightarrow$ 0x00000841(hex)$\rightarrow$ Endian-swapped:41080000 -
Word 2:
0(decimal)$\rightarrow$ 0x00000000(hex)$\rightarrow$ Endian-swapped:00000000 -
Word 3:
0(decimal)$\rightarrow$ 0x00000000(hex)$\rightarrow$ Endian-swapped:00000000
Concatenating these four swapped words yields the final 32-character string:
41104406410800000000000000000000Command Example:
cbi set 29 41104406410800000000000000000000(Note: Ensure you provide the full 32-character string, including trailing zeros for zero-valued words, to satisfy the 16-byte size requirement).
-
Word 0:
Both set and remove subcommands accept optional trailing flags:
Initializes a new CBI structure in memory before applying the change.
- When to use:
- Factory Provisioning: Use
initwhen the CBI storage is completely empty, corrupted, or needs to be overwritten from scratch. - Restructuring: If you want to clear all existing tags and start with only the tag specified in the current command.
- Factory Provisioning: Use
- Behavior: It zeroes out the in-memory CBI buffer, writes the CBI magic
signature (
_CBI), resets the total size to the header size, and then applies thesetorremoveoperation. - Example:
cbi set 0 1 1 init(Initializes CBI and sets Board Version to 1).
[!IMPORTANT] The
initflag is subject to security restrictions. See Security Restrictions (CONFIG_SYSTEM_UNLOCKED) below.
Performs the operation only on the in-memory CBI cache and skips writing the changes back to the non-volatile storage (EEPROM/Flash).
- When to use: For testing configuration changes temporarily without committing them to physical storage.
- Example:
cbi set 6 0x100 4 skip_write
The init flag's behavior is heavily guarded to prevent unauthorized or
accidental erasure of board info on production devices.
- The
initoperation is only allowed if the existing CBI data in storage is invalid or corrupted. - If the EC detects a valid CBI structure in storage, the
initcommand will be rejected, returningACCESS_DENIED("Failed to init. System locked"). - This ensures that once a device is provisioned in the factory, its CBI cannot be easily wiped or reset via the console.
- The
initoperation is always allowed. - You can reinitialize the CBI and overwrite existing valid data at any time.
- This is typically used during early board bring-up and development.
Independent of CONFIG_SYSTEM_UNLOCKED, if hardware write protection is enabled
on the flash/EEPROM, any write to physical storage will fail unless skip_write
is specified.
The authoritative list of CBI tags is defined in ec_commands.h. Below is a reference of common tags:
| Tag ID | Constant | Description |
|---|---|---|
0 |
CBI_TAG_BOARD_VERSION |
Hardware board version. |
1 |
CBI_TAG_OEM_ID |
OEM Identifier. |
2 |
CBI_TAG_SKU_ID |
SKU Identifier. |
3 |
CBI_TAG_DRAM_PART_NUM |
DRAM part number (string). |
4 |
CBI_TAG_OEM_NAME |
OEM Name (string). |
5 |
CBI_TAG_MODEL_ID |
Model Identifier. |
6 |
CBI_TAG_FW_CONFIG |
Firmware configuration bitfield. |
7 |
CBI_TAG_PCB_SUPPLIER |
PCB Supplier ID. |
8 |
CBI_TAG_SSFC |
Second Source Factory Cache. |
9 |
CBI_TAG_REWORK_ID |
Rework Identifier (64-bit). |
12-27 |
CBI_TAG_BATTERY_CONFIG |
Battery configurations. |
28 |
CBI_TAG_PROVISION_MATRIX_VERSION |
Provision matrix version. |
29 |
CBI_TAG_UFSC |
Unified Firmware & Second-source Config (128-bit). |