1
0
Fork 0
mirror of https://github.com/u-boot/u-boot.git synced 2025-04-22 04:44:46 +00:00

cmd: Convert existing long help messages to the new macro

- Generally we just drop the #ifdef CONFIG_SYS_LONGHELP and endif lines
  and use U_BOOT_LONGHELP to declare the same variable name as before
- In a few places, either rename the variable to follow convention or
  introduce the variable as it was being done inline before.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Tom Rini 2023-10-07 15:13:08 -04:00
parent dec5777fff
commit 3616218b5a
61 changed files with 138 additions and 259 deletions

View file

@ -1561,8 +1561,7 @@ usage:
return CMD_RET_USAGE; return CMD_RET_USAGE;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(nandbcb,
static char nandbcb_help_text[] =
"init addr off|partition len - update 'len' bytes starting at\n" "init addr off|partition len - update 'len' bytes starting at\n"
" 'off|part' to memory address 'addr', skipping bad blocks\n" " 'off|part' to memory address 'addr', skipping bad blocks\n"
"nandbcb bcbonly off|partition fw1-off fw1-size [fw2-off fw2-size]\n" "nandbcb bcbonly off|partition fw1-off fw1-size [fw2-off fw2-size]\n"
@ -1572,8 +1571,7 @@ static char nandbcb_help_text[] =
" FIY, BCB isn't erased automatically, so mtd erase should\n" " FIY, BCB isn't erased automatically, so mtd erase should\n"
" be called in advance before writing new BCB:\n" " be called in advance before writing new BCB:\n"
" > mtd erase mx7-bcb\n" " > mtd erase mx7-bcb\n"
"nandbcb dump off|partition - dump/verify boot structures\n"; "nandbcb dump off|partition - dump/verify boot structures\n");
#endif
U_BOOT_CMD(nandbcb, 7, 1, do_nandbcb, U_BOOT_CMD(nandbcb, 7, 1, do_nandbcb,
"i.MX NAND Boot Control Blocks write", "i.MX NAND Boot Control Blocks write",

View file

@ -234,15 +234,13 @@ int pixis_reset_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(pixis,
static char pixis_help_text[] =
"- hard reset to default bank\n" "- hard reset to default bank\n"
"pixis_reset altbank - reset to alternate bank\n" "pixis_reset altbank - reset to alternate bank\n"
#ifdef DEBUG #ifdef DEBUG
"pixis_reset dump - display the PIXIS registers\n" "pixis_reset dump - display the PIXIS registers\n"
#endif #endif
"pixis_reset sysclk <SYSCLK_freq> - reset with SYSCLK frequency(KHz)\n"; "pixis_reset sysclk <SYSCLK_freq> - reset with SYSCLK frequency(KHz)\n");
#endif
U_BOOT_CMD( U_BOOT_CMD(
pixis_reset, CONFIG_SYS_MAXARGS, 1, pixis_reset_cmd, pixis_reset, CONFIG_SYS_MAXARGS, 1, pixis_reset_cmd,

View file

@ -624,8 +624,7 @@ unsigned int get_cpu_board_revision(void)
} }
#endif #endif
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(mac,
static char booti_help_text[] =
"[read|save|id|num|errata|date|ports|port_number]\n" "[read|save|id|num|errata|date|ports|port_number]\n"
"mac read\n" "mac read\n"
" - read EEPROM content into memory data structure\n" " - read EEPROM content into memory data structure\n"
@ -642,12 +641,9 @@ static char booti_help_text[] =
"mac ports N\n" "mac ports N\n"
" - program the number of network ports to integer N\n" " - program the number of network ports to integer N\n"
"mac X string\n" "mac X string\n"
" - program MAC addr for port X [X=0,1..] to colon separated string"; " - program MAC addr for port X [X=0,1..] to colon separated string");
#else
"";
#endif
U_BOOT_CMD( U_BOOT_CMD(
mac, 3, 1, do_mac, mac, 3, 1, do_mac,
"display and program the system ID and MAC addresses in EEPROM", "display and program the system ID and MAC addresses in EEPROM",
booti_help_text); mac_help_text);

View file

@ -552,10 +552,7 @@ u8 get_pcb_revision_from_eeprom(void)
return be.pcb_revision; return be.pcb_revision;
} }
#ifndef CONFIG_SPL_BUILD U_BOOT_LONGHELP(mac,
#ifdef CONFIG_SYS_LONGHELP
static char booti_help_text[] =
"- displays memory copy of EEPROM\n" "- displays memory copy of EEPROM\n"
"mac read_eeprom - reads EEPROM into memory\n" "mac read_eeprom - reads EEPROM into memory\n"
"mac initialize - initializes memory copy with magic number\n" "mac initialize - initializes memory copy with magic number\n"
@ -564,14 +561,9 @@ static char booti_help_text[] =
"mac_address <addr> - sets MAC address in memory\n" "mac_address <addr> - sets MAC address in memory\n"
"mac pcb_revision <rev> - sets PCB revision in memory\n" "mac pcb_revision <rev> - sets PCB revision in memory\n"
"mac bom_variant <var> - sets BOM variant in memory\n" "mac bom_variant <var> - sets BOM variant in memory\n"
"mac bom_revision <rev> - sets BOM revision in memory\n"; "mac bom_revision <rev> - sets BOM revision in memory\n");
#else
"";
#endif
U_BOOT_CMD( U_BOOT_CMD(
mac, 3, 1, do_mac, mac, 3, 1, do_mac,
"display and program the board revision and MAC address in EEPROM", "display and program the board revision and MAC address in EEPROM",
booti_help_text); mac_help_text);
#endif /* CONFIG_SPL_BUILD */

View file

@ -541,10 +541,7 @@ u32 get_ddr_size_from_eeprom(void)
return hextoul(&pbuf.eeprom.atom1.data.pstr[14], NULL); return hextoul(&pbuf.eeprom.atom1.data.pstr[14], NULL);
} }
#ifndef CONFIG_SPL_BUILD U_BOOT_LONGHELP(mac,
#ifdef CONFIG_SYS_LONGHELP
static char booti_help_text[] =
"\n" "\n"
" - display EEPROM content\n" " - display EEPROM content\n"
"mac read_eeprom\n" "mac read_eeprom\n"
@ -564,14 +561,9 @@ static char booti_help_text[] =
"mac bom_revision <A>\n" "mac bom_revision <A>\n"
" - stores a StarFive BOM revision into the local EEPROM copy\n" " - stores a StarFive BOM revision into the local EEPROM copy\n"
"mac product_id <VF7110A1-2228-D008E000-xxxxxxxx>\n" "mac product_id <VF7110A1-2228-D008E000-xxxxxxxx>\n"
" - stores a StarFive product ID into the local EEPROM copy\n"; " - stores a StarFive product ID into the local EEPROM copy\n");
#else
"";
#endif
U_BOOT_CMD( U_BOOT_CMD(
mac, 3, 1, do_mac, mac, 3, 1, do_mac,
"display and program the board revision and MAC address in EEPROM", "display and program the board revision and MAC address in EEPROM",
booti_help_text); mac_help_text);
#endif /* CONFIG_SPL_BUILD */

View file

