Skip to content

Commit b47b67c

Browse files
authored
Merge pull request #691 from Mellanox/master_devel
Master devel 4.22
2 parents 3cc3b72 + 593fe14 commit b47b67c

File tree

132 files changed

+149824
-8839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+149824
-8839
lines changed

configure.ac

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131

3232
dnl Process this file with autoconf to produce a configure script.
3333

34-
AC_INIT(mstflint, 4.21.0, [email protected])
34+
AC_INIT(mstflint, 4.22.0, [email protected])
3535

3636
AC_DEFINE_UNQUOTED([PROJECT], ["mstflint"], [Define the project name.])
3737
AC_SUBST([PROJECT])
3838

39-
AC_DEFINE_UNQUOTED([VERSION], ["4.21.0"], [Define the project version.])
39+
AC_DEFINE_UNQUOTED([VERSION], ["4.22.0"], [Define the project version.])
4040
AC_SUBST([VERSION])
4141

4242
AC_CONFIG_MACRO_DIR([m4])
@@ -431,9 +431,11 @@ else
431431
AC_CONFIG_FILES(mtcr_ul/Makefile)
432432
fi
433433

434+
AM_CONDITIONAL(LINUX_BUILD, [test "x$OS" = "xLinux"])
435+
AC_SUBST(LINUX_BUILD)
434436

435437
AC_OUTPUT( Makefile common/Makefile mft_utils/Makefile mft_utils/hsmclient/Makefile mtcr_py/Makefile ext_libs/Makefile ext_libs/sqlite/Makefile ext_libs/muparser/Makefile ext_libs/json/Makefile ext_libs/minixz/Makefile dev_mgt/Makefile \
436438
tools_layouts/Makefile reg_access/Makefile cmdif/Makefile libmfa/Makefile pldmlib/Makefile tools_res_mgmt/Makefile mlxconfig/Makefile mlxconfig/mlxconfig_dbs/Makefile mflash/Makefile mlxfwops/Makefile mlxfwops/lib/Makefile cmdparser/Makefile \
437439
flint/Makefile small_utils/Makefile small_utils/mlxfwresetlib/Makefile mstdump/Makefile mstdump/crd_lib/Makefile mstdump/crd_main/Makefile mstdump/mstdump_dbs/Makefile mvpd/Makefile \
438-
fw_comps_mgr/Makefile mad_ifc/Makefile tracers/Makefile tracers/fwtrace/Makefile resourcedump/Makefile resourceparse/Makefile )
440+
fw_comps_mgr/Makefile mad_ifc/Makefile tracers/Makefile tracers/fwtrace/Makefile resourcedump/Makefile resourcedump/resourcedump_lib/Makefile resourceparse/Makefile )
439441

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
mstflint (4.22.0-1) unstable; urgency=low
2+
3+
* Updated from MFT-4.22.0
4+
5+
-- Alex Blago <[email protected]> Thu, 8 Sep 2022 00:00:00 +0000
6+
17
mstflint (4.21.0-1) unstable; urgency=low
28

39
* Updated from MFT-4.21.0

ext_libs/iniParser/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ You should consider trying the following rules too :
2929
## III - License
3030

3131
This software is released under MIT License.
32-
See LICENSE for full informations
32+
See LICENSE for full information
3333

3434
## IV - Versions
3535

ext_libs/iniParser/dictionary.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
This module implements a simple dictionary object, i.e. a list
88
of string/string associations. This object is useful to store e.g.
9-
informations retrieved from a configuration file (ini files).
9+
information retrieved from a configuration file (ini files).
1010
*/
1111
/*--------------------------------------------------------------------------*/
1212

ext_libs/iniParser/dictionary.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
This module implements a simple dictionary object, i.e. a list
99
of string/string associations. This object is useful to store e.g.
10-
informations retrieved from a configuration file (ini files).
10+
information retrieved from a configuration file (ini files).
1111
*/
1212
/*--------------------------------------------------------------------------*/
1313

