Skip to content

Commit 921e2f3

Browse files
authored
Merge pull request #284 from elezar/allow-firmware-opt-out
Add no-gsp-firmware-option to skip injection of GSP firmware
2 parents 6dcb29b + ce8844f commit 921e2f3

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

src/cli/configure.c

+5
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const struct argp configure_usage = {
3535
{"no-devbind", 0x85, NULL, 0, "Don't bind mount devices", -1},
3636
{"no-persistenced", 0x86, NULL, 0, "Don't include the NVIDIA persistenced socket", -1},
3737
{"no-fabricmanager", 0x87, NULL, 0, "Don't include the NVIDIA fabricmanager socket", -1},
38+
{"no-gsp-firmware", 0x88, NULL, 0, "Don't include GSP Firmware", -1},
3839
{0},
3940
},
4041
configure_parser,
@@ -160,6 +161,10 @@ configure_parser(int key, char *arg, struct argp_state *state)
160161
if (str_join(&err, &ctx->driver_opts, "no-fabricmanager", " ") < 0)
161162
goto fatal;
162163
break;
164+
case 0x88:
165+
if (str_join(&err, &ctx->driver_opts, "no-gsp-firmware", " ") < 0)
166+
goto fatal;
167+
break;
163168
case ARGP_KEY_ARG:
164169
if (state->arg_num > 0)
165170
argp_usage(state);

src/cli/list.c

+6
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const struct argp list_usage = {
2424
{"imex-channel", 0x83, "CHANNEL", 0, "IMEX channel ID(s) to inject", -1},
2525
{"no-persistenced", 0x84, NULL, 0, "Don't include the NVIDIA persistenced socket", -1},
2626
{"no-fabricmanager", 0x85, NULL, 0, "Don't include the NVIDIA fabricmanager socket", -1},
27+
{"no-gsp-firmware", 0x86, NULL, 0, "Don't include GSP Firmware", -1},
2728
{0},
2829
},
2930
list_parser,
@@ -80,6 +81,11 @@ list_parser(int key, char *arg, struct argp_state *state)
8081
if (str_join(&err, &ctx->driver_opts, "no-fabricmanager", " ") < 0)
8182
goto fatal;
8283
break;
84+
case 0x86:
85+
if (str_join(&err, &ctx->driver_opts, "no-gsp-firmware", " ") < 0)
86+
goto fatal;
87+
ctx->list_firmwares = false;
88+
break;
8389
case ARGP_KEY_END:
8490
if (state->argc == 1 || (state->argc == 2 && ctx->imex_channels != NULL)) {
8591
if ((ctx->devices = xstrdup(&err, "all")) == NULL)

src/nvc_info.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,11 @@ lookup_paths(struct error *err, struct dxcore_context *dxcore, struct nvc_driver
366366
return (-1);
367367
}
368368

369-
if (lookup_firmwares(err, dxcore, info, root, flags) < 0) {
370-
log_err("error looking up additional paths");
371-
return (-1);
369+
if (!(flags & OPT_NO_GSP_FIRMWARE)) {
370+
if (lookup_firmwares(err, dxcore, info, root, flags) < 0) {
371+
log_err("error looking up additional paths");
372+
return (-1);
373+
}
372374
}
373375

374376
return (0);

src/options.h

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ enum {
3333
OPT_NO_MPS = 1 << 3,
3434
OPT_NO_PERSISTENCED = 1 << 4,
3535
OPT_NO_FABRICMANAGER = 1 << 5,
36+
OPT_NO_GSP_FIRMWARE = 1 << 6,
3637
};
3738

3839
static const struct option driver_opts[] = {
@@ -42,6 +43,7 @@ static const struct option driver_opts[] = {
4243
{"no-mps", OPT_NO_MPS},
4344
{"no-persistenced", OPT_NO_PERSISTENCED},
4445
{"no-fabricmanager", OPT_NO_FABRICMANAGER},
46+
{"no-gsp-firmware", OPT_NO_GSP_FIRMWARE},
4547
};
4648

4749
static const char * const default_driver_opts = "";

0 commit comments

Comments
 (0)