NVIDIA Tegra
NVIDIA DRIVE OS 5.1 Linux

Developer Guide
5.1.0.2 Release


 
SKU Framework: Customizing
 
About SKUInfo
Getting SKUInfo from the Kernel
Getting SKUInfo with the Quickboot API
Customizing the SKU Framework
Flashing (Host Side)
Quickboot (Target Side)
Customer Data Section in the BCT
NVIDIA DRIVE™ products provide a SKU framework for identifying board characteristics. In this framework, SKUInfo is data that identifies board variants. SKU ID is one of the four elements that comprise SKUInfo.
SKUInfo is stored in the customer data field in the BCT. Bootburn and the underlying flashing infrastructure preserve this customer data field even when the BCT is updated.
About SKUInfo
The SKUInfo structure is defined in the following file:
<top>/drive-t186ref-foundation/firmwares/src/bootloader/quickboot/qb-t19x-partner/include/asm-arm/proc-t194/board_sku.h
The following struct holds the SKUInfo data:
typedef struct NvSkuInfoRec
{
NvU8 Version;
NvU8 TestConfig;
NvU16 BomPrefix;
NvU32 Project;
NvU32 SkuId;
NvU16 Revision;
NvU8 SkuVersion[2];
NvU8 Reserved[8];
} NvSkuInfo;
NVIDIA uses a subset of the structure’s fields to define SKUInfo. It uses:
BomPrefix
Project
SkuId
Revision
SkuVersion[]
For example, the SKUInfo for the P2382 board is:
699-62382-1000-100 BB
Which represents the values shown in the following table.
Struct Field
Example Values
Description
BomPrefix
699
Numerical digits of length 3
Project
2382
Numerical digits of length 4
SkuId
1000
Numerical digits of length 4
Revision
001
Specifies the board revision; numerical digits of length 3
SKU version
BB
Upper case letters of length 2
The following information is encoded in nvsku, which is parsed by various flashing tools.
SKUInfo Syntax
This diagram shows the syntax of a standard SKUInfo value and the meanings of the digits.
Note:
Not all projects follow the SKUInfo syntax shown above for the third digit group (“1000”). Specifically, projects that support multiple SKUs may simply set these digits to “0000”.
Getting SKUInfo from the Kernel
You can read the proc entry to get SKUInfo.
To get SKUInfo with procfs
Enter:
cat /proc/device-tree/chosen/nvidia,<property>
Where <property> is the property to be read.
For example:
$ cat /proc/device-tree/chosen/nvidia,sku
699-62382-1000-000
 
$ cat /proc/device-tree/chosen/nvidia,sku_version
BB
Getting SKUInfo with the Quickboot API
Quickboot provides the following APIs, which you can use to get SKUInfo.
NvError QbBoardGet(NvU32 <datatype>, NvU8 *pData, NvU32 DataSize)
—Or—
NvError QbBoardGetString(NvU32 DataType, NvU8 *pStr, NvU32 StringSize);
Where DataType is one of the following:
#define GET_SKU_STRUCTURE 1
#define GET_SKU_PROJECT_NUMBER 2
#define GET_SKU_NUMBER 3
#define GET_SKU_REVISION 4
#define GET_SERIAL_NUMBER 5
#define GET_MACID 6
#define GET_PRODUCT_STRUCTURE 7
#define GET_INTERNAL_INFO 8
These declarations are defined in board_sku.h. For the location of this file, see About SKUInfo in this topic.
Customizing the SKU Framework
If you want to define your own skuinfo data structure, you must change the SKUInfo definition in board_sku.h. Depending on your customizations, you may also have to modify files used in flashing, Quickboot, and customer data.
Flashing (Host Side)
The nvskuinfo utility fills the SKUInfo into the Customer Data section of the provided BCT file. It accepts the same arguments as the Bootburn -z option. When you call Bootburn with the -z option, it calls the nvskuinfo utility to flash the SKUInfo. Alternatively, you can call nvskuinfo directly to fill information into the BCT.
To customize the SKU information provided with the -z Bootburn option
1. Modify the following files.
<top>/drive-t186ref-foundation/tools/host/flashtools/src/host/nvskuinfo/nvskuinfo.c
<top>/drive-t186ref-foundation/tools/host/flashtools/src/libs/soc/t19x/nvskuinfo/nvskuinfo_t19x.c
2. Rebuild nvskuinfo.
Quickboot (Target Side)
Quickboot reads SKUInfo from the flashed BCT and passes it to the kernel via the device tree.
To customize the SKUInfo syntax
1. Modify the QbBoardGet function in the following file:
<top>/drive-t186ref-foundation/qb-t19x-partner/arch/t194/cpu/core/t19x_sku.c
2. Rebuild Quickboot. For more information, see Quickboot: Customizing.
Customer Data Section in the BCT
The total size of Customer Data section in the BCT is 352 bytes, as defined in:
<top>/drive-t186ref-foundation/firmwares/src/hwinc/hwinc-t19x/nvboot_config.h
The following diagram shows the customer data layout in the BCT. The data may contain any information customers require, provided the size limitation is not exceeded. The definitions for the structures in the customer data can be declared in various header files.
NvInternalInfoRaw
Purpose—Skuinfo is stored in this section along with internal information version, Board serial information, MAC ID, skuinfo, product information, and reserved bytes.
Declared at:
<top>/drive-t186ref-foundation/firmwares/src/bootloader/quickboot/qb-t18x-partner/include/asm-arm/proc-t19x/board_sku.h
Size—140 bytes. But, in total, 188 bytes is available in this section of Customer data.