
On 1/8/25 15:03, Ibai Erkiaga wrote:
Current usage information for loads command is too verbose and long for a command usage prompt. This flag simplifies the text for readability purposes.
Signed-off-by: Ibai Erkiaga ibai.erkiaga-elorza@amd.com
The authentication and encryption flag naming is redundant with the description notes included. Use authflag and encflag names for the command pattern and use description lines for explanation.
New output looks like this: loads [dev] [address] [size] [authflag] [encflag] [Userkey address] Load device from memory buffer with secure bistream (authenticated/encrypted/both)(Xilinx only) -authflag: 0 for OCM, 1 for DDR, 2 for no authentication (specifies where to perform authentication) -encflag: 0 for device key, 1 for user key, 2 for no encryption -Userkey address: specifies the address where user key is stored when user key is selected NOTE: the secure bitstream has to be created using Xilinx bootgen tool only.
cmd/fpga.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/cmd/fpga.c b/cmd/fpga.c index cba38662958..cbcbe9c32f1 100644 --- a/cmd/fpga.c +++ b/cmd/fpga.c @@ -437,17 +437,11 @@ U_BOOT_CMD(fpga, 6, 1, do_fpga_wrapper, #endif #endif #if defined(CONFIG_CMD_FPGA_LOAD_SECURE)
" loads\t[dev] [address] [size] [auth-OCM-0/DDR-1/noauth-2]\n"
"\t[enc-devkey(0)/userkey(1)/nenc(2) [Userkey address]\n"
"\tLoads the secure bistreams(authenticated/encrypted/both\n"
"\tauthenticated and encrypted) of [size] from [address] (Xilinx only)\n"
"\t -The auth-OCM/DDR flag specifies to perform authentication\n"
"\tin OCM or in DDR. 0 for OCM, 1 for DDR, 2 for no authentication.\n"
"\t -The enc flag specifies which key to be used for decryption\n"
"\t0-device key, 1-user key, 2-no encryption.\n"
"\t -The optional Userkey address specifies from which address key\n"
"\thas to be used for decryption if user key is selected.\n"
"\tNOTE: the secure bitstream has to be created using Xilinx\n"
"\tbootgen tool only.\n"
" loads\t[dev] [address] [size] [authflag] [encflag] [Userkey address]\n"
"\tLoad device from memory buffer with secure bistream (authenticated/encrypted/both)(Xilinx only)\n"
"\t -authflag: 0 for OCM, 1 for DDR, 2 for no authentication (specifies where to perform authentication)\n"
"\t -encflag: 0 for device key, 1 for user key, 2 for no encryption\n"
"\t -Userkey address: specifies the address where user key is stored when user key is selected\n"
#endif );"\tNOTE: the secure bitstream has to be created using Xilinx bootgen tool only.\n"
When you are on this one I can't see any reason to state that this is Xilinx only. Pretty much CONFIG_CMD_FPGA_LOAD_SECURE should depends on FPGA_XILINX and then you don't need to state it in help. The same is for that Kconfig symbol.
CONFIG_CMD_FPGA_LOADFS CONFIG_CMD_FPGA_LOAD_SECURE and LOADB should have own symbol too which also depends on FPGA_XILINX.
Then you can remove Xilinx only from help too.
Thanks, Michal
diff --git a/cmd/Kconfig b/cmd/Kconfig index 4c4ad9d99799..89f0c162145c 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1178,8 +1178,8 @@ config CMD_FPGA_LOADBP a partial bitstream.
config CMD_FPGA_LOADFS - bool "fpga loadfs - load bitstream from FAT filesystem (Xilinx only)" - depends on CMD_FPGA + bool "fpga loadfs - load bitstream from FAT filesystem" + depends on CMD_FPGA && FPGA_XILINX help Supports loading an FPGA device from a FAT filesystem.
@@ -1198,7 +1198,7 @@ config CMD_FPGA_LOADP
config CMD_FPGA_LOAD_SECURE bool "fpga loads - loads secure bitstreams" - depends on CMD_FPGA + depends on CMD_FPGA && FPGA_XILINX select FPGA_LOAD_SECURE help Enables the fpga loads command which is used to load secure