ext_libs/iniParser/iniparser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ typedef enum _line_status_
3737
@param in String to convert.
3838
@param out Output buffer.
3939
@param len Size of the out buffer.
40-
@return ptr to the out buffer or NULL if an error occured.
40+
@return ptr to the out buffer or NULL if an error occurred.
4141
4242
This function convert a string into lowercase.
4343
At most len - 1 elements of the input string will be converted.

ext_libs/sqlite/sqlite3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109831,7 +109831,7 @@ static RenameToken *renameColumnTokenNext(RenameCtx *pCtx){
109831109831
}
109832109832

109833109833
/*
109834-
** An error occured while parsing or otherwise processing a database
109834+
** An error occurred while parsing or otherwise processing a database
109835109835
** object (either pParse->pNewTable, pNewIndex or pNewTrigger) as part of an
109836109836
** ALTER TABLE RENAME COLUMN program. The error message emitted by the
109837109837
** sub-routine is currently stored in pParse->zErrMsg. This function
@@ -214381,7 +214381,7 @@ static int sessionBindRow(
214381214381
** iterator pIter points to to the SELECT and attempts to seek to the table
214382214382
** entry. If a row is found, the SELECT statement left pointing at the row
214383214383
** and SQLITE_ROW is returned. Otherwise, if no row is found and no error
214384-
** has occured, the statement is reset and SQLITE_OK is returned. If an
214384+
** has occurred, the statement is reset and SQLITE_OK is returned. If an
214385214385
** error occurs, the statement is reset and an SQLite error code is returned.
214386214386
**
214387214387
** If this function returns SQLITE_ROW, the caller must eventually reset()

flint/cmd_line_parser.cpp

Lines changed: 39 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ SubCmdMetaData::SubCmdMetaData()
124124
_sCmds.push_back(new SubCmd("ir", "image_reactivation", SC_Image_Reactivation));
125125
_sCmds.push_back(new SubCmd("bc", "binary_compare", SC_Binary_Compare));
126126
_sCmds.push_back(new SubCmd("", "rsa_sign", SC_RSA_Sign));
127-
_sCmds.push_back(new SubCmd("", "import_hsm_key", SC_Import_Hsm_Key));
128127
_sCmds.push_back(new SubCmd("", "export_public_key", SC_Export_Public_Key));
129128
}
130129

@@ -232,11 +231,6 @@ FlagMetaData::FlagMetaData()
232231
_flags.push_back(new Flag("", "activate_delay_sec", 1));
233232
_flags.push_back(new Flag("", "downstream_device_ids", 1));
234233
_flags.push_back(new Flag("", "download_transfer", 0));
235-
#ifndef __WIN__
236-
_flags.push_back(new Flag("", "private_key_label", 1));
237-
_flags.push_back(new Flag("", "public_key_label", 1));
238-
_flags.push_back(new Flag("", "hsm", 0));
239-
#endif
240234
_flags.push_back(new Flag("", "openssl_engine", 1));
241235
_flags.push_back(new Flag("", "openssl_key_id", 1));
242236
#ifdef __WIN__
@@ -784,8 +778,6 @@ void Flint::initCmdParser()
784778

785779
AddOptions("ocr", ' ', "", "another flag for override cache replacement", true);
786780

787-
AddOptions("hsm", ' ', "", "flag for the sign command", true);
788-
789781
AddOptions("private_key", ' ', "<key_file>", "path to PEM formatted private key to be used by the sign command");
790782

791783
AddOptions("public_key", ' ', "<key_file>", "path to PEM formatted public key to be used by the sign command");
@@ -821,65 +813,61 @@ void Flint::initCmdParser()
821813
AddOptions("linkx_auto_update", ' ', "", "Use this flag while burning all cable devices connected to host.", false,
822814
false, 1);
823815

824-
AddOptions(
825-
"activate",
826-
' ',
827-
"",
828-
"Use this flag to apply the activation of all cable devices connected to host. By default, the activation is not performed.",
829-
false,
830-
false,
831-
1);
816+
AddOptions("activate",
817+
' ',
818+
"",
819+
"Use this flag to apply the activation of all cable devices connected to host. By default, the "
820+
"activation is not performed.",
821+
false,
822+
false,
823+
1);
832824

833825
AddOptions(
834826
"activate_delay_sec",
835827
' ',
836828
"<timeout in seconds>",
837-
"Use this flag to activate all cable devices connected to host with delay, acceptable values are between 0 and 255 (default - 1). Important: 'activate' flag must be set. This flag is relevant only for cable components.",
829+
"Use this flag to activate all cable devices connected to host with delay, acceptable values are between 0 and "
830+
"255 (default - 1). Important: 'activate' flag must be set. This flag is relevant only for cable components.",
838831
false,
839832
false,
840833
1);
841834

842-
AddOptions(
843-
"download_transfer",
844-
' ',
845-
"",
846-
"Use this flag to perform the download and transfer of all cable data for cables. By default, the download and transfer are not performed . This flag is relevant only for cable components.",
847-
false,
848-
false,
849-
1);
850-
851-
AddOptions(
852-
"downstream_device_ids",
853-
' ',
854-
"<list of ports>",
855-
"Use this flag to specify the LNKX ports to perform query. List must be only comma-separated numbers, without spaces.",
856-
false,
857-
false,
858-
1);
835+
AddOptions("download_transfer",
836+
' ',
837+
"",
838+
"Use this flag to perform the download and transfer of all cable data for cables. By default, the "
839+
"download and transfer are not performed . This flag is relevant only for cable components.",
840+
false,
841+
false,
842+
1);
859843

860-
#ifndef __WIN__
861-
AddOptions("public_key_label", ' ', "<string>", "public key label to be used by the sign --hsm command");
844+
AddOptions("downstream_device_ids",
845+
' ',
846+
"<list of ports>",
847+
"Use this flag to specify the LNKX ports to perform query. List must be only comma-separated numbers, "
848+
"without spaces.",
849+
false,
850+
false,
851+
1);
862852

863-
AddOptions("private_key_label", ' ', "<string>", "private key label to be used by the sign --hsm command");
864-
#endif
865853
AddOptions(
866854
"openssl_engine",
867855
' ',
868856
"<string>",
869857
"Name of the OpenSSL engine to used by the sign/rsa_sign commands to work with the HSM hardware via OpenSSL API");
870-
AddOptions(
871-
"openssl_key_id",
872-
' ',
873-
"<string>",
874-
"Key identification string to be used by the sign/rsa_sign commands to work with the HSM hardware via OpenSSL API");
858+
AddOptions("openssl_key_id",
859+
' ',
860+
"<string>",
861+
"Key identification string to be used by the sign/rsa_sign commands to work with the HSM hardware via "
862+
"OpenSSL API");
875863
AddOptions("output_file", ' ', "<string>", "output file name for exporting the public key from PEM/BIN");
876864
AddOptions("user_password", ' ', "<string>", "the HSM user password string in order to work with HSM device");
877865
#ifdef __WIN__
878-
AddOptions(
879-
"cpu_util",
880-
' ',
881-
"<CPU_UTIL>",
882-
"Use this flag to reduce CPU utilization while burning, Windows only. Legal values are from 1 (lowest CPU) to 5 (highest CPU)");
866+
AddOptions("cpu_util",
867+
' ',
868+
"<CPU_UTIL>",
869+
"Use this flag to reduce CPU utilization while burning, Windows only. Legal values are from 1 (lowest "
870+
"CPU) to 5 (highest CPU)");
883871
#endif
884872
AddOptions(
885873
"cert_chain_index",
@@ -906,9 +894,9 @@ void Flint::initCmdParser()
906894

907895
AddOptionalSectionData("RETURN VALUES", "0", "Successful completion.");
908896
AddOptionalSectionData("RETURN VALUES", "1", "An error has occurred.");
909-
AddOptionalSectionData(
910-
"RETURN VALUES", "7",
911-
"For burn command - burning new firmware option was not chosen by the user when prompted, thus the firmware burning process was aborted.");
897+
AddOptionalSectionData("RETURN VALUES", "7",
898+
"For burn command - burning new firmware option was not chosen by the user when prompted, "
899+
"thus the firmware burning process was aborted.");
912900

913901
for (map_sub_cmd_t_to_subcommand::iterator it = _subcommands.begin(); it != _subcommands.end(); it++)
914902
{
@@ -1207,17 +1195,14 @@ ParseStatus Flint::HandleOption(string name, string value)
12071195
}
12081196
else if (name == "private_key")
12091197
{
1210-
_flintParams.privkey_specified = true;
12111198
_flintParams.privkey_file = value;
12121199
}
12131200
else if (name == "public_key")
12141201
{
1215-
_flintParams.pubkey_specified = true;
12161202
_flintParams.pubkey_file = value;
12171203
}
12181204
else if (name == "key_uuid")
12191205
{
1220-
_flintParams.uuid_specified = true;
12211206
_flintParams.privkey_uuid = value;
12221207
}
12231208
else if (name == "hmac_key")
@@ -1263,10 +1248,6 @@ ParseStatus Flint::HandleOption(string name, string value)
12631248
}
12641249
_flintParams.cpu_percent = (int)cpu_percent;
12651250
}
1266-
else if (name == "hsm")
1267-
{
1268-
_flintParams.hsm_specified = true;
1269-
}
12701251
else if (name == "openssl_engine")
12711252
{
12721253
_flintParams.openssl_engine_usage_specified = true;
@@ -1277,16 +1258,6 @@ ParseStatus Flint::HandleOption(string name, string value)
12771258
_flintParams.openssl_engine_usage_specified = true;
12781259
_flintParams.openssl_key_id = value;
12791260
}
1280-
else if (name == "private_key_label")
1281-
{
1282-
_flintParams.private_key_label_specified = true;
1283-
_flintParams.private_key_label = value;
1284-
}
1285-
else if (name == "public_key_label")
1286-
{
1287-
_flintParams.public_key_label_specified = true;
1288-
_flintParams.public_key_label = value;
1289-
}
12901261
else if (name == "output_file")
12911262
{
12921263
_flintParams.output_file_specified = true;

flint/err_msgs.h

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ typedef enum
5959
#define FLINT_CLEAR_SEM_CMD_ERROR "No command is allowed when -clear_semaphore flag is given.\n"
6060
#define FLINT_COMMAND_FLAGS_ERROR "For %s command, Please specify %s.\n"
6161
#define FLINT_COMMAND_INCORRECT_FLAGS_ERROR "For %s command, %s.\n"
62-
#define FLINT_PARSE_MEM_ERROR "Failed to allocate memory for parsing.\n "
6362
#define FLINT_NO_OPTIONS_FOUND_ERROR "No options found. "
6463
#define FLINT_INVALID_COMMAD_ERROR "Invalid command: %s\n"
6564
#define FLINT_TOO_MANY_ARGS_ERROR "Too many arguments. Expected: %d , Received: %d\n"
@@ -85,8 +84,9 @@ typedef enum
8584
#define FLINT_INVALID_FLAG_WITHOUT_FLAG_ERROR "\"%s\" flag must be specified with \"%s\" flag.\n"
8685
#define FLINT_INVALID_FLAG_WITH_CMD_ERROR "Cannot specify flag: %s with Command: %s\n"
8786
#define FLINT_CMD_VERIFY_ERROR "FW image verification failed: %s. AN HCA DEVICE CAN NOT BOOT FROM THIS IMAGE.\n"
88-
#define FLINT_CMD_VERIFY_ERROR_1 \
89-
"FW image verification failed: No valid FS4 image found.Check the flash parameters, if specified..AN HCA DEVICE CAN NOT BOOT FROM THIS IMAGE"
87+
#define FLINT_CMD_VERIFY_ERROR_1 \
88+
"FW image verification failed: No valid FS4 image found.Check the flash parameters, if specified..AN HCA DEVICE " \
89+
"CAN NOT BOOT FROM THIS IMAGE"
9090
#define FLINT_FAILED_QUERY_ERROR "Failed to query %s: %s. %s\n"
9191
#define FLINT_COMMAND_DEVICE_IMAGE_ERROR "Command \"%s\" requires both image and device to be specified.\n"
9292
#define FLINT_COMMAND_DEVICE_ERROR "Command \"%s\" requires device, but an image file was given.\n"
@@ -109,7 +109,6 @@ typedef enum
109109
#define FLINT_IMAGE_READ_ERROR "Failed to read image. %s\n"
110110
#define FLINT_READ_ERROR "Failed to read from %s. %s\n"
111111
#define FLINT_READ_FILE_ERROR "Failed to read from %s.\n"
112-
#define FLINT_WIN_NOT_SUPP_ERROR "Command \"%s\" is not supported in windows.\n"
113112
#define FLINT_WIN_ONLY_SUPP_ERROR "Command \"%s\" is supported only in windows.\n"
114113
#define FLINT_GEN_COMMAND_ERROR "Failed to execute command %s. %s\n"
115114
#define FLINT_FS3_BB_ERROR \
@@ -138,14 +137,12 @@ typedef enum
138137
#define FLINT_WB_FILE_ERROR "failed to open file: %s. %s\n"
139138
#define FLINT_WB_ERROR "write Block Failed. %s\n"
140139
#define FLINT_NO_ZLIB_ERROR "Executable was compiled with \"dump files\" option disabled.\n"
141-
#define FLINT_FLAG_WITH_FLAG_ERROR "\"%s\" flag must be specified with \"%s\" flag.\n"
142140
#define FLINT_INVALID_PASSWORD "Invalid Password.\n"
143141
#define FLINT_NO_GUID_MAC_FLAGS_ERROR "Can not set GUIDs/MACs: please run with -uid/-guid/-mac flag.\n"
144142
#define FLINT_NOT_SUPP_UID_FLAG_ERROR \
145143
"Can not set GUIDs/MACs: %s flag is not supported for this device.\nPlease run with -uid/-guid/-mac flag.\n"
146144
#define FLINT_NO_UID_FLAG_ERROR "Can not set GUIDs/MACs: uid is not specified, please run with -uid flag.\n"
147145
#define FLINT_CHECKSUM_ERROR "Failed to calculate checksum on %s: %s\n"
148-
#define FLINT_CHECKSUM_MISMATCH_ERROR "Given checksum: %s does not match the checksum calculated on device FW: %s.\n"
149146
#define FLINT_CHECKSUM_PARSE_ERROR "Failed to parse given checksum.\n"
150147
#define FLINT_CHECKSUM_LEN_ERROR "MD5 checksum should be exactly 16 bytes long.\n"
151148
#define FLINT_CHECKSUM_HEX_ERROR "MD5 checksum should contain only hexadecimal digits.\n"
@@ -169,34 +166,21 @@ typedef enum
169166
#define UNCOMPRESSS_ERROR "Failed uncompressing FW configuration section. uncompress returns %d"
170167
#define OPEN_WRITE_FILE_ERROR "Can not open file %s for write: %s."
171168
#define IMAGE_SIGN_TYPE_ERROR "Image signing is applicable only for selected FW images. Please check your image type.\n"
172-
#define HSM_INIT_ERROR "HSM init has failed! Please check if the HSM card installed and configured properly.\n"
173-
#define HSM_PRIVATE_KEY_DUPLICATE "Creating HSM signature has failed - the private key label is duplicated.\n"
174-
#define HSM_PUBLIC_KEY_DUPLICATE "Creating HSM signature has failed - the public key label is duplicated.\n"
175-
#define HSM_SIGNATURE_CREATION_FAILED "Creating HSM signature has failed\n"
176-
#define HSM_UUID_MISSING "To Sign the image with RSA you must provide UUID with HSM sign.\n"
177-
#define HSM_PRIVATE_KEY_LABEL_MISSING "Must supply private key label for sign with HSM sign.\n"
178-
#define HSM_PASSWORD_MISSING "Must supply HSM user password for sign with HSM sign.\n"
179169
#define SIGN_PRIVATE_KEY_NOT_FOUND "Can't find private key file %s \n"
180170
#define SIGN_PUBLIC_KEY_NOT_FOUND "Can't find public key file %s \n"
181-
#define HSM_BOOT_SIGNATURE_CREATION_FAILED "Creating HSM BOOT signature has failed\n"
182-
#define HSM_CRITICAL_SIGNATURE_CREATION_FAILED "Creating HSM critical signature has failed\n"
183-
#define HSM_NON_CRITICAL_SIGNATURE_CREATION_FAILED "Creating HSM non-critical signature has failed\n"
184-
#define HSM_SECURE_BOOT_SIGNATURE_FAILED "Inserting secure BOOT signatures has failed : %s.\n"
185-
#define HSM_SECURE_FW_SIGNATURE_FAILED "Creation secured FW signatures has failed.\n"
186171
#define LINKX_QUERY_DEVICE_NOT_SUPPORTED "Linkx query for device %s is not supported.\n"
187172
#define LINKX_BURN_DEVICE_NOT_SUPPORTED "Linkx burn for device %s is not supported.\n"
188173
/**************************
189174
* Flint Warning Messages
190175
*************************/
191-
#define FLINT_QQ_WARRNING "-W- Running quick query - Skipping full image integrity checks.\n"
192176
#define FLINT_NOT_MLNX_FW_WARNING "-W- Not a Mellanox FW image (vendor_id = 0x%04x). VSD and PSID are not displayed.\n"
193177
#define FLINT_BLANK_GUIDS_WARNING "-W- GUIDs/MACs values and their CRC are not set.\n"
194178
#define FLINT_MULTI_BIT_WARNING "Multicast bit (bit 40) is set."
195179
#define FLINT_MORE_48_BITS_WARNING "More than 48 bits are used."
196180
#define FLINT_BAD_MAC_ADRESS_WARNING "\n-W- Bad mac address ( %4.4x%8.8x ): %s\n"
197-
#define FLINT_MAC_ENTRIES_WARNING \
198-
"-W- Cannot get MAC address: Expecting %d entries in guid section, got %d. Probably an old FW image. Please update.\n"
199-
#define FLINT_INTERRUPT_WARRNING "\n-W- An internal error occurred. This program cannot be interrupted.\n"
181+
#define FLINT_MAC_ENTRIES_WARNING \
182+
"-W- Cannot get MAC address: Expecting %d entries in guid section, got %d. Probably an old FW image. Please " \
183+
"update.\n"
200184
#define FLINT_SET_GUIDS_WARRNING "-W- GUIDs are already set, re-burning image with the new GUIDs ...\n"
201185
#define FLINT_OCR_WARRNING \
202186
"\n-W- Firmware flash cache access is enabled. Running in this mode may cause the firmware to hang.\n"

flint/flint.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ map_sub_cmd_t_to_subcommand Flint::initSubcommandMap()
185185
cmdMap[SC_Image_Reactivation] = new ImageReactivationSubCommand();
186186
cmdMap[SC_RSA_Sign] = new SignRSASubCommand();
187187
cmdMap[SC_Binary_Compare] = new BinaryCompareSubCommand();
188-
cmdMap[SC_Import_Hsm_Key] = new ImportHsmKeySubCommand();
189188
#ifndef NO_OPEN_SSL
190189
cmdMap[SC_Export_Public_Key] = new ExportPublicSubCommand();
191190
#endif
@@ -271,7 +270,7 @@ FlintStatus Flint::run(int argc, char* argv[])
271270
if (_subcommands.count(_flintParams.cmd) == 0)
272271
{
273272
// should not be reached
274-
printf("-E- FATAL: command object not found.");
273+
printf("-E- FATAL: command object not found.\n");
275274
return FLINT_FAILED;
276275
}
277276
_subcommands[_flintParams.cmd]->setParams(_flintParams);

0 commit comments

Comments
 (0)