Setting GUIDs and MACs
To set GUIDs/MACs/UID for the given device, use the ‘sg’ (set guids) command with the -guid(s), -uid and/or -mac(s) flags.
On 4th generation/Group I devices, the “sg” command can operate on both the image file and the image on the flash. When running the “sg” command on an image on the flash, if the GUIDs/MACs/UIDs in the image are non-blank, the flint will re-burn the current image using the given GUIDs/MACs/UIDs.
Change the GUIDs/MACs on a device:
# flint -d /dev/mst/mt4099_pci_cr0 q
-W- Running quick query - Skipping full image integrity checks.
Image type: FS2
FW Version: 2.42.5000
FW Release Date: 4.5.2017
Device ID: 4099
Description: Node Port1 Port2 Sys image
GUIDs: f45214030001b8a0 f45214030001b8a1 f45214030001b8a2 f45214030001b8a3
MACs: f4521401b8a1 f4521401b8a2
VSD:
PSID: MT_1090120019# flint -d /dev/mst/mt4099_pci_cr0 -guid 0x452140300abadaba -mac 0x300abadaba sg
-W- GUIDs are already set, re-burining image with the new GUIDs ...
You are about to change the Guids/Macs/Uids on the device:New Values Current Values
Node GUID: 452140300abadaba f45214030001b8a0
Port1 GUID: 452140300abadabb f45214030001b8a1
Port2 GUID: 452140300abadabc f45214030001b8a2
Sys.Image GUID: 452140300abadabd f45214030001b8a3
Port1 MAC: 00300abadaba f4521401b8a1
Port2 MAC: 00300abadabb f4521401b8a2Do you want to continue ? (y/n) [n] : y
Burning FS2 FW image without signatures - OK
Restoring signature - OK# flint -d /dev/mst/mt4099_pci_cr0 q
Image type: FS2
FW Version: 2.31.5050
FW Release Date: 4.5.2014
Device ID: 4099
Description: Node Port1 Port2 Sys image
GUIDs: 452140300abadaba 452140300abadabb 452140300abadabc 452140300abadabd
MACs: 00300abadaba 00300abadabb
VSD:
PSID: MT_1090120019Change the GUIDs/MACs on an image file:
# flint -i /tmp/image.bin q
Image type: fs2
FW Version: 2.31.5050
FW Release Date: 4.5.2014
Device ID: 4099
Description: Node Port1 Port2 Sys image
GUIDs: f45214030001b8a0 f45214030001b8a1 f45214030001b8a2 f45214030001b8a3
MACs: 00300abadaba 00300abadabb
VSD:
PSID: MT_1090120019# flint -i /tmp/image.bin -guid 0002c9000abcdef0 -mac 02c90abcdef0 sg
You are about to change the Guids/Macs/Uids on the device:
New Values Current Values
Node GUID: 0002c9000abcdef0 f45214030001b8a0
Port1 GUID: 0002c9000abcdef1 f45214030001b8a1
Port2 GUID: 0002c9000abcdef2 f45214030001b8a2
Sys.Image GUID: 0002c9000abcdef3 f45214030001b8a3
Port1 MAC: 02c90abcdef0 00300abadaba
Port2 MAC: 02c90abcdef1 00300abadabbDo you want to continue ? (y/n) [n] : y
Restoring signature - OK# flint -i /tmp/image.bin q
Image type: FS2
FW Version: 2.31.5050
FW Release Date: 4.5.2014
Device ID: 4099
Description: Node Port1 Port2 Sys image
GUIDs: 0002c9000abcdef0 0002c9000abcdef1 0002c9000abcdef2 0002c9000abcdef3
MACs: 02c90abcdef0 02c90abcdef1
VSD:
PSID: MT_1090120019
On 5th Generation (Group II) devices, the “sg” command can operate on both the image file and the image on the flash. When running the “sg” command on an image on the flash, -uid flag must be specified. For ConnectX-4, -guid/-mac flags can be specified. By default, 8 GUIDs will be assigned for each port starting from base, base+1 up until base+7 for port 1 and base+8 up until base+15 for port 2.
To change the step size and the number of GUIDs per port, specify guids_num=<num> step_size=<size> to the sg command.
Change GUIDs for device:
# flint -d /dev/mst/mt4113_pciconf0 q
Image type: FS3
FW Version: 10.10.3000
FW Release Date: 29.4.2014
Description: UID GuidsNumber Step
Base GUID1: 0002c903002ef500 8 1
Base GUID2: 0002c903002ef508 8 1
Base MAC1: 0002c92ef500 8 1
Base MAC2: 0002c92ef508 8 1
Image VSD:
Device VSD: VSD
PSID: MT_1240110019# flint -d /dev/mst/mt4113_pciconf0 -uid 0002c123456abcd -ocr sg
-W- Firmware flash cache access is enabled. Running in this mode may cause the firmware to hang.
Updating GUID section - OK
Updating ITOC section - OK
Restoring signature - OK# flint -d /dev/mst/mt4113_pciconf0 q
Image type: FS3
FW Version: 10.10.3000
FW Release Date: 29.4.2014
Description: UID GuidsNumber Step
Base GUID1: 00002c123456abcd 8 1
Orig Base GUID1: 0002c903002ef500 8 1
Base GUID2: 00002c123456abd5 8 1
Orig Base GUID2: 0002c903002ef508 8 1
Base MAC1: 00002c56abcd 8 1
Orig Base MAC1: 0002c92ef500 8 1
Base MAC2: 00002c56abd5 8 1
Orig Base MAC2: 0002c92ef508 8 1
Image VSD:
Device VSD: VSD
PSID: MT_1240110019WarningOrig Base GUID/MAC refers to the GUIDs/MACs located in the MFG(manufacture guids) section of the flash/image.
Change GUIDS for device (specifying guids_num and step_size):
# flint -d /dev/mst/mt4113_pciconf0 q
Image type: FS3
FW Version: 10.10.3000
FW Release Date: 29.4.2014
Description: UID GuidsNumber Step
Base GUID1: 0002c903002ef500 8 1
Base GUID2: 0002c903002ef508 8 1
Base MAC1: 0002c92ef500 8 1
Base MAC2: 0002c92ef508 8 1
Image VSD:
Device VSD: VSD
PSID: MT_1240110019# flint -d /dev/mst/mt4113_pciconf0 -uid 0000000000000001 -ocr sg guids_num=2 step_size=1
-W- Firmware flash cache access is enabled. Running in this mode may cause the firmware to hang.
Updating GUID section - OK
Updating ITOC section - OK
Restoring signature - OK# flint -d /dev/mst/mt4113_pciconf0 q
Image type: FS3
FW Version: 10.10.3000
FW Release Date: 29.4.2014
Description: UID GuidsNumber Step
Base GUID1: 0000000000000001 2 1
Orig Base GUID1: 0002c903002ef500 8 1
Base GUID2: 0000000000000003 2 1
Orig Base GUID2: 0002c903002ef508 8 1
Base MAC1: 000000000001 2 1
Orig Base MAC1: 0002c92ef500 8 1
Base MAC2: 000000000003 2 1
Orig Base MAC2: 0002c92ef508 8 1
Image VSD:
Device VSD: VSD
PSID: MT_1240110019Change GUIDs for image:
# flint -i /tmp/connect-ib.bin q
Image type: FS3
FW Version: 10.10.3000
FW Release Date: 29.4.2014
Description: UID GuidsNumber Step
Base GUID1: 0002c903002ef500 8 1
Base GUID2: 0002c903002ef508 8 1
Base MAC1: 0002c92ef500 8 1
Base MAC2: 0002c92ef508 8 1
Image VSD:
Device VSD: VSD
PSID: MT_1240110019# flint -i /tmp/connect-ib.bin -uid 000123456abcd sg
Updating GUID section - OK
Updating ITOC section - OK
Restoring signature - OK# flint -i /tmp/connect-ib.bin q
Image type: FS3
FW Version: 10.10.3000
FW Release Date: 29.4.2014
Description: UID GuidsNumber Step
Base GUID1: 000000123456abcd 8 1
Orig Base GUID1: 0002c903002ef500 8 1
Base GUID2: 000000123456abd5 8 1
Orig Base GUID2: 0002c903002ef508 8 1
Base MAC1: 00000056abcd 8 1
Orig Base MAC1: 0002c92ef500 8 1
Base MAC2: 00000056abd5 8 1
Orig Base MAC2: 0002c92ef508 8 1
Image VSD:
Device VSD: VSD
PSID: MT_1240110019Change GUIDs and MACs for the ConnectX-4 device:
# flint -d /dev/mst/mt4115_pciconf0 -guid e41d2d0300570fc0 -mac 0000e41d2d570fc0 -ocr sg
-W- Firmware flash cache access is enabled. Running in this mode may cause the firmware to hang.
Updating GUID section - OK
Updating ITOC section - OK
Restoring signature - OK# flint -d /dev/mst/mt4115_pciconf0 q
Image type: FS3
FW Version: 12.0100.5630
FW Release Date: 23.3.2015
Description: UID GuidsNumber
Base GUID: e41d2d0300570fc0 4
Base MAC: e41d2d570fc0 4
Image VSD:
Device VSD:
PSID: MT_2190110032
add note:
GUIDs and MACs can be changed separately on ConnectX4
In some cases, OEMs may prefer to pre-burn the flash before it is assembled on board.To generate an image for pre-burning for 4th generation (Group I) devices, use the mlxburn “- striped_image” flag. The “striped image” file layout is identical to the image layout on the flash, hence making it suitable for burning verbatim.When pre-burning, the GUIDs/MACs inside the image should be unique per device. The following are two methods to pre-burn an image. You can choose the best method suitable for your needs.
Method 1: Pre-burn an Image with Blank GUIDs/MACs
In this method, the image is generated with blank GUIDs and CRCs. The GUIDs are set after the device is assembled using the flint "sg" command. To set GUIDs take less than 1 second when running on an image with blank GUIDs (through a PCI device).
A device that is burnt with blank GUIDs/MACs will not boot as a functional network device as long as the GUIDs/MACs are not set.
To pre-burn an image with blank GUIDs/MACs:
-
Generate a striped image with blank GUIDs.
# mlxburn -fw ./fw-ConnectX3-rel.mlx -./MCX354A-FCB_A2-A5.ini -wrimage./fw-ConnectX3-rel.bin -striped_image -blank_guids -I- Generating image ... -I- Image generation completed successfully.
Burn the image to a flash using an external burner.
(Optional) After assembly, query the image on flash to verify there are no GUIDs on the device.
# flint -d /dev/mst/mt4099_pci_cr0 q Image type: FS2 FW Version:
2.31
.5050
FW Release Date:4.5
.2014
Device ID:4099
Description: Node Port1 Port2 Sys image GUIDs: ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff MACs: ffffffffffffffff ffffffffffffffff VSD: n/a PSID: MT_1090120019 -W- GUIDs/MACs values and their CRC are not set.Set the correct GUIDs. Since the image is with blank GUIDs, this operation takes less than 1 second.
# flint -d /dev/mst/mt4099_pci_cr0 -guid
0x0002c9030abcdef0
-mac0x0002c9bcdef1
sgQuery the image on flash to verify that the GUIDs are set correctly.
sg# flint -d /dev/mst/mt4099_pci_cr0 q Image type: FS2 FW Version:
2.31
.5050
FW Release Date:4.5
.2014
Device ID:4099
Description: Node Port1 Port2 Sys image GUIDs: 0002c9030abcdef0 0002c9030abcdef1 0002c9030abcdef2 0002c9030abcdef3 MACs: 0002c9bcdef1 0002c9bcdef2 VSD: n/a PSID: MT_1090120019
Method 2: Pre-burn an Image with Specific GUIDs/MACs for Each Device
In this method, a “base” image is generated with arbitrary default GUIDs and then updated with the correct GUIDs for each device.
To pre-burn an image with specific GUIDs/MACs for each device:
-
Generate the base image with arbitrary default GUIDs.
# mlxburn -fw./fw-ConnectX3-rel.mlx -c ./MCX354A-FCB_A2-A5.ini -wrimage ./fw-ConnectX3-rel.bin -striped_image
Per device, set the device specific GUIDs in the image.
flint -i ./fw-ConnectX3-rel.bin -guid
0x0002c9030abcdef0
-mac0x0002c9bcdef1
-striped_image sg(Optional) After assembly, query the image on flash to verify there are no GUIDs on the device.
sg# flint -i ./fw-ConnectX3-rel.bin -striped_image q Image type: FS2 FW Version:
2.31
.5050
FW Release Date:4.5
.2014
Device ID:4099
Description: Node Port1 Port2 Sys image GUIDs: 0002c9030abcdef0 0002c9030abcdef1 0002c9030abcdef2 0002c9030abcdef3 MACs: 0002c9bcdef1 0002c9bcdef2 VSD: n/a PSID: MT_1090120019Now the fw-ConnectX3-rel.bin image can be pre-burned to the flash. After the assembly, the device would be fully functional.