@ -293,12 +293,10 @@ static int do_max6957aax(struct cmd_tbl *cmdtp, int flag, int argc,
return 1; return 1;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(max6957aax,
static char max6957aax_help_text[] =
"max6957aax - write or read display register:\n" "max6957aax - write or read display register:\n"
"\tmax6957aax R|r reg - read display register;\n" "\tmax6957aax R|r reg - read display register;\n"
"\tmax6957aax reg val - write display register."; "\tmax6957aax reg val - write display register.");
#endif
U_BOOT_CMD( U_BOOT_CMD(
max6957aax, 6, 1, do_max6957aax, max6957aax, 6, 1, do_max6957aax,
@ -337,13 +335,11 @@ static int do_hd44780(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(hd44780,
static char hd44780_help_text[] =
"hd44780 - control LCD driver:\n" "hd44780 - control LCD driver:\n"
"\thd44780 cmd <val> - send command <val> to driver;\n" "\thd44780 cmd <val> - send command <val> to driver;\n"
"\thd44780 data <val> - send data <val> to driver;\n" "\thd44780 data <val> - send data <val> to driver;\n"
"\thd44780 str \"<text>\" - send \"<text>\" to driver."; "\thd44780 str \"<text>\" - send \"<text>\" to driver.");
#endif
U_BOOT_CMD( U_BOOT_CMD(
hd44780, 6, 1, do_hd44780, hd44780, 6, 1, do_hd44780,

View file

@ -72,17 +72,14 @@ static int do_fru(struct cmd_tbl *cmdtp, int flag, int argc,
} }
/***************************************************/ /***************************************************/
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(fru,
static char fru_help_text[] =
"capture <addr> - Parse and capture FRU table present at address.\n" "capture <addr> - Parse and capture FRU table present at address.\n"
"fru display - Displays content of FRU table that was captured using\n" "fru display - Displays content of FRU table that was captured using\n"
" fru capture command\n" " fru capture command\n"
"fru board_gen <addr> <manufacturer> <board name> <serial number>\n" "fru board_gen <addr> <manufacturer> <board name> <serial number>\n"
" <part number> <revision> - Generate FRU format with\n" " <part number> <revision> - Generate FRU format with\n"
" board info area filled based on parameters. <addr> is\n" " board info area filled based on parameters. <addr> is\n"
" pointing to place where FRU is generated.\n" " pointing to place where FRU is generated.\n");
;
#endif
U_BOOT_CMD( U_BOOT_CMD(
fru, 8, 1, do_fru, fru, 8, 1, do_fru,

View file

@ -91,12 +91,9 @@ static int do_versal(struct cmd_tbl *cmdtp, int flag, int argc,
return cmd_process_error(c, ret); return cmd_process_error(c, ret);
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(versal,
static char versal_help_text[] =
"loadpdi addr len - Load pdi image\n" "loadpdi addr len - Load pdi image\n"
"load pdi image at ddr address 'addr' with pdi image size 'len'\n" "load pdi image at ddr address 'addr' with pdi image size 'len'\n");
;
#endif
U_BOOT_CMD(versal, 4, 1, do_versal, U_BOOT_CMD(versal, 4, 1, do_versal,
"versal sub-system", "versal sub-system",

View file

@ -527,8 +527,7 @@ static int do_zynq(struct cmd_tbl *cmdtp, int flag, int argc,
return cmd_process_error(zynq_cmd, ret); return cmd_process_error(zynq_cmd, ret);
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(zynq,
static char zynq_help_text[] =
"" ""
#ifdef CONFIG_CMD_ZYNQ_RSA #ifdef CONFIG_CMD_ZYNQ_RSA
"rsa <baseaddr> - Verifies the authenticated and encrypted\n" "rsa <baseaddr> - Verifies the authenticated and encrypted\n"
@ -545,8 +544,7 @@ static char zynq_help_text[] =
" if operation type is load or loadp, it loads the encrypted\n" " if operation type is load or loadp, it loads the encrypted\n"
" full or partial bitstream on to PL respectively.\n" " full or partial bitstream on to PL respectively.\n"
#endif #endif
; );
#endif
U_BOOT_CMD(zynq, 6, 0, do_zynq, U_BOOT_CMD(zynq, 6, 0, do_zynq,
"Zynq specific commands", zynq_help_text "Zynq specific commands", zynq_help_text

View file

@ -381,8 +381,7 @@ static int do_zynqmp(struct cmd_tbl *cmdtp, int flag, int argc,
} }
/***************************************************/ /***************************************************/
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(zynqmp,
static char zynqmp_help_text[] =
"secure src len [key_addr] - verifies secure images of $len bytes\n" "secure src len [key_addr] - verifies secure images of $len bytes\n"
" long at address $src. Optional key_addr\n" " long at address $src. Optional key_addr\n"
" can be specified if user key needs to\n" " can be specified if user key needs to\n"
@ -422,8 +421,7 @@ static char zynqmp_help_text[] =
" 48 bytes hash value into srcaddr\n" " 48 bytes hash value into srcaddr\n"
" Optional key_addr can be specified for saving sha3 hash value\n" " Optional key_addr can be specified for saving sha3 hash value\n"
" Note: srcaddr/srclen should not be 0\n" " Note: srcaddr/srclen should not be 0\n"
; );
#endif
U_BOOT_CMD( U_BOOT_CMD(
zynqmp, 9, 1, do_zynqmp, zynqmp, 9, 1, do_zynqmp,

View file

@ -171,13 +171,11 @@ static int do_acpi_dump(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(acpi,
static char acpi_help_text[] =
"list - list ACPI tables\n" "list - list ACPI tables\n"
"acpi items [-d] - List/dump each piece of ACPI data from devices\n" "acpi items [-d] - List/dump each piece of ACPI data from devices\n"
"acpi set [<addr>] - Set or show address of ACPI tables\n" "acpi set [<addr>] - Set or show address of ACPI tables\n"
"acpi dump <name> - Dump ACPI table"; "acpi dump <name> - Dump ACPI table");
#endif
U_BOOT_CMD_WITH_SUBCMDS(acpi, "ACPI tables", acpi_help_text, U_BOOT_CMD_WITH_SUBCMDS(acpi, "ACPI tables", acpi_help_text,
U_BOOT_SUBCMD_MKENT(list, 1, 1, do_acpi_list), U_BOOT_SUBCMD_MKENT(list, 1, 1, do_acpi_list),

View file

@ -88,8 +88,7 @@ static int do_aes(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
} }
/***************************************************/ /***************************************************/
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(aes,
static char aes_help_text[] =
"[.128,.192,.256] enc key iv src dst len - Encrypt block of data $len bytes long\n" "[.128,.192,.256] enc key iv src dst len - Encrypt block of data $len bytes long\n"
" at address $src using a key at address\n" " at address $src using a key at address\n"
" $key with initialization vector at address\n" " $key with initialization vector at address\n"
@ -101,8 +100,7 @@ static char aes_help_text[] =
" $key with initialization vector at address\n" " $key with initialization vector at address\n"
" $iv. Store the result at address $dst.\n" " $iv. Store the result at address $dst.\n"
" The $len size must be multiple of 16 bytes.\n" " The $len size must be multiple of 16 bytes.\n"
" The $key and $iv must be 16 bytes long."; " The $key and $iv must be 16 bytes long.");
#endif
U_BOOT_CMD( U_BOOT_CMD(
aes, 7, 1, do_aes, aes, 7, 1, do_aes,

View file

@ -188,13 +188,13 @@ static int do_ffa_devlist(struct cmd_tbl *cmdtp, int flag, int argc, char *const
return CMD_RET_SUCCESS; return CMD_RET_SUCCESS;
} }
static char armffa_help_text[] = U_BOOT_LONGHELP(armffa,
"getpart <partition UUID>\n" "getpart <partition UUID>\n"
" - lists the partition(s) info\n" " - lists the partition(s) info\n"
"ping <partition ID>\n" "ping <partition ID>\n"
" - sends a data pattern to the specified partition\n" " - sends a data pattern to the specified partition\n"
"devlist\n" "devlist\n"
" - displays information about the FF-A device/driver\n"; " - displays information about the FF-A device/driver\n");
U_BOOT_CMD_WITH_SUBCMDS(armffa, "Arm FF-A test command", armffa_help_text, U_BOOT_CMD_WITH_SUBCMDS(armffa, "Arm FF-A test command", armffa_help_text,
U_BOOT_SUBCMD_MKENT(getpart, 2, 1, do_ffa_getpart), U_BOOT_SUBCMD_MKENT(getpart, 2, 1, do_ffa_getpart),

View file

@ -344,11 +344,11 @@ static int do_ihs_axi(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_USAGE; return CMD_RET_USAGE;
} }
static char axi_help_text[] = U_BOOT_LONGHELP(axi,
"bus - show AXI bus info\n" "bus - show AXI bus info\n"
"axi dev [bus] - show or set current AXI bus to bus number [bus]\n" "axi dev [bus] - show or set current AXI bus to bus number [bus]\n"
"axi md size addr [# of objects] - read from AXI device at address [addr] and data width [size] (one of 8, 16, 32)\n" "axi md size addr [# of objects] - read from AXI device at address [addr] and data width [size] (one of 8, 16, 32)\n"
"axi mw size addr value [count] - write data [value] to AXI device at address [addr] and data width [size] (one of 8, 16, 32)\n"; "axi mw size addr value [count] - write data [value] to AXI device at address [addr] and data width [size] (one of 8, 16, 32)\n");
U_BOOT_CMD(axi, 7, 1, do_ihs_axi, U_BOOT_CMD(axi, 7, 1, do_ihs_axi,
"AXI sub-system", "AXI sub-system",

View file

@ -29,11 +29,9 @@ static int do_bloblist_list(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(bloblist,
static char bloblist_help_text[] =
"info - show information about the bloblist\n" "info - show information about the bloblist\n"
"bloblist list - list blobs in the bloblist"; "bloblist list - list blobs in the bloblist");
#endif
U_BOOT_CMD_WITH_SUBCMDS(bloblist, "Bloblists", bloblist_help_text, U_BOOT_CMD_WITH_SUBCMDS(bloblist, "Bloblists", bloblist_help_text,
U_BOOT_SUBCMD_MKENT(info, 1, 1, do_bloblist_info), U_BOOT_SUBCMD_MKENT(info, 1, 1, do_bloblist_info),

View file

@ -46,16 +46,11 @@ static int do_bootcount(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_USAGE; return CMD_RET_USAGE;
} }
#if IS_ENABLED(CONFIG_SYS_LONGHELP) U_BOOT_LONGHELP(bootcount,
static char bootcount_help_text[] =
"print - print current bootcounter\n" "print - print current bootcounter\n"
"reset - reset the bootcounter" "reset - reset the bootcounter");
;
#endif
U_BOOT_CMD(bootcount, 2, 1, do_bootcount, U_BOOT_CMD(bootcount, 2, 1, do_bootcount,
"bootcount", "bootcount",
#if IS_ENABLED(CONFIG_SYS_LONGHELP)
bootcount_help_text bootcount_help_text
#endif
); );

View file

@ -139,13 +139,11 @@ static int do_bootdev_hunt(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(bootdev,
static char bootdev_help_text[] =
"list [-p] - list all available bootdevs (-p to probe)\n" "list [-p] - list all available bootdevs (-p to probe)\n"
"bootdev hunt [-l|<spec>] - use hunt drivers to find bootdevs\n" "bootdev hunt [-l|<spec>] - use hunt drivers to find bootdevs\n"
"bootdev select <bd> - select a bootdev by name | label | seq\n" "bootdev select <bd> - select a bootdev by name | label | seq\n"
"bootdev info [-p] - show information about a bootdev (-p to probe)"; "bootdev info [-p] - show information about a bootdev (-p to probe)");
#endif
U_BOOT_CMD_WITH_SUBCMDS(bootdev, "Boot devices", bootdev_help_text, U_BOOT_CMD_WITH_SUBCMDS(bootdev, "Boot devices", bootdev_help_text,
U_BOOT_SUBCMD_MKENT(list, 2, 1, do_bootdev_list), U_BOOT_SUBCMD_MKENT(list, 2, 1, do_bootdev_list),

View file

@ -698,8 +698,7 @@ static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc,
return ret; return ret;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(bootefi,
static char bootefi_help_text[] =
"<image address>[:<image size>] [<fdt address>]\n" "<image address>[:<image size>] [<fdt address>]\n"
" - boot EFI payload\n" " - boot EFI payload\n"
#ifdef CONFIG_CMD_BOOTEFI_HELLO #ifdef CONFIG_CMD_BOOTEFI_HELLO
@ -719,8 +718,7 @@ static char bootefi_help_text[] =
" If specified, the device tree located at <fdt address> gets\n" " If specified, the device tree located at <fdt address> gets\n"
" exposed as EFI configuration table.\n" " exposed as EFI configuration table.\n"
#endif #endif
; );
#endif
U_BOOT_CMD( U_BOOT_CMD(
bootefi, 4, 0, do_bootefi, bootefi, 4, 0, do_bootefi,

View file

@ -541,8 +541,7 @@ static int do_bootflow_cmdline(struct cmd_tbl *cmdtp, int flag, int argc,
} }
#endif /* CONFIG_CMD_BOOTFLOW_FULL */ #endif /* CONFIG_CMD_BOOTFLOW_FULL */
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(bootflow,
static char bootflow_help_text[] =
#ifdef CONFIG_CMD_BOOTFLOW_FULL #ifdef CONFIG_CMD_BOOTFLOW_FULL
"scan [-abeGl] [bdev] - scan for valid bootflows (-l list, -a all, -e errors, -b boot, -G no global)\n" "scan [-abeGl] [bdev] - scan for valid bootflows (-l list, -a all, -e errors, -b boot, -G no global)\n"
"bootflow list [-e] - list scanned bootflows (-e errors)\n" "bootflow list [-e] - list scanned bootflows (-e errors)\n"
@ -551,11 +550,11 @@ static char bootflow_help_text[] =
"bootflow read - read all current-bootflow files\n" "bootflow read - read all current-bootflow files\n"
"bootflow boot - boot current bootflow\n" "bootflow boot - boot current bootflow\n"
"bootflow menu [-t] - show a menu of available bootflows\n" "bootflow menu [-t] - show a menu of available bootflows\n"
"bootflow cmdline [set|get|clear|delete|auto] <param> [<value>] - update cmdline"; "bootflow cmdline [set|get|clear|delete|auto] <param> [<value>] - update cmdline"
#else #else
"scan - boot first available bootflow\n"; "scan - boot first available bootflow\n"
#endif #endif
#endif /* CONFIG_SYS_LONGHELP */ );
U_BOOT_CMD_WITH_SUBCMDS(bootflow, "Boot flows", bootflow_help_text, U_BOOT_CMD_WITH_SUBCMDS(bootflow, "Boot flows", bootflow_help_text,
U_BOOT_SUBCMD_MKENT(scan, 3, 1, do_bootflow_scan), U_BOOT_SUBCMD_MKENT(scan, 3, 1, do_bootflow_scan),

View file

@ -134,8 +134,7 @@ int do_booti(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return ret; return ret;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(booti,
static char booti_help_text[] =
"[addr [initrd[:size]] [fdt]]\n" "[addr [initrd[:size]] [fdt]]\n"
" - boot Linux flat or compressed 'Image' stored at 'addr'\n" " - boot Linux flat or compressed 'Image' stored at 'addr'\n"
"\tThe argument 'initrd' is optional and specifies the address\n" "\tThe argument 'initrd' is optional and specifies the address\n"
@ -151,8 +150,7 @@ static char booti_help_text[] =
"\tis required. To boot a kernel with a device-tree blob but\n" "\tis required. To boot a kernel with a device-tree blob but\n"
"\twithout an initrd image, use a '-' for the initrd argument.\n" "\twithout an initrd image, use a '-' for the initrd argument.\n"
#endif #endif
""; );
#endif
U_BOOT_CMD( U_BOOT_CMD(
booti, CONFIG_SYS_MAXARGS, 1, do_booti, booti, CONFIG_SYS_MAXARGS, 1, do_booti,

View file

@ -168,8 +168,7 @@ int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd)
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(bootm,
static char bootm_help_text[] =
"[addr [arg ...]]\n - boot application image stored in memory\n" "[addr [arg ...]]\n - boot application image stored in memory\n"
"\tpassing arguments 'arg ...'; when booting a Linux kernel,\n" "\tpassing arguments 'arg ...'; when booting a Linux kernel,\n"
"\t'arg' can be the address of an initrd image\n" "\t'arg' can be the address of an initrd image\n"
@ -208,8 +207,7 @@ static char bootm_help_text[] =
#if defined(CONFIG_TRACE) #if defined(CONFIG_TRACE)
"\tfake - OS specific fake start without go\n" "\tfake - OS specific fake start without go\n"
#endif #endif
"\tgo - start OS"; "\tgo - start OS");
#endif
U_BOOT_CMD( U_BOOT_CMD(
bootm, CONFIG_SYS_MAXARGS, 1, do_bootm, bootm, CONFIG_SYS_MAXARGS, 1, do_bootm,

View file

@ -104,11 +104,9 @@ static int do_bootmeth_order(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(bootmeth,
static char bootmeth_help_text[] =
"list [-a] - list available bootmeths (-a all)\n" "list [-a] - list available bootmeths (-a all)\n"
"bootmeth order [<bd> ...] - select bootmeth order / subset to use"; "bootmeth order [<bd> ...] - select bootmeth order / subset to use");
#endif
U_BOOT_CMD_WITH_SUBCMDS(bootmeth, "Boot methods", bootmeth_help_text, U_BOOT_CMD_WITH_SUBCMDS(bootmeth, "Boot methods", bootmeth_help_text,
U_BOOT_SUBCMD_MKENT(list, 2, 1, do_bootmeth_list), U_BOOT_SUBCMD_MKENT(list, 2, 1, do_bootmeth_list),

View file

@ -88,8 +88,7 @@ int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return ret; return ret;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(bootz,
static char bootz_help_text[] =
"[addr [initrd[:size]] [fdt]]\n" "[addr [initrd[:size]] [fdt]]\n"
" - boot Linux zImage stored in memory\n" " - boot Linux zImage stored in memory\n"
"\tThe argument 'initrd' is optional and specifies the address\n" "\tThe argument 'initrd' is optional and specifies the address\n"
@ -102,8 +101,7 @@ static char bootz_help_text[] =
"\tuse a '-' for the second argument. If you do not pass a third\n" "\tuse a '-' for the second argument. If you do not pass a third\n"
"\ta bd_info struct will be passed instead\n" "\ta bd_info struct will be passed instead\n"
#endif #endif
""; );
#endif
U_BOOT_CMD( U_BOOT_CMD(
bootz, CONFIG_SYS_MAXARGS, 1, do_bootz, bootz, CONFIG_SYS_MAXARGS, 1, do_bootz,

View file

@ -60,11 +60,9 @@ static int do_cat(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(cat,
static char cat_help_text[] =
"<interface> <dev[:part]> <file>\n" "<interface> <dev[:part]> <file>\n"
" - Print file from 'dev' on 'interface' to standard output\n"; " - Print file from 'dev' on 'interface' to standard output\n");
#endif
U_BOOT_CMD(cat, 4, 1, do_cat, U_BOOT_CMD(cat, 4, 1, do_cat,
"Print file to standard output", "Print file to standard output",

View file

@ -270,8 +270,7 @@ static int do_cedit_run(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(cedit,
static char cedit_help_text[] =
"load <interface> <dev[:part]> <filename> - load config editor\n" "load <interface> <dev[:part]> <filename> - load config editor\n"
"cedit read_fdt <i/f> <dev[:part]> <filename> - read settings\n" "cedit read_fdt <i/f> <dev[:part]> <filename> - read settings\n"
"cedit write_fdt <i/f> <dev[:part]> <filename> - write settings\n" "cedit write_fdt <i/f> <dev[:part]> <filename> - write settings\n"
@ -279,8 +278,7 @@ static char cedit_help_text[] =
"cedit write_env [-v] - write settings to env vars\n" "cedit write_env [-v] - write settings to env vars\n"
"cedit read_cmos [-v] [dev] - read settings from CMOS RAM\n" "cedit read_cmos [-v] [dev] - read settings from CMOS RAM\n"
"cedit write_cmos [-v] [dev] - write settings to CMOS RAM\n" "cedit write_cmos [-v] [dev] - write settings to CMOS RAM\n"
"cedit run - run config editor"; "cedit run - run config editor");
#endif /* CONFIG_SYS_LONGHELP */
U_BOOT_CMD_WITH_SUBCMDS(cedit, "Configuration editor", cedit_help_text, U_BOOT_CMD_WITH_SUBCMDS(cedit, "Configuration editor", cedit_help_text,
U_BOOT_SUBCMD_MKENT(load, 5, 1, do_cedit_load), U_BOOT_SUBCMD_MKENT(load, 5, 1, do_cedit_load),

View file

@ -152,10 +152,8 @@ static int do_clk(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_USAGE; return CMD_RET_USAGE;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(clk,
static char clk_help_text[] =
"dump - Print clock frequencies\n" "dump - Print clock frequencies\n"
"clk setfreq [clk] [freq] - Set clock frequency"; "clk setfreq [clk] [freq] - Set clock frequency");
#endif
U_BOOT_CMD(clk, 4, 1, do_clk, "CLK sub-system", clk_help_text); U_BOOT_CMD(clk, 4, 1, do_clk, "CLK sub-system", clk_help_text);

View file

@ -41,9 +41,7 @@ static int do_conitrace(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS; return CMD_RET_SUCCESS;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(conitrace, "");
static char conitrace_help_text[] = "";
#endif
U_BOOT_CMD_COMPLETE( U_BOOT_CMD_COMPLETE(
conitrace, 2, 0, do_conitrace, conitrace, 2, 0, do_conitrace,

View file

@ -83,12 +83,9 @@ static int do_cpu_detail(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#if IS_ENABLED(CONFIG_SYS_LONGHELP) U_BOOT_LONGHELP(cpu,
static char cpu_help_text[] =
"list - list available CPUs\n" "list - list available CPUs\n"
"cpu detail - show CPU detail" "cpu detail - show CPU detail");
;
#endif
U_BOOT_CMD_WITH_SUBCMDS(cpu, "display information about CPUs", cpu_help_text, U_BOOT_CMD_WITH_SUBCMDS(cpu, "display information about CPUs", cpu_help_text,
U_BOOT_SUBCMD_MKENT(list, 1, 1, do_cpu_list), U_BOOT_SUBCMD_MKENT(list, 1, 1, do_cpu_list),

View file

@ -76,9 +76,9 @@ static int do_cyclic_list(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
static char cyclic_help_text[] = U_BOOT_LONGHELP(cyclic,
"demo <cycletime_ms> <delay_us> - register cyclic demo function\n" "demo <cycletime_ms> <delay_us> - register cyclic demo function\n"
"cyclic list - list cyclic functions\n"; "cyclic list - list cyclic functions\n");
U_BOOT_CMD_WITH_SUBCMDS(cyclic, "Cyclic", cyclic_help_text, U_BOOT_CMD_WITH_SUBCMDS(cyclic, "Cyclic", cyclic_help_text,
U_BOOT_SUBCMD_MKENT(demo, 3, 1, do_cyclic_demo), U_BOOT_SUBCMD_MKENT(demo, 3, 1, do_cyclic_demo),

View file

@ -112,17 +112,14 @@ static int do_dm_dump_uclass(struct cmd_tbl *cmdtp, int flag, int argc,
#define DM_MEM #define DM_MEM
#endif #endif
#if IS_ENABLED(CONFIG_SYS_LONGHELP) U_BOOT_LONGHELP(dm,
static char dm_help_text[] =
"compat Dump list of drivers with compatibility strings\n" "compat Dump list of drivers with compatibility strings\n"
"dm devres Dump list of device resources for each device\n" "dm devres Dump list of device resources for each device\n"
"dm drivers Dump list of drivers with uclass and instances\n" "dm drivers Dump list of drivers with uclass and instances\n"
DM_MEM_HELP DM_MEM_HELP
"dm static Dump list of drivers with static platform data\n" "dm static Dump list of drivers with static platform data\n"
"dm tree [-s][-e][name] Dump tree of driver model devices (-s=sort)\n" "dm tree [-s][-e][name] Dump tree of driver model devices (-s=sort)\n"
"dm uclass [-e][name] Dump list of instances for each uclass" "dm uclass [-e][name] Dump list of instances for each uclass");
;
#endif
U_BOOT_CMD_WITH_SUBCMDS(dm, "Driver model low level access", dm_help_text, U_BOOT_CMD_WITH_SUBCMDS(dm, "Driver model low level access", dm_help_text,
U_BOOT_SUBCMD_MKENT(compat, 1, 1, do_dm_dump_driver_compat), U_BOOT_SUBCMD_MKENT(compat, 1, 1, do_dm_dump_driver_compat),

View file

@ -1484,8 +1484,7 @@ static int do_efidebug(struct cmd_tbl *cmdtp, int flag,
return cp->cmd(cmdtp, flag, argc, argv); return cp->cmd(cmdtp, flag, argc, argv);
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(efidebug,
static char efidebug_help_text[] =
" - UEFI Shell-like interface to configure UEFI environment\n" " - UEFI Shell-like interface to configure UEFI environment\n"
"\n" "\n"
"efidebug boot add - set UEFI BootXXXX variable\n" "efidebug boot add - set UEFI BootXXXX variable\n"
@ -1532,8 +1531,7 @@ static char efidebug_help_text[] =
" - run simple bootmgr for test\n" " - run simple bootmgr for test\n"
#endif #endif
"efidebug query [-nv][-bs][-rt][-at]\n" "efidebug query [-nv][-bs][-rt][-at]\n"
" - show size of UEFI variables store\n"; " - show size of UEFI variables store\n");
#endif
U_BOOT_CMD( U_BOOT_CMD(
efidebug, CONFIG_SYS_MAXARGS, 0, do_efidebug, efidebug, CONFIG_SYS_MAXARGS, 0, do_efidebug,

View file

@ -18,10 +18,8 @@ static int do_event_list(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(event,
static char event_help_text[] = "list - list event spies");
"list - list event spies";
#endif
U_BOOT_CMD_WITH_SUBCMDS(event, "Events", event_help_text, U_BOOT_CMD_WITH_SUBCMDS(event, "Events", event_help_text,
U_BOOT_SUBCMD_MKENT(list, 1, 1, do_event_list)); U_BOOT_SUBCMD_MKENT(list, 1, 1, do_event_list));

View file

@ -1113,8 +1113,7 @@ static int fdt_print(const char *pathp, char *prop, int depth)
} }
/********************************************************************/ /********************************************************************/
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(fdt,
static char fdt_help_text[] =
"addr [-c] [-q] <addr> [<size>] - Set the [control] fdt location to <addr>\n" "addr [-c] [-q] <addr> [<size>] - Set the [control] fdt location to <addr>\n"
#ifdef CONFIG_OF_LIBFDT_OVERLAY #ifdef CONFIG_OF_LIBFDT_OVERLAY
"fdt apply <addr> - Apply overlay to the DT\n" "fdt apply <addr> - Apply overlay to the DT\n"
@ -1153,8 +1152,7 @@ static char fdt_help_text[] =
" default gd->fdt_blob\n" " default gd->fdt_blob\n"
#endif #endif
"NOTE: Dereference aliases by omitting the leading '/', " "NOTE: Dereference aliases by omitting the leading '/', "
"e.g. fdt print ethernet0."; "e.g. fdt print ethernet0.");
#endif
U_BOOT_CMD( U_BOOT_CMD(
fdt, 255, 0, do_fdt, fdt, 255, 0, do_fdt,

View file

@ -79,12 +79,10 @@ static int do_font_size(struct cmd_tbl *cmdtp, int flag, int argc,
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(font,
static char font_help_text[] =
"list - list available fonts\n" "list - list available fonts\n"
"font select <name> [<size>] - select font to use\n" "font select <name> [<size>] - select font to use\n"
"font size <size> - select font size to"; "font size <size> - select font size to");
#endif
U_BOOT_CMD_WITH_SUBCMDS(font, "Fonts", font_help_text, U_BOOT_CMD_WITH_SUBCMDS(font, "Fonts", font_help_text,
U_BOOT_SUBCMD_MKENT(list, 1, 1, do_font_list), U_BOOT_SUBCMD_MKENT(list, 1, 1, do_font_list),

View file

@ -29,7 +29,10 @@ U_BOOT_CMD(
); );
#ifdef CONFIG_CMDLINE #ifdef CONFIG_CMDLINE
/* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */ /*
* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names
* nor can we rely on the CONFIG_SYS_LONGHELP helper macro
*/
ll_entry_declare(struct cmd_tbl, question_mark, cmd) = { ll_entry_declare(struct cmd_tbl, question_mark, cmd) = {
"?", CONFIG_SYS_MAXARGS, cmd_always_repeatable, do_help, "?", CONFIG_SYS_MAXARGS, cmd_always_repeatable, do_help,
"alias for 'help'", "alias for 'help'",

View file

@ -1969,8 +1969,7 @@ static int do_i2c(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
} }
/***************************************************/ /***************************************************/
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(i2c,
static char i2c_help_text[] =
#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C) #if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C)
"bus [muxtype:muxaddr:muxchannel] - show I2C bus info\n" "bus [muxtype:muxaddr:muxchannel] - show I2C bus info\n"
"i2c " /* That's the prefix for the crc32 command below. */ "i2c " /* That's the prefix for the crc32 command below. */
@ -1999,8 +1998,7 @@ static char i2c_help_text[] =
#if defined(CONFIG_CMD_SDRAM) #if defined(CONFIG_CMD_SDRAM)
"i2c sdram chip - print SDRAM configuration information\n" "i2c sdram chip - print SDRAM configuration information\n"
#endif #endif
"i2c speed [speed] - show or set I2C bus speed"; "i2c speed [speed] - show or set I2C bus speed");
#endif
U_BOOT_CMD( U_BOOT_CMD(
i2c, 7, 1, do_i2c, i2c, 7, 1, do_i2c,

View file

@ -68,11 +68,9 @@ static int do_kaslr_seed(struct cmd_tbl *cmdtp, int flag, int argc, char *const
return ret; return ret;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(kaslrseed,
static char kaslrseed_help_text[] =
"[n]\n" "[n]\n"
" - append random bytes to chosen kaslr-seed node\n"; " - append random bytes to chosen kaslr-seed node\n");
#endif
U_BOOT_CMD( U_BOOT_CMD(
kaslrseed, 1, 0, do_kaslr_seed, kaslrseed, 1, 0, do_kaslr_seed,

View file

@ -375,8 +375,7 @@ static int do_log_rec(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(log,
static char log_help_text[] =
"level [<level>] - get/set log level\n" "level [<level>] - get/set log level\n"
"categories - list log categories\n" "categories - list log categories\n"
"drivers - list log drivers\n" "drivers - list log drivers\n"
@ -405,9 +404,7 @@ static char log_help_text[] =
"\tc=category, l=level, F=file, L=line number, f=function, m=msg\n" "\tc=category, l=level, F=file, L=line number, f=function, m=msg\n"
"\tor 'default', or 'all' for all\n" "\tor 'default', or 'all' for all\n"
"log rec <category> <level> <file> <line> <func> <message> - " "log rec <category> <level> <file> <line> <func> <message> - "
"output a log record" "output a log record");
;
#endif
U_BOOT_CMD_WITH_SUBCMDS(log, "log system", log_help_text, U_BOOT_CMD_WITH_SUBCMDS(log, "log system", log_help_text,
U_BOOT_SUBCMD_MKENT(level, 2, 1, do_log_level), U_BOOT_SUBCMD_MKENT(level, 2, 1, do_log_level),

View file

@ -66,8 +66,7 @@ cpu_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(cpu,
static char cpu_help_text[] =
"<num> reset - Reset cpu <num>\n" "<num> reset - Reset cpu <num>\n"
"cpu status - Status of all cpus\n" "cpu status - Status of all cpus\n"
"cpu <num> status - Status of cpu <num>\n" "cpu <num> status - Status of cpu <num>\n"
@ -86,8 +85,7 @@ static char cpu_help_text[] =
" When cpu <num> is released r4 and r5 = 0.\n" \ " When cpu <num> is released r4 and r5 = 0.\n" \
" r7 will contain the size of the initial mapped area" " r7 will contain the size of the initial mapped area"
#endif #endif
""; );
#endif
U_BOOT_CMD( U_BOOT_CMD(
cpu, CONFIG_SYS_MAXARGS, 1, cpu_cmd, cpu, CONFIG_SYS_MAXARGS, 1, cpu_cmd,

View file

@ -541,8 +541,7 @@ static int mtd_name_complete(int argc, char *const argv[], char last_char,
} }
#endif /* CONFIG_AUTO_COMPLETE */ #endif /* CONFIG_AUTO_COMPLETE */
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(mtd,
static char mtd_help_text[] =
"- generic operations on memory technology devices\n\n" "- generic operations on memory technology devices\n\n"
"mtd list\n" "mtd list\n"
"mtd read[.raw][.oob] <name> <addr> [<off> [<size>]]\n" "mtd read[.raw][.oob] <name> <addr> [<off> [<size>]]\n"
@ -563,8 +562,7 @@ static char mtd_help_text[] =
"\t\t* must be a multiple of a block for erase\n" "\t\t* must be a multiple of a block for erase\n"
"\t\t* must be a multiple of a page otherwise (special case: default is a page with dump)\n" "\t\t* must be a multiple of a page otherwise (special case: default is a page with dump)\n"
"\n" "\n"
"The .dontskipff option forces writing empty pages, don't use it if unsure.\n"; "The .dontskipff option forces writing empty pages, don't use it if unsure.\n");
#endif
U_BOOT_CMD_WITH_SUBCMDS(mtd, "MTD utils", mtd_help_text, U_BOOT_CMD_WITH_SUBCMDS(mtd, "MTD utils", mtd_help_text,
U_BOOT_SUBCMD_MKENT(list, 1, 1, do_mtd_list), U_BOOT_SUBCMD_MKENT(list, 1, 1, do_mtd_list),

View file

@ -2079,8 +2079,7 @@ U_BOOT_CMD(
" - change active partition (e.g. part-id = nand0,1) of a MTD device" " - change active partition (e.g. part-id = nand0,1) of a MTD device"
); );
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(mtdparts,
static char mtdparts_help_text[] =
"\n" "\n"
" - list partition table\n" " - list partition table\n"
"mtdparts delall\n" "mtdparts delall\n"
@ -2122,8 +2121,7 @@ static char mtdparts_help_text[] =
"<size> := standard linux memsize OR '-' to denote all remaining space\n" "<size> := standard linux memsize OR '-' to denote all remaining space\n"
"<offset> := partition start offset within the device\n" "<offset> := partition start offset within the device\n"
"<name> := '(' NAME ')'\n" "<name> := '(' NAME ')'\n"
"<ro-flag> := when set to 'ro' makes partition read-only (not used, passed to kernel)"; "<ro-flag> := when set to 'ro' makes partition read-only (not used, passed to kernel)");
#endif
U_BOOT_CMD( U_BOOT_CMD(
mtdparts, 6, 0, do_mtdparts, mtdparts, 6, 0, do_mtdparts,

View file

@ -173,10 +173,10 @@ static int do_mux_deselect(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS; return CMD_RET_SUCCESS;
} }
static char mux_help_text[] = U_BOOT_LONGHELP(mux,
"list - List all Muxes and their states\n" "list - List all Muxes and their states\n"
"select <chip> <id> <state> - Select the given mux state\n" "select <chip> <id> <state> - Select the given mux state\n"
"deselect <chip> <id> - Deselect the given mux and reset it to its idle state"; "deselect <chip> <id> - Deselect the given mux and reset it to its idle state");
U_BOOT_CMD_WITH_SUBCMDS(mux, "List, select, and deselect muxes", mux_help_text, U_BOOT_CMD_WITH_SUBCMDS(mux, "List, select, and deselect muxes", mux_help_text,
U_BOOT_SUBCMD_MKENT(list, 1, 1, do_mux_list), U_BOOT_SUBCMD_MKENT(list, 1, 1, do_mux_list),

View file

@ -919,8 +919,7 @@ usage:
return CMD_RET_USAGE; return CMD_RET_USAGE;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(nand,
static char nand_help_text[] =
"info - show available NAND devices\n" "info - show available NAND devices\n"
"nand device [dev] - show or set current device\n" "nand device [dev] - show or set current device\n"
"nand read - addr off|partition size\n" "nand read - addr off|partition size\n"
@ -965,8 +964,7 @@ static char nand_help_text[] =
"nand env.oob set off|partition - set enviromnent offset\n" "nand env.oob set off|partition - set enviromnent offset\n"
"nand env.oob get - get environment offset" "nand env.oob get - get environment offset"
#endif #endif
""; );
#endif
U_BOOT_CMD( U_BOOT_CMD(
nand, CONFIG_SYS_MAXARGS, 1, do_nand, nand, CONFIG_SYS_MAXARGS, 1, do_nand,

View file

@ -1238,8 +1238,7 @@ static int do_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return CMD_RET_USAGE; return CMD_RET_USAGE;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(env,
static char env_help_text[] =
#if defined(CONFIG_CMD_ASKENV) #if defined(CONFIG_CMD_ASKENV)
"ask name [message] [size] - ask for environment variable\nenv " "ask name [message] [size] - ask for environment variable\nenv "
#endif #endif
@ -1304,8 +1303,7 @@ static char env_help_text[] =
"env set -e [-nv][-bs][-rt][-at][-a][-i addr:size][-v] name [arg ...]\n" "env set -e [-nv][-bs][-rt][-at][-a][-i addr:size][-v] name [arg ...]\n"
" - set UEFI variable; unset if '-i' or 'arg' not specified\n" " - set UEFI variable; unset if '-i' or 'arg' not specified\n"
#endif #endif
"env set [-f] name [arg ...]\n"; "env set [-f] name [arg ...]\n");
#endif
U_BOOT_CMD( U_BOOT_CMD(
env, CONFIG_SYS_MAXARGS, 1, do_env, env, CONFIG_SYS_MAXARGS, 1, do_env,

View file

@ -278,12 +278,12 @@ static int do_osd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return CMD_RET_USAGE; return CMD_RET_USAGE;
} }
static char osd_help_text[] = U_BOOT_LONGHELP(osd,
"show - show OSD info\n" "show - show OSD info\n"
"osd dev [dev] - show or set current OSD\n" "osd dev [dev] - show or set current OSD\n"
"write [pos_x] [pos_y] [buffer] [count] - write 8-bit hex encoded buffer to osd memory at a given position\n" "write [pos_x] [pos_y] [buffer] [count] - write 8-bit hex encoded buffer to osd memory at a given position\n"
"print [pos_x] [pos_y] [color] [text] - write ASCII buffer (given by text data and driver-specific color information) to osd memory\n" "print [pos_x] [pos_y] [color] [text] - write ASCII buffer (given by text data and driver-specific color information) to osd memory\n"
"size [size_x] [size_y] - set OSD XY size in characters\n"; "size [size_x] [size_y] - set OSD XY size in characters\n");
U_BOOT_CMD( U_BOOT_CMD(
osd, 6, 1, do_osd, osd, 6, 1, do_osd,

View file

@ -48,7 +48,7 @@ static int do_pcap_clear(struct cmd_tbl *cmdtp, int flag, int argc,
return pcap_clear() ? CMD_RET_FAILURE : CMD_RET_SUCCESS; return pcap_clear() ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
} }
static char pcap_help_text[] = U_BOOT_LONGHELP(pcap,
"- network packet capture\n\n" "- network packet capture\n\n"
"pcap\n" "pcap\n"
"pcap init\t\t\t<addr> <max_size>\n" "pcap init\t\t\t<addr> <max_size>\n"
@ -60,7 +60,7 @@ static char pcap_help_text[] =
"With:\n" "With:\n"
"\t<addr>: user address to which pcap will be stored (hexedcimal)\n" "\t<addr>: user address to which pcap will be stored (hexedcimal)\n"
"\t<max_size>: Maximum size of pcap file (decimal)\n" "\t<max_size>: Maximum size of pcap file (decimal)\n"
"\n"; "\n");
U_BOOT_CMD_WITH_SUBCMDS(pcap, "pcap", pcap_help_text, U_BOOT_CMD_WITH_SUBCMDS(pcap, "pcap", pcap_help_text,
U_BOOT_SUBCMD_MKENT(init, 3, 0, do_pcap_init), U_BOOT_SUBCMD_MKENT(init, 3, 0, do_pcap_init),

View file

@ -620,8 +620,7 @@ static int do_pci(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
/***************************************************/ /***************************************************/
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(pci,
static char pci_help_text[] =
"[bus|*] [long]\n" "[bus|*] [long]\n"
" - short or long list of PCI devices on bus 'bus'\n" " - short or long list of PCI devices on bus 'bus'\n"
"pci enum\n" "pci enum\n"
@ -639,8 +638,7 @@ static char pci_help_text[] =
"pci modify[.b, .w, .l] b.d.f address\n" "pci modify[.b, .w, .l] b.d.f address\n"
" - modify, auto increment CFG address\n" " - modify, auto increment CFG address\n"
"pci write[.b, .w, .l] b.d.f address value\n" "pci write[.b, .w, .l] b.d.f address value\n"
" - write to CFG address"; " - write to CFG address");
#endif
U_BOOT_CMD( U_BOOT_CMD(
pci, 5, 1, do_pci, pci, 5, 1, do_pci,

View file

@ -152,13 +152,11 @@ usage:
/***************************************************/ /***************************************************/
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(pci_mps,
static char pci_mps_help_text[] =
"safe\n" "safe\n"
" - Set PCI Express MPS of all devices to safe values\n" " - Set PCI Express MPS of all devices to safe values\n"
"pci_mps peer2peer\n" "pci_mps peer2peer\n"
" - Set PCI Express MPS of all devices to support hotplug and peer-to-peer DMA\n"; " - Set PCI Express MPS of all devices to support hotplug and peer-to-peer DMA\n");
#endif
U_BOOT_CMD(pci_mps, 2, 0, do_pci_mps, U_BOOT_CMD(pci_mps, 2, 0, do_pci_mps,
"configure PCI Express MPS", pci_mps_help_text); "configure PCI Express MPS", pci_mps_help_text);

View file

@ -119,11 +119,8 @@ static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(sbi,
static char sbi_help_text[] = "- display SBI spec version, implementation, and available extensions");
"- display SBI spec version, implementation, and available extensions";
#endif
U_BOOT_CMD_COMPLETE( U_BOOT_CMD_COMPLETE(
sbi, 1, 0, do_sbi, sbi, 1, 0, do_sbi,

View file

@ -56,11 +56,9 @@ static int do_rng(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return ret; return ret;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(rng,
static char rng_help_text[] =
"[dev [n]]\n" "[dev [n]]\n"
" - print n random bytes(max 64) read from dev\n"; " - print n random bytes(max 64) read from dev\n");
#endif
U_BOOT_CMD( U_BOOT_CMD(
rng, 3, 0, do_rng, rng, 3, 0, do_rng,

View file

@ -31,11 +31,10 @@ static struct cmd_tbl cmd_sub[] = {
"", ""), "", ""),
}; };
static char exception_help_text[] = U_BOOT_LONGHELP(exception,
"<ex>\n" "<ex>\n"
" The following exceptions are available:\n" " The following exceptions are available:\n"
" undefined - undefined instruction\n" " undefined - undefined instruction\n"
" sigsegv - illegal memory access\n" " sigsegv - illegal memory access\n");
;
#include <exception.h> #include <exception.h>

View file

@ -41,11 +41,12 @@ int do_scp03_provision(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS; return CMD_RET_SUCCESS;
} }
static char text[] = U_BOOT_LONGHELP(scp03,
"provides a command to enable SCP03 and provision the SCP03 keys\n" "provides a command to enable SCP03 and provision the SCP03 keys\n"
" enable - enable SCP03 on the TEE\n" " enable - enable SCP03 on the TEE\n"
" provision - provision SCP03 on the TEE\n"; " provision - provision SCP03 on the TEE\n");
U_BOOT_CMD_WITH_SUBCMDS(scp03, "Secure Channel Protocol 03 control", text, U_BOOT_CMD_WITH_SUBCMDS(scp03, "Secure Channel Protocol 03 control",
scp03_help_text,
U_BOOT_SUBCMD_MKENT(enable, 1, 1, do_scp03_enable), U_BOOT_SUBCMD_MKENT(enable, 1, 1, do_scp03_enable),
U_BOOT_SUBCMD_MKENT(provision, 1, 1, do_scp03_provision)); U_BOOT_SUBCMD_MKENT(provision, 1, 1, do_scp03_provision));

View file

@ -614,8 +614,7 @@ static int do_spi_flash(struct cmd_tbl *cmdtp, int flag, int argc,
return ret; return ret;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(sf,
static const char long_help[] =
"probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus\n" "probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus\n"
" and chip select\n" " and chip select\n"
"sf read addr offset|partition len - read `len' bytes starting at\n" "sf read addr offset|partition len - read `len' bytes starting at\n"
@ -635,10 +634,9 @@ static const char long_help[] =
#ifdef CONFIG_CMD_SF_TEST #ifdef CONFIG_CMD_SF_TEST
"\nsf test offset len - run a very basic destructive test" "\nsf test offset len - run a very basic destructive test"
#endif #endif
#endif /* CONFIG_SYS_LONGHELP */ );
;
U_BOOT_CMD( U_BOOT_CMD(
sf, 5, 1, do_spi_flash, sf, 5, 1, do_spi_flash,
"SPI flash sub-system", long_help "SPI flash sub-system", sf_help_text
); );

View file

@ -54,19 +54,18 @@ static int do_source(struct cmd_tbl *cmdtp, int flag, int argc,
return rcode; return rcode;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(source,
static char source_help_text[] =
#if defined(CONFIG_FIT) #if defined(CONFIG_FIT)
"[<addr>][:[<image>]|#[<config>]]\n" "[<addr>][:[<image>]|#[<config>]]\n"
"\t- Run script starting at addr\n" "\t- Run script starting at addr\n"
"\t- A FIT config name or subimage name may be specified with : or #\n" "\t- A FIT config name or subimage name may be specified with : or #\n"
"\t (like bootm). If the image or config name is omitted, the\n" "\t (like bootm). If the image or config name is omitted, the\n"
"\t default is used."; "\t default is used."
#else #else
"[<addr>]\n" "[<addr>]\n"
"\t- Run script starting at addr"; "\t- Run script starting at addr"
#endif
#endif #endif
);
U_BOOT_CMD( U_BOOT_CMD(
source, 2, 0, do_source, source, 2, 0, do_source,

View file

@ -175,11 +175,11 @@ static int ti_do_pd(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv
return CMD_RET_USAGE; return CMD_RET_USAGE;
} }
U_BOOT_CMD(pd, 4, 1, ti_do_pd, U_BOOT_LONGHELP(pd,
"TI power domain control",
#if IS_ENABLED(CONFIG_SYS_LONGHELP)
"dump - show power domain status\n" "dump - show power domain status\n"
"enable [psc] [lpsc] - enable power domain\n" "enable [psc] [lpsc] - enable power domain\n"
"disable [psc] [lpsc] - disable power domain\n" "disable [psc] [lpsc] - disable power domain\n");
#endif
U_BOOT_CMD(pd, 4, 1, ti_do_pd,
"TI power domain control", pd_help_text
); );

View file

@ -104,13 +104,11 @@ static int do_vbe_state(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(vbe,
static char vbe_help_text[] =
"list - list VBE bootmeths\n" "list - list VBE bootmeths\n"
"vbe select - select a VBE bootmeth by sequence or name\n" "vbe select - select a VBE bootmeth by sequence or name\n"
"vbe info - show information about a VBE bootmeth\n" "vbe info - show information about a VBE bootmeth\n"
"vbe state - show VBE state"; "vbe state - show VBE state");
#endif
U_BOOT_CMD_WITH_SUBCMDS(vbe, "Verified Boot for Embedded", vbe_help_text, U_BOOT_CMD_WITH_SUBCMDS(vbe, "Verified Boot for Embedded", vbe_help_text,
U_BOOT_SUBCMD_MKENT(list, 1, 1, do_vbe_list), U_BOOT_SUBCMD_MKENT(list, 1, 1, do_vbe_list),

View file

@ -157,13 +157,13 @@ static int do_wdt_expire(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS; return CMD_RET_SUCCESS;
} }
static char wdt_help_text[] = U_BOOT_LONGHELP(wdt,
"list - list watchdog devices\n" "list - list watchdog devices\n"
"wdt dev [<name>] - get/set current watchdog device\n" "wdt dev [<name>] - get/set current watchdog device\n"
"wdt start <timeout ms> [flags] - start watchdog timer\n" "wdt start <timeout ms> [flags] - start watchdog timer\n"
"wdt stop - stop watchdog timer\n" "wdt stop - stop watchdog timer\n"
"wdt reset - reset watchdog timer\n" "wdt reset - reset watchdog timer\n"
"wdt expire [flags] - expire watchdog timer immediately\n"; "wdt expire [flags] - expire watchdog timer immediately\n");
U_BOOT_CMD_WITH_SUBCMDS(wdt, "Watchdog sub-system", wdt_help_text, U_BOOT_CMD_WITH_SUBCMDS(wdt, "Watchdog sub-system", wdt_help_text,
U_BOOT_SUBCMD_MKENT(list, 1, 1, do_wdt_list), U_BOOT_SUBCMD_MKENT(list, 1, 1, do_wdt_list),

View file

@ -258,8 +258,7 @@ do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(imgextract,
static char imgextract_help_text[] =
"addr part [dest]\n" "addr part [dest]\n"
" - extract <part> from legacy image at <addr> and copy to <dest>" " - extract <part> from legacy image at <addr> and copy to <dest>"
#if defined(CONFIG_FIT) #if defined(CONFIG_FIT)
@ -267,8 +266,7 @@ static char imgextract_help_text[] =
"addr uname [dest]\n" "addr uname [dest]\n"
" - extract <uname> subimage from FIT image at <addr> and copy to <dest>" " - extract <uname> subimage from FIT image at <addr> and copy to <dest>"
#endif #endif
""; );
#endif
U_BOOT_CMD( U_BOOT_CMD(
imxtract, 4, 1, do_imgextract, imxtract, 4, 1, do_imgextract,

View file

@ -73,11 +73,9 @@ static int do_xxd(struct cmd_tbl *cmdtp, int flag, int argc,
return 0; return 0;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(xxd,
static char xxd_help_text[] =
"<interface> <dev[:part]> <file>\n" "<interface> <dev[:part]> <file>\n"
" - Print file from 'dev' on 'interface' as hexdump to standard output\n"; " - Print file from 'dev' on 'interface' as hexdump to standard output\n");
#endif
U_BOOT_CMD(xxd, 4, 1, do_xxd, U_BOOT_CMD(xxd, 4, 1, do_xxd,
"Print file as hexdump to standard output", "Print file as hexdump to standard output",

View file

@ -166,8 +166,7 @@ static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return CMD_RET_USAGE; return CMD_RET_USAGE;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(ut,
static char ut_help_text[] =
"[-r] [-f] [<suite>] - run unit tests\n" "[-r] [-f] [<suite>] - run unit tests\n"
" -r<runs> Number of times to run each test\n" " -r<runs> Number of times to run each test\n"
" -f Force 'manual' tests to run as well\n" " -f Force 'manual' tests to run as well\n"
@ -237,8 +236,7 @@ static char ut_help_text[] =
!defined(CONFIG_SPL_BUILD) && !defined(API_BUILD) !defined(CONFIG_SPL_BUILD) && !defined(API_BUILD)
"\nunicode - Unicode functions" "\nunicode - Unicode functions"
#endif #endif
; );
#endif /* CONFIG_SYS_LONGHELP */
U_BOOT_CMD( U_BOOT_CMD(
ut, CONFIG_SYS_MAXARGS, 1, do_ut, ut, CONFIG_SYS_MAXARGS, 1, do_ut,

View file

@ -70,11 +70,8 @@ static int do_fuzz(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]
return 1; return 1;
} }
#ifdef CONFIG_SYS_LONGHELP U_BOOT_LONGHELP(fuzz,
static char fuzz_help_text[] = "[fuzz-test-name] - execute the named fuzz test\n");
"[fuzz-test-name] - execute the named fuzz test\n"
;
#endif /* CONFIG_SYS_LONGHELP */
U_BOOT_CMD( U_BOOT_CMD(
fuzz, CONFIG_SYS_MAXARGS, 1, do_fuzz, fuzz, CONFIG_SYS_MAXARGS, 1, do_fuzz,